AP_SmartRTL: correct compilation when GCS library not available

This commit is contained in:
Peter Barker 2023-12-08 13:10:38 +11:00 committed by Andrew Tridgell
parent dd6d1f04c2
commit 1bf85a0a15
1 changed files with 3 additions and 3 deletions

View File

@ -118,7 +118,7 @@ void AP_SmartRTL::init()
// check if memory allocation failed
if (_path == nullptr || _prune.loops == nullptr || _simplify.stack == nullptr) {
log_action(SRTL_DEACTIVATED_INIT_FAILED);
gcs().send_text(MAV_SEVERITY_WARNING, "SmartRTL deactivated: init failed");
GCS_SEND_TEXT(MAV_SEVERITY_WARNING, "SmartRTL deactivated: init failed");
free(_path);
free(_prune.loops);
free(_simplify.stack);
@ -390,7 +390,7 @@ void AP_SmartRTL::run_background_cleanup()
// warn if buffer is about to be filled
uint32_t now_ms = AP_HAL::millis();
if ((path_points_count >0) && (path_points_count >= _path_points_max - 9) && (now_ms - _last_low_space_notify_ms > 10000)) {
gcs().send_text(MAV_SEVERITY_INFO, "SmartRTL Low on space!");
GCS_SEND_TEXT(MAV_SEVERITY_INFO, "SmartRTL Low on space!");
_last_low_space_notify_ms = now_ms;
}
@ -866,7 +866,7 @@ void AP_SmartRTL::deactivate(SRTL_Actions action, const char *reason)
{
_active = false;
log_action(action);
gcs().send_text(MAV_SEVERITY_WARNING, "SmartRTL deactivated: %s", reason);
GCS_SEND_TEXT(MAV_SEVERITY_WARNING, "SmartRTL deactivated: %s", reason);
}
// logging