NARUTOfzr / Elegoo-Neptune-marlin2.1.1

Applicable to machines:Neptune3Pro&plus&max
GNU General Public License v3.0
22 stars 13 forks source link

fixed variant.h (use PIN_Ax instead of Ax) to reenable sanity checks #4

Closed sroemer closed 1 year ago

sroemer commented 1 year ago

Hi Naruto, I saw in your sources that the sanity checks for checking if Ex_AUTO_FAN_PINs are equal to FAN_PIN have been commented out. Since I didn't understand why it didn't work with it enabled I did investigate and found the problem:

In the Arduino sources PIN_Ax are defined as numbers, which then gets assigned to Ax.

For example:

#define PIN_A7   (61)
static const uint8_t A7 = PIN_A7;

'#if x == y' as used in the sanity checks seems not to work with the const uint8_t values (probably those are unknown to the pre processor). Therefore in variant.h all occurences of Ax have been replaced by PIN_Ax which then is a #define and works as expected.

Just a very minor change, but hopefully helpful.

Kind regards, Stefan.