Parcourir la source

Added more defines to the language.h file so that nowe most of the text strings are now configured via this file. Still got some hunting down to do to complete this task.

Blair Thompson il y a 13 ans
Parent
révision
046a8e0039

+ 58
- 0
Marlin/.Marlin.vsarduino.h Voir le fichier

@@ -0,0 +1,58 @@
1
+#define __AVR_ATmega2560__
2
+#define __cplusplus
3
+#define __builtin_va_list int
4
+#define __attribute__(x)
5
+#define __inline__
6
+#define __asm__(x)
7
+#define ARDUINO 23
8
+extern "C" void __cxa_pure_virtual() {}
9
+#include "C:\arduino-0023\libraries\LiquidCrystal\LiquidCrystal.h"
10
+#include "C:\arduino-0023\libraries\LiquidCrystal\LiquidCrystal.cpp"
11
+void enquecommand(const char *cmd);
12
+void setup_photpin();
13
+void setup_powerhold();
14
+void suicide();
15
+void setup();
16
+void loop();
17
+void get_command();
18
+float code_value();
19
+long code_value_long();
20
+bool code_seen(char code_string[]);
21
+bool code_seen(char code);
22
+void process_commands();
23
+void process_commands();
24
+void FlushSerialRequestResend();
25
+void ClearToSend();
26
+void get_coordinates();
27
+void get_arc_coordinates();
28
+void prepare_move();
29
+void prepare_arc_move(char isclockwise);
30
+void manage_inactivity(byte debug);
31
+void kill();
32
+void lcdProgMemprint(const char *str);
33
+int intround(const float &x);
34
+void lcd_status(const char* message);
35
+void lcd_statuspgm(const char* message);
36
+FORCE_INLINE void clear();
37
+void lcd_init();
38
+void beep();
39
+void beepshort();
40
+void lcd_status();
41
+void buttons_init();
42
+void buttons_check();
43
+char *ftostr3(const float &x);
44
+char *itostr2(const uint8_t &x);
45
+char *ftostr31(const float &x);
46
+char *ftostr32(const float &x);
47
+char *itostr31(const int &xx);
48
+char *itostr3(const int &xx);
49
+char *itostr4(const int &xx);
50
+char *ftostr51(const float &x);
51
+char *ftostr52(const float &x);
52
+void wd_init();
53
+void wd_reset();
54
+
55
+#include "C:\arduino-0023\hardware\arduino\cores\arduino\WProgram.h"
56
+#include "C:\Users\Blair\Desktop\Marlin\Marlin\Marlin.pde" 
57
+#include "C:\Users\Blair\Desktop\Marlin\Marlin\ultralcd.pde"
58
+#include "C:\Users\Blair\Desktop\Marlin\Marlin\watchdog.pde"

+ 48
- 47
Marlin/Marlin.pde Voir le fichier

@@ -254,28 +254,28 @@ void setup()
254 254
 
255 255
   // Check startup - does nothing if bootloader sets MCUSR to 0
256 256
   byte mcu = MCUSR;
257
-  if(mcu & 1) SERIAL_ECHOLNPGM("PowerUp");
258
-  if(mcu & 2) SERIAL_ECHOLNPGM("External Reset");
259
-  if(mcu & 4) SERIAL_ECHOLNPGM("Brown out Reset");
260
-  if(mcu & 8) SERIAL_ECHOLNPGM("Watchdog Reset");
261
-  if(mcu & 32) SERIAL_ECHOLNPGM("Software Reset");
257
+  if(mcu & 1) SERIAL_ECHOLNPGM(MSG_POWERUP);
258
+  if(mcu & 2) SERIAL_ECHOLNPGM(MSG_EXTERNAL_RESET);
259
+  if(mcu & 4) SERIAL_ECHOLNPGM(MSG_BROWNOUT_RESET);
260
+  if(mcu & 8) SERIAL_ECHOLNPGM(MSG_WATCHDOG_RESET);
261
+  if(mcu & 32) SERIAL_ECHOLNPGM(MSG_SOFTWARE_RESET);
262 262
   MCUSR=0;
263 263
 
264
-  SERIAL_ECHOPGM("Marlin: ");
264
+  SERIAL_ECHOPGM(MSG_MARLIN);
265 265
   SERIAL_ECHOLNPGM(VERSION_STRING);
266 266
   #ifdef STRING_VERSION_CONFIG_H
267 267
     #ifdef STRING_CONFIG_H_AUTHOR
268 268
       SERIAL_ECHO_START;
269
-      SERIAL_ECHOPGM("Configuration.h: ");
269
+      SERIAL_ECHOPGM(MSG_CONFIGURATION_VER);
270 270
       SERIAL_ECHOPGM(STRING_VERSION_CONFIG_H);
271
-      SERIAL_ECHOPGM(" | Author: ");
271
+      SERIAL_ECHOPGM(MSG_AUTHOR);
272 272
       SERIAL_ECHOLNPGM(STRING_CONFIG_H_AUTHOR);
273 273
     #endif
274 274
   #endif
275 275
   SERIAL_ECHO_START;
276
-  SERIAL_ECHOPGM("Free Memory:");
276
+  SERIAL_ECHOPGM(MSG_FREE_MEMORY);
277 277
   SERIAL_ECHO(freeMemory());
278
-  SERIAL_ECHOPGM(" PlannerBufferBytes:");
278
+  SERIAL_ECHOPGM(MSG_PLANNER_BUFFER_BYTES);
279 279
   SERIAL_ECHOLN((int)sizeof(block_t)*BLOCK_BUFFER_SIZE);
280 280
   for(int8_t i = 0; i < BUFSIZE; i++)
281 281
   {
@@ -312,12 +312,12 @@ void loop()
312 312
 	if(strstr(cmdbuffer[bufindr],"M29") == NULL)
313 313
 	{
314 314
 	  card.write_command(cmdbuffer[bufindr]);
315
-	  SERIAL_PROTOCOLLNPGM("ok");
315
+	  SERIAL_PROTOCOLLNPGM(MSG_OK);
316 316
 	}
317 317
 	else
318 318
 	{
319 319
 	  card.closefile();
320
-	  SERIAL_PROTOCOLLNPGM("Done saving file.");
320
+	  SERIAL_PROTOCOLLNPGM(MSG_FILE_SAVED);
321 321
 	}
322 322
       }
323 323
       else
@@ -357,7 +357,7 @@ void get_command()
357 357
           gcode_N = (strtol(&cmdbuffer[bufindw][strchr_pointer - cmdbuffer[bufindw] + 1], NULL, 10));
358 358
           if(gcode_N != gcode_LastN+1 && (strstr(cmdbuffer[bufindw], "M110") == NULL) ) {
359 359
             SERIAL_ERROR_START;
360
-            SERIAL_ERRORPGM("Line Number is not Last Line Number+1, Last Line:");
360
+            SERIAL_ERRORPGM(MSG_ERR_LINE_NO);
361 361
             SERIAL_ERRORLN(gcode_LastN);
362 362
             //Serial.println(gcode_N);
363 363
             FlushSerialRequestResend();
@@ -374,7 +374,7 @@ void get_command()
374 374
 
375 375
             if( (int)(strtod(&cmdbuffer[bufindw][strchr_pointer - cmdbuffer[bufindw] + 1], NULL)) != checksum) {
376 376
               SERIAL_ERROR_START;
377
-              SERIAL_ERRORPGM("checksum mismatch, Last Line:");
377
+              SERIAL_ERRORPGM(MSG_ERR_CHECKSUM_MISMATCH);
378 378
               SERIAL_ERRORLN(gcode_LastN);
379 379
               FlushSerialRequestResend();
380 380
               serial_count = 0;
@@ -385,7 +385,7 @@ void get_command()
385 385
           else 
386 386
           {
387 387
             SERIAL_ERROR_START;
388
-            SERIAL_ERRORPGM("No Checksum with line number, Last Line:");
388
+            SERIAL_ERRORPGM(MSG_ERR_NO_CHECKSUM);
389 389
             SERIAL_ERRORLN(gcode_LastN);
390 390
             FlushSerialRequestResend();
391 391
             serial_count = 0;
@@ -400,7 +400,7 @@ void get_command()
400 400
           if((strstr(cmdbuffer[bufindw], "*") != NULL))
401 401
           {
402 402
             SERIAL_ERROR_START;
403
-            SERIAL_ERRORPGM("No Line Number with checksum, Last Line:");
403
+            SERIAL_ERRORPGM(MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM);
404 404
             SERIAL_ERRORLN(gcode_LastN);
405 405
             serial_count = 0;
406 406
             return;
@@ -417,7 +417,7 @@ void get_command()
417 417
             if(card.saving)
418 418
               break;
419 419
 	    #endif //SDSUPPORT
420
-            SERIAL_PROTOCOLLNPGM("ok"); 
420
+            SERIAL_PROTOCOLLNPGM(MSG_OK); 
421 421
             break;
422 422
           default:
423 423
             break;
@@ -445,7 +445,7 @@ void get_command()
445 445
     if(serial_char == '\n' || serial_char == '\r' || serial_char == ':' || serial_count >= (MAX_CMD_SIZE - 1)||n==-1) 
446 446
     {
447 447
       if(card.eof()){
448
-        SERIAL_PROTOCOLLNPGM("Done printing file");
448
+        SERIAL_PROTOCOLLNPGM(MSG_FILE_PRINTED);
449 449
         stoptime=millis();
450 450
         char time[30];
451 451
         unsigned long t=(stoptime-starttime)/1000;
@@ -559,7 +559,7 @@ void process_commands()
559 559
       prepare_arc_move(false);
560 560
       return;
561 561
     case 4: // G4 dwell
562
-      LCD_MESSAGEPGM("DWELL...");
562
+      LCD_MESSAGEPGM(MSG_DWELL);
563 563
       codenum = 0;
564 564
       if(code_seen('P')) codenum = code_value(); // milliseconds to wait
565 565
       if(code_seen('S')) codenum = code_value() * 1000; // seconds to wait
@@ -681,7 +681,7 @@ void process_commands()
681 681
     switch( (int)code_value() ) 
682 682
     {
683 683
     case 17:
684
-        LCD_MESSAGEPGM("No move.");
684
+        LCD_MESSAGEPGM(MSG_NO_MOVE);
685 685
         enable_x(); 
686 686
         enable_y(); 
687 687
         enable_z(); 
@@ -692,9 +692,9 @@ void process_commands()
692 692
 
693 693
 #ifdef SDSUPPORT
694 694
     case 20: // M20 - list SD card
695
-      SERIAL_PROTOCOLLNPGM("Begin file list");
695
+      SERIAL_PROTOCOLLNPGM(MSG_BEGIN_FILE_LIST);
696 696
       card.ls();
697
-      SERIAL_PROTOCOLLNPGM("End file list");
697
+      SERIAL_PROTOCOLLNPGM(MSG_END_FILE_LIST);
698 698
       break;
699 699
     case 21: // M21 - init SD card
700 700
       
@@ -787,7 +787,7 @@ void process_commands()
787 787
         tmp_extruder = code_value();
788 788
         if(tmp_extruder >= EXTRUDERS) {
789 789
           SERIAL_ECHO_START;
790
-          SERIAL_ECHO("M104 Invalid extruder ");
790
+          SERIAL_ECHO(MSG_M104_INVALID_EXTRUDER);
791 791
           SERIAL_ECHOLN(tmp_extruder);
792 792
           break;
793 793
         }
@@ -804,7 +804,7 @@ void process_commands()
804 804
         tmp_extruder = code_value();
805 805
         if(tmp_extruder >= EXTRUDERS) {
806 806
           SERIAL_ECHO_START;
807
-          SERIAL_ECHO("M105 Invalid extruder ");
807
+          SERIAL_ECHO(MSG_M105_INVALID_EXTRUDER);
808 808
           SERIAL_ECHOLN(tmp_extruder);
809 809
           break;
810 810
         }
@@ -818,7 +818,7 @@ void process_commands()
818 818
         #endif //TEMP_BED_PIN
819 819
       #else
820 820
         SERIAL_ERROR_START;
821
-        SERIAL_ERRORLNPGM("No thermistors - no temp");
821
+        SERIAL_ERRORLNPGM(MSG_ERR_NO_THERMISTORS);
822 822
       #endif
823 823
       #ifdef PIDTEMP
824 824
         SERIAL_PROTOCOLPGM(" @:");
@@ -834,12 +834,12 @@ void process_commands()
834 834
         tmp_extruder = code_value();
835 835
         if(tmp_extruder >= EXTRUDERS) {
836 836
           SERIAL_ECHO_START;
837
-          SERIAL_ECHO("M109 Invalid extruder ");
837
+          SERIAL_ECHO(MSG_M109_INVALID_EXTRUDER);
838 838
           SERIAL_ECHOLN(tmp_extruder);
839 839
           break;
840 840
         }
841 841
       }
842
-      LCD_MESSAGEPGM("Heating...");   
842
+      LCD_MESSAGEPGM(MSG_HEATING);   
843 843
       #ifdef AUTOTEMP
844 844
         autotemp_enabled=false;
845 845
       #endif
@@ -905,14 +905,14 @@ void process_commands()
905 905
           }
906 906
         #endif //TEMP_RESIDENCY_TIME
907 907
         }
908
-        LCD_MESSAGEPGM("Heating done.");
908
+        LCD_MESSAGEPGM(MSG_HEATING_COMPLETE);
909 909
         starttime=millis();
910 910
         previous_millis_cmd = millis();
911 911
       }
912 912
       break;
913 913
     case 190: // M190 - Wait for bed heater to reach target.
914 914
     #if TEMP_BED_PIN > -1
915
-        LCD_MESSAGEPGM("Bed Heating.");
915
+        LCD_MESSAGEPGM(MSG_BED_HEATING);
916 916
         if (code_seen('S')) setTargetBed(code_value());
917 917
         codenum = millis(); 
918 918
         while(isHeatingBed()) 
@@ -930,7 +930,7 @@ void process_commands()
930 930
           }
931 931
           manage_heater();
932 932
         }
933
-        LCD_MESSAGEPGM("Bed done.");
933
+        LCD_MESSAGEPGM(MSG_BED_DONE);
934 934
         previous_millis_cmd = millis();
935 935
     #endif
936 936
         break;
@@ -1005,7 +1005,7 @@ void process_commands()
1005 1005
               disable_e2();
1006 1006
             }
1007 1007
           #endif 
1008
-          LCD_MESSAGEPGM("Partial Release");
1008
+          LCD_MESSAGEPGM(MSG_PART_RELEASE);
1009 1009
         }
1010 1010
       }
1011 1011
       break;
@@ -1021,7 +1021,7 @@ void process_commands()
1021 1021
       }
1022 1022
       break;
1023 1023
     case 115: // M115
1024
-      SerialprintPGM("FIRMWARE_NAME:Marlin; Sprinter/grbl mashup for gen6 FIRMWARE_URL:http://www.mendel-parts.com PROTOCOL_VERSION:1.0 MACHINE_TYPE:Mendel EXTRUDER_COUNT:1\n");
1024
+      SerialprintPGM(MSG_M115_REPORT);
1025 1025
       break;
1026 1026
     case 117: // M117 display message
1027 1027
       LCD_MESSAGE(cmdbuffer[bufindr]+5);
@@ -1036,7 +1036,7 @@ void process_commands()
1036 1036
       SERIAL_PROTOCOLPGM("E:");      
1037 1037
       SERIAL_PROTOCOL(current_position[E_AXIS]);
1038 1038
       
1039
-      SERIAL_PROTOCOLPGM(" Count X:");
1039
+      SERIAL_PROTOCOLPGM(MSG_COUNT_X);
1040 1040
       SERIAL_PROTOCOL(float(st_get_position(X_AXIS))/axis_steps_per_unit[X_AXIS]);
1041 1041
       SERIAL_PROTOCOLPGM("Y:");
1042 1042
       SERIAL_PROTOCOL(float(st_get_position(Y_AXIS))/axis_steps_per_unit[Y_AXIS]);
@@ -1047,27 +1047,27 @@ void process_commands()
1047 1047
       break;
1048 1048
     case 119: // M119
1049 1049
       #if (X_MIN_PIN > -1)
1050
-        SERIAL_PROTOCOLPGM("x_min:");
1050
+        SERIAL_PROTOCOLPGM(MSG_X_MIN);
1051 1051
         SERIAL_PROTOCOL(((READ(X_MIN_PIN)^X_ENDSTOPS_INVERTING)?"H ":"L "));
1052 1052
       #endif
1053 1053
       #if (X_MAX_PIN > -1)
1054
-        SERIAL_PROTOCOLPGM("x_max:");
1054
+        SERIAL_PROTOCOLPGM(MSG_X_MAX);
1055 1055
         SERIAL_PROTOCOL(((READ(X_MAX_PIN)^X_ENDSTOPS_INVERTING)?"H ":"L "));
1056 1056
       #endif
1057 1057
       #if (Y_MIN_PIN > -1)
1058
-        SERIAL_PROTOCOLPGM("y_min:");
1058
+        SERIAL_PROTOCOLPGM(MSG_Y_MIN);
1059 1059
         SERIAL_PROTOCOL(((READ(Y_MIN_PIN)^Y_ENDSTOPS_INVERTING)?"H ":"L "));
1060 1060
       #endif
1061 1061
       #if (Y_MAX_PIN > -1)
1062
-        SERIAL_PROTOCOLPGM("y_max:");
1062
+        SERIAL_PROTOCOLPGM(MSG_Y_MAX);
1063 1063
         SERIAL_PROTOCOL(((READ(Y_MAX_PIN)^Y_ENDSTOPS_INVERTING)?"H ":"L "));
1064 1064
       #endif
1065 1065
       #if (Z_MIN_PIN > -1)
1066
-        SERIAL_PROTOCOLPGM("z_min:");
1066
+        SERIAL_PROTOCOLPGM(MSG_Z_MIN);
1067 1067
         SERIAL_PROTOCOL(((READ(Z_MIN_PIN)^Z_ENDSTOPS_INVERTING)?"H ":"L "));
1068 1068
       #endif
1069 1069
       #if (Z_MAX_PIN > -1)
1070
-        SERIAL_PROTOCOLPGM("z_max:");
1070
+        SERIAL_PROTOCOLPGM(MSG_Z_MAX);
1071 1071
         SERIAL_PROTOCOL(((READ(Z_MAX_PIN)^Z_ENDSTOPS_INVERTING)?"H ":"L "));
1072 1072
       #endif
1073 1073
       SERIAL_PROTOCOLLN("");
@@ -1144,7 +1144,8 @@ void process_commands()
1144 1144
         if(code_seen('C')) Kc = code_value();
1145 1145
         #endif
1146 1146
         updatePID();
1147
-        SERIAL_PROTOCOL("ok p:");
1147
+        SERIAL_PROTOCOL(MSG_OK);
1148
+		SERIAL_PROTOCOL(" p:");
1148 1149
         SERIAL_PROTOCOL(Kp);
1149 1150
         SERIAL_PROTOCOL(" i:");
1150 1151
         SERIAL_PROTOCOL(Ki/PID_dT);
@@ -1223,12 +1224,12 @@ void process_commands()
1223 1224
       SERIAL_ECHO_START;
1224 1225
       SERIAL_ECHO("T");
1225 1226
       SERIAL_ECHO(tmp_extruder);
1226
-      SERIAL_ECHOLN("Invalid extruder");
1227
+      SERIAL_ECHOLN(MSG_INVALID_EXTRUDER);
1227 1228
     }
1228 1229
     else {
1229 1230
       active_extruder = tmp_extruder;
1230 1231
       SERIAL_ECHO_START;
1231
-      SERIAL_ECHO("Active Extruder: ");
1232
+      SERIAL_ECHO(MSG_ACTIVE_EXTRUDER);
1232 1233
       SERIAL_PROTOCOLLN((int)active_extruder);
1233 1234
     }
1234 1235
   }
@@ -1236,7 +1237,7 @@ void process_commands()
1236 1237
   else
1237 1238
   {
1238 1239
     SERIAL_ECHO_START;
1239
-    SERIAL_ECHOPGM("Unknown command:\"");
1240
+    SERIAL_ECHOPGM(MSG_UNKNOWN_COMMAND);
1240 1241
     SERIAL_ECHO(cmdbuffer[bufindr]);
1241 1242
     SERIAL_ECHOLNPGM("\"");
1242 1243
   }
@@ -1248,7 +1249,7 @@ void FlushSerialRequestResend()
1248 1249
 {
1249 1250
   //char cmdbuffer[bufindr][100]="Resend:";
1250 1251
   MYSERIAL.flush();
1251
-  SERIAL_PROTOCOLPGM("Resend:");
1252
+  SERIAL_PROTOCOLPGM(MSG_RESEND);
1252 1253
   SERIAL_PROTOCOLLN(gcode_LastN + 1);
1253 1254
   ClearToSend();
1254 1255
 }
@@ -1260,7 +1261,7 @@ void ClearToSend()
1260 1261
   if(fromsd[bufindr])
1261 1262
     return;
1262 1263
   #endif //SDSUPPORT
1263
-  SERIAL_PROTOCOLLNPGM("ok"); 
1264
+  SERIAL_PROTOCOLLNPGM(MSG_OK); 
1264 1265
 }
1265 1266
 
1266 1267
 void get_coordinates()
@@ -1370,8 +1371,8 @@ void kill()
1370 1371
   
1371 1372
   if(PS_ON_PIN > -1) pinMode(PS_ON_PIN,INPUT);
1372 1373
   SERIAL_ERROR_START;
1373
-  SERIAL_ERRORLNPGM("Printer halted. kill() called !!");
1374
-  LCD_MESSAGEPGM("KILLED. ");
1374
+  SERIAL_ERRORLNPGM(MSG_ERR_KILLED);
1375
+  LCD_MESSAGEPGM(MSG_KILLED);
1375 1376
   suicide();
1376 1377
   while(1); // Wait for reset
1377 1378
 }

BIN
Marlin/Marlin.sdf Voir le fichier


+ 20
- 0
Marlin/Marlin.sln Voir le fichier

@@ -0,0 +1,20 @@
1
+
2
+Microsoft Visual Studio Solution File, Format Version 11.00
3
+# Visual Studio 2010
4
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Marlin", "Marlin.vcxproj", "{A6365572-B176-4C2F-9B18-A75B62059578}"
5
+EndProject
6
+Global
7
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
8
+		Debug|Win32 = Debug|Win32
9
+		Release|Win32 = Release|Win32
10
+	EndGlobalSection
11
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
12
+		{A6365572-B176-4C2F-9B18-A75B62059578}.Debug|Win32.ActiveCfg = Debug|Win32
13
+		{A6365572-B176-4C2F-9B18-A75B62059578}.Debug|Win32.Build.0 = Debug|Win32
14
+		{A6365572-B176-4C2F-9B18-A75B62059578}.Release|Win32.ActiveCfg = Release|Win32
15
+		{A6365572-B176-4C2F-9B18-A75B62059578}.Release|Win32.Build.0 = Release|Win32
16
+	EndGlobalSection
17
+	GlobalSection(SolutionProperties) = preSolution
18
+		HideSolutionNode = FALSE
19
+	EndGlobalSection
20
+EndGlobal

BIN
Marlin/Marlin.suo Voir le fichier


+ 117
- 0
Marlin/Marlin.vcxproj Voir le fichier

@@ -0,0 +1,117 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+  <ItemGroup Label="ProjectConfigurations">
4
+    <ProjectConfiguration Include="Debug|Win32">
5
+      <Configuration>Debug</Configuration>
6
+      <Platform>Win32</Platform>
7
+    </ProjectConfiguration>
8
+    <ProjectConfiguration Include="Release|Win32">
9
+      <Configuration>Release</Configuration>
10
+      <Platform>Win32</Platform>
11
+    </ProjectConfiguration>
12
+  </ItemGroup>
13
+  <PropertyGroup Label="Globals">
14
+    <ProjectGuid>{A6365572-B176-4C2F-9B18-A75B62059578}</ProjectGuid>
15
+    <RootNamespace>Marlin</RootNamespace>
16
+  </PropertyGroup>
17
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
18
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
19
+    <ConfigurationType>Application</ConfigurationType>
20
+    <UseDebugLibraries>true</UseDebugLibraries>
21
+    <CharacterSet>MultiByte</CharacterSet>
22
+  </PropertyGroup>
23
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
24
+    <ConfigurationType>Application</ConfigurationType>
25
+    <UseDebugLibraries>false</UseDebugLibraries>
26
+    <WholeProgramOptimization>true</WholeProgramOptimization>
27
+    <CharacterSet>MultiByte</CharacterSet>
28
+  </PropertyGroup>
29
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
30
+  <ImportGroup Label="ExtensionSettings">
31
+  </ImportGroup>
32
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
33
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
34
+  </ImportGroup>
35
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
36
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
37
+  </ImportGroup>
38
+  <PropertyGroup Label="UserMacros" />
39
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
40
+    <IncludePath>C:\arduino-0023\hardware\arduino\cores\arduino;c:\arduino-0023\hardware\tools\avr\avr\include\;c:\arduino-0023\hardware\tools\avr\avr\include\avr\;c:\arduino-0023\hardware\tools\avr\avr\;c:\arduino-0023\hardware\tools\avr\lib\gcc\avr\4.3.2\include\;C:\arduino-0023\libraries\LiquidCrystal;C:\arduino-0023\libraries\LiquidCrystal\utility;</IncludePath>
41
+  </PropertyGroup>
42
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
43
+    <IncludePath>C:\arduino-0023\hardware\arduino\cores\arduino;c:\arduino-0023\hardware\tools\avr\avr\include\;c:\arduino-0023\hardware\tools\avr\avr\include\avr\;c:\arduino-0023\hardware\tools\avr\avr\;c:\arduino-0023\hardware\tools\avr\lib\gcc\avr\4.3.2\include\;C:\arduino-0023\libraries\LiquidCrystal;C:\arduino-0023\libraries\LiquidCrystal\utility;</IncludePath>
44
+  </PropertyGroup>
45
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
46
+    <ClCompile>
47
+      <WarningLevel>Level3</WarningLevel>
48
+      <Optimization>Disabled</Optimization>
49
+    </ClCompile>
50
+    <Link>
51
+      <GenerateDebugInformation>true</GenerateDebugInformation>
52
+    </Link>
53
+  </ItemDefinitionGroup>
54
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
55
+    <ClCompile>
56
+      <WarningLevel>Level3</WarningLevel>
57
+      <Optimization>MaxSpeed</Optimization>
58
+      <FunctionLevelLinking>true</FunctionLevelLinking>
59
+      <IntrinsicFunctions>true</IntrinsicFunctions>
60
+    </ClCompile>
61
+    <Link>
62
+      <GenerateDebugInformation>true</GenerateDebugInformation>
63
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
64
+      <OptimizeReferences>true</OptimizeReferences>
65
+    </Link>
66
+  </ItemDefinitionGroup>
67
+  <ItemGroup>
68
+    <None Include="Marlin.pde" />
69
+    <None Include="ultralcd.pde" />
70
+    <None Include="watchdog.pde" />
71
+  </ItemGroup>
72
+  <ItemGroup>
73
+    <ClCompile Include="cardreader.cpp" />
74
+    <ClCompile Include="MarlinSerial.cpp" />
75
+    <ClCompile Include="motion_control.cpp" />
76
+    <ClCompile Include="planner.cpp" />
77
+    <ClCompile Include="Sd2Card.cpp" />
78
+    <ClCompile Include="SdBaseFile.cpp" />
79
+    <ClCompile Include="SdFatUtil.cpp" />
80
+    <ClCompile Include="SdFile.cpp" />
81
+    <ClCompile Include="SdVolume.cpp" />
82
+    <ClCompile Include="stepper.cpp" />
83
+    <ClCompile Include="temperature.cpp" />
84
+  </ItemGroup>
85
+  <ItemGroup>
86
+    <ClInclude Include="cardreader.h" />
87
+    <ClInclude Include="Configuration.h" />
88
+    <ClInclude Include="Configuration_adv.h" />
89
+    <ClInclude Include="EEPROMwrite.h" />
90
+    <ClInclude Include="fastio.h" />
91
+    <ClInclude Include="language.h" />
92
+    <ClInclude Include="Marlin.h" />
93
+    <ClInclude Include="MarlinSerial.h" />
94
+    <ClInclude Include="motion_control.h" />
95
+    <ClInclude Include="pins.h" />
96
+    <ClInclude Include="planner.h" />
97
+    <ClInclude Include="Sd2Card.h" />
98
+    <ClInclude Include="Sd2PinMap.h" />
99
+    <ClInclude Include="SdBaseFile.h" />
100
+    <ClInclude Include="SdFatConfig.h" />
101
+    <ClInclude Include="SdFatStructs.h" />
102
+    <ClInclude Include="SdFatUtil.h" />
103
+    <ClInclude Include="SdFile.h" />
104
+    <ClInclude Include="SdInfo.h" />
105
+    <ClInclude Include="SdVolume.h" />
106
+    <ClInclude Include="speed_lookuptable.h" />
107
+    <ClInclude Include="stepper.h" />
108
+    <ClInclude Include="temperature.h" />
109
+    <ClInclude Include="thermistortables.h" />
110
+    <ClInclude Include="ultralcd.h" />
111
+    <ClInclude Include="watchdog.h" />
112
+    <ClInclude Include="wiring.h" />
113
+  </ItemGroup>
114
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
115
+  <ImportGroup Label="ExtensionTargets">
116
+  </ImportGroup>
117
+</Project>

