DataFlash: rotate files when vehicle is disarmed

This commit is contained in:
Peter Barker
2016-11-28 09:42:09 -08:00
committed by Tom Pittenger
parent fc79fb4ab4
commit 2c8a0a9123
5 changed files with 29 additions and 2 deletions
+10
View File
@@ -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