FreeCalypso > hg > fc-magnetite
diff src/aci2/aci/ati_fchg.c @ 565:96c1d047b3c6
aci2: AT%VBAT and melody play enhancements matching aci3
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 07 Jan 2019 01:06:46 +0000 |
parents | 09b12bd1b0f2 |
children |
line wrap: on
line diff
--- a/src/aci2/aci/ati_fchg.c Mon Jan 07 00:47:48 2019 +0000 +++ b/src/aci2/aci/ati_fchg.c Mon Jan 07 01:06:46 2019 +0000 @@ -93,4 +93,17 @@ #endif /* RVM_FCHG_SWE */ +/* AT%VBAT - retrieve VBAT measurement, independent of FCHG */ +GLOBAL T_ATI_RSLT atPercentVBAT ( char *cl, UBYTE srcId ) +{ + extern USHORT *csf_return_adc(void); + USHORT *adc_conversion; + + TRACE_FUNCTION("atPercentVBAT()"); + adc_conversion = csf_return_adc(); + sprintf(g_sa, "%%VBAT: %u", adc_conversion[0]); + io_sendMessage(srcId, g_sa, ATI_NORMAL_OUTPUT); + return ATI_CMPL; +} + #endif /* ATI_FCHG_C */