altos/telefire: Don't arm the box if the local arm switch is off
authorKeith Packard <keithp@keithp.com>
Fri, 18 Oct 2019 06:09:47 +0000 (23:09 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 18 Oct 2019 06:13:45 +0000 (23:13 -0700)
This skips arming the box when the local arming switch is off. This
keeps the siren and light from going off, and also avoids attempting
to fire the channels in case something else screwy is going on.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/drivers/ao_pad.c

index eeb9b5052937b9df35352e4d4df8dbfcb2f98013..ce9f8725456e8132d0fa6011507f4085f9b3dc23 100644 (file)
@@ -406,6 +406,10 @@ ao_pad(void)
                                PRINTD ("time difference too large %d\n", time_difference);
                                break;
                        }
+                       if (query.arm_status != AO_PAD_ARM_STATUS_ARMED) {
+                               PRINTD ("box not armed locally\n");
+                               break;
+                       }
                        PRINTD ("armed\n");
                        ao_pad_armed = command.channels;
                        ao_pad_arm_time = ao_time();