|
|
|
|
|
|
|
|
thread.start() |
|
|
thread.start() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_position(clients: mqtt.Client, userdata, message: mqtt.MQTTMessage): |
|
|
|
|
|
|
|
|
def get_position(client: mqtt.Client, userdata, message: mqtt.MQTTMessage): |
|
|
""" |
|
|
""" |
|
|
Callback function for GPS position request |
|
|
Callback function for GPS position request |
|
|
Function to send actual GPS position via MQTT in form of POSITION |
|
|
Function to send actual GPS position via MQTT in form of POSITION |
|
|
|
|
|
|
|
|
"Position": "" |
|
|
"Position": "" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
clients.publish(Topics["ROBOT_DATA_POSITION"], json.dumps(position, indent=4), qos=1) |
|
|
|
|
|
|
|
|
client.publish(Topics["ROBOT_DATA_POSITION"], json.dumps(position, indent=4), qos=1) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_batteryStatus(client: mqtt.Client, userdata, message: mqtt.MQTTMessage): |
|
|
def get_batteryStatus(client: mqtt.Client, userdata, message: mqtt.MQTTMessage): |