mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 00:35:39 +03:00
Add OSD display of 2nd block of debug values (#13800)
Add OSD display of 2nd blocks of debug values
This commit is contained in:
parent
2525be9a33
commit
665a42e295
4 changed files with 10 additions and 0 deletions
|
@ -1463,6 +1463,7 @@ const clivalue_t valueTable[] = {
|
|||
{ "osd_pid_pitch_pos", VAR_UINT16 | MASTER_VALUE, .config.minmaxUnsigned = { 0, OSD_POSCFG_MAX }, PG_OSD_ELEMENT_CONFIG, offsetof(osdElementConfig_t, item_pos[OSD_PITCH_PIDS]) },
|
||||
{ "osd_pid_yaw_pos", VAR_UINT16 | MASTER_VALUE, .config.minmaxUnsigned = { 0, OSD_POSCFG_MAX }, PG_OSD_ELEMENT_CONFIG, offsetof(osdElementConfig_t, item_pos[OSD_YAW_PIDS]) },
|
||||
{ "osd_debug_pos", VAR_UINT16 | MASTER_VALUE, .config.minmaxUnsigned = { 0, OSD_POSCFG_MAX }, PG_OSD_ELEMENT_CONFIG, offsetof(osdElementConfig_t, item_pos[OSD_DEBUG]) },
|
||||
{ "osd_debug2_pos", VAR_UINT16 | MASTER_VALUE, .config.minmaxUnsigned = { 0, OSD_POSCFG_MAX }, PG_OSD_ELEMENT_CONFIG, offsetof(osdElementConfig_t, item_pos[OSD_DEBUG2]) },
|
||||
{ "osd_power_pos", VAR_UINT16 | MASTER_VALUE, .config.minmaxUnsigned = { 0, OSD_POSCFG_MAX }, PG_OSD_ELEMENT_CONFIG, offsetof(osdElementConfig_t, item_pos[OSD_POWER]) },
|
||||
{ "osd_pidrate_profile_pos", VAR_UINT16 | MASTER_VALUE, .config.minmaxUnsigned = { 0, OSD_POSCFG_MAX }, PG_OSD_ELEMENT_CONFIG, offsetof(osdElementConfig_t, item_pos[OSD_PIDRATE_PROFILE]) },
|
||||
{ "osd_warnings_pos", VAR_UINT16 | MASTER_VALUE, .config.minmaxUnsigned = { 0, OSD_POSCFG_MAX }, PG_OSD_ELEMENT_CONFIG, offsetof(osdElementConfig_t, item_pos[OSD_WARNINGS]) },
|
||||
|
|
|
@ -143,6 +143,7 @@ const OSD_Entry menuOsdActiveElemsEntries[] =
|
|||
{"OSD PROFILE NAME", OME_VISIBLE | DYNAMIC, NULL, &osdConfig_item_pos[OSD_PROFILE_NAME]},
|
||||
#endif
|
||||
{"DEBUG", OME_VISIBLE | DYNAMIC, NULL, &osdConfig_item_pos[OSD_DEBUG]},
|
||||
{"DEBUG2", OME_VISIBLE | DYNAMIC, NULL, &osdConfig_item_pos[OSD_DEBUG2]},
|
||||
{"WARNINGS", OME_VISIBLE | DYNAMIC, NULL, &osdConfig_item_pos[OSD_WARNINGS]},
|
||||
{"DISARMED", OME_VISIBLE | DYNAMIC, NULL, &osdConfig_item_pos[OSD_DISARMED]},
|
||||
{"PIT ANG", OME_VISIBLE | DYNAMIC, NULL, &osdConfig_item_pos[OSD_PITCH_ANGLE]},
|
||||
|
|
|
@ -189,6 +189,7 @@ typedef enum {
|
|||
OSD_GPS_LAP_TIME_CURRENT,
|
||||
OSD_GPS_LAP_TIME_PREVIOUS,
|
||||
OSD_GPS_LAP_TIME_BEST3,
|
||||
OSD_DEBUG2,
|
||||
OSD_ITEM_COUNT // MUST BE LAST
|
||||
} osd_items_e;
|
||||
|
||||
|
|
|
@ -936,6 +936,11 @@ static void osdElementDebug(osdElementParms_t *element)
|
|||
tfp_sprintf(element->buff, "DBG %5d %5d %5d %5d", debug[0], debug[1], debug[2], debug[3]);
|
||||
}
|
||||
|
||||
static void osdElementDebug2(osdElementParms_t *element)
|
||||
{
|
||||
tfp_sprintf(element->buff, "D2 %5d %5d %5d %5d", debug[4], debug[5], debug[6], debug[7]);
|
||||
}
|
||||
|
||||
static void osdElementDisarmed(osdElementParms_t *element)
|
||||
{
|
||||
if (!ARMING_FLAG(ARMED)) {
|
||||
|
@ -1806,6 +1811,7 @@ static const uint8_t osdElementDisplayOrder[] = {
|
|||
OSD_WARNINGS,
|
||||
OSD_AVG_CELL_VOLTAGE,
|
||||
OSD_DEBUG,
|
||||
OSD_DEBUG2,
|
||||
OSD_PITCH_ANGLE,
|
||||
OSD_ROLL_ANGLE,
|
||||
OSD_MAIN_BATT_USAGE,
|
||||
|
@ -1919,6 +1925,7 @@ const osdElementDrawFn osdElementDrawFunction[OSD_ITEM_COUNT] = {
|
|||
[OSD_GPS_LAT] = osdElementGpsCoordinate,
|
||||
#endif
|
||||
[OSD_DEBUG] = osdElementDebug,
|
||||
[OSD_DEBUG2] = osdElementDebug2,
|
||||
#ifdef USE_ACC
|
||||
[OSD_PITCH_ANGLE] = osdElementAngleRollPitch,
|
||||
[OSD_ROLL_ANGLE] = osdElementAngleRollPitch,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue