Browse Source

Small code tweaks re lcd.print

Scott Lahteine 10 years ago
parent
commit
7279e4f82f
1 changed files with 7 additions and 7 deletions
  1. 7
    7
      Marlin/dogm_lcd_implementation.h

+ 7
- 7
Marlin/dogm_lcd_implementation.h View File

139
       u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT*3/2, STRING_SPLASH_LINE1);
139
       u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT*3/2, STRING_SPLASH_LINE1);
140
       u8g.drawStr(txt2X, u8g.getHeight() - DOG_CHAR_HEIGHT*1/2, STRING_SPLASH_LINE2);
140
       u8g.drawStr(txt2X, u8g.getHeight() - DOG_CHAR_HEIGHT*1/2, STRING_SPLASH_LINE2);
141
     #endif
141
     #endif
142
-	} while(u8g.nextPage());
142
+	} while (u8g.nextPage());
143
 }
143
 }
144
 
144
 
145
 static void lcd_implementation_clear() { } // Automatically cleared by Picture Loop
145
 static void lcd_implementation_clear() { } // Automatically cleared by Picture Loop
222
     int per = ((fanSpeed + 1) * 100) / 256;
222
     int per = ((fanSpeed + 1) * 100) / 256;
223
     if (per) {
223
     if (per) {
224
       u8g.print(itostr3(per));
224
       u8g.print(itostr3(per));
225
-      u8g.print("%");
225
+      u8g.print('%');
226
     }
226
     }
227
     else
227
     else
228
   #endif
228
   #endif
235
   u8g.drawBox(0,29,128,10);
235
   u8g.drawBox(0,29,128,10);
236
   u8g.setColorIndex(0); // white on black
236
   u8g.setColorIndex(0); // white on black
237
   u8g.setPrintPos(2,37);
237
   u8g.setPrintPos(2,37);
238
-  u8g.print("X");
238
+  u8g.print('X');
239
   u8g.drawPixel(8,33);
239
   u8g.drawPixel(8,33);
240
   u8g.drawPixel(8,35);
240
   u8g.drawPixel(8,35);
241
   u8g.setPrintPos(10,37);
241
   u8g.setPrintPos(10,37);
247
   u8g.setPrintPos(51,37);
247
   u8g.setPrintPos(51,37);
248
   u8g.print(ftostr31ns(current_position[Y_AXIS]));
248
   u8g.print(ftostr31ns(current_position[Y_AXIS]));
249
   u8g.setPrintPos(83,37);
249
   u8g.setPrintPos(83,37);
250
-  u8g.print("Z");
250
+  u8g.print('Z');
251
   u8g.drawPixel(89,33);
251
   u8g.drawPixel(89,33);
252
   u8g.drawPixel(89,35);
252
   u8g.drawPixel(89,35);
253
   u8g.setPrintPos(91,37);
253
   u8g.setPrintPos(91,37);
285
 static void lcd_implementation_mark_as_selected(uint8_t row, bool isSelected) {
285
 static void lcd_implementation_mark_as_selected(uint8_t row, bool isSelected) {
286
   if (isSelected) {
286
   if (isSelected) {
287
     u8g.setColorIndex(1);  // black on white
287
     u8g.setColorIndex(1);  // black on white
288
-    u8g.drawBox (0, row*DOG_CHAR_HEIGHT + 3, 128, DOG_CHAR_HEIGHT);
288
+    u8g.drawBox(0, row * DOG_CHAR_HEIGHT + 3, 128, DOG_CHAR_HEIGHT);
289
     u8g.setColorIndex(0);  // following text must be white on black
289
     u8g.setColorIndex(0);  // following text must be white on black
290
   }
290
   }
291
   else {
291
   else {
322
     n--;
322
     n--;
323
   }
323
   }
324
   u8g.print(':');
324
   u8g.print(':');
325
-  while(n--) u8g.print(' ');
325
+  while (n--) u8g.print(' ');
326
   if (pgm) { lcd_printPGM(data); } else { u8g.print(data); }
326
   if (pgm) { lcd_printPGM(data); } else { u8g.print(data); }
327
 }
327
 }
328
 
328
 
396
     filename++;
396
     filename++;
397
     n--;
397
     n--;
398
   }
398
   }
399
-  while(n--) u8g.print(' ');
399
+  while (n--) u8g.print(' ');
400
 }
400
 }
401
 
401
 
402
 #define lcd_implementation_drawmenu_sdfile(sel, row, pstr, filename, longFilename) _drawmenu_sd(sel, row, pstr, filename, longFilename, false)
402
 #define lcd_implementation_drawmenu_sdfile(sel, row, pstr, filename, longFilename) _drawmenu_sd(sel, row, pstr, filename, longFilename, false)

Loading…
Cancel
Save