From f587a011657cb4a41ee489f0404243ef983c4406 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 21 Dec 2011 23:22:53 +1100 Subject: [PATCH] ADC: update for new ap_proceduce prototype --- libraries/AP_ADC/AP_ADC_ADS7844.cpp | 4 ++-- libraries/AP_ADC/AP_ADC_ADS7844.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/AP_ADC/AP_ADC_ADS7844.cpp b/libraries/AP_ADC/AP_ADC_ADS7844.cpp index 12affb8787..141f052d10 100644 --- a/libraries/AP_ADC/AP_ADC_ADS7844.cpp +++ b/libraries/AP_ADC/AP_ADC_ADS7844.cpp @@ -84,7 +84,7 @@ static inline unsigned char ADC_SPI_transfer(unsigned char data) } -void AP_ADC_ADS7844::read(void) +void AP_ADC_ADS7844::read(uint32_t tnow) { uint8_t ch; @@ -112,7 +112,7 @@ void AP_ADC_ADS7844::read(void) // reader below could get a division by zero _sum[ch] = 0; _count[ch] = 1; - last_ch6_micros = micros(); + last_ch6_micros = tnow; } _sum[ch] += (v >> 3); } diff --git a/libraries/AP_ADC/AP_ADC_ADS7844.h b/libraries/AP_ADC/AP_ADC_ADS7844.h index f046d0bbb0..2bd8235b57 100644 --- a/libraries/AP_ADC/AP_ADC_ADS7844.h +++ b/libraries/AP_ADC/AP_ADC_ADS7844.h @@ -36,7 +36,7 @@ class AP_ADC_ADS7844 : public AP_ADC uint16_t _prev_gyro[3]; uint16_t _prev_accel[3]; uint8_t _filter_index_accel; - static void read( void ); + static void read(uint32_t); };