Skip to content

Commit

Permalink
AP_Logger: don't virtual out_of_time_for_writing_messages for DF
Browse files Browse the repository at this point in the history
This save use some flash against the solution with override
  • Loading branch information
khancyr committed Sep 25, 2023
1 parent 50b7b93 commit bfa93e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions libraries/AP_Logger/LoggerMessageWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ void LoggerMessageWriter_DFLogStart::reset()
ap = AP_Param::first(&token, &type, &param_default);
}

bool LoggerMessageWriter_DFLogStart::out_of_time_for_writing_messages() const
bool LoggerMessageWriter_DFLogStart::out_of_time_for_writing_messages_df() const
{
if (stage == Stage::FORMATS) {
// write out the FMT messages as fast as we can
Expand Down Expand Up @@ -99,7 +99,7 @@ bool LoggerMessageWriter_DFLogStart::check_process_limit(uint32_t start_us)

void LoggerMessageWriter_DFLogStart::process()
{
if (out_of_time_for_writing_messages()) {
if (out_of_time_for_writing_messages_df()) {
return;
}
// allow any stage to run for max 1ms, to prevent a long loop on arming
Expand Down
4 changes: 2 additions & 2 deletions libraries/AP_Logger/LoggerMessageWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class LoggerMessageWriter {
_logger_backend = backend;
}

virtual bool out_of_time_for_writing_messages() const;
bool out_of_time_for_writing_messages() const;

protected:
bool _finished = false;
Expand Down Expand Up @@ -124,7 +124,7 @@ class LoggerMessageWriter_DFLogStart : public LoggerMessageWriter {
#endif
}

bool out_of_time_for_writing_messages() const override final;
bool out_of_time_for_writing_messages_df() const;

void reset() override;
void process() override;
Expand Down

0 comments on commit bfa93e1

Please sign in to comment.