1.0K reads
4 comments
Hello Omar,
I propose a refactoring in your github repository (see issue #2).
I admit that it was not straight forward to write the parameters of the function!
Thank you for your contribution Christian Foucher! Actually, yes, given all the different types in embedded and the singleton pattern, setting up function parameters can take a while to digestive. This is why I try to avoid them in beginner tutorials. Maybe it's a topic for a separate blog post.
I revised your refactor and yes, I am printing the value regardless of the update. I will update the post and repo to incorporate this as an optimization.
Omar Hiari I have another suggestion. It concerns the displayed message. I have added a remark to the issue #2 on github repository (more clear than typing it here). It is about the decimal that can't be displayed because of the computation that gives an integer result. By the way, it permits to increase timer resolution in the displayed message.
Thanks Christian Foucher, I will adjust this. It's an artifact left over as I was experimenting with floating point before. I decided to avoid floating point operations but forgot to adjust this.