Skip to content

Commit

Permalink
Rover: correct compilation with AP_RRSI_ENABLED false
Browse files Browse the repository at this point in the history
Co-authored-by: David Buzz <[email protected]>
  • Loading branch information
peterbarker and davidbuzz committed Jul 23, 2024
1 parent 3e54ecf commit 3def5f7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Rover/GCS_Mavlink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,12 @@ void GCS_MAVLINK_Rover::send_servo_out()
0,
0,
0,
receiver_rssi());
#if AP_RSSI_ENABLED
receiver_rssi()
#else
255
#endif
);
}

int16_t GCS_MAVLINK_Rover::vfr_hud_throttle() const
Expand Down
2 changes: 2 additions & 0 deletions Rover/Log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,11 @@ void Rover::Log_Write_RC(void)
{
logger.Write_RCIN();
logger.Write_RCOUT();
#if AP_RSSI_ENABLED
if (rssi.enabled()) {
logger.Write_RSSI();
}
#endif
}

void Rover::Log_Write_Vehicle_Startup_Messages()
Expand Down
2 changes: 2 additions & 0 deletions Rover/Parameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,11 @@ const AP_Param::Info Rover::var_info[] = {
// @Path: ../libraries/AP_Mission/AP_Mission.cpp
GOBJECTN(mode_auto.mission, mission, "MIS_", AP_Mission),

#if AP_RSSI_ENABLED
// @Group: RSSI_
// @Path: ../libraries/AP_RSSI/AP_RSSI.cpp
GOBJECT(rssi, "RSSI_", AP_RSSI),
#endif

// @Group: NTF_
// @Path: ../libraries/AP_Notify/AP_Notify.cpp
Expand Down
2 changes: 2 additions & 0 deletions Rover/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ void Rover::init_ardupilot()
rpm_sensor.init();
#endif

#if AP_RSSI_ENABLED
rssi.init();
#endif

g2.windvane.init(serial_manager);

Expand Down

0 comments on commit 3def5f7

Please sign in to comment.