mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 23:33:57 -04:00
Rover: prevent log corruption during log creation
This commit is contained in:
parent
e52f8d6598
commit
33acce71c8
@ -1885,7 +1885,7 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg)
|
||||
static void mavlink_delay_cb()
|
||||
{
|
||||
static uint32_t last_1hz, last_50hz, last_5s;
|
||||
if (!gcs[0].initialised) return;
|
||||
if (!gcs[0].initialised || in_mavlink_delay) return;
|
||||
|
||||
in_mavlink_delay = true;
|
||||
|
||||
|
@ -568,7 +568,9 @@ static void Log_Read(uint16_t log_num, uint16_t start_page, uint16_t end_page)
|
||||
// start a new log
|
||||
static void start_logging()
|
||||
{
|
||||
in_mavlink_delay = true;
|
||||
DataFlash.StartNewLog();
|
||||
in_mavlink_delay = false;
|
||||
DataFlash.Log_Write_Message_P(PSTR(FIRMWARE_STRING));
|
||||
|
||||
// write system identifier as well if available
|
||||
|
Loading…
Reference in New Issue
Block a user