Browse Source

Merge branch 'Development' into eeprom_in_gcode

Latest upstream commits
Scott Lahteine 9 years ago
parent
commit
0f687b5dda
35 changed files with 843 additions and 163 deletions
  1. 5
    4
      Documentation/LCDLanguageFont.md
  2. 1
    1
      Marlin/Configuration.h
  3. 3
    1
      Marlin/Configuration_adv.h
  4. 16
    2
      Marlin/Marlin_main.cpp
  5. 1
    1
      Marlin/configurator/config/Configuration.h
  6. 3
    1
      Marlin/configurator/config/Configuration_adv.h
  7. 270
    0
      Marlin/dogm_font_data_ISO10646_CN.h
  8. 30
    10
      Marlin/dogm_lcd_implementation.h
  9. 1
    1
      Marlin/example_configurations/Felix/Configuration.h
  10. 1
    1
      Marlin/example_configurations/Felix/Configuration_DUAL.h
  11. 3
    1
      Marlin/example_configurations/Felix/Configuration_adv.h
  12. 1
    1
      Marlin/example_configurations/Hephestos/Configuration.h
  13. 3
    1
      Marlin/example_configurations/Hephestos/Configuration_adv.h
  14. 1
    1
      Marlin/example_configurations/K8200/Configuration.h
  15. 3
    1
      Marlin/example_configurations/K8200/Configuration_adv.h
  16. 1
    1
      Marlin/example_configurations/SCARA/Configuration.h
  17. 3
    1
      Marlin/example_configurations/SCARA/Configuration_adv.h
  18. 1
    1
      Marlin/example_configurations/WITBOX/Configuration.h
  19. 3
    1
      Marlin/example_configurations/WITBOX/Configuration_adv.h
  20. 1
    1
      Marlin/example_configurations/delta/generic/Configuration.h
  21. 3
    1
      Marlin/example_configurations/delta/generic/Configuration_adv.h
  22. 1
    1
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  23. 3
    1
      Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h
  24. 1
    1
      Marlin/example_configurations/makibox/Configuration.h
  25. 3
    1
      Marlin/example_configurations/makibox/Configuration_adv.h
  26. 1
    1
      Marlin/example_configurations/tvrrug/Round2/Configuration.h
  27. 3
    1
      Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h
  28. BIN
      Marlin/fonts/ISO10646_CN.fon
  29. 3
    2
      Marlin/fonts/README.fonts
  30. 1
    0
      Marlin/fonts/make_fonts.bat
  31. 1
    0
      Marlin/language.h
  32. 159
    0
      Marlin/language_cn.h
  33. 1
    1
      Marlin/language_en.h
  34. 305
    114
      Marlin/ultralcd.cpp
  35. 7
    7
      Marlin/ultralcd_st7920_u8glib_rrd.h

+ 5
- 4
Documentation/LCDLanguageFont.md View File

@@ -46,11 +46,9 @@ We have two different technologies for the displays:
46 46
   * nl    Dutch
47 47
   * ca    Catalan
48 48
   * eu    Basque-Euskera
49
+  * cn    Chinese
50
+  * jp    Japanese (Katakana)
49 51
 
