hideakitai / DebugLog

Logging library for Arduino that can output to both Serial and File with one line
MIT License
51 stars 12 forks source link

LogPrecision does not name a type #14

Closed MarcCosgaya closed 1 year ago

MarcCosgaya commented 1 year ago

Hello,

I am trying to compile a small C++ program for testing hideakitai/MsgPack. However, I get the following error:

DebugLog/DebugLog.h:22:39: error: ‘LogPrecision’ in namespace ‘arx::debug’ does not name a type
   22 | using DebugLogPrecision = arx::debug::LogPrecision;
      |                                       ^~~~~~~~~~~~

LogPrecision is used here: https://github.com/hideakitai/DebugLog/blob/1093cf3d04c9b1b5d0b9e612b7cad62061a51b09/DebugLog.h#L22

But if ARDUINO is not defined, LogPrecision is not available: https://github.com/hideakitai/DebugLog/blob/1093cf3d04c9b1b5d0b9e612b7cad62061a51b09/DebugLog/Types.h#L68-L80

I suggest replacing line 22 with:

#ifdef ARDUINO
using DebugLogPrecision = arx::debug::LogPrecision;
#endif
hideakitai commented 1 year ago

@MarcCosgaya Fixed. Thanks!