Browse Source

Merge branch 'Marlin_v1' of github.com:ErikZalm/Marlin into jeff

Conflicts:
	Marlin/language.h
	Marlin/thermistortables.h
Denis Bakin 11 years ago
parent
commit
73d41c10b9
3 changed files with 118 additions and 95 deletions
  1. 83
    85
      Marlin/language.h
  2. 12
    6
      Marlin/ultralcd.cpp
  3. 23
    4
      Marlin/ultralcd_implementation_hitachi_HD44780.h

+ 83
- 85
Marlin/language.h View File

@@ -114,6 +114,8 @@
114 114
 	#define MSG_CONTROL_RETRACT_RECOVERF "UnRet  F"
115 115
 	#define MSG_AUTORETRACT "AutoRetr."
116 116
 	#define MSG_FILAMENTCHANGE "Change filament"
117
+	#define MSG_INIT_SDCARD "Init. SD-Card"	
118
+	#define MSG_CNG_SDCARD "Change SD-Card"
117 119
 
118 120
 // Serial Console Messages
119 121
 
@@ -259,6 +261,7 @@
259 261
 	#define MSG_NO_CARD "Brak karty"
260 262
 	#define MSG_DWELL "Uspij..."
261 263
 	#define MSG_USERWAIT "Czekaj na uzytkownika..."
264
+	#define MSG_RESUMING "Wznawiam drukowanie"
262 265
 	#define MSG_NO_MOVE "Brak ruchu."
263 266
 	#define MSG_PART_RELEASE "Czesciowe zwolnienie"
264 267
 	#define MSG_KILLED "Ubity. "
@@ -985,88 +988,83 @@
985 988
 	#define WELCOME_MSG MACHINE_NAME " Pronto."
986 989
 	#define MSG_SD_INSERTED          "SD Card inserita"
987 990
 	#define MSG_SD_REMOVED           "SD Card rimossa"
988
-	#define MSG_MAIN                 " Menu principale \003"
989
-	#define MSG_AUTOSTART            " Autostart"
990
-	#define MSG_DISABLE_STEPPERS     " Disabilita Motori Passo-Passo"
991
-	#define MSG_AUTO_HOME            " Auto Home"
992
-	#define MSG_SET_ORIGIN           " Imposta Origini Assi"
993
-	#define MSG_PREHEAT_PLA          " Preriscalda PLA"
994
-	#define MSG_PREHEAT_PLA_SETTINGS " Impostazioni Preriscaldamento PLA"
995
-	#define MSG_PREHEAT_ABS          " Preriscalda ABS"
996
-	#define MSG_PREHEAT_ABS_SETTINGS " Impostazioni Preriscaldamento ABS"
997
-	#define MSG_COOLDOWN             " Rafredda"
998
-	#define MSG_EXTRUDE              " Estrudi"
999
-	#define MSG_RETRACT              " Ritrai"
1000
-	#define MSG_MOVE_AXIS            " Muovi Asse      \x7E"
1001
-	#define MSG_SPEED                " Velcità:"
1002
-	#define MSG_NOZZLE               " \002Ugello:"
1003
-	#define MSG_NOZZLE1              " \002Ugello2:"
1004
-	#define MSG_NOZZLE2              " \002Ugello3:"
1005
-	#define MSG_BED                  " \002Piatto:"
1006
-	#define MSG_FAN_SPEED            " Velocità Ventola:"
1007
-	#define MSG_FLOW                 " Flusso:"
1008
-	#define MSG_CONTROL              " Controllo \003"
991
+	#define MSG_MAIN                 "Menu principale"
992
+	#define MSG_AUTOSTART            "Autostart"
993
+	#define MSG_DISABLE_STEPPERS     "Disabilita Motori"
994
+	#define MSG_AUTO_HOME            "Auto Home"
995
+	#define MSG_SET_ORIGIN           "Imposta Origine"
996
+	#define MSG_PREHEAT_PLA          "Preriscalda PLA"
997
+	#define MSG_PREHEAT_PLA_SETTINGS "Preris. PLA Conf"
998
+	#define MSG_PREHEAT_ABS          "Preriscalda ABS"
999
+	#define MSG_PREHEAT_ABS_SETTINGS "Preris. ABS Conf"
1000
+	#define MSG_COOLDOWN             "Rafredda"
1001
+	#define MSG_EXTRUDE              "Estrudi"
1002
+	#define MSG_RETRACT              "Ritrai"
1003
+	#define MSG_MOVE_AXIS            "Muovi Asse"
1004
+	#define MSG_SPEED                "Velcità"
1005
+	#define MSG_NOZZLE               "Ugello"
1006
+	#define MSG_NOZZLE1              "Ugello2"
1007
+	#define MSG_NOZZLE2              "Ugello3"
1008
+	#define MSG_BED                  "Piatto"
1009
+	#define MSG_FAN_SPEED            "Ventola"
1010
+	#define MSG_FLOW                 "Flusso"
1011
+	#define MSG_CONTROL              "Controllo"
1009 1012
 	#define MSG_MIN                  " \002 Min:"
