Merge pull request #9359 from mikeller/add_osd_to_status
Added OSD status to CLI 'status' output.
This commit is contained in:
commit
54c8477b4d
|
@ -4648,6 +4648,13 @@ static void cliStatus(char *cmdline)
|
|||
cliPrintLinefeed();
|
||||
#endif /* USE_SENSOR_NAMES */
|
||||
|
||||
#if defined(USE_OSD)
|
||||
osdDisplayPortDevice_e displayPortDevice;
|
||||
osdGetDisplayPort(&displayPortDevice);
|
||||
|
||||
cliPrintLinef("OSD: %s", lookupTableOsdDisplayPortDevice[displayPortDevice]);
|
||||
#endif
|
||||
|
||||
// Uptime and wall clock
|
||||
|
||||
cliPrintf("System Uptime: %d seconds", millis() / 1000);
|
||||
|
|
|
@ -483,7 +483,7 @@ static const char* const lookupTableDshotBitbangedTimer[] = {
|
|||
"AUTO", "TIM1", "TIM8"
|
||||
};
|
||||
|
||||
static const char * const lookupTableOsdDisplayPortDevice[] = {
|
||||
const char * const lookupTableOsdDisplayPortDevice[] = {
|
||||
"NONE", "AUTO", "MAX7456", "MSP", "FRSKYOSD"
|
||||
};
|
||||
|
||||
|
|
|
@ -256,3 +256,5 @@ extern const char * const lookupTableRescueAltitudeMode[];
|
|||
extern const char * const lookupTableItermRelax[];
|
||||
|
||||
extern const char * const lookupTableItermRelaxType[];
|
||||
|
||||
extern const char * const lookupTableOsdDisplayPortDevice[];
|
||||
|
|
|
@ -34,8 +34,7 @@ typedef struct crsfDisplayPortScreen_s {
|
|||
bool reset;
|
||||
} crsfDisplayPortScreen_t;
|
||||
|
||||
struct displayPort_s;
|
||||
struct displayPort_s *displayPortCrsfInit(void);
|
||||
displayPort_t *displayPortCrsfInit(void);
|
||||
crsfDisplayPortScreen_t *crsfDisplayPortScreen(void);
|
||||
void crsfDisplayPortMenuOpen(void);
|
||||
void crsfDisplayPortMenuExit(void);
|
||||
|
|
|
@ -19,8 +19,7 @@
|
|||
*/
|
||||
#pragma once
|
||||
|
||||
#include "drivers/display.h"
|
||||
#include "drivers/osd.h"
|
||||
|
||||
typedef struct displayPort_s displayPort_t;
|
||||
|
||||
displayPort_t *frskyOsdDisplayPortInit(const videoSystem_e videoSystem);
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "drivers/display.h"
|
||||
|
||||
#include "pg/displayport_profiles.h"
|
||||
|
||||
struct displayPort_s *displayPortMspInit(void);
|
||||
displayPort_t *displayPortMspInit(void);
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
#include "common/time.h"
|
||||
|
||||
#include "drivers/display.h"
|
||||
|
||||
#include "pg/pg.h"
|
||||
|
||||
#include "sensors/esc_sensor.h"
|
||||
|
@ -319,8 +321,7 @@ extern float osdGForce;
|
|||
extern escSensorData_t *osdEscDataCombined;
|
||||
#endif
|
||||
|
||||
struct displayPort_s;
|
||||
void osdInit(struct displayPort_s *osdDisplayPort, osdDisplayPortDevice_e displayPortDevice);
|
||||
void osdInit(displayPort_t *osdDisplayPort, osdDisplayPortDevice_e displayPortDevice);
|
||||
bool osdInitialized(void);
|
||||
void osdUpdate(timeUs_t currentTimeUs);
|
||||
void osdStatSetState(uint8_t statIndex, bool enabled);
|
||||
|
@ -336,4 +337,4 @@ bool osdElementVisible(uint16_t value);
|
|||
bool osdGetVisualBeeperState(void);
|
||||
statistic_t *osdGetStats(void);
|
||||
bool osdNeedsAccelerometer(void);
|
||||
struct displayPort_s *osdGetDisplayPort(osdDisplayPortDevice_e *displayPortDevice);
|
||||
displayPort_t *osdGetDisplayPort(osdDisplayPortDevice_e *displayPortDevice);
|
||||
|
|
|
@ -65,6 +65,7 @@ extern "C" {
|
|||
};
|
||||
const uint16_t valueTableEntryCount = ARRAYLEN(valueTable);
|
||||
const lookupTableEntry_t lookupTables[] = {};
|
||||
const char * const lookupTableOsdDisplayPortDevice[] = {};
|
||||
|
||||
|
||||
PG_REGISTER(osdConfig_t, osdConfig, PG_OSD_CONFIG, 0);
|
||||
|
@ -342,9 +343,9 @@ void serialSetCtrlLineState(serialPort_t *, uint16_t ) {}
|
|||
|
||||
void serialSetBaudRateCb(serialPort_t *, void (*)(serialPort_t *context, uint32_t baud), serialPort_t *) {}
|
||||
|
||||
char *getBoardName(void) { return NULL; };
|
||||
char *getManufacturerId(void) { return NULL; };
|
||||
bool boardInformationIsSet(void) { return true; };
|
||||
char *getBoardName(void) { return NULL; }
|
||||
char *getManufacturerId(void) { return NULL; }
|
||||
bool boardInformationIsSet(void) { return true; }
|
||||
|
||||
bool setBoardName(char *newBoardName) { UNUSED(newBoardName); return true; };
|
||||
bool setManufacturerId(char *newManufacturerId) { UNUSED(newManufacturerId); return true; };
|
||||
|
@ -355,4 +356,5 @@ void analyzeModeActivationConditions(void) {}
|
|||
bool isModeActivationConditionConfigured(const modeActivationCondition_t *, const modeActivationCondition_t *) { return false; }
|
||||
|
||||
void delay(uint32_t) {}
|
||||
displayPort_t *osdGetDisplayPort(osdDisplayPortDevice_e *) { return NULL; }
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue