mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_IOMCU: fix IO fast channel mask
This commit is contained in:
parent
d8a07b6c44
commit
0a6ae60c89
@ -652,11 +652,10 @@ void AP_IOMCU::push(void)
|
||||
// set output frequency
|
||||
void AP_IOMCU::set_freq(uint16_t chmask, uint16_t freq)
|
||||
{
|
||||
const uint8_t masks[] = { 0x03,0x0C,0xF0 };
|
||||
// ensure mask is legal for the timer layout
|
||||
for (uint8_t i=0; i<ARRAY_SIZE(masks); i++) {
|
||||
if (chmask & masks[i]) {
|
||||
chmask |= masks[i];
|
||||
for (uint8_t i=0; i<ARRAY_SIZE(ch_masks); i++) {
|
||||
if (chmask & ch_masks[i]) {
|
||||
chmask |= ch_masks[i];
|
||||
}
|
||||
}
|
||||
rate.freq = freq;
|
||||
|
@ -103,6 +103,9 @@ public:
|
||||
bool setup_mixing(RCMapper *rcmap, int8_t override_chan,
|
||||
float mixing_gain, uint16_t manual_rc_mask);
|
||||
|
||||
// channel group masks
|
||||
const uint8_t ch_masks[3] = { 0x03,0x0C,0xF0 };
|
||||
|
||||
private:
|
||||
AP_HAL::UARTDriver &uart;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user