From f222f2ef1e68ec528148de2bf32eb256fa00db4f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 20 Feb 2014 06:55:35 +1100 Subject: [PATCH] DataFlash: fixed logging on PX4v1 large writes break IO, a NuttX bug --- libraries/DataFlash/DataFlash_File.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/DataFlash/DataFlash_File.cpp b/libraries/DataFlash/DataFlash_File.cpp index 7d2b09621b..afa60e19b9 100644 --- a/libraries/DataFlash/DataFlash_File.cpp +++ b/libraries/DataFlash/DataFlash_File.cpp @@ -42,7 +42,12 @@ DataFlash_File::DataFlash_File(const char *log_directory) : _log_directory(log_directory), _writebuf(NULL), _writebuf_size(16*1024), +#ifdef CONFIG_ARCH_BOARD_PX4FMU_V1 + // V1 gets IO errors with larger than 512 byte writes + _writebuf_chunk(512), +#else _writebuf_chunk(4096), +#endif _writebuf_head(0), _writebuf_tail(0), _last_write_time(0)