+ 140
- 0
Marlin/Marlin.vcxproj.filters Voir le fichier

@@ -0,0 +1,140 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+  <ItemGroup>
4
+    <Filter Include="Source Files">
5
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6
+      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7
+    </Filter>
8
+    <Filter Include="Header Files">
9
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10
+      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
11
+    </Filter>
12
+    <Filter Include="Resource Files">
13
+      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14
+      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15
+    </Filter>
16
+  </ItemGroup>
17
+  <ItemGroup>
18
+    <None Include="Marlin.pde" />
19
+    <None Include="ultralcd.pde" />
20
+    <None Include="watchdog.pde" />
21
+  </ItemGroup>
22
+  <ItemGroup>
23
+    <ClCompile Include="cardreader.cpp">
24
+      <Filter>Source Files</Filter>
25
+    </ClCompile>
26
+    <ClCompile Include="MarlinSerial.cpp">
27
+      <Filter>Source Files</Filter>
28
+    </ClCompile>
29
+    <ClCompile Include="motion_control.cpp">
30
+      <Filter>Source Files</Filter>
31
+    </ClCompile>
32
+    <ClCompile Include="planner.cpp">
33
+      <Filter>Source Files</Filter>
34
+    </ClCompile>
35
+    <ClCompile Include="Sd2Card.cpp">
36
+      <Filter>Source Files</Filter>
37
+    </ClCompile>
38
+    <ClCompile Include="SdBaseFile.cpp">
39
+      <Filter>Source Files</Filter>
40
+    </ClCompile>
41
+    <ClCompile Include="SdFatUtil.cpp">
42
+      <Filter>Source Files</Filter>
43
+    </ClCompile>
44
+    <ClCompile Include="SdFile.cpp">
45
+      <Filter>Source Files</Filter>
46
+    </ClCompile>
47
+    <ClCompile Include="SdVolume.cpp">
48
+      <Filter>Source Files</Filter>
49
+    </ClCompile>
50
+    <ClCompile Include="stepper.cpp">
51
+      <Filter>Source Files</Filter>
52
+    </ClCompile>
53
+    <ClCompile Include="temperature.cpp">
54
+      <Filter>Source Files</Filter>
55
+    </ClCompile>
56
+  </ItemGroup>
57
+  <ItemGroup>
58
+    <ClInclude Include="cardreader.h">
59
+      <Filter>Header Files</Filter>
60
+    </ClInclude>
61
+    <ClInclude Include="Configuration.h">
62
+      <Filter>Header Files</Filter>
63
+    </ClInclude>
64
+    <ClInclude Include="Configuration_adv.h">
65
+      <Filter>Header Files</Filter>
66
+    </ClInclude>
67
+    <ClInclude Include="EEPROMwrite.h">
68
+      <Filter>Header Files</Filter>
69
+    </ClInclude>
70
+    <ClInclude Include="fastio.h">
71
+      <Filter>Header Files</Filter>
72
+    </ClInclude>
73
+    <ClInclude Include="language.h">
74
+      <Filter>Header Files</Filter>
75
+    </ClInclude>
76
+    <ClInclude Include="Marlin.h">
77
+      <Filter>Header Files</Filter>
78
+    </ClInclude>
79
+    <ClInclude Include="MarlinSerial.h">
80
+      <Filter>Header Files</Filter>
81
+    </ClInclude>
82
+    <ClInclude Include="motion_control.h">
83
+      <Filter>Header Files</Filter>
84
+    </ClInclude>
85
+    <ClInclude Include="pins.h">
86
+      <Filter>Header Files</Filter>
87
+    </ClInclude>
88
+    <ClInclude Include="planner.h">
89
+      <Filter>Header Files</Filter>
90
+    </ClInclude>
91
+    <ClInclude Include="Sd2Card.h">
92
+      <Filter>Header Files</Filter>
93
+    </ClInclude>
94
+    <ClInclude Include="Sd2PinMap.h">
95
+      <Filter>Header Files</Filter>
96
+    </ClInclude>
97
+    <ClInclude Include="SdBaseFile.h">
98
+      <Filter>Header Files</Filter>
99
+    </ClInclude>
100
+    <ClInclude Include="SdFatConfig.h">
101
+      <Filter>Header Files</Filter>
102
+    </ClInclude>
103
+    <ClInclude Include="SdFatStructs.h">
104
+      <Filter>Header Files</Filter>
105
+    </ClInclude>
106
+    <ClInclude Include="SdFatUtil.h">
107
+      <Filter>Header Files</Filter>
108
+    </ClInclude>
109
+    <ClInclude Include="SdFile.h">
110
+      <Filter>Header Files</Filter>
111
+    </ClInclude>
112
+    <ClInclude Include="SdInfo.h">
113
+      <Filter>Header Files</Filter>
114
+    </ClInclude>
115
+    <ClInclude Include="SdVolume.h">
116
+      <Filter>Header Files</Filter>
117
+    </ClInclude>
118
+    <ClInclude Include="speed_lookuptable.h">
119
+      <Filter>Header Files</Filter>
120
+    </ClInclude>
121
+    <ClInclude Include="stepper.h">
122
+      <Filter>Header Files</Filter>
123
+    </ClInclude>
124
+    <ClInclude Include="temperature.h">
125
+      <Filter>Header Files</Filter>
126
+    </ClInclude>
127
+    <ClInclude Include="thermistortables.h">
128
+      <Filter>Header Files</Filter>
129
+    </ClInclude>
130
+    <ClInclude Include="ultralcd.h">
131
+      <Filter>Header Files</Filter>
132
+    </ClInclude>
133
+    <ClInclude Include="watchdog.h">
134
+      <Filter>Header Files</Filter>
135
+    </ClInclude>
136
+    <ClInclude Include="wiring.h">
137
+      <Filter>Header Files</Filter>
138
+    </ClInclude>
139
+  </ItemGroup>
140
+</Project>

