mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-22 14:47:35 +08:00
sdlog2: select MIN < MAX bytes to write
Previously, the MAX and MIN were both 512 meaning that usually it would start writing at > 512 bytes but only write 512 bytes which results in a 512 bytes write shortly followed by a e.g. 30 bytes write. Also, performance (measured in missed poll updates) seems slightly better on Snapdragon with bigger chunks.
This commit is contained in:
@@ -144,8 +144,14 @@ static bool logwriter_should_exit = false; /**< Logwriter thread exit flag */
|
||||
static const unsigned MAX_NO_LOGFOLDER = 999; /**< Maximum number of log dirs */
|
||||
static const unsigned MAX_NO_LOGFILE = 999; /**< Maximum number of log files */
|
||||
static const int LOG_BUFFER_SIZE_DEFAULT = 8192;
|
||||
|
||||
#if defined __PX4_POSIX
|
||||
static const int MAX_WRITE_CHUNK = 2048;
|
||||
static const int MIN_BYTES_TO_WRITE = 256;
|
||||
#else
|
||||
static const int MAX_WRITE_CHUNK = 512;
|
||||
static const int MIN_BYTES_TO_WRITE = 512;
|
||||
static const int MIN_BYTES_TO_WRITE = 256;
|
||||
#endif
|
||||
|
||||
static bool _extended_logging = false;
|
||||
static bool _gpstime_only = false;
|
||||
|
||||
Reference in New Issue
Block a user