AP_NavEKF2: use enum-class for RangeFinder Status

This commit is contained in:
Peter Barker 2019-11-01 16:11:17 +11:00 committed by Peter Barker
parent 82db4383d4
commit 9735684184

View File

@ -45,7 +45,7 @@ void NavEKF2_core::readRangeFinder(void)
if (sensor == nullptr) { if (sensor == nullptr) {
continue; continue;
} }
if ((sensor->orientation() == ROTATION_PITCH_270) && (sensor->status() == RangeFinder::RangeFinder_Good)) { if ((sensor->orientation() == ROTATION_PITCH_270) && (sensor->status() == RangeFinder::Status::Good)) {
rngMeasIndex[sensorIndex] ++; rngMeasIndex[sensorIndex] ++;
if (rngMeasIndex[sensorIndex] > 2) { if (rngMeasIndex[sensorIndex] > 2) {
rngMeasIndex[sensorIndex] = 0; rngMeasIndex[sensorIndex] = 0;