Merge pull request #553 from iXce/req413

Update #413 for merging, fix languages.h
This commit is contained in:
ErikZalm 2013-07-23 14:19:30 -07:00
commit e578f988d3
5 changed files with 1597 additions and 1522 deletions

View File

@ -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

View File

@ -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=============================
//===========================================================================
@ -1390,20 +1394,37 @@ 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
#ifdef ULTIPANEL
powersupply = false;
LCD_MESSAGEPGM(MACHINE_NAME" "MSG_OFF".");
lcd_update();
#endif
break;

View File

@ -60,6 +60,8 @@
#define MSG_PREHEAT_ABS "Preheat ABS"
#define MSG_PREHEAT_ABS_SETTINGS "Preheat ABS Conf"
#define MSG_COOLDOWN "Cooldown"
#define MSG_SWITCH_PS_ON "Switch Power On"
#define MSG_SWITCH_PS_OFF "Switch Power Off"
#define MSG_EXTRUDE "Extrude"
#define MSG_RETRACT "Retract"
#define MSG_MOVE_AXIS "Move Axis"
@ -220,6 +222,8 @@
#define MSG_PREHEAT_ABS "Rozgrzej ABS"
#define MSG_PREHEAT_ABS_SETTINGS "Ustawienia roz. ABS"
#define MSG_COOLDOWN "Chlodzenie"
#define MSG_SWITCH_PS_ON "Switch Power On"
#define MSG_SWITCH_PS_OFF "Switch Power Off"
#define MSG_EXTRUDE "Ekstruzja"
#define MSG_RETRACT "Cofanie"
#define MSG_MOVE_AXIS "Ruch osi"
@ -290,6 +294,8 @@
#define MSG_CONTROL_RETRACT_RECOVERF "Cof. wycof. F"
#define MSG_AUTORETRACT "Auto. wycofanie"
#define MSG_FILAMENTCHANGE "Change filament"
#define MSG_INIT_SDCARD "Init. SD-Card"
#define MSG_CNG_SDCARD "Change SD-Card"
// Serial Console Messages
@ -380,6 +386,8 @@
#define MSG_PREHEAT_ABS " Prechauffage ABS"
#define MSG_PREHEAT_ABS_SETTINGS " Regl. prechauffe ABS"
#define MSG_COOLDOWN " Refroidissement"
#define MSG_SWITCH_PS_ON "Allumer alimentation"
#define MSG_SWITCH_PS_OFF "Eteindre alimentation"
#define MSG_EXTRUDE " Extrusion"
#define MSG_RETRACT " Retractation"
#define MSG_PREHEAT_PLA " Prechauffage PLA"
@ -421,10 +429,9 @@
#define MSG_ZSTEPS " Zpas/mm:"
#define MSG_ESTEPS " Epas/mm:"
#define MSG_MAIN_WIDE " Principal \003"
#define MSG_RECTRACT_WIDE " Rectractater \x7E"
#define MSG_TEMPERATURE_WIDE " Temperature \x7E"
#define MSG_TEMPERATURE_RTN " Temperature \003"
#define MSG_MOTION_WIDE " Mouvement \x7E"
#define MSG_RECTRACT "Rectracter"
#define MSG_TEMPERATURE "Temperature"
#define MSG_MOTION "Mouvement"
#define MSG_CONTRAST "LCD contrast"
#define MSG_STORE_EPROM " Sauvegarder memoire"
#define MSG_LOAD_EPROM " Lire memoire"
@ -443,6 +450,7 @@
#define MSG_NO_CARD " Pas de carte"
#define MSG_DWELL "Repos..."
#define MSG_USERWAIT "Attente de l'utilisateur..."
#define MSG_RESUMING "Reprise de l'impression"
#define MSG_NO_MOVE "Aucun mouvement."
#define MSG_PART_RELEASE "Relache partielle"
#define MSG_KILLED "TUE."
@ -455,6 +463,8 @@
#define MSG_CONTROL_RETRACT_RECOVERF " UnRet F:"
#define MSG_AUTORETRACT " Retract. Auto.:"
#define MSG_FILAMENTCHANGE "Change filament"
#define MSG_INIT_SDCARD "Init. la carte SD"
#define MSG_CNG_SDCARD "Changer de carte SD"
// Serial Console Messages
@ -548,6 +558,8 @@
#define MSG_PREHEAT_ABS "Vorwärmen ABS"
#define MSG_PREHEAT_ABS_SETTINGS "Vorwärmen ABS Einstellungen"
#define MSG_COOLDOWN "Abkühlen"
#define MSG_SWITCH_PS_ON "Switch Power On"
#define MSG_SWITCH_PS_OFF "Switch Power Off"
#define MSG_EXTRUDE "Extrude"
#define MSG_RETRACT "Retract"
#define MSG_MOVE_AXIS "Achsen bewegen"
@ -618,6 +630,8 @@
#define MSG_CONTROL_RETRACT_RECOVERF "UnRet F"
#define MSG_AUTORETRACT "AutoRetr."
#define MSG_FILAMENTCHANGE "Filament wechseln"
#define MSG_INIT_SDCARD "Init. SD-Card"
#define MSG_CNG_SDCARD "Change SD-Card"
// Serial Console Messages
@ -709,6 +723,8 @@
#define MSG_PREHEAT_ABS "Precalentar ABS"
#define MSG_PREHEAT_ABS_SETTINGS "Ajustar temp. ABS"
#define MSG_COOLDOWN "Enfriar"
#define MSG_SWITCH_PS_ON "Switch Power On"
#define MSG_SWITCH_PS_OFF "Switch Power Off"
#define MSG_EXTRUDE "Extruir"
#define MSG_RETRACT "Retraer"
#define MSG_MOVE_AXIS "Mover Ejes"
@ -876,6 +892,8 @@
#define MSG_PREHEAT_ABS " Преднагрев ABS "
#define MSG_PREHEAT_ABS_SETTINGS " Настр. преднагр.ABS"
#define MSG_COOLDOWN " Охлаждение "
#define MSG_SWITCH_PS_ON "Switch Power On"
#define MSG_SWITCH_PS_OFF "Switch Power Off"
#define MSG_EXTRUDE " Экструзия "
#define MSG_RETRACT " Откат"
#define MSG_MOVE_AXIS " Движение по осям \x7E"
@ -932,6 +950,7 @@
#define MSG_NO_CARD " Нет карты"
#define MSG_DWELL "Сон..."
#define MSG_USERWAIT "Нажмите для продолж."
#define MSG_RESUMING "Resuming print"
#define MSG_NO_MOVE "Нет движения. "
#define MSG_PART_RELEASE " Извлечение принта "
#define MSG_KILLED "УБИТО. "
@ -943,6 +962,8 @@
#define MSG_CONTROL_RETRACT_RECOVERF " Возврат F:"
#define MSG_AUTORETRACT " АвтоОткат:"
#define MSG_FILAMENTCHANGE "Change filament"
#define MSG_INIT_SDCARD "Init. SD-Card"
#define MSG_CNG_SDCARD "Change SD-Card"
// Serial Console Messages
@ -1032,6 +1053,8 @@
#define MSG_PREHEAT_ABS "Preriscalda ABS"
#define MSG_PREHEAT_ABS_SETTINGS "Preris. ABS Conf"
#define MSG_COOLDOWN "Raffredda"
#define MSG_SWITCH_PS_ON "Switch Power On"
#define MSG_SWITCH_PS_OFF "Switch Power Off"
#define MSG_EXTRUDE "Estrudi"
#define MSG_RETRACT "Ritrai"
#define MSG_MOVE_AXIS "Muovi Asse"
@ -1193,6 +1216,8 @@
#define MSG_PREHEAT_ABS " pre-aquecer ABS"
#define MSG_PREHEAT_ABS_SETTINGS " pre-aquecer ABS Setting"
#define MSG_COOLDOWN " Esfriar"
#define MSG_SWITCH_PS_ON "Switch Power On"
#define MSG_SWITCH_PS_OFF "Switch Power Off"
#define MSG_EXTRUDE " Extrudar"
#define MSG_RETRACT " Retrair"
#define MSG_PREHEAT_PLA " pre-aquecer PLA"
@ -1234,10 +1259,9 @@
#define MSG_ZSTEPS " Zpasso/mm:"
#define MSG_ESTEPS " Epasso/mm:"
#define MSG_MAIN_WIDE " Menu Principal \003"
#define MSG_RECTRACT_WIDE " Retrair \x7E"
#define MSG_TEMPERATURE_WIDE " Temperatura \x7E"
#define MSG_TEMPERATURE_RTN " Temperatura \003"
#define MSG_MOTION_WIDE " Movimento \x7E"
#define MSG_RECTRACT "Retrair"
#define MSG_TEMPERATURE "Temperatura"
#define MSG_MOTION "Movimento"
#define MSG_STORE_EPROM " Guardar memoria"
#define MSG_LOAD_EPROM " Carregar memoria"
#define MSG_RESTORE_FAILSAFE " Rest. de emergencia"
@ -1255,6 +1279,7 @@
#define MSG_NO_CARD " Sem cartao SD"
#define MSG_DWELL "Repouso..."
#define MSG_USERWAIT "Esperando Ordem..."
#define MSG_RESUMING "Resuming print"
#define MSG_NO_MOVE "Sem movimento."
#define MSG_PART_RELEASE "Lancamento Parcial"
#define MSG_KILLED "PARADA DE EMERGENCIA. "
@ -1268,6 +1293,8 @@
#define MSG_AUTORETRACT " AutoRetr.:"
#define MSG_SERIAL_ERROR_MENU_STRUCTURE "Algo esta errado na estrutura do Menu."
#define MSG_FILAMENTCHANGE "Change filament"
#define MSG_INIT_SDCARD "Init. SD-Card"
#define MSG_CNG_SDCARD "Change SD-Card"
// Serial Console Messages
@ -1363,6 +1390,8 @@
#define MSG_PREHEAT_ABS "Esilammita ABS"
#define MSG_PREHEAT_ABS_SETTINGS "Esilammita ABS konf"
#define MSG_COOLDOWN "Jaahdyta"
#define MSG_SWITCH_PS_ON "Switch Power On"
#define MSG_SWITCH_PS_OFF "Switch Power Off"
#define MSG_EXTRUDE "Pursota"
#define MSG_RETRACT "Veda takaisin"
#define MSG_MOVE_AXIS "Liikuta akseleita"
@ -1430,6 +1459,8 @@
#define MSG_CONTROL_RETRACT_RECOVERF "UnRet F"
#define MSG_AUTORETRACT "AutoVeto."
#define MSG_FILAMENTCHANGE "Change filament"
#define MSG_INIT_SDCARD "Init. SD-Card"
#define MSG_CNG_SDCARD "Change SD-Card"
// Serial Console Messages

