summaryrefslogtreecommitdiff
path: root/src/telefiretwo-v0.1
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2018-05-31 22:39:45 -0700
committerKeith Packard <keithp@keithp.com>2018-05-31 22:39:45 -0700
commit99642f9c4f89aa5577376a9cd118e7cff26e2762 (patch)
tree724114801ee0e0697e829abe342d6e8b43fe1c27 /src/telefiretwo-v0.1
parentab22c56ca02db87a84b6950c024a90b086f5ce28 (diff)
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 <keithp@keithp.com>
Diffstat (limited to 'src/telefiretwo-v0.1')
-rw-r--r--src/telefiretwo-v0.1/ao_pins.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/telefiretwo-v0.1/ao_pins.h b/src/telefiretwo-v0.1/ao_pins.h
index 1e5c0d09..dedd0fad 100644
--- a/src/telefiretwo-v0.1/ao_pins.h
+++ b/src/telefiretwo-v0.1/ao_pins.h
@@ -191,6 +191,19 @@
#define HAS_ADC_TEMP 0
+#define AO_ADC_REFERENCE_DV 33
+
+#define AO_PAD_R_V_BATT_BATT_SENSE 200
+#define AO_PAD_R_BATT_SENSE_GND 22
+
+#define AO_PAD_R_V_BATT_V_PYRO 200
+#define AO_PAD_R_V_PYRO_PYRO_SENSE 200
+#define AO_PAD_R_PYRO_SENSE_GND 22
+
+#undef AO_PAD_R_V_PYRO_IGNITER
+#define AO_PAD_R_IGNITER_IGNITER_SENSE 200
+#define AO_PAD_R_IGNITER_SENSE_GND 22
+
struct ao_adc {
int16_t sense[AO_PAD_NUM];
int16_t pyro;