Browse Source

Merge pull request #3303 from thinkyhead/rc_various_fixes

Various patches for LCD menu issues
Scott Lahteine 8 years ago
parent
commit
e8f8a46ef5

+ 3
- 3
Marlin/Default_Version.h View File

28
 // #error "You must specify the following parameters related to your distribution"
28
 // #error "You must specify the following parameters related to your distribution"
29
 
29
 
30
 #if true
30
 #if true
31
-#define SHORT_BUILD_VERSION "1.1.0-RC4"
32
-#define DETAILED_BUILD_VERSION "1.1.0-RC4 From Archive"
33
-#define STRING_DISTRIBUTION_DATE "2016-03-24 12:00"
31
+#define SHORT_BUILD_VERSION "1.1.0-RCBugFix"
32
+#define DETAILED_BUILD_VERSION "1.1.0-RCBugFix From Archive"
33
+#define STRING_DISTRIBUTION_DATE "2016-04-01 12:00"
34
 // It might also be appropriate to define a location where additional information can be found
34
 // It might also be appropriate to define a location where additional information can be found
35
 // #define SOURCE_CODE_URL  "http:// ..."
35
 // #define SOURCE_CODE_URL  "http:// ..."
36
 #endif
36
 #endif

+ 11
- 9
Marlin/dogm_lcd_implementation.h View File

378
   u8g.setColorIndex(0); // white on black
378
   u8g.setColorIndex(0); // white on black
379
   u8g.setPrintPos(2, XYZ_BASELINE);
379
   u8g.setPrintPos(2, XYZ_BASELINE);
380
   if (blink)
380
   if (blink)
381
-    lcd_printPGM(PSTR("X"));
381
+    lcd_printPGM(PSTR(MSG_X));
382
   else {
382
   else {
383
     if (!axis_homed[X_AXIS])
383
     if (!axis_homed[X_AXIS])
384
       lcd_printPGM(PSTR("?"));
384
       lcd_printPGM(PSTR("?"));
388
           lcd_printPGM(PSTR(" "));
388
           lcd_printPGM(PSTR(" "));
389
         else
389
         else
390
       #endif
390
       #endif
391
-      lcd_printPGM(PSTR("X"));
391
+      lcd_printPGM(PSTR(MSG_X));
392
     }
392
     }
393
   }
393
   }
394
   u8g.drawPixel(8, XYZ_BASELINE - 5);
394
   u8g.drawPixel(8, XYZ_BASELINE - 5);
398
 
398
 
399
   u8g.setPrintPos(43, XYZ_BASELINE);
399
   u8g.setPrintPos(43, XYZ_BASELINE);
400
   if (blink)
400
   if (blink)
401
-    lcd_printPGM(PSTR("Y"));
401
+    lcd_printPGM(PSTR(MSG_Y));
402
   else {
402
   else {
403
     if (!axis_homed[Y_AXIS])
403
     if (!axis_homed[Y_AXIS])
404
       lcd_printPGM(PSTR("?"));
404
       lcd_printPGM(PSTR("?"));
408
           lcd_printPGM(PSTR(" "));
408
           lcd_printPGM(PSTR(" "));
409
         else
409
         else
410
       #endif
410
       #endif
411
-      lcd_printPGM(PSTR("Y"));
411
+      lcd_printPGM(PSTR(MSG_Y));
412
     }
412
     }
413
   }
413
   }
414
   u8g.drawPixel(49, XYZ_BASELINE - 5);
414
   u8g.drawPixel(49, XYZ_BASELINE - 5);
418
 
418
 
419
   u8g.setPrintPos(83, XYZ_BASELINE);
419
   u8g.setPrintPos(83, XYZ_BASELINE);
420
   if (blink)
420
   if (blink)
421
-    lcd_printPGM(PSTR("Z"));
421
+    lcd_printPGM(PSTR(MSG_Z));
422
   else {
422
   else {
423
     if (!axis_homed[Z_AXIS])
423
     if (!axis_homed[Z_AXIS])
424
       lcd_printPGM(PSTR("?"));
424
       lcd_printPGM(PSTR("?"));
428
           lcd_printPGM(PSTR(" "));
428
           lcd_printPGM(PSTR(" "));
429
         else
429
         else
430
       #endif
430
       #endif
431
-      lcd_printPGM(PSTR("Z"));
431
+      lcd_printPGM(PSTR(MSG_Z));
432
     }
432
     }
433
   }
433
   }
434
   u8g.drawPixel(89, XYZ_BASELINE - 5);
434
   u8g.drawPixel(89, XYZ_BASELINE - 5);
562
 
562
 
563
   u8g.setPrintPos(0, rowHeight + kHalfChar);
563
   u8g.setPrintPos(0, rowHeight + kHalfChar);
564
   lcd_printPGM(pstr);
564
   lcd_printPGM(pstr);
