Skip to content

Commit d56f5c8

Browse files
committed
Added arming in sbs motion commander
1 parent 16debdb commit d56f5c8

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

docs/user-guides/sbs_motion_commander.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ Since this tutorial won't be a table top tutorial like last time, but an actual
5555
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__`
5656
```python
5757
with SyncCrazyflie(URI, cf=Crazyflie(rw_cache='./cache')) as scf:
58+
# Arm the Crazyflie
59+
scf.cf.platform.send_arming_request(True)
60+
time.sleep(1.0)
5861

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

0 commit comments

Comments
 (0)