summaryrefslogtreecommitdiff
path: root/apps/screens.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/screens.c')
-rw-r--r--apps/screens.c69
1 files changed, 33 insertions, 36 deletions
diff --git a/apps/screens.c b/apps/screens.c
index 8c90f02707..494acd7e0b 100644
--- a/apps/screens.c
+++ b/apps/screens.c
@@ -95,9 +95,9 @@ void usb_display_info(void)
95 95
96#ifdef HAVE_LCD_BITMAP 96#ifdef HAVE_LCD_BITMAP
97 /* Center bitmap on screen */ 97 /* Center bitmap on screen */
98 lcd_bitmap(usb_logo, LCD_WIDTH/2-BMPWIDTH_usb_logo/2, 98 lcd_mono_bitmap(usb_logo, LCD_WIDTH/2-BMPWIDTH_usb_logo/2,
99 LCD_HEIGHT/2-BMPHEIGHT_usb_logo/2, BMPWIDTH_usb_logo, 99 LCD_HEIGHT/2-BMPHEIGHT_usb_logo/2, BMPWIDTH_usb_logo,
100 BMPHEIGHT_usb_logo); 100 BMPHEIGHT_usb_logo);
101 status_draw(true); 101 status_draw(true);
102 lcd_update(); 102 lcd_update();
103#else 103#else
@@ -234,15 +234,15 @@ void charging_display_info(bool animate)
234 if (!animate) 234 if (!animate)
235 { /* draw the outline */ 235 { /* draw the outline */
236 /* middle part */ 236 /* middle part */
237 lcd_bitmap(charging_logo, pox_x, pox_y + 8, sizeof(charging_logo), 8); 237 lcd_mono_bitmap(charging_logo, pox_x, pox_y + 8, sizeof(charging_logo), 8);
238 lcd_set_drawmode(DRMODE_FG); 238 lcd_set_drawmode(DRMODE_FG);
239 /* upper line */ 239 /* upper line */
240 charging_logo[0] = charging_logo[1] = 0x00; 240 charging_logo[0] = charging_logo[1] = 0x00;
241 memset(charging_logo+2, 0x80, 34); 241 memset(charging_logo+2, 0x80, 34);
242 lcd_bitmap(charging_logo, pox_x, pox_y, sizeof(charging_logo), 8); 242 lcd_mono_bitmap(charging_logo, pox_x, pox_y, sizeof(charging_logo), 8);
243 /* lower line */ 243 /* lower line */
244 memset(charging_logo+2, 0x01, 34); 244 memset(charging_logo+2, 0x01, 34);
245 lcd_bitmap(charging_logo, pox_x, pox_y + 16, sizeof(charging_logo), 8); 245 lcd_mono_bitmap(charging_logo, pox_x, pox_y + 16, sizeof(charging_logo), 8);
246 lcd_set_drawmode(DRMODE_SOLID); 246 lcd_set_drawmode(DRMODE_SOLID);
247 } 247 }
248 else 248 else
@@ -258,7 +258,7 @@ void charging_display_info(bool animate)
258 charging_logo[i] = 0x01 << bitpos; 258 charging_logo[i] = 0x01 << bitpos;
259 } 259 }
260 } 260 }
261 lcd_bitmap(charging_logo, pox_x, pox_y + 8, sizeof(charging_logo), 8); 261 lcd_mono_bitmap(charging_logo, pox_x, pox_y + 8, sizeof(charging_logo), 8);
262 phase++; 262 phase++;
263 } 263 }
264 lcd_update(); 264 lcd_update();
@@ -415,8 +415,8 @@ int pitch_screen(void)
415 ptr = str(LANG_PITCH_UP); 415 ptr = str(LANG_PITCH_UP);
416 lcd_getstringsize(ptr,&w,&h); 416 lcd_getstringsize(ptr,&w,&h);
417 lcd_putsxy((LCD_WIDTH-w)/2, 0, ptr); 417 lcd_putsxy((LCD_WIDTH-w)/2, 0, ptr);
418 lcd_bitmap(bitmap_icons_7x8[Icon_UpArrow], 418 lcd_mono_bitmap(bitmap_icons_7x8[Icon_UpArrow],
419 LCD_WIDTH/2 - 3, h*2, 7, 8); 419 LCD_WIDTH/2 - 3, h*2, 7, 8);
420 420
421 snprintf(buf, sizeof buf, "%d.%d%%", pitch / 10, pitch % 10 ); 421 snprintf(buf, sizeof buf, "%d.%d%%", pitch / 10, pitch % 10 );
422 lcd_getstringsize(buf,&w,&h); 422 lcd_getstringsize(buf,&w,&h);
@@ -425,14 +425,14 @@ int pitch_screen(void)
425 ptr = str(LANG_PITCH_DOWN); 425 ptr = str(LANG_PITCH_DOWN);
426 lcd_getstringsize(ptr,&w,&h); 426 lcd_getstringsize(ptr,&w,&h);
427 lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h, ptr); 427 lcd_putsxy((LCD_WIDTH-w)/2, LCD_HEIGHT - h, ptr);
428 lcd_bitmap(bitmap_icons_7x8[Icon_DownArrow], 428 lcd_mono_bitmap(bitmap_icons_7x8[Icon_DownArrow],
429 LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8); 429 LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8);
430 430
431 ptr = str(LANG_PAUSE); 431 ptr = str(LANG_PAUSE);
432 lcd_getstringsize(ptr,&w,&h); 432 lcd_getstringsize(ptr,&w,&h);
433 lcd_putsxy((LCD_WIDTH-(w/2))/2, LCD_HEIGHT/2 - h/2, ptr); 433 lcd_putsxy((LCD_WIDTH-(w/2))/2, LCD_HEIGHT/2 - h/2, ptr);
434 lcd_bitmap(bitmap_icons_7x8[Icon_Pause], 434 lcd_mono_bitmap(bitmap_icons_7x8[Icon_Pause],
435 (LCD_WIDTH-(w/2))/2-10, LCD_HEIGHT/2 - h/2, 7, 8); 435 (LCD_WIDTH-(w/2))/2-10, LCD_HEIGHT/2 - h/2, 7, 8);
436 436
437 lcd_update(); 437 lcd_update();
438 } 438 }
@@ -637,12 +637,12 @@ bool quick_screen(int context, int button)
637#endif 637#endif
638 } 638 }
639 639
640 lcd_bitmap(bitmap_icons_7x8[Icon_FastBackward], 640 lcd_mono_bitmap(bitmap_icons_7x8[Icon_FastBackward],
641 LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8); 641 LCD_WIDTH/2 - 16, LCD_HEIGHT/2 - 4, 7, 8);
642 lcd_bitmap(bitmap_icons_7x8[Icon_DownArrow], 642 lcd_mono_bitmap(bitmap_icons_7x8[Icon_DownArrow],
643 LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8); 643 LCD_WIDTH/2 - 3, LCD_HEIGHT - h*3, 7, 8);
644 lcd_bitmap(bitmap_icons_7x8[Icon_FastForward], 644 lcd_mono_bitmap(bitmap_icons_7x8[Icon_FastForward],
645 LCD_WIDTH/2 + 8, LCD_HEIGHT/2 - 4, 7, 8); 645 LCD_WIDTH/2 + 8, LCD_HEIGHT/2 - 4, 7, 8);
646 646
647 lcd_update(); 647 lcd_update();
648 key = button_get(true); 648 key = button_get(true);
@@ -862,24 +862,18 @@ void splash(int ticks, /* how long the splash is displayed */
862 } 862 }
863 863
864#ifdef HAVE_LCD_BITMAP 864#ifdef HAVE_LCD_BITMAP
865 /* If we center the display and it wouldn't cover the full screen, 865 /* If we center the display, then just clear the box we need and put
866 then just clear the box we need and put a nice little frame and 866 a nice little frame and put the text in there! */
867 put the text in there! */
868 if(center && (y > 2)) { 867 if(center && (y > 2)) {
869 if(maxw < (LCD_WIDTH -4)) { 868 int xx = (LCD_WIDTH-maxw)/2 - 2;
870 int xx = (LCD_WIDTH-maxw)/2 - 2; 869 /* The new graphics routines handle clipping, so no need to check */
871 lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); 870#if LCD_DEPTH > 1
872 lcd_fillrect(xx, y-2, maxw+4, LCD_HEIGHT-y*2+4); 871 lcd_set_background(MAX_LEVEL-1);
873 lcd_set_drawmode(DRMODE_SOLID); 872#endif
874 lcd_drawrect(xx, y-2, maxw+4, LCD_HEIGHT-y*2+4); 873 lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
875 } 874 lcd_fillrect(xx, y-2, maxw+4, LCD_HEIGHT-y*2+4);
876 else { 875 lcd_set_drawmode(DRMODE_SOLID);
877 lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); 876 lcd_drawrect(xx, y-2, maxw+4, LCD_HEIGHT-y*2+4);
878 lcd_fillrect(0, y-2, LCD_WIDTH, LCD_HEIGHT-y*2+4);
879 lcd_set_drawmode(DRMODE_SOLID);
880 lcd_hline(0, LCD_WIDTH-1, y-2);
881 lcd_hline(0, LCD_WIDTH-1, LCD_HEIGHT-y+2);
882 }
883 } 877 }
884 else 878 else
885#endif 879#endif
@@ -921,6 +915,9 @@ void splash(int ticks, /* how long the splash is displayed */
921 x += w+SPACE; /* pixels space! */ 915 x += w+SPACE; /* pixels space! */
922 next = strtok_r(NULL, " ", &store); 916 next = strtok_r(NULL, " ", &store);
923 } 917 }
918#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH > 1)
919 lcd_set_background(MAX_LEVEL);
920#endif
924 lcd_update(); 921 lcd_update();
925 922
926 if(ticks) 923 if(ticks)