defines updated

This commit is contained in:
caliskanbi
2023-05-15 11:17:10 +02:00
parent 93b4075c35
commit b70d445480
4 changed files with 10 additions and 6 deletions
Binary file not shown.
+5 -5
View File
@@ -71,23 +71,23 @@ def action_drive(client: mqtt.Client, userdata, message: mqtt.MQTTMessage, mydat
"ActionID": action_id
}
if robot.get_order_number() < 5 and robot.get_robot_status() is True:
if robot.get_order_number() < 6 and robot.get_robot_status() is True:
robot.add_order(drive_data)
client.publish(Topics['ROBOT_ACTION_DRIVE'], json.dumps(drive_data))
logging.info("BACKEND_ACTION_DRIVE Drive Command published: " + json.dumps(drive_data))
else:
if robot.get_order_number() < 5:
if robot.get_order_number() < 6:
robot.add_order(drive_data)
logging.info("BACKEND_ACTION_DRIVE New data added to order list: " + str(drive_data))
elif robot.get_order_number() >= 5:
elif robot.get_order_number() >= 6:
logging.error("Could not add Order to list. Order discarded")
client.publish(Topics['BACKEND_DATA_ERROR'], "Could not add Order to list. Order discarded")
def action_driveall(client: mqtt.Client, userdata, message: mqtt.MQTTMessage, mydatabase: PlantDataBase,
robot: Robot):
# TODO: Implement here
print("HELLO")
client.publish(Topics['ROBOT_ACTION_DRIVEALL'])
def action_getposition(client: mqtt.Client, userdata, message: mqtt.MQTTMessage, mydatabase: PlantDataBase):
Binary file not shown.