merged with upstream and FIXED AGAIN bad translation commit

PLEASE BE MORE CAREFUL WHEN SUBMITTING NEW TRANSLATIONS

When you add new menu items / messages always copy them to ALL
languages (just use english)
This commit is contained in:
stohn 2012-08-22 13:05:42 +02:00
commit 1d224cc031
4 changed files with 363 additions and 23 deletions

View File

@ -6,7 +6,13 @@
#include "temperature.h" #include "temperature.h"
//#include <EEPROM.h> //#include <EEPROM.h>
int plaPreheatHotendTemp;
int plaPreheatHPBTemp;
int plaPreheatFanSpeed;
int absPreheatHotendTemp;
int absPreheatHPBTemp;
int absPreheatFanSpeed;
template <class T> int EEPROM_writeAnything(int &ee, const T& value) template <class T> int EEPROM_writeAnything(int &ee, const T& value)
{ {
@ -38,7 +44,7 @@ template <class T> int EEPROM_readAnything(int &ee, T& value)
// the default values are used whenever there is a change to the data, to prevent // the default values are used whenever there is a change to the data, to prevent
// wrong data being written to the variables. // wrong data being written to the variables.
// ALSO: always make sure the variables in the Store and retrieve sections are in the same order. // ALSO: always make sure the variables in the Store and retrieve sections are in the same order.
#define EEPROM_VERSION "V06" #define EEPROM_VERSION "V07"
inline void EEPROM_StoreSettings() inline void EEPROM_StoreSettings()
{ {
@ -58,6 +64,12 @@ inline void EEPROM_StoreSettings()
EEPROM_writeAnything(i,max_z_jerk); EEPROM_writeAnything(i,max_z_jerk);
EEPROM_writeAnything(i,max_e_jerk); EEPROM_writeAnything(i,max_e_jerk);
EEPROM_writeAnything(i,add_homeing); EEPROM_writeAnything(i,add_homeing);
EEPROM_writeAnything(i,plaPreheatHotendTemp);
EEPROM_writeAnything(i,plaPreheatHPBTemp);
EEPROM_writeAnything(i,plaPreheatFanSpeed);
EEPROM_writeAnything(i,absPreheatHotendTemp);
EEPROM_writeAnything(i,absPreheatHPBTemp);
EEPROM_writeAnything(i,absPreheatFanSpeed);
#ifdef PIDTEMP #ifdef PIDTEMP
EEPROM_writeAnything(i,Kp); EEPROM_writeAnything(i,Kp);
EEPROM_writeAnything(i,Ki); EEPROM_writeAnything(i,Ki);
@ -162,6 +174,12 @@ inline void EEPROM_RetrieveSettings(bool def=false)
EEPROM_readAnything(i,max_z_jerk); EEPROM_readAnything(i,max_z_jerk);
EEPROM_readAnything(i,max_e_jerk); EEPROM_readAnything(i,max_e_jerk);
EEPROM_readAnything(i,add_homeing); EEPROM_readAnything(i,add_homeing);
EEPROM_readAnything(i,plaPreheatHotendTemp);
EEPROM_readAnything(i,plaPreheatHPBTemp);
EEPROM_readAnything(i,plaPreheatFanSpeed);
EEPROM_readAnything(i,absPreheatHotendTemp);
EEPROM_readAnything(i,absPreheatHPBTemp);
EEPROM_readAnything(i,absPreheatFanSpeed);
#ifndef PIDTEMP #ifndef PIDTEMP
float Kp,Ki,Kd; float Kp,Ki,Kd;
#endif #endif
@ -195,6 +213,14 @@ inline void EEPROM_RetrieveSettings(bool def=false)
add_homeing[0] = add_homeing[1] = add_homeing[2] = 0; add_homeing[0] = add_homeing[1] = add_homeing[2] = 0;
SERIAL_ECHO_START; SERIAL_ECHO_START;
SERIAL_ECHOLN("Using Default settings:"); SERIAL_ECHOLN("Using Default settings:");
#ifdef ULTIPANEL
plaPreheatHotendTemp = PLA_PREHEAT_HOTEND_TEMP;
plaPreheatHPBTemp = PLA_PREHEAT_HPB_TEMP;
plaPreheatFanSpeed = PLA_PREHEAT_FAN_SPEED;
absPreheatHotendTemp = ABS_PREHEAT_HOTEND_TEMP;
absPreheatHPBTemp = ABS_PREHEAT_HPB_TEMP;
absPreheatFanSpeed = ABS_PREHEAT_FAN_SPEED;
#endif
} }
#ifdef EEPROM_CHITCHAT #ifdef EEPROM_CHITCHAT
EEPROM_printSettings(); EEPROM_printSettings();

View File

@ -40,6 +40,10 @@
#define MSG_DISABLE_STEPPERS " Disable Steppers" #define MSG_DISABLE_STEPPERS " Disable Steppers"
#define MSG_AUTO_HOME " Auto Home" #define MSG_AUTO_HOME " Auto Home"
#define MSG_SET_ORIGIN " Set Origin" #define MSG_SET_ORIGIN " Set Origin"
#define MSG_PREHEAT_PLA " Preheat PLA"
#define MSG_PREHEAT_PLA_SETTINGS " Preheat PLA Setting"
#define MSG_PREHEAT_ABS " Preheat ABS"
#define MSG_PREHEAT_ABS_SETTINGS " Preheat ABS Setting"
#define MSG_COOLDOWN " Cooldown" #define MSG_COOLDOWN " Cooldown"
#define MSG_EXTRUDE " Extrude" #define MSG_EXTRUDE " Extrude"
#define MSG_RETRACT " Retract" #define MSG_RETRACT " Retract"
@ -82,6 +86,7 @@
#define MSG_MAIN_WIDE " Main \003" #define MSG_MAIN_WIDE " Main \003"
#define MSG_RECTRACT_WIDE " Rectract \x7E" #define MSG_RECTRACT_WIDE " Rectract \x7E"
#define MSG_TEMPERATURE_WIDE " Temperature \x7E" #define MSG_TEMPERATURE_WIDE " Temperature \x7E"
#define MSG_TEMPERATURE_RTN " Temperature \003"
#define MSG_MOTION_WIDE " Motion \x7E" #define MSG_MOTION_WIDE " Motion \x7E"
#define MSG_STORE_EPROM " Store memory" #define MSG_STORE_EPROM " Store memory"
#define MSG_LOAD_EPROM " Load memory" #define MSG_LOAD_EPROM " Load memory"
@ -194,7 +199,9 @@
#define MSG_AUTO_HOME " Auto Nullpunkt" #define MSG_AUTO_HOME " Auto Nullpunkt"
#define MSG_SET_ORIGIN " Setze Nullpunkt" #define MSG_SET_ORIGIN " Setze Nullpunkt"
#define MSG_PREHEAT_PLA " Vorwärmen PLA" #define MSG_PREHEAT_PLA " Vorwärmen PLA"
#define MSG_PREHEAT_PLA_SETTINGS " Vorwärmen PLA Einstellungen"
#define MSG_PREHEAT_ABS " Vorwärmen ABS" #define MSG_PREHEAT_ABS " Vorwärmen ABS"
#define MSG_PREHEAT_ABS_SETTINGS " Vorwärmen ABS Einstellungen"
#define MSG_COOLDOWN " Abkühlen" #define MSG_COOLDOWN " Abkühlen"
#define MSG_EXTRUDE " Extrude" #define MSG_EXTRUDE " Extrude"
#define MSG_RETRACT " Retract" #define MSG_RETRACT " Retract"
@ -236,6 +243,7 @@
#define MSG_RECTRACT_WIDE " Rectract \x7E" #define MSG_RECTRACT_WIDE " Rectract \x7E"
#define MSG_WATCH " Beobachten \003" #define MSG_WATCH " Beobachten \003"
#define MSG_TEMPERATURE_WIDE " Temperatur \x7E" #define MSG_TEMPERATURE_WIDE " Temperatur \x7E"
#define MSG_TEMPERATURE_RTN " Temperatur \003"
#define MSG_MOTION_WIDE " Bewegung \x7E" #define MSG_MOTION_WIDE " Bewegung \x7E"
#define MSG_STORE_EPROM " EPROM speichern" #define MSG_STORE_EPROM " EPROM speichern"
#define MSG_LOAD_EPROM " EPROM laden" #define MSG_LOAD_EPROM " EPROM laden"
@ -348,7 +356,9 @@
#define MSG_EXTRUDE " Extruir" #define MSG_EXTRUDE " Extruir"
#define MSG_RETRACT " Retract" #define MSG_RETRACT " Retract"
#define MSG_PREHEAT_PLA " Precalentar PLA" #define MSG_PREHEAT_PLA " Precalentar PLA"
#define MSG_PREHEAT_PLA_SETTINGS " Precalentar PLA Setting"
#define MSG_PREHEAT_ABS " Precalentar ABS" #define MSG_PREHEAT_ABS " Precalentar ABS"
#define MSG_PREHEAT_ABS_SETTINGS " Precalentar ABS Setting"
#define MSG_MOVE_AXIS " Mover Ejes \x7E" #define MSG_MOVE_AXIS " Mover Ejes \x7E"
#define MSG_SPEED " Velocidad:" #define MSG_SPEED " Velocidad:"
#define MSG_NOZZLE " \002Nozzle:" #define MSG_NOZZLE " \002Nozzle:"
@ -386,6 +396,7 @@
#define MSG_MAIN_WIDE " Menu Principal \003" #define MSG_MAIN_WIDE " Menu Principal \003"
#define MSG_RECTRACT_WIDE " Retraer \x7E" #define MSG_RECTRACT_WIDE " Retraer \x7E"
#define MSG_TEMPERATURE_WIDE " Temperatura \x7E" #define MSG_TEMPERATURE_WIDE " Temperatura \x7E"
#define MSG_TEMPERATURE_RTN " Temperatura \003"
#define MSG_MOTION_WIDE " Movimiento \x7E" #define MSG_MOTION_WIDE " Movimiento \x7E"
#define MSG_STORE_EPROM " Guardar Memoria" #define MSG_STORE_EPROM " Guardar Memoria"
#define MSG_LOAD_EPROM " Cargar Memoria" #define MSG_LOAD_EPROM " Cargar Memoria"
@ -402,15 +413,12 @@
#define MSG_STOP_PRINT " Detener Impresion \x7E" #define MSG_STOP_PRINT " Detener Impresion \x7E"
#define MSG_CARD_MENU " Menu de SD \x7E" #define MSG_CARD_MENU " Menu de SD \x7E"
#define MSG_NO_CARD " No hay Tarjeta SD" #define MSG_NO_CARD " No hay Tarjeta SD"
#define MSG_SERIAL_ERROR_MENU_STRUCTURE "Hay un error en la estructura del menu"
#define MSG_DWELL "Reposo..." #define MSG_DWELL "Reposo..."
#define MSG_USERWAIT "Esperando Ordenes..." #define MSG_USERWAIT "Esperando Ordenes..."
#define MSG_NO_MOVE "Sin movimiento" #define MSG_NO_MOVE "Sin movimiento"
#define MSG_PART_RELEASE "Desacople Parcial" #define MSG_PART_RELEASE "Desacople Parcial"
#define MSG_KILLED "PARADA DE EMERGENCIA. " #define MSG_KILLED "PARADA DE EMERGENCIA. "
#define MSG_STOPPED "PARADA. " #define MSG_STOPPED "PARADA. "
#define MSG_PREHEAT_PLA " Precalentar PLA"
#define MSG_PREHEAT_ABS " Precalentar ABS"
#define MSG_STEPPER_RELEASED "Desacoplada." #define MSG_STEPPER_RELEASED "Desacoplada."
#define MSG_CONTROL_RETRACT " Retraer mm:" #define MSG_CONTROL_RETRACT " Retraer mm:"
#define MSG_CONTROL_RETRACTF " Retraer F:" #define MSG_CONTROL_RETRACTF " Retraer F:"
@ -418,6 +426,7 @@
#define MSG_CONTROL_RETRACT_RECOVER " DesRet +mm:" #define MSG_CONTROL_RETRACT_RECOVER " DesRet +mm:"
#define MSG_CONTROL_RETRACT_RECOVERF " DesRet F:" #define MSG_CONTROL_RETRACT_RECOVERF " DesRet F:"
#define MSG_AUTORETRACT " AutoRetr.:" #define MSG_AUTORETRACT " AutoRetr.:"
#define MSG_SERIAL_ERROR_MENU_STRUCTURE "Hay un error en la estructura del menu"
// Serial Console Messages // Serial Console Messages

View File

@ -47,11 +47,13 @@
#endif #endif
// blocking time for recognizing a new keypress of one key, ms // blocking time for recognizing a new keypress of one key, ms
#define blocktime 500 #define blocktime 500
#define lcdslow 5 #define lcdslow 5
enum MainStatus{Main_Status, Main_Menu, Main_Prepare,Sub_PrepareMove, Main_Control, Main_SD,Sub_TempControl,Sub_MotionControl,Sub_RetractControl}; enum MainStatus{Main_Status, Main_Menu, Main_Prepare,Sub_PrepareMove, Main_Control, Main_SD,Sub_TempControl,Sub_MotionControl,Sub_RetractControl, Sub_PreheatPLASettings, Sub_PreheatABSSettings};
class MainMenu{ class MainMenu{
public: public:
@ -71,6 +73,8 @@
void showControlRetract(); void showControlRetract();
void showAxisMove(); void showAxisMove();
void showSD(); void showSD();
void showPLAsettings();
void showABSsettings();
bool force_lcd_update; bool force_lcd_update;
long lastencoderpos; long lastencoderpos;
int8_t lineoffset; int8_t lineoffset;

View File

@ -534,17 +534,17 @@ void MainMenu::showPrepare()
MENUITEM( lcdprintPGM(MSG_SET_ORIGIN) , BLOCK;enquecommand("G92 X0 Y0 Z0");beepshort(); ) ; MENUITEM( lcdprintPGM(MSG_SET_ORIGIN) , BLOCK;enquecommand("G92 X0 Y0 Z0");beepshort(); ) ;
break; break;
case ItemP_preheat_pla: case ItemP_preheat_pla:
MENUITEM( lcdprintPGM(MSG_PREHEAT_PLA) , BLOCK;setTargetHotend0(PLA_PREHEAT_HOTEND_TEMP);setTargetBed(PLA_PREHEAT_HPB_TEMP); MENUITEM( lcdprintPGM(MSG_PREHEAT_PLA) , BLOCK;setTargetHotend0(plaPreheatHotendTemp);setTargetBed(plaPreheatHPBTemp);
#if FAN_PIN > -1 #if FAN_PIN > -1
FanSpeed=PLA_PREHEAT_FAN_SPEED; FanSpeed = plaPreheatFanSpeed;
analogWrite(FAN_PIN, FanSpeed); analogWrite(FAN_PIN, FanSpeed);
#endif #endif
beepshort(); ); beepshort(); );
break; break;
case ItemP_preheat_abs: case ItemP_preheat_abs:
MENUITEM( lcdprintPGM(MSG_PREHEAT_ABS) , BLOCK;setTargetHotend0(ABS_PREHEAT_HOTEND_TEMP);setTargetBed(ABS_PREHEAT_HPB_TEMP); MENUITEM( lcdprintPGM(MSG_PREHEAT_ABS) , BLOCK;setTargetHotend0(absPreheatHotendTemp);setTargetBed(absPreheatHPBTemp);
#if FAN_PIN > -1 #if FAN_PIN > -1
FanSpeed=ABS_PREHEAT_FAN_SPEED; FanSpeed = absPreheatFanSpeed;
analogWrite(FAN_PIN, FanSpeed); analogWrite(FAN_PIN, FanSpeed);
#endif #endif
beepshort(); ); beepshort(); );
@ -973,7 +973,9 @@ enum {
ItemCT_bed, ItemCT_bed,
#endif #endif
ItemCT_fan, ItemCT_fan,
ItemCT_PID_P,ItemCT_PID_I,ItemCT_PID_D,ItemCT_PID_C ItemCT_PID_P,ItemCT_PID_I,ItemCT_PID_D,ItemCT_PID_C,
ItemCT_PLA_PreHeat_Setting,
ItemCT_ABS_PreHeat_Setting,
}; };
void MainMenu::showControlTemp() void MainMenu::showControlTemp()
@ -1440,16 +1442,19 @@ void MainMenu::showControlTemp()
#endif #endif
#endif #endif
break; break;
case ItemCT_PLA_PreHeat_Setting:
MENUITEM( lcdprintPGM(MSG_PREHEAT_PLA_SETTINGS) , BLOCK;status=Sub_PreheatPLASettings;beepshort(); ) ;
break;
case ItemCT_ABS_PreHeat_Setting:
MENUITEM( lcdprintPGM(MSG_PREHEAT_ABS_SETTINGS) , BLOCK;status=Sub_PreheatABSSettings;beepshort(); ) ;
break;
default: default:
break; break;
} }
line++; line++;
} }
#ifdef PID_ADD_EXTRUSION_RATE
updateActiveLines(ItemCT_PID_C,encoderpos); updateActiveLines(ItemCT_ABS_PreHeat_Setting,encoderpos);
#else
updateActiveLines(ItemCT_PID_D,encoderpos);
#endif
} }
@ -2575,6 +2580,14 @@ void MainMenu::update()
{ {
showSD(); showSD();
}break; }break;
case Sub_PreheatPLASettings:
{
showPLAsettings();
}break;
case Sub_PreheatABSSettings:
{
showABSsettings();
}break;
} }
if(timeoutToStatus<millis()) if(timeoutToStatus<millis())
@ -2583,11 +2596,299 @@ void MainMenu::update()
lastencoderpos=encoderpos; lastencoderpos=encoderpos;
} }
enum {
ItemPLAPreHeat_Exit,
ItemPLAPreHeat_set_PLA_FanSpeed,
ItemPLAPreHeat_set_nozzle,
ItemPLAPreHeat_set_HPB,
ItemPLAPreHeat_Store_Eprom
};
void MainMenu::showPLAsettings()
{
#ifdef ULTIPANEL
uint8_t line=0;
clearIfNecessary();
for(int8_t i=lineoffset;i<lineoffset+LCD_HEIGHT;i++)
{
switch(i)
{
case ItemPLAPreHeat_Exit:
MENUITEM( lcdprintPGM(MSG_TEMPERATURE_RTN) , BLOCK;status=Sub_TempControl;beepshort(); ) ;
break;
case ItemPLAPreHeat_set_PLA_FanSpeed:
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(MSG_FAN_SPEED);
lcd.setCursor(13,line);lcd.print(ftostr3(plaPreheatFanSpeed));
}
if((activeline!=line) )
break;
if(CLICKED)
{
linechanging=!linechanging;
if(linechanging)
{
encoderpos=plaPreheatFanSpeed;
}
else
{
encoderpos=activeline*lcdslow;
beepshort();
}
BLOCK;
}
if(linechanging)
{
if(encoderpos<0) encoderpos=0;
if(encoderpos>255) encoderpos=255;
plaPreheatFanSpeed=encoderpos;
lcd.setCursor(13,line);lcd.print(itostr3(encoderpos));
}
}break;
case ItemPLAPreHeat_set_nozzle:
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(MSG_NOZZLE);
lcd.setCursor(13,line);lcd.print(ftostr3(plaPreheatHotendTemp));
}
if((activeline!=line) )
break;
if(CLICKED)
{
linechanging=!linechanging;
if(linechanging)
{
encoderpos=plaPreheatHotendTemp;
}
else
{
encoderpos=activeline*lcdslow;
beepshort();
}
BLOCK;
}
if(linechanging)
{
if(encoderpos<0) encoderpos=0;
if(encoderpos>260) encoderpos=260;
plaPreheatHotendTemp = encoderpos;
lcd.setCursor(13,line);lcd.print(itostr3(encoderpos));
}
}break;
case ItemPLAPreHeat_set_HPB:
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(MSG_BED);
lcd.setCursor(13,line);lcd.print(ftostr3(plaPreheatHPBTemp));
}
if((activeline!=line) )
break;
if(CLICKED)
{
linechanging=!linechanging;
if(linechanging)
{
encoderpos=plaPreheatHPBTemp;
}
else
{
encoderpos=activeline*lcdslow;
beepshort();
}
BLOCK;
}
if(linechanging)
{
if(encoderpos<0) encoderpos=0;
if(encoderpos>250) encoderpos=150;
plaPreheatHPBTemp = encoderpos;
lcd.setCursor(13,line);lcd.print(itostr3(encoderpos));
}
}break;
case ItemPLAPreHeat_Store_Eprom:
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(MSG_STORE_EPROM);
}
if((activeline==line) && CLICKED)
{
//enquecommand("M84");
beepshort();
BLOCK;
EEPROM_StoreSettings();
}
}break;
default:
break;
}
line++;
}
updateActiveLines(ItemPLAPreHeat_Store_Eprom,encoderpos);
#endif
}
enum {
ItemABSPreHeat_Exit,
ItemABSPreHeat_set_FanSpeed,
ItemABSPreHeat_set_nozzle,
ItemABSPreHeat_set_HPB,
ItemABSPreHeat_Store_Eprom
};
void MainMenu::showABSsettings()
{
#ifdef ULTIPANEL
uint8_t line=0;
clearIfNecessary();
for(int8_t i=lineoffset;i<lineoffset+LCD_HEIGHT;i++)
{
switch(i)
{
case ItemABSPreHeat_Exit:
MENUITEM( lcdprintPGM(MSG_TEMPERATURE_RTN) , BLOCK;status=Sub_TempControl;beepshort(); ) ;
break;
case ItemABSPreHeat_set_FanSpeed:
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(MSG_FAN_SPEED);
lcd.setCursor(13,line);lcd.print(ftostr3(absPreheatFanSpeed));
}
if((activeline!=line) )
break;
if(CLICKED)
{
linechanging=!linechanging;
if(linechanging)
{
encoderpos=absPreheatFanSpeed;
}
else
{
encoderpos=activeline*lcdslow;
beepshort();
}
BLOCK;
}
if(linechanging)
{
if(encoderpos<0) encoderpos=0;
if(encoderpos>255) encoderpos=255;
absPreheatFanSpeed=encoderpos;
lcd.setCursor(13,line);lcd.print(itostr3(encoderpos));
}
}break;
case ItemABSPreHeat_set_nozzle:
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(MSG_NOZZLE);
lcd.setCursor(13,line);lcd.print(ftostr3(absPreheatHotendTemp));
}
if((activeline!=line) )
break;
if(CLICKED)
{
linechanging=!linechanging;
if(linechanging)
{
encoderpos=absPreheatHotendTemp;
}
else
{
encoderpos=activeline*lcdslow;
beepshort();
}
BLOCK;
}
if(linechanging)
{
if(encoderpos<0) encoderpos=0;
if(encoderpos>260) encoderpos=260;
absPreheatHotendTemp = encoderpos;
lcd.setCursor(13,line);lcd.print(itostr3(encoderpos));
}
}break;
case ItemABSPreHeat_set_HPB:
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(MSG_BED);
lcd.setCursor(13,line);lcd.print(ftostr3(absPreheatHPBTemp));
}
if((activeline!=line) )
break;
if(CLICKED)
{
linechanging=!linechanging;
if(linechanging)
{
encoderpos=absPreheatHPBTemp;
}
else
{
encoderpos=activeline*lcdslow;
beepshort();
}
BLOCK;
}
if(linechanging)
{
if(encoderpos<0) encoderpos=0;
if(encoderpos>250) encoderpos=150;
absPreheatHPBTemp = encoderpos;
lcd.setCursor(13,line);lcd.print(itostr3(encoderpos));
}
}break;
case ItemABSPreHeat_Store_Eprom:
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(MSG_STORE_EPROM);
}
if((activeline==line) && CLICKED)
{
//enquecommand("M84");
beepshort();
BLOCK;
EEPROM_StoreSettings();
}
}break;
default:
break;
}
line++;
}
updateActiveLines(ItemABSPreHeat_Store_Eprom,encoderpos);
#endif
}
//**********************************************************************************************************
// convert float to string with +123.4 format // convert float to string with +123.4 format
char *ftostr3(const float &x) char *ftostr3(const float &x)
{ {