Skip to content

Commit

Permalink
Merge pull request MarlinFirmware#154 from daid/Marlin_v1
Browse files Browse the repository at this point in the history
Added 2nd extruder temperature LCD readout and setting.
  • Loading branch information
ErikZalm committed Apr 28, 2012
2 parents 362ddc4 + 8e68c6c commit e203b8c
Show file tree
Hide file tree
Showing 3 changed files with 126 additions and 24 deletions.
6 changes: 5 additions & 1 deletion Marlin/language.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#define MSG_MOVE_AXIS " Move Axis \x7E"
#define MSG_SPEED " Speed:"
#define MSG_NOZZLE " \002Nozzle:"
#define MSG_NOZZLE1 " \002Nozzle2:"
#define MSG_NOZZLE2 " \002Nozzle3:"
#define MSG_BED " \002Bed:"
#define MSG_FAN_SPEED " Fan speed:"
#define MSG_FLOW " Flow:"
Expand Down Expand Up @@ -174,6 +176,8 @@
#define MSG_MOVE_AXIS " Achsen verfahren \x7E"
#define MSG_SPEED " Geschw:"
#define MSG_NOZZLE " \002Duese:"
#define MSG_NOZZLE1 " \002Duese2:"
#define MSG_NOZZLE2 " \002Duese3:"
#define MSG_BED " \002Bett:"
#define MSG_FAN_SPEED " Luefter geschw.:"
#define MSG_FLOW " Fluss:"
Expand Down Expand Up @@ -296,4 +300,4 @@
#define MSG_ERR_LONG_EXTRUDE_STOP " too long extrusion prevented"

#endif
#endif // ifndef LANGUAGE_H
#endif // ifndef LANGUAGE_H
4 changes: 4 additions & 0 deletions Marlin/temperature.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,17 @@ FORCE_INLINE bool isCoolingBed() {
#define setTargetHotend1(_celsius) setTargetHotend((_celsius), 1)
#define isHeatingHotend1() isHeatingHotend(1)
#define isCoolingHotend1() isCoolingHotend(1)
#else
#define setTargetHotend1(_celsius) do{}while(0)
#endif
#if EXTRUDERS > 2
#define degHotend2() degHotend(2)
#define degTargetHotend2() degTargetHotend(2)
#define setTargetHotend2(_celsius) setTargetHotend((_celsius), 2)
#define isHeatingHotend2() isHeatingHotend(2)
#define isCoolingHotend2() isCoolingHotend(2)
#else
#define setTargetHotend2(_celsius) do{}while(0)
#endif
#if EXTRUDERS > 3
#error Invalid number of extruders
Expand Down
140 changes: 117 additions & 23 deletions Marlin/ultralcd.pde
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@ void MainMenu::showStatus()
lcd.setCursor(0,0);lcdprintPGM("\002---/---\001 ");
#if defined BED_USES_THERMISTOR || defined BED_USES_AD595
lcd.setCursor(10,0);lcdprintPGM("B---/---\001 ");
#elif EXTRUDERS > 1
lcd.setCursor(10,0);lcdprintPGM("\002---/---\001 ");
#endif
}

Expand Down Expand Up @@ -357,6 +359,23 @@ void MainMenu::showStatus()
lcd.print(ftostr3(targetBed));
oldtargetBed=targetBed;
}
#elif EXTRUDERS > 1
static int olddegHotEnd1=-1;
static int oldtargetHotEnd1=-1;
int tHotEnd1=intround(degHotend1());
if((tHotEnd1!=olddegHotEnd1)||force_lcd_update)
{
lcd.setCursor(11,0);
lcd.print(ftostr3(tHotEnd1));
olddegHotEnd1=tHotEnd1;
}
int ttHotEnd1=intround(degTargetHotend1());
if((ttHotEnd1!=oldtargetHotEnd1)||force_lcd_update)
{
lcd.setCursor(15,0);
lcd.print(ftostr3(ttHotEnd1));
oldtargetHotEnd1=ttHotEnd1;
}
#endif
//starttime=2;
static uint16_t oldtime=0;
Expand Down Expand Up @@ -431,10 +450,7 @@ void MainMenu::showStatus()
if(force_lcd_update) //initial display of content
{
encoderpos=feedmultiply;
lcd.setCursor(0,0);lcdprintPGM("\002123/567\001 ");
#if defined BED_USES_THERMISTOR || defined BED_USES_AD595
lcd.setCursor(10,0);lcdprintPGM("B123/567\001 ");
#endif
lcd.setCursor(0,0);lcdprintPGM("\002---/---\001 ");
}

int tHotEnd0=intround(degHotend0());
Expand Down Expand Up @@ -521,7 +537,7 @@ void MainMenu::showPrepare()
beepshort(); );
break;
case ItemP_cooldown:
MENUITEM( lcdprintPGM(MSG_COOLDOWN) , BLOCK;setTargetHotend0(0);setTargetBed(0);beepshort(); ) ;
MENUITEM( lcdprintPGM(MSG_COOLDOWN) , BLOCK;setTargetHotend0(0);setTargetHotend1(0);setTargetHotend2(0);setTargetBed(0);beepshort(); ) ;
break;
// case ItemP_extrude:
// MENUITEM( lcdprintPGM(" Extrude") , BLOCK;enquecommand("G92 E0");enquecommand("G1 F700 E50");beepshort(); ) ;
Expand Down Expand Up @@ -924,12 +940,18 @@ void MainMenu::showTune()
//

