mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_VisualOdom: only include log structure if enabled
This commit is contained in:
parent
71b00e0f75
commit
8afc07d85b
@ -14,11 +14,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <AP_HAL/AP_HAL_Boards.h>
|
||||
|
||||
#ifndef HAL_VISUALODOM_ENABLED
|
||||
#define HAL_VISUALODOM_ENABLED (!HAL_MINIMIZE_FEATURES && BOARD_FLASH_SIZE > 1024)
|
||||
#endif
|
||||
#include "AP_VisualOdom_config.h"
|
||||
|
||||
#if HAL_VISUALODOM_ENABLED
|
||||
|
||||
|
7
libraries/AP_VisualOdom/AP_VisualOdom_config.h
Normal file
7
libraries/AP_VisualOdom/AP_VisualOdom_config.h
Normal file
@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <AP_HAL/AP_HAL_Boards.h>
|
||||
|
||||
#ifndef HAL_VISUALODOM_ENABLED
|
||||
#define HAL_VISUALODOM_ENABLED (!HAL_MINIMIZE_FEATURES && BOARD_FLASH_SIZE > 1024)
|
||||
#endif
|
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <AP_Logger/LogStructure.h>
|
||||
#include "AP_VisualOdom_config.h"
|
||||
|
||||
#define LOG_IDS_FROM_VISUALODOM \
|
||||
LOG_VISUALODOM_MSG, \
|
||||
@ -87,6 +88,7 @@ struct PACKED log_VisualVelocity {
|
||||
uint8_t ignored;
|
||||
};
|
||||
|
||||
#if HAL_VISUALODOM_ENABLED
|
||||
#define LOG_STRUCTURE_FROM_VISUALODOM \
|
||||
{ LOG_VISUALODOM_MSG, sizeof(log_VisualOdom), \
|
||||
"VISO", "Qffffffff", "TimeUS,dt,AngDX,AngDY,AngDZ,PosDX,PosDY,PosDZ,conf", "ssrrrmmm-", "FF000000-" }, \
|
||||
@ -94,4 +96,6 @@ struct PACKED log_VisualVelocity {
|
||||
"VISP", "QQIffffffffBB", "TimeUS,RTimeUS,CTimeMS,PX,PY,PZ,Roll,Pitch,Yaw,PErr,AErr,Rst,Ign", "sssmmmddhmd--", "FFC00000000--" }, \
|
||||
{ LOG_VISUALVEL_MSG, sizeof(log_VisualVelocity), \
|
||||
"VISV", "QQIffffBB", "TimeUS,RTimeUS,CTimeMS,VX,VY,VZ,VErr,Rst,Ign", "sssnnnn--", "FFC0000--" },
|
||||
|
||||
#else
|
||||
#define LOG_STRUCTURE_FROM_VISUALODOM
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user