565
-  lcd_print(':');
566
-  u8g.setPrintPos((lcd_width - 1 - vallen) * char_width, rows * rowHeight + kHalfChar);
567
-  lcd_print(value);
565
+  if (value != NULL) {
566
+    lcd_print(':');
567
+    u8g.setPrintPos((lcd_width - 1 - vallen) * char_width, rows * rowHeight + kHalfChar);
568
+    lcd_print(value);
569
+  }
568
 }
570
 }
569
 
571
 
570
 #if ENABLED(SDSUPPORT)
572
 #if ENABLED(SDSUPPORT)

+ 1
- 1
Marlin/language_an.h View File

42
 #define MSG_AUTOSTART                       " Autostart"
42
 #define MSG_AUTOSTART                       " Autostart"
43
 #define MSG_DISABLE_STEPPERS                "Amortar motors"
43
 #define MSG_DISABLE_STEPPERS                "Amortar motors"
44
 #define MSG_AUTO_HOME                       "Levar a l'orichen"
44
 #define MSG_AUTO_HOME                       "Levar a l'orichen"
45
-#define MSG_LEVEL_BED_HOMING                "Homing"
45
+#define MSG_LEVEL_BED_HOMING                "Homing XYZ"
46
 #define MSG_SET_HOME_OFFSETS                "Set home offsets"
46
 #define MSG_SET_HOME_OFFSETS                "Set home offsets"
47
 #define MSG_SET_ORIGIN                      "Establir zero"
47
 #define MSG_SET_ORIGIN                      "Establir zero"
48
 #define MSG_PREHEAT_PLA                     "Precalentar PLA"
48
 #define MSG_PREHEAT_PLA                     "Precalentar PLA"

+ 1
- 1
Marlin/language_bg.h View File

42
 #define MSG_AUTOSTART                       "Автостарт"
42
 #define MSG_AUTOSTART                       "Автостарт"
43
 #define MSG_DISABLE_STEPPERS                "Изкл. двигатели"
43
 #define MSG_DISABLE_STEPPERS                "Изкл. двигатели"
44
 #define MSG_AUTO_HOME                       "Паркиране"
44
 #define MSG_AUTO_HOME                       "Паркиране"
45
-#define MSG_LEVEL_BED_HOMING                "Homing"
45
+#define MSG_LEVEL_BED_HOMING                "Homing XYZ"
46
 #define MSG_SET_HOME_OFFSETS                "Задай Начало"
46
 #define MSG_SET_HOME_OFFSETS                "Задай Начало"
47
 #define MSG_SET_ORIGIN                      "Изходна точка"
47
 #define MSG_SET_ORIGIN                      "Изходна точка"
48
 #define MSG_PREHEAT_PLA                     "Подгряване PLA"
48
 #define MSG_PREHEAT_PLA                     "Подгряване PLA"

+ 1
- 1
Marlin/language_ca.h View File

43
 #define MSG_AUTOSTART                       "Inici automatic"
43
 #define MSG_AUTOSTART                       "Inici automatic"
44
 #define MSG_DISABLE_STEPPERS                "Apagar motors"
44
 #define MSG_DISABLE_STEPPERS                "Apagar motors"
45
 #define MSG_AUTO_HOME                       "Home global"
45
 #define MSG_AUTO_HOME                       "Home global"
46
-#define MSG_LEVEL_BED_HOMING                "Homing"
46
+#define MSG_LEVEL_BED_HOMING                "Homing XYZ"
47
 #define MSG_SET_HOME_OFFSETS                "Set home offsets"
47
 #define MSG_SET_HOME_OFFSETS                "Set home offsets"
48
 #define MSG_SET_ORIGIN                      "Establir origen"
48
 #define MSG_SET_ORIGIN                      "Establir origen"
49
 #define MSG_PREHEAT_PLA                     "Preescalfar PLA"
49
 #define MSG_PREHEAT_PLA                     "Preescalfar PLA"

+ 1
- 1
Marlin/language_cn.h View File

40
 #define MSG_AUTOSTART                       "\xb1\xb2\xb3\xb4"
40
 #define MSG_AUTOSTART                       "\xb1\xb2\xb3\xb4"
41
 #define MSG_DISABLE_STEPPERS                "\xb5\xb6\xb7\xb8\xb9\xba"
41
 #define MSG_DISABLE_STEPPERS                "\xb5\xb6\xb7\xb8\xb9\xba"
42
 #define MSG_AUTO_HOME                       "\xbb\xbc\xbd"
42
 #define MSG_AUTO_HOME                       "\xbb\xbc\xbd"
43
-#define MSG_LEVEL_BED_HOMING                "Homing"
43
+#define MSG_LEVEL_BED_HOMING                "Homing XYZ"
44
 #define MSG_SET_HOME_OFFSETS                "\xbe\xbf\xbb\xbc\xbd\xc0\xc1"
44
 #define MSG_SET_HOME_OFFSETS                "\xbe\xbf\xbb\xbc\xbd\xc0\xc1"
45
 #define MSG_SET_ORIGIN                      "\xbe\xbf\xbc\xbd"
