add possibility to write content unfitted
This commit is contained in:
@@ -24,6 +24,7 @@ public:
|
|||||||
virtual ~Display() = default;
|
virtual ~Display() = default;
|
||||||
|
|
||||||
virtual void write_score(uint64_t score) = 0;
|
virtual void write_score(uint64_t score) = 0;
|
||||||
|
virtual void write_content(std::string & content) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,8 +20,6 @@ class EightDigitDisplay : public virtual Display
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~EightDigitDisplay() = default;
|
virtual ~EightDigitDisplay() = default;
|
||||||
|
|
||||||
virtual void write_content(std::string content) = 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,8 +20,6 @@ class SevenDigitDisplay : public virtual Display
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~SevenDigitDisplay() = default;
|
virtual ~SevenDigitDisplay() = default;
|
||||||
|
|
||||||
virtual void write_content(std::string & content) = 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -262,6 +262,10 @@ boost::optional<Poco::JSON::Object> OutputRequestHandler::parseDisplay(const std
|
|||||||
throw new Poco::InvalidArgumentException("Could not convert " + score + " to a number!\n" + e.what());
|
throw new Poco::InvalidArgumentException("Could not convert " + score + " to a number!\n" + e.what());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(action == "write_content")
|
||||||
|
{
|
||||||
|
display->write_content(score);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new Poco::NotFoundException("No Action with name \"" + action + "\" on sounds!");
|
throw new Poco::NotFoundException("No Action with name \"" + action + "\" on sounds!");
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class Networking:
|
|||||||
self.get("/flippers/" + name + "/activate")
|
self.get("/flippers/" + name + "/activate")
|
||||||
|
|
||||||
def deactivateFlipper(self, name):
|
def deactivateFlipper(self, name):
|
||||||
self.get("/flippers/" + name + "deactivate")
|
self.get("/flippers/" + name + "/deactivate")
|
||||||
|
|
||||||
def lampStatus(self, lamp):
|
def lampStatus(self, lamp):
|
||||||
return json.loads(self.get("/lamps/" + lamp + "/status"))
|
return json.loads(self.get("/lamps/" + lamp + "/status"))
|
||||||
|
|||||||
Reference in New Issue
Block a user