From feb8c3be67e49b8f70bcbb161e31c64e91eff417 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 25 Mar 2024 09:20:11 +1100 Subject: [PATCH] SITL: added SIM_OSD_ROWS and SIM_OSD_COLUMNS --- libraries/SITL/SITL.cpp | 14 ++++++++++++++ libraries/SITL/SITL.h | 5 +++++ 2 files changed, 19 insertions(+) diff --git a/libraries/SITL/SITL.cpp b/libraries/SITL/SITL.cpp index f9c0b4b7af..abd099baf1 100644 --- a/libraries/SITL/SITL.cpp +++ b/libraries/SITL/SITL.cpp @@ -524,6 +524,20 @@ const AP_Param::GroupInfo SIM::var_info3[] = { // @Bitmask: 0:MAVLink,3:SageTechMXS AP_GROUPINFO("ADSB_TYPES", 52, SIM, adsb_types, 1), +#ifdef WITH_SITL_OSD + // @Param: OSD_COLUMNS + // @DisplayName: Simulated OSD number of text columns + // @Description: Simulated OSD number of text columns + // @Range: 10 100 + AP_GROUPINFO("OSD_COLUMNS", 53, SIM, osd_columns, 30), + + // @Param: OSD_ROWS + // @DisplayName: Simulated OSD number of text rows + // @Description: Simulated OSD number of text rows + // @Range: 10 100 + AP_GROUPINFO("OSD_ROWS", 54, SIM, osd_rows, 16), +#endif + #ifdef SFML_JOYSTICK AP_SUBGROUPEXTENSION("", 63, SIM, var_sfml_joystick), #endif // SFML_JOYSTICK diff --git a/libraries/SITL/SITL.h b/libraries/SITL/SITL.h index 43ea1af568..5198ba1f32 100644 --- a/libraries/SITL/SITL.h +++ b/libraries/SITL/SITL.h @@ -538,6 +538,11 @@ public: AP_Int8 gyro_file_rw; AP_Int8 accel_file_rw; #endif + +#ifdef WITH_SITL_OSD + AP_Int16 osd_rows; + AP_Int16 osd_columns; +#endif }; } // namespace SITL