diff --git a/software/backend/backend_database.db b/software/backend/backend_database.db index ac54c93..8880ff8 100644 Binary files a/software/backend/backend_database.db and b/software/backend/backend_database.db differ diff --git a/software/backend/data_functions.py b/software/backend/data_functions.py index 69bc018..f5ea2e6 100644 --- a/software/backend/data_functions.py +++ b/software/backend/data_functions.py @@ -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): diff --git a/software/backend/tests/test_database.db b/software/backend/tests/test_database.db index a6d863c..40c152c 100644 Binary files a/software/backend/tests/test_database.db and b/software/backend/tests/test_database.db differ diff --git a/software/defines.py b/software/defines.py index 2f3786c..6050617 100644 --- a/software/defines.py +++ b/software/defines.py @@ -72,9 +72,13 @@ BATTERY = { DRIVE = { "PlantID": 0, - "ActionID": 0 + "ActionID": "" } +DRIVEALL = { + "PlantID": [0, 0], # List containing PlantIDs sorted ascending + "ActionID": "" +} # GETPOSITION -> no message needed # GETBATTERY -> no message needed