45
 #define MSG_SET_ORIGIN                      "\xbe\xbf\xbc\xbd"
46
 #define MSG_PREHEAT_PLA                     "\xc3\xc4 PLA"
46
 #define MSG_PREHEAT_PLA                     "\xc3\xc4 PLA"

+ 1
- 1
Marlin/language_da.h View File

43
 #define MSG_AUTO_HOME                       "Home" // G28
43
 #define MSG_AUTO_HOME                       "Home" // G28
44
 #define MSG_COOLDOWN                        "Afkøl"
44
 #define MSG_COOLDOWN                        "Afkøl"
45
 #define MSG_DISABLE_STEPPERS                "Slå stepper fra"
45
 #define MSG_DISABLE_STEPPERS                "Slå stepper fra"
46
-#define MSG_LEVEL_BED_HOMING                "Homing"
46
+#define MSG_LEVEL_BED_HOMING                "Homing XYZ"
47
 #define MSG_SET_HOME_OFFSETS                "Sæt home offsets"
47
 #define MSG_SET_HOME_OFFSETS                "Sæt home offsets"
48
 #define MSG_SET_ORIGIN                      "Sæt origin"
48
 #define MSG_SET_ORIGIN                      "Sæt origin"
49
 #define MSG_SWITCH_PS_ON                    "Slå strøm til"
49
 #define MSG_SWITCH_PS_ON                    "Slå strøm til"

+ 1
- 1
Marlin/language_de.h View File

42
 #define MSG_AUTOSTART                       "Autostart"
42
 #define MSG_AUTOSTART                       "Autostart"
43
 #define MSG_DISABLE_STEPPERS                "Motoren Aus" // M84
43
 #define MSG_DISABLE_STEPPERS                "Motoren Aus" // M84
44
 #define MSG_AUTO_HOME                       "Home" // G28
44
 #define MSG_AUTO_HOME                       "Home" // G28
45
-#define MSG_LEVEL_BED_HOMING                "Homing"
45
+#define MSG_LEVEL_BED_HOMING                "Homing XYZ"
46
 #define MSG_SET_HOME_OFFSETS                "Setze Home hier"
46
 #define MSG_SET_HOME_OFFSETS                "Setze Home hier"
47
 #define MSG_SET_ORIGIN                      "Setze Null hier" //"G92 X0 Y0 Z0" commented out in ultralcd.cpp
47
 #define MSG_SET_ORIGIN                      "Setze Null hier" //"G92 X0 Y0 Z0" commented out in ultralcd.cpp
48
 #define MSG_PREHEAT_PLA                     "Vorwärmen PLA"
48
 #define MSG_PREHEAT_PLA                     "Vorwärmen PLA"

+ 1
- 1
Marlin/language_en.h View File

62
   #define MSG_AUTO_HOME                       "Auto home"
62
   #define MSG_AUTO_HOME                       "Auto home"
63
 #endif
63
 #endif
64
 #ifndef MSG_LEVEL_BED_HOMING
64
 #ifndef MSG_LEVEL_BED_HOMING
65
-  #define MSG_LEVEL_BED_HOMING                "Homing"
65
+  #define MSG_LEVEL_BED_HOMING                "Homing XYZ"
66
 #endif
66
 #endif
67
 #ifndef MSG_SET_HOME_OFFSETS
67
 #ifndef MSG_SET_HOME_OFFSETS
68
   #define MSG_SET_HOME_OFFSETS                "Set home offsets"
68
   #define MSG_SET_HOME_OFFSETS                "Set home offsets"

+ 1
- 1
Marlin/language_es.h View File

42
 #define MSG_AUTOSTART                       "Autostart"
42
 #define MSG_AUTOSTART                       "Autostart"
43
 #define MSG_DISABLE_STEPPERS                "Apagar motores"
43
 #define MSG_DISABLE_STEPPERS                "Apagar motores"
44
 #define MSG_AUTO_HOME                       "Llevar al origen"
44
 #define MSG_AUTO_HOME                       "Llevar al origen"
45
-#define MSG_LEVEL_BED_HOMING                "Homing"
45
+#define MSG_LEVEL_BED_HOMING                "Homing XYZ"
46
 #define MSG_SET_HOME_OFFSETS                "Ajustar offsets"
46
 #define MSG_SET_HOME_OFFSETS                "Ajustar offsets"
47
 #define MSG_SET_ORIGIN                      "Establecer cero"
47
 #define MSG_SET_ORIGIN                      "Establecer cero"
48
 #define MSG_PREHEAT_PLA                     "Precalentar PLA"
48
 #define MSG_PREHEAT_PLA                     "Precalentar PLA"

+ 1
- 1
Marlin/language_eu.h View File

42
 #define MSG_AUTOSTART                       "Auto hasiera"
42
 #define MSG_AUTOSTART                       "Auto hasiera"
43
 #define MSG_DISABLE_STEPPERS                "Itzali motoreak"
43
 #define MSG_DISABLE_STEPPERS                "Itzali motoreak"
44
 #define MSG_AUTO_HOME                       "Hasierara joan"
44
 #define MSG_AUTO_HOME                       "Hasierara joan"
45
-#define MSG_LEVEL_BED_HOMING                "Homing"
45
+#define MSG_LEVEL_BED_HOMING                "Homing XYZ"
46
 #define MSG_SET_HOME_OFFSETS                "Set home offsets"
46
 #define MSG_SET_HOME_OFFSETS                "Set home offsets"
47
 #define MSG_SET_ORIGIN                      "Hasiera ipini"
47
 #define MSG_SET_ORIGIN                      "Hasiera ipini"
48
 #define MSG_PREHEAT_PLA                     "Aurreberotu PLA"
48
 #define MSG_PREHEAT_PLA                     "Aurreberotu PLA"

+ 1
- 1
Marlin/language_fi.h View File

42
 #define MSG_AUTOSTART                       "Automaatti"
42
 #define MSG_AUTOSTART                       "Automaatti"
43
 #define MSG_DISABLE_STEPPERS                "Vapauta moottorit"
43
 #define MSG_DISABLE_STEPPERS                "Vapauta moottorit"
44
 #define MSG_AUTO_HOME                       "Aja referenssiin"
44
 #define MSG_AUTO_HOME                       "Aja referenssiin"
45
-#define MSG_LEVEL_BED_HOMING                "Homing"
45
+#define MSG_LEVEL_BED_HOMING                "Homing XYZ"
46
 #define MSG_SET_HOME_OFFSETS                "Set home offsets"
46
 #define MSG_SET_HOME_OFFSETS                "Set home offsets"
47
 #define MSG_SET_ORIGIN                      "Aseta origo"
47
 #define MSG_SET_ORIGIN                      "Aseta origo"
48
 #define MSG_PREHEAT_PLA                     "Esilämmitä PLA"
48
 #define MSG_PREHEAT_PLA                     "Esilämmitä PLA"

+ 1
- 1
Marlin/language_fr.h View File

43
 #define MSG_AUTOSTART                       "Demarrage auto"
43
 #define MSG_AUTOSTART                       "Demarrage auto"
44
 #define MSG_DISABLE_STEPPERS                "Arreter moteurs"
44
 #define MSG_DISABLE_STEPPERS                "Arreter moteurs"
45
 #define MSG_AUTO_HOME                       "Home auto."
45
 #define MSG_AUTO_HOME                       "Home auto."
46
-#define MSG_LEVEL_BED_HOMING                "Homing"
46
+#define MSG_LEVEL_BED_HOMING                "Homing XYZ"
47
 #define MSG_SET_HOME_OFFSETS                "Set home offsets"
47
 #define MSG_SET_HOME_OFFSETS                "Set home offsets"
48
 #define MSG_SET_ORIGIN                      "Regler origine"
48
 #define MSG_SET_ORIGIN                      "Regler origine"
49
 #define MSG_PREHEAT_PLA                     "Prechauffage PLA"
49
 #define MSG_PREHEAT_PLA                     "Prechauffage PLA"

+ 1
- 1
Marlin/language_it.h View File

42
 #define MSG_AUTOSTART                       "Autostart"
42
 #define MSG_AUTOSTART                       "Autostart"
43
 #define MSG_DISABLE_STEPPERS                "Disabilita Motori"
43
 #define MSG_DISABLE_STEPPERS                "Disabilita Motori"
44
 #define MSG_AUTO_HOME                       "Auto Home"
44
 #define MSG_AUTO_HOME                       "Auto Home"
45
-#define MSG_LEVEL_BED_HOMING                "Homing"
45
+#define MSG_LEVEL_BED_HOMING                "Homing XYZ"
46
 #define MSG_SET_HOME_OFFSETS                "Setta offset home"
46
 #define MSG_SET_HOME_OFFSETS                "Setta offset home"
47
 #define MSG_SET_ORIGIN                      "Imposta Origine"
47
 #define MSG_SET_ORIGIN                      "Imposta Origine"
48
 #define MSG_PREHEAT_PLA                     "Preriscalda PLA"
48
 #define MSG_PREHEAT_PLA                     "Preriscalda PLA"

+ 1
- 1
Marlin/language_kana.h View File

44
 #define MSG_AUTOSTART                       "\xbc\xde\xc4\xde\xb3\xb6\xb2\xbc"                             // "Autostart"
44
 #define MSG_AUTOSTART                       "\xbc\xde\xc4\xde\xb3\xb6\xb2\xbc"                             // "Autostart"
45
 #define MSG_DISABLE_STEPPERS                "\xd3\xb0\xc0\xb0\xc3\xde\xdd\xb9\xde\xdd\x20\xb5\xcc"         // "Disable steppers"
45
 #define MSG_DISABLE_STEPPERS                "\xd3\xb0\xc0\xb0\xc3\xde\xdd\xb9\xde\xdd\x20\xb5\xcc"         // "Disable steppers"
