Browse Source

[fix] optimize start button logic

main
silencht 7 months ago
parent
commit
b0c174cccb
  1. 4
      teleop/teleop_hand_and_arm.py

4
teleop/teleop_hand_and_arm.py

@ -42,10 +42,10 @@ def on_press(key):
if key == 'r': if key == 'r':
start_signal = True start_signal = True
logger_mp.info("Program start signal received.") logger_mp.info("Program start signal received.")
elif key == 'q':
elif key == 'q' and start_signal == True:
stop_listening() stop_listening()
running = False running = False
elif key == 's':
elif key == 's' and start_signal == True:
should_toggle_recording = True should_toggle_recording = True
else: else:
logger_mp.info(f"{key} was pressed, but no action is defined for this key.") logger_mp.info(f"{key} was pressed, but no action is defined for this key.")

Loading…
Cancel
Save