View File

@ -298,7 +298,7 @@
* Arduino Mega pin assignment
*
****************************************************************************************/
#if MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 77
#if MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77
#define KNOWN_BOARD 1
//////////////////FIX THIS//////////////
@ -314,7 +314,7 @@
// #define RAMPS_V_1_0
#if MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 77
#if MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77
#define LARGE_FLASH true
@ -392,7 +392,7 @@
#define LED_PIN 13
#endif
#if MOTHERBOARD == 33
#if MOTHERBOARD == 33 || MOTHERBOARD == 35
#define FAN_PIN 9 // (Sprinter config)
#else
#define FAN_PIN 4 // IO pin. Buffer needed
@ -402,6 +402,10 @@
#define FAN_PIN 8
#endif
#if MOTHERBOARD == 35
#define CONTROLLERFAN_PIN 10 //Pin used for the fan to cool controller
#endif
#define PS_ON_PIN 12
#if defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL)
@ -410,12 +414,18 @@
#define KILL_PIN -1
#endif
#if MOTHERBOARD == 35
#define HEATER_0_PIN 8
#else
#define HEATER_0_PIN 10 // EXTRUDER 1
#endif
#if MOTHERBOARD == 33
#define HEATER_1_PIN -1
#else
#define HEATER_1_PIN 9 // EXTRUDER 2 (FAN On Sprinter)
#endif
#define HEATER_2_PIN -1
#if MOTHERBOARD == 77
@ -427,11 +437,16 @@
#define TEMP_0_PIN 13 // ANALOG NUMBERING
#define TEMP_1_PIN 15 // ANALOG NUMBERING
#define TEMP_2_PIN -1 // ANALOG NUMBERING
#if MOTHERBOARD == 35
#define HEATER_BED_PIN -1 // NO BED
#else
#if MOTHERBOARD == 77
#define HEATER_BED_PIN 9 // BED
#else
#define HEATER_BED_PIN 8 // BED
#endif
#endif
#define TEMP_BED_PIN 14 // ANALOG NUMBERING
@ -578,7 +593,7 @@
#define TEMP_2_PIN -1
#define TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
#endif // MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 77
#endif // MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77
// SPI for Max6675 Thermocouple
@ -592,9 +607,7 @@
#define MAX6675_SS 49
#endif
#endif //MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 77
#endif //MOTHERBOARD == 3 || MOTHERBOARD == 33 || MOTHERBOARD == 34 || MOTHERBOARD == 35 || MOTHERBOARD == 77
/****************************************************************************************
* Duemilanove w/ ATMega328P pin assignment

View File

@ -40,6 +40,7 @@ void copy_and_scalePID_d();
/* Different menus */
static void lcd_status_screen();
#ifdef ULTIPANEL
extern bool powersupply;
static void lcd_main_menu();
static void lcd_tune_menu();
static void lcd_prepare_menu();
@ -348,6 +349,14 @@ static void lcd_prepare_menu()
MENU_ITEM(function, MSG_PREHEAT_PLA, lcd_preheat_pla);
MENU_ITEM(function, MSG_PREHEAT_ABS, lcd_preheat_abs);
MENU_ITEM(function, MSG_COOLDOWN, lcd_cooldown);
#if PS_ON_PIN > -1
if (powersupply)
{
MENU_ITEM(gcode, MSG_SWITCH_PS_OFF, PSTR("M81"));
}else{
MENU_ITEM(gcode, MSG_SWITCH_PS_ON, PSTR("M80"));
}
#endif
MENU_ITEM(submenu, MSG_MOVE_AXIS, lcd_move_menu);
END_MENU();
}