50
-  and recently on [Thingiverse](http://www.thingiverse.com/) a new port to
51
-  * jp    [Japanese](http://www.thingiverse.com/thing:664397)
52
-
53
- appeared.
54 52
 
55 53
 ## The Problem
56 54
   All of this languages, except the English, normally use extended symbol sets, not contained in US-ASCII.
@@ -132,6 +130,9 @@ We have two different technologies for the displays:
132 130
 
133 131
   You'll find all translatable strings in 'language_en.h'. Please don't translate any strings from 'language.h', this may break the serial protocol.
134 132
 
133
+  For information about fonts see: Marlin\fonts\README.fonts
134
+
135
+
135 136
 ## User Instructions
136 137
    Define your hardware and the wanted language in 'Configuration.h'.
137 138
    To find out what charset your hardware is, define language 'test' and compile. In the menu you will see two lines from the upper half of the charset.

+ 1
- 1
Marlin/Configuration.h View File

@@ -642,7 +642,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
642 642
 // @section lcd
643 643
 
644 644
 // Define your display language below. Replace (en) with your language code and uncomment.
645
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
645
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
646 646
 // See also language.h
647 647
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
648 648
 

+ 3
- 1
Marlin/Configuration_adv.h View File

@@ -195,6 +195,9 @@
195 195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196 196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197 197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198 201
 // @section machine
199 202
 
200 203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
@@ -258,7 +261,6 @@
258 261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259 262
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
260 263
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
261
-//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
262 264
 
263 265
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
264 266
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again

+ 16
- 2
Marlin/Marlin_main.cpp View File

@@ -1549,11 +1549,15 @@ static void homeaxis(AxisEnum axis) {
1549 1549
     current_position[axis] = 0;
1550 1550
     sync_plan_position();
1551 1551
 
1552
+    enable_endstops(false); // Disable endstops while moving away
1553
+
1552 1554
     // Move away from the endstop by the axis HOME_BUMP_MM
1553 1555
     destination[axis] = -home_bump_mm(axis) * axis_home_dir;
1554 1556
     line_to_destination();
1555 1557
     st_synchronize();
1556 1558
 
1559
+    enable_endstops(true); // Enable endstops for next homing move
1560
+
1557 1561
     // Slow down the feedrate for the next move
1558 1562
     set_homing_bump_feedrate(axis);
1559 1563
 
@@ -1590,15 +1594,18 @@ static void homeaxis(AxisEnum axis) {
1590 1594
     #ifdef DELTA
1591 1595
       // retrace by the amount specified in endstop_adj
1592 1596
       if (endstop_adj[axis] * axis_home_dir < 0) {
1597
+        enable_endstops(false); // Disable endstops while moving away
1593 1598
         sync_plan_position();
1594 1599
         destination[axis] = endstop_adj[axis];
1595 1600
         line_to_destination();
1596 1601
         st_synchronize();
1602
+        enable_endstops(true); // Enable endstops for next homing move
1597 1603
       }
1598 1604
     #endif
1599 1605
 
1600 1606
     // Set the axis position to its home position (plus home offsets)
1601 1607
     axis_is_at_home(axis);
1608
+    sync_plan_position();
1602 1609
 
1603 1610
     destination[axis] = current_position[axis];
1604 1611
     feedrate = 0.0;
@@ -1929,6 +1936,11 @@ inline void gcode_G28() {
1929 1936
 
1930 1937
     #endif // QUICK_HOME
1931 1938
 
1939
+    #ifdef HOME_Y_BEFORE_X
1940
+      // Home Y
1941
+      if (home_all_axis || homeY) HOMEAXIS(Y);
1942
+    #endif
1943
+
1932 1944
     // Home X
1933 1945
     if (home_all_axis || homeX) {
1934 1946
       #ifdef DUAL_X_CARRIAGE
@@ -1948,8 +1960,10 @@ inline void gcode_G28() {
1948 1960
       #endif
1949 1961
     }
1950 1962
 
1951
-    // Home Y
1952
-    if (home_all_axis || homeY) HOMEAXIS(Y);
1963
+    #ifndef HOME_Y_BEFORE_X
1964
+      // Home Y
1965
+      if (home_all_axis || homeY) HOMEAXIS(Y);
1966
+    #endif
1953 1967
 
1954 1968
     // Home Z last if homing towards the bed
1955 1969
     #if Z_HOME_DIR < 0

+ 1
- 1
Marlin/configurator/config/Configuration.h View File

@@ -641,7 +641,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
641 641
 // @section lcd
642 642
 
643 643
 // Define your display language below. Replace (en) with your language code and uncomment.
644
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
644
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
645 645
 // See also language.h
646 646
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
647 647
 

+ 3
- 1
Marlin/configurator/config/Configuration_adv.h View File

@@ -195,6 +195,9 @@
195 195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196 196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197 197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198 201
 // @section machine
199 202
 
200 203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
@@ -258,7 +261,6 @@
258 261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259 262
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
260 263
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
261
-//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
262 264
 
263 265
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
264 266
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again

+ 270
- 0
Marlin/dogm_font_data_ISO10646_CN.h View File

@@ -0,0 +1,270 @@
1
+/*
2
+  Fontname: ISO10646_CN
3
+  Copyright: A. Hardtung, public domain
4
+  Capital A Height: 7, '1' Height: 7
5
+  Calculated Max Values w=11 h=11 x= 2 y=10 dx=12 dy= 0 ascent=10 len=22
6
+  Font Bounding box     w=12 h=11 x= 0 y=-2
7
+  Calculated Min Values           x= 0 y=-1 dx= 0 dy= 0
8
+  Pure Font   ascent = 7 descent=-1
9
+  X Font      ascent = 7 descent=-1
10
+  Max Font    ascent =10 descent=-1
11
+*/
12
+#include <utility/u8g.h>
13
+const u8g_fntpgm_uint8_t ISO10646_CN[4105] U8G_SECTION(".progmem.ISO10646_CN") = {
14
+  0,12,11,0,254,7,1,146,3,33,32,255,255,10,255,7,
15
+  255,0,0,0,6,0,10,1,7,7,6,2,0,128,128,128,
16
+  128,128,0,128,3,2,2,6,1,5,160,160,5,7,7,6,
17
+  0,0,80,80,248,80,248,80,80,5,7,7,6,0,0,32,
18
+  120,160,112,40,240,32,5,7,7,6,0,0,192,200,16,32,
19
+  64,152,24,5,7,7,6,0,0,96,144,160,64,168,144,104,
20
+  2,3,3,6,1,4,192,64,128,3,7,7,6,1,0,32,
21
+  64,128,128,128,64,32,3,7,7,6,1,0,128,64,32,32,
22
+  32,64,128,5,5,5,6,0,1,32,168,112,168,32,5,5,
23
+  5,6,0,1,32,32,248,32,32,2,3,3,6,2,255,192,
24
+  64,128,5,1,1,6,0,3,248,2,2,2,6,2,0,192,
25
+  192,5,5,5,6,0,1,8,16,32,64,128,5,7,7,6,
26
+  0,0,112,136,152,168,200,136,112,3,7,7,6,1,0,64,
27
+  192,64,64,64,64,224,5,7,7,6,0,0,112,136,8,112,
28
+  128,128,248,5,7,7,6,0,0,248,16,32,16,8,8,240,
29
+  5,7,7,6,0,0,16,48,80,144,248,16,16,5,7,7,
30
+  6,0,0,248,128,240,8,8,136,112,5,7,7,6,0,0,
31
+  112,128,128,240,136,136,112,5,7,7,6,0,0,248,8,16,
32
+  32,32,32,32,5,7,7,6,0,0,112,136,136,112,136,136,
33
+  112,5,7,7,6,0,0,112,136,136,120,8,8,112,2,5,
34
+  5,6,2,0,192,192,0,192,192,2,6,6,6,2,255,192,
35
+  192,0,192,64,128,4,7,7,6,0,0,16,32,64,128,64,
36
+  32,16,5,3,3,6,0,2,248,0,248,4,7,7,6,0,
37
+  0,128,64,32,16,32,64,128,5,7,7,6,0,0,112,136,
38
+  8,16,32,0,32,5,7,7,6,0,0,112,136,8,104,168,
39
+  168,112,5,7,7,6,0,0,112,136,136,248,136,136,136,5,
40
+  7,7,6,0,0,240,136,136,240,136,136,240,5,7,7,6,
41
+  0,0,112,136,128,128,128,136,112,5,7,7,6,0,0,240,
42
+  136,136,136,136,136,240,5,7,7,6,0,0,248,128,128,240,
43
+  128,128,248,5,7,7,6,0,0,248,128,128,240,128,128,128,
44
+  5,7,7,6,0,0,112,136,128,184,136,136,112,5,7,7,
45
+  6,0,0,136,136,136,248,136,136,136,1,7,7,6,2,0,
46
+  128,128,128,128,128,128,128,5,7,7,6,0,0,56,16,16,
47
+  16,16,144,96,5,7,7,6,0,0,136,144,160,192,160,144,
48
+  136,5,7,7,6,0,0,128,128,128,128,128,128,248,5,7,
49
+  7,6,0,0,136,216,168,136,136,136,136,5,7,7,6,0,
50
+  0,136,136,200,168,152,136,136,5,7,7,6,0,0,112,136,
51
+  136,136,136,136,112,5,7,7,6,0,0,240,136,136,240,128,
52
+  128,128,5,7,7,6,0,0,112,136,136,136,168,144,104,5,
53
+  7,7,6,0,0,240,136,136,240,160,144,136,5,7,7,6,
54
+  0,0,120,128,128,112,8,8,240,5,7,7,6,0,0,248,
55
+  32,32,32,32,32,32,5,7,7,6,0,0,136,136,136,136,
56
+  136,136,112,5,7,7,6,0,0,136,136,136,136,136,80,32,
57
+  5,7,7,6,0,0,136,136,136,136,136,168,80,5,7,7,
58
+  6,0,0,136,136,80,32,80,136,136,5,7,7,6,0,0,
59
+  136,136,136,80,32,32,32,5,7,7,6,0,0,248,8,16,
60
+  32,64,128,248,3,7,7,6,0,0,224,128,128,128,128,128,
61
+  224,5,5,5,6,0,1,128,64,32,16,8,3,7,7,6,
62
+  0,0,224,32,32,32,32,32,224,5,3,3,6,0,4,32,
63
+  80,136,5,1,1,6,0,0,248,2,2,2,6,2,5,128,
64
+  64,5,5,5,6,0,0,112,8,120,136,120,5,7,7,6,
65
+  0,0,128,128,176,200,136,136,240,5,5,5,6,0,0,112,
66
+  128,128,136,112,5,7,7,6,0,0,8,8,104,152,136,136,
67
+  120,5,5,5,6,0,0,112,136,248,128,112,5,7,7,6,
68
+  0,0,48,72,224,64,64,64,64,5,6,6,6,0,255,112,
69
+  136,136,120,8,112,5,7,7,6,0,0,128,128,176,200,136,
70
+  136,136,1,7,7,6,2,0,128,0,128,128,128,128,128,3,
71
+  8,8,6,1,255,32,0,32,32,32,32,160,64,4,7,7,
72
+  6,1,0,128,128,144,160,192,160,144,3,7,7,6,1,0,
73
+  192,64,64,64,64,64,224,5,5,5,6,0,0,208,168,168,
74
+  168,168,5,5,5,6,0,0,176,200,136,136,136,5,5,5,
75
+  6,0,0,112,136,136,136,112,5,6,6,6,0,255,240,136,
76
+  136,240,128,128,5,6,6,6,0,255,120,136,136,120,8,8,
77
+  5,5,5,6,0,0,176,200,128,128,128,5,5,5,6,0,
78
+  0,112,128,112,8,240,4,7,7,6,0,0,64,64,224,64,
79
+  64,64,48,5,5,5,6,0,0,136,136,136,152,104,5,5,
80
+  5,6,0,0,136,136,136,80,32,5,5,5,6,0,0,136,
81
+  136,168,168,80,5,5,5,6,0,0,136,80,32,80,136,5,
82
+  6,6,6,0,255,136,136,136,120,8,112,5,5,5,6,0,
83
+  0,248,16,32,64,248,3,7,7,6,1,0,32,64,64,128,
84
+  64,64,32,1,7,7,6,2,0,128,128,128,128,128,128,128,
85
+  3,7,7,6,1,0,128,64,64,32,64,64,128,5,2,2,
86
+  6,0,3,104,144,0,0,0,6,0,10,0,0,0,12,0,
87
+  10,0,0,0,12,0,10,0,0,0,12,0,10,0,0,0,
88
+  12,0,10,0,0,0,12,0,10,0,0,0,12,0,10,0,
89
+  0,0,12,0,10,0,0,0,12,0,10,0,0,0,12,0,
90
+  10,0,0,0,12,0,10,0,0,0,12,0,10,0,0,0,
91
+  12,0,10,0,0,0,12,0,10,0,0,0,12,0,10,0,
92
+  0,0,12,0,10,0,0,0,12,0,10,0,0,0,12,0,
93
+  10,0,0,0,12,0,10,0,0,0,12,0,10,0,0,0,
94
+  12,0,10,0,0,0,12,0,10,0,0,0,12,0,10,0,
95
+  0,0,12,0,10,0,0,0,12,0,10,0,0,0,12,0,
96
+  10,0,0,0,12,0,10,0,0,0,12,0,10,0,0,0,
97
+  12,0,10,0,0,0,12,0,10,11,11,22,12,0,255,255,
98
+  224,2,0,2,0,4,0,13,0,20,128,36,64,196,32,4,
99
+  0,4,0,4,0,11,11,22,12,0,255,249,0,138,0,171,
100
+  224,172,64,170,64,170,64,170,64,170,128,33,0,82,128,140,
101
+  96,11,11,22,12,0,255,36,0,36,0,63,128,68,0,132,
102
+  0,4,0,255,224,10,0,17,0,32,128,192,96,11,11,22,
103
+  12,0,255,36,0,36,0,63,192,68,0,4,0,255,224,9,
104
+  0,9,0,17,32,33,32,64,224,11,11,22,12,0,255,32,
105
+  0,61,224,81,32,145,32,17,32,255,32,17,32,41,32,37,
106
+  224,69,32,128,0,11,11,22,12,0,255,32,128,127,192,8,
107
+  64,255,224,17,0,32,128,95,64,128,32,63,128,0,0,127,
108
+  192,11,11,22,12,0,255,34,64,71,224,148,128,228,128,47,
109
+  224,68,128,244,128,7,224,52,128,196,128,7,224,11,11,22,
110
+  12,0,255,4,128,143,224,73,0,25,0,47,192,9,0,9,
111
+  0,47,192,73,0,137,0,15,224,11,11,22,12,0,255,16,
112
+  0,63,128,81,0,14,0,49,128,192,96,63,128,36,128,63,
113
+  128,36,128,63,128,11,11,22,12,0,255,34,128,250,64,7,
114
+  224,250,128,138,128,138,128,250,128,34,128,178,128,170,160,100,
115
+  224,11,11,22,12,0,255,34,32,71,64,146,128,239,224,34,
116
+  0,71,192,236,64,7,192,52,64,199,192,4,64,11,11,22,
117
+  12,0,255,8,0,15,192,8,0,8,0,255,224,8,0,14,
118
+  0,9,128,8,64,8,0,8,0,10,11,22,12,0,255,255,
119
+  128,0,128,0,128,128,128,128,128,255,128,128,0,128,0,128,
120
+  64,128,64,127,192,11,11,22,12,0,255,71,192,65,0,239,
121
+  224,65,0,69,0,105,96,201,32,77,96,73,32,79,224,200,
122
+  32,11,11,22,12,0,255,8,0,4,0,4,0,10,0,10,
123
+  0,10,0,17,0,17,0,32,128,64,64,128,32,11,11,22,
124
+  12,0,255,34,64,34,0,247,224,34,0,35,224,53,32,229,
125
+  32,37,64,40,128,41,64,114,32,11,10,20,12,0,0,68,
126
+  64,68,64,68,64,127,192,4,0,4,0,132,32,132,32,132,
127
+  32,255,224,11,11,22,12,0,255,4,0,0,0,127,192,4,
128
+  0,4,0,4,0,127,192,4,0,4,0,4,0,255,224,11,
129
+  11,22,12,0,255,255,224,17,0,1,192,254,0,72,128,37,
130
+  0,4,0,255,224,21,0,36,128,196,96,11,11,22,12,0,
131
+  255,17,0,127,192,68,64,127,192,68,64,127,192,4,0,255,
132
+  224,4,0,4,0,4,0,9,11,22,12,0,255,16,0,255,
133
+  128,128,128,128,128,255,128,128,128,128,128,255,128,128,128,128,
134
+  128,255,128,11,11,22,12,0,255,113,0,1,0,3,224,249,
135
+  32,33,32,65,32,81,32,137,32,250,32,2,32,4,192,11,
136
+  11,22,12,0,255,127,192,17,0,17,0,17,0,17,0,255,
137
+  224,17,0,17,0,33,0,33,0,65,0,11,11,22,12,0,
138
+  255,33,0,34,0,244,64,87,224,80,32,87,192,148,64,84,
139
+  64,36,64,87,192,148,64,11,11,22,12,0,255,17,0,10,
140
+  0,127,192,4,0,4,0,255,224,4,0,10,0,17,0,32,
141
+  128,192,96,10,11,22,12,0,255,95,192,0,64,132,64,132,
142
+  64,191,64,132,64,140,64,148,64,164,64,140,64,129,192,11,
143
+  11,22,12,0,255,36,0,39,192,36,0,36,0,255,224,0,
144
+  0,20,64,36,128,71,0,12,0,112,0,11,11,22,12,0,
145
+  255,36,128,4,128,15,192,228,128,36,128,63,224,36,128,36,
146
+  128,40,128,80,0,143,224,11,11,22,12,0,255,8,0,8,
147
+  0,255,128,136,128,136,128,255,128,136,128,136,128,255,160,136,
148
+  32,7,224,11,11,22,12,0,255,39,128,36,128,244,128,36,
149
+  128,116,128,108,128,164,128,36,128,36,160,40,160,48,96,10,
150
+  11,22,12,0,255,255,192,128,64,128,64,158,64,146,64,146,
151
+  64,158,64,128,64,128,64,255,192,128,64,11,11,22,12,0,
152
+  255,127,192,68,0,95,192,80,64,95,192,80,64,95,192,66,
153
+  0,74,128,82,64,166,32,11,11,22,12,0,255,4,0,7,
154
+  224,4,0,127,192,64,64,64,64,64,64,127,192,0,0,82,
155
+  64,137,32,11,11,22,12,0,255,71,128,36,128,4,128,4,
156
+  128,232,96,32,0,47,192,36,64,34,128,49,0,38,192,11,
157
+  11,22,12,0,255,127,192,74,64,127,192,4,0,255,224,4,
158
+  0,63,128,32,128,36,128,36,128,255,224,11,11,22,12,0,
159
+  255,34,0,79,224,72,32,79,224,200,0,79,224,74,160,90,
160
+  160,111,224,74,160,72,96,11,11,22,12,0,255,243,192,36,
161
+  64,42,128,241,0,34,128,101,224,114,32,165,64,32,128,35,
162
+  0,44,0,11,11,22,12,0,255,4,0,255,224,128,32,0,
163
+  0,255,224,4,0,36,0,39,192,36,0,84,0,143,224,11,
164
+  11,22,12,0,255,115,224,16,128,81,0,35,224,250,32,42,
165
+  160,34,160,34,160,32,128,33,64,98,32,11,11,22,12,0,
166
+  255,34,0,247,128,34,128,54,128,226,160,37,160,36,96,104,
167
+  32,0,0,82,64,137,32,11,11,22,12,0,255,115,192,66,
168
+  0,66,0,123,224,74,64,74,64,122,64,74,64,66,64,68,
169
+  64,136,64,11,11,22,12,0,255,8,0,255,224,8,0,31,
170
+  192,48,64,95,192,144,64,31,192,16,64,16,64,16,192,11,
171
+  11,22,12,0,255,2,0,127,224,66,0,66,0,95,192,66,
172
+  0,71,0,74,128,82,64,98,32,130,0,11,11,22,12,0,
173
+  255,243,192,150,64,145,128,166,96,161,0,151,192,145,0,149,
174
+  0,231,224,129,0,129,0,11,11,22,12,0,255,15,128,136,
175
+  128,79,128,8,128,143,128,64,0,31,192,53,64,85,64,149,
176
+  64,63,224,11,11,22,12,0,255,39,224,32,128,248,128,32,
177
+  128,32,128,56,128,224,128,32,128,32,128,32,128,97,128,11,
178
+  11,22,12,0,255,31,224,145,0,87,192,20,64,23,192,148,
179
+  64,87,192,17,0,85,64,153,32,35,0,11,11,22,12,0,
180
+  255,32,128,39,224,242,64,33,128,34,64,52,32,226,64,34,
181
+  64,34,64,34,64,100,64,11,11,22,12,0,255,65,0,65,
182
+  0,79,224,233,32,73,32,73,32,111,224,201,32,73,32,73,
183
+  32,207,224,11,11,22,12,0,255,33,0,241,0,79,224,169,
184
+  32,249,32,47,224,57,32,233,32,41,32,47,224,40,32,11,
185
+  11,22,12,0,255,143,224,73,32,9,32,203,160,73,32,79,
186
+  224,72,32,75,160,74,160,107,160,80,224,11,11,22,12,0,
187
+  255,127,192,4,0,68,64,36,64,36,128,4,0,255,224,4,
188
+  0,4,0,4,0,4,0,11,11,22,12,0,255,130,0,66,
189
+  0,31,224,194,0,95,192,82,64,95,192,71,0,74,128,82,
190
+  64,191,224,11,11,22,12,0,255,4,0,127,224,72,128,127,
191
+  224,72,128,79,128,64,0,95,192,72,64,71,128,152,96,11,
192
+  11,22,12,0,255,1,0,239,224,161,0,164,64,175,224,164,
193
+  64,175,224,169,32,233,32,2,128,12,96,11,11,22,12,0,
194
+  255,20,192,246,160,188,96,167,128,168,128,191,224,169,32,239,
195
+  224,9,32,15,224,9,32,11,11,22,12,0,255,127,128,64,
196
+  128,66,128,98,128,84,128,72,128,72,128,84,160,98,160,64,
197
+  96,128,32,11,11,22,12,0,255,4,0,127,224,64,32,127,
198
+  224,64,0,125,224,84,32,76,160,84,96,100,160,141,96,11,
199
+  11,22,12,0,255,130,0,95,224,4,0,8,64,159,224,64,
200
+  32,10,128,10,128,74,160,146,160,34,96,11,11,22,12,0,
201
+  255,65,0,79,224,232,32,66,128,68,64,104,32,199,192,65,
202
+  0,65,0,65,0,207,224,11,11,22,12,0,255,80,32,125,
203
+  32,145,32,255,32,17,32,125,32,85,32,85,32,84,32,92,
204
+  32,16,224,11,11,22,12,0,255,63,128,32,128,63,128,32,
205
+  128,255,224,72,0,123,192,73,64,121,64,72,128,251,96,11,
206
+  11,22,12,0,255,4,0,4,0,4,0,36,128,36,64,68,
207
+  64,68,32,132,32,4,0,4,0,28,0,11,11,22,12,0,
208
+  255,4,0,4,0,4,0,255,224,4,0,10,0,10,0,17,
209
+  0,17,0,32,128,192,96,9,10,20,10,0,0,136,128,73,
210
+  0,8,0,255,128,0,128,0,128,127,128,0,128,0,128,255,
211
+  128,11,11,22,12,0,255,33,0,18,0,255,224,0,0,120,
212
+  128,74,128,122,128,74,128,122,128,72,128,89,128,11,11,22,
213
+  12,0,255,39,192,0,0,0,0,239,224,33,0,34,0,36,
214
+  64,47,224,32,32,80,0,143,224,11,11,22,12,0,255,32,
215
+  128,39,0,249,0,33,192,119,0,33,0,249,224,39,0,113,
216
+  32,169,32,32,224,11,11,22,12,0,255,16,64,16,64,253,
217
+  224,16,64,56,192,53,64,82,64,148,64,16,64,16,64,16,
218
+  192,11,11,22,12,0,255,0,64,248,64,11,224,8,64,136,
219
+  64,82,64,81,64,33,64,80,64,72,64,137,192,10,11,22,
220
+  12,0,255,132,0,132,64,132,128,245,0,134,0,132,0,132,
221
+  0,148,0,164,64,196,64,131,192,11,11,22,12,0,255,17,
222
+  32,125,0,17,0,255,224,41,0,253,64,73,64,124,128,8,
223
+  160,253,96,10,32,11,11,22,12,0,255,23,192,36,64,36,
224
+  64,103,192,161,0,47,224,33,0,35,128,37,64,41,32,33,
225
+  0,11,11,22,12,0,255,8,0,255,224,16,0,39,192,32,
226
+  128,97,0,175,224,33,0,33,0,33,0,35,0,11,11,22,
227
+  12,0,255,36,0,47,224,180,0,164,128,164,160,170,192,42,
228
+  128,40,128,41,64,50,64,36,32,11,11,22,12,0,255,127,
229
+  224,128,0,63,192,32,64,63,192,16,0,31,192,16,64,40,
230
+  128,71,0,56,224,11,11,22,12,0,255,127,224,64,0,64,
231
+  0,64,0,64,0,64,0,64,0,64,0,64,0,64,0,128,
232
+  0,11,11,22,12,0,255,255,224,4,0,127,192,68,64,127,
233
+  192,68,64,127,192,68,0,36,0,24,0,231,224,11,11,22,
234
+  12,0,255,17,224,253,0,69,0,41,224,253,64,17,64,125,
235
+  64,17,64,85,64,146,64,52,64,11,11,22,12,0,255,33,
236
+  0,95,224,64,0,207,192,64,0,79,192,64,0,79,192,72,
237
+  64,79,192,72,64,11,11,22,12,0,255,4,0,127,192,64,
238
+  64,127,192,64,64,127,192,64,64,127,192,4,64,82,32,191,
239
+  160,11,11,22,12,0,255,127,192,68,64,127,192,68,64,127,
240
+  192,4,0,27,0,224,224,17,0,17,0,97,0,11,11,22,
241
+  12,0,255,255,224,4,0,8,0,127,224,73,32,79,32,73,
242
+  32,79,32,73,32,73,32,127,224,11,11,22,12,0,255,253,
243
+  224,86,64,121,64,56,128,85,64,146,32,255,224,4,0,39,
244
+  192,36,0,255,224,11,11,22,12,0,255,251,128,82,0,123,
245
+  224,18,64,250,64,20,64,63,128,32,128,63,128,32,128,63,
246
+  128,11,11,22,12,0,255,31,224,32,0,39,192,100,64,167,
247
+  192,32,0,47,224,40,32,39,192,33,0,35,0,11,11,22,
248
+  12,0,255,243,224,130,32,130,32,250,32,130,32,130,32,138,
249
+  32,178,32,194,224,2,0,2,0,11,11,22,12,0,255,36,
250
+  128,70,160,149,192,228,128,39,224,68,128,245,192,6,160,52,
251
+  128,196,128,7,224,11,11,22,12,0,255,39,192,65,0,135,
252
+  224,224,32,34,128,69,128,242,128,15,224,48,128,193,64,2,
253
+  32,11,11,22,12,0,255,2,0,2,0,34,0,35,192,34,
254
+  0,34,0,34,0,34,0,34,0,34,0,255,224,9,11,22,
255
+  12,0,255,8,0,8,0,255,128,136,128,136,128,136,128,255,
256
+  128,136,128,136,128,136,128,255,128,11,11,22,12,0,255,33,
257
+  0,83,160,65,0,247,224,81,0,83,192,86,64,83,192,90,
258
+  64,83,192,66,64,11,11,22,12,0,255,127,192,4,0,4,
259
+  0,4,0,255,224,10,0,10,0,18,0,34,32,66,32,129,
260
+  224,11,11,22,12,0,255,17,0,33,0,47,224,97,0,163,
261
+  128,35,128,37,64,37,64,41,32,33,0,33,0,11,11,22,
262
+  12,0,255,247,224,148,32,244,32,151,224,148,128,244,128,151,
263
+  224,148,128,244,160,150,96,4,32,11,11,22,12,0,255,123,
264
+  224,148,128,4,0,127,192,4,0,255,224,1,0,255,224,33,
265
+  0,17,0,7,0,11,11,22,12,0,255,33,0,71,192,145,
266
+  0,47,224,96,128,175,224,32,128,36,128,34,128,32,128,35,
267
+  128,11,11,22,12,0,255,39,192,36,64,247,192,46,224,42,
268
+  160,62,224,225,0,47,224,35,128,37,64,105,32,11,11,22,
269
+  12,0,255,20,0,39,224,42,0,98,0,163,192,34,0,34,
270
+  0,35,224,34,0,34,0,34,0};

+ 30
- 10
Marlin/dogm_lcd_implementation.h View File

@@ -64,6 +64,10 @@
64 64
   #elif defined( DISPLAY_CHARSET_ISO10646_KANA )
65 65
     #include "dogm_font_data_ISO10646_Kana.h"
66 66
     #define FONT_MENU_NAME ISO10646_Kana_5x7
67
+  #elif defined( DISPLAY_CHARSET_ISO10646_CN )
68
+    #include "dogm_font_data_ISO10646_CN.h"
69
+    #define FONT_MENU_NAME ISO10646_CN
70
+    #define TALL_FONT_CORRECTION 1
67 71
   #else // fall-back
68 72
     #include "dogm_font_data_ISO10646_1.h"
69 73
     #define FONT_MENU_NAME ISO10646_1_5x7
@@ -106,6 +110,10 @@
106 110
   #define LCD_WIDTH_EDIT       22
107 111
 #endif
108 112
 
113
+#ifndef TALL_FONT_CORRECTION
114
+  #define TALL_FONT_CORRECTION 0
115
+#endif
116
+
109 117
 #define START_ROW              0
110 118
 
111 119
 // LCD selection
@@ -123,6 +131,13 @@
123 131
   U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0);  // HW-SPI Com: CS, A0
124 132
 #endif
125 133
 
134
+#ifndef LCD_PIXEL_WIDTH
135
+  #define LCD_PIXEL_WIDTH 128
136
+#endif
137
+#ifndef LCD_PIXEL_HEIGHT
138
+  #define LCD_PIXEL_HEIGHT 64
139
+#endif
140
+
126 141
 #include "utf_mapper.h"
127 142
 
128 143
 int lcd_contrast;
@@ -172,6 +187,7 @@ char lcd_printPGM(const char* str) {
172 187
 
173 188
 static bool show_splashscreen = true;
174 189
 
190
+/* Warning: This function is called from interrupt context */
175 191
 static void lcd_implementation_init() {
176 192
 
177 193
   #ifdef LCD_PIN_BL // Enable LCD backlight
@@ -252,20 +268,21 @@ static void lcd_implementation_status_screen() {
252 268
  
253 269
   #ifdef SDSUPPORT
254 270
     // SD Card Symbol
255
-    u8g.drawBox(42,42,8,7);
256
-    u8g.drawBox(50,44,2,5);
257
-    u8g.drawFrame(42,49,10,4);
258
-    u8g.drawPixel(50,43);
271
+    u8g.drawBox(42, 42 - TALL_FONT_CORRECTION, 8, 7);
272
+    u8g.drawBox(50, 44 - TALL_FONT_CORRECTION, 2, 5);
273
+    u8g.drawFrame(42, 49 - TALL_FONT_CORRECTION, 10, 4);
274
+    u8g.drawPixel(50, 43 - TALL_FONT_CORRECTION);
275
+
259 276
 
260 277
     // Progress bar frame
261
-    u8g.drawFrame(54,49,73,4);
278
+    u8g.drawFrame(54, 49, 73, 4 - TALL_FONT_CORRECTION);
262 279
 
263 280
     // SD Card Progress bar and clock
264 281
     lcd_setFont(FONT_STATUSMENU);
265 282
  
266 283
     if (IS_SD_PRINTING) {
267 284
       // Progress bar solid part
268
-      u8g.drawBox(55, 50, (unsigned int)(71.f * card.percentDone() / 100.f), 2);
285
+      u8g.drawBox(55, 50, (unsigned int)(71.f * card.percentDone() / 100.f), 2 - TALL_FONT_CORRECTION);
269 286
     }
270 287
 
271 288
     u8g.setPrintPos(80,48);
@@ -306,9 +323,9 @@ static void lcd_implementation_status_screen() {
306 323
   lcd_setFont(FONT_STATUSMENU);
307 324
 
308 325
   #ifdef USE_SMALL_INFOFONT
309
-    u8g.drawBox(0,30,128,10);
326
+    u8g.drawBox(0,30,LCD_PIXEL_WIDTH,10);
310 327
   #else
311
-    u8g.drawBox(0,30,128,9);
328
+    u8g.drawBox(0,30,LCD_PIXEL_WIDTH,9);
312 329
   #endif
313 330
   u8g.setColorIndex(0); // white on black
314 331
   u8g.setPrintPos(2,XYZ_BASELINE);
@@ -366,7 +383,7 @@ static void lcd_implementation_status_screen() {
366 383
 static void lcd_implementation_mark_as_selected(uint8_t row, bool isSelected) {
367 384
   if (isSelected) {
368 385
     u8g.setColorIndex(1);  // black on white
369
-    u8g.drawBox(0, row * DOG_CHAR_HEIGHT + 3, 128, DOG_CHAR_HEIGHT);
386
+    u8g.drawBox(0, row * DOG_CHAR_HEIGHT + 3 - TALL_FONT_CORRECTION, LCD_PIXEL_WIDTH, DOG_CHAR_HEIGHT);
370 387
     u8g.setColorIndex(0);  // following text must be white on black
371 388
   }
372 389
   else {
@@ -386,13 +403,15 @@ static void lcd_implementation_drawmenu_generic(bool isSelected, uint8_t row, co
386 403
     pstr++;
387 404
   }
388 405
   while (n--) lcd_print(' ');
406
+    u8g.setPrintPos(LCD_PIXEL_WIDTH - DOG_CHAR_WIDTH, (row + 1) * DOG_CHAR_HEIGHT);
389 407
   lcd_print(post_char);
390 408
   lcd_print(' ');
391 409
 }
392 410
 
393 411
 static void _drawmenu_setting_edit_generic(bool isSelected, uint8_t row, const char* pstr, const char* data, bool pgm) {
394 412
   char c;
395
-  uint8_t n = LCD_WIDTH - 2 - (pgm ? lcd_strlen_P(data) : (lcd_strlen((char*)data)));
413
+  uint8_t vallen = (pgm ? lcd_strlen_P(data) : (lcd_strlen((char*)data)));
414
+  uint8_t n = LCD_WIDTH - 2 - vallen;
396 415
 
397 416
   lcd_implementation_mark_as_selected(row, isSelected);
398 417
 
@@ -402,6 +421,7 @@ static void _drawmenu_setting_edit_generic(bool isSelected, uint8_t row, const c
402 421
   }
403 422
   lcd_print(':');
404 423
   while (n--) lcd_print(' ');
424
+  u8g.setPrintPos(LCD_PIXEL_WIDTH - DOG_CHAR_WIDTH * vallen, (row + 1) * DOG_CHAR_HEIGHT);
405 425
   if (pgm) { lcd_printPGM(data); } else { lcd_print((char *)data); }
406 426
 }
407 427
 

+ 1
- 1
Marlin/example_configurations/Felix/Configuration.h View File

@@ -575,7 +575,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
575 575
 //==============================LCD and SD support=============================
576 576
 
577 577
 // Define your display language below. Replace (en) with your language code and uncomment.
578
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
578
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
579 579
 // See also language.h
580 580
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
581 581
 

+ 1
- 1
Marlin/example_configurations/Felix/Configuration_DUAL.h View File

@@ -571,7 +571,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
571 571
 //==============================LCD and SD support=============================
572 572
 
573 573
 // Define your display language below. Replace (en) with your language code and uncomment.
574
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
574
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
575 575
 // See also language.h
576 576
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
577 577
 

+ 3
- 1
Marlin/example_configurations/Felix/Configuration_adv.h View File

@@ -195,6 +195,9 @@
195 195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196 196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197 197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198 201
 // @section machine
199 202
 
200 203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
@@ -258,7 +261,6 @@
258 261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259 262
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
260 263
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
261
-//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
262 264
 
263 265
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
264 266
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again

+ 1
- 1
Marlin/example_configurations/Hephestos/Configuration.h View File

@@ -595,7 +595,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
595 595
 //==============================LCD and SD support=============================
596 596
 
597 597
 // Define your display language below. Replace (en) with your language code and uncomment.
598
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
598
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
599 599
 // See also language.h
600 600
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
601 601
 

+ 3
- 1
Marlin/example_configurations/Hephestos/Configuration_adv.h View File

@@ -195,6 +195,9 @@
195 195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196 196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197 197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198 201
 // @section machine
199 202
 
200 203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
@@ -258,7 +261,6 @@
258 261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259 262
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
260 263
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
261
-//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
262 264
 
263 265
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
264 266
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again

+ 1
- 1
Marlin/example_configurations/K8200/Configuration.h View File

@@ -653,7 +653,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
653 653
 // @section lcd
654 654
 
655 655
 // Define your display language below. Replace (en) with your language code and uncomment.
656
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
656
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
657 657
 // See also language.h
658 658
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
659 659
 

+ 3
- 1
Marlin/example_configurations/K8200/Configuration_adv.h View File

@@ -195,6 +195,9 @@
195 195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196 196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197 197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198 201
 // @section machine
199 202
 
200 203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
@@ -258,7 +261,6 @@
258 261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259 262
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
260 263
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
261
-//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
262 264
 
263 265
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
264 266
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again

+ 1
- 1
Marlin/example_configurations/SCARA/Configuration.h View File

@@ -626,7 +626,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
626 626
 //==============================LCD and SD support=============================
627 627
 
628 628
 // Define your display language below. Replace (en) with your language code and uncomment.
629
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
629
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
630 630
 // See also language.h
631 631
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
632 632
 

+ 3
- 1
Marlin/example_configurations/SCARA/Configuration_adv.h View File

@@ -195,6 +195,9 @@
195 195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196 196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197 197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198 201
 // @section machine
199 202
 
200 203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
@@ -258,7 +261,6 @@
258 261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259 262
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
260 263
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
261
-//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
262 264
 
263 265
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
264 266
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again

+ 1
- 1
Marlin/example_configurations/WITBOX/Configuration.h View File

@@ -594,7 +594,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
594 594
 //==============================LCD and SD support=============================
595 595
 
596 596
 // Define your display language below. Replace (en) with your language code and uncomment.
597
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
597
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
598 598
 // See also language.h
599 599
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
600 600
 

+ 3
- 1
Marlin/example_configurations/WITBOX/Configuration_adv.h View File

@@ -195,6 +195,9 @@
195 195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196 196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197 197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198 201
 // @section machine
199 202
 
200 203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
@@ -258,7 +261,6 @@
258 261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259 262
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
260 263
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
261
-//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
262 264
 
263 265
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
264 266
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again

+ 1
- 1
Marlin/example_configurations/delta/generic/Configuration.h View File

@@ -643,7 +643,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
643 643
 //==============================LCD and SD support=============================
644 644
 
645 645
 // Define your display language below. Replace (en) with your language code and uncomment.
646
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
646
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
647 647
 // See also language.h
648 648
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
649 649
 

+ 3
- 1
Marlin/example_configurations/delta/generic/Configuration_adv.h View File

@@ -195,6 +195,9 @@
195 195
 #define HOMING_BUMP_DIVISOR {10, 10, 20}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196 196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197 197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198 201
 // @section machine
199 202
 
200 203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
@@ -259,7 +262,6 @@
259 262
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
260 263
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
261 264
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
262
-//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
263 265
 
264 266
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
265 267
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again

+ 1
- 1
Marlin/example_configurations/delta/kossel_mini/Configuration.h View File

@@ -647,7 +647,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
647 647
 //==============================LCD and SD support=============================
648 648
 
649 649
 // Define your display language below. Replace (en) with your language code and uncomment.
650
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
650
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
651 651
 // See also language.h
652 652
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
653 653
 

+ 3
- 1
Marlin/example_configurations/delta/kossel_mini/Configuration_adv.h View File

@@ -195,6 +195,9 @@
195 195
 #define HOMING_BUMP_DIVISOR {10, 10, 20}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196 196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197 197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198 201
 // @section machine
199 202
 
200 203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
@@ -258,7 +261,6 @@
258 261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259 262
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
260 263
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
261
-//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
262 264
 
263 265
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
264 266
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again

+ 1
- 1
Marlin/example_configurations/makibox/Configuration.h View File

@@ -594,7 +594,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
594 594
 //==============================LCD and SD support=============================
595 595
 
596 596
 // Define your display language below. Replace (en) with your language code and uncomment.
597
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
597
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
598 598
 // See also language.h
599 599
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
600 600
 

+ 3
- 1
Marlin/example_configurations/makibox/Configuration_adv.h View File

@@ -195,6 +195,9 @@
195 195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196 196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197 197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198 201
 // @section machine
199 202
 
200 203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
@@ -258,7 +261,6 @@
258 261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259 262
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
260 263
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
261
-//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
262 264
 
263 265
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
264 266
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again

+ 1
- 1
Marlin/example_configurations/tvrrug/Round2/Configuration.h View File

@@ -600,7 +600,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = true; // set to true to invert the logic
600 600
 //==============================LCD and SD support=============================
601 601
 
602 602
 // Define your display language below. Replace (en) with your language code and uncomment.
603
-// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, test
603
+// en, pl, fr, de, es, ru, it, pt, pt-br, fi, an, nl, ca, eu, kana, kana_utf8, cn, test
604 604
 // See also language.h
605 605
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
606 606
 

+ 3
- 1
Marlin/example_configurations/tvrrug/Round2/Configuration_adv.h View File

@@ -195,6 +195,9 @@
195 195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196 196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
197 197
 
198
+// When G28 is called, this option will make Y home before X
199
+// #define HOME_Y_BEFORE_X
200
+
198 201
 // @section machine
199 202
 
200 203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
@@ -258,7 +261,6 @@
258 261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259 262
 #define ENCODER_10X_STEPS_PER_SEC 75    // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
260 263
 #define ENCODER_100X_STEPS_PER_SEC 160  // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
261
-//#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
262 264
 
263 265
 //#define CHDK 4        //Pin for triggering CHDK to take a picture see how to use it here http://captain-slow.dk/2014/03/09/3d-printing-timelapses/
264 266
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again

BIN
Marlin/fonts/ISO10646_CN.fon View File


+ 3
- 2
Marlin/fonts/README.fonts View File

@@ -4,8 +4,9 @@ Then run make_fonts.bat what calls bdf2u8g.exe with the needed parameters to pro
4 4
 The .h files must be edited to replace '#include "u8g.h"' with '#include <utility/u8g.h>', replace 'U8G_FONT_SECTION' with 'U8G_SECTION', insert '.progmem.' right behind the first '"' and moved to the main directory.
5 5
 
6 6
 How to integrate a new font:
7
-Currently we are limited to 256 symbols per font. We use a menu system with 5 lines, on a display with 64 pixel height. That means we have 12 pixel for a line. To have some space in between the lines we can't use more then 10 pixel height for the symbols.
8
-We use fixed width fonts. To fit 22 Symbols on the 128 pixel wide screen, the symbols can't be wider than 5 pixel. Maybe you can work with half symbols - two places in the charset will than build one wide symbol.
7
+Currently we are limited to 256 symbols per font. We use a menu system with 5 lines, on a display with 64 pixel height. That means we have 12 pixel for a line. To have some space in between the lines we can't use more then 10 pixel height for the symbols. For up to 11 pixel set TALL_FONT_CORRECTION 1 when loading the font.
8
+To fit 22 Symbols on the 128 pixel wide screen, the symbols can't be wider than 5 pixel, for the first 128 symbols.
9
+For the second half of the font we now support up to 11x11 pixel. 
9 10
 
10 11
  * Get 'Fony.exe'
11 12
  * Copy one of the existing *.fon files and work with this.

+ 1
- 0
Marlin/fonts/make_fonts.bat View File

@@ -5,3 +5,4 @@
5 5
 .\bdf2u8g.exe -b 32 -e 255 ISO10646-1.bdf ISO10646_1_5x7 dogm_font_data_ISO10646_1.h
6 6
 .\bdf2u8g.exe -b 32 -e 255 ISO10646_5_Cyrillic.bdf ISO10646_5_Cyrillic_5x7 dogm_font_data_ISO10646_5_Cyrillic.h
7 7
 .\bdf2u8g.exe -b 32 -e 255 ISO10646_Kana.bdf ISO10646_Kana_5x7 dogm_font_data_ISO10646_Kana.h
8
+.\bdf2u8g.exe -b 32 -e 255 ISO10646_CN.bdf ISO10646_CN dogm_font_data_ISO10646_CN.h

+ 1
- 0
Marlin/language.h View File

@@ -30,6 +30,7 @@
30 30
 // eu       Basque-Euskera
31 31
 // kana     Japanese
32 32
 // kana_utf Japanese
33
+// cn       Chinese
33 34
 
34 35
 #ifndef LANGUAGE_INCLUDE
35 36
   // pick your language from the list above

+ 159
- 0
Marlin/language_cn.h View File

@@ -0,0 +1,159 @@
1
+/**
2
+ * Chinese
3
+ *
4
+ * LCD Menu Messages
5
+ * Se also documentation/LCDLanguageFont.md
6
+ *
7
+ */
8
+#ifndef LANGUAGE_CN_H
9
+#define LANGUAGE_CN_H
10
+
11
+  #define MAPPER_NON         // For direct asci codes
12
+  #define DISPLAY_CHARSET_ISO10646_CN
13
+
14
+  #define WELCOME_MSG                         "\xa4\xa5\xa6\xa7"
15
+  #define MSG_SD_INSERTED                     "\xa8\xa9\xaa\xab"
16
+  #define MSG_SD_REMOVED                      "\xa8\xa9\xac\xad"
17
+  #define MSG_MAIN                            "\xae\xaf\xb0"
18
+  #define MSG_AUTOSTART                       "\xb1\xb2\xb3\xb4"
19
+  #define MSG_DISABLE_STEPPERS                "\xb5\xb6\xb7\xb8\xb9\xba"
20
+  #define MSG_AUTO_HOME                       "\xbb\xbc\xbd"
21
+  #define MSG_SET_HOME_OFFSETS                "\xbe\xbf\xbb\xbc\xbd\xc0\xc1"
22
+  #define MSG_SET_ORIGIN                      "\xbe\xbf\xbc\xbd"
23
+  #define MSG_PREHEAT_PLA                     "\xc3\xc4 PLA"
24
+  #define MSG_PREHEAT_PLA_N                   MSG_PREHEAT_PLA " "
25
+  #define MSG_PREHEAT_PLA_ALL                 MSG_PREHEAT_PLA " \xc5\xc6"
26
+  #define MSG_PREHEAT_PLA_BEDONLY             MSG_PREHEAT_PLA " \xc4\xc7"
27
+  #define MSG_PREHEAT_PLA_SETTINGS            MSG_PREHEAT_PLA " \xbe\xbf"
28
+  #define MSG_PREHEAT_ABS                     "\xc3\xc4 ABS"
29
+  #define MSG_PREHEAT_ABS_N                   MSG_PREHEAT_ABS " "
30
+  #define MSG_PREHEAT_ABS_ALL                 MSG_PREHEAT_ABS " \xc5\xc6"
31
+  #define MSG_PREHEAT_ABS_BEDONLY             MSG_PREHEAT_ABS " \xbe\xc6"
32
+  #define MSG_PREHEAT_ABS_SETTINGS            MSG_PREHEAT_ABS " \xbe\xbf"
33
+  #define MSG_H1                              "1"
34
+  #define MSG_H2                              "2"
35
+  #define MSG_H3                              "3"
36
+  #define MSG_H4                              "4"
37
+  #define MSG_COOLDOWN                        "\xc8\xc9"
38
+  #define MSG_SWITCH_PS_ON                    "\xb9\xcb\xca\xb3"
39
+  #define MSG_SWITCH_PS_OFF                   "\xb9\xcb\xb5\xb6"
40
+  #define MSG_EXTRUDE                         "\xcc\xad"
41
+  #define MSG_RETRACT                         "\xbb\xcd"
42
+  #define MSG_MOVE_AXIS                       "\xc1\xb2\xce"
43
+  #define MSG_LEVEL_BED                       "\xcf\xe0\xc4\xc7"
44
+  #define MSG_MOVE_X                          "\xc1\xb2 X"
45
+  #define MSG_MOVE_Y                          "\xc1\xb2 Y"
46
+  #define MSG_MOVE_Z                          "\xc1\xb2 Z"
47
+  #define MSG_MOVE_E                          "\xcc\xad\xba"
48
+  #define MSG_MOVE_01MM                       "\xc1\xb2 0.1mm"
49
+  #define MSG_MOVE_1MM                        "\xc1\xb2 1mm"
50
+  #define MSG_MOVE_10MM                       "\xc1\xb2 10mm"
51
+  #define MSG_SPEED                           "\xd1\xd2"
52
+  #define MSG_NOZZLE                          "\xd3\xd4"
53
+  #define MSG_N2                              " 2"
54
+  #define MSG_N3                              " 3"
55
+  #define MSG_N4                              " 4"
56
+  #define MSG_BED                             "\xc4\xc7"
57
+  #define MSG_FAN_SPEED                       "\xd5\xd6\xd1\xd2"
58
+  #define MSG_FLOW                            "\xcc\xad\xd1\xd2"
59
+  #define MSG_F0                              " 0"
60
+  #define MSG_F1                              " 1"
61
+  #define MSG_F2                              " 2"
62
+  #define MSG_F3                              " 3"
63
+  #define MSG_CONTROL                         "\xd8\xd9"
64
+  #define MSG_MIN                             LCD_STR_THERMOMETER " \xda\xdb"
65
+  #define MSG_MAX                             LCD_STR_THERMOMETER " \xda\xdc"
66
+  #define MSG_FACTOR                          LCD_STR_THERMOMETER " \xdd\xde"
67
+  #define MSG_AUTOTEMP                        "\xb1\xb2\xd8\xc9"
68
+  #define MSG_ON                              "\xb3 "  // intentional space to shift wide symbol to the left
69
+  #define MSG_OFF                             "\xb5 "  // intentional space to shift wide symbol to the left
70
+  #define MSG_PID_P                           "PID-P"
71
+  #define MSG_PID_I                           "PID-I"
72
+  #define MSG_PID_D                           "PID-D"
73
+  #define MSG_PID_C                           "PID-C"
74
+  #define MSG_E2                              " E2"
75
+  #define MSG_E3                              " E3"
76
+  #define MSG_E4                              " E4"
77
+  #define MSG_ACC                             "Accel"
78
+  #define MSG_VXY_JERK                        "Vxy-jerk"
79
+  #define MSG_VZ_JERK                         "Vz-jerk"
80
+  #define MSG_VE_JERK                         "Ve-jerk"
81
+  #define MSG_VMAX                            "Vmax "
82
+  #define MSG_X                               "x"
83
+  #define MSG_Y                               "y"
84
+  #define MSG_Z                               "z"
85
+  #define MSG_E                               "e"
86
+  #define MSG_VMIN                            "Vmin"
87
+  #define MSG_VTRAV_MIN                       "VTrav min"
88
+  #define MSG_AMAX                            "Amax "
89
+  #define MSG_A_RETRACT                       "A-retract"
90
+  #define MSG_A_TRAVEL                        "A-travel"
91
+  #define MSG_XSTEPS                          "Xsteps/mm"
92
+  #define MSG_YSTEPS                          "Ysteps/mm"
93
+  #define MSG_ZSTEPS                          "Zsteps/mm"
94
+  #define MSG_ESTEPS                          "Esteps/mm"
95
+  #define MSG_TEMPERATURE                     "\xc9\xd2"
96
+  #define MSG_MOTION                          "\xdf\xb2"
97
+  #define MSG_VOLUMETRIC                      "Filament"
98
+  #define MSG_VOLUMETRIC_ENABLED              "E in mm3"
99
+  #define MSG_FILAMENT_SIZE_EXTRUDER_0        "Fil. Dia. 1"
100
+  #define MSG_FILAMENT_SIZE_EXTRUDER_1        "Fil. Dia. 2"
101
+  #define MSG_FILAMENT_SIZE_EXTRUDER_2        "Fil. Dia. 3"
102
+  #define MSG_FILAMENT_SIZE_EXTRUDER_3        "Fil. Dia. 4"
103
+  #define MSG_CONTRAST                        "LCD contrast"
104
+  #define MSG_STORE_EPROM                     "Store memory"
105
+  #define MSG_LOAD_EPROM                      "Load memory"
106
+  #define MSG_RESTORE_FAILSAFE                "Restore failsafe"
107
+  #define MSG_REFRESH                         "Refresh"
108
+  #define MSG_WATCH                           "\xec\xed\xee\xef"
109
+  #define MSG_PREPARE                         "\xa4\xa5"
110
+  #define MSG_TUNE                            "\xcf\xf0"
111
+  #define MSG_PAUSE_PRINT                     "\xf1\xf2\xca\xf3"
112
+  #define MSG_RESUME_PRINT                    "\xf4\xf5\xca\xf3"
113
+  #define MSG_STOP_PRINT                      "\xf2\xf6\xca\xf3"
114
+  #define MSG_CARD_MENU                       "\xaf\xb0"
115
+  #define MSG_NO_CARD                         "\xf9\xa8"
116
+  #define MSG_DWELL                           "Sleep..."
117
+  #define MSG_USERWAIT                        "Wait for user..."
118
+  #define MSG_RESUMING                        "Resuming print"
119
+  #define MSG_PRINT_ABORTED                   "Print aborted"
120
+  #define MSG_NO_MOVE                         "No move."
121
+  #define MSG_KILLED                          "KILLED. "
122
+  #define MSG_STOPPED                         "STOPPED. "
123
+  #define MSG_CONTROL_RETRACT                 "Retract mm"
124
+  #define MSG_CONTROL_RETRACT_SWAP            "Swap Re.mm"
125
+  #define MSG_CONTROL_RETRACTF                "Retract  V"
126
+  #define MSG_CONTROL_RETRACT_ZLIFT           "Hop mm"
127
+  #define MSG_CONTROL_RETRACT_RECOVER         "UnRet +mm"
128
+  #define MSG_CONTROL_RETRACT_RECOVER_SWAP    "S UnRet+mm"
129
+  #define MSG_CONTROL_RETRACT_RECOVERF        "UnRet  V"
130
+  #define MSG_AUTORETRACT                     "AutoRetr."
131
+  #define MSG_FILAMENTCHANGE                  "Change filament"
132
+  #define MSG_INIT_SDCARD                     "Init. SD card"
133
+  #define MSG_CNG_SDCARD                      "Change SD card"
134
+  #define MSG_ZPROBE_OUT                      "Z probe out. bed"
135
+  #define MSG_POSITION_UNKNOWN                "Home X/Y before Z"
136
+  #define MSG_ZPROBE_ZOFFSET                  "Z Offset"
137
+  #define MSG_BABYSTEP_X                      "Babystep X"
138
+  #define MSG_BABYSTEP_Y                      "Babystep Y"
139
+  #define MSG_BABYSTEP_Z                      "Babystep Z"
140
+  #define MSG_ENDSTOP_ABORT                   "Endstop abort"
141
+  #define MSG_HEATING_FAILED_LCD              "Heating failed"
142
+  #define MSG_ERR_REDUNDANT_TEMP              "Err: REDUNDANT TEMP ERROR"
143
+  #define MSG_THERMAL_RUNAWAY                 "THERMAL RUNAWAY"
144
+  #define MSG_ERR_MAXTEMP                     "Err: MAXTEMP"
145
+  #define MSG_ERR_MINTEMP                     "Err: MINTEMP"
146
+  #define MSG_ERR_MAXTEMP_BED                 "Err: MAXTEMP BED"
147
+  #define MSG_END_HOUR                        "hours"
148
+  #define MSG_END_MINUTE                      "minutes"
149
+
150
+  #ifdef DELTA_CALIBRATION_MENU
151
+    #define MSG_DELTA_CALIBRATE             "Delta Calibration"
152
+    #define MSG_DELTA_CALIBRATE_X           "Calibrate X"
153
+    #define MSG_DELTA_CALIBRATE_Y           "Calibrate Y"
154
+    #define MSG_DELTA_CALIBRATE_Z           "Calibrate Z"
155
+    #define MSG_DELTA_CALIBRATE_CENTER      "Calibrate Center"
156
+  #endif // DELTA_CALIBRATION_MENU
157
+
158
+#endif // LANGUAGE_CN_H
159
+

+ 1
- 1
Marlin/language_en.h View File

@@ -13,7 +13,7 @@
13 13
 #endif
14 14
 
15 15
 //#define SIMULATE_ROMFONT //Comment in to see what is seen on the character based displays
16
-#if !( defined(SIMULATE_ROMFONT)|| defined(DISPLAY_CHARSET_ISO10646_1)|| defined(DISPLAY_CHARSET_ISO10646_5)|| defined(DISPLAY_CHARSET_ISO10646_KANA) )
16
+#if !( defined(SIMULATE_ROMFONT)|| defined(DISPLAY_CHARSET_ISO10646_1)|| defined(DISPLAY_CHARSET_ISO10646_5)|| defined(DISPLAY_CHARSET_ISO10646_KANA)|| defined(DISPLAY_CHARSET_ISO10646_CN) )
17 17
   #define DISPLAY_CHARSET_ISO10646_1 // use the better font on full graphic displays.
18 18
 #endif
19 19
 

+ 305
- 114
Marlin/ultralcd.cpp View File

@@ -173,6 +173,9 @@ static void lcd_status_screen();
173 173
   } while(0)
174 174
 
175 175
   #ifdef ENCODER_RATE_MULTIPLIER
176
+
177
+    //#define ENCODER_RATE_MULTIPLIER_DEBUG  // If defined, output the encoder steps per second value
178
+
176 179
     /**
177 180
      * MENU_MULTIPLIER_ITEM generates drawing and handling code for a multiplier menu item
178 181
      */
@@ -246,6 +249,9 @@ menuFunc_t callbackFunc;
246 249
 // place-holders for Ki and Kd edits
247 250
 float raw_Ki, raw_Kd;
248 251
 
252
+/**
253
+ * General function to go directly to a menu
254
+ */
249 255
 static void lcd_goto_menu(menuFunc_t menu, const bool feedback=false, const uint32_t encoder=0) {
250 256
   if (currentMenu != menu) {
251 257
     currentMenu = menu;
@@ -260,7 +266,13 @@ static void lcd_goto_menu(menuFunc_t menu, const bool feedback=false, const uint
260 266
   }
261 267
 }
262 268
 
263
-/* Main status screen. It's up to the implementation specific part to show what is needed. As this is very display dependent */
269
+/**
270
+ *
271
+ * "Info Screen"
272
+ *
273
+ * This is very display-dependent, so the lcd implementation draws this.
274
+ */
275
+
264 276
 static void lcd_status_screen() {
265 277
 	encoderRateMultiplierEnabled = false;
266 278
 
@@ -371,7 +383,12 @@ static void lcd_sdcard_stop() {
371 383
   lcd_setstatus(MSG_PRINT_ABORTED, true);
372 384
 }
373 385
 
374
-/* Menu implementation */
386
+/**
387
+ *
388
+ * "Main" menu
389
+ *
390
+ */
391
+
375 392
 static void lcd_main_menu() {
376 393
   START_MENU();
377 394
   MENU_ITEM(back, MSG_WATCH, lcd_status_screen);
@@ -453,6 +470,12 @@ void lcd_set_home_offsets() {
453 470
 
454 471
 #endif //BABYSTEPPING
455 472
 
473
+/**
474
+ *
475
+ * "Tune" submenu
476
+ *
477
+ */
478
+
456 479
 static void lcd_tune_menu() {
457 480
   START_MENU();
458 481
   MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
@@ -594,17 +617,55 @@ void lcd_cooldown() {
594 617
   lcd_return_to_status();
595 618
 }
596 619
 
620
+/**
621
+ *
622
+ * "Prepare" submenu
623
+ *
624
+ */
625
+
597 626
 static void lcd_prepare_menu() {
598 627
   START_MENU();
628
+
629
+  //
630
+  // ^ Main
631
+  //
599 632
   MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
600
-  #if defined( SDSUPPORT ) && defined( MENU_ADDAUTOSTART )
601
-    MENU_ITEM(function, MSG_AUTOSTART, lcd_autostart_sd);
602
-  #endif
603
-  MENU_ITEM(gcode, MSG_DISABLE_STEPPERS, PSTR("M84"));
633
+
634
+  //
635
+  // Auto Home
636
+  //
604 637
   MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
638
+
639
+  //
640
+  // Set Home Offsets
641
+  //
605 642
   MENU_ITEM(function, MSG_SET_HOME_OFFSETS, lcd_set_home_offsets);
606 643
   //MENU_ITEM(gcode, MSG_SET_ORIGIN, PSTR("G92 X0 Y0 Z0"));
607 644
 
645
+  //
646
+  // Level Bed
647
+  //
648
+  #ifdef ENABLE_AUTO_BED_LEVELING
649
+    if (axis_known_position[X_AXIS] && axis_known_position[Y_AXIS])
650
+      MENU_ITEM(gcode, MSG_LEVEL_BED, PSTR("G29"));
651
+  #elif defined(MANUAL_BED_LEVELING)
652
+    MENU_ITEM(submenu, MSG_LEVEL_BED, lcd_level_bed);
653
+  #endif
654
+
655
+  //
656
+  // Move Axis
657
+  //
658
+  MENU_ITEM(submenu, MSG_MOVE_AXIS, lcd_move_menu);
659
+
660
+  //
661
+  // Disable Steppers
662
+  //
663
+  MENU_ITEM(gcode, MSG_DISABLE_STEPPERS, PSTR("M84"));
664
+
665
+  //
666
+  // Preheat PLA
667
+  // Preheat ABS
668
+  //
608 669
   #if TEMP_SENSOR_0 != 0
609 670
     #if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 || TEMP_SENSOR_BED != 0
610 671
       MENU_ITEM(submenu, MSG_PREHEAT_PLA, lcd_preheat_pla_menu);
@@ -615,8 +676,14 @@ static void lcd_prepare_menu() {
615 676
     #endif
616 677
   #endif
617 678
 
679
+  //
680
+  // Cooldown
681
+  //
618 682
   MENU_ITEM(function, MSG_COOLDOWN, lcd_cooldown);
619 683
 
684
+  //
685
+  // Switch power on/off
686
+  //
620 687
   #if HAS_POWER_SWITCH
621 688
     if (powersupply)
622 689
       MENU_ITEM(gcode, MSG_SWITCH_PS_OFF, PSTR("M81"));
@@ -624,12 +691,13 @@ static void lcd_prepare_menu() {
624 691
       MENU_ITEM(gcode, MSG_SWITCH_PS_ON, PSTR("M80"));
625 692
   #endif
626 693
 
627
-  MENU_ITEM(submenu, MSG_MOVE_AXIS, lcd_move_menu);
628
-
629
-  #if defined(MANUAL_BED_LEVELING)
630
-    MENU_ITEM(submenu, MSG_LEVEL_BED, lcd_level_bed);
694
+  //
695
+  // Autostart
696
+  //
697
+  #if defined(SDSUPPORT) && defined(MENU_ADDAUTOSTART)
698
+    MENU_ITEM(function, MSG_AUTOSTART, lcd_autostart_sd);
631 699
   #endif
632
-	
700
+
633 701
   END_MENU();
634 702
 }
635 703
 
@@ -657,6 +725,12 @@ inline void line_to_current(AxisEnum axis) {
657 725
   #endif
658 726
 }
659 727
 
728
+/**
729
+ *
730
+ * "Prepare" > "Move Axis" submenu
731
+ *
732
+ */
733
+
660 734
 float move_menu_scale;
661 735
 static void lcd_move_menu_axis();
662 736
 
@@ -687,6 +761,12 @@ static void lcd_move_e() {
687 761
   if (LCD_CLICKED) lcd_goto_menu(lcd_move_menu_axis);
688 762
 }
689 763
 
764
+/**
765
+ *
766
+ * "Prepare" > "Move Xmm" > "Move XYZ" submenu
767
+ *
768
+ */
769
+
690 770
 static void lcd_move_menu_axis() {
691 771
   START_MENU();
692 772
   MENU_ITEM(back, MSG_MOVE_AXIS, lcd_move_menu);
@@ -712,6 +792,12 @@ static void lcd_move_menu_01mm() {
712 792
   lcd_move_menu_axis();
713 793
 }
714 794
 
795
+/**
796
+ *
797
+ * "Prepare" > "Move Axis" submenu
798
+ *
799
+ */
800
+
715 801
 static void lcd_move_menu() {
716 802
   START_MENU();
717 803
   MENU_ITEM(back, MSG_PREPARE, lcd_prepare_menu);
@@ -722,6 +808,12 @@ static void lcd_move_menu() {
722 808
   END_MENU();
723 809
 }
724 810
 
811
+/**
812
+ *
813
+ * "Control" submenu
814
+ *
815
+ */
816
+
725 817
 static void lcd_control_menu() {
726 818
   START_MENU();
727 819
   MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
@@ -744,6 +836,12 @@ static void lcd_control_menu() {
744 836
   END_MENU();
745 837
 }
746 838
 
839
+/**
840
+ *
841
+ * "Temperature" submenu
842
+ *
843
+ */
844
+
747 845
 #ifdef PIDTEMP
748 846
 
749 847
   // Helpers for editing PID Ki & Kd values
@@ -775,6 +873,12 @@ static void lcd_control_menu() {
775 873
 
776 874
 #endif //PIDTEMP
777 875
 
876
+/**
877
+ *
878
+ * "Control" > "Temperature" submenu
879
+ *
880
+ */
881
+
778 882
 static void lcd_control_temperature_menu() {
779 883
   START_MENU();
780 884
   MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
@@ -863,6 +967,12 @@ static void lcd_control_temperature_menu() {
863 967
   END_MENU();
864 968
 }
865 969
 
970
+/**
971
+ *
972
+ * "Temperature" > "Preheat PLA conf" submenu
973
+ *
974
+ */
975
+
866 976
 static void lcd_control_temperature_preheat_pla_settings_menu() {
867 977
   START_MENU();
868 978
   MENU_ITEM(back, MSG_TEMPERATURE, lcd_control_temperature_menu);
@@ -879,6 +989,12 @@ static void lcd_control_temperature_preheat_pla_settings_menu() {
879 989
   END_MENU();
880 990
 }
881 991
 
992
+/**
993
+ *
994
+ * "Temperature" > "Preheat ABS conf" submenu
995
+ *
996
+ */
997
+
882 998
 static void lcd_control_temperature_preheat_abs_settings_menu() {
883 999
   START_MENU();
884 1000
   MENU_ITEM(back, MSG_TEMPERATURE, lcd_control_temperature_menu);
@@ -895,6 +1011,12 @@ static void lcd_control_temperature_preheat_abs_settings_menu() {
895 1011
   END_MENU();
896 1012
 }
897 1013
 
1014
+/**
1015
+ *
1016
+ * "Control" > "Motion" submenu
1017
+ *
1018
+ */
1019
+
898 1020
 static void lcd_control_motion_menu() {
899 1021
   START_MENU();
900 1022
   MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
@@ -931,6 +1053,12 @@ static void lcd_control_motion_menu() {
931 1053
   END_MENU();
932 1054
 }
933 1055
 
1056
+/**
1057
+ *
1058
+ * "Control" > "Filament" submenu
1059
+ *
1060
+ */
1061
+
934 1062
 static void lcd_control_volumetric_menu() {
935 1063
   START_MENU();
936 1064
   MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
@@ -953,6 +1081,12 @@ static void lcd_control_volumetric_menu() {
953 1081
   END_MENU();
954 1082
 }
955 1083
 
1084
+/**
1085
+ *
1086
+ * "Control" > "Contrast" submenu
1087
+ *
1088
+ */
1089
+
956 1090
 #ifdef HAS_LCD_CONTRAST
957 1091
   static void lcd_set_contrast() {
958 1092
     if (encoderPosition != 0) {
@@ -967,6 +1101,12 @@ static void lcd_control_volumetric_menu() {
967 1101
   }
968 1102
 #endif // HAS_LCD_CONTRAST
969 1103
 
1104
+/**
1105
+ *
1106
+ * "Control" > "Retract" submenu
1107
+ *
1108
+ */
1109
+
970 1110
 #ifdef FWRETRACT
971 1111
   static void lcd_control_retract_menu() {
972 1112
     START_MENU();
@@ -999,6 +1139,12 @@ static void lcd_sd_updir() {
999 1139
   currentMenuViewOffset = 0;
1000 1140
 }
1001 1141
 
1142
+/**
1143
+ *
1144
+ * "Print from SD" submenu
1145
+ *
1146
+ */
1147
+
1002 1148
 void lcd_sdcard_menu() {
1003 1149
   if (lcdDrawUpdate == 0 && LCD_CLICKED == 0) return;	// nothing to do (so don't thrash the SD card)
1004 1150
   uint16_t fileCnt = card.getnrfilenames();
@@ -1034,6 +1180,11 @@ void lcd_sdcard_menu() {
1034 1180
   END_MENU();
1035 1181
 }
1036 1182
 
1183
+/**
1184
+ *
1185
+ * Functions for editing single values
1186
+ *
1187
+ */
1037 1188
 #define menu_edit_type(_type, _name, _strFunc, scale) \
1038 1189
   bool _menu_edit_ ## _name () { \
1039 1190
     bool isClicked = LCD_CLICKED; \
@@ -1080,6 +1231,11 @@ menu_edit_type(float, float51, ftostr51, 10)
1080 1231
 menu_edit_type(float, float52, ftostr52, 100)
1081 1232
 menu_edit_type(unsigned long, long5, ftostr5, 0.01)
1082 1233
 
1234
+/**
1235
+ *
1236
+ * Handlers for RepRap World Keypad input
1237
+ *
1238
+ */
1083 1239
 #ifdef REPRAPWORLD_KEYPAD
1084 1240
   static void reprapworld_keypad_move_z_up() {
1085 1241
     encoderPosition = 1;
@@ -1114,10 +1270,14 @@ menu_edit_type(unsigned long, long5, ftostr5, 0.01)
1114 1270
   static void reprapworld_keypad_move_home() {
1115 1271
     enqueuecommands_P((PSTR("G28"))); // move all axis home
1116 1272
   }
1117
-#endif //REPRAPWORLD_KEYPAD
1273
+#endif // REPRAPWORLD_KEYPAD
1118 1274
 
1119
-/** End of menus **/
1120 1275
 
1276
+/**
1277
+ *
1278
+ * Audio feedback for controller clicks
1279
+ *
1280
+ */
1121 1281
 void lcd_quick_feedback() {
1122 1282
   lcdDrawUpdate = 2;
1123 1283
   next_button_update_ms = millis() + 500;
@@ -1146,11 +1306,15 @@ void lcd_quick_feedback() {
1146 1306
   #endif
1147 1307
 }
1148 1308
 
1149
-/** Menu action functions **/
1150
-static void menu_action_back(menuFunc_t data) { lcd_goto_menu(data); }
1151
-static void menu_action_submenu(menuFunc_t data) { lcd_goto_menu(data); }
1309
+/**
1310
+ *
1311
+ * Menu actions
1312
+ *
1313
+ */
1314
+static void menu_action_back(menuFunc_t func) { lcd_goto_menu(func); }
1315
+static void menu_action_submenu(menuFunc_t func) { lcd_goto_menu(func); }
1152 1316
 static void menu_action_gcode(const char* pgcode) { enqueuecommands_P(pgcode); }
1153
-static void menu_action_function(menuFunc_t data) { (*data)(); }
1317
+static void menu_action_function(menuFunc_t func) { (*func)(); }
1154 1318
 static void menu_action_sdfile(const char* filename, char* longFilename) {
1155 1319
   char cmd[30];
1156 1320
   char* c;
@@ -1243,6 +1407,19 @@ int lcd_strlen_P(const char *s) {
1243 1407
   return j;
1244 1408
 }
1245 1409
 
1410
+/**
1411
+ * Update the LCD, read encoder buttons, etc.
1412
+ *   - Read button states
1413
+ *   - Check the SD Card slot state
1414
+ *   - Act on RepRap World keypad input
1415
+ *   - Update the encoder position
1416
+ *   - Apply acceleration to the encoder position
1417
+ *   - Reset the Info Screen timeout if there's any input
1418
+ *   - Update status indicators, if any
1419
+ *   - Clear the LCD if lcdDrawUpdate == 2
1420
+ *
1421
+ * Warning: This function is called from interrupt context!
1422
+ */
1246 1423
 void lcd_update() {
1247 1424
   #ifdef ULTIPANEL
1248 1425
     static millis_t return_to_status_ms = 0;
@@ -1381,7 +1558,7 @@ void lcd_update() {
1381 1558
 
1382 1559
     if (lcdDrawUpdate == 2) lcd_implementation_clear();
1383 1560
     if (lcdDrawUpdate) lcdDrawUpdate--;
1384
-    next_lcd_update_ms = millis() + LCD_UPDATE_INTERVAL;
1561
+    next_lcd_update_ms = ms + LCD_UPDATE_INTERVAL;
1385 1562
   }
1386 1563
 }
1387 1564
 
@@ -1454,112 +1631,116 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; }
1454 1631
 
1455 1632
 #ifdef ULTIPANEL
1456 1633
 
1457
-////////////////////////
1458
-// Setup Rotary Encoder Bit Values (for two pin encoders to indicate movement)
1459
-// These values are independent of which pins are used for EN_A and EN_B indications
1460
-// The rotary encoder part is also independent to the chipset used for the LCD
1461
-#if defined(EN_A) && defined(EN_B)
1462
-  #define encrot0 0
1463
-  #define encrot1 2
1464
-  #define encrot2 3
1465
-  #define encrot3 1
1466
-#endif 
1467
-
1468
-/* Warning: This function is called from interrupt context */
1469
-void lcd_buttons_update() {
1470
-  #ifdef NEWPANEL
1471
-    uint8_t newbutton = 0;
1472
-    if (READ(BTN_EN1) == 0) newbutton |= EN_A;
1473
-    if (READ(BTN_EN2) == 0) newbutton |= EN_B;
1474
-    #if BTN_ENC > 0
1475
-      if (millis() > next_button_update_ms && READ(BTN_ENC) == 0) newbutton |= EN_C;
1476
-    #endif
1477
-    buttons = newbutton;
1478
-    #ifdef LCD_HAS_SLOW_BUTTONS
1479
-      buttons |= slow_buttons;
1480
-    #endif
1481
-    #ifdef REPRAPWORLD_KEYPAD
1482
-      // for the reprapworld_keypad
1483
-      uint8_t newbutton_reprapworld_keypad=0;
1634
+  /**
1635
+   * Setup Rotary Encoder Bit Values (for two pin encoders to indicate movement)
1636
+   * These values are independent of which pins are used for EN_A and EN_B indications
1637
+   * The rotary encoder part is also independent to the chipset used for the LCD
1638
+   */
1639
+  #if defined(EN_A) && defined(EN_B)
1640
+    #define encrot0 0
1641
+    #define encrot1 2
1642
+    #define encrot2 3
1643
+    #define encrot3 1
1644
+  #endif 
1645
+
1646
+  /**
1647
+   * Read encoder buttons from the hardware registers
1648
+   * Warning: This function is called from interrupt context!
1649
+   */
1650
+  void lcd_buttons_update() {
1651
+    #ifdef NEWPANEL
1652
+      uint8_t newbutton = 0;
1653
+      if (READ(BTN_EN1) == 0) newbutton |= EN_A;
1654
+      if (READ(BTN_EN2) == 0) newbutton |= EN_B;
1655
+      #if BTN_ENC > 0
1656
+        if (millis() > next_button_update_ms && READ(BTN_ENC) == 0) newbutton |= EN_C;
1657
+      #endif
1658
+      buttons = newbutton;
1659
+      #ifdef LCD_HAS_SLOW_BUTTONS
1660
+        buttons |= slow_buttons;
1661
+      #endif
1662
+      #ifdef REPRAPWORLD_KEYPAD
1663
+        // for the reprapworld_keypad
1664
+        uint8_t newbutton_reprapworld_keypad=0;
1665
+        WRITE(SHIFT_LD, LOW);
1666
+        WRITE(SHIFT_LD, HIGH);
1667
+        for(int8_t i = 0; i < 8; i++) {
1668
+          newbutton_reprapworld_keypad >>= 1;
1669
+          if (READ(SHIFT_OUT)) newbutton_reprapworld_keypad |= BIT(7);
1670
+          WRITE(SHIFT_CLK, HIGH);
1671
+          WRITE(SHIFT_CLK, LOW);
1672
+        }
1673
+        buttons_reprapworld_keypad=~newbutton_reprapworld_keypad; //invert it, because a pressed switch produces a logical 0
1674
+      #endif
1675
+    #else   //read it from the shift register
1676
+      uint8_t newbutton = 0;
1484 1677
       WRITE(SHIFT_LD, LOW);
1485 1678
       WRITE(SHIFT_LD, HIGH);
1486
-      for(int8_t i = 0; i < 8; i++) {
1487
-        newbutton_reprapworld_keypad >>= 1;
1488
-        if (READ(SHIFT_OUT)) newbutton_reprapworld_keypad |= BIT(7);
1679
+      unsigned char tmp_buttons = 0;
1680
+      for(int8_t i=0; i<8; i++) {
1681
+        newbutton >>= 1;
1682
+        if (READ(SHIFT_OUT)) newbutton |= BIT(7);
1489 1683
         WRITE(SHIFT_CLK, HIGH);
1490 1684
         WRITE(SHIFT_CLK, LOW);
1491 1685
       }
1492
-      buttons_reprapworld_keypad=~newbutton_reprapworld_keypad; //invert it, because a pressed switch produces a logical 0
1493
-    #endif
1494
-  #else   //read it from the shift register
1495
-    uint8_t newbutton = 0;
1496
-    WRITE(SHIFT_LD, LOW);
1497
-    WRITE(SHIFT_LD, HIGH);
1498
-    unsigned char tmp_buttons = 0;
1499
-    for(int8_t i=0; i<8; i++) {
1500
-      newbutton >>= 1;
1501
-      if (READ(SHIFT_OUT)) newbutton |= BIT(7);
1502
-      WRITE(SHIFT_CLK, HIGH);
1503
-      WRITE(SHIFT_CLK, LOW);
1504
-    }
1505
-    buttons = ~newbutton; //invert it, because a pressed switch produces a logical 0
1506
-  #endif //!NEWPANEL
1507
-
1508
-  //manage encoder rotation
1509
-  uint8_t enc=0;
1510
-  if (buttons & EN_A) enc |= B01;
1511
-  if (buttons & EN_B) enc |= B10;
1512
-  if (enc != lastEncoderBits) {
1513
-    switch(enc) {
1514
-      case encrot0:
1515
-        if (lastEncoderBits==encrot3) encoderDiff++;
1516
-        else if (lastEncoderBits==encrot1) encoderDiff--;
1517
-        break;
1518
-      case encrot1:
1519
-        if (lastEncoderBits==encrot0) encoderDiff++;
1520
-        else if (lastEncoderBits==encrot2) encoderDiff--;
1521
-        break;
1522
-      case encrot2:
1523
-        if (lastEncoderBits==encrot1) encoderDiff++;
1524
-        else if (lastEncoderBits==encrot3) encoderDiff--;
1525
-        break;
1526
-      case encrot3:
1527
-        if (lastEncoderBits==encrot2) encoderDiff++;
1528
-        else if (lastEncoderBits==encrot0) encoderDiff--;
1529
-        break;
1686
+      buttons = ~newbutton; //invert it, because a pressed switch produces a logical 0
1687
+    #endif //!NEWPANEL
1688
+
1689
+    //manage encoder rotation
1690
+    uint8_t enc=0;
1691
+    if (buttons & EN_A) enc |= B01;
1692
+    if (buttons & EN_B) enc |= B10;
1693
+    if (enc != lastEncoderBits) {
1694
+      switch(enc) {
1695
+        case encrot0:
1696
+          if (lastEncoderBits==encrot3) encoderDiff++;
1697
+          else if (lastEncoderBits==encrot1) encoderDiff--;
1698
+          break;
1699
+        case encrot1:
1700
+          if (lastEncoderBits==encrot0) encoderDiff++;
1701
+          else if (lastEncoderBits==encrot2) encoderDiff--;
1702
+          break;
1703
+        case encrot2:
1704
+          if (lastEncoderBits==encrot1) encoderDiff++;
1705
+          else if (lastEncoderBits==encrot3) encoderDiff--;
1706
+          break;
1707
+        case encrot3:
1708
+          if (lastEncoderBits==encrot2) encoderDiff++;
1709
+          else if (lastEncoderBits==encrot0) encoderDiff--;
1710
+          break;
1711
+      }
1530 1712
     }
1713
+    lastEncoderBits = enc;
1531 1714
   }
1532
-  lastEncoderBits = enc;
1533
-}
1534
-
1535
-bool lcd_detected(void) {
1536
-  #if (defined(LCD_I2C_TYPE_MCP23017) || defined(LCD_I2C_TYPE_MCP23008)) && defined(DETECT_DEVICE)
1537
-    return lcd.LcdDetected() == 1;
1538
-  #else
1539
-    return true;
1540
-  #endif
1541
-}
1542 1715
 
1543
-void lcd_buzz(long duration, uint16_t freq) {
1544
-  if (freq > 0) {
1545
-    #if BEEPER > 0
1546
-      SET_OUTPUT(BEEPER);
1547
-      tone(BEEPER, freq, duration);
1548
-      delay(duration);
1549
-    #elif defined(LCD_USE_I2C_BUZZER)
1550
-      lcd.buzz(duration, freq);
1716
+  bool lcd_detected(void) {
1717
+    #if (defined(LCD_I2C_TYPE_MCP23017) || defined(LCD_I2C_TYPE_MCP23008)) && defined(DETECT_DEVICE)
1718
+      return lcd.LcdDetected() == 1;
1551 1719
     #else
1552
-      delay(duration);
1720
+      return true;
1553 1721
     #endif
1554 1722
   }
1555
-  else {
1556
-    delay(duration);
1723
+
1724
+  void lcd_buzz(long duration, uint16_t freq) {
1725
+    if (freq > 0) {
1726
+      #if BEEPER > 0
1727
+        SET_OUTPUT(BEEPER);
1728
+        tone(BEEPER, freq, duration);
1729
+        delay(duration);
1730
+      #elif defined(LCD_USE_I2C_BUZZER)
1731
+        lcd.buzz(duration, freq);
1732
+      #else
1733
+        delay(duration);
1734
+      #endif
1735
+    }
1736
+    else {
1737
+      delay(duration);
1738
+    }
1557 1739
   }
1558
-}
1559 1740
 
1560
-bool lcd_clicked() { return LCD_CLICKED; }
1741
+  bool lcd_clicked() { return LCD_CLICKED; }
1561 1742
 
1562
-#endif //ULTIPANEL
1743
+#endif // ULTIPANEL
1563 1744
 
1564 1745
 /*********************************/
1565 1746
 /** Number to string conversion **/
@@ -1621,8 +1802,7 @@ char *ftostr32(const float &x) {
1621 1802
 }
1622 1803
 
1623 1804
 // Convert float to string with 1.234 format
1624
-char *ftostr43(const float &x)
1625
-{
1805
+char *ftostr43(const float &x) {
1626 1806
 	long xx = x * 1000;
1627 1807
     if (xx >= 0)
1628 1808
 		conv[0] = (xx / 1000) % 10 + '0';
@@ -1638,8 +1818,7 @@ char *ftostr43(const float &x)
1638 1818
 }
1639 1819
 
1640 1820
 // Convert float to string with 1.23 format
1641
-char *ftostr12ns(const float &x)
1642
-{
1821
+char *ftostr12ns(const float &x) {
1643 1822
   long xx=x*100;
1644 1823
   
1645 1824
   xx=abs(xx);
@@ -1799,6 +1978,12 @@ char *ftostr52(const float &x) {
1799 1978
 #ifdef MANUAL_BED_LEVELING
1800 1979
 
1801 1980
   static int _lcd_level_bed_position;
1981
+
1982
+  /**
1983
+   * MBL Wait for controller movement and clicks:
1984
+   *   - Movement adjusts the Z axis
1985
+   *   - Click saves the Z and goes to the next mesh point
1986
+   */
1802 1987
   static void _lcd_level_bed() {
1803 1988
     if (encoderPosition != 0) {
1804 1989
       refresh_cmd_timeout();
@@ -1844,6 +2029,9 @@ char *ftostr52(const float &x) {
1844 2029
     }
1845 2030
   }
1846 2031
 
2032
+  /**
2033
+   * MBL Move to mesh starting point
2034
+   */
1847 2035
   static void _lcd_level_bed_homing() {
1848 2036
     if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR("XYZ"), "Homing");
1849 2037
     if (axis_known_position[X_AXIS] && axis_known_position[Y_AXIS] && axis_known_position[Z_AXIS]) {
@@ -1858,6 +2046,9 @@ char *ftostr52(const float &x) {
1858 2046
     lcdDrawUpdate = 2;
1859 2047
   }
1860 2048
 
2049
+  /**
2050
+   * MBL entry-point
2051
+   */
1861 2052
   static void lcd_level_bed() {
1862 2053
     axis_known_position[X_AXIS] = axis_known_position[Y_AXIS] = axis_known_position[Z_AXIS] = false;
1863 2054
     mbl.reset();

+ 7
- 7
Marlin/ultralcd_st7920_u8glib_rrd.h View File

@@ -16,8 +16,8 @@
16 16
 //#define PAGE_HEIGHT 16  //256 byte framebuffer
17 17
 #define PAGE_HEIGHT 32  //512 byte framebuffer
18 18
 
19
-#define WIDTH 128
20
-#define HEIGHT 64
19
+#define LCD_PIXEL_WIDTH 128
20
+#define LCD_PIXEL_HEIGHT 64
21 21
 
22 22
 #include <U8glib.h>
23 23
 
@@ -64,12 +64,12 @@ uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, vo
64 64
         ST7920_WRITE_BYTE(0x01);       //clear CGRAM ram
65 65
         u8g_Delay(15);                 //delay for CGRAM clear
66 66
         ST7920_WRITE_BYTE(0x3E);       //extended mode + GDRAM active
67
-        for(y=0;y<HEIGHT/2;y++)        //clear GDRAM
67
+        for(y=0;y<LCD_PIXEL_HEIGHT/2;y++)        //clear GDRAM
68 68
         {
69 69
           ST7920_WRITE_BYTE(0x80|y);   //set y
70 70
           ST7920_WRITE_BYTE(0x80);     //set x = 0
71 71
           ST7920_SET_DAT();
72
-          for(i=0;i<2*WIDTH/8;i++)     //2x width clears both segments
72
+          for(i=0;i<2*LCD_PIXEL_WIDTH/8;i++)     //2x width clears both segments
73 73
             ST7920_WRITE_BYTE(0);
74 74
           ST7920_SET_CMD();
75 75
         }
@@ -103,7 +103,7 @@ uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, vo
103 103
           }
104 104
 
105 105
           ST7920_SET_DAT();
106
-          ST7920_WRITE_BYTES(ptr,WIDTH/8); //ptr is incremented inside of macro
106
+          ST7920_WRITE_BYTES(ptr,LCD_PIXEL_WIDTH/8); //ptr is incremented inside of macro
107 107
           y++;
108 108
         }
109 109
         ST7920_NCS();
@@ -119,8 +119,8 @@ uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, vo
119 119
 #endif
120 120
 }
121 121
 
122
-uint8_t   u8g_dev_st7920_128x64_rrd_buf[WIDTH*(PAGE_HEIGHT/8)] U8G_NOCOMMON;
123
-u8g_pb_t  u8g_dev_st7920_128x64_rrd_pb = {{PAGE_HEIGHT,HEIGHT,0,0,0},WIDTH,u8g_dev_st7920_128x64_rrd_buf};
122
+uint8_t   u8g_dev_st7920_128x64_rrd_buf[LCD_PIXEL_WIDTH*(PAGE_HEIGHT/8)] U8G_NOCOMMON;
123
+u8g_pb_t  u8g_dev_st7920_128x64_rrd_pb = {{PAGE_HEIGHT,LCD_PIXEL_HEIGHT,0,0,0},LCD_PIXEL_WIDTH,u8g_dev_st7920_128x64_rrd_buf};
124 124
 u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = {u8g_dev_rrd_st7920_128x64_fn,&u8g_dev_st7920_128x64_rrd_pb,&u8g_com_null_fn};
125 125
 
126 126
 class U8GLIB_ST7920_128X64_RRD : public U8GLIB

Loading…
Cancel
Save