AP_AIS: only include log structures if enabled

This commit is contained in:
Iampete1 2022-07-06 10:33:50 +01:00 committed by Andrew Tridgell
parent 60408fd16e
commit 8f7cad39cd
1 changed files with 6 additions and 1 deletions

View File

@ -1,6 +1,7 @@
#pragma once
#include <AP_Logger/LogStructure.h>
#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