Browse Source

AP_HAL_AVR: analog input fixed when ANALOG_INPUT_NONE

* need to provide new sample so we dont spin forever
master
Pat Hickey 12 years ago committed by Andrew Tridgell
parent
commit
765e2da8a7
  1. 1
      libraries/AP_HAL_AVR/AnalogIn_Common.cpp

1
libraries/AP_HAL_AVR/AnalogIn_Common.cpp

@ -70,6 +70,7 @@ void AVRAnalogIn::_register_channel(ADCSource* ch) { @@ -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;
}

Loading…
Cancel
Save