mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
Fix reference to cms in non-CMS case (osd.c)
This commit is contained in:
parent
a6b03a9473
commit
0c57456ae7
1 changed files with 14 additions and 1 deletions
|
@ -108,7 +108,11 @@ void osdDrawElements(void)
|
||||||
if (false)
|
if (false)
|
||||||
;
|
;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef CMS
|
||||||
else if (sensors(SENSOR_ACC) || osd7456DisplayPort.inCMS)
|
else if (sensors(SENSOR_ACC) || osd7456DisplayPort.inCMS)
|
||||||
|
#else
|
||||||
|
else if (sensors(SENSOR_ACC))
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
osdDrawSingleElement(OSD_ARTIFICIAL_HORIZON);
|
osdDrawSingleElement(OSD_ARTIFICIAL_HORIZON);
|
||||||
osdDrawSingleElement(OSD_CROSSHAIRS);
|
osdDrawSingleElement(OSD_CROSSHAIRS);
|
||||||
|
@ -127,7 +131,12 @@ void osdDrawElements(void)
|
||||||
osdDrawSingleElement(OSD_ALTITUDE);
|
osdDrawSingleElement(OSD_ALTITUDE);
|
||||||
|
|
||||||
#ifdef GPS
|
#ifdef GPS
|
||||||
if (sensors(SENSOR_GPS) || osd7456DisplayPort.inCMS) {
|
#ifdef CMS
|
||||||
|
if (sensors(SENSOR_GPS) || osd7456DisplayPort.inCMS)
|
||||||
|
#else
|
||||||
|
if (sensors(SENSOR_GPS))
|
||||||
|
#endif
|
||||||
|
{
|
||||||
osdDrawSingleElement(OSD_GPS_SATS);
|
osdDrawSingleElement(OSD_GPS_SATS);
|
||||||
osdDrawSingleElement(OSD_GPS_SPEED);
|
osdDrawSingleElement(OSD_GPS_SPEED);
|
||||||
}
|
}
|
||||||
|
@ -573,9 +582,11 @@ void updateOsd(uint32_t currentTime)
|
||||||
else // rest of time redraw screen 10 chars per idle to don't lock the main idle
|
else // rest of time redraw screen 10 chars per idle to don't lock the main idle
|
||||||
max7456DrawScreen();
|
max7456DrawScreen();
|
||||||
|
|
||||||
|
#ifdef CMS
|
||||||
// do not allow ARM if we are in menu
|
// do not allow ARM if we are in menu
|
||||||
if (osd7456DisplayPort.inCMS)
|
if (osd7456DisplayPort.inCMS)
|
||||||
DISABLE_ARMING_FLAG(OK_TO_ARM);
|
DISABLE_ARMING_FLAG(OK_TO_ARM);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void osdUpdate(uint32_t currentTime)
|
void osdUpdate(uint32_t currentTime)
|
||||||
|
@ -620,6 +631,7 @@ void osdUpdate(uint32_t currentTime)
|
||||||
|
|
||||||
blinkState = (millis() / 200) % 2;
|
blinkState = (millis() / 200) % 2;
|
||||||
|
|
||||||
|
#ifdef CMS
|
||||||
if (!osd7456DisplayPort.inCMS) {
|
if (!osd7456DisplayPort.inCMS) {
|
||||||
osdUpdateAlarms();
|
osdUpdateAlarms();
|
||||||
osdDrawElements();
|
osdDrawElements();
|
||||||
|
@ -628,6 +640,7 @@ void osdUpdate(uint32_t currentTime)
|
||||||
cmsUpdate(currentTime);
|
cmsUpdate(currentTime);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef EDIT_ELEMENT_SUPPORT
|
#ifdef EDIT_ELEMENT_SUPPORT
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue