mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 16:55:36 +03:00
Fixed reporting of configured / detected OSD device.
This commit is contained in:
parent
6aeac3caa6
commit
98efe1a972
4 changed files with 29 additions and 29 deletions
|
@ -130,7 +130,7 @@ static uint8_t armState;
|
|||
static uint8_t osdProfile = 1;
|
||||
#endif
|
||||
static displayPort_t *osdDisplayPort;
|
||||
static osdDisplayPortDevice_e osdDisplayPortDevice;
|
||||
static osdDisplayPortDevice_e osdDisplayPortDeviceType;
|
||||
static bool osdIsReady;
|
||||
|
||||
static bool suppressStatsDisplay = false;
|
||||
|
@ -415,14 +415,15 @@ static void osdCompleteInitialization(void)
|
|||
osdIsReady = true;
|
||||
}
|
||||
|
||||
void osdInit(displayPort_t *osdDisplayPortToUse, osdDisplayPortDevice_e displayPortDeviceToUse)
|
||||
void osdInit(displayPort_t *osdDisplayPortToUse, osdDisplayPortDevice_e displayPortDeviceType)
|
||||
{
|
||||
osdDisplayPortDeviceType = displayPortDeviceType;
|
||||
|
||||
if (!osdDisplayPortToUse) {
|
||||
return;
|
||||
}
|
||||
|
||||
osdDisplayPort = osdDisplayPortToUse;
|
||||
osdDisplayPortDevice = displayPortDeviceToUse;
|
||||
#ifdef USE_CMS
|
||||
cmsDisplayPortRegister(osdDisplayPort);
|
||||
#endif
|
||||
|
@ -1078,10 +1079,10 @@ bool osdNeedsAccelerometer(void)
|
|||
}
|
||||
#endif // USE_ACC
|
||||
|
||||
displayPort_t *osdGetDisplayPort(osdDisplayPortDevice_e *displayPortDevice)
|
||||
displayPort_t *osdGetDisplayPort(osdDisplayPortDevice_e *displayPortDeviceType)
|
||||
{
|
||||
if (displayPortDevice) {
|
||||
*displayPortDevice = osdDisplayPortDevice;
|
||||
if (displayPortDeviceType) {
|
||||
*displayPortDeviceType = osdDisplayPortDeviceType;
|
||||
}
|
||||
return osdDisplayPort;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue