From 765e2da8a7495aca1c90309b6df0ada9647a32f1 Mon Sep 17 00:00:00 2001 From: Pat Hickey Date: Wed, 5 Dec 2012 18:33:42 -0800 Subject: [PATCH] AP_HAL_AVR: analog input fixed when ANALOG_INPUT_NONE * need to provide new sample so we dont spin forever --- libraries/AP_HAL_AVR/AnalogIn_Common.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/AP_HAL_AVR/AnalogIn_Common.cpp b/libraries/AP_HAL_AVR/AnalogIn_Common.cpp index f073dcdb70..bd4ad671fb 100644 --- a/libraries/AP_HAL_AVR/AnalogIn_Common.cpp +++ b/libraries/AP_HAL_AVR/AnalogIn_Common.cpp @@ -70,6 +70,7 @@ void AVRAnalogIn::_register_channel(ADCSource* ch) { void AVRAnalogIn::_timer_event(uint32_t t) { if (_channels[_active_channel]->_pin == ANALOG_INPUT_NONE) { + _channels[_active_channel]->new_sample(0); goto next_channel; }