mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 00:35:39 +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
|
#ifdef GPS
|
||||||
{"GPS SPEED", OME_VISIBLE, NULL, &osdConfig_item_pos[OSD_GPS_SPEED], 0},
|
{"GPS SPEED", OME_VISIBLE, NULL, &osdConfig_item_pos[OSD_GPS_SPEED], 0},
|
||||||
{"GPS SATS.", OME_VISIBLE, NULL, &osdConfig_item_pos[OSD_GPS_SATS], 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},
|
{"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},
|
{"HOME DIST", OME_VISIBLE, NULL, &osdConfig_item_pos[OSD_HOME_DIST], 0},
|
||||||
#endif // GPS
|
#endif // GPS
|
||||||
{"ALTITUDE", OME_VISIBLE, NULL, &osdConfig_item_pos[OSD_ALTITUDE], 0},
|
{"ALTITUDE", OME_VISIBLE, NULL, &osdConfig_item_pos[OSD_ALTITUDE], 0},
|
||||||
|
|
|
@ -78,7 +78,6 @@
|
||||||
|
|
||||||
#include "sensors/barometer.h"
|
#include "sensors/barometer.h"
|
||||||
#include "sensors/battery.h"
|
#include "sensors/battery.h"
|
||||||
#include "sensors/compass.h"
|
|
||||||
#include "sensors/sensors.h"
|
#include "sensors/sensors.h"
|
||||||
|
|
||||||
#ifdef USE_HARDWARE_REVISION_DETECTION
|
#ifdef USE_HARDWARE_REVISION_DETECTION
|
||||||
|
@ -276,7 +275,6 @@ static void osdDrawSingleElement(uint8_t item)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef MAG
|
|
||||||
case OSD_HOME_DIR:
|
case OSD_HOME_DIR:
|
||||||
if (STATE(GPS_FIX) && STATE(GPS_FIX_HOME)) {
|
if (STATE(GPS_FIX) && STATE(GPS_FIX_HOME)) {
|
||||||
if (GPS_distanceToHome > 0) {
|
if (GPS_distanceToHome > 0) {
|
||||||
|
@ -307,7 +305,6 @@ static void osdDrawSingleElement(uint8_t item)
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endif // COMPASS
|
|
||||||
#endif // GPS
|
#endif // GPS
|
||||||
|
|
||||||
case OSD_ALTITUDE:
|
case OSD_ALTITUDE:
|
||||||
|
@ -627,11 +624,7 @@ void osdDrawElements(void)
|
||||||
osdDrawSingleElement(OSD_GPS_LAT);
|
osdDrawSingleElement(OSD_GPS_LAT);
|
||||||
osdDrawSingleElement(OSD_GPS_LON);
|
osdDrawSingleElement(OSD_GPS_LON);
|
||||||
osdDrawSingleElement(OSD_HOME_DIST);
|
osdDrawSingleElement(OSD_HOME_DIST);
|
||||||
#ifdef COMPASS
|
osdDrawSingleElement(OSD_HOME_DIR);
|
||||||
if (sensors(SENSOR_MAG) || sensors(SENSOR_GPSMAG))
|
|
||||||
osdDrawSingleElement(OSD_HOME_DIR);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif // GPS
|
#endif // GPS
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue