From: Blair Thompson Date: Sat, 3 Mar 2012 15:51:47 +0000 (+0000) Subject: Added more defines to the language.h file so that nowe most of the text strings are... X-Git-Tag: iwj-success-2012-07-29~76^2~2 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=046a8e00395f1458648326b94dfc9019a6803f05;p=marlin.git 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. --- diff --git a/Marlin/.Marlin.vsarduino.h b/Marlin/.Marlin.vsarduino.h new file mode 100644 index 0000000..d292597 --- /dev/null +++ b/Marlin/.Marlin.vsarduino.h @@ -0,0 +1,58 @@ +#define __AVR_ATmega2560__ +#define __cplusplus +#define __builtin_va_list int +#define __attribute__(x) +#define __inline__ +#define __asm__(x) +#define ARDUINO 23 +extern "C" void __cxa_pure_virtual() {} +#include "C:\arduino-0023\libraries\LiquidCrystal\LiquidCrystal.h" +#include "C:\arduino-0023\libraries\LiquidCrystal\LiquidCrystal.cpp" +void enquecommand(const char *cmd); +void setup_photpin(); +void setup_powerhold(); +void suicide(); +void setup(); +void loop(); +void get_command(); +float code_value(); +long code_value_long(); +bool code_seen(char code_string[]); +bool code_seen(char code); +void process_commands(); +void process_commands(); +void FlushSerialRequestResend(); +void ClearToSend(); +void get_coordinates(); +void get_arc_coordinates(); +void prepare_move(); +void prepare_arc_move(char isclockwise); +void manage_inactivity(byte debug); +void kill(); +void lcdProgMemprint(const char *str); +int intround(const float &x); +void lcd_status(const char* message); +void lcd_statuspgm(const char* message); +FORCE_INLINE void clear(); +void lcd_init(); +void beep(); +void beepshort(); +void lcd_status(); +void buttons_init(); +void buttons_check(); +char *ftostr3(const float &x); +char *itostr2(const uint8_t &x); +char *ftostr31(const float &x); +char *ftostr32(const float &x); +char *itostr31(const int &xx); +char *itostr3(const int &xx); +char *itostr4(const int &xx); +char *ftostr51(const float &x); +char *ftostr52(const float &x); +void wd_init(); +void wd_reset(); + +#include "C:\arduino-0023\hardware\arduino\cores\arduino\WProgram.h" +#include "C:\Users\Blair\Desktop\Marlin\Marlin\Marlin.pde" +#include "C:\Users\Blair\Desktop\Marlin\Marlin\ultralcd.pde" +#include "C:\Users\Blair\Desktop\Marlin\Marlin\watchdog.pde" diff --git a/Marlin/Marlin.pde b/Marlin/Marlin.pde index f417ae5..5f585e6 100644 --- a/Marlin/Marlin.pde +++ b/Marlin/Marlin.pde @@ -254,28 +254,28 @@ void setup() // Check startup - does nothing if bootloader sets MCUSR to 0 byte mcu = MCUSR; - if(mcu & 1) SERIAL_ECHOLNPGM("PowerUp"); - if(mcu & 2) SERIAL_ECHOLNPGM("External Reset"); - if(mcu & 4) SERIAL_ECHOLNPGM("Brown out Reset"); - if(mcu & 8) SERIAL_ECHOLNPGM("Watchdog Reset"); - if(mcu & 32) SERIAL_ECHOLNPGM("Software Reset"); + if(mcu & 1) SERIAL_ECHOLNPGM(MSG_POWERUP); + if(mcu & 2) SERIAL_ECHOLNPGM(MSG_EXTERNAL_RESET); + if(mcu & 4) SERIAL_ECHOLNPGM(MSG_BROWNOUT_RESET); + if(mcu & 8) SERIAL_ECHOLNPGM(MSG_WATCHDOG_RESET); + if(mcu & 32) SERIAL_ECHOLNPGM(MSG_SOFTWARE_RESET); MCUSR=0; - SERIAL_ECHOPGM("Marlin: "); + SERIAL_ECHOPGM(MSG_MARLIN); SERIAL_ECHOLNPGM(VERSION_STRING); #ifdef STRING_VERSION_CONFIG_H #ifdef STRING_CONFIG_H_AUTHOR SERIAL_ECHO_START; - SERIAL_ECHOPGM("Configuration.h: "); + SERIAL_ECHOPGM(MSG_CONFIGURATION_VER); SERIAL_ECHOPGM(STRING_VERSION_CONFIG_H); - SERIAL_ECHOPGM(" | Author: "); + SERIAL_ECHOPGM(MSG_AUTHOR); SERIAL_ECHOLNPGM(STRING_CONFIG_H_AUTHOR); #endif #endif SERIAL_ECHO_START; - SERIAL_ECHOPGM("Free Memory:"); + SERIAL_ECHOPGM(MSG_FREE_MEMORY); SERIAL_ECHO(freeMemory()); - SERIAL_ECHOPGM(" PlannerBufferBytes:"); + SERIAL_ECHOPGM(MSG_PLANNER_BUFFER_BYTES); SERIAL_ECHOLN((int)sizeof(block_t)*BLOCK_BUFFER_SIZE); for(int8_t i = 0; i < BUFSIZE; i++) { @@ -312,12 +312,12 @@ void loop() if(strstr(cmdbuffer[bufindr],"M29") == NULL) { card.write_command(cmdbuffer[bufindr]); - SERIAL_PROTOCOLLNPGM("ok"); + SERIAL_PROTOCOLLNPGM(MSG_OK); } else { card.closefile(); - SERIAL_PROTOCOLLNPGM("Done saving file."); + SERIAL_PROTOCOLLNPGM(MSG_FILE_SAVED); } } else @@ -357,7 +357,7 @@ void get_command() gcode_N = (strtol(&cmdbuffer[bufindw][strchr_pointer - cmdbuffer[bufindw] + 1], NULL, 10)); if(gcode_N != gcode_LastN+1 && (strstr(cmdbuffer[bufindw], "M110") == NULL) ) { SERIAL_ERROR_START; - SERIAL_ERRORPGM("Line Number is not Last Line Number+1, Last Line:"); + SERIAL_ERRORPGM(MSG_ERR_LINE_NO); SERIAL_ERRORLN(gcode_LastN); //Serial.println(gcode_N); FlushSerialRequestResend(); @@ -374,7 +374,7 @@ void get_command() if( (int)(strtod(&cmdbuffer[bufindw][strchr_pointer - cmdbuffer[bufindw] + 1], NULL)) != checksum) { SERIAL_ERROR_START; - SERIAL_ERRORPGM("checksum mismatch, Last Line:"); + SERIAL_ERRORPGM(MSG_ERR_CHECKSUM_MISMATCH); SERIAL_ERRORLN(gcode_LastN); FlushSerialRequestResend(); serial_count = 0; @@ -385,7 +385,7 @@ void get_command() else { SERIAL_ERROR_START; - SERIAL_ERRORPGM("No Checksum with line number, Last Line:"); + SERIAL_ERRORPGM(MSG_ERR_NO_CHECKSUM); SERIAL_ERRORLN(gcode_LastN); FlushSerialRequestResend(); serial_count = 0; @@ -400,7 +400,7 @@ void get_command() if((strstr(cmdbuffer[bufindw], "*") != NULL)) { SERIAL_ERROR_START; - SERIAL_ERRORPGM("No Line Number with checksum, Last Line:"); + SERIAL_ERRORPGM(MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM); SERIAL_ERRORLN(gcode_LastN); serial_count = 0; return; @@ -417,7 +417,7 @@ void get_command() if(card.saving) break; #endif //SDSUPPORT - SERIAL_PROTOCOLLNPGM("ok"); + SERIAL_PROTOCOLLNPGM(MSG_OK); break; default: break; @@ -445,7 +445,7 @@ void get_command() if(serial_char == '\n' || serial_char == '\r' || serial_char == ':' || serial_count >= (MAX_CMD_SIZE - 1)||n==-1) { if(card.eof()){ - SERIAL_PROTOCOLLNPGM("Done printing file"); + SERIAL_PROTOCOLLNPGM(MSG_FILE_PRINTED); stoptime=millis(); char time[30]; unsigned long t=(stoptime-starttime)/1000; @@ -559,7 +559,7 @@ void process_commands() prepare_arc_move(false); return; case 4: // G4 dwell - LCD_MESSAGEPGM("DWELL..."); + LCD_MESSAGEPGM(MSG_DWELL); codenum = 0; if(code_seen('P')) codenum = code_value(); // milliseconds to wait if(code_seen('S')) codenum = code_value() * 1000; // seconds to wait @@ -681,7 +681,7 @@ void process_commands() switch( (int)code_value() ) { case 17: - LCD_MESSAGEPGM("No move."); + LCD_MESSAGEPGM(MSG_NO_MOVE); enable_x(); enable_y(); enable_z(); @@ -692,9 +692,9 @@ void process_commands() #ifdef SDSUPPORT case 20: // M20 - list SD card - SERIAL_PROTOCOLLNPGM("Begin file list"); + SERIAL_PROTOCOLLNPGM(MSG_BEGIN_FILE_LIST); card.ls(); - SERIAL_PROTOCOLLNPGM("End file list"); + SERIAL_PROTOCOLLNPGM(MSG_END_FILE_LIST); break; case 21: // M21 - init SD card @@ -787,7 +787,7 @@ void process_commands() tmp_extruder = code_value(); if(tmp_extruder >= EXTRUDERS) { SERIAL_ECHO_START; - SERIAL_ECHO("M104 Invalid extruder "); + SERIAL_ECHO(MSG_M104_INVALID_EXTRUDER); SERIAL_ECHOLN(tmp_extruder); break; } @@ -804,7 +804,7 @@ void process_commands() tmp_extruder = code_value(); if(tmp_extruder >= EXTRUDERS) { SERIAL_ECHO_START; - SERIAL_ECHO("M105 Invalid extruder "); + SERIAL_ECHO(MSG_M105_INVALID_EXTRUDER); SERIAL_ECHOLN(tmp_extruder); break; } @@ -818,7 +818,7 @@ void process_commands() #endif //TEMP_BED_PIN #else SERIAL_ERROR_START; - SERIAL_ERRORLNPGM("No thermistors - no temp"); + SERIAL_ERRORLNPGM(MSG_ERR_NO_THERMISTORS); #endif #ifdef PIDTEMP SERIAL_PROTOCOLPGM(" @:"); @@ -834,12 +834,12 @@ void process_commands() tmp_extruder = code_value(); if(tmp_extruder >= EXTRUDERS) { SERIAL_ECHO_START; - SERIAL_ECHO("M109 Invalid extruder "); + SERIAL_ECHO(MSG_M109_INVALID_EXTRUDER); SERIAL_ECHOLN(tmp_extruder); break; } } - LCD_MESSAGEPGM("Heating..."); + LCD_MESSAGEPGM(MSG_HEATING); #ifdef AUTOTEMP autotemp_enabled=false; #endif @@ -905,14 +905,14 @@ void process_commands() } #endif //TEMP_RESIDENCY_TIME } - LCD_MESSAGEPGM("Heating done."); + LCD_MESSAGEPGM(MSG_HEATING_COMPLETE); starttime=millis(); previous_millis_cmd = millis(); } break; case 190: // M190 - Wait for bed heater to reach target. #if TEMP_BED_PIN > -1 - LCD_MESSAGEPGM("Bed Heating."); + LCD_MESSAGEPGM(MSG_BED_HEATING); if (code_seen('S')) setTargetBed(code_value()); codenum = millis(); while(isHeatingBed()) @@ -930,7 +930,7 @@ void process_commands() } manage_heater(); } - LCD_MESSAGEPGM("Bed done."); + LCD_MESSAGEPGM(MSG_BED_DONE); previous_millis_cmd = millis(); #endif break; @@ -1005,7 +1005,7 @@ void process_commands() disable_e2(); } #endif - LCD_MESSAGEPGM("Partial Release"); + LCD_MESSAGEPGM(MSG_PART_RELEASE); } } break; @@ -1021,7 +1021,7 @@ void process_commands() } break; case 115: // M115 - 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"); + SerialprintPGM(MSG_M115_REPORT); break; case 117: // M117 display message LCD_MESSAGE(cmdbuffer[bufindr]+5); @@ -1036,7 +1036,7 @@ void process_commands() SERIAL_PROTOCOLPGM("E:"); SERIAL_PROTOCOL(current_position[E_AXIS]); - SERIAL_PROTOCOLPGM(" Count X:"); + SERIAL_PROTOCOLPGM(MSG_COUNT_X); SERIAL_PROTOCOL(float(st_get_position(X_AXIS))/axis_steps_per_unit[X_AXIS]); SERIAL_PROTOCOLPGM("Y:"); SERIAL_PROTOCOL(float(st_get_position(Y_AXIS))/axis_steps_per_unit[Y_AXIS]); @@ -1047,27 +1047,27 @@ void process_commands() break; case 119: // M119 #if (X_MIN_PIN > -1) - SERIAL_PROTOCOLPGM("x_min:"); + SERIAL_PROTOCOLPGM(MSG_X_MIN); SERIAL_PROTOCOL(((READ(X_MIN_PIN)^X_ENDSTOPS_INVERTING)?"H ":"L ")); #endif #if (X_MAX_PIN > -1) - SERIAL_PROTOCOLPGM("x_max:"); + SERIAL_PROTOCOLPGM(MSG_X_MAX); SERIAL_PROTOCOL(((READ(X_MAX_PIN)^X_ENDSTOPS_INVERTING)?"H ":"L ")); #endif #if (Y_MIN_PIN > -1) - SERIAL_PROTOCOLPGM("y_min:"); + SERIAL_PROTOCOLPGM(MSG_Y_MIN); SERIAL_PROTOCOL(((READ(Y_MIN_PIN)^Y_ENDSTOPS_INVERTING)?"H ":"L ")); #endif #if (Y_MAX_PIN > -1) - SERIAL_PROTOCOLPGM("y_max:"); + SERIAL_PROTOCOLPGM(MSG_Y_MAX); SERIAL_PROTOCOL(((READ(Y_MAX_PIN)^Y_ENDSTOPS_INVERTING)?"H ":"L ")); #endif #if (Z_MIN_PIN > -1) - SERIAL_PROTOCOLPGM("z_min:"); + SERIAL_PROTOCOLPGM(MSG_Z_MIN); SERIAL_PROTOCOL(((READ(Z_MIN_PIN)^Z_ENDSTOPS_INVERTING)?"H ":"L ")); #endif #if (Z_MAX_PIN > -1) - SERIAL_PROTOCOLPGM("z_max:"); + SERIAL_PROTOCOLPGM(MSG_Z_MAX); SERIAL_PROTOCOL(((READ(Z_MAX_PIN)^Z_ENDSTOPS_INVERTING)?"H ":"L ")); #endif SERIAL_PROTOCOLLN(""); @@ -1144,7 +1144,8 @@ void process_commands() if(code_seen('C')) Kc = code_value(); #endif updatePID(); - SERIAL_PROTOCOL("ok p:"); + SERIAL_PROTOCOL(MSG_OK); + SERIAL_PROTOCOL(" p:"); SERIAL_PROTOCOL(Kp); SERIAL_PROTOCOL(" i:"); SERIAL_PROTOCOL(Ki/PID_dT); @@ -1223,12 +1224,12 @@ void process_commands() SERIAL_ECHO_START; SERIAL_ECHO("T"); SERIAL_ECHO(tmp_extruder); - SERIAL_ECHOLN("Invalid extruder"); + SERIAL_ECHOLN(MSG_INVALID_EXTRUDER); } else { active_extruder = tmp_extruder; SERIAL_ECHO_START; - SERIAL_ECHO("Active Extruder: "); + SERIAL_ECHO(MSG_ACTIVE_EXTRUDER); SERIAL_PROTOCOLLN((int)active_extruder); } } @@ -1236,7 +1237,7 @@ void process_commands() else { SERIAL_ECHO_START; - SERIAL_ECHOPGM("Unknown command:\""); + SERIAL_ECHOPGM(MSG_UNKNOWN_COMMAND); SERIAL_ECHO(cmdbuffer[bufindr]); SERIAL_ECHOLNPGM("\""); } @@ -1248,7 +1249,7 @@ void FlushSerialRequestResend() { //char cmdbuffer[bufindr][100]="Resend:"; MYSERIAL.flush(); - SERIAL_PROTOCOLPGM("Resend:"); + SERIAL_PROTOCOLPGM(MSG_RESEND); SERIAL_PROTOCOLLN(gcode_LastN + 1); ClearToSend(); } @@ -1260,7 +1261,7 @@ void ClearToSend() if(fromsd[bufindr]) return; #endif //SDSUPPORT - SERIAL_PROTOCOLLNPGM("ok"); + SERIAL_PROTOCOLLNPGM(MSG_OK); } void get_coordinates() @@ -1370,8 +1371,8 @@ void kill() if(PS_ON_PIN > -1) pinMode(PS_ON_PIN,INPUT); SERIAL_ERROR_START; - SERIAL_ERRORLNPGM("Printer halted. kill() called !!"); - LCD_MESSAGEPGM("KILLED. "); + SERIAL_ERRORLNPGM(MSG_ERR_KILLED); + LCD_MESSAGEPGM(MSG_KILLED); suicide(); while(1); // Wait for reset } diff --git a/Marlin/Marlin.sdf b/Marlin/Marlin.sdf new file mode 100644 index 0000000..206f25a Binary files /dev/null and b/Marlin/Marlin.sdf differ diff --git a/Marlin/Marlin.sln b/Marlin/Marlin.sln new file mode 100644 index 0000000..fdca7e6 --- /dev/null +++ b/Marlin/Marlin.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Marlin", "Marlin.vcxproj", "{A6365572-B176-4C2F-9B18-A75B62059578}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A6365572-B176-4C2F-9B18-A75B62059578}.Debug|Win32.ActiveCfg = Debug|Win32 + {A6365572-B176-4C2F-9B18-A75B62059578}.Debug|Win32.Build.0 = Debug|Win32 + {A6365572-B176-4C2F-9B18-A75B62059578}.Release|Win32.ActiveCfg = Release|Win32 + {A6365572-B176-4C2F-9B18-A75B62059578}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Marlin/Marlin.suo b/Marlin/Marlin.suo new file mode 100644 index 0000000..4aca6fe Binary files /dev/null and b/Marlin/Marlin.suo differ diff --git a/Marlin/Marlin.vcxproj b/Marlin/Marlin.vcxproj new file mode 100644 index 0000000..53f073d --- /dev/null +++ b/Marlin/Marlin.vcxproj @@ -0,0 +1,117 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {A6365572-B176-4C2F-9B18-A75B62059578} + Marlin + + + + Application + true + MultiByte + + + Application + false + true + MultiByte + + + + + + + + + + + + + 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; + + + 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; + + + + Level3 + Disabled + + + true + + + + + Level3 + MaxSpeed + true + true + + + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Marlin/Marlin.vcxproj.filters b/Marlin/Marlin.vcxproj.filters new file mode 100644 index 0000000..4a0f873 --- /dev/null +++ b/Marlin/Marlin.vcxproj.filters @@ -0,0 +1,140 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/Marlin/Marlin.vcxproj.user b/Marlin/Marlin.vcxproj.user new file mode 100644 index 0000000..ace9a86 --- /dev/null +++ b/Marlin/Marlin.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/Marlin/cardreader.cpp b/Marlin/cardreader.cpp index 052ce20..dd1738c 100644 --- a/Marlin/cardreader.cpp +++ b/Marlin/cardreader.cpp @@ -3,6 +3,8 @@ #include "ultralcd.h" #include "stepper.h" #include "temperature.h" +#include "language.h" + #ifdef SDSUPPORT @@ -75,7 +77,7 @@ void CardReader::lsDive(const char *prepend,SdFile parent) if(lsAction==LS_SerialPrint) { SERIAL_ECHO_START; - SERIAL_ECHOLN("Cannot open subdir"); + SERIAL_ECHOLN(MSG_SD_CANT_OPEN_SUBDIR); SERIAL_ECHOLN(lfilename); } } @@ -143,28 +145,28 @@ void CardReader::initsd() { //if (!card.init(SPI_HALF_SPEED,SDSS)) SERIAL_ECHO_START; - SERIAL_ECHOLNPGM("SD init fail"); + SERIAL_ECHOLNPGM(MSG_SD_INIT_FAIL); } else if (!volume.init(&card)) { SERIAL_ERROR_START; - SERIAL_ERRORLNPGM("volume.init failed"); + SERIAL_ERRORLNPGM(MSG_SD_VOL_INIT_FAIL); } else if (!root.openRoot(&volume)) { SERIAL_ERROR_START; - SERIAL_ERRORLNPGM("openRoot failed"); + SERIAL_ERRORLNPGM(MSG_SD_OPENROOT_FAIL); } else { cardOK = true; SERIAL_ECHO_START; - SERIAL_ECHOLNPGM("SD card ok"); + SERIAL_ECHOLNPGM(MSG_SD_CARD_OK); } curDir=&root; if(!workDir.openRoot(&volume)) { - SERIAL_ECHOLNPGM("workDir open failed"); + SERIAL_ECHOLNPGM(MSG_SD_WORKDIR_FAIL); } } @@ -173,7 +175,7 @@ void CardReader::setroot() curDir=&root; if(!workDir.openRoot(&volume)) { - SERIAL_ECHOLNPGM("workDir open failed"); + SERIAL_ECHOLNPGM(MSG_SD_WORKDIR_FAIL); } } void CardReader::release() @@ -230,7 +232,7 @@ void CardReader::openFile(char* name,bool read) SERIAL_ECHOLN(subdirname); if(!myDir.open(curDir,subdirname,O_READ)) { - SERIAL_PROTOCOLPGM("open failed, File: "); + SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL); SERIAL_PROTOCOL(subdirname); SERIAL_PROTOCOLLNPGM("."); return; @@ -260,18 +262,18 @@ void CardReader::openFile(char* name,bool read) if (file.open(curDir, fname, O_READ)) { filesize = file.fileSize(); - SERIAL_PROTOCOLPGM("File opened:"); + SERIAL_PROTOCOLPGM(MSG_SD_FILE_OPENED); SERIAL_PROTOCOL(fname); - SERIAL_PROTOCOLPGM(" Size:"); + SERIAL_PROTOCOLPGM(MSG_SD_SIZE); SERIAL_PROTOCOLLN(filesize); sdpos = 0; - SERIAL_PROTOCOLLNPGM("File selected"); + SERIAL_PROTOCOLLNPGM(MSG_SD_FILE_SELECTED); LCD_MESSAGE(fname); } else { - SERIAL_PROTOCOLPGM("open failed, File: "); + SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL); SERIAL_PROTOCOL(fname); SERIAL_PROTOCOLLNPGM("."); } @@ -280,14 +282,14 @@ void CardReader::openFile(char* name,bool read) { //write if (!file.open(curDir, fname, O_CREAT | O_APPEND | O_WRITE | O_TRUNC)) { - SERIAL_PROTOCOLPGM("open failed, File: "); + SERIAL_PROTOCOLPGM(MSG_SD_OPEN_FILE_FAIL); SERIAL_PROTOCOL(fname); SERIAL_PROTOCOLLNPGM("."); } else { saving = true; - SERIAL_PROTOCOLPGM("Writing to file: "); + SERIAL_PROTOCOLPGM(MSG_SD_WRITE_TO_FILE); SERIAL_PROTOCOLLN(name); LCD_MESSAGE(fname); } @@ -298,13 +300,13 @@ void CardReader::openFile(char* name,bool read) void CardReader::getStatus() { if(cardOK){ - SERIAL_PROTOCOLPGM("SD printing byte "); + SERIAL_PROTOCOLPGM(MSG_SD_PRINTING_BYTE); SERIAL_PROTOCOL(sdpos); SERIAL_PROTOCOLPGM("/"); SERIAL_PROTOCOLLN(filesize); } else{ - SERIAL_PROTOCOLLNPGM("Not SD printing"); + SERIAL_PROTOCOLLNPGM(MSG_SD_NOT_PRINTING); } } void CardReader::write_command(char *buf) @@ -326,7 +328,7 @@ void CardReader::write_command(char *buf) if (file.writeError) { SERIAL_ERROR_START; - SERIAL_ERRORLNPGM("error writing to file"); + SERIAL_ERRORLNPGM(MSG_SD_ERR_WRITE_TO_FILE); } } @@ -420,7 +422,7 @@ void CardReader::chdir(const char * relpath) if(!newfile.open(*parent,relpath, O_READ)) { SERIAL_ECHO_START; - SERIAL_ECHOPGM("Cannot enter subdir:"); + SERIAL_ECHOPGM(MSG_SD_CANT_ENTER_SUBDIR); SERIAL_ECHOLN(relpath); } else diff --git a/Marlin/language.h b/Marlin/language.h index 6dfd7e0..0f1315a 100644 --- a/Marlin/language.h +++ b/Marlin/language.h @@ -14,73 +14,8 @@ // LCD Menu Messages +// #define WELCOME_MSG "UltiMARLIN Ready." #define WELCOME_MSG "RepRap Ready." - #define MSG_SD_INSERTED "Card Ready" - #define MSG_SD_REMOVED "Card Initiate" - #define MSG_MAIN " Main \003" - #define MSG_AUTOSTART " Autostart" - #define MSG_DISABLE_STEPPERS " Disable Steppers" - #define MSG_AUTO_HOME " Auto Home" - #define MSG_SET_ORIGIN " Set Origin" - #define MSG_PREHEAT_PLA " Preheat PLA" - #define MSG_PREHEAT_ABS " Preheat ABS" - #define MSG_COOLDOWN " Cooldown" - #define MSG_EXTRUDE " Extrude" - #define MSG_MOVE_AXIS " Move Axis \x7E" - #define MSG_SPEED " Speed:" - #define MSG_NOZZLE " \002Nozzle:" - #define MSG_BED " \002Bed:" - #define MSG_FAN_SPEED " Fan speed:" - #define MSG_FLOW " Flow:" - #define MSG_CONTROL " Control \003" - #define MSG_MIN " \002 Min:" - #define MSG_MAX " \002 Max:" - #define MSG_FACTOR " \002 Fact:" - #define MSG_AUTOTEMP " Autotemp:" - #define MSG_ON "On " - #define MSG_OFF "Off" - #define MSG_PID_P " PID-P: " - #define MSG_PID_I " PID-I: " - #define MSG_PID_D " PID-D: " - #define MSG_PID_C " PID-C: " - #define MSG_ACC " Acc:" - #define MSG_VXY_JERK " Vxy-jerk: " - #define MSG_VMAX " Vmax " - #define MSG_X "x:" - #define MSG_Y "y:" - #define MSG_Z "z:" - #define MSG_E "e:" - #define MSG_VMIN " Vmin:" - #define MSG_VTRAV_MIN " VTrav min:" - #define MSG_AMAX " Amax " - #define MSG_A_RETRACT " A-retract:" - #define MSG_XSTEPS " Xsteps/mm:" - #define MSG_YSTEPS " Ysteps/mm:" - #define MSG_ZSTEPS " Zsteps/mm:" - #define MSG_ESTEPS " Esteps/mm:" - #define MSG_MAIN_WIDE " Main \003" - #define MSG_TEMPERATURE_WIDE " Temperature \x7E" - #define MSG_MOTION_WIDE " Motion \x7E" - #define MSG_STORE_EPROM " Store EPROM" - #define MSG_LOAD_EPROM " Load EPROM" - #define MSG_RESTORE_FAILSAFE " Restore Failsafe" - #define MSG_REFRESH "\004Refresh" - #define MSG_WATCH " Watch \003" - #define MSG_PREPARE " Prepare \x7E" - #define MSG_CONTROL_ARROW " Control \x7E" - #define MSG_TUNE " Tune \x7E" - #define MSG_STOP_PRINT " Stop Print \x7E" - #define MSG_CARD_MENU " Card Menu \x7E" - #define MSG_NO_CARD " No Card" - #define MSG_SERIAL_ERROR_MENU_STRUCTURE "Something is wrong in the MenuStructure." - -#endif - -#if LANGUAGE_CHOICE == 2 - -// LCD Menu Messages - - #define WELCOME_MSG "UltiMARLIN Ready." #define MSG_SD_INSERTED "Card inserted" #define MSG_SD_REMOVED "Card removed" #define MSG_MAIN " Main \003" @@ -91,7 +26,7 @@ #define MSG_PREHEAT " Preheat" #define MSG_COOLDOWN " Cooldown" #define MSG_EXTRUDE " Extrude" - #define MSG_MOVE_AXIS " Move Axis \x7E" + #define MSG_MOVE_AXIS " Move Axis \x7E" #define MSG_SPEED " Speed:" #define MSG_NOZZLE " \002Nozzle:" #define MSG_BED " \002Bed:" @@ -132,87 +67,96 @@ #define MSG_REFRESH "\004Refresh" #define MSG_WATCH " Watch \003" #define MSG_PREPARE " Prepare \x7E" + #define MSG_PREPARE_ALT " Prepare \003" #define MSG_CONTROL_ARROW " Control \x7E" #define MSG_TUNE " Tune \x7E" #define MSG_STOP_PRINT " Stop Print \x7E" #define MSG_CARD_MENU " Card Menu \x7E" #define MSG_NO_CARD " No Card" #define MSG_SERIAL_ERROR_MENU_STRUCTURE "Something is wrong in the MenuStructure." + #define MSG_DWELL "DWELL..." + #define MSG_NO_MOVE "No move." + #define MSG_PART_RELEASE "Partial Release" + #define MSG_KILLED "KILLED. " + #define MSG_PREHEAT_PLA " Preheat PLA" + #define MSG_PREHEAT_ABS " Preheat ABS" + #define MSG_STEPPER_RELEASED "Released." -#endif -#if LANGUAGE_CHOICE == 3 +// Serial Console Messages -// LCD Menu Messages + #define MSG_Enqueing "enqueing \"" + #define MSG_POWERUP "PowerUp" + #define MSG_EXTERNAL_RESET " External Reset" + #define MSG_BROWNOUT_RESET " Brown out Reset" + #define MSG_WATCHDOG_RESET " Watchdog Reset" + #define MSG_SOFTWARE_RESET " Software Reset" + #define MSG_MARLIN "Marlin: " + #define MSG_AUTHOR " | Author: " + #define MSG_CONFIGURATION_VER " Last Updated: " + #define MSG_FREE_MEMORY " Free Memory: " + #define MSG_PLANNER_BUFFER_BYTES " PlannerBufferBytes: " + #define MSG_OK "ok" + #define MSG_FILE_SAVED "Done saving file." + #define MSG_ERR_LINE_NO "Line Number is not Last Line Number+1, Last Line:" + #define MSG_ERR_CHECKSUM_MISMATCH "checksum mismatch, Last Line:" + #define MSG_ERR_NO_CHECKSUM "No Checksum with line number, Last Line:" + #define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "No Line Number with checksum, Last Line:" + #define MSG_FILE_PRINTED "Done printing file" + #define MSG_BEGIN_FILE_LIST "Begin file list" + #define MSG_END_FILE_LIST "End file list" + #define MSG_M104_INVALID_EXTRUDER "M104 Invalid extruder " + #define MSG_M105_INVALID_EXTRUDER "M105 Invalid extruder " + #define MSG_ERR_NO_THERMISTORS "No thermistors - no temp" + #define MSG_M109_INVALID_EXTRUDER "M109 Invalid extruder " + #define MSG_HEATING "Heating..." + #define MSG_HEATING_COMPLETE "Heating done." + #define MSG_BED_HEATING "Bed Heating." + #define MSG_BED_DONE "Bed done." + #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" + #define MSG_COUNT_X " Count X:" + #define MSG_ERR_KILLED "Printer halted. kill() called !!" + #define MSG_RESEND "Resend:" + #define MSG_UNKNOWN_COMMAND "Unknown command:\"" + #define MSG_ACTIVE_EXTRUDER "Active Extruder: " + #define MSG_INVALID_EXTRUDER "Invalid extruder" + #define MSG_X_MIN "x_min:" + #define MSG_X_MAX "x_max:" + #define MSG_Y_MIN "y_min:" + #define MSG_Y_MAX "y_max:" + #define MSG_Z_MIN "z_min:" + #define MSG_Z_MAX "z_max:" - #define WELCOME_MSG "RepRap Ready." - #define MSG_SD_INSERTED "Card Ready" - #define MSG_SD_REMOVED "Card Initiate" - #define MSG_MAIN " Main \003" - #define MSG_AUTOSTART " Autostart" - #define MSG_DISABLE_STEPPERS " Disable Steppers" - #define MSG_AUTO_HOME " Auto Home" - #define MSG_SET_ORIGIN " Set Origin" - #define MSG_PREHEAT " Preheat" - #define MSG_COOLDOWN " Cooldown" - #define MSG_EXTRUDE " Extrude" - #define MSG_MOVE_AXIS " Move Axis \x7E" - #define MSG_SPEED " Speed:" - #define MSG_NOZZLE " \002Nozzle:" - #define MSG_BED " \002Bed:" - #define MSG_FAN_SPEED " Fan speed:" - #define MSG_FLOW " Flow:" - #define MSG_CONTROL " Control \003" - #define MSG_MIN " \002 Min:" - #define MSG_MAX " \002 Max:" - #define MSG_FACTOR " \002 Fact:" - #define MSG_AUTOTEMP " Autotemp:" - #define MSG_ON "On " - #define MSG_OFF "Off" - #define MSG_PID_P " PID-P: " - #define MSG_PID_I " PID-I: " - #define MSG_PID_D " PID-D: " - #define MSG_PID_C " PID-C: " - #define MSG_ACC " Acc:" - #define MSG_VXY_JERK " Vxy-jerk: " - #define MSG_VMAX " Vmax " - #define MSG_X "x:" - #define MSG_Y "y:" - #define MSG_Z "z:" - #define MSG_E "e:" - #define MSG_VMIN " Vmin:" - #define MSG_VTRAV_MIN " VTrav min:" - #define MSG_AMAX " Amax " - #define MSG_A_RETRACT " A-retract:" - #define MSG_XSTEPS " Xsteps/mm:" - #define MSG_YSTEPS " Ysteps/mm:" - #define MSG_ZSTEPS " Zsteps/mm:" - #define MSG_ESTEPS " Esteps/mm:" - #define MSG_MAIN_WIDE " Main \003" - #define MSG_TEMPERATURE_WIDE " Temperature \x7E" - #define MSG_MOTION_WIDE " Motion \x7E" - #define MSG_STORE_EPROM " Store EPROM" - #define MSG_LOAD_EPROM " Load EPROM" - #define MSG_RESTORE_FAILSAFE " Restore Failsafe" - #define MSG_REFRESH "\004Refresh" - #define MSG_WATCH " Watch \003" - #define MSG_PREPARE " Prepare \x7E" - #define MSG_CONTROL_ARROW " Control \x7E" - #define MSG_TUNE " Tune \x7E" - #define MSG_STOP_PRINT " Stop Print \x7E" - #define MSG_CARD_MENU " Card Menu \x7E" - #define MSG_NO_CARD " No Card" - #define MSG_SERIAL_ERROR_MENU_STRUCTURE "Something is wrong in the MenuStructure." + #define MSG_SD_CANT_OPEN_SUBDIR "Cannot open subdir" + #define MSG_SD_INIT_FAIL "SD init fail" + #define MSG_SD_VOL_INIT_FAIL "volume.init failed" + #define MSG_SD_OPENROOT_FAIL "openRoot failed" + #define MSG_SD_CARD_OK "SD card ok" + #define MSG_SD_WORKDIR_FAIL "workDir open failed" + #define MSG_SD_OPEN_FILE_FAIL "open failed, File: " + #define MSG_SD_FILE_OPENED "File opened:" + #define MSG_SD_SIZE " Size:" + #define MSG_SD_FILE_SELECTED "File selected" + #define MSG_SD_WRITE_TO_FILE "Writing to file: " + #define MSG_SD_PRINTING_BYTE "SD printing byte " + #define MSG_SD_NOT_PRINTING "Not SD printing" + #define MSG_SD_ERR_WRITE_TO_FILE "error writing to file" + #define MSG_SD_CANT_ENTER_SUBDIR "Cannot enter subdir:" -#endif + #define MSG_STEPPER_TO_HIGH "Steprate to high : " + #define MSG_ENDSTOPS_HIT "endstops hit: " + #define MSG_ERR_COLD_EXTRUDE_STOP " cold extrusion prevented" + #define MSG_ERR_LONG_EXTRUDE_STOP " too long extrusion prevented" -#if LANGUAGE_CHOICE == 4 +#endif +#if LANGUAGE_CHOICE == 2 // LCD Menu Messages - #define WELCOME_MSG "RepRap Ready." - #define MSG_SD_INSERTED "Card Ready" - #define MSG_SD_REMOVED "Card Initiate" + #define WELCOME_MSG "UltiMARLIN Ready." + + #define MSG_SD_INSERTED "Card inserted" + #define MSG_SD_REMOVED "Card removed" #define MSG_MAIN " Main \003" #define MSG_AUTOSTART " Autostart" #define MSG_DISABLE_STEPPERS " Disable Steppers" @@ -221,7 +165,7 @@ #define MSG_PREHEAT " Preheat" #define MSG_COOLDOWN " Cooldown" #define MSG_EXTRUDE " Extrude" - #define MSG_MOVE_AXIS " Move Axis \x7E" + #define MSG_MOVE_AXIS " Move Axis \x7E" #define MSG_SPEED " Speed:" #define MSG_NOZZLE " \002Nozzle:" #define MSG_BED " \002Bed:" @@ -262,78 +206,81 @@ #define MSG_REFRESH "\004Refresh" #define MSG_WATCH " Watch \003" #define MSG_PREPARE " Prepare \x7E" + #define MSG_PREPARE_ALT " Prepare \003" #define MSG_CONTROL_ARROW " Control \x7E" #define MSG_TUNE " Tune \x7E" #define MSG_STOP_PRINT " Stop Print \x7E" #define MSG_CARD_MENU " Card Menu \x7E" #define MSG_NO_CARD " No Card" #define MSG_SERIAL_ERROR_MENU_STRUCTURE "Something is wrong in the MenuStructure." + #define MSG_DWELL "DWELL..." + #define MSG_NO_MOVE "No move." + #define MSG_PART_RELEASE "Partial Release" + #define MSG_KILLED "KILLED. " + #define MSG_PREHEAT_PLA " Preheat PLA" + #define MSG_PREHEAT_ABS " Preheat ABS" -#endif -#if LANGUAGE_CHOICE == 5 -// LCD Menu Messages +// Serial Console Messages - #define WELCOME_MSG "RepRap Ready." - #define MSG_SD_INSERTED "Card Ready" - #define MSG_SD_REMOVED "Card Initiate" - #define MSG_MAIN " Main \003" - #define MSG_AUTOSTART " Autostart" - #define MSG_DISABLE_STEPPERS " Disable Steppers" - #define MSG_AUTO_HOME " Auto Home" - #define MSG_SET_ORIGIN " Set Origin" - #define MSG_PREHEAT " Preheat" - #define MSG_COOLDOWN " Cooldown" - #define MSG_EXTRUDE " Extrude" - #define MSG_MOVE_AXIS " Move Axis \x7E" - #define MSG_SPEED " Speed:" - #define MSG_NOZZLE " \002Nozzle:" - #define MSG_BED " \002Bed:" - #define MSG_FAN_SPEED " Fan speed:" - #define MSG_FLOW " Flow:" - #define MSG_CONTROL " Control \003" - #define MSG_MIN " \002 Min:" - #define MSG_MAX " \002 Max:" - #define MSG_FACTOR " \002 Fact:" - #define MSG_AUTOTEMP " Autotemp:" - #define MSG_ON "On " - #define MSG_OFF "Off" - #define MSG_PID_P " PID-P: " - #define MSG_PID_I " PID-I: " - #define MSG_PID_D " PID-D: " - #define MSG_PID_C " PID-C: " - #define MSG_ACC " Acc:" - #define MSG_VXY_JERK " Vxy-jerk: " - #define MSG_VMAX " Vmax " - #define MSG_X "x:" - #define MSG_Y "y:" - #define MSG_Z "z:" - #define MSG_E "e:" - #define MSG_VMIN " Vmin:" - #define MSG_VTRAV_MIN " VTrav min:" - #define MSG_AMAX " Amax " - #define MSG_A_RETRACT " A-retract:" - #define MSG_XSTEPS " Xsteps/mm:" - #define MSG_YSTEPS " Ysteps/mm:" - #define MSG_ZSTEPS " Zsteps/mm:" - #define MSG_ESTEPS " Esteps/mm:" - #define MSG_MAIN_WIDE " Main \003" - #define MSG_TEMPERATURE_WIDE " Temperature \x7E" - #define MSG_MOTION_WIDE " Motion \x7E" - #define MSG_STORE_EPROM " Store EPROM" - #define MSG_LOAD_EPROM " Load EPROM" - #define MSG_RESTORE_FAILSAFE " Restore Failsafe" - #define MSG_REFRESH "\004Refresh" - #define MSG_WATCH " Watch \003" - #define MSG_PREPARE " Prepare \x7E" - #define MSG_CONTROL_ARROW " Control \x7E" - #define MSG_TUNE " Tune \x7E" - #define MSG_STOP_PRINT " Stop Print \x7E" - #define MSG_CARD_MENU " Card Menu \x7E" - #define MSG_NO_CARD " No Card" - #define MSG_SERIAL_ERROR_MENU_STRUCTURE "Something is wrong in the MenuStructure." + #define MSG_Enqueing "enqueing \"" + #define MSG_POWERUP "PowerUp" + #define MSG_EXTERNAL_RESET " External Reset" + #define MSG_BROWNOUT_RESET " Brown out Reset" + #define MSG_WATCHDOG_RESET " Watchdog Reset" + #define MSG_SOFTWARE_RESET " Software Reset" + #define MSG_MARLIN "Marlin: " + #define MSG_AUTHOR " | Author: " + #define MSG_CONFIGURATION_VER " Last Updated: " + #define MSG_FREE_MEMORY " Free Memory: " + #define MSG_PLANNER_BUFFER_BYTES " PlannerBufferBytes: " + #define MSG_OK "ok" + #define MSG_FILE_SAVED "Done saving file." + #define MSG_ERR_LINE_NO "Line Number is not Last Line Number+1, Last Line:" + #define MSG_ERR_CHECKSUM_MISMATCH "checksum mismatch, Last Line:" + #define MSG_ERR_NO_CHECKSUM "No Checksum with line number, Last Line:" + #define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "No Line Number with checksum, Last Line:" + #define MSG_FILE_PRINTED "Done printing file" + #define MSG_BEGIN_FILE_LIST "Begin file list" + #define MSG_END_FILE_LIST "End file list" + #define MSG_M104_INVALID_EXTRUDER "M104 Invalid extruder " + #define MSG_M105_INVALID_EXTRUDER "M105 Invalid extruder " + #define MSG_ERR_NO_THERMISTORS "No thermistors - no temp" + #define MSG_M109_INVALID_EXTRUDER "M109 Invalid extruder " + #define MSG_HEATING "Heating..." + #define MSG_HEATING_COMPLETE "Heating done." + #define MSG_BED_HEATING "Bed Heating." + #define MSG_BED_DONE "Bed done." + #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" + #define MSG_COUNT_X " Count X:" + #define MSG_ERR_KILLED "Printer halted. kill() called !!" + #define MSG_RESEND "Resend:" + #define MSG_UNKNOWN_COMMAND "Unknown command:\"" + #define MSG_ACTIVE_EXTRUDER "Active Extruder: " + #define MSG_INVALID_EXTRUDER "Invalid extruder" + #define MSG_X_MIN "x_min:" + #define MSG_X_MAX "x_max:" + #define MSG_Y_MIN "y_min:" + #define MSG_Y_MAX "y_max:" + #define MSG_Z_MIN "z_min:" + #define MSG_Z_MAX "z_max:" -#endif + #define MSG_SD_CANT_OPEN_SUBDIR "Cannot open subdir" + #define MSG_SD_INIT_FAIL "SD init fail" + #define MSG_SD_VOL_INIT_FAIL "volume.init failed" + #define MSG_SD_OPENROOT_FAIL "openRoot failed" + #define MSG_SD_CARD_OK "SD card ok" + #define MSG_SD_WORKDIR_FAIL "workDir open failed" + #define MSG_SD_OPEN_FILE_FAIL "open failed, File: " + #define MSG_SD_FILE_OPENED "File opened:" + #define MSG_SD_SIZE " Size:" + #define MSG_SD_FILE_SELECTED "File selected" + #define MSG_SD_WRITE_TO_FILE "Writing to file: " + #define MSG_SD_PRINTING_BYTE "SD printing byte " + #define MSG_SD_NOT_PRINTING "Not SD printing" + #define MSG_SD_ERR_WRITE_TO_FILE "error writing to file" + #define MSG_SD_CANT_ENTER_SUBDIR "Cannot enter subdir:" +#endif #endif // ifndef LANGUAGE_H diff --git a/Marlin/planner.cpp b/Marlin/planner.cpp index 00fead1..22f980b 100644 --- a/Marlin/planner.cpp +++ b/Marlin/planner.cpp @@ -59,6 +59,7 @@ #include "stepper.h" #include "temperature.h" #include "ultralcd.h" +#include "language.h" //=========================================================================== //=============================public variables ============================ @@ -469,13 +470,13 @@ void plan_buffer_line(float &x, float &y, float &z, float &e, float feed_rate, u { position[E_AXIS]=target[E_AXIS]; //behave as if the move really took place, but ignore E part SERIAL_ECHO_START; - SERIAL_ECHOLNPGM(" cold extrusion prevented"); + SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP); } if(labs(target[E_AXIS]-position[E_AXIS])>axis_steps_per_unit[E_AXIS]*EXTRUDE_MAXLENGTH) { position[E_AXIS]=target[E_AXIS]; //behave as if the move really took place, but ignore E part SERIAL_ECHO_START; - SERIAL_ECHOLNPGM(" too long extrusion prevented"); + SERIAL_ECHOLNPGM(MSG_ERR_LONG_EXTRUDE_STOP); } #endif diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp index 40d4873..e2288cf 100644 --- a/Marlin/stepper.cpp +++ b/Marlin/stepper.cpp @@ -29,7 +29,7 @@ #include "planner.h" #include "temperature.h" #include "ultralcd.h" - +#include "language.h" #include "speed_lookuptable.h" @@ -172,7 +172,7 @@ void checkHitEndstops() { if( endstop_x_hit || endstop_y_hit || endstop_z_hit) { SERIAL_ECHO_START; - SERIAL_ECHOPGM("endstops hit: "); + SERIAL_ECHOPGM(MSG_ENDSTOPS_HIT); if(endstop_x_hit) { SERIAL_ECHOPAIR(" X:",(float)endstops_trigsteps[X_AXIS]/axis_steps_per_unit[X_AXIS]); } @@ -254,7 +254,7 @@ FORCE_INLINE unsigned short calc_timer(unsigned short step_rate) { timer = (unsigned short)pgm_read_word_near(table_address); timer -= (((unsigned short)pgm_read_word_near(table_address+2) * (unsigned char)(step_rate & 0x0007))>>3); } - if(timer < 100) { timer = 100; MYSERIAL.print("Steprate to high : "); MYSERIAL.println(step_rate); }//(20kHz this should never happen) + if(timer < 100) { timer = 100; MYSERIAL.print(MSG_STEPPER_TO_HIGH); MYSERIAL.println(step_rate); }//(20kHz this should never happen) return timer; } @@ -808,7 +808,7 @@ long st_get_position(uint8_t axis) void finishAndDisableSteppers() { st_synchronize(); - LCD_MESSAGEPGM("Released."); + LCD_MESSAGEPGM(MSG_STEPPER_RELEASED); disable_x(); disable_y(); disable_z();