AP_OSD: use `set_and_default` when ensuring first screen is enabled

This commit is contained in:
Iampete1 2024-03-24 15:47:58 +00:00 committed by Andrew Tridgell
parent c4691bef94
commit 8ccec7615c
1 changed files with 2 additions and 2 deletions

View File

@ -256,8 +256,8 @@ AP_OSD::AP_OSD()
}
AP_Param::setup_object_defaults(this, var_info);
#if OSD_ENABLED
// default first screen enabled
screen[0].enabled.set(1);
// force first screen enabled
screen[0].enabled.set_and_default(1);
previous_pwm_screen = -1;
#endif
#ifdef WITH_SITL_OSD