Added color code driving, changed Plant order, Docu update

This commit is contained in:
waldluis
2023-05-05 10:40:33 +02:00
parent 0a53fe171a
commit 830d662e08
11 changed files with 70 additions and 37 deletions
+3 -5
View File
@@ -32,7 +32,9 @@ def drive_plant_thread(plantID, actionID, client: mqtt.Client):
actionID (_type_): current ID of driving action
client (mqtt.Client): current mqtt client for publishing
"""
# FIXME Change to color code driving
os.system(f'sshpass -p maker ssh robot@ev3dev.local python3 /home/robot/Programme/plant_{plantID}.py')
# os.system(f'sshpass -p maker ssh robot@ev3dev.local python3 /home/robot/Programme/drive_plant.py {plantID}')
print("Measuring Sensors")
@@ -40,11 +42,7 @@ def drive_plant_thread(plantID, actionID, client: mqtt.Client):
# measure_send_data(plantID, actionID, client)
print("Robot driving home")
if plantID % 2 == 0:
leftRight = -50 #rotating left
else:
leftRight = 50 #rotating right
os.system(f'sshpass -p maker ssh robot@ev3dev.local python3 /home/robot/Programme/drive_back.py {leftRight}')
os.system(f'sshpass -p maker ssh robot@ev3dev.local python3 /home/robot/Programme/drive_back.py {plantID}')
print("Robot home")
#TODO decide about robot occupied message