diff --git a/DecisionSystem/commander.py b/DecisionSystem/commander.py index 188d51c..13e1392 100644 --- a/DecisionSystem/commander.py +++ b/DecisionSystem/commander.py @@ -16,18 +16,19 @@ class Commander: self._client.loop_start() - def get_votes(self, topic, message, qos=0): - # Publish a message that votes are needed. - ms.client.publish(topic, message, qos) - time.sleep(self.timeout) - make_decision() - def make_decision(self): votes = self._votes for vote in votes: continue + + def get_votes(self, topic, message, qos=0): + # Publish a message that votes are needed. + ms.client.publish(topic, message, qos) + time.sleep(self.timeout) + make_decision() + def add_subscription(self, topic, callback=None, qos=0): self._client.subscribe(topic)