Client: remove unnecessary interruption returns from takeoff

This commit is contained in:
Arthur Golubtsov
2019-12-13 07:25:16 +00:00
parent 2a07b43c88
commit 16da689b96

View File

@@ -216,14 +216,10 @@ try:
interrupter=interrupt_event):
if use_leds:
LedLib.wipe_to(255, 0, 0, interrupter=interrupter)
if interrupter.is_set():
return
result = FlightLib.takeoff(height=z, timeout_takeoff=timeout, frame_id=frame_id,
emergency_land=safe_takeoff, interrupter=interrupter)
if result == 'not armed' or result == 'timeout':
raise Exception('STOP') # Raise exception to clear task_manager if copter can't arm
if interrupter.is_set():
return
if use_leds:
LedLib.blink(0, 255, 0, wait=50, interrupter=interrupter)