Skip to content

Commit

Permalink
Rover: correct compilation if rangefinder disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Oct 25, 2023
1 parent f340589 commit abe03d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Rover/GCS_Mavlink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ int16_t GCS_MAVLINK_Rover::vfr_hud_throttle() const
return rover.g2.motors.get_throttle();
}

#if AP_RANGEFINDER_ENABLED
void GCS_MAVLINK_Rover::send_rangefinder() const
{
float distance = 0;
Expand Down Expand Up @@ -178,6 +179,7 @@ void GCS_MAVLINK_Rover::send_rangefinder() const
distance,
voltage);
}
#endif // AP_RANGEFINDER_ENABLED

/*
send PID tuning message
Expand Down
2 changes: 2 additions & 0 deletions Rover/GCS_Mavlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ class GCS_MAVLINK_Rover : public GCS_MAVLINK

int16_t vfr_hud_throttle() const override;

#if AP_RANGEFINDER_ENABLED
void send_rangefinder() const override;
#endif

#if HAL_HIGH_LATENCY2_ENABLED
uint8_t high_latency_tgt_heading() const override;
Expand Down

0 comments on commit abe03d3

Please sign in to comment.