AP_HAL_AVR: fixed multi-channel RC output

This commit is contained in:
Andrew Tridgell 2013-01-16 14:19:43 +11:00
parent 9058949558
commit e852d6300f
2 changed files with 2 additions and 2 deletions

View File

@ -191,7 +191,7 @@ void APM1RCOutput::write(uint8_t ch, uint16_t period_us) {
}
void APM1RCOutput::write(uint8_t ch, uint16_t* period_us, uint8_t len) {
for (int i = 0; i < ch; i++) {
for (int i = 0; i < len; i++) {
write(i + ch, period_us[i]);
}
}

View File

@ -183,7 +183,7 @@ void APM2RCOutput::write(uint8_t ch, uint16_t period_us) {
}
void APM2RCOutput::write(uint8_t ch, uint16_t* period_us, uint8_t len) {
for (int i = 0; i < ch; i++) {
for (int i = 0; i < len; i++) {
write(i + ch, period_us[i]);
}
}