46
 #define MSG_AUTO_HOME                       "\xb9\xde\xdd\xc3\xdd\xc6\xb2\xc4\xde\xb3"                     // "Auto home"
46
 #define MSG_AUTO_HOME                       "\xb9\xde\xdd\xc3\xdd\xc6\xb2\xc4\xde\xb3"                     // "Auto home"
47
-#define MSG_LEVEL_BED_HOMING                "\xb9\xde\xdd\xc3\xdd\xc6\xb2\xc4\xde\xb3"                     // "Homing"
47
+#define MSG_LEVEL_BED_HOMING                "\xb9\xde\xdd\xc3\xdd\xc6\xb2\xc4\xde\xb3"                     // "Homing XYZ"
48
 #define MSG_SET_HOME_OFFSETS                "\xb7\xbc\xde\xad\xdd\xb5\xcc\xbe\xaf\xc4\xbe\xaf\xc3\xb2"     // "Set home offsets"
48
 #define MSG_SET_HOME_OFFSETS                "\xb7\xbc\xde\xad\xdd\xb5\xcc\xbe\xaf\xc4\xbe\xaf\xc3\xb2"     // "Set home offsets"
49
 #define MSG_SET_ORIGIN                      "\xb7\xbc\xde\xad\xdd\xbe\xaf\xc4"                             // "Set origin"
49
 #define MSG_SET_ORIGIN                      "\xb7\xbc\xde\xad\xdd\xbe\xaf\xc4"                             // "Set origin"
50
 #define MSG_PREHEAT_PLA                     "PLA \xd6\xc8\xc2"                                             // "Preheat PLA"
50
 #define MSG_PREHEAT_PLA                     "PLA \xd6\xc8\xc2"                                             // "Preheat PLA"

+ 1
- 1
Marlin/language_nl.h View File

42
 #define MSG_AUTOSTART                       "Autostart"
42
 #define MSG_AUTOSTART                       "Autostart"
43
 #define MSG_DISABLE_STEPPERS                "Motoren uit"
43
 #define MSG_DISABLE_STEPPERS                "Motoren uit"
44
 #define MSG_AUTO_HOME                       "Auto home"
44
 #define MSG_AUTO_HOME                       "Auto home"
45
-#define MSG_LEVEL_BED_HOMING                "Homing"
45
+#define MSG_LEVEL_BED_HOMING                "Homing XYZ"
46
 #define MSG_SET_HOME_OFFSETS                "Set home offsets"
46
 #define MSG_SET_HOME_OFFSETS                "Set home offsets"
47
 #define MSG_SET_ORIGIN                      "Nulpunt instellen"
47
 #define MSG_SET_ORIGIN                      "Nulpunt instellen"
48
 #define MSG_PREHEAT_PLA                     "PLA voorverwarmen"
48
 #define MSG_PREHEAT_PLA                     "PLA voorverwarmen"

+ 1
- 1
Marlin/language_pl.h View File

42
 #define MSG_AUTOSTART                       "Autostart"
42
 #define MSG_AUTOSTART                       "Autostart"
43
 #define MSG_DISABLE_STEPPERS                "Wylacz silniki"
43
 #define MSG_DISABLE_STEPPERS                "Wylacz silniki"
44
 #define MSG_AUTO_HOME                       "Auto. poz. zerowa"
44
 #define MSG_AUTO_HOME                       "Auto. poz. zerowa"
45
-#define MSG_LEVEL_BED_HOMING                "Homing"
45
+#define MSG_LEVEL_BED_HOMING                "Homing XYZ"
46
 #define MSG_SET_HOME_OFFSETS                "Set home offsets"
46
 #define MSG_SET_HOME_OFFSETS                "Set home offsets"
47
 #define MSG_SET_ORIGIN                      "Ustaw punkt zero"
47
 #define MSG_SET_ORIGIN                      "Ustaw punkt zero"
48
 #define MSG_PREHEAT_PLA                     "Rozgrzej PLA"
48
 #define MSG_PREHEAT_PLA                     "Rozgrzej PLA"

+ 1
- 1
Marlin/language_pt-br.h View File

42
 #define MSG_AUTOSTART                       "Autostart"
42
 #define MSG_AUTOSTART                       "Autostart"
43
 #define MSG_DISABLE_STEPPERS                "Desabi. motores"
43
 #define MSG_DISABLE_STEPPERS                "Desabi. motores"
44
 #define MSG_AUTO_HOME                       "Ir para origen"
44
 #define MSG_AUTO_HOME                       "Ir para origen"
45
-#define MSG_LEVEL_BED_HOMING                "Homing"
45
+#define MSG_LEVEL_BED_HOMING                "Homing XYZ"
46
 #define MSG_SET_HOME_OFFSETS                "Ajustar Jogo"
46
 #define MSG_SET_HOME_OFFSETS                "Ajustar Jogo"
47
 #define MSG_SET_ORIGIN                      "Ajustar orig."
47
 #define MSG_SET_ORIGIN                      "Ajustar orig."
