Browse Source

Merge branch 'Development' into eeprom_in_gcode

Latest upstream commits
Scott Lahteine 10 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
   * nl    Dutch
46
   * nl    Dutch
47
   * ca    Catalan
47
   * ca    Catalan
48
   * eu    Basque-Euskera
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
 ## The Problem
53
 ## The Problem
56
   All of this languages, except the English, normally use extended symbol sets, not contained in US-ASCII.
54
   All of this languages, except the English, normally use extended symbol sets, not contained in US-ASCII.
132
 
130
 
133
   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.
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
 ## User Instructions
136
 ## User Instructions
136
    Define your hardware and the wanted language in 'Configuration.h'.
137
    Define your hardware and the wanted language in 'Configuration.h'.
137
    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.
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
 // @section lcd
642
 // @section lcd
643
 
643
 
644
 // Define your display language below. Replace (en) with your language code and uncomment.
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
 // See also language.h
646
 // See also language.h
647
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
647
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
648
 
648
 

+ 3
- 1
Marlin/Configuration_adv.h View File

195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
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
 // @section machine
201
 // @section machine
199
 
202
 
200
 #define AXIS_RELATIVE_MODES {false, false, false, false}
203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
258
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259
 #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
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
 #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
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
 //#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
 //#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
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
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
     current_position[axis] = 0;
1549
     current_position[axis] = 0;
1550
     sync_plan_position();
1550
     sync_plan_position();
1551
 
1551
 
1552
+    enable_endstops(false); // Disable endstops while moving away
1553
+
1552
     // Move away from the endstop by the axis HOME_BUMP_MM
1554
     // Move away from the endstop by the axis HOME_BUMP_MM
1553
     destination[axis] = -home_bump_mm(axis) * axis_home_dir;
1555
     destination[axis] = -home_bump_mm(axis) * axis_home_dir;
1554
     line_to_destination();
1556
     line_to_destination();
1555
     st_synchronize();
1557
     st_synchronize();
1556
 
1558
 
1559
+    enable_endstops(true); // Enable endstops for next homing move
1560
+
1557
     // Slow down the feedrate for the next move
1561
     // Slow down the feedrate for the next move
1558
     set_homing_bump_feedrate(axis);
1562
     set_homing_bump_feedrate(axis);
1559
 
1563
 
1590
     #ifdef DELTA
1594
     #ifdef DELTA
1591
       // retrace by the amount specified in endstop_adj
1595
       // retrace by the amount specified in endstop_adj
1592
       if (endstop_adj[axis] * axis_home_dir < 0) {
1596
       if (endstop_adj[axis] * axis_home_dir < 0) {
1597
+        enable_endstops(false); // Disable endstops while moving away
1593
         sync_plan_position();
1598
         sync_plan_position();
1594
         destination[axis] = endstop_adj[axis];
1599
         destination[axis] = endstop_adj[axis];
1595
         line_to_destination();
1600
         line_to_destination();
1596
         st_synchronize();
1601
         st_synchronize();
1602
+        enable_endstops(true); // Enable endstops for next homing move
1597
       }
1603
       }
1598
     #endif
1604
     #endif
1599
 
1605
 
1600
     // Set the axis position to its home position (plus home offsets)
1606
     // Set the axis position to its home position (plus home offsets)
1601
     axis_is_at_home(axis);
1607
     axis_is_at_home(axis);
1608
+    sync_plan_position();
1602
 
1609
 
1603
     destination[axis] = current_position[axis];
1610
     destination[axis] = current_position[axis];
1604
     feedrate = 0.0;
1611
     feedrate = 0.0;
1929
 
1936
 
1930
     #endif // QUICK_HOME
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
     // Home X
1944
     // Home X
1933
     if (home_all_axis || homeX) {
1945
     if (home_all_axis || homeX) {
1934
       #ifdef DUAL_X_CARRIAGE
1946
       #ifdef DUAL_X_CARRIAGE
1948
       #endif
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
     // Home Z last if homing towards the bed
1968
     // Home Z last if homing towards the bed
1955
     #if Z_HOME_DIR < 0
1969
     #if Z_HOME_DIR < 0

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

641
 // @section lcd
641
 // @section lcd
642
 
642
 
643
 // Define your display language below. Replace (en) with your language code and uncomment.
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
 // See also language.h
645
 // See also language.h
646
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
646
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
647
 
647
 

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

195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
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
 // @section machine
201
 // @section machine
199
 
202
 
200
 #define AXIS_RELATIVE_MODES {false, false, false, false}
203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
258
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259
 #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
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
 #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
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
 //#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
 //#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
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
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

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
   #elif defined( DISPLAY_CHARSET_ISO10646_KANA )
64
   #elif defined( DISPLAY_CHARSET_ISO10646_KANA )
65
     #include "dogm_font_data_ISO10646_Kana.h"
65
     #include "dogm_font_data_ISO10646_Kana.h"
66
     #define FONT_MENU_NAME ISO10646_Kana_5x7
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
   #else // fall-back
71
   #else // fall-back
68
     #include "dogm_font_data_ISO10646_1.h"
72
     #include "dogm_font_data_ISO10646_1.h"
69
     #define FONT_MENU_NAME ISO10646_1_5x7
73
     #define FONT_MENU_NAME ISO10646_1_5x7
106
   #define LCD_WIDTH_EDIT       22
110
   #define LCD_WIDTH_EDIT       22
107
 #endif
111
 #endif
108
 
112
 
113
+#ifndef TALL_FONT_CORRECTION
114
+  #define TALL_FONT_CORRECTION 0
115
+#endif
116
+
109
 #define START_ROW              0
117
 #define START_ROW              0
110
 
118
 
111
 // LCD selection
119
 // LCD selection
123
   U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0);  // HW-SPI Com: CS, A0
131
   U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0);  // HW-SPI Com: CS, A0
124
 #endif
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
 #include "utf_mapper.h"
141
 #include "utf_mapper.h"
127
 
142
 
128
 int lcd_contrast;
143
 int lcd_contrast;
172
 
187
 
173
 static bool show_splashscreen = true;
188
 static bool show_splashscreen = true;
174
 
189
 
