mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-23 16:25:26 +03:00
Remove old check
This commit is contained in:
parent
dfbb91b419
commit
ab640daaf3
1 changed files with 4 additions and 6 deletions
|
@ -2101,8 +2101,7 @@ static bool osdDrawSingleElement(uint8_t item)
|
||||||
case OSD_EFFICIENCY_MAH_PER_KM:
|
case OSD_EFFICIENCY_MAH_PER_KM:
|
||||||
{
|
{
|
||||||
// amperage is in centi amps, speed is in cms/s. We want
|
// amperage is in centi amps, speed is in cms/s. We want
|
||||||
// mah/km. Values over 999 are considered useless and
|
// mah/km. Only show when ground speed > 1m/s.
|
||||||
// displayed as "---". Only shows if ground speed > 1m/s.
|
|
||||||
static pt1Filter_t eFilterState;
|
static pt1Filter_t eFilterState;
|
||||||
static timeUs_t efficiencyUpdated = 0;
|
static timeUs_t efficiencyUpdated = 0;
|
||||||
int32_t value = 0;
|
int32_t value = 0;
|
||||||
|
@ -2118,7 +2117,7 @@ static bool osdDrawSingleElement(uint8_t item)
|
||||||
value = eFilterState.state;
|
value = eFilterState.state;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (value > 0 && value <= 999 && gpsSol.groundSpeed > 100) {
|
if (value > 0 && gpsSol.groundSpeed > 100) {
|
||||||
tfp_sprintf(buff, "%3d", (int)value);
|
tfp_sprintf(buff, "%3d", (int)value);
|
||||||
} else {
|
} else {
|
||||||
buff[0] = buff[1] = buff[2] = '-';
|
buff[0] = buff[1] = buff[2] = '-';
|
||||||
|
@ -2132,8 +2131,7 @@ static bool osdDrawSingleElement(uint8_t item)
|
||||||
case OSD_EFFICIENCY_WH_PER_KM:
|
case OSD_EFFICIENCY_WH_PER_KM:
|
||||||
{
|
{
|
||||||
// amperage is in centi amps, speed is in cms/s. We want
|
// amperage is in centi amps, speed is in cms/s. We want
|
||||||
// mWh/km. Values over 999Wh/km are considered useless and
|
// mWh/km. Only show when ground speed > 1m/s.
|
||||||
// displayed as "---". Only shows if ground speed > 1m/s.
|
|
||||||
static pt1Filter_t eFilterState;
|
static pt1Filter_t eFilterState;
|
||||||
static timeUs_t efficiencyUpdated = 0;
|
static timeUs_t efficiencyUpdated = 0;
|
||||||
int32_t value = 0;
|
int32_t value = 0;
|
||||||
|
@ -2149,7 +2147,7 @@ static bool osdDrawSingleElement(uint8_t item)
|
||||||
value = eFilterState.state;
|
value = eFilterState.state;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (value > 0 && value <= 999999 && gpsSol.groundSpeed > 100) {
|
if (value > 0 && gpsSol.groundSpeed > 100) {
|
||||||
osdFormatCentiNumber(buff, value / 10, 0, 2, 0, 3);
|
osdFormatCentiNumber(buff, value / 10, 0, 2, 0, 3);
|
||||||
} else {
|
} else {
|
||||||
buff[0] = buff[1] = buff[2] = '-';
|
buff[0] = buff[1] = buff[2] = '-';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue