AP_Rally: log any changes or additions to rally points

This commit is contained in:
Peter Barker 2018-12-29 15:08:38 +11:00 committed by Andrew Tridgell
parent 9108eeb8f5
commit 542aa4c9e0

View File

@ -2,8 +2,7 @@
/// @brief Handles rally point storage and retrieval.
#include "AP_Rally.h"
#include <AP_HAL/AP_HAL.h>
extern const AP_HAL::HAL& hal;
#include <AP_Logger/AP_Logger.h>
// 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;
}