Reorder methods for python interpretor

This commit is contained in:
DSTO\pivatom
2018-12-18 10:12:55 +10:30
parent b42839bad1
commit 6efeb5ae05

View File

@@ -16,18 +16,19 @@ class Commander:
self._client.loop_start() 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): def make_decision(self):
votes = self._votes votes = self._votes
for vote in votes: for vote in votes:
continue 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): def add_subscription(self, topic, callback=None, qos=0):
self._client.subscribe(topic) self._client.subscribe(topic)