···1818#include <opencv2/core/mat.hpp>
1919#include <opencv2/core/version.hpp>
20202121-#define SLAM_TRACE(...) U_LOG_IFL_T(t.ll, __VA_ARGS__)
2222-#define SLAM_DEBUG(...) U_LOG_IFL_D(t.ll, __VA_ARGS__)
2323-#define SLAM_INFO(...) U_LOG_IFL_I(t.ll, __VA_ARGS__)
2424-#define SLAM_WARN(...) U_LOG_IFL_W(t.ll, __VA_ARGS__)
2525-#define SLAM_ERROR(...) U_LOG_IFL_E(t.ll, __VA_ARGS__)
2121+#define SLAM_TRACE(...) U_LOG_IFL_T(t.log_level, __VA_ARGS__)
2222+#define SLAM_DEBUG(...) U_LOG_IFL_D(t.log_level, __VA_ARGS__)
2323+#define SLAM_INFO(...) U_LOG_IFL_I(t.log_level, __VA_ARGS__)
2424+#define SLAM_WARN(...) U_LOG_IFL_W(t.log_level, __VA_ARGS__)
2525+#define SLAM_ERROR(...) U_LOG_IFL_E(t.log_level, __VA_ARGS__)
2626#define SLAM_ASSERT(predicate, ...) \
2727 do { \
2828 bool p = predicate; \
···168168 struct xrt_frame_sink right_sink = {}; //!< Sends right camera frames to the SLAM system
169169 struct xrt_imu_sink imu_sink = {}; //!< Sends imu samples to the SLAM system
170170171171- enum u_logging_level ll; //!< Logging level for the SLAM tracker, set by SLAM_LOG var
172172- struct os_thread_helper oth; //!< Thread where the external SLAM system runs
173173- MatFrame *cv_wrapper; //!< Wraps a xrt_frame in a cv::Mat to send to the SLAM system
171171+ enum u_logging_level log_level; //!< Logging level for the SLAM tracker, set by SLAM_LOG var
172172+ struct os_thread_helper oth; //!< Thread where the external SLAM system runs
173173+ MatFrame *cv_wrapper; //!< Wraps a xrt_frame in a cv::Mat to send to the SLAM system
174174175175 // Used for checking that the timestamps come in order
176176 mutable timepoint_ns last_imu_ts = INT64_MIN;
···306306extern "C" int
307307t_slam_create(struct xrt_frame_context *xfctx, struct xrt_tracked_slam **out_xts, struct xrt_slam_sinks **out_sink)
308308{
309309- enum u_logging_level ll = debug_get_log_option_slam_log();
309309+ enum u_logging_level log_level = debug_get_log_option_slam_log();
310310 const char *config_file = debug_get_option_slam_config();
311311 if (!config_file) {
312312- U_LOG_IFL_W(ll, "SLAM tracker requires a config file set with the SLAM_CONFIG environment variable");
312312+ U_LOG_IFL_W(log_level,
313313+ "SLAM tracker requires a config file set with the SLAM_CONFIG environment variable");
313314 return -1;
314315 }
315316316317 auto &t = *(new TrackerSlam{});
317317- t.ll = ll;
318318+ t.log_level = log_level;
318319 t.cv_wrapper = new MatFrame();
319320320321 t.base.get_tracked_pose = t_slam_get_tracked_pose;
···3636 struct qwerty_hmd *hmd; //!< Can be NULL
3737 struct qwerty_controller *lctrl; //!< Cannot be NULL
3838 struct qwerty_controller *rctrl; //!< Cannot be NULL
3939- enum u_logging_level ll;
3939+ enum u_logging_level log_level;
4040 bool process_keys; //!< If false disable keyboard and mouse input
4141 bool hmd_focused; //!< For gui var tracking only, true if hmd is the focused device
4242 bool lctrl_focused; //!< Same as `hmd_focused` but for the left controller