0
0
Drone Programmingprogramming~10 mins

RC signal loss failsafe in Drone Programming - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to check if the RC signal is lost.

Drone Programming
if rc_signal_strength [1] threshold:
    activate_failsafe()
Drag options to blanks, or click blank then click option'
A>
B<=
C!=
D==
Attempts:
3 left
💡 Hint
Common Mistakes
Using '>' instead of '<=' causes failsafe to never activate.
2fill in blank
medium

Complete the code to set the drone to hover mode during signal loss.

Drone Programming
if rc_signal_lost:
    drone_mode = [1]
Drag options to blanks, or click blank then click option'
A"manual"
B"land"
C"return_home"
D"hover"
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'land' might cause sudden landing, which is not always safe.
3fill in blank
hard

Fix the error in the failsafe activation condition.

Drone Programming
if rc_signal_strength [1] threshold:
    activate_failsafe()
Drag options to blanks, or click blank then click option'
A<
B!=
C>=
D==
Attempts:
3 left
💡 Hint
Common Mistakes
Using '>=' causes failsafe to activate incorrectly.
4fill in blank
hard

Fill both blanks to create a dictionary mapping failsafe modes to actions.

Drone Programming
failsafe_actions = {"hover": [1], "land": [2]
Drag options to blanks, or click blank then click option'
Astabilize_drone
Binitiate_landing
Creturn_to_home
Dsend_alert
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping actions causes wrong behavior during failsafe.
5fill in blank
hard

Fill all three blanks to complete the failsafe check and response.

Drone Programming
if rc_signal_strength [1] threshold:
    mode = [2]
    failsafe_actions[mode][3]
Drag options to blanks, or click blank then click option'
A<=
B"hover"
C()
D==
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting parentheses causes no function call.