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

how to format floating point values #5

Closed DeadOldMan closed 2 years ago

DeadOldMan commented 2 years ago

I am a noob in C++ and have a question regarding logging floats with DebugLog. The floats are always in a format with 2 decimals but i need up to 6 decimals. Is there a ways to change the format of the output of floats?

hideakitai commented 2 years ago

@DeadOldMan Hi, I've added the feature in v0.6.5. Please refer options.ino for usage.

https://github.com/hideakitai/DebugLog/blob/e99aef33ab8357df62a88ba620f972674ae8bf74/examples/options/options.ino#L24-L30

Could you try it?

DeadOldMan commented 2 years ago

@hideakitai Hi, thank you very much, works perfect.