M226 error in optional config as input
in Bug Reports
Hello,
I tried to use function M226 wait for pin state, but it did not work until I changed firmware, because my pin was not initialized as an input earlier.
My command was M226 P3 S0 X1.
FW 0.92.9 HW RAMPS1.4
In the file Commands.cpp line 1948 and 1950 should be com->P instead of com->S
if(com->hasX()) {
if(com->X == 0)
HAL::pinMode(com->P,INPUT);
else
HAL::pinMode(com->P,INPUT_PULLUP);
}
if(com->X == 0)
HAL::pinMode(com->P,INPUT);
else
HAL::pinMode(com->P,INPUT_PULLUP);
}
Comments