Skip to content

Commit

Permalink
AP_GPS: remove redundant check
Browse files Browse the repository at this point in the history
get_type has this sanity check
  • Loading branch information
peterbarker authored and tridge committed Mar 11, 2024
1 parent 093709c commit b4f5d49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/AP_GPS/AP_GPS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2418,7 +2418,7 @@ bool AP_GPS::gps_yaw_deg(uint8_t instance, float &yaw_deg, float &accuracy_deg,
{
#if GPS_MAX_RECEIVERS > 1
const auto type = get_type(instance);
if (instance < GPS_MAX_RECEIVERS &&
if (
((type == GPS_TYPE_UBLOX_RTK_BASE) || (type == GPS_TYPE_UAVCAN_RTK_BASE)) &&
((get_type(instance^1) == GPS_TYPE_UBLOX_RTK_ROVER) || (get_type(instance^1) == GPS_TYPE_UAVCAN_RTK_ROVER))) {
// return the yaw from the rover
Expand Down

0 comments on commit b4f5d49

Please sign in to comment.