// returns true if all format messages have been written, and thus it is OK // for other messages to go out to the log bool DataFlash_Backend::WriteBlockCheckStartupMessages() { if (_startup_messagewriter->fmt_done()) { return true; } if (_writing_startup_messages) { // we have been called by a messagewriter, so writing is OK return true; } // we're not writing startup messages, so this must be some random // caller hoping to write blocks out. Push out log blocks - we // might end up clearing the buffer..... push_log_blocks(); // even if we did finish writing startup messages, we can't // permit any message to go in as its timestamp will be before // any we wrote in. Time going backwards annoys log readers. // sorry! currently busy writing out startup messages... return false; }
void DataFlash_MAVLink::periodic_fullrate(uint32_t now) { push_log_blocks(); }