mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_OSD: changed OSD screen switching logic
this prevents us constantly changing screens when a PWM is given that matches multiple screens. Instead the first matching screen is used
This commit is contained in:
parent
275c2849cf
commit
cfe63f8657
@ -391,7 +391,7 @@ void AP_OSD::update_current_screen()
|
||||
//select screen based on pwm ranges specified
|
||||
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 && previous_pwm_screen != i) {
|
||||
if (get_screen(i).enabled && get_screen(i).channel_min <= channel_value && get_screen(i).channel_max > channel_value) {
|
||||
current_screen = previous_pwm_screen = i;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user