Browse Source

AP_HAL_AVR: RCOutput_APM2, bugfix to get_freq on CH_10 and CH_11

master
Pat Hickey 13 years ago committed by Andrew Tridgell
parent
commit
ad64fd2924
  1. 4
      libraries/AP_HAL_AVR/RCOutput_APM2.cpp

4
libraries/AP_HAL_AVR/RCOutput_APM2.cpp

@ -91,9 +91,11 @@ uint16_t APM2RCOutput::get_freq(uint8_t ch) { @@ -91,9 +91,11 @@ uint16_t APM2RCOutput::get_freq(uint8_t ch) {
case CH_8:
icr = ICR3;
break;
/* CH_10 and CH_11 share TIMER5 with input capture.
* The period is specified in OCR5A rater than the ICR. */
case CH_10:
case CH_11:
icr = ICR5;
icr = OCR5A;
break;
default:
return 0;

Loading…
Cancel
Save