AP_RPM: save some flash when features disabled

This commit is contained in:
Andrew Tridgell 2024-12-01 15:50:20 +11:00
parent c28d5cd8e2
commit 198e9753d8
1 changed files with 5 additions and 0 deletions

View File

@ -1,6 +1,7 @@
#pragma once #pragma once
#include <AP_Logger/LogStructure.h> #include <AP_Logger/LogStructure.h>
#include "AP_RPM_config.h"
#define LOG_IDS_FROM_RPM \ #define LOG_IDS_FROM_RPM \
LOG_RPM_MSG LOG_RPM_MSG
@ -21,6 +22,10 @@ struct PACKED log_RPM {
uint8_t health; uint8_t health;
}; };
#if !AP_RPM_ENABLED
#define LOG_STRUCTURE_FROM_RPM
#else
#define LOG_STRUCTURE_FROM_RPM \ #define LOG_STRUCTURE_FROM_RPM \
{ LOG_RPM_MSG, sizeof(log_RPM), \ { LOG_RPM_MSG, sizeof(log_RPM), \
"RPM", "QBffB", "TimeUS,I,RPM,Qual,H", "s#q--", "F-000" , true }, "RPM", "QBffB", "TimeUS,I,RPM,Qual,H", "s#q--", "F-000" , true },
#endif