mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-23 00:05:28 +03:00
Remove the timed-out radar POIs from the hud (#4734)
This commit is contained in:
parent
468a040801
commit
f37f2283ef
2 changed files with 2 additions and 2 deletions
|
@ -1682,7 +1682,7 @@ static bool osdDrawSingleElement(uint8_t item)
|
|||
geoConvertGeodeticToLocal(&poi, &posControl.gpsOrigin, &radar_pois[i].gps, GEO_ALT_RELATIVE);
|
||||
radar_pois[i].distance = calculateDistanceToDestination(&poi) / 100; // In meters
|
||||
|
||||
if ((radar_pois[i].distance >= (osdConfig()->hud_radar_range_min)) && (radar_pois[i].distance <= (osdConfig()->hud_radar_range_max))) {
|
||||
if ((radar_pois[i].distance >= (osdConfig()->hud_radar_range_min)) && (radar_pois[i].distance <= (osdConfig()->hud_radar_range_max)) && (radar_pois[i].state != 2)) {
|
||||
radar_pois[i].direction = calculateBearingToDestination(&poi) / 100; // In °
|
||||
radar_pois[i].altitude = (radar_pois[i].gps.alt - osdGetAltitudeMsl()) / 100;
|
||||
osdHudDrawPoi(radar_pois[i].distance, osdGetHeadingAngle(radar_pois[i].direction), radar_pois[i].altitude, radar_pois[i].heading, radar_pois[i].lq, 65 + i);
|
||||
|
|
|
@ -104,7 +104,7 @@ int8_t radarGetNearestPOI(void)
|
|||
uint16_t min = 10000; // 10kms
|
||||
|
||||
for (int i = 0; i < RADAR_MAX_POIS; i++) {
|
||||
if ((radar_pois[i].distance > 0) && (radar_pois[i].distance < min)) { // (radar_pois[i].state == 1)
|
||||
if ((radar_pois[i].distance > 0) && (radar_pois[i].distance < min) && (radar_pois[i].state != 2)) {
|
||||
min = radar_pois[i].distance;
|
||||
poi = i;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue