Added color code driving, changed Plant order, Docu update
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user