AP_OSD: rangefinder: only print distance if status is good

This commit is contained in:
Iampete1
2026-08-26 17:54:30 +10:00
committed by Andrew Tridgell
parent ccaa5ba830
commit f16817af89
+1 -1
View File
@@ -2558,7 +2558,7 @@ void AP_OSD_Screen::draw_rngf(uint8_t x, uint8_t y)
if (rangefinder == nullptr) {
return;
}
if (rangefinder->status_orient(ROTATION_PITCH_270) < RangeFinder::Status::Good) {
if (rangefinder->status_orient(ROTATION_PITCH_270) != RangeFinder::Status::Good) {
backend->write(x, y, false, "%c---%c", SYMBOL(SYM_RNGFD), u_icon(DISTANCE));
} else {
const float distance = rangefinder->distance_orient(ROTATION_PITCH_270);