From 3115d48ba11943410c982e5ae4d428107249d847 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 30 Apr 2012 16:11:43 +1000 Subject: [PATCH] ADC: added suspend/resume on init --- libraries/AP_ADC/AP_ADC_ADS7844.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/AP_ADC/AP_ADC_ADS7844.cpp b/libraries/AP_ADC/AP_ADC_ADS7844.cpp index 7a925e6351..a5f048772f 100644 --- a/libraries/AP_ADC/AP_ADC_ADS7844.cpp +++ b/libraries/AP_ADC/AP_ADC_ADS7844.cpp @@ -133,6 +133,7 @@ AP_ADC_ADS7844::AP_ADC_ADS7844() // Public Methods ////////////////////////////////////////////////////////////// void AP_ADC_ADS7844::Init( AP_PeriodicProcess * scheduler ) { + scheduler->suspend_timer(); pinMode(ADC_CHIP_SELECT, OUTPUT); digitalWrite(ADC_CHIP_SELECT, HIGH); // Disable device (Chip select is active low) @@ -159,6 +160,7 @@ void AP_ADC_ADS7844::Init( AP_PeriodicProcess * scheduler ) last_ch6_micros = micros(); + scheduler->resume_timer(); scheduler->register_process( AP_ADC_ADS7844::read ); }