Pārlūkot izejas kodu

Merge pull request #1868 from AnHardt/LCD_STR

Moved the definitions of the LCD_STR_* to Conditionals.h
Scott Lahteine 10 gadus atpakaļ
vecāks
revīzija
a00ebf03d4

+ 36
- 7
Marlin/Conditionals.h Parādīt failu

143
     #endif
143
     #endif
144
   #else //no panel but just LCD
144
   #else //no panel but just LCD
145
     #ifdef ULTRA_LCD
145
     #ifdef ULTRA_LCD
146
-    #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
147
-      #define LCD_WIDTH 22
148
-      #define LCD_HEIGHT 5
149
-    #else
150
-      #define LCD_WIDTH 16
151
-      #define LCD_HEIGHT 2
152
-    #endif
146
+      #ifdef DOGLCD // Change number of lines to match the 128x64 graphics display
147
+        #define LCD_WIDTH 22
148
+        #define LCD_HEIGHT 5
149
+      #else
150
+        #define LCD_WIDTH 16
151
+        #define LCD_HEIGHT 2
152
+      #endif
153
     #endif
153
     #endif
154
   #endif
154
   #endif
155
 
155
 
156
+  #ifdef DOGLCD
157
+    /* Custom characters defined in font font_6x10_marlin_symbols */
158
+    // \x00 intentionally skipped to avoid problems in strings
159
+    #define LCD_STR_REFRESH     "\x01"
160
+    #define LCD_STR_FOLDER      "\x02"
161
+    #define LCD_STR_ARROW_RIGHT "\x03"
162
+    #define LCD_STR_UPLEVEL     "\x04"
163
+    #define LCD_STR_CLOCK       "\x05"
164
+    #define LCD_STR_FEEDRATE    "\x06"
165
+    #define LCD_STR_BEDTEMP     "\x07"
166
+    #define LCD_STR_THERMOMETER "\x08"
167
+    #define LCD_STR_DEGREE      "\x09"
168
+
169
+    #define LCD_STR_SPECIAL_MAX '\x09'
170
+    // Maximum here is 0x1f because 0x20 is ' ' (space) and the normal charsets begin.
171
+    // Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here.
172
+  #else
173
+    /* Custom characters defined in the first 8 characters of the LCD */
174
+    #define LCD_STR_BEDTEMP     "\x00"  // this will have 'unexpected' results when used in a string!
175
+    #define LCD_STR_DEGREE      "\x01"
176
+    #define LCD_STR_THERMOMETER "\x02"
177
+    #define LCD_STR_UPLEVEL     "\x03"
178
+    #define LCD_STR_REFRESH     "\x04"
179
+    #define LCD_STR_FOLDER      "\x05"
180
+    #define LCD_STR_FEEDRATE    "\x06"
181
+    #define LCD_STR_CLOCK       "\x07"
182
+    #define LCD_STR_ARROW_RIGHT ">"  /* from the default character set */
183
+  #endif
184
+
156
   /**
185
   /**
157
    * Default LCD contrast for dogm-like LCD displays
186
    * Default LCD contrast for dogm-like LCD displays
158
    */
187
    */

+ 8
- 8
Marlin/Marlin_main.cpp Parādīt failu

1365
     #endif
1365
     #endif
1366
 
1366
 
