Skip to content

Commit

Permalink
AC_Avoidance: remove log structures when avoidance/pathplanner not co…
Browse files Browse the repository at this point in the history
…mpiled in
  • Loading branch information
peterbarker committed Mar 9, 2024
1 parent c87c0c0 commit 5650342
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions libraries/AC_Avoidance/LogStructure.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
LOG_SIMPLE_AVOID_MSG, \
LOG_OD_VISGRAPH_MSG

#if AP_OAPATHPLANNER_BENDYRULER_ENABLED

// @LoggerMessage: OABR
// @Description: Object avoidance (Bendy Ruler) diagnostics
// @Field: TimeUS: Time since system startup
Expand Down Expand Up @@ -43,7 +45,9 @@ struct PACKED log_OABendyRuler {
int32_t oa_lng;
int32_t oa_alt;
};
#endif // AP_OAPATHPLANNER_BENDYRULER_ENABLED

#if AP_OAPATHPLANNER_DIJKSTRA_ENABLED
// @LoggerMessage: OADJ
// @Description: Object avoidance (Dijkstra) diagnostics
// @Field: TimeUS: Time since system startup
Expand All @@ -67,7 +71,9 @@ struct PACKED log_OADijkstra {
int32_t oa_lat;
int32_t oa_lng;
};
#endif // AP_OAPATHPLANNER_DIJKSTRA_ENABLED

#if AP_AVOIDANCE_ENABLED
// @LoggerMessage: SA
// @Description: Simple Avoidance messages
// @Field: TimeUS: Time since system startup
Expand All @@ -91,7 +97,9 @@ struct PACKED log_SimpleAvoid {
float modified_vel_z;
uint8_t backing_up;
};
#endif // AP_AVOIDANCE_ENABLED

#if AP_OAPATHPLANNER_ENABLED
// @LoggerMessage: OAVG
// @Description: Object avoidance path planning visgraph points
// @Field: TimeUS: Time since system startup
Expand All @@ -107,22 +115,39 @@ struct PACKED log_OD_Visgraph {
int32_t Lat;
int32_t Lon;
};
#endif // AP_OAPATHPLANNER_ENABLED

#if AP_OAPATHPLANNER_BENDYRULER_ENABLED
#define LOG_STRUCTURE_BENDYRULER \
{ LOG_OA_BENDYRULER_MSG, sizeof(log_OABendyRuler), \
"OABR","QBBHHHBfLLiLLi","TimeUS,Type,Act,DYaw,Yaw,DP,RChg,Mar,DLt,DLg,DAlt,OLt,OLg,OAlt", "s--ddd-mDUmDUm", "F-------GGBGGB" , true },
#else
#define LOG_STRUCTURE_BENDYRULER
#endif

#if AP_OAPATHPLANNER_DIJKSTRA_ENABLED
#define LOG_STRUCTURE_DIJKSTRA \
{ LOG_OA_DIJKSTRA_MSG, sizeof(log_OADijkstra), \
"OADJ","QBBBBLLLL","TimeUS,State,Err,CurrPoint,TotPoints,DLat,DLng,OALat,OALng", "s----DUDU", "F----GGGG" , true },
#else
#define LOG_STRUCTURE_DIJKSTRA
#endif

#if AP_AVOIDANCE_ENABLED
#define LOG_STRUCTURE_SA \
{ LOG_SIMPLE_AVOID_MSG, sizeof(log_SimpleAvoid), \
"SA", "QBffffffB","TimeUS,State,DVelX,DVelY,DVelZ,MVelX,MVelY,MVelZ,Back", "s-nnnnnn-", "F--------", true },
#else
#define LOG_STRUCTURE_SA
#endif

#if AP_OAPATHPLANNER_ENABLED
#define LOG_STRUCTURE_VG \
{ LOG_OD_VISGRAPH_MSG, sizeof(log_OD_Visgraph), \
"OAVG", "QBBLL", "TimeUS,version,point_num,Lat,Lon", "s--DU", "F--GG", true},
#else
#define LOG_STRUCTURE_VG
#endif

#define LOG_STRUCTURE_FROM_AVOIDANCE \
LOG_STRUCTURE_BENDYRULER \
Expand Down

0 comments on commit 5650342

Please sign in to comment.