mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 08:15:30 +03:00
Fix for MAG dependency in OSD HOME DIR
This commit is contained in:
parent
d64bf02d2c
commit
ac2e0186f6
2 changed files with 1 additions and 10 deletions
|
@ -123,9 +123,7 @@ OSD_Entry menuOsdActiveElemsEntries[] =
|
|||
#ifdef GPS
|
||||
{"GPS SPEED", OME_VISIBLE, NULL, &osdConfig_item_pos[OSD_GPS_SPEED], 0},
|
||||
{"GPS SATS.", OME_VISIBLE, NULL, &osdConfig_item_pos[OSD_GPS_SATS], 0},
|
||||
#ifdef COMPASS
|
||||
{"HOME DIR", OME_VISIBLE, NULL, &osdConfig_item_pos[OSD_HOME_DIR], 0},
|
||||
#endif
|
||||
{"HOME DIST", OME_VISIBLE, NULL, &osdConfig_item_pos[OSD_HOME_DIST], 0},
|
||||
#endif // GPS
|
||||
{"ALTITUDE", OME_VISIBLE, NULL, &osdConfig_item_pos[OSD_ALTITUDE], 0},
|
||||
|
|
|
@ -78,7 +78,6 @@
|
|||
|
||||
#include "sensors/barometer.h"
|
||||
#include "sensors/battery.h"
|
||||
#include "sensors/compass.h"
|
||||
#include "sensors/sensors.h"
|
||||
|
||||
#ifdef USE_HARDWARE_REVISION_DETECTION
|
||||
|
@ -276,7 +275,6 @@ static void osdDrawSingleElement(uint8_t item)
|
|||
}
|
||||
break;
|
||||
|
||||
#ifdef MAG
|
||||
case OSD_HOME_DIR:
|
||||
if (STATE(GPS_FIX) && STATE(GPS_FIX_HOME)) {
|
||||
if (GPS_distanceToHome > 0) {
|
||||
|
@ -307,7 +305,6 @@ static void osdDrawSingleElement(uint8_t item)
|
|||
|
||||
break;
|
||||
|
||||
#endif // COMPASS
|
||||
#endif // GPS
|
||||
|
||||
case OSD_ALTITUDE:
|
||||
|
@ -627,11 +624,7 @@ void osdDrawElements(void)
|
|||
osdDrawSingleElement(OSD_GPS_LAT);
|
||||
osdDrawSingleElement(OSD_GPS_LON);
|
||||
osdDrawSingleElement(OSD_HOME_DIST);
|
||||
#ifdef COMPASS
|
||||
if (sensors(SENSOR_MAG) || sensors(SENSOR_GPSMAG))
|
||||
osdDrawSingleElement(OSD_HOME_DIR);
|
||||
#endif
|
||||
|
||||
osdDrawSingleElement(OSD_HOME_DIR);
|
||||
}
|
||||
#endif // GPS
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue