Explorar el Código

added firmware retract. disabled by default

Bernhard hace 12 años
padre
commit
bf077125b9
Se han modificado 5 ficheros con 722 adiciones y 317 borrados
  1. 10
    0
      Marlin/Configuration_adv.h
  2. 131
    1
      Marlin/Marlin.pde
  3. 324
    315
      Marlin/language.h
  4. 2
    1
      Marlin/ultralcd.h
  5. 255
    0
      Marlin/ultralcd.pde

+ 10
- 0
Marlin/Configuration_adv.h Ver fichero

@@ -179,6 +179,16 @@ const int dropsegments=5; //everything with less than this number of steps will
179 179
 #define MAX_CMD_SIZE 96
180 180
 #define BUFSIZE 4
181 181
 
182
+
183
+// Firmware based and LCD controled retract
184
+// M207 and M208 can be used to define parameters for the retraction. 
185
+// The retraction can be called by the slicer using G10 and G11
186
+// until then, intended retractions can be detected by moves that only extrude and the direction. 
187
+// the moves are than replaced by the firmware controlled ones.
188
+
189
+// #define FWRETRACT  //ONLY PARTIALLY TESTED
190
+#define MIN_RETRACT 0.1 //minimum extruded mm to accept a automatic gcode retraction attempt
191
+
182 192
 //===========================================================================
183 193
 //=============================  Define Defines  ============================
184 194
 //===========================================================================

+ 131
- 1
Marlin/Marlin.pde Ver fichero

@@ -50,6 +50,8 @@
50 50
 // G2  - CW ARC
51 51
 // G3  - CCW ARC
52 52
 // G4  - Dwell S<seconds> or P<milliseconds>
53
+// G10 - retract filament according to settings of M207
54
+// G11 - retract recover filament according to settings of M208
53 55
 // G28 - Home all Axis
54 56
 // G90 - Use Absolute Coordinates
55 57
 // G91 - Use Relative Coordinates
@@ -102,6 +104,9 @@
102 104
 // M204 - Set default acceleration: S normal moves T filament only moves (M204 S3000 T7000) im mm/sec^2  also sets minimum segment time in ms (B20000) to prevent buffer underruns and M20 minimum feedrate
103 105
 // M205 -  advanced settings:  minimum travel speed S=while printing T=travel only,  B=minimum segment time X= maximum xy jerk, Z=maximum Z jerk, E=maximum E jerk
104 106
 // M206 - set additional homeing offset
107
+// M207 - set retract length S[positive mm] F[feedrate mm/sec] Z[additional zlift/hop]
108
+// M208 - set recover=unretract length S[positive mm surplus to the M207 S*] F[feedrate mm/sec]
109
+// M209 - S<1=true/0=false> enable automatic retract detect if the slicer did not support G10/11: every normal extrude-only move will be classified as retract depending on the direction.
105 110
 // M220 S<factor in percent>- set speed factor override percentage
106 111
 // M221 S<factor in percent>- set extrude factor override percentage
107 112
 // M240 - Trigger a camera to take a photograph
@@ -139,6 +144,12 @@ float add_homeing[3]={0,0,0};
139 144
 uint8_t active_extruder = 0;
140 145
 unsigned char FanSpeed=0;
141 146
 
147
+#ifdef FWRETRACT
148
+  bool autoretract_enabled=true;
149
+  bool retracted=false;
150
+  float retract_length=3, retract_feedrate=17*60, retract_zlift=0.8;
151
+  float retract_recover_length=0, retract_recover_feedrate=8*60;
152
+#endif
142 153
 
143 154
 //===========================================================================
144 155
 //=============================private variables=============================
@@ -179,6 +190,7 @@ static unsigned long stoptime=0;
179 190
 
180 191
 static uint8_t tmp_extruder;
181 192
 
193
+
182 194
 bool Stopped=false;
183 195
 
184 196
 //===========================================================================
@@ -601,6 +613,36 @@ void process_commands()
601 613
 		LCD_STATUS;
602 614
       }
603 615
       break;
616
+      #ifdef FWRETRACT  
617
+      case 10: // G10 retract
618
+      if(!retracted) 
619
+      {
620
+        destination[X_AXIS]=current_position[X_AXIS];
621
+        destination[Y_AXIS]=current_position[Y_AXIS];
622
+        destination[Z_AXIS]=current_position[Z_AXIS]; 
623
+        current_position[Z_AXIS]+=-retract_zlift;
624
+        destination[E_AXIS]=current_position[E_AXIS]-retract_length; 
625
+        feedrate=retract_feedrate;
626
+        retracted=true;
627
+        prepare_move();
628
+      }
629
+      
630
+      break;
631
+      case 11: // G10 retract_recover
632
+      if(!retracted) 
633
+      {
634
+        destination[X_AXIS]=current_position[X_AXIS];
635
+        destination[Y_AXIS]=current_position[Y_AXIS];
636
+        destination[Z_AXIS]=current_position[Z_AXIS]; 
637
+        
638
+        current_position[Z_AXIS]+=retract_zlift;
639
+        current_position[E_AXIS]+=-retract_recover_length; 
640
+        feedrate=retract_recover_feedrate;
641
+        retracted=false;
642
+        prepare_move();
643
+      }
644
+      break;
645
+      #endif //FWRETRACT
604 646
     case 28: //G28 Home all Axis one at a time
605 647
       saved_feedrate = feedrate;
606 648
       saved_feedmultiply = feedmultiply;
@@ -1212,6 +1254,53 @@ void process_commands()
1212 1254
         if(code_seen(axis_codes[i])) add_homeing[i] = code_value();
1213 1255
       }
1214 1256
       break;
1257
+    #ifdef FWRETRACT
1258
+    case 207: //M207 - set retract length S[positive mm] F[feedrate mm/sec] Z[additional zlift/hop]
1259
+    {
1260
+      if(code_seen('S')) 
1261
+      {
1262
+        retract_length = code_value() ;
1263
+      }
1264
+      if(code_seen('F')) 
1265
+      {
1266
+        retract_feedrate = code_value() ;
1267
+      }
1268
+      if(code_seen('Z')) 
1269
+      {
1270
+        retract_zlift = code_value() ;
1271
+      }
1272
+    }break;
1273
+    case 208: // M208 - set retract recover length S[positive mm surplus to the M207 S*] F[feedrate mm/sec]
1274
+    {
1275
+      if(code_seen('S')) 
1276
+      {
1277
+        retract_recover_length = code_value() ;
1278
+      }
1279
+      if(code_seen('F')) 
1280
+      {
1281
+        retract_recover_feedrate = code_value() ;
1282
+      }
1283
+    }break;
1284
+    
1285
+    case 209: // M209 - S<1=true/0=false> enable automatic retract detect if the slicer did not support G10/11: every normal extrude-only move will be classified as retract depending on the direction.
1286
+    {
1287
+      if(code_seen('S')) 
1288
+      {
1289
+        int t= code_value() ;
1290
+        switch(t)
1291
+        {
1292
+          case 0: autoretract_enabled=false;retracted=false;break;
1293
+          case 1: autoretract_enabled=true;retracted=false;break;
1294
+          default: 
1295
+            SERIAL_ECHO_START;
1296
+            SERIAL_ECHOPGM(MSG_UNKNOWN_COMMAND);
1297
+            SERIAL_ECHO(cmdbuffer[bufindr]);
1298
+            SERIAL_ECHOLNPGM("\"");
1299
+        }
1300
+      }
1301
+      
1302
+    }break;
1303
+    #endif
1215 1304
     case 220: // M220 S<factor in percent>- set speed factor override percentage