1367
     if (verbose_level > 2) {
1367
     if (verbose_level > 2) {
1368
-      SERIAL_PROTOCOLPGM(MSG_BED);
1368
+      SERIAL_PROTOCOLPGM("Bed");
1369
       SERIAL_PROTOCOLPGM(" X: ");
1369
       SERIAL_PROTOCOLPGM(" X: ");
1370
       SERIAL_PROTOCOL_F(x, 3);
1370
       SERIAL_PROTOCOL_F(x, 3);
1371
       SERIAL_PROTOCOLPGM(" Y: ");
1371
       SERIAL_PROTOCOLPGM(" Y: ");
2514
       feedrate = homing_feedrate[Z_AXIS];
2514
       feedrate = homing_feedrate[Z_AXIS];
2515
 
2515
 
2516
       run_z_probe();
2516
       run_z_probe();
2517
-      SERIAL_PROTOCOLPGM(MSG_BED);
2517
+      SERIAL_PROTOCOLPGM("Bed");
2518
       SERIAL_PROTOCOLPGM(" X: ");
2518
       SERIAL_PROTOCOLPGM(" X: ");
2519
       SERIAL_PROTOCOL(current_position[X_AXIS] + 0.0001);
2519
       SERIAL_PROTOCOL(current_position[X_AXIS] + 0.0001);
2520
       SERIAL_PROTOCOLPGM(" Y: ");
2520
       SERIAL_PROTOCOLPGM(" Y: ");
2852
   inline void gcode_M48() {
2852
   inline void gcode_M48() {
2853
 
2853
 
2854
     double sum = 0.0, mean = 0.0, sigma = 0.0, sample_set[50];
2854
     double sum = 0.0, mean = 0.0, sigma = 0.0, sample_set[50];
2855
-    int verbose_level = 1, n_samples = 10, n_legs = 0;
2856
-    
2855
+    uint8_t verbose_level = 1, n_samples = 10, n_legs = 0;
2856
+
2857
     if (code_seen('V') || code_seen('v')) {
2857
     if (code_seen('V') || code_seen('v')) {
2858
       verbose_level = code_value_short();
2858
       verbose_level = code_value_short();
2859
       if (verbose_level < 0 || verbose_level > 4 ) {
2859
       if (verbose_level < 0 || verbose_level > 4 ) {
2960
 
2960
 
2961
     if (deploy_probe_for_each_reading) stow_z_probe();
2961
     if (deploy_probe_for_each_reading) stow_z_probe();
2962
 
2962
 
2963
-    for (uint16_t n=0; n < n_samples; n++) {
2963
+    for (uint8_t n=0; n < n_samples; n++) {
2964
 
2964
 
2965
       do_blocking_move_to(X_probe_location, Y_probe_location, Z_start_location); // Make sure we are at the probe location
2965
       do_blocking_move_to(X_probe_location, Y_probe_location, Z_start_location); // Make sure we are at the probe location
2966
 
2966
 
2975
         //SERIAL_ECHOPAIR("   direction: ",dir);
2975
         //SERIAL_ECHOPAIR("   direction: ",dir);
2976
         //SERIAL_EOL;
2976
         //SERIAL_EOL;
2977
 
2977
 
2978
-        for (int l = 0; l < n_legs - 1; l++) {
2978
+        for (uint8_t l = 0; l < n_legs - 1; l++) {
2979
           ms = millis();
2979
           ms = millis();
2980
           theta += RADIANS(dir * (ms % 20L));
2980
           theta += RADIANS(dir * (ms % 20L));
2981
           radius += (ms % 10L) - 5L;
2981
           radius += (ms % 10L) - 5L;
3014
       // Get the current mean for the data points we have so far
3014
       // Get the current mean for the data points we have so far
3015
       //
3015
       //
3016
       sum = 0.0;
3016
       sum = 0.0;
3017
-      for (int j = 0; j <= n; j++) sum += sample_set[j];
3017
+      for (uint8_t j = 0; j <= n; j++) sum += sample_set[j];
3018
       mean = sum / (n + 1);
3018
       mean = sum / (n + 1);
3019
 
3019
 
3020
       //
3020
       //
3022
       // data points we have so far
3022
       // data points we have so far
3023
       //
3023
       //
3024
       sum = 0.0;
3024
       sum = 0.0;
3025
-      for (int j = 0; j <= n; j++) {
3025
+      for (uint8_t j = 0; j <= n; j++) {
3026
         float ss = sample_set[j] - mean;
3026
         float ss = sample_set[j] - mean;
3027
         sum += ss * ss;
3027
         sum += ss * ss;
3028
       }
3028
       }

+ 0
- 16
Marlin/dogm_lcd_implementation.h Parādīt failu

108
 
108
 
109
 #define START_ROW              0
109
 #define START_ROW              0
110
 
110
 
111
-/* Custom characters defined in font font_6x10_marlin_symbols */
112
-// \x00 intentionally skipped to avoid problems in strings
113
-#define LCD_STR_REFRESH     "\x01"
114
-#define LCD_STR_FOLDER      "\x02"
115
-#define LCD_STR_ARROW_RIGHT "\x03"
116
-#define LCD_STR_UPLEVEL     "\x04"
117
-#define LCD_STR_CLOCK       "\x05"
118
-#define LCD_STR_FEEDRATE    "\x06"
119
-#define LCD_STR_BEDTEMP     "\x07"
120
-#define LCD_STR_THERMOMETER "\x08"
121
-#define LCD_STR_DEGREE      "\x09"
122
-
123
-#define LCD_STR_SPECIAL_MAX '\x09'
124
-// Maximum here is 0x1f because 0x20 is ' ' (space) and the normal charsets begin.
125
-// Better stay below 0x10 because DISPLAY_CHARSET_HD44780_WESTERN begins here.
126
-
127
 // LCD selection
111
 // LCD selection
128
 #ifdef U8GLIB_ST7920
112
 #ifdef U8GLIB_ST7920
129
   //U8GLIB_ST7920_128X64_RRD u8g(0,0,0);
113
   //U8GLIB_ST7920_128X64_RRD u8g(0,0,0);

+ 0
- 12
Marlin/ultralcd_implementation_hitachi_HD44780.h Parādīt failu

201
   #define LCD_STR_PROGRESS  "\x03\x04\x05"
201
   #define LCD_STR_PROGRESS  "\x03\x04\x05"
202
 #endif
202
 #endif
203
 
203
 
204
-/* Custom characters defined in the first 8 characters of the LCD */
205
-#define LCD_STR_BEDTEMP     "\x00"  // this will have 'unexpected' results when used in a string!
206
-#define LCD_STR_DEGREE      "\x01"
207
-#define LCD_STR_THERMOMETER "\x02"
208
-#define LCD_STR_UPLEVEL     "\x03"
209
-#define LCD_STR_REFRESH     "\x04"
210
-#define LCD_STR_FOLDER      "\x05"
211
-#define LCD_STR_FEEDRATE    "\x06"
212
-#define LCD_STR_CLOCK       "\x07"
213
-//#define LCD_STR_ARROW_RIGHT "\x7E"  /* from the default character set. Only available on DISPLAY_CHARSET_HD44780_JAPAN - at this place!*/
214
-#define LCD_STR_ARROW_RIGHT ">"  /* from the default character set */
215
-
216
 static void lcd_set_custom_characters(
204
 static void lcd_set_custom_characters(
217
   #ifdef LCD_PROGRESS_BAR
205
   #ifdef LCD_PROGRESS_BAR
218
     bool progress_bar_set=true
206
     bool progress_bar_set=true

Notiek ielāde…
Atcelt
Saglabāt