X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fdrivers%2Fao_pad.c;h=ffe46c6833723df2279559690e1bec2e7ad6272e;hb=dcbd87bc685924a6587a5f4dae47d34f417601b0;hp=3ad239cced3e3c62f07545ba51277982668face2;hpb=e7c25e3ba04b1e9f8e6fa31e2d464fe96a074dad;p=fw%2Faltos diff --git a/src/drivers/ao_pad.c b/src/drivers/ao_pad.c index 3ad239cc..ffe46c68 100644 --- a/src/drivers/ao_pad.c +++ b/src/drivers/ao_pad.c @@ -127,6 +127,8 @@ ao_pad_monitor(void) #define VOLTS_TO_PYRO(x) ((int16_t) ((x) * 27.0 / 127.0 / 3.3 * 32767.0)) + /* convert ADC value to voltage in tenths, then add .2 for the diode drop */ + query.battery = (packet->adc.batt + 96) / 192 + 2; cur = 0; if (pyro > VOLTS_TO_PYRO(10)) { query.arm_status = AO_PAD_ARM_STATUS_ARMED;