Add server for centralised 'commander'
This commit is contained in:
15
DecisionSystem/CentralisedDecision/central_server.py
Normal file
15
DecisionSystem/CentralisedDecision/central_server.py
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
from DecisionSystem.CentralisedDecision import commander
|
||||||
|
from DecisionSystem.CentralisedDecision.messenger import MqttMessenger
|
||||||
|
|
||||||
|
mqtt = MqttMessenger()
|
||||||
|
c = commander.Commander(mqtt, 10)
|
||||||
|
mqtt.connect()
|
||||||
|
|
||||||
|
f = input("Press any key and enter other than q to get current observation of the swarm: ")
|
||||||
|
|
||||||
|
while f != "q":
|
||||||
|
print("Vote is: ")
|
||||||
|
print(c.get_votes())
|
||||||
|
f = input("Press any key and enter other than q to get current observation of the swarm: ")
|
||||||
|
|
||||||
|
print("Thanks for trying!")
|
||||||
Reference in New Issue
Block a user