Browse Source

AP_Rally: log any changes or additions to rally points

mission-4.1.18
Peter Barker 6 years ago committed by Andrew Tridgell
parent
commit
542aa4c9e0
  1. 8
      libraries/AP_Rally/AP_Rally.cpp

8
libraries/AP_Rally/AP_Rally.cpp

@ -2,8 +2,7 @@ @@ -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 @@ -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;
}

Loading…
Cancel
Save