@ -6,11 +6,7 @@
# include "language.h"
# include "language.h"
# include "temperature.h"
# include "temperature.h"
# include "EEPROMwrite.h"
# include "EEPROMwrite.h"
# if LANGUAGE_CHOICE == 6
# include "LiquidCrystalRus.h"
# else
# include <LiquidCrystal.h>
# endif
//===========================================================================
//===========================================================================
//=============================imported variables============================
//=============================imported variables============================
//===========================================================================
//===========================================================================
@ -33,6 +29,14 @@ volatile char buttons=0; //the last checked buttons in a bit array.
long encoderpos = 0 ;
long encoderpos = 0 ;
short lastenc = 0 ;
short lastenc = 0 ;
//TODO: This should be in a preferences file.
int plaPreheatHotendTemp ;
int plaPreheatHPBTemp ;
int plaPreheatFanSpeed ;
int absPreheatHotendTemp ;
int absPreheatHPBTemp ;
int absPreheatFanSpeed ;
//===========================================================================
//===========================================================================
//=============================private variables============================
//=============================private variables============================
@ -42,11 +46,7 @@ static char messagetext[LCD_WIDTH]="";
//return for string conversion routines
//return for string conversion routines
static char conv [ 8 ] ;
static char conv [ 8 ] ;
# if LANGUAGE_CHOICE == 6
LCD_CLASS lcd ( LCD_PINS_RS , LCD_PINS_ENABLE , LCD_PINS_D4 , LCD_PINS_D5 , LCD_PINS_D6 , LCD_PINS_D7 ) ; //RS,Enable,D4,D5,D6,D7
LiquidCrystalRus lcd ( LCD_PINS_RS , LCD_PINS_ENABLE , LCD_PINS_D4 , LCD_PINS_D5 , LCD_PINS_D6 , LCD_PINS_D7 ) ; //RS,Enable,D4,D5,D6,D7
# else
LiquidCrystal lcd ( LCD_PINS_RS , LCD_PINS_ENABLE , LCD_PINS_D4 , LCD_PINS_D5 , LCD_PINS_D6 , LCD_PINS_D7 ) ; //RS,Enable,D4,D5,D6,D7
# endif
static unsigned long previous_millis_lcd = 0 ;
static unsigned long previous_millis_lcd = 0 ;
//static long previous_millis_buttons=0;
//static long previous_millis_buttons=0;
@ -70,7 +70,7 @@ void lcdProgMemprint(const char *str)
ch = pgm_read_byte ( + + str ) ;
ch = pgm_read_byte ( + + str ) ;
}
}
}
}
# define lcdprintPGM(x) lcdProgMemprint(MYPGM (x))
# define LCD_PRINT_PGM(x) lcdProgMemprint(PSTR (x))
//===========================================================================
//===========================================================================
@ -366,11 +366,11 @@ void MainMenu::showStatus()
{
{
encoderpos = feedmultiply ;
encoderpos = feedmultiply ;
clear ( ) ;
clear ( ) ;
lcd . setCursor ( 0 , 0 ) ; lcdprint PGM( " \002 000/000 \001 " ) ;
lcd . setCursor ( 0 , 0 ) ; LCD_PRINT_ PGM( " \002 000/000 \001 " ) ;
# if defined BED_USES_THERMISTOR || defined BED_USES_AD595
# if defined BED_USES_THERMISTOR || defined BED_USES_AD595
lcd . setCursor ( 10 , 0 ) ; lcdprint PGM( " B000/000 \001 " ) ;
lcd . setCursor ( 10 , 0 ) ; LCD_PRINT_ PGM( " B000/000 \001 " ) ;
# elif EXTRUDERS > 1
# elif EXTRUDERS > 1
lcd . setCursor ( 10 , 0 ) ; lcdprint PGM( " \002 000/000 \001 " ) ;
lcd . setCursor ( 10 , 0 ) ; LCD_PRINT_ PGM( " \002 000/000 \001 " ) ;
# endif
# endif
}
}
@ -432,7 +432,7 @@ void MainMenu::showStatus()
if ( starttime ! = oldtime )
if ( starttime ! = oldtime )
{
{
lcd . print ( itostr2 ( time / 60 ) ) ; lcdprint PGM( " h " ) ; lcd . print ( itostr2 ( time % 60 ) ) ; lcdprint PGM( " m " ) ;
lcd . print ( itostr2 ( time / 60 ) ) ; LCD_PRINT_ PGM( " h " ) ; lcd . print ( itostr2 ( time % 60 ) ) ; LCD_PRINT_ PGM( " m " ) ;
oldtime = time ;
oldtime = time ;
}
}
}
}
@ -441,7 +441,7 @@ void MainMenu::showStatus()
if ( ( currentz ! = oldzpos ) | | force_lcd_update )
if ( ( currentz ! = oldzpos ) | | force_lcd_update )
{
{
lcd . setCursor ( 10 , 1 ) ;
lcd . setCursor ( 10 , 1 ) ;
lcdprint PGM( " Z: " ) ; lcd . print ( ftostr52 ( current_position [ 2 ] ) ) ;
LCD_PRINT_ PGM( " Z: " ) ; lcd . print ( ftostr52 ( current_position [ 2 ] ) ) ;
oldzpos = currentz ;
oldzpos = currentz ;
}
}
@ -468,7 +468,7 @@ void MainMenu::showStatus()
{
{
oldfeedmultiply = curfeedmultiply ;
oldfeedmultiply = curfeedmultiply ;
lcd . setCursor ( 0 , 2 ) ;
lcd . setCursor ( 0 , 2 ) ;
lcd . print ( itostr3 ( curfeedmultiply ) ) ; lcdprint PGM( " % " ) ;
lcd . print ( itostr3 ( curfeedmultiply ) ) ; LCD_PRINT_ PGM( " % " ) ;
}
}
if ( messagetext [ 0 ] ! = ' \0 ' )
if ( messagetext [ 0 ] ! = ' \0 ' )
@ -487,7 +487,7 @@ void MainMenu::showStatus()
{
{
lcd . setCursor ( 10 , 2 ) ;
lcd . setCursor ( 10 , 2 ) ;
lcd . print ( itostr3 ( ( int ) percent ) ) ;
lcd . print ( itostr3 ( ( int ) percent ) ) ;
lcdprint PGM( " %SD " ) ;
LCD_PRINT_ PGM( " %SD " ) ;
}
}
# endif
# endif
# else //smaller LCDS----------------------------------
# else //smaller LCDS----------------------------------
@ -496,7 +496,7 @@ void MainMenu::showStatus()
if ( force_lcd_update ) //initial display of content
if ( force_lcd_update ) //initial display of content
{
{
encoderpos = feedmultiply ;
encoderpos = feedmultiply ;
lcd . setCursor ( 0 , 0 ) ; lcdprint PGM( " \002 ---/--- \001 " ) ;
lcd . setCursor ( 0 , 0 ) ; LCD_PRINT_ PGM( " \002 ---/--- \001 " ) ;
}
}
int tHotEnd0 = intround ( degHotend0 ( ) ) ;
int tHotEnd0 = intround ( degHotend0 ( ) ) ;
@ -550,26 +550,26 @@ void MainMenu::showPrepare()
switch ( i )
switch ( i )
{
{
case ItemP_exit :
case ItemP_exit :
MENUITEM ( lcdprint PGM( MSG_MAIN ) , BLOCK ; status = Main_Menu ; beepshort ( ) ; ) ;
MENUITEM ( LCD_PRINT_ PGM( MSG_MAIN ) , BLOCK ; status = Main_Menu ; beepshort ( ) ; ) ;
break ;
break ;
case ItemP_autostart :
case ItemP_autostart :
MENUITEM ( lcdprint PGM( MSG_AUTOSTART ) , BLOCK ;
MENUITEM ( LCD_PRINT_ PGM( MSG_AUTOSTART ) , BLOCK ;
# ifdef SDSUPPORT
# ifdef SDSUPPORT
card . lastnr = 0 ; card . setroot ( ) ; card . checkautostart ( true ) ;
card . lastnr = 0 ; card . setroot ( ) ; card . checkautostart ( true ) ;
# endif
# endif
beepshort ( ) ; ) ;
beepshort ( ) ; ) ;
break ;
break ;
case ItemP_disstep :
case ItemP_disstep :
MENUITEM ( lcdprint PGM( MSG_DISABLE_STEPPERS ) , BLOCK ; enquecommand ( " M84 " ) ; beepshort ( ) ; ) ;
MENUITEM ( LCD_PRINT_ PGM( MSG_DISABLE_STEPPERS ) , BLOCK ; enquecommand ( " M84 " ) ; beepshort ( ) ; ) ;
break ;
break ;
case ItemP_home :
case ItemP_home :
MENUITEM ( lcdprint PGM( MSG_AUTO_HOME ) , BLOCK ; enquecommand ( " G28 " ) ; beepshort ( ) ; ) ;
MENUITEM ( LCD_PRINT_ PGM( MSG_AUTO_HOME ) , BLOCK ; enquecommand ( " G28 " ) ; beepshort ( ) ; ) ;
break ;
break ;
case ItemP_origin :
case ItemP_origin :
MENUITEM ( lcdprint PGM( MSG_SET_ORIGIN ) , BLOCK ; enquecommand ( " G92 X0 Y0 Z0 " ) ; beepshort ( ) ; ) ;
MENUITEM ( LCD_PRINT_ PGM( MSG_SET_ORIGIN ) , BLOCK ; enquecommand ( " G92 X0 Y0 Z0 " ) ; beepshort ( ) ; ) ;
break ;
break ;
case ItemP_preheat_pla :
case ItemP_preheat_pla :
MENUITEM ( lcdprint PGM( MSG_PREHEAT_PLA ) , BLOCK ; setTargetHotend0 ( plaPreheatHotendTemp ) ; setTargetBed ( plaPreheatHPBTemp ) ;
MENUITEM ( LCD_PRINT_ PGM( MSG_PREHEAT_PLA ) , BLOCK ; setTargetHotend0 ( plaPreheatHotendTemp ) ; setTargetBed ( plaPreheatHPBTemp ) ;
# if FAN_PIN > -1
# if FAN_PIN > -1
FanSpeed = plaPreheatFanSpeed ;
FanSpeed = plaPreheatFanSpeed ;
analogWrite ( FAN_PIN , FanSpeed ) ;
analogWrite ( FAN_PIN , FanSpeed ) ;
@ -577,7 +577,7 @@ void MainMenu::showPrepare()
beepshort ( ) ; ) ;
beepshort ( ) ; ) ;
break ;
break ;
case ItemP_preheat_abs :
case ItemP_preheat_abs :
MENUITEM ( lcdprint PGM( MSG_PREHEAT_ABS ) , BLOCK ; setTargetHotend0 ( absPreheatHotendTemp ) ; setTargetBed ( absPreheatHPBTemp ) ;
MENUITEM ( LCD_PRINT_ PGM( MSG_PREHEAT_ABS ) , BLOCK ; setTargetHotend0 ( absPreheatHotendTemp ) ; setTargetBed ( absPreheatHPBTemp ) ;
# if FAN_PIN > -1
# if FAN_PIN > -1
FanSpeed = absPreheatFanSpeed ;
FanSpeed = absPreheatFanSpeed ;
analogWrite ( FAN_PIN , FanSpeed ) ;
analogWrite ( FAN_PIN , FanSpeed ) ;
@ -585,13 +585,13 @@ void MainMenu::showPrepare()
beepshort ( ) ; ) ;
beepshort ( ) ; ) ;
break ;
break ;
case ItemP_cooldown :
case ItemP_cooldown :
MENUITEM ( lcdprint PGM( MSG_COOLDOWN ) , BLOCK ; setTargetHotend0 ( 0 ) ; setTargetHotend1 ( 0 ) ; setTargetHotend2 ( 0 ) ; setTargetBed ( 0 ) ; beepshort ( ) ; ) ;
MENUITEM ( LCD_PRINT_ PGM( MSG_COOLDOWN ) , BLOCK ; setTargetHotend0 ( 0 ) ; setTargetHotend1 ( 0 ) ; setTargetHotend2 ( 0 ) ; setTargetBed ( 0 ) ; beepshort ( ) ; ) ;
break ;
break ;
// case ItemP_extrude:
// case ItemP_extrude:
// MENUITEM( lcdprint PGM(" Extrude") , BLOCK;enquecommand("G92 E0");enquecommand("G1 F700 E50");beepshort(); ) ;
// MENUITEM( LCD_PRINT_ PGM(" Extrude") , BLOCK;enquecommand("G92 E0");enquecommand("G1 F700 E50");beepshort(); ) ;
// break;
// break;
case ItemP_move :
case ItemP_move :
MENUITEM ( lcdprint PGM( MSG_MOVE_AXIS ) , BLOCK ; status = Sub_PrepareMove ; beepshort ( ) ; ) ;
MENUITEM ( LCD_PRINT_ PGM( MSG_MOVE_AXIS ) , BLOCK ; status = Sub_PrepareMove ; beepshort ( ) ; ) ;
break ;
break ;
default :
default :
break ;
break ;
@ -617,14 +617,14 @@ void MainMenu::showAxisMove()
switch ( i )
switch ( i )
{
{
case ItemAM_exit :
case ItemAM_exit :
MENUITEM ( lcdprint PGM( MSG_PREPARE_ALT ) , BLOCK ; status = Main_Prepare ; beepshort ( ) ; ) ;
MENUITEM ( LCD_PRINT_ PGM( MSG_PREPARE_ALT ) , BLOCK ; status = Main_Prepare ; beepshort ( ) ; ) ;
break ;
break ;
case ItemAM_X :
case ItemAM_X :
{
{
//oldencoderpos=0;
//oldencoderpos=0;
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( " X: " ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( " X: " ) ;
lcd . setCursor ( 11 , line ) ; lcd . print ( ftostr52 ( current_position [ X_AXIS ] ) ) ;
lcd . setCursor ( 11 , line ) ; lcd . print ( ftostr52 ( current_position [ X_AXIS ] ) ) ;
}
}
@ -669,7 +669,7 @@ void MainMenu::showAxisMove()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( " Y: " ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( " Y: " ) ;
lcd . setCursor ( 11 , line ) ; lcd . print ( ftostr52 ( current_position [ Y_AXIS ] ) ) ;
lcd . setCursor ( 11 , line ) ; lcd . print ( ftostr52 ( current_position [ Y_AXIS ] ) ) ;
}
}
@ -714,7 +714,7 @@ void MainMenu::showAxisMove()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( " Z: " ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( " Z: " ) ;
lcd . setCursor ( 11 , line ) ; lcd . print ( ftostr52 ( current_position [ Z_AXIS ] ) ) ;
lcd . setCursor ( 11 , line ) ; lcd . print ( ftostr52 ( current_position [ Z_AXIS ] ) ) ;
}
}
@ -757,11 +757,11 @@ void MainMenu::showAxisMove()
break ;
break ;
case ItemAM_E :
case ItemAM_E :
// ErikDB: TODO: this length should be changed for volumetric.
// ErikDB: TODO: this length should be changed for volumetric.
MENUITEM ( lcdprint PGM( MSG_EXTRUDE ) , BLOCK ; enquecommand ( " G92 E0 " ) ; enquecommand ( " G1 F70 E1 " ) ; beepshort ( ) ; ) ;
MENUITEM ( LCD_PRINT_ PGM( MSG_EXTRUDE ) , BLOCK ; enquecommand ( " G92 E0 " ) ; enquecommand ( " G1 F70 E1 " ) ; beepshort ( ) ; ) ;
break ;
break ;
case ItemAM_ERetract :
case ItemAM_ERetract :
// ErikDB: TODO: this length should be changed for volumetric.
// ErikDB: TODO: this length should be changed for volumetric.
MENUITEM ( lcdprint PGM( MSG_RETRACT ) , BLOCK ; enquecommand ( " G92 E0 " ) ; enquecommand ( " G1 F700 E-1 " ) ; beepshort ( ) ; ) ;
MENUITEM ( LCD_PRINT_ PGM( MSG_RETRACT ) , BLOCK ; enquecommand ( " G92 E0 " ) ; enquecommand ( " G1 F700 E-1 " ) ; beepshort ( ) ; ) ;
break ;
break ;
default :
default :
break ;
break ;
@ -787,13 +787,13 @@ void MainMenu::showTune()
switch ( i )
switch ( i )
{
{
case ItemT_exit :
case ItemT_exit :
MENUITEM ( lcdprint PGM( MSG_MAIN ) , BLOCK ; status = Main_Menu ; beepshort ( ) ; ) ;
MENUITEM ( LCD_PRINT_ PGM( MSG_MAIN ) , BLOCK ; status = Main_Menu ; beepshort ( ) ; ) ;
break ;
break ;
case ItemT_speed :
case ItemT_speed :
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_SPEED ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_SPEED ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( feedmultiply ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( feedmultiply ) ) ;
}
}
@ -828,7 +828,7 @@ void MainMenu::showTune()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_NOZZLE ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_NOZZLE ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( intround ( degTargetHotend0 ( ) ) ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( intround ( degTargetHotend0 ( ) ) ) ) ;
}
}
@ -862,7 +862,7 @@ void MainMenu::showTune()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_BED ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_BED ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( intround ( degTargetBed ( ) ) ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( intround ( degTargetBed ( ) ) ) ) ;
}
}
@ -898,7 +898,7 @@ void MainMenu::showTune()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_FAN_SPEED ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_FAN_SPEED ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( FanSpeed ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( FanSpeed ) ) ;
}
}
@ -933,7 +933,7 @@ void MainMenu::showTune()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_FLOW ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_FLOW ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr52 ( axis_steps_per_unit [ E_AXIS ] ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr52 ( axis_steps_per_unit [ E_AXIS ] ) ) ;
}
}
@ -975,22 +975,22 @@ void MainMenu::showTune()
updateActiveLines ( ItemT_fan , encoderpos ) ;
updateActiveLines ( ItemT_fan , encoderpos ) ;
}
}
// does not work
/* does not work
/ / # define MENUCHANGEITEM ( repaint_action , enter_action , accept_action , change_action ) \
# define MENUCHANGEITEM(repaint_action, enter_action, accept_action, change_action) \
/ / { \
{ \
/ / if ( force_lcd_update ) { lcd . setCursor ( 0 , line ) ; repaint_action ; } \
if ( force_lcd_update ) { lcd . setCursor ( 0 , line ) ; repaint_action ; } \
/ / if ( activeline = = line ) \
if ( activeline = = line ) \
/ / { \
{ \
/ / if ( CLICKED ) \
if ( CLICKED ) \
/ / { \
{ \
/ / linechanging = ! linechanging ; \
linechanging = ! linechanging ; \
/ / if ( linechanging ) { enter_action ; } \
if ( linechanging ) { enter_action ; } \
/ / else { accept_action ; } \
else { accept_action ; } \
/ / } \
} \
/ / else \
else \
/ / if ( linechanging ) { change_action } ; } \
if ( linechanging ) { change_action } ; } \
// }
}
//
*/
enum {
enum {
ItemCT_exit , ItemCT_nozzle0 ,
ItemCT_exit , ItemCT_nozzle0 ,
@ -1022,13 +1022,13 @@ void MainMenu::showControlTemp()
switch ( i )
switch ( i )
{
{
case ItemCT_exit :
case ItemCT_exit :
MENUITEM ( lcdprint PGM( MSG_CONTROL ) , BLOCK ; status = Main_Control ; beepshort ( ) ; ) ;
MENUITEM ( LCD_PRINT_ PGM( MSG_CONTROL ) , BLOCK ; status = Main_Control ; beepshort ( ) ; ) ;
break ;
break ;
case ItemCT_nozzle0 :
case ItemCT_nozzle0 :
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_NOZZLE ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_NOZZLE ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( intround ( degTargetHotend0 ( ) ) ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( intround ( degTargetHotend0 ( ) ) ) ) ;
}
}
@ -1063,7 +1063,7 @@ void MainMenu::showControlTemp()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_NOZZLE1 ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_NOZZLE1 ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( intround ( degTargetHotend1 ( ) ) ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( intround ( degTargetHotend1 ( ) ) ) ) ;
}
}
@ -1099,7 +1099,7 @@ void MainMenu::showControlTemp()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_NOZZLE2 ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_NOZZLE2 ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( intround ( degTargetHotend2 ( ) ) ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( intround ( degTargetHotend2 ( ) ) ) ) ;
}
}
@ -1135,7 +1135,7 @@ void MainMenu::showControlTemp()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_MIN ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_MIN ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( autotemp_min ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( autotemp_min ) ) ;
}
}
@ -1169,7 +1169,7 @@ void MainMenu::showControlTemp()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_MAX ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_MAX ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( autotemp_max ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( autotemp_max ) ) ;
}
}
@ -1203,7 +1203,7 @@ void MainMenu::showControlTemp()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_FACTOR ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_FACTOR ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr32 ( autotemp_factor ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr32 ( autotemp_factor ) ) ;
}
}
@ -1237,12 +1237,12 @@ void MainMenu::showControlTemp()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_AUTOTEMP ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_AUTOTEMP ) ;
lcd . setCursor ( 13 , line ) ;
lcd . setCursor ( 13 , line ) ;
if ( autotemp_enabled )
if ( autotemp_enabled )
lcdprint PGM( MSG_ON ) ;
LCD_PRINT_ PGM( MSG_ON ) ;
else
else
lcdprint PGM( MSG_OFF ) ;
LCD_PRINT_ PGM( MSG_OFF ) ;
}
}
if ( ( activeline ! = line ) )
if ( ( activeline ! = line ) )
@ -1253,9 +1253,9 @@ void MainMenu::showControlTemp()
autotemp_enabled = ! autotemp_enabled ;
autotemp_enabled = ! autotemp_enabled ;
lcd . setCursor ( 13 , line ) ;
lcd . setCursor ( 13 , line ) ;
if ( autotemp_enabled )
if ( autotemp_enabled )
lcdprint PGM( MSG_ON ) ;
LCD_PRINT_ PGM( MSG_ON ) ;
else
else
lcdprint PGM( MSG_OFF ) ;
LCD_PRINT_ PGM( MSG_OFF ) ;
BLOCK ;
BLOCK ;
}
}
@ -1266,7 +1266,7 @@ void MainMenu::showControlTemp()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_BED ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_BED ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( intround ( degTargetBed ( ) ) ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( intround ( degTargetBed ( ) ) ) ) ;
}
}
@ -1300,7 +1300,7 @@ void MainMenu::showControlTemp()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_FAN_SPEED ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_FAN_SPEED ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( FanSpeed ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( FanSpeed ) ) ;
}
}
@ -1336,7 +1336,7 @@ void MainMenu::showControlTemp()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( " PID-P: " ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( " PID-P: " ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( itostr4 ( Kp ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( itostr4 ( Kp ) ) ;
}
}
@ -1371,7 +1371,7 @@ void MainMenu::showControlTemp()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_PID_I ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_PID_I ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr51 ( Ki / PID_dT ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr51 ( Ki / PID_dT ) ) ;
}
}
@ -1406,7 +1406,7 @@ void MainMenu::showControlTemp()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_PID_D ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_PID_D ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( itostr4 ( Kd * PID_dT ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( itostr4 ( Kd * PID_dT ) ) ;
}
}
@ -1443,7 +1443,7 @@ void MainMenu::showControlTemp()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_PID_C ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_PID_C ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( itostr3 ( Kc ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( itostr3 ( Kc ) ) ;
}
}
@ -1478,10 +1478,10 @@ void MainMenu::showControlTemp()
# endif
# endif
break ;
break ;
case ItemCT_PLA_PreHeat_Setting :
case ItemCT_PLA_PreHeat_Setting :
MENUITEM ( lcdprint PGM( MSG_PREHEAT_PLA_SETTINGS ) , BLOCK ; status = Sub_PreheatPLASettings ; beepshort ( ) ; ) ;
MENUITEM ( LCD_PRINT_ PGM( MSG_PREHEAT_PLA_SETTINGS ) , BLOCK ; status = Sub_PreheatPLASettings ; beepshort ( ) ; ) ;
break ;
break ;
case ItemCT_ABS_PreHeat_Setting :
case ItemCT_ABS_PreHeat_Setting :
MENUITEM ( lcdprint PGM( MSG_PREHEAT_ABS_SETTINGS ) , BLOCK ; status = Sub_PreheatABSSettings ; beepshort ( ) ; ) ;
MENUITEM ( LCD_PRINT_ PGM( MSG_PREHEAT_ABS_SETTINGS ) , BLOCK ; status = Sub_PreheatABSSettings ; beepshort ( ) ; ) ;
break ;
break ;
default :
default :
break ;
break ;
@ -1513,14 +1513,14 @@ void MainMenu::showControlMotion()
switch ( i )
switch ( i )
{
{
case ItemCM_exit :
case ItemCM_exit :
MENUITEM ( lcdprint PGM( MSG_CONTROL ) , BLOCK ; status = Main_Control ; beepshort ( ) ; ) ;
MENUITEM ( LCD_PRINT_ PGM( MSG_CONTROL ) , BLOCK ; status = Main_Control ; beepshort ( ) ; ) ;
break ;
break ;
case ItemCM_acc :
case ItemCM_acc :
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_ACC ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_ACC ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( itostr3 ( acceleration / 100 ) ) ; lcdprint PGM( " 00 " ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( itostr3 ( acceleration / 100 ) ) ; LCD_PRINT_ PGM( " 00 " ) ;
}
}
if ( ( activeline ! = line ) )
if ( ( activeline ! = line ) )
@ -1545,7 +1545,7 @@ void MainMenu::showControlMotion()
{
{
if ( encoderpos < 5 ) encoderpos = 5 ;
if ( encoderpos < 5 ) encoderpos = 5 ;
if ( encoderpos > 990 ) encoderpos = 990 ;
if ( encoderpos > 990 ) encoderpos = 990 ;
lcd . setCursor ( 13 , line ) ; lcd . print ( itostr3 ( encoderpos ) ) ; lcdprint PGM( " 00 " ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( itostr3 ( encoderpos ) ) ; LCD_PRINT_ PGM( " 00 " ) ;
}
}
} break ;
} break ;
@ -1553,7 +1553,7 @@ void MainMenu::showControlMotion()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_VXY_JERK ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_VXY_JERK ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( itostr3 ( max_xy_jerk ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( itostr3 ( max_xy_jerk ) ) ;
}
}
@ -1592,11 +1592,11 @@ void MainMenu::showControlMotion()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_VMAX ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_VMAX ) ;
if ( i = = ItemCM_vmaxx ) lcdprint PGM( MSG_X ) ;
if ( i = = ItemCM_vmaxx ) LCD_PRINT_ PGM( MSG_X ) ;
if ( i = = ItemCM_vmaxy ) lcdprint PGM( MSG_Y ) ;
if ( i = = ItemCM_vmaxy ) LCD_PRINT_ PGM( MSG_Y ) ;
if ( i = = ItemCM_vmaxz ) lcdprint PGM( MSG_Z ) ;
if ( i = = ItemCM_vmaxz ) LCD_PRINT_ PGM( MSG_Z ) ;
if ( i = = ItemCM_vmaxe ) lcdprint PGM( MSG_E ) ;
if ( i = = ItemCM_vmaxe ) LCD_PRINT_ PGM( MSG_E ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( itostr3 ( max_feedrate [ i - ItemCM_vmaxx ] ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( itostr3 ( max_feedrate [ i - ItemCM_vmaxx ] ) ) ;
}
}
@ -1632,7 +1632,7 @@ void MainMenu::showControlMotion()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_VMIN ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_VMIN ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( itostr3 ( minimumfeedrate ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( itostr3 ( minimumfeedrate ) ) ;
}
}
@ -1667,7 +1667,7 @@ void MainMenu::showControlMotion()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_VTRAV_MIN ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_VTRAV_MIN ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( itostr3 ( mintravelfeedrate ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( itostr3 ( mintravelfeedrate ) ) ;
}
}
@ -1706,12 +1706,12 @@ void MainMenu::showControlMotion()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( " Amax " ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( " Amax " ) ;
if ( i = = ItemCM_amaxx ) lcdprint PGM( MSG_X ) ;
if ( i = = ItemCM_amaxx ) LCD_PRINT_ PGM( MSG_X ) ;
if ( i = = ItemCM_amaxy ) lcdprint PGM( MSG_Y ) ;
if ( i = = ItemCM_amaxy ) LCD_PRINT_ PGM( MSG_Y ) ;
if ( i = = ItemCM_amaxz ) lcdprint PGM( MSG_Z ) ;
if ( i = = ItemCM_amaxz ) LCD_PRINT_ PGM( MSG_Z ) ;
if ( i = = ItemCM_amaxe ) lcdprint PGM( MSG_E ) ;
if ( i = = ItemCM_amaxe ) LCD_PRINT_ PGM( MSG_E ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( itostr3 ( max_acceleration_units_per_sq_second [ i - ItemCM_amaxx ] / 100 ) ) ; lcdprint PGM( " 00 " ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( itostr3 ( max_acceleration_units_per_sq_second [ i - ItemCM_amaxx ] / 100 ) ) ; LCD_PRINT_ PGM( " 00 " ) ;
}
}
if ( ( activeline ! = line ) )
if ( ( activeline ! = line ) )
@ -1736,7 +1736,7 @@ void MainMenu::showControlMotion()
{
{
if ( encoderpos < 1 ) encoderpos = 1 ;
if ( encoderpos < 1 ) encoderpos = 1 ;
if ( encoderpos > 990 ) encoderpos = 990 ;
if ( encoderpos > 990 ) encoderpos = 990 ;
lcd . setCursor ( 13 , line ) ; lcd . print ( itostr3 ( encoderpos ) ) ; lcdprint PGM( " 00 " ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( itostr3 ( encoderpos ) ) ; LCD_PRINT_ PGM( " 00 " ) ;
}
}
} break ;
} break ;
@ -1746,8 +1746,8 @@ void MainMenu::showControlMotion()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_A_RETRACT ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_A_RETRACT ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( retract_acceleration / 100 ) ) ; lcdprint PGM( " 00 " ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( retract_acceleration / 100 ) ) ; LCD_PRINT_ PGM( " 00 " ) ;
}
}
if ( ( activeline ! = line ) )
if ( ( activeline ! = line ) )
@ -1773,7 +1773,7 @@ void MainMenu::showControlMotion()
{
{
if ( encoderpos < 10 ) encoderpos = 10 ;
if ( encoderpos < 10 ) encoderpos = 10 ;
if ( encoderpos > 990 ) encoderpos = 990 ;
if ( encoderpos > 990 ) encoderpos = 990 ;
lcd . setCursor ( 13 , line ) ; lcd . print ( itostr3 ( encoderpos ) ) ; lcdprint PGM( " 00 " ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( itostr3 ( encoderpos ) ) ; LCD_PRINT_ PGM( " 00 " ) ;
}
}
} break ;
} break ;
@ -1781,7 +1781,7 @@ void MainMenu::showControlMotion()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_XSTEPS ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_XSTEPS ) ;
lcd . setCursor ( 11 , line ) ; lcd . print ( ftostr52 ( axis_steps_per_unit [ X_AXIS ] ) ) ;
lcd . setCursor ( 11 , line ) ; lcd . print ( ftostr52 ( axis_steps_per_unit [ X_AXIS ] ) ) ;
}
}
@ -1818,7 +1818,7 @@ void MainMenu::showControlMotion()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_YSTEPS ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_YSTEPS ) ;
lcd . setCursor ( 11 , line ) ; lcd . print ( ftostr52 ( axis_steps_per_unit [ Y_AXIS ] ) ) ;
lcd . setCursor ( 11 , line ) ; lcd . print ( ftostr52 ( axis_steps_per_unit [ Y_AXIS ] ) ) ;
}
}
@ -1856,7 +1856,7 @@ void MainMenu::showControlMotion()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_ZSTEPS ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_ZSTEPS ) ;
lcd . setCursor ( 11 , line ) ; lcd . print ( ftostr51 ( axis_steps_per_unit [ Z_AXIS ] ) ) ;
lcd . setCursor ( 11 , line ) ; lcd . print ( ftostr51 ( axis_steps_per_unit [ Z_AXIS ] ) ) ;
}
}
@ -1895,7 +1895,7 @@ void MainMenu::showControlMotion()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_ESTEPS ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_ESTEPS ) ;
lcd . setCursor ( 11 , line ) ; lcd . print ( ftostr51 ( axis_steps_per_unit [ E_AXIS ] ) ) ;
lcd . setCursor ( 11 , line ) ; lcd . print ( ftostr51 ( axis_steps_per_unit [ E_AXIS ] ) ) ;
}
}
@ -1958,7 +1958,7 @@ void MainMenu::showControlRetract()
switch ( i )
switch ( i )
{
{
case ItemR_exit :
case ItemR_exit :
MENUITEM ( lcdprint PGM( MSG_CONTROL ) , BLOCK ; status = Main_Control ; beepshort ( ) ; ) ;
MENUITEM ( LCD_PRINT_ PGM( MSG_CONTROL ) , BLOCK ; status = Main_Control ; beepshort ( ) ; ) ;
break ;
break ;
//float retract_length=2, retract_feedrate=1200, retract_zlift=0.4;
//float retract_length=2, retract_feedrate=1200, retract_zlift=0.4;
@ -1967,12 +1967,12 @@ void MainMenu::showControlRetract()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_AUTORETRACT ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_AUTORETRACT ) ;
lcd . setCursor ( 13 , line ) ;
lcd . setCursor ( 13 , line ) ;
if ( autoretract_enabled )
if ( autoretract_enabled )
lcdprint PGM( MSG_ON ) ;
LCD_PRINT_ PGM( MSG_ON ) ;
else
else
lcdprint PGM( MSG_OFF ) ;
LCD_PRINT_ PGM( MSG_OFF ) ;
}
}
if ( ( activeline ! = line ) )
if ( ( activeline ! = line ) )
@ -1983,9 +1983,9 @@ void MainMenu::showControlRetract()
autoretract_enabled = ! autoretract_enabled ;
autoretract_enabled = ! autoretract_enabled ;
lcd . setCursor ( 13 , line ) ;
lcd . setCursor ( 13 , line ) ;
if ( autoretract_enabled )
if ( autoretract_enabled )
lcdprint PGM( MSG_ON ) ;
LCD_PRINT_ PGM( MSG_ON ) ;
else
else
lcdprint PGM( MSG_OFF ) ;
LCD_PRINT_ PGM( MSG_OFF ) ;
BLOCK ;
BLOCK ;
}
}
@ -1995,7 +1995,7 @@ void MainMenu::showControlRetract()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_CONTROL_RETRACT ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_CONTROL_RETRACT ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr52 ( retract_length ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr52 ( retract_length ) ) ;
}
}
@ -2030,7 +2030,7 @@ void MainMenu::showControlRetract()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_CONTROL_RETRACTF ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_CONTROL_RETRACTF ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( itostr4 ( retract_feedrate ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( itostr4 ( retract_feedrate ) ) ;
}
}
@ -2065,7 +2065,7 @@ void MainMenu::showControlRetract()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_CONTROL_RETRACT_ZLIFT ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_CONTROL_RETRACT_ZLIFT ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr52 ( retract_zlift ) ) ; ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr52 ( retract_zlift ) ) ; ;
}
}
@ -2100,7 +2100,7 @@ void MainMenu::showControlRetract()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_CONTROL_RETRACT_RECOVER ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_CONTROL_RETRACT_RECOVER ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr52 ( retract_recover_length ) ) ; ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr52 ( retract_recover_length ) ) ; ;
}
}
@ -2136,7 +2136,7 @@ void MainMenu::showControlRetract()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_CONTROL_RETRACT_RECOVERF ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_CONTROL_RETRACT_RECOVERF ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( itostr4 ( retract_recover_feedrate ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( itostr4 ( retract_recover_feedrate ) ) ;
}
}
@ -2196,24 +2196,24 @@ void MainMenu::showControl()
switch ( i )
switch ( i )
{
{
case ItemC_exit :
case ItemC_exit :
MENUITEM ( lcdprint PGM( MSG_MAIN_WIDE ) , BLOCK ; status = Main_Menu ; beepshort ( ) ; ) ;
MENUITEM ( LCD_PRINT_ PGM( MSG_MAIN_WIDE ) , BLOCK ; status = Main_Menu ; beepshort ( ) ; ) ;
break ;
break ;
case ItemC_temp :
case ItemC_temp :
MENUITEM ( lcdprint PGM( MSG_TEMPERATURE_WIDE ) , BLOCK ; status = Sub_TempControl ; beepshort ( ) ; ) ;
MENUITEM ( LCD_PRINT_ PGM( MSG_TEMPERATURE_WIDE ) , BLOCK ; status = Sub_TempControl ; beepshort ( ) ; ) ;
break ;
break ;
case ItemC_move :
case ItemC_move :
MENUITEM ( lcdprint PGM( MSG_MOTION_WIDE ) , BLOCK ; status = Sub_MotionControl ; beepshort ( ) ; ) ;
MENUITEM ( LCD_PRINT_ PGM( MSG_MOTION_WIDE ) , BLOCK ; status = Sub_MotionControl ; beepshort ( ) ; ) ;
break ;
break ;
# ifdef FWRETRACT
# ifdef FWRETRACT
case ItemC_rectract :
case ItemC_rectract :
MENUITEM ( lcdprint PGM( MSG_RECTRACT_WIDE ) , BLOCK ; status = Sub_RetractControl ; beepshort ( ) ; ) ;
MENUITEM ( LCD_PRINT_ PGM( MSG_RECTRACT_WIDE ) , BLOCK ; status = Sub_RetractControl ; beepshort ( ) ; ) ;
break ;
break ;
# endif
# endif
case ItemC_store :
case ItemC_store :
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_STORE_EPROM ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_STORE_EPROM ) ;
}
}
if ( ( activeline = = line ) & & CLICKED )
if ( ( activeline = = line ) & & CLICKED )
{
{
@ -2227,7 +2227,7 @@ void MainMenu::showControl()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_LOAD_EPROM ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_LOAD_EPROM ) ;
}
}
if ( ( activeline = = line ) & & CLICKED )
if ( ( activeline = = line ) & & CLICKED )
{
{
@ -2241,7 +2241,7 @@ void MainMenu::showControl()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_RESTORE_FAILSAFE ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_RESTORE_FAILSAFE ) ;
}
}
if ( ( activeline = = line ) & & CLICKED )
if ( ( activeline = = line ) & & CLICKED )
{
{
@ -2288,7 +2288,7 @@ void MainMenu::showSD()
switch ( i )
switch ( i )
{
{
case 0 :
case 0 :
MENUITEM ( lcdprint PGM( MSG_MAIN ) , BLOCK ; status = Main_Menu ; beepshort ( ) ; ) ;
MENUITEM ( LCD_PRINT_ PGM( MSG_MAIN ) , BLOCK ; status = Main_Menu ; beepshort ( ) ; ) ;
break ;
break ;
// case 1:
// case 1:
// {
// {
@ -2301,11 +2301,11 @@ void MainMenu::showSD()
// if(true)
// if(true)
// #endif
// #endif
// {
// {
// lcdprint PGM(" \004Refresh");
// LCD_PRINT_ PGM(" \004Refresh");
// }
// }
// else
// else
// {
// {
// lcdprint PGM(" \004Insert Card");
// LCD_PRINT_ PGM(" \004Insert Card");
// }
// }
//
//
// }
// }
@ -2320,7 +2320,7 @@ void MainMenu::showSD()
// }break;
// }break;
case 1 :
case 1 :
MENUITEM ( lcd . print ( " " ) ; card . getWorkDirName ( ) ;
MENUITEM ( lcd . print ( " " ) ; card . getWorkDirName ( ) ;
if ( card . filename [ 0 ] = = ' / ' ) lcdprint PGM( MSG_REFRESH ) ;
if ( card . filename [ 0 ] = = ' / ' ) LCD_PRINT_ PGM( MSG_REFRESH ) ;
else {
else {
lcd . print ( " \005 " ) ;
lcd . print ( " \005 " ) ;
lcd . print ( card . filename ) ;
lcd . print ( card . filename ) ;
@ -2343,8 +2343,12 @@ void MainMenu::showSD()
{
{
card . getfilename ( i - FIRSTITEM ) ;
card . getfilename ( i - FIRSTITEM ) ;
//Serial.print("Filenr:");Serial.println(i-2);
//Serial.print("Filenr:");Serial.println(i-2);
lcd . setCursor ( 0 , line ) ; lcdprintPGM ( " " ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_PGM ( " " ) ;
if ( card . filenameIsDir ) lcd . print ( " \005 " ) ;
if ( card . filenameIsDir )
{
lcd . print ( " \005 " ) ;
card . longFilename [ LCD_WIDTH - 2 ] = ' \0 ' ;
}
if ( card . longFilename [ 0 ] )
if ( card . longFilename [ 0 ] )
{
{
card . longFilename [ LCD_WIDTH - 1 ] = ' \0 ' ;
card . longFilename [ LCD_WIDTH - 1 ] = ' \0 ' ;
@ -2436,14 +2440,14 @@ void MainMenu::showMainMenu()
switch ( i )
switch ( i )
{
{
case ItemM_watch :
case ItemM_watch :
MENUITEM ( lcdprint PGM( MSG_WATCH ) , BLOCK ; status = Main_Status ; beepshort ( ) ; ) ;
MENUITEM ( LCD_PRINT_ PGM( MSG_WATCH ) , BLOCK ; status = Main_Status ; beepshort ( ) ; ) ;
break ;
break ;
case ItemM_prepare :
case ItemM_prepare :
MENUITEM ( if ( ! tune ) lcdprintPGM( MSG_PREPARE ) ; else lcdprint PGM( MSG_TUNE ) ; , BLOCK ; status = Main_Prepare ; beepshort ( ) ; ) ;
MENUITEM ( if ( ! tune ) LCD_PRINT_PGM( MSG_PREPARE ) ; else LCD_PRINT_ PGM( MSG_TUNE ) ; , BLOCK ; status = Main_Prepare ; beepshort ( ) ; ) ;
break ;
break ;
case ItemM_control :
case ItemM_control :
MENUITEM ( lcdprint PGM( MSG_CONTROL_ARROW ) , BLOCK ; status = Main_Control ; beepshort ( ) ; ) ;
MENUITEM ( LCD_PRINT_ PGM( MSG_CONTROL_ARROW ) , BLOCK ; status = Main_Control ; beepshort ( ) ; ) ;
break ;
break ;
# ifdef SDSUPPORT
# ifdef SDSUPPORT
case ItemM_file :
case ItemM_file :
@ -2458,13 +2462,13 @@ void MainMenu::showMainMenu()
# endif
# endif
{
{
if ( card . sdprinting )
if ( card . sdprinting )
lcdprint PGM( MSG_STOP_PRINT ) ;
LCD_PRINT_ PGM( MSG_STOP_PRINT ) ;
else
else
lcdprint PGM( MSG_CARD_MENU ) ;
LCD_PRINT_ PGM( MSG_CARD_MENU ) ;
}
}
else
else
{
{
lcdprint PGM( MSG_NO_CARD ) ;
LCD_PRINT_ PGM( MSG_NO_CARD ) ;
}
}
}
}
# ifdef CARDINSERTED
# ifdef CARDINSERTED
@ -2490,13 +2494,13 @@ void MainMenu::showMainMenu()
# endif
# endif
{
{
if ( card . sdprinting )
if ( card . sdprinting )
lcdprint PGM( MSG_PAUSE_PRINT ) ;
LCD_PRINT_ PGM( MSG_PAUSE_PRINT ) ;
else
else
lcdprint PGM( MSG_RESUME_PRINT ) ;
LCD_PRINT_ PGM( MSG_RESUME_PRINT ) ;
}
}
else
else
{
{
// lcdprint PGM(MSG_NO_CARD);
// LCD_PRINT_ PGM(MSG_NO_CARD);
}
}
}
}
# ifdef CARDINSERTED
# ifdef CARDINSERTED
@ -2666,14 +2670,14 @@ void MainMenu::showPLAsettings()
{
{
case ItemPLAPreHeat_Exit :
case ItemPLAPreHeat_Exit :
MENUITEM ( lcdprint PGM( MSG_TEMPERATURE_RTN ) , BLOCK ; status = Sub_TempControl ; beepshort ( ) ; ) ;
MENUITEM ( LCD_PRINT_ PGM( MSG_TEMPERATURE_RTN ) , BLOCK ; status = Sub_TempControl ; beepshort ( ) ; ) ;
break ;
break ;
case ItemPLAPreHeat_set_PLA_FanSpeed :
case ItemPLAPreHeat_set_PLA_FanSpeed :
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_FAN_SPEED ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_FAN_SPEED ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( plaPreheatFanSpeed ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( plaPreheatFanSpeed ) ) ;
}
}
@ -2707,7 +2711,7 @@ void MainMenu::showPLAsettings()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_NOZZLE ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_NOZZLE ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( plaPreheatHotendTemp ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( plaPreheatHotendTemp ) ) ;
}
}
@ -2741,7 +2745,7 @@ void MainMenu::showPLAsettings()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_BED ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_BED ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( plaPreheatHPBTemp ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( plaPreheatHPBTemp ) ) ;
}
}
@ -2774,7 +2778,7 @@ void MainMenu::showPLAsettings()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_STORE_EPROM ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_STORE_EPROM ) ;
}
}
if ( ( activeline = = line ) & & CLICKED )
if ( ( activeline = = line ) & & CLICKED )
{
{
@ -2812,14 +2816,14 @@ void MainMenu::showABSsettings()
{
{
case ItemABSPreHeat_Exit :
case ItemABSPreHeat_Exit :
MENUITEM ( lcdprint PGM( MSG_TEMPERATURE_RTN ) , BLOCK ; status = Sub_TempControl ; beepshort ( ) ; ) ;
MENUITEM ( LCD_PRINT_ PGM( MSG_TEMPERATURE_RTN ) , BLOCK ; status = Sub_TempControl ; beepshort ( ) ; ) ;
break ;
break ;
case ItemABSPreHeat_set_FanSpeed :
case ItemABSPreHeat_set_FanSpeed :
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_FAN_SPEED ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_FAN_SPEED ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( absPreheatFanSpeed ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( absPreheatFanSpeed ) ) ;
}
}
@ -2853,7 +2857,7 @@ void MainMenu::showABSsettings()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_NOZZLE ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_NOZZLE ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( absPreheatHotendTemp ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( absPreheatHotendTemp ) ) ;
}
}
@ -2887,7 +2891,7 @@ void MainMenu::showABSsettings()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_BED ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_BED ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( absPreheatHPBTemp ) ) ;
lcd . setCursor ( 13 , line ) ; lcd . print ( ftostr3 ( absPreheatHPBTemp ) ) ;
}
}
@ -2920,7 +2924,7 @@ void MainMenu::showABSsettings()
{
{
if ( force_lcd_update )
if ( force_lcd_update )
{
{
lcd . setCursor ( 0 , line ) ; lcdprint PGM( MSG_STORE_EPROM ) ;
lcd . setCursor ( 0 , line ) ; LCD_PRINT_ PGM( MSG_STORE_EPROM ) ;
}
}
if ( ( activeline = = line ) & & CLICKED )
if ( ( activeline = = line ) & & CLICKED )
{
{