altos: Data packet tick count does not live in adc structure
authorKeith Packard <keithp@keithp.com>
Sun, 27 May 2012 22:44:38 +0000 (16:44 -0600)
committerKeith Packard <keithp@keithp.com>
Sun, 27 May 2012 22:44:38 +0000 (16:44 -0600)
It was moved to the global structure. Having two is confusing.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/megametrum-v0.1/ao_pins.h
src/stm/ao_adc_stm.c

index 3ab7e15ac883c540a8658b4db859095a1e137c81..2ae3cea84c3935ee28ac29220203362c035379d3 100644 (file)
 #define AO_ADC_NUM_SENSE       6
 
 struct ao_adc {
 #define AO_ADC_NUM_SENSE       6
 
 struct ao_adc {
-       uint16_t                tick;
        int16_t                 sense[AO_ADC_NUM_SENSE];
        int16_t                 v_batt;
        int16_t                 v_pbatt;
        int16_t                 sense[AO_ADC_NUM_SENSE];
        int16_t                 v_batt;
        int16_t                 v_pbatt;
index af2968d6ea9df830933c63e92e775859968c2e10..576dbf5d6c76b78c946575aa94f0c29f8d3d55ee 100644 (file)
@@ -50,7 +50,7 @@ static uint8_t                        ao_adc_ready;
  */
 static void ao_adc_done(int index)
 {
  */
 static void ao_adc_done(int index)
 {
-       ao_data_ring[ao_data_head].adc.tick = ao_time();
+       ao_data_ring[ao_data_head].tick = ao_time();
 #if HAS_MPU6000
        ao_data_ring[ao_data_head].mpu6000 = ao_mpu6000_current;
 #endif
 #if HAS_MPU6000
        ao_data_ring[ao_data_head].mpu6000 = ao_mpu6000_current;
 #endif