Printer always ON on startup
I use Ramps1.4
Changing ENABLE_POWER_ON_STARTUP option doesn't matter
So, I made some changes in printer.cpp to always set to LOW PSON_PIN if ENABLE_POWER_ON_STARTUP == 0
=========================
Changing ENABLE_POWER_ON_STARTUP option doesn't matter
So, I made some changes in printer.cpp to always set to LOW PSON_PIN if ENABLE_POWER_ON_STARTUP == 0
=========================
#if defined(ENABLE_POWER_ON_STARTUP) && ENABLE_POWER_ON_STARTUP && (PS_ON_PIN>-1)
SET_OUTPUT(PS_ON_PIN); //GND
WRITE(PS_ON_PIN, (POWER_INVERTING ? HIGH : LOW));
Printer::setPowerOn(true);
#if defined(ENABLE_POWER_ON_STARTUP) && !ENABLE_POWER_ON_STARTUP && (PS_ON_PIN>-1)
SET_OUTPUT(PS_ON_PIN); //GND
WRITE(PS_ON_PIN, (POWER_INVERTING ? LOW : HIGH));
Printer::setPowerOn(false);
#if PS_ON_PIN > -1
SET_OUTPUT(PS_ON_PIN); //GND
Printer::setPowerOn(false);
Printer::setPowerOn(true);
=========================
Now it works fine!
Now it works fine!
Comments
#if defined(ENABLE_POWER_ON_STARTUP) && ENABLE_POWER_ON_STARTUP && (PS_ON_PIN>-1)
SET_OUTPUT(PS_ON_PIN); //GND
WRITE(PS_ON_PIN, (POWER_INVERTING ? HIGH : LOW));
Printer::setPowerOn(true);
#else
#if PS_ON_PIN > -1
SET_OUTPUT(PS_ON_PIN); //GND
WRITE(PS_ON_PIN,(POWER_INVERTING ? LOW : HIGH));
Printer::setPowerOn(false);
#else
Printer::setPowerOn(true);
#endif
#endif
-----
#if PS_ON_PIN > -1
SET_OUTPUT(PS_ON_PIN); //GND
>>> WRITE(PS_ON_PIN,(POWER_INVERTING ? LOW : HIGH));
Printer::setPowerOn(false);
#else
-----thanks, please add it to
https://github.com/repetier/Repetier-Firmware/blob/master/src/ArduinoAVR/Repetier/Printer.cpp
Maybe some combination of POWER_INVERTING and ENABLE_POWER_ON_STARTUP will do the same trick, but it is bad idea.