48
 #define MSG_PREHEAT_PLA                     "Pre-aquecer PLA"
48
 #define MSG_PREHEAT_PLA                     "Pre-aquecer PLA"

+ 1
- 1
Marlin/language_ru.h View File

42
 #define MSG_AUTOSTART                       "Автостарт"
42
 #define MSG_AUTOSTART                       "Автостарт"
43
 #define MSG_DISABLE_STEPPERS                "Выкл. двигатели"
43
 #define MSG_DISABLE_STEPPERS                "Выкл. двигатели"
44
 #define MSG_AUTO_HOME                       "Парковка"
44
 #define MSG_AUTO_HOME                       "Парковка"
45
-#define MSG_LEVEL_BED_HOMING                "Homing"
45
+#define MSG_LEVEL_BED_HOMING                "Homing XYZ"
46
 #define MSG_SET_HOME_OFFSETS                "Запомнить парковку"
46
 #define MSG_SET_HOME_OFFSETS                "Запомнить парковку"
47
 #define MSG_SET_ORIGIN                      "Запомнить ноль"
47
 #define MSG_SET_ORIGIN                      "Запомнить ноль"
48
 #define MSG_PREHEAT_PLA                     "Преднагрев PLA"
48
 #define MSG_PREHEAT_PLA                     "Преднагрев PLA"

+ 40
- 28
Marlin/ultralcd.cpp View File

267
   uint8_t currentMenuViewOffset;              /* scroll offset in the current menu */
267
   uint8_t currentMenuViewOffset;              /* scroll offset in the current menu */
268
   millis_t next_button_update_ms;
268
   millis_t next_button_update_ms;
269
   uint8_t lastEncoderBits;
269
   uint8_t lastEncoderBits;
270
-  uint32_t encoderPosition;
270
+  uint32_t encoderPosition, prevEncoderPosition;
271
   #if PIN_EXISTS(SD_DETECT)
271
   #if PIN_EXISTS(SD_DETECT)
272
     uint8_t lcd_sd_status;
272
     uint8_t lcd_sd_status;
273
   #endif
273
   #endif
279
 uint8_t lcd_status_update_delay;
279
 uint8_t lcd_status_update_delay;
280
 bool ignore_click = false;
280
 bool ignore_click = false;
281
 bool wait_for_unclick;
281
 bool wait_for_unclick;
282
+bool defer_return_to_status = false;
282
 uint8_t lcdDrawUpdate = 2;                  /* Set to none-zero when the LCD needs to draw, decreased after every draw. Set to 2 in LCD routines so the LCD gets at least 1 full redraw (first redraw is partial) */
283
 uint8_t lcdDrawUpdate = 2;                  /* Set to none-zero when the LCD needs to draw, decreased after every draw. Set to 2 in LCD routines so the LCD gets at least 1 full redraw (first redraw is partial) */
283
 
284
 
284
-//prevMenu and prevEncoderPosition are used to store the previous menu location when editing settings.
285
-menuFunc_t prevMenu = NULL;
286
-uint16_t prevEncoderPosition;
287
-//Variables used when editing values.
285
+// Variables used when editing values.
288
 const char* editLabel;
286
 const char* editLabel;
289
 void* editValue;
287
 void* editValue;
290
 int32_t minEditValue, maxEditValue;
288
 int32_t minEditValue, maxEditValue;
291
-menuFunc_t callbackFunc;
289
+menuFunc_t prevMenu = NULL;           // return here after editing (also prevEncoderPosition)
290
+menuFunc_t callbackFunc;              // call this after editing
292
 
291
 
293
 // place-holders for Ki and Kd edits
292
 // place-holders for Ki and Kd edits
294
 float raw_Ki, raw_Kd;
293
 float raw_Ki, raw_Kd;
299
 static void lcd_goto_menu(menuFunc_t menu, const bool feedback = false, const uint32_t encoder = 0) {
298
 static void lcd_goto_menu(menuFunc_t menu, const bool feedback = false, const uint32_t encoder = 0) {
300
   if (currentMenu != menu) {
299
   if (currentMenu != menu) {
301
     currentMenu = menu;
300
     currentMenu = menu;
301
+    lcdDrawUpdate = 2;
302
     #if ENABLED(NEWPANEL)
302
     #if ENABLED(NEWPANEL)
303
       encoderPosition = encoder;
303
       encoderPosition = encoder;
304
       if (feedback) lcd_quick_feedback();
304
       if (feedback) lcd_quick_feedback();
310
   }
310
   }
311
 }
311
 }
312
 
312
 
313
-inline void lcd_save_previous_menu() { prevMenu = currentMenu; prevEncoderPosition = encoderPosition; }
313
+inline void lcd_save_previous_menu() {
314
+  prevMenu = currentMenu;
315
+  #if ENABLED(ULTIPANEL)
316
+    prevEncoderPosition = encoderPosition;
317
+  #endif
318
+}
314
 
319
 
