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 // 3 = MEGA/RAMPS up to 1.2 = 3
// 33 = RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Bed) // 33 = RAMPS 1.3 / 1.4 (Power outputs: Extruder, Fan, Bed)
// 34 = RAMPS 1.3 / 1.4 (Power outputs: Extruder0, Extruder1, 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 // 4 = Duemilanove w/ ATMega328P pin assignment
// 5 = Gen6 // 5 = Gen6
// 51 = Gen6 deluxe // 51 = Gen6 deluxe

View File

@ -194,6 +194,10 @@ int EtoPPressure=0;
float retract_recover_length=0, retract_recover_feedrate=8*60; float retract_recover_length=0, retract_recover_feedrate=8*60;
#endif #endif
#ifdef ULTIPANEL
bool powersupply = true;
#endif
//=========================================================================== //===========================================================================
//=============================private variables============================= //=============================private variables=============================
//=========================================================================== //===========================================================================
@ -1390,20 +1394,37 @@ void process_commands()
#endif #endif
#if defined(PS_ON_PIN) && PS_ON_PIN > -1 #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 SET_OUTPUT(PS_ON_PIN); //GND
WRITE(PS_ON_PIN, PS_ON_AWAKE); WRITE(PS_ON_PIN, PS_ON_AWAKE);
#ifdef ULTIPANEL
powersupply = true;
LCD_MESSAGEPGM(WELCOME_MSG);
lcd_update();
#endif
break; break;
#endif #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 #if defined(SUICIDE_PIN) && SUICIDE_PIN > -1
st_synchronize(); st_synchronize();
suicide(); suicide();
#elif defined(PS_ON_PIN) && PS_ON_PIN > -1 #elif defined(PS_ON_PIN) && PS_ON_PIN > -1
SET_OUTPUT(PS_ON_PIN); SET_OUTPUT(PS_ON_PIN);
WRITE(PS_ON_PIN, PS_ON_ASLEEP); WRITE(PS_ON_PIN, PS_ON_ASLEEP);
#endif
#ifdef ULTIPANEL
powersupply = false;
LCD_MESSAGEPGM(MACHINE_NAME" "MSG_OFF".");
lcd_update();
#endif #endif
break; break;

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -40,6 +40,7 @@ void copy_and_scalePID_d();
/* Different menus */ /* Different menus */
static void lcd_status_screen(); static void lcd_status_screen();
#ifdef ULTIPANEL #ifdef ULTIPANEL
extern bool powersupply;
static void lcd_main_menu(); static void lcd_main_menu();
static void lcd_tune_menu(); static void lcd_tune_menu();
static void lcd_prepare_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_PLA, lcd_preheat_pla);
MENU_ITEM(function, MSG_PREHEAT_ABS, lcd_preheat_abs); MENU_ITEM(function, MSG_PREHEAT_ABS, lcd_preheat_abs);
MENU_ITEM(function, MSG_COOLDOWN, lcd_cooldown); 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); MENU_ITEM(submenu, MSG_MOVE_AXIS, lcd_move_menu);
END_MENU(); END_MENU();
} }