From b70d445480c3a8fbe6764db2a9432211ad22fca3 Mon Sep 17 00:00:00 2001 From: caliskanbi Date: Mon, 15 May 2023 11:17:10 +0200 Subject: [PATCH] defines updated --- software/backend/backend_database.db | Bin 16384 -> 16384 bytes software/backend/data_functions.py | 10 +++++----- software/backend/tests/test_database.db | Bin 16384 -> 16384 bytes software/defines.py | 6 +++++- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/software/backend/backend_database.db b/software/backend/backend_database.db index ac54c93e1f8feebf7ec7f1d659a885325bb77435..8880ff8ce6ebdd80bcf2cb5b149469261afe0ca6 100644 GIT binary patch delta 706 zcmZo@U~Fh$oFL6;JWgOUIqpRWzIj7*$wn1cr1CCxKDFW;g022<9g4v zgR7A%iVG;Yv2h(|y{a+?gE1!u2RoCIfswJUfvK*cse*x}m4TU+sipmwz}KyEJA#;Z zn<{~nv9n`QW@zqUHWLJ9IryrjfdE|F2~|ZLrkh$Bn}L+ogN=V}s({0I6Dw0w4CB8Z z>W|U*dYFaFR34``L!h<>U?4CsIQSZafjv|k^LtY{xVCy!Pa9hq8{yK&B5o=R*N3Xj z$ja0hq0IqoEi4dNyi8?qXfw1js5il>Ps>yqhdu)<0}Gtm6iubDX|n)Er)V!}- delta 41 xcmZo@U~Fh$oFL7pK2gS*QGH{=e0>gaUIqpRah`(7><0Q98?AUY7uZZ-1_0!q3hw{_ 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 a6d863c40428284491104fc2ce73ad8f350b6334..40c152cedcfd84bf2cf3ce43559ad745d1e0b35c 100644 GIT binary patch delta 112 zcmV-$0FVEGfB}Gj0gxL3Jdqqj0X(r_lP@t23IPKd0dQ<#Zgg`74FCWD4h;SP56KUb z4_gl;4($%M4u1|v4iOF74WkWg4K)n@v4PqQ9W@RJ05bsx2L}N%FfubOFf}bPH6SoJ SIyE#pH8_(&KO3_)J<0-3i5uzw delta 82 zcmZo@U~Fh$oFL6;Hc`fz(QISFWPN>JE=Fca#)6#0ypm!zUIqpRUS3lM{*(NZ_@nt% m_}=nu no message needed # GETBATTERY -> no message needed