315
-static void lcd_goto_previous_menu() { lcd_goto_menu(prevMenu, true, prevEncoderPosition); }
320
+static void lcd_goto_previous_menu() {
321
+  lcd_goto_menu(prevMenu, true
322
+    #if ENABLED(ULTIPANEL)
323
+      , prevEncoderPosition
324
+    #endif
325
+  );
326
+}
316
 
327
 
317
 /**
328
 /**
318
  *
329
  *
420
 
431
 
421
 #if ENABLED(ULTIPANEL)
432
 #if ENABLED(ULTIPANEL)
422
 
433
 
423
-static void lcd_return_to_status() { lcd_goto_menu(lcd_status_screen); }
434
+static void lcd_return_to_status() {
435
+  defer_return_to_status = false;
436
+  lcd_goto_menu(lcd_status_screen);
437
+}
424
 
438
 
425
 #if ENABLED(SDSUPPORT)
439
 #if ENABLED(SDSUPPORT)
426
 
440
 
536
         babystepsTodo[axis] += distance;
550
         babystepsTodo[axis] += distance;
537
       #endif
551
       #endif
538
     }
552
     }
539
-    if (lcdDrawUpdate) lcd_implementation_drawedit(msg, "");
553
+    if (lcdDrawUpdate) lcd_implementation_drawedit(msg, NULL);
540
     if (LCD_CLICKED) lcd_goto_previous_menu();
554
     if (LCD_CLICKED) lcd_goto_previous_menu();
541
   }
555
   }
542
 
556
 
1140
       _PIDTEMP_BASE_FUNCTIONS(eindex); \
1154
       _PIDTEMP_BASE_FUNCTIONS(eindex); \
1141
       void lcd_autotune_callback_E ## eindex() { _lcd_autotune(eindex); }
1155
       void lcd_autotune_callback_E ## eindex() { _lcd_autotune(eindex); }
1142
   #else
1156
   #else
1143
-    #define _PIDTEMP_FUNCTIONS(eindex) _PIDTEMP_BASE_FUNCTIONS(eindex);
1157
+    #define _PIDTEMP_FUNCTIONS(eindex) _PIDTEMP_BASE_FUNCTIONS(eindex)
1144
   #endif
1158
   #endif
1145
 
1159
 
1146
   _PIDTEMP_FUNCTIONS(0);
1160
   _PIDTEMP_FUNCTIONS(0);
1808
 bool lcd_blink() {
1822
 bool lcd_blink() {
1809
   static uint8_t blink = 0;
1823
   static uint8_t blink = 0;
1810
   static millis_t next_blink_ms = 0;
1824
   static millis_t next_blink_ms = 0;
1811
-  if (millis() >= next_blink_ms) {
1825
+  millis_t ms = millis();
1826
+  if (ms >= next_blink_ms) {
1812
     blink ^= 0xFF;
1827
     blink ^= 0xFF;
1813
-    next_blink_ms = millis() + LCD_UPDATE_INTERVAL - 50;
1828
+    next_blink_ms = ms + 1000 - LCD_UPDATE_INTERVAL / 2;
1814
   }
1829
   }
1815
   return blink != 0;
1830
   return blink != 0;
1816
 }
1831
 }
1956
     #if ENABLED(ULTIPANEL)
1971
     #if ENABLED(ULTIPANEL)
1957
 
1972
 
1958
       // Return to Status Screen after a timeout
1973
       // Return to Status Screen after a timeout
1959
-      if (currentMenu != lcd_status_screen &&
1960
-        #if ENABLED(MANUAL_BED_LEVELING)
1961
-          currentMenu != _lcd_level_bed &&
1962
-          currentMenu != _lcd_level_bed_homing &&
1963
-        #endif
1964
-        millis() > return_to_status_ms
1965
-      ) {
1974
+      if (!defer_return_to_status && currentMenu != lcd_status_screen && millis() > return_to_status_ms) {
1966
         lcd_return_to_status();
1975
         lcd_return_to_status();
1967
         lcdDrawUpdate = 2;
1976
         lcdDrawUpdate = 2;
1968
       }
1977
       }
2219
   long xx = x * 1000;
2228
   long xx = x * 1000;
2220
   char *conv_ptr = conv;
2229
   char *conv_ptr = conv;
2221
   if (xx >= 0) {
2230
   if (xx >= 0) {
2222
-    *conv_ptr++ = ' ';
2231
+    conv_ptr++;
2223
   }
2232
   }
2224
   else {
2233
   else {
2225
-    conv[0] = '-';
2226
     xx = -xx;
2234
     xx = -xx;
2235
+    conv[0] = '-';
2227
   }
2236
   }
2228
   conv[1] = (xx / 1000) % 10 + '0';
2237
   conv[1] = (xx / 1000) % 10 + '0';
2229
   conv[2] = '.';
2238
   conv[2] = '.';
2440
       if (max_software_endstops) NOMORE(current_position[Z_AXIS], Z_MAX_POS);
2449
       if (max_software_endstops) NOMORE(current_position[Z_AXIS], Z_MAX_POS);
2441
       encoderPosition = 0;
2450
       encoderPosition = 0;
2442
       line_to_current(Z_AXIS);
2451
       line_to_current(Z_AXIS);
2443
-      lcdDrawUpdate = 2;
2452
+      lcdDrawUpdate = 1;
2453
+    }
2454
+    if (lcdDrawUpdate) {
2455
+      float v = current_position[Z_AXIS] - MESH_HOME_SEARCH_Z;
2456
+      lcd_implementation_drawedit(PSTR(MSG_MOVE_Z), ftostr43(v + (v < 0 ? -0.0001 : 0.0001)));
2444
     }
2457
     }
2445
-    if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR("Z"), ftostr43(current_position[Z_AXIS]));
2446
     static bool debounce_click = false;
2458
     static bool debounce_click = false;
2447
     if (LCD_CLICKED) {
2459
     if (LCD_CLICKED) {
2448
       if (!debounce_click) {
2460
       if (!debounce_click) {
2469
           current_position[X_AXIS] = mbl.get_x(ix);
2481
           current_position[X_AXIS] = mbl.get_x(ix);
2470
           current_position[Y_AXIS] = mbl.get_y(iy);
2482
           current_position[Y_AXIS] = mbl.get_y(iy);
2471
           line_to_current(manual_feedrate[X_AXIS] <= manual_feedrate[Y_AXIS] ? X_AXIS : Y_AXIS);
2483
           line_to_current(manual_feedrate[X_AXIS] <= manual_feedrate[Y_AXIS] ? X_AXIS : Y_AXIS);
2472
-          lcdDrawUpdate = 2;
2484
+          lcdDrawUpdate = 1;
2473
         }
2485
         }
2474
       }
2486
       }
2475
     }
2487
     }
2482
    * MBL Move to mesh starting point
2494
    * MBL Move to mesh starting point
2483
    */
