Skip to content

Commit

Permalink
Merge pull request MarlinFirmware#553 from iXce/req413
Browse files Browse the repository at this point in the history
Update MarlinFirmware#413 for merging, fix languages.h
  • Loading branch information
ErikZalm committed Jul 23, 2013
2 parents a105e10 + 7684145 commit e578f98
Show file tree
Hide file tree
Showing 5 changed files with 1,597 additions and 1,522 deletions.
1 change: 1 addition & 0 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
// 3 = MEGA/RAMPS up to 1.2 = 3
// 33 = RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Bed)
// 34 = RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, Bed)
// 35 = RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Fan)
// 4 = Duemilanove w/ ATMega328P pin assignment
// 5 = Gen6
// 51 = Gen6 deluxe
Expand Down
31 changes: 26 additions & 5 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ int EtoPPressure=0;
float retract_recover_length=0, retract_recover_feedrate=8*60;
#endif

#ifdef ULTIPANEL
bool powersupply = true;
#endif

//===========================================================================
//=============================private variables=============================
//===========================================================================
Expand Down Expand Up @@ -1390,22 +1394,39 @@ void process_commands()
#endif

#if defined(PS_ON_PIN) && PS_ON_PIN > -1
case 80: // M80 - ATX Power On
case 80: // M80 - Turn on Power Supply
SET_OUTPUT(PS_ON_PIN); //GND
WRITE(PS_ON_PIN, PS_ON_AWAKE);
#ifdef ULTIPANEL
powersupply = true;
LCD_MESSAGEPGM(WELCOME_MSG);
lcd_update();
#endif
break;
#endif

case 81: // M81 - ATX Power Off


case 81: // M81 - Turn off Power Supply
disable_heater();
st_synchronize();
disable_e0();
disable_e1();
disable_e2();
finishAndDisableSteppers();
fanSpeed = 0;
delay(1000); // Wait a little before to switch off
#if defined(SUICIDE_PIN) && SUICIDE_PIN > -1
st_synchronize();
suicide();
#elif defined(PS_ON_PIN) && PS_ON_PIN > -1
SET_OUTPUT(PS_ON_PIN);
WRITE(PS_ON_PIN, PS_ON_ASLEEP);
#endif
break;
#ifdef ULTIPANEL
powersupply = false;
LCD_MESSAGEPGM(MACHINE_NAME" "MSG_OFF".");
lcd_update();
#endif
break;

case 82:
axis_relative_modes[3] = false;
Expand Down
Loading

0 comments on commit e578f98

Please sign in to comment.