Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions docs/user-guides/sbs_motion_commander.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ Since this tutorial won't be a table top tutorial like last time, but an actual
We want to know if the deck is correctly attached before flying, therefore we will add a callback for the `"deck.bcFlow2"` parameter. Add the following line after the `...SyncCrazyflie(...)` in `__main__`
```python
with SyncCrazyflie(URI, cf=Crazyflie(rw_cache='./cache')) as scf:
# Arm the Crazyflie
scf.cf.platform.send_arming_request(True)
time.sleep(1.0)

scf.cf.param.add_update_callback(group="deck", name="bcFlow2",
cb=param_deck_flow)
Expand Down Expand Up @@ -120,6 +123,9 @@ if __name__ == '__main__':
cflib.crtp.init_drivers()

with SyncCrazyflie(URI, cf=Crazyflie(rw_cache='./cache')) as scf:
# Arm the Crazyflie
scf.cf.platform.send_arming_request(True)
time.sleep(1.0)

scf.cf.param.add_update_callback(group='deck', name='bcFlow2',
cb=param_deck_flow)
Expand All @@ -133,6 +139,9 @@ So now we are going to start up the SyncCrazyflie and start a function in the `_

```python
with SyncCrazyflie(URI, cf=Crazyflie(rw_cache='./cache')) as scf:
# Arm the Crazyflie
scf.cf.platform.send_arming_request(True)
time.sleep(1.0)

if not deck_attached_event.wait(timeout=5):
print('No flow deck detected!')
Expand Down Expand Up @@ -216,6 +225,9 @@ if __name__ == '__main__':
cflib.crtp.init_drivers()

with SyncCrazyflie(URI, cf=Crazyflie(rw_cache='./cache')) as scf:
# Arm the Crazyflie
scf.cf.platform.send_arming_request(True)
time.sleep(1.0)

scf.cf.param.add_update_callback(group='deck', name='bcFlow2',
cb=param_deck_flow)
Expand Down Expand Up @@ -305,6 +317,9 @@ if __name__ == '__main__':
cflib.crtp.init_drivers()

with SyncCrazyflie(URI, cf=Crazyflie(rw_cache='./cache')) as scf:
# Arm the Crazyflie
scf.cf.platform.send_arming_request(True)
time.sleep(1.0)

scf.cf.param.add_update_callback(group='deck', name='bcFlow2',
cb=param_deck_flow)
Expand Down Expand Up @@ -408,6 +423,9 @@ if __name__ == '__main__':
cflib.crtp.init_drivers()

with SyncCrazyflie(URI, cf=Crazyflie(rw_cache='./cache')) as scf:
# Arm the Crazyflie
scf.cf.platform.send_arming_request(True)
time.sleep(1.0)

scf.cf.param.add_update_callback(group='deck', name='bcFlow2',
cb=param_deck_flow)
Expand Down Expand Up @@ -521,6 +539,9 @@ if __name__ == '__main__':
cflib.crtp.init_drivers()

with SyncCrazyflie(URI, cf=Crazyflie(rw_cache='./cache')) as scf:
# Arm the Crazyflie
scf.cf.platform.send_arming_request(True)
time.sleep(1.0)

scf.cf.param.add_update_callback(group='deck', name='bcFlow2',
cb=param_deck_flow)
Expand Down Expand Up @@ -648,6 +669,9 @@ if __name__ == '__main__':
cflib.crtp.init_drivers()

with SyncCrazyflie(URI, cf=Crazyflie(rw_cache='./cache')) as scf:
# Arm the Crazyflie
scf.cf.platform.send_arming_request(True)
time.sleep(1.0)

scf.cf.param.add_update_callback(group='deck', name='bcFlow2',
cb=param_deck_flow)
Expand Down