Open AndunHH opened 5 days ago
I used the chance to integrate Suggestion 1 into #34.
Regarding 1: Great 👍
Regarding 2: Good spot, I forgot the mutation of the centered array values.
Regarding 3:
My suggestion would be:
...
DEBUG_OUTPUT = DEBUG_RAW_VALUES + DEBUG_CENTERD_VALUES + DEBUG_VELOCITIES + ...
My view is this is easier to read for newbies ( but then that's just preference I guess ;) )
However we could also combine them into "friendlier" messages;
DEBUG_OUTPUT = DEBUG_LEVEL_1
etc.
(Apologies if I'm teaching grandmother to suck eggs ;) - again it's a style / preference thing)
I like the idea! With the bit mask and the debug levels combined we get good and newcomer friendly good!
Do you write a pull request? I can add it to my list in the next week or so...
In #33 @simonmacarthur came with some good suggestion for refactoring the debug output. This issue is forked, because the original issue was closed successfully.
Suggestion 1:
-> Yes, in fact a good idea!
Suggestion 2:
-> We need to rewrite the good a little bit, because the centered array is mapped to the min-max values between debug=2 and debug=3. No big deal with an additional array. In every case, we must leave proper comments for new-comers in the code how to call the debug-reporting for this spots.
Suggestion 3:
-> Yes, also a good idea as an additional debuging. I think there is nothing simpler for newcomers than giving them numbers rising from 1 to 9 to perform ;) (and also typing this numbers of the serial interface is easier than a bitmask ;)) But we can obviously put a mapping from those numbers to general applicable bitmask.