mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
logger: make sure the buffer is at least 300B larger than _min_write_chunk
We always write larger chunks (orb messages) to the buffer, so the buffer needs to be larger than the minimum write chunk
This commit is contained in:
parent
9a02dbdd66
commit
7d42a648f0
@ -12,7 +12,9 @@ constexpr size_t LogWriter::_min_write_chunk;
|
||||
|
||||
|
||||
LogWriter::LogWriter(size_t buffer_size) :
|
||||
_buffer_size(math::max(buffer_size, _min_write_chunk))
|
||||
//We always write larger chunks (orb messages) to the buffer, so the buffer
|
||||
//needs to be larger than the minimum write chunk (300 is somewhat arbitrary)
|
||||
_buffer_size(math::max(buffer_size, _min_write_chunk + 300))
|
||||
{
|
||||
pthread_mutex_init(&_mtx, nullptr);
|
||||
pthread_cond_init(&_cv, nullptr);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user