|
@@ -95,6 +95,7 @@ FORCE_INLINE void clear()
|
95
|
95
|
void lcd_init()
|
96
|
96
|
{
|
97
|
97
|
//beep();
|
|
98
|
+
|
98
|
99
|
byte Degree[8] =
|
99
|
100
|
{
|
100
|
101
|
B01100,
|
|
@@ -322,6 +323,8 @@ void MainMenu::showStatus()
|
322
|
323
|
lcd.setCursor(0,0);lcdprintPGM("\002---/---\001 ");
|
323
|
324
|
#if defined BED_USES_THERMISTOR || defined BED_USES_AD595
|
324
|
325
|
lcd.setCursor(10,0);lcdprintPGM("B---/---\001 ");
|
|
326
|
+ #elif EXTRUDERS > 1
|
|
327
|
+ lcd.setCursor(10,0);lcdprintPGM("\002---/---\001 ");
|
325
|
328
|
#endif
|
326
|
329
|
}
|
327
|
330
|
|
|
@@ -356,6 +359,23 @@ void MainMenu::showStatus()
|
356
|
359
|
lcd.print(ftostr3(targetBed));
|
357
|
360
|
oldtargetBed=targetBed;
|
358
|
361
|
}
|
|
362
|
+ #elif EXTRUDERS > 1
|
|
363
|
+ static int olddegHotEnd1=-1;
|
|
364
|
+ static int oldtargetHotEnd1=-1;
|
|
365
|
+ int tHotEnd1=intround(degHotend1());
|
|
366
|
+ if((tHotEnd1!=olddegHotEnd1)||force_lcd_update)
|
|
367
|
+ {
|
|
368
|
+ lcd.setCursor(11,0);
|
|
369
|
+ lcd.print(ftostr3(tHotEnd1));
|
|
370
|
+ olddegHotEnd1=tHotEnd1;
|
|
371
|
+ }
|
|
372
|
+ int ttHotEnd1=intround(degTargetHotend1());
|
|
373
|
+ if((ttHotEnd1!=oldtargetHotEnd1)||force_lcd_update)
|
|
374
|
+ {
|
|
375
|
+ lcd.setCursor(15,0);
|
|
376
|
+ lcd.print(ftostr3(ttHotEnd1));
|
|
377
|
+ oldtargetHotEnd1=ttHotEnd1;
|
|
378
|
+ }
|
359
|
379
|
#endif
|
360
|
380
|
//starttime=2;
|
361
|
381
|
static uint16_t oldtime=0;
|
|
@@ -430,10 +450,7 @@ void MainMenu::showStatus()
|
430
|
450
|
if(force_lcd_update) //initial display of content
|
431
|
451
|
{
|
432
|
452
|
encoderpos=feedmultiply;
|
433
|
|
- lcd.setCursor(0,0);lcdprintPGM("\002123/567\001 ");
|
434
|
|
- #if defined BED_USES_THERMISTOR || defined BED_USES_AD595
|
435
|
|
- lcd.setCursor(10,0);lcdprintPGM("B123/567\001 ");
|
436
|
|
- #endif
|
|
453
|
+ lcd.setCursor(0,0);lcdprintPGM("\002---/---\001 ");
|
437
|
454
|
}
|
438
|
455
|
|
439
|
456
|
int tHotEnd0=intround(degHotend0());
|
|
@@ -520,7 +537,7 @@ void MainMenu::showPrepare()
|
520
|
537
|
beepshort(); );
|
521
|
538
|
break;
|
522
|
539
|
case ItemP_cooldown:
|
523
|
|
- MENUITEM( lcdprintPGM(MSG_COOLDOWN) , BLOCK;setTargetHotend0(0);setTargetBed(0);beepshort(); ) ;
|
|
540
|
+ MENUITEM( lcdprintPGM(MSG_COOLDOWN) , BLOCK;setTargetHotend0(0);setTargetHotend1(0);setTargetHotend2(0);setTargetBed(0);beepshort(); ) ;
|
524
|
541
|
break;
|
525
|
542
|
// case ItemP_extrude:
|
526
|
543
|
// MENUITEM( lcdprintPGM(" Extrude") , BLOCK;enquecommand("G92 E0");enquecommand("G1 F700 E50");beepshort(); ) ;
|
|
@@ -923,12 +940,18 @@ void MainMenu::showTune()
|
923
|
940
|
//
|
924
|
941
|
|
925
|
942
|
enum {
|
926
|
|
- ItemCT_exit,ItemCT_nozzle,
|
|
943
|
+ ItemCT_exit,ItemCT_nozzle0,
|
927
|
944
|
#ifdef AUTOTEMP
|
928
|
945
|
ItemCT_autotempactive,
|
929
|
946
|
ItemCT_autotempmin,ItemCT_autotempmax,ItemCT_autotempfact,
|
930
|
947
|
#endif
|
931
|
|
-#if (HEATER_BED_PIN > -1)
|
|
948
|
+#if EXTRUDERS > 1
|
|
949
|
+ ItemCT_nozzle1,
|
|
950
|
+#endif
|
|
951
|
+#if EXTRUDERS > 2
|
|
952
|
+ ItemCT_nozzle2,
|
|
953
|
+#endif
|
|
954
|
+#if defined BED_USES_THERMISTOR || BED_USES_AD595
|
932
|
955
|
ItemCT_bed,
|
933
|
956
|
#endif
|
934
|
957
|
ItemCT_fan,
|
|
@@ -946,7 +969,7 @@ void MainMenu::showControlTemp()
|
946
|
969
|
case ItemCT_exit:
|
947
|
970
|
MENUITEM( lcdprintPGM(MSG_CONTROL) , BLOCK;status=Main_Control;beepshort(); ) ;
|
948
|
971
|
break;
|
949
|
|
- case ItemCT_nozzle:
|
|
972
|
+ case ItemCT_nozzle0:
|
950
|
973
|
{
|
951
|
974
|
if(force_lcd_update)
|
952
|
975
|
{
|
|
@@ -980,8 +1003,80 @@ void MainMenu::showControlTemp()
|
980
|
1003
|
}
|
981
|
1004
|
|
982
|
1005
|
}break;
|
983
|
|
- #ifdef AUTOTEMP
|
984
|
|
- case ItemCT_autotempmin:
|
|
1006
|
+ #if EXTRUDERS > 1
|
|
1007
|
+ case ItemCT_nozzle1:
|
|
1008
|
+ {
|
|
1009
|
+ if(force_lcd_update)
|
|
1010
|
+ {
|
|
1011
|
+ lcd.setCursor(0,line);lcdprintPGM(MSG_NOZZLE1);
|
|
1012
|
+ lcd.setCursor(13,line);lcd.print(ftostr3(intround(degTargetHotend1())));
|
|
1013
|
+ }
|
|
1014
|
+
|
|
1015
|
+ if((activeline!=line) )
|
|
1016
|
+ break;
|
|
1017
|
+
|
|
1018
|
+ if(CLICKED)
|
|
1019
|
+ {
|
|
1020
|
+ linechanging=!linechanging;
|
|
1021
|
+ if(linechanging)
|
|
1022
|
+ {
|
|
1023
|
+ encoderpos=intround(degTargetHotend1());
|
|
1024
|
+ }
|
|
1025
|
+ else
|
|
1026
|
+ {
|
|
1027
|
+ setTargetHotend1(encoderpos);
|
|
1028
|
+ encoderpos=activeline*lcdslow;
|
|
1029
|
+ beepshort();
|
|
1030
|
+ }
|
|
1031
|
+ BLOCK;
|
|
1032
|
+ }
|
|
1033
|
+ if(linechanging)
|
|
1034
|
+ {
|
|
1035
|
+ if(encoderpos<0) encoderpos=0;
|
|
1036
|
+ if(encoderpos>260) encoderpos=260;
|
|
1037
|
+ lcd.setCursor(13,line);lcd.print(itostr3(encoderpos));
|
|
1038
|
+ }
|
|
1039
|
+
|
|
1040
|
+ }break;
|
|
1041
|
+ #endif
|
|
1042
|
+ #if EXTRUDERS > 2
|
|
1043
|
+ case ItemCT_nozzle2:
|
|
1044
|
+ {
|
|
1045
|
+ if(force_lcd_update)
|
|
1046
|
+ {
|
|
1047
|
+ lcd.setCursor(0,line);lcdprintPGM(MSG_NOZZLE2);
|
|
1048
|
+ lcd.setCursor(13,line);lcd.print(ftostr3(intround(degTargetHotend2())));
|
|
1049
|
+ }
|
|
1050
|
+
|
|
1051
|
+ if((activeline!=line) )
|
|
1052
|
+ break;
|
|
1053
|
+
|
|
1054
|
+ if(CLICKED)
|
|
1055
|
+ {
|
|
1056
|
+ linechanging=!linechanging;
|
|
1057
|
+ if(linechanging)
|
|
1058
|
+ {
|
|
1059
|
+ encoderpos=intround(degTargetHotend2());
|
|
1060
|
+ }
|
|
1061
|
+ else
|
|
1062
|
+ {
|
|
1063
|
+ setTargetHotend1(encoderpos);
|
|
1064
|
+ encoderpos=activeline*lcdslow;
|
|
1065
|
+ beepshort();
|
|
1066
|
+ }
|
|
1067
|
+ BLOCK;
|
|
1068
|
+ }
|
|
1069
|
+ if(linechanging)
|
|
1070
|
+ {
|
|
1071
|
+ if(encoderpos<0) encoderpos=0;
|
|
1072
|
+ if(encoderpos>260) encoderpos=260;
|
|
1073
|
+ lcd.setCursor(13,line);lcd.print(itostr3(encoderpos));
|
|
1074
|
+ }
|
|
1075
|
+
|
|
1076
|
+ }break;
|
|
1077
|
+ #endif
|
|
1078
|
+ #ifdef AUTOTEMP
|
|
1079
|
+ case ItemCT_autotempmin:
|
985
|
1080
|
{
|
986
|
1081
|
if(force_lcd_update)
|
987
|
1082
|
{
|
|
@@ -1015,7 +1110,7 @@ void MainMenu::showControlTemp()
|
1015
|
1110
|
}
|
1016
|
1111
|
|
1017
|
1112
|
}break;
|
1018
|
|
- case ItemCT_autotempmax:
|
|
1113
|
+ case ItemCT_autotempmax:
|
1019
|
1114
|
{
|
1020
|
1115
|
if(force_lcd_update)
|
1021
|
1116
|
{
|
|
@@ -1049,7 +1144,7 @@ void MainMenu::showControlTemp()
|
1049
|
1144
|
}
|
1050
|
1145
|
|
1051
|
1146
|
}break;
|
1052
|
|
- case ItemCT_autotempfact:
|
|
1147
|
+ case ItemCT_autotempfact:
|
1053
|
1148
|
{
|
1054
|
1149
|
if(force_lcd_update)
|
1055
|
1150
|
{
|
|
@@ -1083,7 +1178,7 @@ void MainMenu::showControlTemp()
|
1083
|
1178
|
}
|
1084
|
1179
|
|
1085
|
1180
|
}break;
|
1086
|
|
- case ItemCT_autotempactive:
|
|
1181
|
+ case ItemCT_autotempactive:
|
1087
|
1182
|
{
|
1088
|
1183
|
if(force_lcd_update)
|
1089
|
1184
|
{
|
|
@@ -1110,9 +1205,9 @@ void MainMenu::showControlTemp()
|
1110
|
1205
|
}
|
1111
|
1206
|
|
1112
|
1207
|
}break;
|
1113
|
|
- #endif //autotemp
|
1114
|
|
- #if (HEATER_BED_PIN > -1)
|
1115
|
|
- case ItemCT_bed:
|
|
1208
|
+ #endif //autotemp
|
|
1209
|
+ #if defined BED_USES_THERMISTOR || BED_USES_AD595
|
|
1210
|
+ case ItemCT_bed:
|
1116
|
1211
|
{
|
1117
|
1212
|
if(force_lcd_update)
|
1118
|
1213
|
{
|
|
@@ -1145,8 +1240,8 @@ void MainMenu::showControlTemp()
|
1145
|
1240
|
lcd.setCursor(13,line);lcd.print(itostr3(encoderpos));
|
1146
|
1241
|
}
|
1147
|
1242
|
}break;
|
1148
|
|
- #endif
|
1149
|
|
- case ItemCT_fan:
|
|
1243
|
+ #endif
|
|
1244
|
+ case ItemCT_fan:
|
1150
|
1245
|
{
|
1151
|
1246
|
if(force_lcd_update)
|
1152
|
1247
|
{
|
|
@@ -1181,8 +1276,8 @@ void MainMenu::showControlTemp()
|
1181
|
1276
|
}
|
1182
|
1277
|
|
1183
|
1278
|
}break;
|
1184
|
|
- #ifdef PIDTEMP
|
1185
|
|
- case ItemCT_PID_P:
|
|
1279
|
+ #ifdef PIDTEMP
|
|
1280
|
+ case ItemCT_PID_P:
|
1186
|
1281
|
{
|
1187
|
1282
|
if(force_lcd_update)
|
1188
|
1283
|
{
|
|
@@ -1252,7 +1347,7 @@ void MainMenu::showControlTemp()
|
1252
|
1347
|
}
|
1253
|
1348
|
|
1254
|
1349
|
}break;
|
1255
|
|
- case ItemCT_PID_D:
|
|
1350
|
+ case ItemCT_PID_D:
|
1256
|
1351
|
{
|
1257
|
1352
|
if(force_lcd_update)
|
1258
|
1353
|
{
|
|
@@ -1324,8 +1419,8 @@ void MainMenu::showControlTemp()
|
1324
|
1419
|
}
|
1325
|
1420
|
|
1326
|
1421
|
}
|
1327
|
|
- #endif
|
1328
|
1422
|
#endif
|
|
1423
|
+ #endif
|
1329
|
1424
|
break;
|
1330
|
1425
|
default:
|
1331
|
1426
|
break;
|
|
@@ -2080,6 +2175,7 @@ void MainMenu::update()
|
2080
|
2175
|
{
|
2081
|
2176
|
force_lcd_update=true;
|
2082
|
2177
|
oldcardstatus=CARDINSERTED;
|
|
2178
|
+ lcd_init(); // to maybe revive the lcd if static electricty killed it.
|
2083
|
2179
|
//Serial.println("echo: SD CHANGE");
|
2084
|
2180
|
if(CARDINSERTED)
|
2085
|
2181
|
{
|
|
@@ -2282,4 +2378,4 @@ char *ftostr52(const float &x)
|
2282
|
2378
|
|
2283
|
2379
|
#endif //ULTRA_LCD
|
2284
|
2380
|
|
2285
|
|
-
|
|
2381
|
+
|