Skip to content

Commit

Permalink
libraries: Magic numbers have meaning
Browse files Browse the repository at this point in the history
  • Loading branch information
muramura committed Apr 14, 2024
1 parent 1cafe25 commit cf38968
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libraries/AP_AHRS/AP_AHRS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3170,7 +3170,7 @@ uint8_t AP_AHRS::get_active_airspeed_index() const
#if HAL_NAVEKF3_AVAILABLE
if (active_EKF_type() == EKFType::THREE) {
uint8_t ret = EKF3.getActiveAirspeed();
if (ret != 255 && airspeed->healthy(ret) && airspeed->use(ret)) {
if (ret != UINT8_MAX && airspeed->healthy(ret) && airspeed->use(ret)) {
return ret;
}
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/AP_NavEKF3/AP_NavEKF3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,7 @@ uint8_t NavEKF3::getActiveAirspeed() const
if (core) {
return core[primary].getActiveAirspeed();
} else {
return 255;
return UINT8_MAX;
}
}

Expand Down

0 comments on commit cf38968

Please sign in to comment.