Conditionals and comments for PS = 0
This commit is contained in:
parent
2faed961ce
commit
8c136a5ab5
@ -272,7 +272,7 @@ int fanSpeed = 0;
|
|||||||
|
|
||||||
#endif // FWRETRACT
|
#endif // FWRETRACT
|
||||||
|
|
||||||
#ifdef ULTIPANEL
|
#if defined(ULTIPANEL) && HAS_POWER_SWITCH
|
||||||
bool powersupply =
|
bool powersupply =
|
||||||
#ifdef PS_DEFAULT_OFF
|
#ifdef PS_DEFAULT_OFF
|
||||||
false
|
false
|
||||||
@ -517,7 +517,7 @@ void setup_powerhold()
|
|||||||
OUT_WRITE(SUICIDE_PIN, HIGH);
|
OUT_WRITE(SUICIDE_PIN, HIGH);
|
||||||
#endif
|
#endif
|
||||||
#if HAS_POWER_SWITCH
|
#if HAS_POWER_SWITCH
|
||||||
#if defined(PS_DEFAULT_OFF)
|
#ifdef PS_DEFAULT_OFF
|
||||||
OUT_WRITE(PS_ON_PIN, PS_ON_ASLEEP);
|
OUT_WRITE(PS_ON_PIN, PS_ON_ASLEEP);
|
||||||
#else
|
#else
|
||||||
OUT_WRITE(PS_ON_PIN, PS_ON_AWAKE);
|
OUT_WRITE(PS_ON_PIN, PS_ON_AWAKE);
|
||||||
@ -3313,8 +3313,12 @@ inline void gcode_M140() {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // HAS_POWER_SWITCH
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* M81: Turn off Power Supply
|
* M81: Turn off Power, including Power Supply, if there is one.
|
||||||
|
*
|
||||||
|
* This code should ALWAYS be available for EMERGENCY SHUTDOWN!
|
||||||
*/
|
*/
|
||||||
inline void gcode_M81() {
|
inline void gcode_M81() {
|
||||||
disable_heater();
|
disable_heater();
|
||||||
@ -3333,13 +3337,14 @@ inline void gcode_M140() {
|
|||||||
OUT_WRITE(PS_ON_PIN, PS_ON_ASLEEP);
|
OUT_WRITE(PS_ON_PIN, PS_ON_ASLEEP);
|
||||||
#endif
|
#endif
|
||||||
#ifdef ULTIPANEL
|
#ifdef ULTIPANEL
|
||||||
|
#if HAS_POWER_SWITCH
|
||||||
powersupply = false;
|
powersupply = false;
|
||||||
|
#endif
|
||||||
LCD_MESSAGEPGM(MACHINE_NAME " " MSG_OFF ".");
|
LCD_MESSAGEPGM(MACHINE_NAME " " MSG_OFF ".");
|
||||||
lcd_update();
|
lcd_update();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // PS_ON_PIN
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* M82: Set E codes absolute (default)
|
* M82: Set E codes absolute (default)
|
||||||
@ -4874,15 +4879,15 @@ void process_commands() {
|
|||||||
#endif //HEATER_2_PIN
|
#endif //HEATER_2_PIN
|
||||||
#endif //BARICUDA
|
#endif //BARICUDA
|
||||||
|
|
||||||
#if defined(PS_ON_PIN) && PS_ON_PIN > -1
|
#if HAS_POWER_SWITCH
|
||||||
|
|
||||||
case 80: // M80 - Turn on Power Supply
|
case 80: // M80 - Turn on Power Supply
|
||||||
gcode_M80();
|
gcode_M80();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#endif // PS_ON_PIN
|
#endif // HAS_POWER_SWITCH
|
||||||
|
|
||||||
case 81: // M81 - Turn off Power Supply
|
case 81: // M81 - Turn off Power, including Power Supply, if possible
|
||||||
gcode_M81();
|
gcode_M81();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -5859,19 +5864,17 @@ void kill()
|
|||||||
disable_e2();
|
disable_e2();
|
||||||
disable_e3();
|
disable_e3();
|
||||||
|
|
||||||
#if defined(PS_ON_PIN) && PS_ON_PIN > -1
|
#if HAS_POWER_SWITCH
|
||||||
pinMode(PS_ON_PIN, INPUT);
|
pinMode(PS_ON_PIN, INPUT);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SERIAL_ERROR_START;
|
SERIAL_ERROR_START;
|
||||||
SERIAL_ERRORLNPGM(MSG_ERR_KILLED);
|
SERIAL_ERRORLNPGM(MSG_ERR_KILLED);
|
||||||
LCD_ALERTMESSAGEPGM(MSG_KILLED);
|
LCD_ALERTMESSAGEPGM(MSG_KILLED);
|
||||||
|
|
||||||
// FMC small patch to update the LCD before ending
|
// FMC small patch to update the LCD before ending
|
||||||
sei(); // enable interrupts
|
sei(); // enable interrupts
|
||||||
for ( int i=5; i--; lcd_update())
|
for (int i = 5; i--; lcd_update()) delay(200); // Wait a short time
|
||||||
{
|
|
||||||
delay(200);
|
|
||||||
}
|
|
||||||
cli(); // disable interrupts
|
cli(); // disable interrupts
|
||||||
suicide();
|
suicide();
|
||||||
while(1) { /* Intentionally left empty */ } // Wait for reset
|
while(1) { /* Intentionally left empty */ } // Wait for reset
|
||||||
|
@ -44,7 +44,9 @@ static void lcd_status_screen();
|
|||||||
|
|
||||||
#ifdef ULTIPANEL
|
#ifdef ULTIPANEL
|
||||||
|
|
||||||
|
#if HAS_POWER_SWITCH
|
||||||
extern bool powersupply;
|
extern bool powersupply;
|
||||||
|
#endif
|
||||||
static float manual_feedrate[] = MANUAL_FEEDRATE;
|
static float manual_feedrate[] = MANUAL_FEEDRATE;
|
||||||
static void lcd_main_menu();
|
static void lcd_main_menu();
|
||||||
static void lcd_tune_menu();
|
static void lcd_tune_menu();
|
||||||
|
Loading…
Reference in New Issue
Block a user