enum {
ItemCT_exit,ItemCT_nozzle,
ItemCT_exit,ItemCT_nozzle0,
#ifdef AUTOTEMP
ItemCT_autotempactive,
ItemCT_autotempmin,ItemCT_autotempmax,ItemCT_autotempfact,
#endif
#if (HEATER_BED_PIN > -1)
#if EXTRUDERS > 1
ItemCT_nozzle1,
#endif
#if EXTRUDERS > 2
ItemCT_nozzle2,
#endif
#if defined BED_USES_THERMISTOR || BED_USES_AD595
ItemCT_bed,
#endif
ItemCT_fan,
Expand All @@ -947,7 +969,7 @@ void MainMenu::showControlTemp()
case ItemCT_exit:
MENUITEM( lcdprintPGM(MSG_CONTROL) , BLOCK;status=Main_Control;beepshort(); ) ;
break;
case ItemCT_nozzle:
case ItemCT_nozzle0:
{
if(force_lcd_update)
{
Expand Down Expand Up @@ -981,8 +1003,80 @@ void MainMenu::showControlTemp()
}

}break;
#ifdef AUTOTEMP
case ItemCT_autotempmin:
#if EXTRUDERS > 1
case ItemCT_nozzle1:
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(MSG_NOZZLE1);
lcd.setCursor(13,line);lcd.print(ftostr3(intround(degTargetHotend1())));
}

if((activeline!=line) )
break;

if(CLICKED)
{
linechanging=!linechanging;
if(linechanging)
{
encoderpos=intround(degTargetHotend1());
}
else
{
setTargetHotend1(encoderpos);
encoderpos=activeline*lcdslow;
beepshort();
}
BLOCK;
}
if(linechanging)
{
if(encoderpos<0) encoderpos=0;
if(encoderpos>260) encoderpos=260;
lcd.setCursor(13,line);lcd.print(itostr3(encoderpos));
}

}break;
#endif
#if EXTRUDERS > 2
case ItemCT_nozzle2:
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(MSG_NOZZLE2);
lcd.setCursor(13,line);lcd.print(ftostr3(intround(degTargetHotend2())));
}

if((activeline!=line) )
break;

if(CLICKED)
{
linechanging=!linechanging;
if(linechanging)
{
encoderpos=intround(degTargetHotend2());
}
else
{
setTargetHotend1(encoderpos);
encoderpos=activeline*lcdslow;
beepshort();
}
BLOCK;
}
if(linechanging)
{
if(encoderpos<0) encoderpos=0;
if(encoderpos>260) encoderpos=260;
lcd.setCursor(13,line);lcd.print(itostr3(encoderpos));
}

}break;
#endif
#ifdef AUTOTEMP
case ItemCT_autotempmin:
{
if(force_lcd_update)
{
Expand Down Expand Up @@ -1016,7 +1110,7 @@ void MainMenu::showControlTemp()
}

}break;
case ItemCT_autotempmax:
case ItemCT_autotempmax:
{
if(force_lcd_update)
{
Expand Down Expand Up @@ -1050,7 +1144,7 @@ void MainMenu::showControlTemp()
}

}break;
case ItemCT_autotempfact:
case ItemCT_autotempfact:
{
if(force_lcd_update)
{
Expand Down Expand Up @@ -1084,7 +1178,7 @@ void MainMenu::showControlTemp()
}

}break;
case ItemCT_autotempactive:
case ItemCT_autotempactive:
{
if(force_lcd_update)
{
Expand All @@ -1111,9 +1205,9 @@ void MainMenu::showControlTemp()
}

}break;
#endif //autotemp
#if (HEATER_BED_PIN > -1)
case ItemCT_bed:
#endif //autotemp
#if defined BED_USES_THERMISTOR || BED_USES_AD595
case ItemCT_bed:
{
if(force_lcd_update)
{
Expand Down Expand Up @@ -1146,8 +1240,8 @@ void MainMenu::showControlTemp()
lcd.setCursor(13,line);lcd.print(itostr3(encoderpos));
}
}break;
#endif
case ItemCT_fan:
#endif
case ItemCT_fan:
{
if(force_lcd_update)
{
Expand Down Expand Up @@ -1182,8 +1276,8 @@ void MainMenu::showControlTemp()
}

}break;
#ifdef PIDTEMP
case ItemCT_PID_P:
#ifdef PIDTEMP
case ItemCT_PID_P:
{
if(force_lcd_update)
{
Expand Down Expand Up @@ -1253,7 +1347,7 @@ void MainMenu::showControlTemp()
}

}break;
case ItemCT_PID_D:
case ItemCT_PID_D:
{
if(force_lcd_update)
{
Expand Down Expand Up @@ -1325,8 +1419,8 @@ void MainMenu::showControlTemp()
}

}
#endif
#endif
#endif
break;
default:
break;
Expand Down Expand Up @@ -2284,4 +2378,4 @@ char *ftostr52(const float &x)

#endif //ULTRA_LCD



0 comments on commit e203b8c

Please sign in to comment.