summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBdale Garbee <bdale@gag.com>2017-04-19 15:08:15 -0600
committerBdale Garbee <bdale@gag.com>2017-04-19 15:08:15 -0600
commit1e7143e5d448cd05c355f4a323ae4892b02022ac (patch)
treef9d1ab79f4085508940dea10c7724c231eb9ad7f /src
parent6e699fa4971668bbe569d2a0e2ed9f891877d140 (diff)
add new ADC channels for telefiretwo
Diffstat (limited to 'src')
-rw-r--r--src/telefiretwo-v1.0/ao_pins.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/telefiretwo-v1.0/ao_pins.h b/src/telefiretwo-v1.0/ao_pins.h
index 469e9937..8cde0043 100644
--- a/src/telefiretwo-v1.0/ao_pins.h
+++ b/src/telefiretwo-v1.0/ao_pins.h
@@ -175,13 +175,18 @@
#define AO_PAD_ADC_PYRO 2
#define AO_PAD_ADC_BATT 8
+#define AO_PAD_ADC_THRUST 3
+#define AO_PAD_ADC_PRESSURE 18
+
#define AO_ADC_FIRST_PIN 0
-#define AO_NUM_ADC 3
+#define AO_NUM_ADC 5
#define AO_ADC_SQ1 AO_PAD_ADC_0
#define AO_ADC_SQ2 AO_PAD_ADC_PYRO
#define AO_ADC_SQ3 AO_PAD_ADC_BATT
+#define AO_ADC_SQ4 AO_PAD_ADC_THRUST
+#define AO_ADC_SQ5 AO_PAD_ADC_PRESSURE
#define AO_PYRO_R_PYRO_SENSE 200
#define AO_PYRO_R_SENSE_GND 22
@@ -196,17 +201,23 @@ struct ao_adc {
int16_t sense[AO_PAD_NUM];
int16_t pyro;
int16_t batt;
+ int16_t thrust;
+ int16_t pressure;
};
#define AO_ADC_DUMP(p) \
- printf ("tick: %5u 0: %5d pyro: %5d batt %5d\n", \
+ printf ("tick: %5u 0: %5d pyro: %5d batt %5d thrust %5d pressure %5d\n", \
(p)->tick, \
(p)->adc.sense[0], \
(p)->adc.pyro, \
- (p)->adc.batt)
+ (p)->adc.batt, \
+ (p)->adc.thrust, \
+ (p)->adc.pressure)
#define AO_ADC_PINS ((1 << AO_PAD_ADC_0) | \
(1 << AO_PAD_ADC_PYRO) | \
- (1 << AO_PAD_ADC_BATT))
+ (1 << AO_PAD_ADC_BATT) | \
+ (1 << AO_PAD_ADC_THRUST) | \
+ (1 << AO_PAD_ADC_PRESSURE))
#endif /* _AO_PINS_H_ */