+ 3
- 0
Marlin/Marlin.vcxproj.user Voir le fichier

@@ -0,0 +1,3 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+</Project>

+ 20
- 18
Marlin/cardreader.cpp Voir le fichier

@@ -3,6 +3,8 @@
3 3
 #include "ultralcd.h"
4 4
 #include "stepper.h"
5 5
 #include "temperature.h"
6
+#include "language.h"
7
+
6 8
 #ifdef SDSUPPORT
7 9
 
8 10
 
@@ -75,7 +77,7 @@ void  CardReader::lsDive(const char *prepend,SdFile parent)
75 77
         if(lsAction==LS_SerialPrint)
76 78
         {
77 79
           SERIAL_ECHO_START;
78
-          SERIAL_ECHOLN("Cannot open subdir");
80
+          SERIAL_ECHOLN(MSG_SD_CANT_OPEN_SUBDIR);
79 81
           SERIAL_ECHOLN(lfilename);
80 82
         }
81 83
       }
@@ -143,28 +145,28 @@ void CardReader::initsd()
143 145
   {
144 146
     //if (!card.init(SPI_HALF_SPEED,SDSS))
145 147
     SERIAL_ECHO_START;
146
-    SERIAL_ECHOLNPGM("SD init fail");
148
+    SERIAL_ECHOLNPGM(MSG_SD_INIT_FAIL);
147 149
   }
148 150
   else if (!volume.init(&card))
149 151
   {
150 152
     SERIAL_ERROR_START;
151
-    SERIAL_ERRORLNPGM("volume.init failed");
153
+    SERIAL_ERRORLNPGM(MSG_SD_VOL_INIT_FAIL);
152 154
   }
153 155
   else if (!root.openRoot(&volume)) 
154 156
   {
155 157
     SERIAL_ERROR_START;
156
-    SERIAL_ERRORLNPGM("openRoot failed");
158
+    SERIAL_ERRORLNPGM(MSG_SD_OPENROOT_FAIL);
157 159
   }
158 160
   else 
159 161
   {
160 162
     cardOK = true;
161 163
     SERIAL_ECHO_START;
162
-    SERIAL_ECHOLNPGM("SD card ok");
164
+    SERIAL_ECHOLNPGM(MSG_SD_CARD_OK);
163 165
   }
164 166
   curDir=&root;
165 167
   if(!workDir.openRoot(&volume))
166 168
   {
167
-    SERIAL_ECHOLNPGM("workDir open failed");
169
+    SERIAL_ECHOLNPGM(MSG_SD_WORKDIR_FAIL);
168 170
   }
169 171
 }
170 172
 
@@ -173,7 +175,7 @@ void CardReader::setroot()
173 175
  curDir=&root;
174 176
   if(!workDir.openRoot(&volume))
175 177
   {
176
-    SERIAL_ECHOLNPGM("workDir open failed");
178
+    SERIAL_ECHOLNPGM(MSG_SD_WORKDIR_FAIL);
177 179
   } 
178 180
 }
179 181
 void CardReader::release()
@@ -230,7 +232,7 @@ void CardReader::openFile(char* name,bool read)
230 232
         SERIAL_ECHOLN(subdirname);
231 233
         if(!myDir.open(curDir,subdirname,O_READ))
232 234
         {
233
-          SERIAL_PROTOCOLPGM("open failed, File: ");
235
+          SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL);
234 236
           SERIAL_PROTOCOL(subdirname);
235 237
           SERIAL_PROTOCOLLNPGM(".");
236 238
           return;
@@ -260,18 +262,18 @@ void CardReader::openFile(char* name,bool read)
260 262
     if (file.open(curDir, fname, O_READ)) 
261 263
     {
262 264
       filesize = file.fileSize();
263
-      SERIAL_PROTOCOLPGM("File opened:");
265
+      SERIAL_PROTOCOLPGM(MSG_SD_FILE_OPENED);
264 266
       SERIAL_PROTOCOL(fname);
265
-      SERIAL_PROTOCOLPGM(" Size:");
267
+      SERIAL_PROTOCOLPGM(MSG_SD_SIZE);
266 268
       SERIAL_PROTOCOLLN(filesize);
267 269
       sdpos = 0;
268 270
       
269
-      SERIAL_PROTOCOLLNPGM("File selected");
271
+      SERIAL_PROTOCOLLNPGM(MSG_SD_FILE_SELECTED);
270 272
       LCD_MESSAGE(fname);
271 273
     }
272 274
     else
273 275
     {
274
-      SERIAL_PROTOCOLPGM("open failed, File: ");
276
+      SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL);
275 277
       SERIAL_PROTOCOL(fname);
276 278
       SERIAL_PROTOCOLLNPGM(".");
277 279
     }
@@ -280,14 +282,14 @@ void CardReader::openFile(char* name,bool read)
280 282
   { //write
281 283
     if (!file.open(curDir, fname, O_CREAT | O_APPEND | O_WRITE | O_TRUNC))
282 284
     {
283
-      SERIAL_PROTOCOLPGM("open failed, File: ");
285
+      SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL);
284 286
       SERIAL_PROTOCOL(fname);
285 287
       SERIAL_PROTOCOLLNPGM(".");
286 288
     }
