From 198e9753d8b435f5439f37f2178d85f6250000a9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell <andrew@tridgell.net> Date: Sun, 1 Dec 2024 15:50:20 +1100 Subject: [PATCH] AP_RPM: save some flash when features disabled --- libraries/AP_RPM/LogStructure.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/AP_RPM/LogStructure.h b/libraries/AP_RPM/LogStructure.h index e0677f343a..99ec37da32 100644 --- a/libraries/AP_RPM/LogStructure.h +++ b/libraries/AP_RPM/LogStructure.h @@ -1,6 +1,7 @@ #pragma once #include <AP_Logger/LogStructure.h> +#include "AP_RPM_config.h" #define LOG_IDS_FROM_RPM \ LOG_RPM_MSG @@ -21,6 +22,10 @@ struct PACKED log_RPM { uint8_t health; }; +#if !AP_RPM_ENABLED +#define LOG_STRUCTURE_FROM_RPM +#else #define LOG_STRUCTURE_FROM_RPM \ { LOG_RPM_MSG, sizeof(log_RPM), \ "RPM", "QBffB", "TimeUS,I,RPM,Qual,H", "s#q--", "F-000" , true }, +#endif