Part of #131.
Abstract the use of ROS loggers out of mavrosflight.
Because you need to declare the type of a template class in the file where it is implemented, I added the USE_ROS and STANDALONE compiler macros which are checked in mavrosflight.cpp, time_manager.cpp, and param_manager.cpp. Not sure if this is the cleanest/best option.
Currently there is a warning: format not a string literal and no format arguments when this is built. This is because we are passing the format string into the logger as a variable. I think typically the compiler can trace const char* and figure out if there is an issue, but I think there is something in what I am doing that makes it unable to track down the use of the format string. If you have any suggestions on how to get rid of that warning, that'd be great.
Part of #131. Abstract the use of ROS loggers out of mavrosflight.
Because you need to declare the type of a template class in the file where it is implemented, I added the USE_ROS and STANDALONE compiler macros which are checked in
mavrosflight.cpp
,time_manager.cpp
, andparam_manager.cpp
. Not sure if this is the cleanest/best option.Currently there is a
warning: format not a string literal and no format arguments
when this is built. This is because we are passing the format string into the logger as a variable. I think typically the compiler can traceconst char*
and figure out if there is an issue, but I think there is something in what I am doing that makes it unable to track down the use of the format string. If you have any suggestions on how to get rid of that warning, that'd be great.