Enhancements to M43 pins debugging#5118
Conversation
Marlin/pinsDebug.h
Outdated
There was a problem hiding this comment.
The pins_arduino.h files provide this info in NUM_DIGITAL_PINS and NUM_ANALOG_INPUTS
Marlin/temperature.cpp
Outdated
There was a problem hiding this comment.
endstop_monitor_flag could be checked here and would save the call of endstop_monitor() if not active.
There was a problem hiding this comment.
Thanks for the tip. I totally forgot to review that part of the code.
8103435 to
a092edb
Compare
I stumbled across a name change that'll be used a lot so I'm updateing the name list.
a092edb to
85e307d
Compare
|
Much cleaner code I've got a couple of bug fixes & a couple of minor changes. All the changes are included in the attached file. I couldn't get the #define PINSET(P) (defined(P) && P > -1) from the previous review to work on a pin that existed. Really strange since it uses the same method as the PIN_EXISTS macro. When determining if a pin is connected to a PWM, the TCCRxA register is always used even if looking at TIMERxC Lines 677-680 need to change The solution I came up with is a two part change: which means 694-724 change from In the WGM_MAKE macros the TEST function only returns 1 or 0 so the following pieces in lines 734-735 need to change from to either or I prefer the latter because it's one less operation to perform and it's consistent with how the macros treat the other register. A couple of minor changes:
|
Almost. When defined(_PIN) && _PIN >= 0…but with the proposed defined() && >= 0…which is nonsense. I hit this before, but I forgot. |
|
Ah, you're right about my mis-use of |
I think 30 is fine. I forgot that justified strings already include the string length. |
see detailed description in PR MarlinFirmware#5118
Followup to #5118 - pins debugging cleanup
Cleanup and optimization of #5112
EparameterW