mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-14 08:55:59 +08:00
DataFlash: rotate files when vehicle is disarmed
This commit is contained in:
committed by
Tom Pittenger
parent
fc79fb4ab4
commit
2c8a0a9123
@@ -1108,4 +1108,14 @@ bool DataFlash_File::logging_failed() const
|
||||
}
|
||||
|
||||
|
||||
void DataFlash_File::vehicle_was_disarmed()
|
||||
{
|
||||
if (_front._params.file_disarm_rot) {
|
||||
// rotate our log. Closing the current one and letting the
|
||||
// logging restart naturally based on log_disarmed should do
|
||||
// the trick:
|
||||
stop_logging();
|
||||
}
|
||||
}
|
||||
|
||||
#endif // HAL_OS_POSIX_IO
|
||||
|
||||
Reference in New Issue
Block a user