@@ -21,8 +21,15 @@ Connecting Hardware
2121 RC receiver: connect pin_ser0_rx to receiver TX pin, and pin_ser0_tx to receiver RX pin
2222 ESCs: pin_out0 ... pin_out3 to the ESC inputs of motor1 ... motor4
2323
24- Arming: Set throttle low, then flip arm switch from DISARMED to ARMED.
25- Disarming: Flip arm switch from ARMED to DISARMED, at any throttle position. "Kill switch".
24+ Arming/disarming with dedicated switch
25+
26+ Arm: Set throttle low, then flip arm switch from DISARMED to ARMED.
27+ Disarm: Flip arm switch from ARMED to DISARMED, at any throttle position. "Kill switch".
28+
29+ Arming/disarming with sticks (when no arm switch is defined, i.e. cfg.rcl_arm_ch == 0 )
30+
31+ Arm: Pull both sticks toward you, yaw full right, and roll full left
32+ Disarm: Pull both sticks toward you, yaw full left, and roll full right
2633
2734LED State Meaning
2835--------- -------
@@ -318,28 +325,24 @@ void control_Rate(bool zero_integrators) {
318325}
319326
320327void out_KillSwitchAndFailsafe () {
321- static bool rcin_arm_prev = true ; // initial value is true: forces out.armed false on startup even if arm switch is ON
322-
323- // Change to ARMED when throttle is zero and radio armed switch was flipped from disamed to armed position
324- if (!out.armed && rcl.throttle == 0 && rcl.arm && !rcin_arm_prev) {
328+ // Change to ARMED when rcl is armed (by switch or stick command)
329+ if (!out.armed && rcl.armed ) {
325330 out.armed = true ;
326331 Serial.println (" OUT: ARMED" );
327332 bbx.start (); // start blackbox logging
328333 }
329334
330- // Change to DISARMED when radio armed switch is in disarmed position , or if radio lost connection
331- if (out.armed && (!rcl.arm || !rcl.connected ())) {
335+ // Change to DISARMED when rcl is disarmed, or if radio lost connection
336+ if (out.armed && (!rcl.armed || !rcl.connected ())) {
332337 out.armed = false ;
333- if (!rcl.arm ) {
338+ if (!rcl.armed ) {
334339 Serial.println (" OUT: DISARMED" );
335340 bbx.stop (); // stop blackbox logging
336341 }else {
337342 Serial.println (" OUT: DISARMED due to lost radio connection" );
338343 // keep on logging to document the crash...
339344 }
340345 }
341-
342- rcin_arm_prev = rcl.arm ;
343346}
344347
345348void out_Mixer () {
0 commit comments