Skip to content

Commit

Permalink
AP_Logger: use HAL_LOGGING_ENABLED defines
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Sep 5, 2023
1 parent 26b7092 commit 7f6fbb7
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libraries/AP_Logger/AP_Logger_Backend.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#include "AP_Logger_config.h"

#if HAL_LOGGING_ENABLED

#include "AP_Logger_Backend.h"

#include "LoggerMessageWriter.h"
Expand Down Expand Up @@ -752,3 +756,5 @@ bool AP_Logger_RateLimiter::should_log(uint8_t msgid, bool writev_streaming)
}
return ret;
}

#endif // HAL_LOGGING_ENABLED
6 changes: 6 additions & 0 deletions libraries/AP_Logger/AP_Logger_Backend.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#pragma once

#include "AP_Logger_config.h"

#if HAL_LOGGING_ENABLED

#include "AP_Logger.h"

#include <AP_Common/Bitmask.h>
Expand Down Expand Up @@ -259,3 +263,5 @@ class AP_Logger_Backend
void Write_AP_Logger_Stats_File(const struct df_stats &_stats);
void validate_WritePrioritisedBlock(const void *pBuffer, uint16_t size);
};

#endif // HAL_LOGGING_ENABLED
6 changes: 6 additions & 0 deletions libraries/AP_Logger/LogFile.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#include "AP_Logger_config.h"

#if HAL_LOGGING_ENABLED

#include <stdlib.h>

#include <AP_AHRS/AP_AHRS.h>
Expand Down Expand Up @@ -561,3 +565,5 @@ void AP_Logger::Write_PSCD(float pos_target, float pos, float vel_desired, float
{
Write_PSCx(LOG_PSCD_MSG, pos_target, pos, vel_desired, vel_target, vel, accel_desired, accel_target, accel);
}

#endif // HAL_LOGGING_ENABLED
6 changes: 6 additions & 0 deletions libraries/AP_Logger/LoggerMessageWriter.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#include "AP_Logger_config.h"

#if HAL_LOGGING_ENABLED

#include "AP_Common/AP_FWVersion.h"
#include "LoggerMessageWriter.h"
#include <AP_Scheduler/AP_Scheduler.h>
Expand Down Expand Up @@ -519,3 +523,5 @@ void LoggerMessageWriter_Write_Polyfence::reset()
}
#endif // !APM_BUILD_TYPE(APM_BUILD_Replay)
#endif // AP_FENCE_ENABLED

#endif // HAL_LOGGING_ENABLED

0 comments on commit 7f6fbb7

Please sign in to comment.