1010 1013
 	#define MSG_MAX                  " \002 Max:"
1011 1014
 	#define MSG_FACTOR               " \002 Fact:"
1012
-	#define MSG_AUTOTEMP             " Autotemp:"
1015
+	#define MSG_AUTOTEMP             "Autotemp"
1013 1016
 	#define MSG_ON                   "On "
1014 1017
 	#define MSG_OFF                  "Off"
1015
-	#define MSG_PID_P                " PID-P: "
1016
-	#define MSG_PID_I                " PID-I: "
1017
-	#define MSG_PID_D                " PID-D: "
1018
-	#define MSG_PID_C                " PID-C: "
1019
-	#define MSG_ACC                  " Acc:"
1020
-	#define MSG_VXY_JERK             " Vxy-jerk: "
1021
-	#define MSG_VMAX                 " Vmax "
1022
-	#define MSG_X                    "x:"
1023
-	#define MSG_Y                    "y:"
1024
-	#define MSG_Z                    "z:"
1025
-	#define MSG_E                    "e:"
1026
-	#define MSG_VMIN                 " Vmin:"
1027
-	#define MSG_VTRAV_MIN            " VTrav min:"
1028
-	#define MSG_AMAX                 " Amax "
1029
-	#define MSG_A_RETRACT            " A-ritrai:"
1030
-	#define MSG_XSTEPS               " Xpassi/mm:"
1031
-	#define MSG_YSTEPS               " Ypassi/mm:"
1032
-	#define MSG_ZSTEPS               " Zpassi/mm:"
1033
-	#define MSG_ESTEPS               " Epassi/mm:"
1034
-	#define MSG_MAIN_WIDE            " Menu Principale        \003"
1035
-	#define MSG_RECTRACT_WIDE        " Ritrai    \x7E"
1036
-	#define MSG_TEMPERATURE_WIDE     " Temperatura \x7E"
1037
-	#define MSG_TEMPERATURE_RTN      " Temperatura  \003"
1038
-	#define MSG_MOTION_WIDE          " Movimento      \x7E"
1039
-	#define MSG_STORE_EPROM          " Salva in memoria"
1040
-	#define MSG_LOAD_EPROM           " Carica dalla memoria"
1041
-	#define MSG_RESTORE_FAILSAFE     " Configurazioni di default"
1042
-	#define MSG_REFRESH              "\004Aggiorna"
1043
-	#define MSG_WATCH                " Guarda   \003"
1044
-	#define MSG_PREPARE              " Prepara \x7E"
1045
-	#define MSG_PREPARE_ALT          " Prepara \003"
1046
-	#define MSG_CONTROL_ARROW        " Controllo \x7E"
1047
-	#define MSG_RETRACT_ARROW        " Ritrai \x7E"
1048
-	#define MSG_TUNE                 " Tune    \x7E"
1049
-	#define MSG_PAUSE_PRINT          " Metti in Pausa la Stampa \x7E"
1050
-	#define MSG_RESUME_PRINT         " Riprendi Stampa \x7E"
1051
-	#define MSG_STOP_PRINT           " Arresta Stampa   \x7E"
1052
-	#define MSG_CARD_MENU            " Card Menu    \x7E"
1053
-	#define MSG_NO_CARD              " No Card"
1054
-	#define MSG_DWELL                " Sospensione..."
1055
-	#define MSG_USERWAIT             "Attendi utente..."
1056
-	#define MSG_RESUMING             "Riprendi stampa"
1057
-	#define MSG_NO_MOVE              "Nessun movimento."
1058
-	#define MSG_PART_RELEASE         "Rilascio Parziale"
1018
+	#define MSG_PID_P                "PID-P"
1019
+	#define MSG_PID_I                "PID-I"
1020
+	#define MSG_PID_D                "PID-D"
1021
+	#define MSG_PID_C                "PID-C"
1022
+	#define MSG_ACC                  "Accel"
1023
+	#define MSG_VXY_JERK             "Vxy-jerk"
1024
+	#define MSG_VMAX                 "Vmax"
1025
+	#define MSG_X                    "x"
1026
+	#define MSG_Y                    "y"
1027
+	#define MSG_Z                    "z"
1028
+	#define MSG_E                    "e"
1029
+	#define MSG_VMIN                 "Vmin"
1030
+	#define MSG_VTRAV_MIN            "VTrav min"
1031
+	#define MSG_AMAX                 "Amax"
1032
+	#define MSG_A_RETRACT            "A-retract"
1033
+	#define MSG_XSTEPS               "Xpassi/mm"
1034
+	#define MSG_YSTEPS               "Ypassi/mm"
1035
+	#define MSG_ZSTEPS               "Zpassi/mm"
1036
+	#define MSG_ESTEPS               "Epassi/mm"
1037
+	#define MSG_RECTRACT             "Ritrai"
1038
+	#define MSG_TEMPERATURE          "Temperatura"
1039
+	#define MSG_MOTION               "Movimento"
1040
+	#define MSG_STORE_EPROM          "Salva in EEPROM"
1041
+	#define MSG_LOAD_EPROM           "Carica da EEPROM"
1042
+	#define MSG_RESTORE_FAILSAFE     "Impostaz. default"
1043
+	#define MSG_REFRESH              "Aggiorna"
1044
+	#define MSG_WATCH                "Guarda"
1045
+	#define MSG_PREPARE              "Prepara"
1046
+	#define MSG_TUNE                 "Adatta"
1047
+	#define MSG_PAUSE_PRINT          "Pausa"
1048
+	#define MSG_RESUME_PRINT         "Riprendi Stampa"
1049
+	#define MSG_STOP_PRINT           "Arresta Stampa"
1050
+	#define MSG_CARD_MENU            "SD Card Menu"
1051
+	#define MSG_NO_CARD              "No SD Card"
1052
+	#define MSG_DWELL                "Sospensione..."
1053
+	#define MSG_USERWAIT             "Attendi Utente..."
1054
+	#define MSG_RESUMING             "Riprendi Stampa"
1055
+	#define MSG_NO_MOVE              "Nessun Movimento."
1059 1056
 	#define MSG_KILLED               "UCCISO. "
1060 1057
 	#define MSG_STOPPED              "ARRESTATO. "
1061
-	#define MSG_STEPPER_RELEASED     "Rilasciato."
1062
-	#define MSG_CONTROL_RETRACT      " Ritrai mm:"
1063
-	#define MSG_CONTROL_RETRACTF     " Ritrai  F:"
1064
-	#define MSG_CONTROL_RETRACT_ZLIFT " Salta mm:"
1065
-	#define MSG_CONTROL_RETRACT_RECOVER " UnRet +mm:"
1066
-	#define MSG_CONTROL_RETRACT_RECOVERF " UnRet  F:"
1067
-	#define MSG_AUTORETRACT          " AutoRilascio.:"
1058
+	#define MSG_CONTROL_RETRACT      "Ritrai mm"
1059
+	#define MSG_CONTROL_RETRACTF     "Ritrai  F"
1060
+	#define MSG_CONTROL_RETRACT_ZLIFT "Salta mm"
1061
+	#define MSG_CONTROL_RETRACT_RECOVER "UnRet +mm"
1062
+	#define MSG_CONTROL_RETRACT_RECOVERF "UnRet  F"
1063
+	#define MSG_AUTORETRACT          "AutoArretramento"
1068 1064
 	#define MSG_SERIAL_ERROR_MENU_STRUCTURE "Qualcosa non va in MenuStructure."
1069
-	#define MSG_FILAMENTCHANGE "Change filament"
1065
+	#define MSG_FILAMENTCHANGE       "Cambia filamento"
1066
+	#define MSG_INIT_SDCARD          "Iniz. SD-Card"
1067
+	#define MSG_CNG_SDCARD           "Cambia SD-Card"
1070 1068
 
1071 1069
 	// Serial Console Messages
1072 1070
 
@@ -1083,10 +1081,10 @@
1083 1081
 	#define MSG_PLANNER_BUFFER_BYTES "  PlannerBufferBytes: "
1084 1082
 	#define MSG_OK                   "ok"
1085 1083
 	#define MSG_FILE_SAVED           "File Salvato."
1086
-	#define MSG_ERR_LINE_NO          "Il Numero della Linea non corrisponde al Numero dell'Ultima Linea+1, Ultima Linea:"
1087
-	#define MSG_ERR_CHECKSUM_MISMATCH "checksum non corrispondente, Ultima Linea:"
1088
-	#define MSG_ERR_NO_CHECKSUM      "Nessun Checksum con Numero di Linea, Ultima Linea:"
1089
-	#define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "Nessun Numero di Linea con Checksum, Ultima Linea:"
1084
+	#define MSG_ERR_LINE_NO          "Il Numero della Linea non corrisponde al Numero dell'Ultima Linea+1, Ultima Linea: "
1085
+	#define MSG_ERR_CHECKSUM_MISMATCH "checksum non corrispondente, Ultima Linea: "
1086
+	#define MSG_ERR_NO_CHECKSUM      "Nessun Checksum con Numero di Linea, Ultima Linea: "
1087
+	#define MSG_ERR_NO_LINENUMBER_WITH_CHECKSUM "Nessun Numero di Linea con Checksum, Ultima Linea: "
1090 1088
 	#define MSG_FILE_PRINTED         "File stampato"
1091 1089
 	#define MSG_BEGIN_FILE_LIST      "Inizio Lista File"
1092 1090
 	#define MSG_END_FILE_LIST        "Fine Lista File"
@@ -1096,15 +1094,15 @@
1096 1094
 	#define MSG_ERR_NO_THERMISTORS   "Nessun Termistore - nessuna temperatura"
1097 1095
 	#define MSG_M109_INVALID_EXTRUDER "M109 Estrusore non valido "
1098 1096
 	#define MSG_HEATING              "Riscaldamento..."
1099
-	#define MSG_HEATING_COMPLETE     "Riscaldamento concluso."
1097
+	#define MSG_HEATING_COMPLETE     "Stampante Calda."
1100 1098
 	#define MSG_BED_HEATING          "Riscaldamento Piatto."
1101 1099
 	#define MSG_BED_DONE             "Piatto Pronto."
1102 1100
 	#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"
1103
-	#define MSG_COUNT_X              " Calcola X:"
1101
+	#define MSG_COUNT_X              " Calcola X: "
1104 1102
 	#define MSG_ERR_KILLED           "Stampante Calda. kill() chiamata !!"
1105 1103
 	#define MSG_ERR_STOPPED          "Stampante fermata a causa di errori. Risolvi l'errore e usa M999 per ripartire!. (Reset temperatura. Impostala prima di ripartire)"
1106 1104
 	#define MSG_RESEND               "Reinviato:"
1107
-	#define MSG_UNKNOWN_COMMAND      "Comando sconosciuto:\""
1105
+	#define MSG_UNKNOWN_COMMAND      "Comando sconosciuto: \""
1108 1106
 	#define MSG_ACTIVE_EXTRUDER      "Attiva Estrusore: "
