HAL_ChibiOS: fixed off by 1 bug in GPIO check
This commit is contained in:
parent
ef93165f28
commit
d8b8facdd0
@ -80,7 +80,7 @@ void GPIO::init()
|
|||||||
for (uint8_t i=0; i<ARRAY_SIZE(_gpio_tab); i++) {
|
for (uint8_t i=0; i<ARRAY_SIZE(_gpio_tab); i++) {
|
||||||
struct gpio_entry *g = &_gpio_tab[i];
|
struct gpio_entry *g = &_gpio_tab[i];
|
||||||
if (g->pwm_num != 0) {
|
if (g->pwm_num != 0) {
|
||||||
g->enabled = SRV_Channels::is_GPIO(g->pwm_num+chan_offset);
|
g->enabled = SRV_Channels::is_GPIO((g->pwm_num-1)+chan_offset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // HAL_BOOTLOADER_BUILD
|
#endif // HAL_BOOTLOADER_BUILD
|
||||||
|
Loading…
Reference in New Issue
Block a user