From 99642f9c4f89aa5577376a9cd118e7cff26e2762 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 31 May 2018 22:39:45 -0700 Subject: altos/telefire*: Do voltage tests in decivolts instead of ADC units This requires that each pad device specify the ADC reference voltage and all relevant voltage divider resistor values explicitly so that the ADC values can be converted to decivolts and compared with one another. This should be easier to understand in the future when reading the code. Signed-off-by: Keith Packard --- src/telefire-v0.2/ao_pins.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src/telefire-v0.2') diff --git a/src/telefire-v0.2/ao_pins.h b/src/telefire-v0.2/ao_pins.h index 4faeb65f..65f5bdcc 100644 --- a/src/telefire-v0.2/ao_pins.h +++ b/src/telefire-v0.2/ao_pins.h @@ -111,15 +111,24 @@ #define AO_STROBE P2_4 /* test these values with real igniters */ -#define AO_PAD_RELAY_CLOSED 3524 -#define AO_PAD_NO_IGNITER 16904 -#define AO_PAD_GOOD_IGNITER 22514 - #define AO_PAD_ADC_PYRO 4 #define AO_PAD_ADC_BATT 5 #define AO_ADC_FIRST_PIN 0 +#define AO_ADC_REFERENCE_DV 33 +#define AO_PAD_R_V_BATT_BATT_SENSE 100 +#define AO_PAD_R_BATT_SENSE_GND 27 + +#define AO_PAD_R_V_BATT_V_PYRO 100 +#define AO_PAD_R_V_PYRO_PYRO_SENSE 100 +#define AO_PAD_R_PYRO_SENSE_GND 27 + +#define AO_PAD_R_V_PYRO_IGNITER 100 +#define AO_PAD_R_IGNITER_IGNITER_SENSE 100 +#define AO_PAD_R_IGNITER_SENSE_GND 27 + + struct ao_adc { int16_t sense[AO_PAD_NUM]; int16_t pyro; -- cgit v1.2.3