Copter: prevent log corruption during log creation
This commit is contained in:
parent
cf09fef1db
commit
e52f8d6598
@ -2032,7 +2032,7 @@ mission_failed:
|
||||
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;
|
||||
|
||||
|
@ -739,7 +739,9 @@ static void start_logging()
|
||||
if (g.log_bitmask != 0) {
|
||||
if (!ap.logging_started) {
|
||||
ap.logging_started = true;
|
||||
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