X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fdrivers%2Fao_pad.c;h=ffa833fef341341eca543fe12077dbe578fd3c32;hb=db12c17e9538bd82f2c2bf21357887ee7d894a1c;hp=e51d237b63c94e12650042e5dc106f29d20d1db4;hpb=26ce7a9a213bdd35a13937054988e7b8fa749632;p=fw%2Faltos diff --git a/src/drivers/ao_pad.c b/src/drivers/ao_pad.c index e51d237b..ffa833fe 100644 --- a/src/drivers/ao_pad.c +++ b/src/drivers/ao_pad.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of @@ -155,14 +156,16 @@ ao_pad_monitor(void) if (pyro > VOLTS_TO_PYRO(10)) { query.arm_status = AO_PAD_ARM_STATUS_ARMED; cur |= AO_LED_ARMED; - } else if (pyro < VOLTS_TO_PYRO(5)) { - query.arm_status = AO_PAD_ARM_STATUS_DISARMED; - arm_beep_time = 0; - } else { +#if AO_FIRE_R_POWER_FET + } else if (pyro > VOLTS_TO_PYRO(5)) { if ((ao_time() % 100) < 50) cur |= AO_LED_ARMED; query.arm_status = AO_PAD_ARM_STATUS_UNKNOWN; arm_beep_time = 0; +#endif + } else { + query.arm_status = AO_PAD_ARM_STATUS_DISARMED; + arm_beep_time = 0; } if ((ao_time() - ao_pad_packet_time) > AO_SEC_TO_TICKS(2)) cur |= AO_LED_RED; @@ -279,8 +282,10 @@ ao_pad_read_box(void) l = byte & 0xf; return h * 10 + l; } -#else -#define ao_pad_read_box() 0 +#endif + +#if HAS_FIXED_PAD_BOX +#define ao_pad_read_box() ao_config.pad_box #endif #ifdef PAD_BOX