1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-26 01:35:35 +03:00

Fix osdIncElementIndex

This commit is contained in:
Martin Budden 2017-06-26 17:07:59 +01:00
parent 7b060aa88d
commit 060367c367

View file

@ -524,18 +524,18 @@ static bool osdDrawSingleElement(uint8_t item)
static uint8_t osdIncElementIndex(uint8_t elementIndex)
{
++elementIndex;
if (sensors(SENSOR_ACC)) {
if (!sensors(SENSOR_ACC)) {
if (elementIndex == OSD_CROSSHAIRS) {
elementIndex = OSD_ONTIME;
}
}
if (feature(FEATURE_CURRENT_METER)) {
if (!feature(FEATURE_CURRENT_METER)) {
if (elementIndex == OSD_CURRENT_DRAW) {
elementIndex = OSD_GPS_SPEED;
}
}
if (sensors(SENSOR_GPS)) {
if (!sensors(SENSOR_GPS)) {
if (elementIndex == OSD_GPS_SPEED) {
elementIndex = OSD_ALTITUDE;
}