mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-23 09:08:30 -04:00
AP_Logger: address review commenst from #14299
This commit is contained in:
parent
76ee7bec77
commit
5c554221c7
@ -530,7 +530,7 @@ bool AP_Logger_Backend::logging_enabled() const
|
||||
|
||||
void AP_Logger_Backend::Write_AP_Logger_Stats_File(const struct df_stats &_stats)
|
||||
{
|
||||
struct log_DSF pkt = {
|
||||
const struct log_DSF pkt {
|
||||
LOG_PACKET_HEADER_INIT(LOG_DF_FILE_STATS),
|
||||
time_us : AP_HAL::micros64(),
|
||||
dropped : _dropped,
|
||||
@ -543,7 +543,8 @@ void AP_Logger_Backend::Write_AP_Logger_Stats_File(const struct df_stats &_stats
|
||||
WriteBlock(&pkt, sizeof(pkt));
|
||||
}
|
||||
|
||||
void AP_Logger_Backend::df_stats_gather(const uint16_t bytes_written, uint32_t space_remaining) {
|
||||
void AP_Logger_Backend::df_stats_gather(const uint16_t bytes_written, uint32_t space_remaining)
|
||||
{
|
||||
if (space_remaining < stats.buf_space_min) {
|
||||
stats.buf_space_min = space_remaining;
|
||||
}
|
||||
|
@ -126,10 +126,11 @@ bool AP_Logger_Block::_WritePrioritisedBlock(const void *pBuffer, uint16_t size,
|
||||
}
|
||||
|
||||
if (!write_sem.take(1)) {
|
||||
_dropped++;
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32_t space = writebuf.space();
|
||||
const uint32_t space = writebuf.space();
|
||||
|
||||
if (_writing_startup_messages &&
|
||||
_startup_messagewriter->fmt_done()) {
|
||||
|
Loading…
Reference in New Issue
Block a user