2495
    */
2484
   static void _lcd_level_bed_homing() {
2496
   static void _lcd_level_bed_homing() {
2485
-    if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR("XYZ"), MSG_LEVEL_BED_HOMING);
2497
+    if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR(MSG_LEVEL_BED_HOMING), NULL);
2498
+    lcdDrawUpdate = 1;
2486
     if (axis_known_position[X_AXIS] && axis_known_position[Y_AXIS] && axis_known_position[Z_AXIS]) {
2499
     if (axis_known_position[X_AXIS] && axis_known_position[Y_AXIS] && axis_known_position[Z_AXIS]) {
2487
       current_position[Z_AXIS] = MESH_HOME_SEARCH_Z;
2500
       current_position[Z_AXIS] = MESH_HOME_SEARCH_Z;
2488
       plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
2501
       plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
2492
       _lcd_level_bed_position = 0;
2505
       _lcd_level_bed_position = 0;
2493
       lcd_goto_menu(_lcd_level_bed);
2506
       lcd_goto_menu(_lcd_level_bed);
2494
     }
2507
     }
2495
-    lcdDrawUpdate = 2;
2496
   }
2508
   }
2497
 
2509
 
2498
   /**
2510
   /**
2499
    * MBL entry-point
2511
    * MBL entry-point
2500
    */
2512
    */
2501
   static void lcd_level_bed() {
2513
   static void lcd_level_bed() {
2514
+    defer_return_to_status = true;
2502
     axis_known_position[X_AXIS] = axis_known_position[Y_AXIS] = axis_known_position[Z_AXIS] = false;
2515
     axis_known_position[X_AXIS] = axis_known_position[Y_AXIS] = axis_known_position[Z_AXIS] = false;
2503
     mbl.reset();
2516
     mbl.reset();
2504
     enqueue_and_echo_commands_P(PSTR("G28"));
2517
     enqueue_and_echo_commands_P(PSTR("G28"));
2505
-    lcdDrawUpdate = 2;
2506
     lcd_goto_menu(_lcd_level_bed_homing);
2518
     lcd_goto_menu(_lcd_level_bed_homing);
2507
   }
2519
   }
2508
 
2520
 

+ 5
- 3
Marlin/ultralcd_implementation_hitachi_HD44780.h View File

863
 void lcd_implementation_drawedit(const char* pstr, const char* value) {
863
 void lcd_implementation_drawedit(const char* pstr, const char* value) {
864
   lcd.setCursor(1, 1);
864
   lcd.setCursor(1, 1);
865
   lcd_printPGM(pstr);
865
   lcd_printPGM(pstr);
866
-  lcd.print(':');
867
-  lcd.setCursor(LCD_WIDTH - lcd_strlen(value), 1);
868
-  lcd_print(value);
866
+  if (value != NULL) {
867
+    lcd.print(':');
868
+    lcd.setCursor(LCD_WIDTH - lcd_strlen(value), 1);
869
+    lcd_print(value);
870
+  }
869
 }
871
 }
870
 
872
 
871
 #if ENABLED(SDSUPPORT)
873
 #if ENABLED(SDSUPPORT)

Loading…
Cancel
Save