Browse Source

Robot Docu updated

master
waldluis 1 year ago
parent
commit
99b1bbb065

BIN
documentation/Robot.docx View File


+ 1986
- 105
documentation/SmartGardeningProjekt.mdj
File diff suppressed because it is too large
View File


+ 1
- 1
software/roboter/raspy/functions.py View File

@@ -216,7 +216,7 @@ def get_position(clients: mqtt.Client, userdata, message: mqtt.MQTTMessage):
clients.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):
"""
Callback function for battery status request
Function to read battery status from ev3 and send via MQTT in form of BATTERY

+ 1
- 1
software/roboter/raspy/mainProg.py View File

@@ -30,7 +30,7 @@ def on_connect(client: mqtt.Client, userdata, flags, rc):
#Add callbacks
client.message_callback_add(Topics["ROBOT_ACTION_DRIVE"], functions.drive_plant)
client.message_callback_add(Topics["ROBOT_ACTION_GETPOSITION"], functions.get_position)
client.message_callback_add(Topics["ROBOT_ACTION_GETBATTERY"], functions.get_BatteryStatus)
client.message_callback_add(Topics["ROBOT_ACTION_GETBATTERY"], functions.get_batteryStatus)
client.message_callback_add(Topics["ROBOT_ACTION_DRIVEALL"], functions.drive_plant_all)

#Subscribe to topics

Loading…
Cancel
Save