190
+/* Warning: This function is called from interrupt context */
175
 static void lcd_implementation_init() {
191
 static void lcd_implementation_init() {
176
 
192
 
177
   #ifdef LCD_PIN_BL // Enable LCD backlight
193
   #ifdef LCD_PIN_BL // Enable LCD backlight
252
  
268
  
253
   #ifdef SDSUPPORT
269
   #ifdef SDSUPPORT
254
     // SD Card Symbol
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
     // Progress bar frame
277
     // Progress bar frame
261
-    u8g.drawFrame(54,49,73,4);
278
+    u8g.drawFrame(54, 49, 73, 4 - TALL_FONT_CORRECTION);
262
 
279
 
263
     // SD Card Progress bar and clock
280
     // SD Card Progress bar and clock
264
     lcd_setFont(FONT_STATUSMENU);
281
     lcd_setFont(FONT_STATUSMENU);
265
  
282
  
266
     if (IS_SD_PRINTING) {
283
     if (IS_SD_PRINTING) {
267
       // Progress bar solid part
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
     u8g.setPrintPos(80,48);
288
     u8g.setPrintPos(80,48);
306
   lcd_setFont(FONT_STATUSMENU);
323
   lcd_setFont(FONT_STATUSMENU);
307
 
324
 
308
   #ifdef USE_SMALL_INFOFONT
325
   #ifdef USE_SMALL_INFOFONT
309
-    u8g.drawBox(0,30,128,10);
326
+    u8g.drawBox(0,30,LCD_PIXEL_WIDTH,10);
310
   #else
327
   #else
311
-    u8g.drawBox(0,30,128,9);
328
+    u8g.drawBox(0,30,LCD_PIXEL_WIDTH,9);
312
   #endif
329
   #endif
313
   u8g.setColorIndex(0); // white on black
330
   u8g.setColorIndex(0); // white on black
314
   u8g.setPrintPos(2,XYZ_BASELINE);
331
   u8g.setPrintPos(2,XYZ_BASELINE);
366
 static void lcd_implementation_mark_as_selected(uint8_t row, bool isSelected) {
383
 static void lcd_implementation_mark_as_selected(uint8_t row, bool isSelected) {
367
   if (isSelected) {
384
   if (isSelected) {
368
     u8g.setColorIndex(1);  // black on white
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
     u8g.setColorIndex(0);  // following text must be white on black
387
     u8g.setColorIndex(0);  // following text must be white on black
371
   }
388
   }
372
   else {
389
   else {
386
     pstr++;
403
     pstr++;
387
   }
404
   }
388
   while (n--) lcd_print(' ');
405
   while (n--) lcd_print(' ');
406
+    u8g.setPrintPos(LCD_PIXEL_WIDTH - DOG_CHAR_WIDTH, (row + 1) * DOG_CHAR_HEIGHT);
389
   lcd_print(post_char);
407
   lcd_print(post_char);
390
   lcd_print(' ');
408
   lcd_print(' ');
391
 }
409
 }
392
 
410
 
393
 static void _drawmenu_setting_edit_generic(bool isSelected, uint8_t row, const char* pstr, const char* data, bool pgm) {
411
 static void _drawmenu_setting_edit_generic(bool isSelected, uint8_t row, const char* pstr, const char* data, bool pgm) {
394
   char c;
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
   lcd_implementation_mark_as_selected(row, isSelected);
416
   lcd_implementation_mark_as_selected(row, isSelected);
398
 
417
 
402
   }
421
   }
403
   lcd_print(':');
422
   lcd_print(':');
404
   while (n--) lcd_print(' ');
423
   while (n--) lcd_print(' ');
424
+  u8g.setPrintPos(LCD_PIXEL_WIDTH - DOG_CHAR_WIDTH * vallen, (row + 1) * DOG_CHAR_HEIGHT);
405
   if (pgm) { lcd_printPGM(data); } else { lcd_print((char *)data); }
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
 //==============================LCD and SD support=============================
575
 //==============================LCD and SD support=============================
576
 
576
 
577
 // Define your display language below. Replace (en) with your language code and uncomment.
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
 // See also language.h
579
 // See also language.h
580
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
580
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
581
 
581
 

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

571
 //==============================LCD and SD support=============================
571
 //==============================LCD and SD support=============================
572
 
572
 
573
 // Define your display language below. Replace (en) with your language code and uncomment.
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
 // See also language.h
575
 // See also language.h
576
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
576
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
577
 
577
 

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

195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
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
 // @section machine
201
 // @section machine
199
 
202
 
200
 #define AXIS_RELATIVE_MODES {false, false, false, false}
203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
258
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259
 #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
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
 #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
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
 //#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
 //#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
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
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
 //==============================LCD and SD support=============================
595
 //==============================LCD and SD support=============================
596
 
596
 
597
 // Define your display language below. Replace (en) with your language code and uncomment.
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
 // See also language.h
599
 // See also language.h
600
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
600
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
601
 
601
 

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

195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
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
 // @section machine
201
 // @section machine
199
 
202
 
200
 #define AXIS_RELATIVE_MODES {false, false, false, false}
203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
258
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259
 #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
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
 #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
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
 //#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
 //#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
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
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
 // @section lcd
653
 // @section lcd
654
 
654
 
655
 // Define your display language below. Replace (en) with your language code and uncomment.
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
 // See also language.h
657
 // See also language.h
658
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
658
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
659
 
659
 

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

195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
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
 // @section machine
201
 // @section machine
199
 
202
 
200
 #define AXIS_RELATIVE_MODES {false, false, false, false}
203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
258
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259
 #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
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
 #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
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
 //#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
 //#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
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
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
 //==============================LCD and SD support=============================
626
 //==============================LCD and SD support=============================
627
 
627
 
628
 // Define your display language below. Replace (en) with your language code and uncomment.
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
 // See also language.h
630
 // See also language.h
631
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
631
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
632
 
632
 

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

195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
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
 // @section machine
201
 // @section machine
199
 
202
 
200
 #define AXIS_RELATIVE_MODES {false, false, false, false}
203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
258
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259
 #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
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
 #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
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
 //#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
 //#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
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
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
 //==============================LCD and SD support=============================
594
 //==============================LCD and SD support=============================
595
 
595
 
596
 // Define your display language below. Replace (en) with your language code and uncomment.
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
 // See also language.h
598
 // See also language.h
599
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
599
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
600
 
600
 

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

195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
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
 // @section machine
201
 // @section machine
199
 
202
 
200
 #define AXIS_RELATIVE_MODES {false, false, false, false}
203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
258
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259
 #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
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
 #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
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
 //#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
 //#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
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
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
 //==============================LCD and SD support=============================
643
 //==============================LCD and SD support=============================
644
 
644
 
645
 // Define your display language below. Replace (en) with your language code and uncomment.
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
 // See also language.h
647
 // See also language.h
648
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
648
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
649
 
649
 

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

195
 #define HOMING_BUMP_DIVISOR {10, 10, 20}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
195
 #define HOMING_BUMP_DIVISOR {10, 10, 20}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
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
 // @section machine
201
 // @section machine
199
 
202
 
200
 #define AXIS_RELATIVE_MODES {false, false, false, false}
203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
259
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
262
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
260
 #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
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
 #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
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
 //#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/
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
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
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
 //==============================LCD and SD support=============================
647
 //==============================LCD and SD support=============================
648
 
648
 
649
 // Define your display language below. Replace (en) with your language code and uncomment.
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
 // See also language.h
651
 // See also language.h
652
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
652
 #define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
653
 
653
 

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

195
 #define HOMING_BUMP_DIVISOR {10, 10, 20}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
195
 #define HOMING_BUMP_DIVISOR {10, 10, 20}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
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
 // @section machine
201
 // @section machine
199
 
202
 
200
 #define AXIS_RELATIVE_MODES {false, false, false, false}
203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
258
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259
 #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
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
 #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
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
 //#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
 //#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
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
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
 //==============================LCD and SD support=============================
594
 //==============================LCD and SD support=============================
595
 
595
 
596
 // Define your display language below. Replace (en) with your language code and uncomment.
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
 // See also language.h
598
 // See also language.h
599
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
599
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
600
 
600
 

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

195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
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
 // @section machine
201
 // @section machine
199
 
202
 
200
 #define AXIS_RELATIVE_MODES {false, false, false, false}
203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
258
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259
 #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
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
 #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
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
 //#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
 //#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
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
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
 //==============================LCD and SD support=============================
600
 //==============================LCD and SD support=============================
601
 
601
 
602
 // Define your display language below. Replace (en) with your language code and uncomment.
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
 // See also language.h
604
 // See also language.h
605
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
605
 //#define LANGUAGE_INCLUDE GENERATE_LANGUAGE_INCLUDE(en)
606
 
606
 

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

195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
195
 #define HOMING_BUMP_DIVISOR {2, 2, 4}  // Re-Bump Speed Divisor (Divides the Homing Feedrate)
196
 //#define QUICK_HOME  //if this is defined, if both x and y are to be homed, a diagonal move will be performed initially.
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
 // @section machine
201
 // @section machine
199
 
202
 
200
 #define AXIS_RELATIVE_MODES {false, false, false, false}
203
 #define AXIS_RELATIVE_MODES {false, false, false, false}
258
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
261
 #define ENCODER_RATE_MULTIPLIER         // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
259
 #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
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
 #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
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
 //#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
 //#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
 #define CHDK_DELAY 50 //How long in ms the pin should stay HIGH before going LOW again
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
 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.
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
 How to integrate a new font:
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
  * Get 'Fony.exe'
11
  * Get 'Fony.exe'
11
  * Copy one of the existing *.fon files and work with this.
12
  * Copy one of the existing *.fon files and work with this.

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

5
 .\bdf2u8g.exe -b 32 -e 255 ISO10646-1.bdf ISO10646_1_5x7 dogm_font_data_ISO10646_1.h
5
 .\bdf2u8g.exe -b 32 -e 255 ISO10646-1.bdf ISO10646_1_5x7 dogm_font_data_ISO10646_1.h
6
 .\bdf2u8g.exe -b 32 -e 255 ISO10646_5_Cyrillic.bdf ISO10646_5_Cyrillic_5x7 dogm_font_data_ISO10646_5_Cyrillic.h
6
 .\bdf2u8g.exe -b 32 -e 255 ISO10646_5_Cyrillic.bdf ISO10646_5_Cyrillic_5x7 dogm_font_data_ISO10646_5_Cyrillic.h
7
 .\bdf2u8g.exe -b 32 -e 255 ISO10646_Kana.bdf ISO10646_Kana_5x7 dogm_font_data_ISO10646_Kana.h
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
 // eu       Basque-Euskera
30
 // eu       Basque-Euskera
31
 // kana     Japanese
31
 // kana     Japanese
32
 // kana_utf Japanese
32
 // kana_utf Japanese
33
+// cn       Chinese
33
 
34
 
34
 #ifndef LANGUAGE_INCLUDE
35
 #ifndef LANGUAGE_INCLUDE
35
   // pick your language from the list above
36
   // pick your language from the list above

+ 159
- 0
Marlin/language_cn.h View File

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
 #endif
13
 #endif
14
 
14
 
15
 //#define SIMULATE_ROMFONT //Comment in to see what is seen on the character based displays
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
   #define DISPLAY_CHARSET_ISO10646_1 // use the better font on full graphic displays.
17
   #define DISPLAY_CHARSET_ISO10646_1 // use the better font on full graphic displays.
18
 #endif
18
 #endif
19
 
19
 

+ 305
- 114
Marlin/ultralcd.cpp View File

173
   } while(0)
173
   } while(0)
174
 
174
 
175
   #ifdef ENCODER_RATE_MULTIPLIER
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
      * MENU_MULTIPLIER_ITEM generates drawing and handling code for a multiplier menu item
180
      * MENU_MULTIPLIER_ITEM generates drawing and handling code for a multiplier menu item
178
      */
181
      */
246
 // place-holders for Ki and Kd edits
249
 // place-holders for Ki and Kd edits
247
 float raw_Ki, raw_Kd;
250
 float raw_Ki, raw_Kd;
248
 
251
 
252
+/**
253
+ * General function to go directly to a menu
254
+ */
249
 static void lcd_goto_menu(menuFunc_t menu, const bool feedback=false, const uint32_t encoder=0) {
255
 static void lcd_goto_menu(menuFunc_t menu, const bool feedback=false, const uint32_t encoder=0) {
250
   if (currentMenu != menu) {
256
   if (currentMenu != menu) {
251
     currentMenu = menu;
257
     currentMenu = menu;
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
 static void lcd_status_screen() {
276
 static void lcd_status_screen() {
265
 	encoderRateMultiplierEnabled = false;
277
 	encoderRateMultiplierEnabled = false;
266
 
278
 
371
   lcd_setstatus(MSG_PRINT_ABORTED, true);
383
   lcd_setstatus(MSG_PRINT_ABORTED, true);
372
 }
384
 }
373
 
385
 
374
-/* Menu implementation */
386
+/**
387
+ *
388
+ * "Main" menu
389
+ *
390
+ */
391
+
375
 static void lcd_main_menu() {
392
 static void lcd_main_menu() {
376
   START_MENU();
393
   START_MENU();
377
   MENU_ITEM(back, MSG_WATCH, lcd_status_screen);
394
   MENU_ITEM(back, MSG_WATCH, lcd_status_screen);
453
 
470
 
454
 #endif //BABYSTEPPING
471
 #endif //BABYSTEPPING
455
 
472
 
473
+/**
474
+ *
475
+ * "Tune" submenu
476
+ *
477
+ */
478
+
456
 static void lcd_tune_menu() {
479
 static void lcd_tune_menu() {
457
   START_MENU();
480
   START_MENU();
458
   MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
481
   MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
594
   lcd_return_to_status();
617
   lcd_return_to_status();
595
 }
618
 }
596
 
619
 
620
+/**
621
+ *
622
+ * "Prepare" submenu
623
+ *
624
+ */
625
+
597
 static void lcd_prepare_menu() {
626
 static void lcd_prepare_menu() {
598
   START_MENU();
627
   START_MENU();
628
+
629
+  //
630
+  // ^ Main
631
+  //
599
   MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
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
   MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
637
   MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
638
+
639
+  //
640
+  // Set Home Offsets
641
+  //
605
   MENU_ITEM(function, MSG_SET_HOME_OFFSETS, lcd_set_home_offsets);
642
   MENU_ITEM(function, MSG_SET_HOME_OFFSETS, lcd_set_home_offsets);
606
   //MENU_ITEM(gcode, MSG_SET_ORIGIN, PSTR("G92 X0 Y0 Z0"));
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
   #if TEMP_SENSOR_0 != 0
669
   #if TEMP_SENSOR_0 != 0
609
     #if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 || TEMP_SENSOR_BED != 0
670
     #if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 || TEMP_SENSOR_BED != 0
610
       MENU_ITEM(submenu, MSG_PREHEAT_PLA, lcd_preheat_pla_menu);
671
       MENU_ITEM(submenu, MSG_PREHEAT_PLA, lcd_preheat_pla_menu);
615
     #endif
676
     #endif
616
   #endif
677
   #endif
617
 
678
 
679
+  //
680
+  // Cooldown
681
+  //
618
   MENU_ITEM(function, MSG_COOLDOWN, lcd_cooldown);
682
   MENU_ITEM(function, MSG_COOLDOWN, lcd_cooldown);
619
 
683
 
684
+  //
685
+  // Switch power on/off
686
+  //
620
   #if HAS_POWER_SWITCH
687
   #if HAS_POWER_SWITCH
621
     if (powersupply)
688
     if (powersupply)
622
       MENU_ITEM(gcode, MSG_SWITCH_PS_OFF, PSTR("M81"));
689
       MENU_ITEM(gcode, MSG_SWITCH_PS_OFF, PSTR("M81"));
624
       MENU_ITEM(gcode, MSG_SWITCH_PS_ON, PSTR("M80"));
691
       MENU_ITEM(gcode, MSG_SWITCH_PS_ON, PSTR("M80"));
625
   #endif
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
   #endif
699
   #endif
632
-	
700
+
633
   END_MENU();
701
   END_MENU();
634
 }
702
 }
635
 
703
 
657
   #endif
725
   #endif
658
 }
726
 }
659
 
727
 
728
+/**
729
+ *
730
+ * "Prepare" > "Move Axis" submenu
731
+ *
732
+ */
733
+
660
 float move_menu_scale;
734
 float move_menu_scale;
661
 static void lcd_move_menu_axis();
735
 static void lcd_move_menu_axis();
662
 
736
 
687
   if (LCD_CLICKED) lcd_goto_menu(lcd_move_menu_axis);
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
 static void lcd_move_menu_axis() {
770
 static void lcd_move_menu_axis() {
691
   START_MENU();
771
   START_MENU();
692
   MENU_ITEM(back, MSG_MOVE_AXIS, lcd_move_menu);
772
   MENU_ITEM(back, MSG_MOVE_AXIS, lcd_move_menu);
712
   lcd_move_menu_axis();
792
   lcd_move_menu_axis();
713
 }
793
 }
714
 
794
 
795
+/**
796
+ *
797
+ * "Prepare" > "Move Axis" submenu
798
+ *
799
+ */
800
+
715
 static void lcd_move_menu() {
801
 static void lcd_move_menu() {
716
   START_MENU();
802
   START_MENU();
717
   MENU_ITEM(back, MSG_PREPARE, lcd_prepare_menu);
803
   MENU_ITEM(back, MSG_PREPARE, lcd_prepare_menu);
722
   END_MENU();
808
   END_MENU();
723
 }
809
 }
724
 
810
 
811
+/**
812
+ *
813
+ * "Control" submenu
814
+ *
815
+ */
816
+
725
 static void lcd_control_menu() {
817
 static void lcd_control_menu() {
726
   START_MENU();
818
   START_MENU();
727
   MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
819
   MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
744
   END_MENU();
836
   END_MENU();
745
 }
837
 }
746
 
838
 
839
+/**
840
+ *
841
+ * "Temperature" submenu
842
+ *
843
+ */
844
+
747
 #ifdef PIDTEMP
845
 #ifdef PIDTEMP
748
 
846
 
749
   // Helpers for editing PID Ki & Kd values
847
   // Helpers for editing PID Ki & Kd values
775
 
873
 
776
 #endif //PIDTEMP
874
 #endif //PIDTEMP
777
 
875
 
876
+/**
877
+ *
878
+ * "Control" > "Temperature" submenu
879
+ *
880
+ */
881
+
778
 static void lcd_control_temperature_menu() {
882
 static void lcd_control_temperature_menu() {
779
   START_MENU();
883
   START_MENU();
780
   MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
884
   MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
863
   END_MENU();
967
   END_MENU();
864
 }
968
 }
865
 
969
 
970
+/**
971
+ *
972
+ * "Temperature" > "Preheat PLA conf" submenu
973
+ *
974
+ */
975
+
866
 static void lcd_control_temperature_preheat_pla_settings_menu() {
976
 static void lcd_control_temperature_preheat_pla_settings_menu() {
867
   START_MENU();
977
   START_MENU();
868
   MENU_ITEM(back, MSG_TEMPERATURE, lcd_control_temperature_menu);
978
   MENU_ITEM(back, MSG_TEMPERATURE, lcd_control_temperature_menu);
879
   END_MENU();
989
   END_MENU();
880
 }
990
 }
881
 
991
 
992
+/**
993
+ *
994
+ * "Temperature" > "Preheat ABS conf" submenu
995
+ *
996
+ */
997
+
882
 static void lcd_control_temperature_preheat_abs_settings_menu() {
998
 static void lcd_control_temperature_preheat_abs_settings_menu() {
883
   START_MENU();
999
   START_MENU();
884
   MENU_ITEM(back, MSG_TEMPERATURE, lcd_control_temperature_menu);
1000
   MENU_ITEM(back, MSG_TEMPERATURE, lcd_control_temperature_menu);
895
   END_MENU();
1011
   END_MENU();
896
 }
1012
 }
897
 
1013
 
1014
+/**
1015
+ *
1016
+ * "Control" > "Motion" submenu
1017
+ *
1018
+ */
1019
+
898
 static void lcd_control_motion_menu() {
1020
 static void lcd_control_motion_menu() {
899
   START_MENU();
1021
   START_MENU();
900
   MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
1022
   MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
931
   END_MENU();
1053
   END_MENU();
932
 }
1054
 }
933
 
1055
 
1056
+/**
1057
+ *
1058
+ * "Control" > "Filament" submenu
1059
+ *
1060
+ */
1061
+
934
 static void lcd_control_volumetric_menu() {
1062
 static void lcd_control_volumetric_menu() {
935
   START_MENU();
1063
   START_MENU();
936
   MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
1064
   MENU_ITEM(back, MSG_CONTROL, lcd_control_menu);
953
   END_MENU();
1081
   END_MENU();
954
 }
1082
 }
955
 
1083
 
1084
+/**
1085
+ *
1086
+ * "Control" > "Contrast" submenu
1087
+ *
1088
+ */
1089
+
956
 #ifdef HAS_LCD_CONTRAST
1090
 #ifdef HAS_LCD_CONTRAST
957
   static void lcd_set_contrast() {
1091
   static void lcd_set_contrast() {
958
     if (encoderPosition != 0) {
1092
     if (encoderPosition != 0) {
967
   }
1101
   }
968
 #endif // HAS_LCD_CONTRAST
1102
 #endif // HAS_LCD_CONTRAST
969
 
1103
 
1104
+/**
1105
+ *
1106
+ * "Control" > "Retract" submenu
1107
+ *
1108
+ */
1109
+
970
 #ifdef FWRETRACT
1110
 #ifdef FWRETRACT
971
   static void lcd_control_retract_menu() {
1111
   static void lcd_control_retract_menu() {
972
     START_MENU();
1112
     START_MENU();
999
   currentMenuViewOffset = 0;
1139
   currentMenuViewOffset = 0;
1000
 }
1140
 }
1001
 
1141
 
1142
+/**
1143
+ *
1144
+ * "Print from SD" submenu
1145
+ *
1146
+ */
1147
+
1002
 void lcd_sdcard_menu() {
1148
 void lcd_sdcard_menu() {
1003
   if (lcdDrawUpdate == 0 && LCD_CLICKED == 0) return;	// nothing to do (so don't thrash the SD card)
1149
   if (lcdDrawUpdate == 0 && LCD_CLICKED == 0) return;	// nothing to do (so don't thrash the SD card)
1004
   uint16_t fileCnt = card.getnrfilenames();
1150
   uint16_t fileCnt = card.getnrfilenames();
1034
   END_MENU();
1180
   END_MENU();
1035
 }
1181
 }
1036
 
1182
 
1183
+/**
1184
+ *
1185
+ * Functions for editing single values
1186
+ *
1187
+ */
1037
 #define menu_edit_type(_type, _name, _strFunc, scale) \
1188
 #define menu_edit_type(_type, _name, _strFunc, scale) \
1038
   bool _menu_edit_ ## _name () { \
1189
   bool _menu_edit_ ## _name () { \
1039
     bool isClicked = LCD_CLICKED; \
1190
     bool isClicked = LCD_CLICKED; \
1080
 menu_edit_type(float, float52, ftostr52, 100)
1231
 menu_edit_type(float, float52, ftostr52, 100)
1081
 menu_edit_type(unsigned long, long5, ftostr5, 0.01)
1232
 menu_edit_type(unsigned long, long5, ftostr5, 0.01)
1082
 
1233
 
1234
+/**
1235
+ *
1236
+ * Handlers for RepRap World Keypad input
1237
+ *
1238
+ */
1083
 #ifdef REPRAPWORLD_KEYPAD
1239
 #ifdef REPRAPWORLD_KEYPAD
1084
   static void reprapworld_keypad_move_z_up() {
1240
   static void reprapworld_keypad_move_z_up() {
1085
     encoderPosition = 1;
1241
     encoderPosition = 1;
1114
   static void reprapworld_keypad_move_home() {
1270
   static void reprapworld_keypad_move_home() {
1115
     enqueuecommands_P((PSTR("G28"))); // move all axis home
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
 void lcd_quick_feedback() {
1281
 void lcd_quick_feedback() {
1122
   lcdDrawUpdate = 2;
1282
   lcdDrawUpdate = 2;
1123
   next_button_update_ms = millis() + 500;
1283
   next_button_update_ms = millis() + 500;
1146
   #endif
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
 static void menu_action_gcode(const char* pgcode) { enqueuecommands_P(pgcode); }
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
 static void menu_action_sdfile(const char* filename, char* longFilename) {
1318
 static void menu_action_sdfile(const char* filename, char* longFilename) {
1155
   char cmd[30];
1319
   char cmd[30];
1156
   char* c;
1320
   char* c;
1243
   return j;
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
 void lcd_update() {
1423
 void lcd_update() {
1247
   #ifdef ULTIPANEL
1424
   #ifdef ULTIPANEL
1248
     static millis_t return_to_status_ms = 0;
1425
     static millis_t return_to_status_ms = 0;
1381
 
1558
 
1382
     if (lcdDrawUpdate == 2) lcd_implementation_clear();
1559
     if (lcdDrawUpdate == 2) lcd_implementation_clear();
1383
     if (lcdDrawUpdate) lcdDrawUpdate--;
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
 
1631
 
1455
 #ifdef ULTIPANEL
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
       WRITE(SHIFT_LD, LOW);
1677
       WRITE(SHIFT_LD, LOW);
1485
       WRITE(SHIFT_LD, HIGH);
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
         WRITE(SHIFT_CLK, HIGH);
1683
         WRITE(SHIFT_CLK, HIGH);
1490
         WRITE(SHIFT_CLK, LOW);
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
     #else
1719
     #else
1552
-      delay(duration);
1720
+      return true;
1553
     #endif
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
 /** Number to string conversion **/
1746
 /** Number to string conversion **/
1621
 }
1802
 }
1622
 
1803
 
1623
 // Convert float to string with 1.234 format
1804
 // Convert float to string with 1.234 format
1624
-char *ftostr43(const float &x)
1625
-{
1805
+char *ftostr43(const float &x) {
1626
 	long xx = x * 1000;
1806
 	long xx = x * 1000;
1627
     if (xx >= 0)
1807
     if (xx >= 0)
1628
 		conv[0] = (xx / 1000) % 10 + '0';
1808
 		conv[0] = (xx / 1000) % 10 + '0';
1638
 }
1818
 }
1639
 
1819
 
1640
 // Convert float to string with 1.23 format
1820
 // Convert float to string with 1.23 format
1641
-char *ftostr12ns(const float &x)
1642
-{
1821
+char *ftostr12ns(const float &x) {
1643
   long xx=x*100;
1822
   long xx=x*100;
1644
   
1823
   
1645
   xx=abs(xx);
1824
   xx=abs(xx);
1799
 #ifdef MANUAL_BED_LEVELING
1978
 #ifdef MANUAL_BED_LEVELING
1800
 
1979
 
1801
   static int _lcd_level_bed_position;
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
   static void _lcd_level_bed() {
1987
   static void _lcd_level_bed() {
1803
     if (encoderPosition != 0) {
1988
     if (encoderPosition != 0) {
1804
       refresh_cmd_timeout();
1989
       refresh_cmd_timeout();
1844
     }
2029
     }
1845
   }
2030
   }
1846
 
2031
 
2032
+  /**
2033
+   * MBL Move to mesh starting point
2034
+   */
1847
   static void _lcd_level_bed_homing() {
2035
   static void _lcd_level_bed_homing() {
1848
     if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR("XYZ"), "Homing");
2036
     if (lcdDrawUpdate) lcd_implementation_drawedit(PSTR("XYZ"), "Homing");
1849
     if (axis_known_position[X_AXIS] && axis_known_position[Y_AXIS] && axis_known_position[Z_AXIS]) {
2037
     if (axis_known_position[X_AXIS] && axis_known_position[Y_AXIS] && axis_known_position[Z_AXIS]) {
1858
     lcdDrawUpdate = 2;
2046
     lcdDrawUpdate = 2;
1859
   }
2047
   }
1860
 
2048
 
2049
+  /**
2050
+   * MBL entry-point
2051
+   */
1861
   static void lcd_level_bed() {
2052
   static void lcd_level_bed() {
1862
     axis_known_position[X_AXIS] = axis_known_position[Y_AXIS] = axis_known_position[Z_AXIS] = false;
2053
     axis_known_position[X_AXIS] = axis_known_position[Y_AXIS] = axis_known_position[Z_AXIS] = false;
1863
     mbl.reset();
2054
     mbl.reset();

+ 7
- 7
Marlin/ultralcd_st7920_u8glib_rrd.h View File

16
 //#define PAGE_HEIGHT 16  //256 byte framebuffer
16
 //#define PAGE_HEIGHT 16  //256 byte framebuffer
17
 #define PAGE_HEIGHT 32  //512 byte framebuffer
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
 #include <U8glib.h>
22
 #include <U8glib.h>
23
 
23
 
64
         ST7920_WRITE_BYTE(0x01);       //clear CGRAM ram
64
         ST7920_WRITE_BYTE(0x01);       //clear CGRAM ram
65
         u8g_Delay(15);                 //delay for CGRAM clear
65
         u8g_Delay(15);                 //delay for CGRAM clear
66
         ST7920_WRITE_BYTE(0x3E);       //extended mode + GDRAM active
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
           ST7920_WRITE_BYTE(0x80|y);   //set y
69
           ST7920_WRITE_BYTE(0x80|y);   //set y
70
           ST7920_WRITE_BYTE(0x80);     //set x = 0
70
           ST7920_WRITE_BYTE(0x80);     //set x = 0
71
           ST7920_SET_DAT();
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
             ST7920_WRITE_BYTE(0);
73
             ST7920_WRITE_BYTE(0);
74
           ST7920_SET_CMD();
74
           ST7920_SET_CMD();
75
         }
75
         }
103
           }
103
           }
104
 
104
 
105
           ST7920_SET_DAT();
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
           y++;
107
           y++;
108
         }
108
         }
109
         ST7920_NCS();
109
         ST7920_NCS();
119
 #endif
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
 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};
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
 class U8GLIB_ST7920_128X64_RRD : public U8GLIB
126
 class U8GLIB_ST7920_128X64_RRD : public U8GLIB

Loading…
Cancel
Save