diff --git a/libraries/AP_Rally/AP_Rally.cpp b/libraries/AP_Rally/AP_Rally.cpp index 05358b25ef..55a5e2f60b 100644 --- a/libraries/AP_Rally/AP_Rally.cpp +++ b/libraries/AP_Rally/AP_Rally.cpp @@ -2,8 +2,7 @@ /// @brief Handles rally point storage and retrieval. #include "AP_Rally.h" -#include -extern const AP_HAL::HAL& hal; +#include // storage object StorageAccess AP_Rally::_storage(StorageManager::StorageRally); @@ -92,6 +91,11 @@ bool AP_Rally::set_rally_point_with_index(uint8_t i, const RallyLocation &rallyL _last_change_time_ms = AP_HAL::millis(); + AP_Logger *logger = AP_Logger::instance(); + if (logger != nullptr) { + logger->Write_RallyPoint(_rally_point_total_count, i, rallyLoc); + } + return true; }