1216 1305
     {
1217 1306
       if(code_seen('S')) 
@@ -1373,14 +1462,55 @@ void ClearToSend()
1373 1462
 
1374 1463
 void get_coordinates()
1375 1464
 {
1465
+  bool seen[4]={false,false,false,false};
1376 1466
   for(int8_t i=0; i < NUM_AXIS; i++) {
1377
-    if(code_seen(axis_codes[i])) destination[i] = (float)code_value() + (axis_relative_modes[i] || relative_mode)*current_position[i];
1467
+    if(code_seen(axis_codes[i])) 
1468
+    {
1469
+      destination[i] = (float)code_value() + (axis_relative_modes[i] || relative_mode)*current_position[i];
1470
+      seen[i]=true;
1471
+    }
1378 1472
     else destination[i] = current_position[i]; //Are these else lines really needed?
1379 1473
   }
1380 1474
   if(code_seen('F')) {
1381 1475
     next_feedrate = code_value();
1382 1476
     if(next_feedrate > 0.0) feedrate = next_feedrate;
1383 1477
   }
1478
+  #ifdef FWRETRACT
1479
+  if(autoretract_enabled)
1480
+  if( !(seen[X_AXIS] || seen[Y_AXIS] || seen[Z_AXIS]) && seen[E_AXIS])
1481
+  {
1482
+    float echange=destination[E_AXIS]-current_position[E_AXIS];
1483
+    if(echange<-MIN_RETRACT) //retract
1484
+    {
1485
+      if(!retracted) 
1486
+      {
1487
+      
1488
+      destination[Z_AXIS]+=retract_zlift; //not sure why chaninging current_position negatively does not work.
1489
+      //if slicer retracted by echange=-1mm and you want to retract 3mm, corrrectede=-2mm additionally
1490
+      float correctede=-echange-retract_length;
1491
+      //to generate the additional steps, not the destination is changed, but inversely the current position
1492
+      destination[E_AXIS]+=correctede; 
1493
+      feedrate=retract_feedrate;
1494
+      retracted=true;
1495
+      }
1496
+      
1497
+    }
1498
+    else 
1499
+      if(echange>MIN_RETRACT) //retract_recover
1500
+    {
1501
+      if(retracted) 
1502
+      {
1503
+      //current_position[Z_AXIS]+=-retract_zlift;
1504
+      //if slicer retracted_recovered by echange=+1mm and you want to retract_recover 3mm, corrrectede=2mm additionally
1505
+      float correctede=-echange+0*retract_length+retract_recover_length; //total unretract=retract_length+retract_recover_length[surplus]
1506
+      current_position[E_AXIS]+=-correctede; //to generate the additional steps, not the destination is changed, but inversely the current position
1507
+      feedrate=retract_recover_feedrate;
1508
+      retracted=false;
1509
+      }
1510
+    }
1511
+    
1512
+  }
1513
+  #endif //FWRETRACT
1384 1514
 }
1385 1515
 
1386 1516
 void get_arc_coordinates()

+ 324
- 315
Marlin/language.h Ver fichero

@@ -1,316 +1,325 @@
1
-#ifndef LANGUAGE_H
2
-#define LANGUAGE_H
3
-
4
-// Languages
5
-// 1  Custom (For you to add your own messages)
6
-// 2  English 
7
-// 3  French	(Waiting translation)
8
-// 4  German	(Waiting translation)
9
-// 5  Etc
10
-
11
-#define LANGUAGE_CHOICE 1  // Pick your language from the list above
12
-
13
-#define PROTOCOL_VERSION "1.0"
14
-
15
-#if MOTHERBOARD == 7 || MOTHERBOARD == 71
16
-	#define MACHINE_NAME "Ultimaker"
17
-	#define FIRMWARE_URL "http://firmware.ultimaker.com"
18
-#else
19
-	#define MACHINE_NAME "Mendel"
20
-	#define FIRMWARE_URL "http://www.mendel-parts.com"
21
-#endif
22
-
23
-#define STRINGIFY_(n) #n
24
-#define STRINGIFY(n) STRINGIFY_(n)
25
-
26
-#if LANGUAGE_CHOICE == 1
27
-
28
-// LCD Menu Messages
29
-	#define WELCOME_MSG MACHINE_NAME " Ready."
30
-	#define MSG_SD_INSERTED "Card inserted"
31
-	#define MSG_SD_REMOVED "Card removed"
32
-	#define MSG_MAIN " Main \003"
33
-	#define MSG_AUTOSTART " Autostart"
34
-	#define MSG_DISABLE_STEPPERS " Disable Steppers"
35
-	#define MSG_AUTO_HOME " Auto Home"
36
-	#define MSG_SET_ORIGIN " Set Origin"
37
-	#define MSG_COOLDOWN " Cooldown"
38
-	#define MSG_EXTRUDE " Extrude"
39
-	#define MSG_PREHEAT_PLA " Preheat PLA"
40
-	#define MSG_PREHEAT_ABS " Preheat ABS"
41
-	#define MSG_MOVE_AXIS " Move Axis      \x7E"
42
-	#define MSG_SPEED " Speed:"
43
-	#define MSG_NOZZLE " \002Nozzle:"
44
-	#define MSG_NOZZLE1 " \002Nozzle2:"
45
-	#define MSG_NOZZLE2 " \002Nozzle3:"
46
-	#define MSG_BED " \002Bed:"
47
-	#define MSG_FAN_SPEED " Fan speed:"
48
-	#define MSG_FLOW " Flow:"
49
-	#define MSG_CONTROL " Control \003"
50
-	#define MSG_MIN " \002 Min:"
51
-	#define MSG_MAX " \002 Max:"
52
-	#define MSG_FACTOR " \002 Fact:"
53
-	#define MSG_AUTOTEMP " Autotemp:"
54
-	#define MSG_ON "On "
55
-	#define MSG_OFF "Off"
56
-	#define MSG_PID_P " PID-P: "
57
-	#define MSG_PID_I " PID-I: "
58
-	#define MSG_PID_D " PID-D: "
59
-	#define MSG_PID_C " PID-C: "
60
-	#define MSG_ACC  " Acc:"
61
-	#define MSG_VXY_JERK " Vxy-jerk: "
62
-	#define MSG_VMAX " Vmax "
63
-	#define MSG_X "x:"
64
-	#define MSG_Y "y:"
65
-	#define MSG_Z "z:"
66
-	#define MSG_E "e:"
67
-	#define MSG_VMIN " Vmin:"
68
-	#define MSG_VTRAV_MIN " VTrav min:"
69
-	#define MSG_AMAX " Amax "
70
-	#define MSG_A_RETRACT " A-retract:"
71
-	#define MSG_XSTEPS " Xsteps/mm:"
72
-	#define MSG_YSTEPS " Ysteps/mm:"
73
-	#define MSG_ZSTEPS " Zsteps/mm:"
74
-	#define MSG_ESTEPS " Esteps/mm:"
75
-	#define MSG_MAIN_WIDE " Main        \003"
76
-	#define MSG_TEMPERATURE_WIDE " Temperature \x7E"
77
-	#define MSG_MOTION_WIDE " Motion      \x7E"
78
-	#define MSG_STORE_EPROM " Store memory"
79
-	#define MSG_LOAD_EPROM " Load memory"
80
-	#define MSG_RESTORE_FAILSAFE " Restore Failsafe"
81
-	#define MSG_REFRESH "\004Refresh"
82
-	#define MSG_WATCH " Watch   \003"
83
-	#define MSG_PREPARE " Prepare \x7E"
84
-	#define MSG_PREPARE_ALT " Prepare \003"
85
-	#define MSG_CONTROL_ARROW " Control \x7E"
86
-	#define MSG_TUNE " Tune    \x7E"
87
-	#define MSG_STOP_PRINT " Stop Print   \x7E"
88
-	#define MSG_CARD_MENU " Card Menu    \x7E"
89
-	#define MSG_NO_CARD " No Card"
90
-	#define MSG_SERIAL_ERROR_MENU_STRUCTURE "Something is wrong in the MenuStructure."
91
-	#define MSG_DWELL "Sleep..."
92
-	#define MSG_USERWAIT "Wait for user..."
93
-	#define MSG_NO_MOVE "No move."
94
-	#define MSG_PART_RELEASE "Partial Release"
95
-	#define MSG_KILLED "KILLED. "
96
-	#define MSG_STOPPED "STOPPED. "
97
-	#define MSG_PREHEAT_PLA " Preheat PLA"
98
-	#define MSG_PREHEAT_ABS " Preheat ABS"
99
-	#define MSG_STEPPER_RELEASED "Released."
100
-
101
-
102
-// Serial Console Messages
103
-
104
-	#define MSG_Enqueing "enqueing \""
105
-	#define MSG_POWERUP "PowerUp"
106
-	#define MSG_EXTERNAL_RESET " External Reset"
107
-	#define MSG_BROWNOUT_RESET " Brown out Reset"
108
-	#define MSG_WATCHDOG_RESET " Watchdog Reset"
109
-	#define MSG_SOFTWARE_RESET " Software Reset"
110
-	#define MSG_MARLIN "Marlin "
111
-	#define MSG_AUTHOR " | Author: "
112
-	#define MSG_CONFIGURATION_VER " Last Updated: "
113
-	#define MSG_FREE_MEMORY " Free Memory: "
114
-	#define MSG_PLANNER_BUFFER_BYTES "  PlannerBufferBytes: "
115
-	#define MSG_OK "ok"
116
-	#define MSG_FILE_SAVED "Done saving file."
117
-	#define MSG_ERR_LINE_NO "Line Number is not Last Line Number+1, Last Line:"
118
-	#define MSG_ERR_CHECKSUM_MISMATCH "checksum mismatch, Last Line:"
119
-	#define MSG_ERR_NO_CHECKSUM "No Checksum with line number, Last Line:"
120
-	#define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "No Line Number with checksum, Last Line:"
121
-	#define MSG_FILE_PRINTED "Done printing file"
122
-	#define MSG_BEGIN_FILE_LIST "Begin file list"
123
-	#define MSG_END_FILE_LIST "End file list"
124
-	#define MSG_M104_INVALID_EXTRUDER "M104 Invalid extruder "
125
-	#define MSG_M105_INVALID_EXTRUDER "M105 Invalid extruder "
126
-	#define MSG_ERR_NO_THERMISTORS "No thermistors - no temp"
127
-	#define MSG_M109_INVALID_EXTRUDER "M109 Invalid extruder "
128
-	#define MSG_HEATING "Heating..."
129
-	#define MSG_HEATING_COMPLETE "Heating done."
130
-	#define MSG_BED_HEATING "Bed Heating."
131
-	#define MSG_BED_DONE "Bed done."
132
-	#define MSG_M115_REPORT "FIRMWARE_NAME:Marlin V1; Sprinter/grbl mashup for gen6 FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) "\n"
133
-	#define MSG_COUNT_X " Count X:"
134
-	#define MSG_ERR_KILLED "Printer halted. kill() called !!"
135
-	#define MSG_ERR_STOPPED "Printer stopped deu to errors. Fix the error and use M999 to restart!. (Temperature is reset. Set it before restarting)"
136
-	#define MSG_RESEND "Resend:"
137
-	#define MSG_UNKNOWN_COMMAND "Unknown command:\""
138
-	#define MSG_ACTIVE_EXTRUDER "Active Extruder: "
139
-	#define MSG_INVALID_EXTRUDER "Invalid extruder"
140
-	#define MSG_X_MIN "x_min:"
141
-	#define MSG_X_MAX "x_max:"
142
-	#define MSG_Y_MIN "y_min:"
143
-	#define MSG_Y_MAX "y_max:"
144
-	#define MSG_Z_MIN "z_min:"
145
-	#define MSG_Z_MAX "z_max:"
146
-
147
-	#define MSG_SD_CANT_OPEN_SUBDIR "Cannot open subdir"
148
-	#define MSG_SD_INIT_FAIL "SD init fail"
149
-	#define MSG_SD_VOL_INIT_FAIL "volume.init failed"
150
-	#define MSG_SD_OPENROOT_FAIL "openRoot failed"
151
-	#define MSG_SD_CARD_OK "SD card ok"
152
-	#define MSG_SD_WORKDIR_FAIL "workDir open failed"
153
-	#define MSG_SD_OPEN_FILE_FAIL "open failed, File: "
154
-	#define MSG_SD_FILE_OPENED "File opened:"
155
-	#define MSG_SD_SIZE " Size:"
156
-	#define MSG_SD_FILE_SELECTED "File selected"
157
-	#define MSG_SD_WRITE_TO_FILE "Writing to file: "
158
-	#define MSG_SD_PRINTING_BYTE "SD printing byte "
159
-	#define MSG_SD_NOT_PRINTING "Not SD printing"
160
-	#define MSG_SD_ERR_WRITE_TO_FILE "error writing to file"
161
-	#define MSG_SD_CANT_ENTER_SUBDIR "Cannot enter subdir:"
162
-
163
-	#define MSG_STEPPER_TO_HIGH "Steprate to high : "
164
-	#define MSG_ENDSTOPS_HIT "endstops hit: "
165
-	#define MSG_ERR_COLD_EXTRUDE_STOP " cold extrusion prevented"
166
-	#define MSG_ERR_LONG_EXTRUDE_STOP " too long extrusion prevented"
167
-
168
-#endif
169
-#if LANGUAGE_CHOICE == 4
170
-
171
-// LCD Menu Messages
172
-
173
-	#define WELCOME_MSG MACHINE_NAME " Ready."
174
-
175
-	#define MSG_SD_INSERTED "Card inserted"
176
-	#define MSG_SD_REMOVED "Card removed"
177
-	#define MSG_MAIN " Main \003"
178
-	#define MSG_AUTOSTART " Autostart"
179
-	#define MSG_DISABLE_STEPPERS " Stepper abschalten"
180
-	#define MSG_AUTO_HOME " Auto Heim"
181
-	#define MSG_SET_ORIGIN " Position setzen"
182
-	#define MSG_PREHEAT_PLA " Aufheizen PLA"
183
-	#define MSG_PREHEAT_ABS " Aufheizen ABS"
184
-	#define MSG_COOLDOWN " Abkuehlen"
185
-	#define MSG_EXTRUDE " Extrude"
186
-	#define MSG_PREHEAT_PLA " Preheat PLA"
187
-	#define MSG_PREHEAT_ABS " Preheat ABS"
188
-	#define MSG_MOVE_AXIS " Move Axis      \x7E"
189
-	#define MSG_MOVE_AXIS " Achsen verfahren   \x7E"
190
-	#define MSG_SPEED " Geschw:"
191
-	#define MSG_NOZZLE " \002Duese:"
192
-	#define MSG_NOZZLE1 " \002Duese2:"
193
-	#define MSG_NOZZLE2 " \002Duese3:"
194
-	#define MSG_BED " \002Bett:"
195
-	#define MSG_FAN_SPEED " Luefter geschw.:"
196
-	#define MSG_FLOW " Fluss:"
197
-	#define MSG_CONTROL " Kontrolle \003"
198
-	#define MSG_MIN " \002 Min:"
199
-	#define MSG_MAX " \002 Max:"
200
-	#define MSG_FACTOR " \002 Faktor:"
201
-	#define MSG_AUTOTEMP " AutoTemp:"
202
-	#define MSG_ON "Ein "
203
-	#define MSG_OFF "Aus "
204
-	#define MSG_PID_P " PID-P: "
205
-	#define MSG_PID_I " PID-I: "
206
-	#define MSG_PID_D " PID-D: "
207
-	#define MSG_PID_C " PID-C: "
208
-	#define MSG_ACC  " Acc:"
209
-	#define MSG_VXY_JERK " Vxy-jerk: "
210
-	#define MSG_VMAX " Vmax "
211
-	#define MSG_X "x:"
212
-	#define MSG_Y "y:"
213
-	#define MSG_Z "z:"
214
-	#define MSG_E "e:"
215
-	#define MSG_VMIN " Vmin:"
216
-	#define MSG_VTRAV_MIN " VTrav min:"
217
-	#define MSG_AMAX " Amax "
218
-	#define MSG_A_RETRACT " A-retract:"
219
-	#define MSG_XSTEPS " Xsteps/mm:"
220
-	#define MSG_YSTEPS " Ysteps/mm:"
221
-	#define MSG_ZSTEPS " Zsteps/mm:"
222
-	#define MSG_ESTEPS " Esteps/mm:"
223
-	#define MSG_MAIN_WIDE " Main        \003"
224
-	#define MSG_TEMPERATURE_WIDE " Temperatur \x7E"
225
-	#define MSG_MOTION_WIDE " Motion      \x7E"
226
-	#define MSG_STORE_EPROM " EPROM speichern"
227
-	#define MSG_LOAD_EPROM "  EPROM laden"
228
-	#define MSG_RESTORE_FAILSAFE " Standard Konfig."
229
-	#define MSG_REFRESH "\004Refresh"
230
-	#define MSG_WATCH " Beobachten   \003"
231
-	#define MSG_PREPARE " Prepare \x7E"
232
-	#define MSG_PREPARE_ALT " Prepare \003"
233
-	#define MSG_CONTROL_ARROW " Control \x7E"
234
-	#define MSG_TUNE " Tune    \x7E"
235
-	#define MSG_STOP_PRINT " Druck stoppen   \x7E"
236
-	#define MSG_CARD_MENU " SDKarten Menue    \x7E"
237
-	#define MSG_NO_CARD " Keine SDKarte"
238
-	#define MSG_SERIAL_ERROR_MENU_STRUCTURE "Fehler in der  Menuestruktur."
239
-	#define MSG_DWELL "DWELL..."		
240
-	#define MSG_NO_MOVE "No move."
241
-	#define MSG_PART_RELEASE "Partial Release"
242
-	#define MSG_KILLED "KILLED. "
243
-	#define MSG_STOPPED "STOPPED. "
244
-	#define MSG_PREHEAT_PLA " Preheat PLA"
245
-	#define MSG_PREHEAT_ABS " Preheat ABS"
246
-	#define MSG_STEPPER_RELEASED "Released."
247
-
248
-
249
-// Serial Console Messages
250
-
251
-	#define MSG_Enqueing "enqueing \""
252
-	#define MSG_POWERUP "PowerUp"
253
-	#define MSG_EXTERNAL_RESET " External Reset"
254
-	#define MSG_BROWNOUT_RESET " Brown out Reset"
255
-	#define MSG_WATCHDOG_RESET " Watchdog Reset"
256
-	#define MSG_SOFTWARE_RESET " Software Reset"
257
-	#define MSG_MARLIN "Marlin: "
258
-	#define MSG_AUTHOR " | Author: "
259
-	#define MSG_CONFIGURATION_VER " Last Updated: "
260
-	#define MSG_FREE_MEMORY " Free Memory: "
261
-	#define MSG_PLANNER_BUFFER_BYTES "  PlannerBufferBytes: "
262
-	#define MSG_OK "ok"
263
-	#define MSG_FILE_SAVED "Done saving file."
264
-	#define MSG_ERR_LINE_NO "Line Number is not Last Line Number+1, Last Line:"
265
-	#define MSG_ERR_CHECKSUM_MISMATCH "checksum mismatch, Last Line:"
266
-	#define MSG_ERR_NO_CHECKSUM "No Checksum with line number, Last Line:"
267
-	#define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "No Line Number with checksum, Last Line:"
268
-	#define MSG_FILE_PRINTED "Done printing file"
269
-	#define MSG_BEGIN_FILE_LIST "Begin file list"
270
-	#define MSG_END_FILE_LIST "End file list"
271
-	#define MSG_M104_INVALID_EXTRUDER "M104 Invalid extruder "
272
-	#define MSG_M105_INVALID_EXTRUDER "M105 Invalid extruder "
273
-	#define MSG_ERR_NO_THERMISTORS "No thermistors - no temp"
274
-	#define MSG_M109_INVALID_EXTRUDER "M109 Invalid extruder "
275
-	#define MSG_HEATING "Heating..."
276
-	#define MSG_HEATING_COMPLETE "Heating done."
277
-	#define MSG_BED_HEATING "Bed Heating."
278
-	#define MSG_BED_DONE "Bed done."
279
-	#define MSG_M115_REPORT "FIRMWARE_NAME:Marlin V1; Sprinter/grbl mashup for gen6 FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) "\n"
280
-	#define MSG_COUNT_X " Count X:"
281
-	#define MSG_ERR_KILLED "Printer halted. kill() called !!"
282
-	#define MSG_ERR_STOPPED "Printer stopped due to errors. Fix the error and use M999 to restart!"
283
-	#define MSG_RESEND "Resend:"
284
-	#define MSG_UNKNOWN_COMMAND "Unknown command:\""
285
-	#define MSG_ACTIVE_EXTRUDER "Active Extruder: "
286
-	#define MSG_INVALID_EXTRUDER "Invalid extruder"
287
-	#define MSG_X_MIN "x_min:"
288
-	#define MSG_X_MAX "x_max:"
289
-	#define MSG_Y_MIN "y_min:"
290
-	#define MSG_Y_MAX "y_max:"
291
-	#define MSG_Z_MIN "z_min:"
292
-	#define MSG_Z_MAX "z_max:"
293
-
294
-	#define MSG_SD_CANT_OPEN_SUBDIR "Cannot open subdir"
295
-	#define MSG_SD_INIT_FAIL "SD init fail"
296
-	#define MSG_SD_VOL_INIT_FAIL "volume.init failed"
297
-	#define MSG_SD_OPENROOT_FAIL "openRoot failed"
298
-	#define MSG_SD_CARD_OK "SD card ok"
299
-	#define MSG_SD_WORKDIR_FAIL "workDir open failed"
300
-	#define MSG_SD_OPEN_FILE_FAIL "open failed, File: "
301
-	#define MSG_SD_FILE_OPENED "File opened:"
302
-	#define MSG_SD_SIZE " Size:"
303
-	#define MSG_SD_FILE_SELECTED "File selected"
304
-	#define MSG_SD_WRITE_TO_FILE "Writing to file: "
305
-	#define MSG_SD_PRINTING_BYTE "SD printing byte "
306
-	#define MSG_SD_NOT_PRINTING "Not SD printing"
307
-	#define MSG_SD_ERR_WRITE_TO_FILE "error writing to file"
308
-	#define MSG_SD_CANT_ENTER_SUBDIR "Cannot enter subdir:"
309
-
310
-	#define MSG_STEPPER_TO_HIGH "Steprate to high : "
311
-	#define MSG_ENDSTOPS_HIT "endstops hit: "
312
-	#define MSG_ERR_COLD_EXTRUDE_STOP " cold extrusion prevented"
313
-	#define MSG_ERR_LONG_EXTRUDE_STOP " too long extrusion prevented"
314
-
315
-#endif
1
+#ifndef LANGUAGE_H
2
+#define LANGUAGE_H
3
+
4
+// Languages
5
+// 1  Custom (For you to add your own messages)
6
+// 2  English 
7
+// 3  French	(Waiting translation)
8
+// 4  German	(Waiting translation)
9
+// 5  Etc
10
+
11
+#define LANGUAGE_CHOICE 1  // Pick your language from the list above
12
+
13
+#define PROTOCOL_VERSION "1.0"
14
+
15
+#if MOTHERBOARD == 7 || MOTHERBOARD == 71
16
+	#define MACHINE_NAME "Ultimaker"
17
+	#define FIRMWARE_URL "http://firmware.ultimaker.com"
18
+#else
19
+	#define MACHINE_NAME "Mendel"
20
+	#define FIRMWARE_URL "http://www.mendel-parts.com"
21
+#endif
22
+
23
+#define STRINGIFY_(n) #n
24
+#define STRINGIFY(n) STRINGIFY_(n)
25
+
26
+#if LANGUAGE_CHOICE == 1
27
+
28
+// LCD Menu Messages
29
+	#define WELCOME_MSG MACHINE_NAME " Ready."
30
+	#define MSG_SD_INSERTED "Card inserted"
31
+	#define MSG_SD_REMOVED "Card removed"
32
+	#define MSG_MAIN " Main \003"
33
+	#define MSG_AUTOSTART " Autostart"
34
+	#define MSG_DISABLE_STEPPERS " Disable Steppers"
35
+	#define MSG_AUTO_HOME " Auto Home"
36
+	#define MSG_SET_ORIGIN " Set Origin"
37
+	#define MSG_COOLDOWN " Cooldown"
38
+	#define MSG_EXTRUDE " Extrude"
39
+	#define MSG_PREHEAT_PLA " Preheat PLA"
40
+	#define MSG_PREHEAT_ABS " Preheat ABS"
41
+	#define MSG_MOVE_AXIS " Move Axis      \x7E"
42
+	#define MSG_SPEED " Speed:"
43
+	#define MSG_NOZZLE " \002Nozzle:"
44
+	#define MSG_NOZZLE1 " \002Nozzle2:"
45
+	#define MSG_NOZZLE2 " \002Nozzle3:"
46
+	#define MSG_BED " \002Bed:"
47
+	#define MSG_FAN_SPEED " Fan speed:"
48
+	#define MSG_FLOW " Flow:"
49
+	#define MSG_CONTROL " Control \003"
50
+	#define MSG_MIN " \002 Min:"
51
+	#define MSG_MAX " \002 Max:"
52
+	#define MSG_FACTOR " \002 Fact:"
53
+	#define MSG_AUTOTEMP " Autotemp:"
54
+	#define MSG_ON "On "
55
+	#define MSG_OFF "Off"
56
+	#define MSG_PID_P " PID-P: "
57
+	#define MSG_PID_I " PID-I: "
58
+	#define MSG_PID_D " PID-D: "
59
+	#define MSG_PID_C " PID-C: "
60
+	#define MSG_ACC  " Acc:"
61
+	#define MSG_VXY_JERK " Vxy-jerk: "
62
+	#define MSG_VMAX " Vmax "
63
+	#define MSG_X "x:"
64
+	#define MSG_Y "y:"
65
+	#define MSG_Z "z:"
66
+	#define MSG_E "e:"
67
+	#define MSG_VMIN " Vmin:"
68
+	#define MSG_VTRAV_MIN " VTrav min:"
69
+	#define MSG_AMAX " Amax "
70
+	#define MSG_A_RETRACT " A-retract:"
71
+	#define MSG_XSTEPS " Xsteps/mm:"
72
+	#define MSG_YSTEPS " Ysteps/mm:"
73
+	#define MSG_ZSTEPS " Zsteps/mm:"
74
+	#define MSG_ESTEPS " Esteps/mm:"
75
+	#define MSG_MAIN_WIDE " Main        \003"
76
+	#define MSG_RECTRACT_WIDE " Rectract    \x7E"
77
+	#define MSG_TEMPERATURE_WIDE " Temperature \x7E"
78
+	#define MSG_MOTION_WIDE " Motion      \x7E"
79
+	#define MSG_STORE_EPROM " Store memory"
80
+	#define MSG_LOAD_EPROM " Load memory"
81
+	#define MSG_RESTORE_FAILSAFE " Restore Failsafe"
82
+	#define MSG_REFRESH "\004Refresh"
83
+	#define MSG_WATCH " Watch   \003"
84
+	#define MSG_PREPARE " Prepare \x7E"
85
+	#define MSG_PREPARE_ALT " Prepare \003"
86
+	#define MSG_CONTROL_ARROW " Control \x7E"
87
+	#define MSG_RETRACT_ARROW " Control \x7E"
88
+	#define MSG_TUNE " Tune    \x7E"
89
+	#define MSG_STOP_PRINT " Stop Print   \x7E"
90
+	#define MSG_CARD_MENU " Card Menu    \x7E"
91
+	#define MSG_NO_CARD " No Card"
92
+	#define MSG_SERIAL_ERROR_MENU_STRUCTURE "Something is wrong in the MenuStructure."
93
+	#define MSG_DWELL "Sleep..."
94
+	#define MSG_USERWAIT "Wait for user..."
95
+	#define MSG_NO_MOVE "No move."
96
+	#define MSG_PART_RELEASE "Partial Release"
97
+	#define MSG_KILLED "KILLED. "
98
+	#define MSG_STOPPED "STOPPED. "
99
+	#define MSG_PREHEAT_PLA " Preheat PLA"
100
+	#define MSG_PREHEAT_ABS " Preheat ABS"
101
+	#define MSG_STEPPER_RELEASED "Released."
102
+  #define MSG_CONTROL_RETRACT  " Retract mm:"
103
+  #define MSG_CONTROL_RETRACTF " Retract  F:"
104
+  #define MSG_CONTROL_RETRACT_ZLIFT " Hop mm:"
105
+  #define MSG_CONTROL_RETRACT_RECOVER " UnRet +mm:"
106
+  #define MSG_CONTROL_RETRACT_RECOVERF " UnRet  F:"
107
+  #define MSG_AUTORETRACT " AutoRetr.:"
108
+
109
+// Serial Console Messages
110
+
111
+	#define MSG_Enqueing "enqueing \""
112
+	#define MSG_POWERUP "PowerUp"
113
+	#define MSG_EXTERNAL_RESET " External Reset"
114
+	#define MSG_BROWNOUT_RESET " Brown out Reset"
115
+	#define MSG_WATCHDOG_RESET " Watchdog Reset"
116
+	#define MSG_SOFTWARE_RESET " Software Reset"
117
+	#define MSG_MARLIN "Marlin "
118
+	#define MSG_AUTHOR " | Author: "
119
+	#define MSG_CONFIGURATION_VER " Last Updated: "
120
+	#define MSG_FREE_MEMORY " Free Memory: "
121
+	#define MSG_PLANNER_BUFFER_BYTES "  PlannerBufferBytes: "
122
+	#define MSG_OK "ok"
123
+	#define MSG_FILE_SAVED "Done saving file."
124
+	#define MSG_ERR_LINE_NO "Line Number is not Last Line Number+1, Last Line:"
125
+	#define MSG_ERR_CHECKSUM_MISMATCH "checksum mismatch, Last Line:"
126
+	#define MSG_ERR_NO_CHECKSUM "No Checksum with line number, Last Line:"
127
+	#define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "No Line Number with checksum, Last Line:"
128
+	#define MSG_FILE_PRINTED "Done printing file"
129
+	#define MSG_BEGIN_FILE_LIST "Begin file list"
130
+	#define MSG_END_FILE_LIST "End file list"
131
+	#define MSG_M104_INVALID_EXTRUDER "M104 Invalid extruder "
132
+	#define MSG_M105_INVALID_EXTRUDER "M105 Invalid extruder "
133
+	#define MSG_ERR_NO_THERMISTORS "No thermistors - no temp"
134
+	#define MSG_M109_INVALID_EXTRUDER "M109 Invalid extruder "
135
+	#define MSG_HEATING "Heating..."
136
+	#define MSG_HEATING_COMPLETE "Heating done."
137
+	#define MSG_BED_HEATING "Bed Heating."
138
+	#define MSG_BED_DONE "Bed done."
139
+	#define MSG_M115_REPORT "FIRMWARE_NAME:Marlin V1; Sprinter/grbl mashup for gen6 FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) "\n"
140
+	#define MSG_COUNT_X " Count X:"
141
+	#define MSG_ERR_KILLED "Printer halted. kill() called !!"
142
+	#define MSG_ERR_STOPPED "Printer stopped deu to errors. Fix the error and use M999 to restart!. (Temperature is reset. Set it before restarting)"
143
+	#define MSG_RESEND "Resend:"
144
+	#define MSG_UNKNOWN_COMMAND "Unknown command:\""
145
+	#define MSG_ACTIVE_EXTRUDER "Active Extruder: "
146
+	#define MSG_INVALID_EXTRUDER "Invalid extruder"
147
+	#define MSG_X_MIN "x_min:"
148
+	#define MSG_X_MAX "x_max:"
149
+	#define MSG_Y_MIN "y_min:"
150
+	#define MSG_Y_MAX "y_max:"
151
+	#define MSG_Z_MIN "z_min:"
152
+	#define MSG_Z_MAX "z_max:"
153
+
154
+	#define MSG_SD_CANT_OPEN_SUBDIR "Cannot open subdir"
155
+	#define MSG_SD_INIT_FAIL "SD init fail"
156
+	#define MSG_SD_VOL_INIT_FAIL "volume.init failed"
157
+	#define MSG_SD_OPENROOT_FAIL "openRoot failed"
158
+	#define MSG_SD_CARD_OK "SD card ok"
159
+	#define MSG_SD_WORKDIR_FAIL "workDir open failed"
160
+	#define MSG_SD_OPEN_FILE_FAIL "open failed, File: "
161
+	#define MSG_SD_FILE_OPENED "File opened:"
162
+	#define MSG_SD_SIZE " Size:"
163
+	#define MSG_SD_FILE_SELECTED "File selected"
164
+	#define MSG_SD_WRITE_TO_FILE "Writing to file: "
165
+	#define MSG_SD_PRINTING_BYTE "SD printing byte "
166
+	#define MSG_SD_NOT_PRINTING "Not SD printing"
167
+	#define MSG_SD_ERR_WRITE_TO_FILE "error writing to file"
168
+	#define MSG_SD_CANT_ENTER_SUBDIR "Cannot enter subdir:"
169
+
170
+	#define MSG_STEPPER_TO_HIGH "Steprate to high : "
171
+	#define MSG_ENDSTOPS_HIT "endstops hit: "
172
+	#define MSG_ERR_COLD_EXTRUDE_STOP " cold extrusion prevented"
173
+	#define MSG_ERR_LONG_EXTRUDE_STOP " too long extrusion prevented"
174
+
175
+#endif
176
+#if LANGUAGE_CHOICE == 4
177
+
178
+// LCD Menu Messages
179
+
180
+	#define WELCOME_MSG MACHINE_NAME " Ready."
181
+
182
+	#define MSG_SD_INSERTED "Card inserted"
183
+	#define MSG_SD_REMOVED "Card removed"
184
+	#define MSG_MAIN " Main \003"
185
+	#define MSG_AUTOSTART " Autostart"
186
+	#define MSG_DISABLE_STEPPERS " Stepper abschalten"
187
+	#define MSG_AUTO_HOME " Auto Heim"
188
+	#define MSG_SET_ORIGIN " Position setzen"
189
+	#define MSG_PREHEAT_PLA " Aufheizen PLA"
190
+	#define MSG_PREHEAT_ABS " Aufheizen ABS"
191
+	#define MSG_COOLDOWN " Abkuehlen"
192
+	#define MSG_EXTRUDE " Extrude"
193
+	#define MSG_PREHEAT_PLA " Preheat PLA"
194
+	#define MSG_PREHEAT_ABS " Preheat ABS"
195
+	#define MSG_MOVE_AXIS " Move Axis      \x7E"
196
+	#define MSG_MOVE_AXIS " Achsen verfahren   \x7E"
197
+	#define MSG_SPEED " Geschw:"
198
+	#define MSG_NOZZLE " \002Duese:"
199
+	#define MSG_NOZZLE1 " \002Duese2:"
200
+	#define MSG_NOZZLE2 " \002Duese3:"
201
+	#define MSG_BED " \002Bett:"
202
+	#define MSG_FAN_SPEED " Luefter geschw.:"
203
+	#define MSG_FLOW " Fluss:"
204
+	#define MSG_CONTROL " Kontrolle \003"
205
+	#define MSG_MIN " \002 Min:"
206
+	#define MSG_MAX " \002 Max:"
207
+	#define MSG_FACTOR " \002 Faktor:"
208
+	#define MSG_AUTOTEMP " AutoTemp:"
209
+	#define MSG_ON "Ein "
210
+	#define MSG_OFF "Aus "
211
+	#define MSG_PID_P " PID-P: "
212
+	#define MSG_PID_I " PID-I: "
213
+	#define MSG_PID_D " PID-D: "
214
+	#define MSG_PID_C " PID-C: "
215
+	#define MSG_ACC  " Acc:"
216
+	#define MSG_VXY_JERK " Vxy-jerk: "
217
+	#define MSG_VMAX " Vmax "
218
+	#define MSG_X "x:"
219
+	#define MSG_Y "y:"
220
+	#define MSG_Z "z:"
221
+	#define MSG_E "e:"
222
+	#define MSG_VMIN " Vmin:"
223
+	#define MSG_VTRAV_MIN " VTrav min:"
224
+	#define MSG_AMAX " Amax "
225
+	#define MSG_A_RETRACT " A-retract:"
226
+	#define MSG_XSTEPS " Xsteps/mm:"
227
+	#define MSG_YSTEPS " Ysteps/mm:"
228
+	#define MSG_ZSTEPS " Zsteps/mm:"
229
+	#define MSG_ESTEPS " Esteps/mm:"
230
+	#define MSG_MAIN_WIDE " Main        \003"
231
+	#define MSG_TEMPERATURE_WIDE " Temperatur \x7E"
232
+	#define MSG_MOTION_WIDE " Motion      \x7E"
233
+	#define MSG_STORE_EPROM " EPROM speichern"
234
+	#define MSG_LOAD_EPROM "  EPROM laden"
235
+	#define MSG_RESTORE_FAILSAFE " Standard Konfig."
236
+	#define MSG_REFRESH "\004Refresh"
237
+	#define MSG_WATCH " Beobachten   \003"
238
+	#define MSG_PREPARE " Prepare \x7E"
239
+	#define MSG_PREPARE_ALT " Prepare \003"
240
+	#define MSG_CONTROL_ARROW " Control \x7E"
241
+	
242
+	#define MSG_TUNE " Tune    \x7E"
243
+	#define MSG_STOP_PRINT " Druck stoppen   \x7E"
244
+	#define MSG_CARD_MENU " SDKarten Menue    \x7E"
245
+	#define MSG_NO_CARD " Keine SDKarte"
246
+	#define MSG_SERIAL_ERROR_MENU_STRUCTURE "Fehler in der  Menuestruktur."
247
+	#define MSG_DWELL "DWELL..."		
248
+	#define MSG_NO_MOVE "No move."
249
+	#define MSG_PART_RELEASE "Partial Release"
250
+	#define MSG_KILLED "KILLED. "
251
+	#define MSG_STOPPED "STOPPED. "
252
+	#define MSG_PREHEAT_PLA " Preheat PLA"
253
+	#define MSG_PREHEAT_ABS " Preheat ABS"
254
+	#define MSG_STEPPER_RELEASED "Released."
255
+	
256
+
257
+
258
+// Serial Console Messages
259
+
260
+	#define MSG_Enqueing "enqueing \""
261
+	#define MSG_POWERUP "PowerUp"
262
+	#define MSG_EXTERNAL_RESET " External Reset"
263
+	#define MSG_BROWNOUT_RESET " Brown out Reset"
264
+	#define MSG_WATCHDOG_RESET " Watchdog Reset"
265
+	#define MSG_SOFTWARE_RESET " Software Reset"
266
+	#define MSG_MARLIN "Marlin: "
267
+	#define MSG_AUTHOR " | Author: "
268
+	#define MSG_CONFIGURATION_VER " Last Updated: "
269
+	#define MSG_FREE_MEMORY " Free Memory: "
270
+	#define MSG_PLANNER_BUFFER_BYTES "  PlannerBufferBytes: "
271
+	#define MSG_OK "ok"
272
+	#define MSG_FILE_SAVED "Done saving file."
273
+	#define MSG_ERR_LINE_NO "Line Number is not Last Line Number+1, Last Line:"
274
+	#define MSG_ERR_CHECKSUM_MISMATCH "checksum mismatch, Last Line:"
275
+	#define MSG_ERR_NO_CHECKSUM "No Checksum with line number, Last Line:"
276
+	#define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "No Line Number with checksum, Last Line:"
277
+	#define MSG_FILE_PRINTED "Done printing file"
278
+	#define MSG_BEGIN_FILE_LIST "Begin file list"
279
+	#define MSG_END_FILE_LIST "End file list"
280
+	#define MSG_M104_INVALID_EXTRUDER "M104 Invalid extruder "
281
+	#define MSG_M105_INVALID_EXTRUDER "M105 Invalid extruder "
282
+	#define MSG_ERR_NO_THERMISTORS "No thermistors - no temp"
283
+	#define MSG_M109_INVALID_EXTRUDER "M109 Invalid extruder "
284
+	#define MSG_HEATING "Heating..."
285
+	#define MSG_HEATING_COMPLETE "Heating done."
286
+	#define MSG_BED_HEATING "Bed Heating."
287
+	#define MSG_BED_DONE "Bed done."
288
+	#define MSG_M115_REPORT "FIRMWARE_NAME:Marlin V1; Sprinter/grbl mashup for gen6 FIRMWARE_URL:" FIRMWARE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) "\n"
289
+	#define MSG_COUNT_X " Count X:"
290
+	#define MSG_ERR_KILLED "Printer halted. kill() called !!"
291
+	#define MSG_ERR_STOPPED "Printer stopped due to errors. Fix the error and use M999 to restart!"
292
+	#define MSG_RESEND "Resend:"
293
+	#define MSG_UNKNOWN_COMMAND "Unknown command:\""
294
+	#define MSG_ACTIVE_EXTRUDER "Active Extruder: "
295
+	#define MSG_INVALID_EXTRUDER "Invalid extruder"
296
+	#define MSG_X_MIN "x_min:"
297
+	#define MSG_X_MAX "x_max:"
298
+	#define MSG_Y_MIN "y_min:"
299
+	#define MSG_Y_MAX "y_max:"
300
+	#define MSG_Z_MIN "z_min:"
301
+	#define MSG_Z_MAX "z_max:"
302
+
303
+	#define MSG_SD_CANT_OPEN_SUBDIR "Cannot open subdir"
304
+	#define MSG_SD_INIT_FAIL "SD init fail"
305
+	#define MSG_SD_VOL_INIT_FAIL "volume.init failed"
306
+	#define MSG_SD_OPENROOT_FAIL "openRoot failed"
307
+	#define MSG_SD_CARD_OK "SD card ok"
308
+	#define MSG_SD_WORKDIR_FAIL "workDir open failed"
309
+	#define MSG_SD_OPEN_FILE_FAIL "open failed, File: "
310
+	#define MSG_SD_FILE_OPENED "File opened:"
311
+	#define MSG_SD_SIZE " Size:"
312
+	#define MSG_SD_FILE_SELECTED "File selected"
313
+	#define MSG_SD_WRITE_TO_FILE "Writing to file: "
314
+	#define MSG_SD_PRINTING_BYTE "SD printing byte "
315
+	#define MSG_SD_NOT_PRINTING "Not SD printing"
316
+	#define MSG_SD_ERR_WRITE_TO_FILE "error writing to file"
317
+	#define MSG_SD_CANT_ENTER_SUBDIR "Cannot enter subdir:"
318
+
319
+	#define MSG_STEPPER_TO_HIGH "Steprate to high : "
320
+	#define MSG_ENDSTOPS_HIT "endstops hit: "
321
+	#define MSG_ERR_COLD_EXTRUDE_STOP " cold extrusion prevented"
322
+	#define MSG_ERR_LONG_EXTRUDE_STOP " too long extrusion prevented"
323
+
324
+#endif
316 325
 #endif // ifndef LANGUAGE_H

+ 2
- 1
Marlin/ultralcd.h Ver fichero

@@ -51,7 +51,7 @@
51 51
   #define blocktime 500
52 52
   #define lcdslow 5
53 53
     
54
-  enum MainStatus{Main_Status, Main_Menu, Main_Prepare,Sub_PrepareMove, Main_Control, Main_SD,Sub_TempControl,Sub_MotionControl};
54
+  enum MainStatus{Main_Status, Main_Menu, Main_Prepare,Sub_PrepareMove, Main_Control, Main_SD,Sub_TempControl,Sub_MotionControl,Sub_RetractControl};
55 55
 
56 56
   class MainMenu{
57 57
   public:
@@ -68,6 +68,7 @@
68 68
     void showControl();
69 69
     void showControlMotion();
70 70
     void showControlTemp();
71
+    void showControlRetract();
71 72
     void showAxisMove();
72 73
     void showSD();
73 74
     bool force_lcd_update;

+ 255
- 0
Marlin/ultralcd.pde Ver fichero

@@ -1688,6 +1688,8 @@ void MainMenu::showControlMotion()
1688 1688
         }
1689 1689
         
1690 1690
       }break;