287 289
     else
288 290
     {
289 291
       saving = true;
290
-      SERIAL_PROTOCOLPGM("Writing to file: ");
292
+      SERIAL_PROTOCOLPGM(MSG_SD_WRITE_TO_FILE);
291 293
       SERIAL_PROTOCOLLN(name);
292 294
       LCD_MESSAGE(fname);
293 295
     }
@@ -298,13 +300,13 @@ void CardReader::openFile(char* name,bool read)
298 300
 void CardReader::getStatus()
299 301
 {
300 302
   if(cardOK){
301
-    SERIAL_PROTOCOLPGM("SD printing byte ");
303
+    SERIAL_PROTOCOLPGM(MSG_SD_PRINTING_BYTE);
302 304
     SERIAL_PROTOCOL(sdpos);
303 305
     SERIAL_PROTOCOLPGM("/");
304 306
     SERIAL_PROTOCOLLN(filesize);
305 307
   }
306 308
   else{
307
-    SERIAL_PROTOCOLLNPGM("Not SD printing");
309
+    SERIAL_PROTOCOLLNPGM(MSG_SD_NOT_PRINTING);
308 310
   }
309 311
 }
310 312
 void CardReader::write_command(char *buf)
@@ -326,7 +328,7 @@ void CardReader::write_command(char *buf)
326 328
   if (file.writeError)
327 329
   {
328 330
     SERIAL_ERROR_START;
329
-    SERIAL_ERRORLNPGM("error writing to file");
331
+    SERIAL_ERRORLNPGM(MSG_SD_ERR_WRITE_TO_FILE);
330 332
   }
331 333
 }
332 334
 
@@ -420,7 +422,7 @@ void CardReader::chdir(const char * relpath)
420 422
   if(!newfile.open(*parent,relpath, O_READ))
421 423
   {
422 424
    SERIAL_ECHO_START;
423
-   SERIAL_ECHOPGM("Cannot enter subdir:");
425
+   SERIAL_ECHOPGM(MSG_SD_CANT_ENTER_SUBDIR);
424 426
    SERIAL_ECHOLN(relpath);
425 427
   }
426 428
   else

+ 143
- 196
Marlin/language.h Voir le fichier

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

+ 3
- 2
Marlin/planner.cpp Voir le fichier

@@ -59,6 +59,7 @@
59 59
 #include "stepper.h"
60 60
 #include "temperature.h"
61 61
 #include "ultralcd.h"
62
+#include "language.h"
62 63
 
63 64
 //===========================================================================
64 65
 //=============================public variables ============================
@@ -469,13 +470,13 @@ void plan_buffer_line(float &x, float &y, float &z, float &e, float feed_rate, u
469 470
     {
470 471
       position[E_AXIS]=target[E_AXIS]; //behave as if the move really took place, but ignore E part
471 472
       SERIAL_ECHO_START;
472
-      SERIAL_ECHOLNPGM(" cold extrusion prevented");
473
+      SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP);
473 474
     }
474 475
     if(labs(target[E_AXIS]-position[E_AXIS])>axis_steps_per_unit[E_AXIS]*EXTRUDE_MAXLENGTH)
475 476
     {
476 477
       position[E_AXIS]=target[E_AXIS]; //behave as if the move really took place, but ignore E part
477 478
       SERIAL_ECHO_START;
478
-      SERIAL_ECHOLNPGM(" too long extrusion prevented");
479
+      SERIAL_ECHOLNPGM(MSG_ERR_LONG_EXTRUDE_STOP);
479 480
     }
480 481
   #endif
481 482
   

+ 4
- 4
Marlin/stepper.cpp Voir le fichier

@@ -29,7 +29,7 @@
29 29
 #include "planner.h"
30 30
 #include "temperature.h"
31 31
 #include "ultralcd.h"
32
-
32
+#include "language.h"
33 33
 #include "speed_lookuptable.h"
34 34
 
35 35
 
@@ -172,7 +172,7 @@ void checkHitEndstops()
172 172
 {
173 173
  if( endstop_x_hit || endstop_y_hit || endstop_z_hit) {
174 174
    SERIAL_ECHO_START;
175
-   SERIAL_ECHOPGM("endstops hit: ");
175
+   SERIAL_ECHOPGM(MSG_ENDSTOPS_HIT);
176 176
    if(endstop_x_hit) {
177 177
      SERIAL_ECHOPAIR(" X:",(float)endstops_trigsteps[X_AXIS]/axis_steps_per_unit[X_AXIS]);
178 178
    }
@@ -254,7 +254,7 @@ FORCE_INLINE unsigned short calc_timer(unsigned short step_rate) {
254 254
     timer = (unsigned short)pgm_read_word_near(table_address);
255 255
     timer -= (((unsigned short)pgm_read_word_near(table_address+2) * (unsigned char)(step_rate & 0x0007))>>3);
256 256
   }
257
-  if(timer < 100) { timer = 100; MYSERIAL.print("Steprate to high : "); MYSERIAL.println(step_rate); }//(20kHz this should never happen)
257
+  if(timer < 100) { timer = 100; MYSERIAL.print(MSG_STEPPER_TO_HIGH); MYSERIAL.println(step_rate); }//(20kHz this should never happen)
258 258
   return timer;
259 259
 }
260 260
 
@@ -808,7 +808,7 @@ long st_get_position(uint8_t axis)
808 808
 void finishAndDisableSteppers()
809 809
 {
810 810
   st_synchronize(); 
811
-  LCD_MESSAGEPGM("Released.");
811
+  LCD_MESSAGEPGM(MSG_STEPPER_RELEASED);
812 812
   disable_x(); 
813 813
   disable_y(); 
814 814
   disable_z(); 

Chargement…
Annuler
Enregistrer