1109 1107
 	#define MSG_INVALID_EXTRUDER     "Estrusore non valido"
1110 1108
 	#define MSG_X_MIN                "x_min: "
@@ -1125,16 +1123,16 @@
1125 1123
 	#define MSG_SD_CARD_OK           "SD card ok"
1126 1124
 	#define MSG_SD_WORKDIR_FAIL      "Fallita l'apertura Cartella di Lavoro"
1127 1125
 	#define MSG_SD_OPEN_FILE_FAIL    "Fallita l'apertura del File: "
1128
-	#define MSG_SD_FILE_OPENED       "File aperto:"
1129
-	#define MSG_SD_SIZE              " Dimensione:"
1126
+	#define MSG_SD_FILE_OPENED       "File aperto: "
1127
+	#define MSG_SD_SIZE              " Dimensione: "
1130 1128
 	#define MSG_SD_FILE_SELECTED     "File selezionato"
1131 1129
 	#define MSG_SD_WRITE_TO_FILE     "Scrittura su file: "
1132 1130
 	#define MSG_SD_PRINTING_BYTE     "Si sta scrivendo il byte su SD "
1133 1131
 	#define MSG_SD_NOT_PRINTING      "Non si sta scrivendo su SD"
1134 1132
 	#define MSG_SD_ERR_WRITE_TO_FILE "Errore nella scrittura su file"
1135
-	#define MSG_SD_CANT_ENTER_SUBDIR "Impossibile entrare nella sottocartella:"
1133
+	#define MSG_SD_CANT_ENTER_SUBDIR "Impossibile entrare nella sottocartella: "
1136 1134
 
1137
-	#define MSG_STEPPER_TO_HIGH      "Steprate troppo alto : "
1135
+	#define MSG_STEPPER_TO_HIGH      "Steprate troppo alto: "
1138 1136
 	#define MSG_ENDSTOPS_HIT         "Raggiunto il fondo carrello: "
1139 1137
 	#define MSG_ERR_COLD_EXTRUDE_STOP " prevenuta estrusione fredda"
1140 1138
 	#define MSG_ERR_LONG_EXTRUDE_STOP " prevenuta estrusione troppo lunga"

+ 12
- 6
Marlin/ultralcd.cpp View File

@@ -199,9 +199,15 @@ static void lcd_main_menu()
199 199
             MENU_ITEM(function, MSG_STOP_PRINT, lcd_sdcard_stop);
200 200
         }else{
201 201
             MENU_ITEM(submenu, MSG_CARD_MENU, lcd_sdcard_menu);
202
+#if SDCARDDETECT < 1
203
+			MENU_ITEM(gcode, MSG_CNG_SDCARD, PSTR("M21"));	// SD-card changed by user
204
+#endif			
202 205
         }
203 206
     }else{
204 207
         MENU_ITEM(submenu, MSG_NO_CARD, lcd_sdcard_menu);
208
+#if SDCARDDETECT < 1		
209
+		MENU_ITEM(gcode, MSG_INIT_SDCARD, PSTR("M21"));	// Manually initialize the SD-card via user interface
210
+#endif		
205 211
     }
206 212
 #endif
207 213
     END_MENU();
@@ -516,9 +522,9 @@ static void lcd_control_motion_menu()
516 522
     MENU_ITEM_EDIT(float52, MSG_YSTEPS, &axis_steps_per_unit[Y_AXIS], 5, 9999);
517 523
     MENU_ITEM_EDIT(float51, MSG_ZSTEPS, &axis_steps_per_unit[Z_AXIS], 5, 9999);
518 524
     MENU_ITEM_EDIT(float51, MSG_ESTEPS, &axis_steps_per_unit[E_AXIS], 5, 9999);    
519
-#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
520
-    MENU_ITEM_EDIT(bool, "Endstop abort", &abort_on_endstop_hit);
521
-#endif
525
+#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
526
+    MENU_ITEM_EDIT(bool, "Endstop abort", &abort_on_endstop_hit);
527
+#endif
522 528
     END_MENU();
