1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +03:00

Minor fix for flushing behaviour on dataflash

This commit is contained in:
Nicholas Sherlock 2015-02-16 22:20:53 +13:00
parent d628bc6dcd
commit 5f29eed017
5 changed files with 25 additions and 30 deletions

View file

@ -644,6 +644,9 @@ void startBlackbox(void)
}
}
/**
* Begin Blackbox shutdown.
*/
void finishBlackbox(void)
{
if (blackboxState == BLACKBOX_STATE_RUNNING) {
@ -1123,7 +1126,7 @@ void handleBlackbox(void)
*
* Don't wait longer than it could possibly take if something funky happens.
*/
if (millis() > xmitState.u.startTime + 200 || isBlackboxDeviceIdle()) {
if (millis() > xmitState.u.startTime + 200 || blackboxDeviceFlush()) {
blackboxDeviceClose();
blackboxSetState(BLACKBOX_STATE_STOPPED);
}