From 8f7cad39cdad772df096ead7ed4f5cfba7dff6be Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Wed, 6 Jul 2022 10:33:50 +0100 Subject: [PATCH] AP_AIS: only include log structures if enabled --- libraries/AP_AIS/LogStructure.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libraries/AP_AIS/LogStructure.h b/libraries/AP_AIS/LogStructure.h index 563a29e9c6..b55656fae1 100644 --- a/libraries/AP_AIS/LogStructure.h +++ b/libraries/AP_AIS/LogStructure.h @@ -1,6 +1,7 @@ #pragma once #include +#include "AP_AIS.h" #define LOG_IDS_FROM_AIS \ LOG_AIS_RAW_MSG,\ @@ -140,6 +141,9 @@ struct PACKED log_AIS_msg5 { // @Field: dst: Destination // @Field: dte: DTE +#if !AP_AIS_ENABLED +#define LOG_STRUCTURE_FROM_AIS +#else #define LOG_STRUCTURE_FROM_AIS \ { LOG_AIS_RAW_MSG, sizeof(log_AIS_raw), \ "AISR", "QBBBZ", "TimeUS,num,total,ID,payload", "s----", "F0000" }, \ @@ -148,4 +152,5 @@ struct PACKED log_AIS_msg5 { { LOG_AIS_MSG4, sizeof(log_AIS_msg4), \ "AIS4", "QBIHBBBBBBLLBBI", "US,rep,mmsi,year,mth,day,h,m,s,fix,lon,lat,epfd,raim,rad", "s--------------", "F00000000000000" }, \ { LOG_AIS_MSG5, sizeof(log_AIS_msg5), \ - "AIS5", "QBIBINZBHHBBBBZB", "US,rep,mmsi,ver,imo,cal,nam,typ,bow,stn,prt,str,fix,dght,dst,dte", "s-------mmmm-m--", "F------------A--" } + "AIS5", "QBIBINZBHHBBBBZB", "US,rep,mmsi,ver,imo,cal,nam,typ,bow,stn,prt,str,fix,dght,dst,dte", "s-------mmmm-m--", "F------------A--" }, +#endif