AP_OSD: fixes bug introduced by #16477

This commit is contained in:
Hwurzburg 2021-08-10 18:51:35 -05:00 committed by Andrew Tridgell
parent d53299ecb0
commit 0d3b1d90b0
1 changed files with 4 additions and 1 deletions

View File

@ -433,8 +433,11 @@ void AP_OSD::update_current_screen()
case PWM_RANGE:
for (int i=0; i<AP_OSD_NUM_SCREENS; i++) {
if (get_screen(i).enabled && get_screen(i).channel_min <= channel_value && get_screen(i).channel_max > channel_value) {
if (previous_pwm_screen == i) {
break;
} else {
current_screen = previous_pwm_screen = i;
break;
}
}
}
break;