Skip to content

Commit

Permalink
AP_Avoidance: correct compilation when HAL_GCS_ENABLED is false
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Dec 11, 2023
1 parent 963c037 commit e2dab00
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libraries/AP_Avoidance/AP_Avoidance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ MAV_COLLISION_THREAT_LEVEL AP_Avoidance::current_threat_level() const {
return _obstacles[_current_most_serious_threat].threat_level;
}

#if HAL_GCS_ENABLED
void AP_Avoidance::send_collision_all(const AP_Avoidance::Obstacle &threat, MAV_COLLISION_ACTION behaviour) const
{
const mavlink_collision_t packet{
Expand All @@ -409,6 +410,7 @@ void AP_Avoidance::send_collision_all(const AP_Avoidance::Obstacle &threat, MAV_
};
gcs().send_to_active_channels(MAVLINK_MSG_ID_COLLISION, (const char *)&packet);
}
#endif

void AP_Avoidance::handle_threat_gcs_notify(AP_Avoidance::Obstacle *threat)
{
Expand Down

0 comments on commit e2dab00

Please sign in to comment.