523 529
 }
524 530
 
@@ -889,10 +895,10 @@ char *ftostr31(const float &x)
889 895
 
890 896
 char *ftostr32(const float &x)
891 897
 {
892
-  long xx=x*100;
898
+  long xx=x*100;
893 899
   if (xx >= 0)
894
-    conv[0]=(xx/10000)%10+'0';
895
-  else
900
+    conv[0]=(xx/10000)%10+'0';
901
+  else
896 902
     conv[0]='-';
897 903
   xx=abs(xx);
898 904
   conv[1]=(xx/1000)%10+'0';

+ 23
- 4
Marlin/ultralcd_implementation_hitachi_HD44780.h View File

@@ -297,7 +297,12 @@ static void lcd_implementation_status_screen()
297 297
 static void lcd_implementation_drawmenu_generic(uint8_t row, const char* pstr, char pre_char, char post_char)
298 298
 {
299 299
     char c;
300
-    uint8_t n = LCD_WIDTH - 1 - 2;
300
+    //Use all characters in narrow LCDs
301
+  #if LCD_WIDTH < 20
302
+    	uint8_t n = LCD_WIDTH - 1 - 1;
303
+    #else
304
+    	uint8_t n = LCD_WIDTH - 1 - 2;
305
+  #endif
301 306
     lcd.setCursor(0, row);
302 307
     lcd.print(pre_char);
303 308
     while((c = pgm_read_byte(pstr)) != '\0')
@@ -314,7 +319,12 @@ static void lcd_implementation_drawmenu_generic(uint8_t row, const char* pstr, c
314 319
 static void lcd_implementation_drawmenu_setting_edit_generic(uint8_t row, const char* pstr, char pre_char, char* data)
315 320
 {
316 321
     char c;
317
-    uint8_t n = LCD_WIDTH - 1 - 2 - strlen(data);
322
+    //Use all characters in narrow LCDs
323
+  #if LCD_WIDTH < 20
324
+    	uint8_t n = LCD_WIDTH - 1 - 1 - strlen(data);
325
+    #else
326
+    	uint8_t n = LCD_WIDTH - 1 - 2 - strlen(data);
327
+  #endif
318 328
     lcd.setCursor(0, row);
319 329
     lcd.print(pre_char);
320 330
     while((c = pgm_read_byte(pstr)) != '\0')
@@ -331,7 +341,12 @@ static void lcd_implementation_drawmenu_setting_edit_generic(uint8_t row, const
331 341
 static void lcd_implementation_drawmenu_setting_edit_generic_P(uint8_t row, const char* pstr, char pre_char, const char* data)
332 342
 {
333 343
     char c;
334
-    uint8_t n = LCD_WIDTH - 1 - 2 - strlen_P(data);
344
+    //Use all characters in narrow LCDs
345
+  #if LCD_WIDTH < 20
346
+    	uint8_t n = LCD_WIDTH - 1 - 1 - strlen_P(data);
347
+    #else
348
+    	uint8_t n = LCD_WIDTH - 1 - 2 - strlen_P(data);
349
+  #endif
335 350
     lcd.setCursor(0, row);
336 351
     lcd.print(pre_char);
337 352
     while((c = pgm_read_byte(pstr)) != '\0')
@@ -366,7 +381,11 @@ void lcd_implementation_drawedit(const char* pstr, char* value)
366 381
     lcd.setCursor(1, 1);
367 382
     lcd_printPGM(pstr);
368 383
     lcd.print(':');
369
-    lcd.setCursor(19 - strlen(value), 1);
384
+   #if LCD_WIDTH < 20
385
+    	lcd.setCursor(LCD_WIDTH - strlen(value), 1);
386
+    #else
387
+    	lcd.setCursor(LCD_WIDTH -1 - strlen(value), 1);
388
+   #endif
370 389
     lcd.print(value);
371 390
 }
372 391
 static void lcd_implementation_drawmenu_sdfile_selected(uint8_t row, const char* pstr, const char* filename, char* longFilename)

Loading…
Cancel
Save