mirror of https://github.com/ArduPilot/ardupilot
AP_Proximity: move to config.h pattern and only include log structures if enabled
This commit is contained in:
parent
db9b57c0a3
commit
68b7293d9a
|
@ -14,11 +14,7 @@
|
|||
*/
|
||||
#pragma once
|
||||
|
||||
#include <AP_HAL/AP_HAL_Boards.h>
|
||||
|
||||
#ifndef HAL_PROXIMITY_ENABLED
|
||||
#define HAL_PROXIMITY_ENABLED (!HAL_MINIMIZE_FEATURES && BOARD_FLASH_SIZE > 1024)
|
||||
#endif
|
||||
#include "AP_Proximity_config.h"
|
||||
|
||||
#if HAL_PROXIMITY_ENABLED
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <AP_HAL/AP_HAL_Boards.h>
|
||||
|
||||
#ifndef HAL_PROXIMITY_ENABLED
|
||||
#define HAL_PROXIMITY_ENABLED (!HAL_MINIMIZE_FEATURES && BOARD_FLASH_SIZE > 1024)
|
||||
#endif
|
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <AP_Logger/LogStructure.h>
|
||||
#include "AP_Proximity_config.h"
|
||||
|
||||
#define LOG_IDS_FROM_PROXIMITY \
|
||||
LOG_PROXIMITY_MSG, \
|
||||
|
@ -70,8 +71,12 @@ struct PACKED log_Proximity_raw {
|
|||
};
|
||||
|
||||
|
||||
#if HAL_PROXIMITY_ENABLED
|
||||
#define LOG_STRUCTURE_FROM_PROXIMITY \
|
||||
{ LOG_PROXIMITY_MSG, sizeof(log_Proximity), \
|
||||
"PRX", "QBBfffffffffff", "TimeUS,Layer,He,D0,D45,D90,D135,D180,D225,D270,D315,DUp,CAn,CDis", "s#-mmmmmmmmmhm", "F--00000000000", true }, \
|
||||
{ LOG_RAW_PROXIMITY_MSG, sizeof(log_Proximity_raw), \
|
||||
"PRXR", "QBffffffff", "TimeUS,Layer,D0,D45,D90,D135,D180,D225,D270,D315", "s#mmmmmmmm", "F-00000000", true },
|
||||
#else
|
||||
#define LOG_STRUCTURE_FROM_PROXIMITY
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue