def networking_init(): #instantiates mqtt client as subscriber connects to broker and awaits messages in endless loop global drive_controller drive_controller = comm.defineClient(client_id='drive_controller') drive_controller.on_connect = connected drive_controller.on_message = message_in drive_controller.connect(comm.BROKER) drive_controller.loop_forever()
def networking_init(): #instantiates mqtt client connects to broker and awaits messages in endless loop global data_collector data_collector = comm.defineClient(client_id='data_collector') data_collector.on_connect = connected data_collector.on_message = message_in data_collector.connect(comm.BROKER) print('setting up done, starting ...')
def networking_init(): global ai_pilot ai_pilot = comm.defineClient(client_id='ai_pilot') comm.publisher_init(client=ai_pilot)
def networking_init(): #instantiates mqtt client connects to broker and awaits messages in endless loop global pilot pilot = comm.defineClient(client_id='pilot') comm.publisher_init(client=pilot)
def init(): global soft_pilot soft_pilot = comm.defineClient(client_id='soft_pilot') comm.publisher_init(client=soft_pilot)