diff options
author | Keith Packard <keithp@keithp.com> | 2012-06-02 17:09:00 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-06-02 17:12:27 -0700 |
commit | 9aa7993ee31bdfd6890ad7262a0375c07464ee76 (patch) | |
tree | c2fc7cf9e4e945b122eaa53d4e9788a0c171f663 /src/stm/ao_adc_stm.c | |
parent | 69a8907ecbb7ca0e8526aeea0dc7490a191a0f8b (diff) |
altos: Intgrate hmc5883 sensor into adc ring
Creates a task to poll the mag sensor and place the data into the
sensor data ring.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stm/ao_adc_stm.c')
-rw-r--r-- | src/stm/ao_adc_stm.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/stm/ao_adc_stm.c b/src/stm/ao_adc_stm.c index 24a1fdd0..71299de9 100644 --- a/src/stm/ao_adc_stm.c +++ b/src/stm/ao_adc_stm.c @@ -62,6 +62,11 @@ static void ao_adc_done(int index) step = 0; ao_data_ring[ao_data_head].ms5607 = ao_ms5607_current; #endif +#if HAS_HMC5883 + if (!ao_hmc5883_valid) + step = 0; + ao_data_ring[ao_data_head].hmc5883 = ao_hmc5883_current; +#endif if (step) { ao_data_head = ao_data_ring_next(ao_data_head); ao_wakeup((void *) &ao_data_head); |