1691
+     
1692
+    
1691 1693
     case ItemCM_aret://float retract_acceleration = 7000;
1692 1694
     {
1693 1695
         if(force_lcd_update)
@@ -1885,7 +1887,251 @@ void MainMenu::showControlMotion()
1885 1887
 
1886 1888
 
1887 1889
 enum {
1890
+  ItemR_exit,
1891
+  ItemR_autoretract,
1892
+  ItemR_retract_length,ItemR_retract_feedrate,ItemR_retract_zlift,
1893
+  ItemR_unretract_length,ItemR_unretract_feedrate,
1894
+  
1895
+};
1896
+
1897
+
1898
+
1899
+void MainMenu::showControlRetract()
1900
+{
1901
+#ifdef FWRETRACT
1902
+ uint8_t line=0;
1903
+ clearIfNecessary();
1904
+ for(int8_t i=lineoffset;i<lineoffset+LCD_HEIGHT;i++)
1905
+ {
1906
+  switch(i)
1907
+  {
1908
+    case ItemR_exit:
1909
+      MENUITEM(  lcdprintPGM(MSG_CONTROL)  ,  BLOCK;status=Main_Control;beepshort(); ) ;
1910
+      break;
1911
+    
1912
+      //float retract_length=2, retract_feedrate=1200, retract_zlift=0.4;
1913
+  //float retract_recover_length=0, retract_recover_feedrate=500;
1914
+      case ItemR_autoretract:
1915
+      {
1916
+        if(force_lcd_update)
1917
+        {
1918
+          lcd.setCursor(0,line);lcdprintPGM(MSG_AUTORETRACT);
1919
+          lcd.setCursor(13,line);
1920
+          if(autoretract_enabled)
1921
+            lcdprintPGM(MSG_ON);
1922
+          else
1923
+            lcdprintPGM(MSG_OFF);
1924
+        }
1925
+        
1926
+        if((activeline!=line) )
1927
+          break;
1928
+        
1929
+        if(CLICKED)
1930
+        {
1931
+          autoretract_enabled=!autoretract_enabled;
1932
+          lcd.setCursor(13,line);
1933
+          if(autoretract_enabled)
1934
+            lcdprintPGM(MSG_ON);
1935
+          else
1936
+            lcdprintPGM(MSG_OFF);
1937
+          BLOCK;
1938
+        }
1939
+        
1940
+      }break;  
1941
+    
1942
+      case ItemR_retract_length:
1943
+    {
1944
+        if(force_lcd_update)
1945
+        {
1946
+          lcd.setCursor(0,line);lcdprintPGM(MSG_CONTROL_RETRACT);
1947
+          lcd.setCursor(13,line);lcd.print(ftostr52(retract_length));
1948
+        }
1949
+        
1950
+        if((activeline!=line) )
1951
+          break;
1952
+        
1953
+        if(CLICKED)
1954
+        {
1955
+          linechanging=!linechanging;
1956
+          if(linechanging)
1957
+          {
1958
+              encoderpos=(long)(retract_length*100);
1959
+          }
1960
+          else
1961
+          {
1962
+            retract_length= encoderpos/100.;
1963
+            encoderpos=activeline*lcdslow;
1964
+              
1965
+          }
1966
+          BLOCK;
1967
+          beepshort();
1968
+        }
1969
+        if(linechanging)
1970
+        {
1971
+          if(encoderpos<1) encoderpos=1;
1972
+          if(encoderpos>990) encoderpos=990;
1973
+          lcd.setCursor(13,line);lcd.print(ftostr52(encoderpos/100.));
1974
+        }
1975
+        
1976
+      }break;
1977
+      case ItemR_retract_feedrate:
1978
+    {
1979
+        if(force_lcd_update)
1980
+        {
1981
+          lcd.setCursor(0,line);lcdprintPGM(MSG_CONTROL_RETRACTF);
1982
+          lcd.setCursor(13,line);lcd.print(itostr4(retract_feedrate));
1983
+        }
1984
+        
1985
+        if((activeline!=line) )
1986
+          break;
1987
+        
1988
+        if(CLICKED)
1989
+        {
1990
+          linechanging=!linechanging;
1991
+          if(linechanging)
1992
+          {
1993
+              encoderpos=(long)(retract_feedrate/5);
1994
+          }
1995
+          else
1996
+          {
1997
+            retract_feedrate= encoderpos*5.;
1998
+            encoderpos=activeline*lcdslow;
1999
+              
2000
+          }
2001
+          BLOCK;
2002
+          beepshort();
2003
+        }
2004
+        if(linechanging)
2005
+        {
2006
+          if(encoderpos<1) encoderpos=1;
2007
+          if(encoderpos>990) encoderpos=990;
2008
+          lcd.setCursor(13,line);lcd.print(itostr4(encoderpos*5));
2009
+        }
2010
+        
2011
+      }break;
2012
+      case ItemR_retract_zlift://float retract_acceleration = 7000;
2013
+    {
2014
+        if(force_lcd_update)
2015
+        {
2016
+          lcd.setCursor(0,line);lcdprintPGM(MSG_CONTROL_RETRACT_ZLIFT);
2017
+          lcd.setCursor(13,line);lcd.print(ftostr52(retract_zlift));;
2018
+        }
2019
+        
2020
+        if((activeline!=line) )
2021
+          break;
2022
+        
2023
+        if(CLICKED)
2024
+        {
2025
+          linechanging=!linechanging;
2026
+          if(linechanging)
2027
+          {
2028
+              encoderpos=(long)(retract_zlift*10);
2029
+          }
2030
+          else
2031
+          {
2032
+            retract_zlift= encoderpos/10.;
2033
+            encoderpos=activeline*lcdslow;
2034
+              
2035
+          }
2036
+          BLOCK;
2037
+          beepshort();
2038
+        }
2039
+        if(linechanging)
2040
+        {
2041
+          if(encoderpos<0) encoderpos=0;
2042
+          if(encoderpos>990) encoderpos=990;
2043
+          lcd.setCursor(13,line);lcd.print(ftostr52(encoderpos/10.));
2044
+        }
2045
+        
2046
+      }break;
2047
+      case ItemR_unretract_length:
2048
+    {
2049
+        if(force_lcd_update)
2050
+        {
2051
+          lcd.setCursor(0,line);lcdprintPGM(MSG_CONTROL_RETRACT_RECOVER);
2052
+          lcd.setCursor(13,line);lcd.print(ftostr52(retract_recover_length));;
2053
+        }
2054
+        
2055
+        if((activeline!=line) )
2056
+          break;
2057
+        
2058
+        if(CLICKED)
2059
+        {
2060
+          linechanging=!linechanging;
2061
+          if(linechanging)
2062
+          {
2063
+              encoderpos=(long)(retract_recover_length*100);
2064
+          }
2065
+          else
2066
+          {
2067
+            retract_recover_length= encoderpos/100.;
2068
+            encoderpos=activeline*lcdslow;
2069
+              
2070
+          }
2071
+          BLOCK;
2072
+          beepshort();
2073
+        }
2074
+        if(linechanging)
2075
+        {
2076
+          if(encoderpos<0) encoderpos=0;
2077
+          if(encoderpos>990) encoderpos=990;
2078
+          lcd.setCursor(13,line);lcd.print(ftostr52(encoderpos/100.));
2079
+        }
2080
+        
2081
+      }break;
2082
+      
2083
+      case ItemR_unretract_feedrate:
2084
+    {
2085
+        if(force_lcd_update)
2086
+        {
2087
+          lcd.setCursor(0,line);lcdprintPGM(MSG_CONTROL_RETRACT_RECOVERF);
2088
+          lcd.setCursor(13,line);lcd.print(itostr4(retract_recover_feedrate));
2089
+        }
2090
+        
2091
+        if((activeline!=line) )
2092
+          break;
2093
+        
2094
+        if(CLICKED)
2095
+        {
2096
+          linechanging=!linechanging;
2097
+          if(linechanging)
2098
+          {
2099
+              encoderpos=(long)retract_recover_feedrate/5;
2100
+          }
2101
+          else
2102
+          {
2103
+            retract_recover_feedrate= encoderpos*5.;
2104
+            encoderpos=activeline*lcdslow;
2105
+              
2106
+          }
2107
+          BLOCK;
2108
+          beepshort();
2109
+        }
2110
+        if(linechanging)
2111
+        {
2112
+          if(encoderpos<1) encoderpos=1;
2113
+          if(encoderpos>990) encoderpos=990;
2114
+          lcd.setCursor(13,line);lcd.print(itostr4(encoderpos*5));
2115
+        }
2116
+        
2117
+      }break;
2118
+    
2119
+    default:   
2120
+      break;
2121
+  }
2122
+  line++;
2123
+ }
2124
+ updateActiveLines(ItemR_unretract_feedrate,encoderpos);
2125
+#endif
2126
+}
2127
+
2128
+
2129
+
2130
+enum {
1888 2131
   ItemC_exit,ItemC_temp,ItemC_move,
2132
+#ifdef FWRETRACT
2133
+  ItemC_rectract,
2134
+#endif
1889 2135
   ItemC_store, ItemC_load,ItemC_failsafe
1890 2136
 };
1891 2137
 
@@ -1906,6 +2152,11 @@ void MainMenu::showControl()
1906 2152
    case ItemC_move:
1907 2153
       MENUITEM(  lcdprintPGM(MSG_MOTION_WIDE)  ,  BLOCK;status=Sub_MotionControl;beepshort(); ) ;
1908 2154
       break;
2155
+#ifdef FWRETRACT
2156
+    case ItemC_rectract:
2157
+      MENUITEM(  lcdprintPGM(MSG_RECTRACT_WIDE)  ,  BLOCK;status=Sub_RetractControl;beepshort(); ) ;
2158
+      break;
2159
+#endif
1909 2160
     case ItemC_store:
1910 2161
     {
1911 2162
       if(force_lcd_update)
@@ -2250,6 +2501,10 @@ void MainMenu::update()
2250 2501
       {
2251 2502
         showControlMotion(); 
2252 2503
       }break;
2504
+      case Sub_RetractControl:
2505
+      {
2506
+        showControlRetract(); 
2507
+      }break;
2253 2508
       case Sub_TempControl:
2254 2509
       {
2255 2510
         showControlTemp(); 

Loading…
Cancelar
Guardar