diff options
Diffstat (limited to 'apps/plugins')
-rwxr-xr-x | apps/plugins/bitmaps/mono/clock_logo.112x64x1.bmp | bin | 0 -> 654 bytes | |||
-rwxr-xr-x | apps/plugins/bitmaps/mono/clock_logo.128x128x1.bmp | bin | 0 -> 974 bytes | |||
-rwxr-xr-x | apps/plugins/bitmaps/mono/clock_logo.138x110x1.bmp | bin | 0 -> 1282 bytes | |||
-rwxr-xr-x | apps/plugins/bitmaps/mono/clock_logo.160x128x1.bmp | bin | 0 -> 1482 bytes | |||
-rwxr-xr-x | apps/plugins/bitmaps/mono/clock_logo.176x132x1.bmp | bin | 0 -> 1934 bytes | |||
-rwxr-xr-x | apps/plugins/bitmaps/mono/clock_logo.220x176x1.bmp | bin | 0 -> 2918 bytes | |||
-rwxr-xr-x | apps/plugins/bitmaps/mono/clock_logo.240x320x1.bmp | bin | 0 -> 3454 bytes | |||
-rwxr-xr-x | apps/plugins/bitmaps/mono/clock_logo.320x240x1.bmp | bin | 0 -> 5742 bytes | |||
-rw-r--r-- | apps/plugins/clock.c | 306 |
9 files changed, 149 insertions, 157 deletions
diff --git a/apps/plugins/bitmaps/mono/clock_logo.112x64x1.bmp b/apps/plugins/bitmaps/mono/clock_logo.112x64x1.bmp new file mode 100755 index 0000000000..c56f831865 --- /dev/null +++ b/apps/plugins/bitmaps/mono/clock_logo.112x64x1.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/mono/clock_logo.128x128x1.bmp b/apps/plugins/bitmaps/mono/clock_logo.128x128x1.bmp new file mode 100755 index 0000000000..6dc02aa564 --- /dev/null +++ b/apps/plugins/bitmaps/mono/clock_logo.128x128x1.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/mono/clock_logo.138x110x1.bmp b/apps/plugins/bitmaps/mono/clock_logo.138x110x1.bmp new file mode 100755 index 0000000000..95abdbf24b --- /dev/null +++ b/apps/plugins/bitmaps/mono/clock_logo.138x110x1.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/mono/clock_logo.160x128x1.bmp b/apps/plugins/bitmaps/mono/clock_logo.160x128x1.bmp new file mode 100755 index 0000000000..90c58aae40 --- /dev/null +++ b/apps/plugins/bitmaps/mono/clock_logo.160x128x1.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/mono/clock_logo.176x132x1.bmp b/apps/plugins/bitmaps/mono/clock_logo.176x132x1.bmp new file mode 100755 index 0000000000..9d706be246 --- /dev/null +++ b/apps/plugins/bitmaps/mono/clock_logo.176x132x1.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/mono/clock_logo.220x176x1.bmp b/apps/plugins/bitmaps/mono/clock_logo.220x176x1.bmp new file mode 100755 index 0000000000..6a7861a642 --- /dev/null +++ b/apps/plugins/bitmaps/mono/clock_logo.220x176x1.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/mono/clock_logo.240x320x1.bmp b/apps/plugins/bitmaps/mono/clock_logo.240x320x1.bmp new file mode 100755 index 0000000000..e98530a201 --- /dev/null +++ b/apps/plugins/bitmaps/mono/clock_logo.240x320x1.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/bitmaps/mono/clock_logo.320x240x1.bmp b/apps/plugins/bitmaps/mono/clock_logo.320x240x1.bmp new file mode 100755 index 0000000000..960aa320f4 --- /dev/null +++ b/apps/plugins/bitmaps/mono/clock_logo.320x240x1.bmp | |||
Binary files differ | |||
diff --git a/apps/plugins/clock.c b/apps/plugins/clock.c index 2bf6a59da3..eb2c898aa0 100644 --- a/apps/plugins/clock.c +++ b/apps/plugins/clock.c | |||
@@ -20,6 +20,10 @@ | |||
20 | /***************************** | 20 | /***************************** |
21 | * RELEASE NOTES | 21 | * RELEASE NOTES |
22 | 22 | ||
23 | ***** VERSION 3.10 ** | ||
24 | Drawing now scales for the display - still needs updated bitmaps for the binary | ||
25 | and plain mode. The Time's Up logo could also be updated. | ||
26 | |||
23 | ***** VERSION 3.00 ** | 27 | ***** VERSION 3.00 ** |
24 | New, simpler UI - every screen can be accessed from the new Main Menu. | 28 | New, simpler UI - every screen can be accessed from the new Main Menu. |
25 | Huge code cleanup - many major functions rewritten. Functions optimized, | 29 | Huge code cleanup - many major functions rewritten. Functions optimized, |
@@ -85,10 +89,11 @@ Original release, featuring analog / digital modes and a few options. | |||
85 | *****************************/ | 89 | *****************************/ |
86 | #include "plugin.h" | 90 | #include "plugin.h" |
87 | #include "time.h" | 91 | #include "time.h" |
92 | #include <pluginbitmaps/clock_logo.h> | ||
88 | 93 | ||
89 | PLUGIN_HEADER | 94 | PLUGIN_HEADER |
90 | 95 | ||
91 | #define CLOCK_VERSION "v3.0" | 96 | #define CLOCK_VERSION "v3.10" |
92 | 97 | ||
93 | #define ANALOG 1 | 98 | #define ANALOG 1 |
94 | #define DIGITAL 2 | 99 | #define DIGITAL 2 |
@@ -104,8 +109,10 @@ PLUGIN_HEADER | |||
104 | 109 | ||
105 | /* we need to "fake" the LCD width/height, because this plugin isn't | 110 | /* we need to "fake" the LCD width/height, because this plugin isn't |
106 | * yet adapted to other screen sizes */ | 111 | * yet adapted to other screen sizes */ |
107 | #define LCDWIDTH 112 | 112 | #define LCDWIDTH LCD_WIDTH |
108 | #define LCDHEIGHT 64 | 113 | #define LCDHEIGHT LCD_HEIGHT |
114 | #define CENTERX LCD_WIDTH/2 | ||
115 | #define CENTERY LCD_HEIGHT/2 | ||
109 | 116 | ||
110 | #if (CONFIG_KEYPAD == RECORDER_PAD) | 117 | #if (CONFIG_KEYPAD == RECORDER_PAD) |
111 | 118 | ||
@@ -264,32 +271,26 @@ static struct plugin_api* rb; | |||
264 | /*********************************************************** | 271 | /*********************************************************** |
265 | * Used for hands to define lengths at a given time - ANALOG | 272 | * Used for hands to define lengths at a given time - ANALOG |
266 | **********************************************************/ | 273 | **********************************************************/ |
267 | unsigned char xminute[61]; | 274 | unsigned int xminute[61]; |
268 | static const unsigned char yminute[] = { | 275 | unsigned int yminute[61]; |
269 | 55,54,54,53,53,51,50,49,47,45,43,41,39,36,34,32,30,28,25,23,21,19,17,15,14,13, | 276 | unsigned int yhour[61]; |
270 | 11,11,10,10, 9,10,10,11,11,13,14,15,17,19,21,23,25,28,30,32,34,36,39,41,43,45, | 277 | unsigned int xhour[61]; |
271 | 47,49,50,51,53,53,54,54 }; | ||
272 | static const unsigned char yhour[] = { | ||
273 | 47,47,46,46,46,45,44,43,42,41,39,38,36,35,33,32,31,29,28,26,25,23,22,21,20,19, | ||
274 | 18,18,18,17,17,17,18,18,18,19,20,21,22,23,25,26,28,29,31,32,33,35,36,38,39,41, | ||
275 | 42,43,44,45,46,46,46,47 }; | ||
276 | unsigned char xhour[61]; | ||
277 | 278 | ||
278 | /************************************************************** | 279 | /************************************************************** |
279 | * Used for hands to define lengths at a give time - FULLSCREEN | 280 | * Used for hands to define lengths at a give time - FULLSCREEN |
280 | *************************************************************/ | 281 | *************************************************************/ |
281 | static const unsigned char xminute_full[] = { | 282 | unsigned int xminute_full[61] = { |
282 | 56,58,61,65,69,74,79,84,91,100,110,110,110,110,110,110,110,110,110,110,110,100, | 283 | 56,58,61,65,69,74,79,84,91,100,110,110,110,110,110,110,110,110,110,110,110,100, |
283 | 91,84,79,74,69,65,61,58,56,54,51,47,43,38,33,28,21,12,1,1,1,1,1,1,1,1,1,1,1,12, | 284 | 91,84,79,74,69,65,61,58,56,54,51,47,43,38,33,28,21,12,1,1,1,1,1,1,1,1,1,1,1,12, |
284 | 21,28,33,38,43,47,51,54 }; | 285 | 21,28,33,38,43,47,51,54 }; |
285 | static const unsigned char yminute_full[] = { | 286 | unsigned int yminute_full[61] = { |
286 | 62,62,62,62,62,62,62,62,62,62,62,53,45,40,36,32,28,24,19,11,1,1,1,1,1,1,1,1,1,1, | 287 | 62,62,62,62,62,62,62,62,62,62,62,53,45,40,36,32,28,24,19,11,1,1,1,1,1,1,1,1,1,1, |
287 | 1,1,1,1,1,1,1,1,1,1,1,11,19,24,28,32,36,40,45,53,62,62,62,62,62,62,62,62,62,62 }; | 288 | 1,1,1,1,1,1,1,1,1,1,1,11,19,24,28,32,36,40,45,53,62,62,62,62,62,62,62,62,62,62 }; |
288 | static const unsigned char xhour_full[] = { | 289 | unsigned int xhour_full[61] = { |
289 | 56,58,60,63,66,69,73,78,84,91,100,100,100,100,100,100,100,100,100,100,100,91,84, | 290 | 56,58,60,63,66,69,73,78,84,91,100,100,100,100,100,100,100,100,100,100,100,91,84, |
290 | 78,73,69,66,63,60,58,56,54,52,49,46,43,39,34,28,21,12,12,12,12,12,12,12,12,12, | 291 | 78,73,69,66,63,60,58,56,54,52,49,46,43,39,34,28,21,12,12,12,12,12,12,12,12,12, |
291 | 12,12,21,28,34,39,43,46,49,52,54 }; | 292 | 12,12,21,28,34,39,43,46,49,52,54 }; |
292 | static const unsigned char yhour_full[] = { | 293 | unsigned int yhour_full[61] = { |
293 | 52,52,52,52,52,52,52,52,52,52,52,46,41,37,34,32,30,27,23,18,12,12,12,12,12,12, | 294 | 52,52,52,52,52,52,52,52,52,52,52,46,41,37,34,32,30,27,23,18,12,12,12,12,12,12, |
294 | 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,18,23,27,30,32,34,37,41,46,52,52, | 295 | 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,18,23,27,30,32,34,37,41,46,52,52, |
295 | 52,52,52,52,52,52,52,52 }; | 296 | 52,52,52,52,52,52,52,52 }; |
@@ -516,52 +517,7 @@ const unsigned char checkbox_full[] = { | |||
516 | /********************* | 517 | /********************* |
517 | * Clock logo (112x37) | 518 | * Clock logo (112x37) |
518 | ********************/ | 519 | ********************/ |
519 | const unsigned char clocklogo[] = { | 520 | extern const unsigned char clock_logo[]; // Should be LCD_WIDTH x (LCD_HEIGHT-28) |
520 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf0, 0xf8, 0xfc, 0x7c, | ||
521 | 0x3c, 0x3e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x3e, 0x3e, 0x1c, 0x08, 0x00, | ||
522 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xfc, 0xfe, 0xff, 0xff, 0xff, | ||
523 | 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
524 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
525 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
526 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
527 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xfe, 0xff, 0xff, 0xff, 0x0e, 0x00, 0x00, | ||
528 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
529 | 0x00, 0xc0, 0xf0, 0xfc, 0xff, 0xff, 0x7f, 0x1f, 0x07, 0x03, 0x01, 0x00, 0x00, | ||
530 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
531 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, | ||
532 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xe0, 0xf0, 0xf0, | ||
533 | 0xf0, 0x78, 0x78, 0x78, 0x78, 0x78, 0xf8, 0xf8, 0xf0, 0xf0, 0xe0, 0xe0, 0x80, | ||
534 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xe0, 0xf0, | ||
535 | 0xf0, 0xf8, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x30, 0x00, 0x00, | ||
536 | 0x00, 0x00, 0x00, 0x80, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, | ||
537 | 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf0, 0x60, 0x00, | ||
538 | 0xfc, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
539 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
540 | 0x00, 0x00, 0x00, 0x00, 0xc0, 0xfe, 0xff, 0xff, 0xff, 0x7f, 0x03, 0x00, 0x00, | ||
541 | 0x00, 0x00, 0x00, 0x80, 0xf0, 0xfc, 0xff, 0xff, 0x7f, 0x0f, 0x03, 0x01, 0x80, | ||
542 | 0xc0, 0xf0, 0x9c, 0x07, 0x01, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, | ||
543 | 0xfe, 0x00, 0x00, 0x00, 0x80, 0xf0, 0xfc, 0xff, 0xff, 0x7f, 0x0f, 0x03, 0x01, | ||
544 | 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
545 | 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe1, 0xf0, 0xf8, 0xfc, 0x3e, | ||
546 | 0x3f, 0x1f, 0x0f, 0x07, 0x03, 0x01, 0x00, 0x00, | ||
547 | 0x0f, 0x7f, 0xff, 0xff, 0xff, 0xf8, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
548 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
549 | 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, | ||
550 | 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x01, | ||
551 | 0x03, 0x03, 0x07, 0x0c, 0x18, 0x80, 0xc0, 0xf0, 0xfe, 0xff, 0xff, 0x3f, 0x0f, | ||
552 | 0x01, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x80, 0x00, 0x00, | ||
553 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
554 | 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x03, 0x03, 0x07, 0x1f, 0x3f, 0xff, | ||
555 | 0xfc, 0xf8, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, | ||
556 | 0x00, 0x00, 0x01, 0x03, 0x07, 0x0f, 0x0f, 0x0f, 0x1f, 0x1f, 0x1e, 0x1e, 0x1e, | ||
557 | 0x1e, 0x1e, 0x1e, 0x0f, 0x0f, 0x0f, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
558 | 0x00, 0x00, 0x00, 0x03, 0x07, 0x0f, 0x0f, 0x1f, 0x1f, 0x1e, 0x0e, 0x00, 0x00, | ||
559 | 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x0f, 0x0f, 0x1f, 0x1f, 0x1e, 0x1e, | ||
560 | 0x1e, 0x1e, 0x1e, 0x0f, 0x0f, 0x0f, 0x07, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, | ||
561 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x0f, 0x0f, 0x1f, 0x1f, 0x1e, | ||
562 | 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x0f, 0x0f, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
563 | 0x0c, 0x1f, 0x1f, 0x1f, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
564 | 0x01, 0x07, 0x0f, 0x1f, 0x1f, 0x0e, 0x00, 0x00 }; | ||
565 | 521 | ||
566 | /****************** | 522 | /****************** |
567 | * Time's Up bitmap | 523 | * Time's Up bitmap |
@@ -644,6 +600,7 @@ const char* credits[] = { | |||
644 | "Justin Young", | 600 | "Justin Young", |
645 | "Lee Pilgrim", | 601 | "Lee Pilgrim", |
646 | "top_bloke", | 602 | "top_bloke", |
603 | "Karl Kurbjun", | ||
647 | "Adam Spirer", | 604 | "Adam Spirer", |
648 | "Scott Myran", | 605 | "Scott Myran", |
649 | "Tony Kirk", | 606 | "Tony Kirk", |
@@ -659,6 +616,7 @@ const char* jobs[] = { | |||
659 | "Code", | 616 | "Code", |
660 | "Code", | 617 | "Code", |
661 | "Code", | 618 | "Code", |
619 | "Code", | ||
662 | "Pre-3.0 Logo", | 620 | "Pre-3.0 Logo", |
663 | "Design", | 621 | "Design", |
664 | "Design", | 622 | "Design", |
@@ -917,9 +875,9 @@ void save_settings(bool interface) | |||
917 | if(interface) | 875 | if(interface) |
918 | { | 876 | { |
919 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 877 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
920 | rb->lcd_fillrect(0, 56, 112, 8); | 878 | rb->lcd_fillrect(0, LCD_HEIGHT-8, LCD_WIDTH, 8); |
921 | rb->lcd_set_drawmode(DRMODE_SOLID); | 879 | rb->lcd_set_drawmode(DRMODE_SOLID); |
922 | center_text(56, "Saved Settings"); | 880 | center_text(LCD_HEIGHT-8, "Saved Settings"); |
923 | } | 881 | } |
924 | } | 882 | } |
925 | else /* couldn't save for some reason */ | 883 | else /* couldn't save for some reason */ |
@@ -927,9 +885,9 @@ void save_settings(bool interface) | |||
927 | if(interface) | 885 | if(interface) |
928 | { | 886 | { |
929 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 887 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
930 | rb->lcd_fillrect(0, 56, 112, 8); | 888 | rb->lcd_fillrect(0, LCD_HEIGHT-8, LCD_WIDTH, 8); |
931 | rb->lcd_set_drawmode(DRMODE_SOLID); | 889 | rb->lcd_set_drawmode(DRMODE_SOLID); |
932 | center_text(56, "Save Failed!"); | 890 | center_text(LCD_HEIGHT-8, "Save Failed!"); |
933 | } | 891 | } |
934 | } | 892 | } |
935 | 893 | ||
@@ -952,8 +910,8 @@ void load_settings(void) | |||
952 | int fd; | 910 | int fd; |
953 | fd = rb->open(default_filename, O_RDONLY); | 911 | fd = rb->open(default_filename, O_RDONLY); |
954 | 912 | ||
955 | center_text(48, "Clock " CLOCK_VERSION); | 913 | center_text(LCD_HEIGHT-16, "Clock " CLOCK_VERSION); |
956 | center_text(56, "Loading Settings"); | 914 | center_text(LCD_HEIGHT-8, "Loading Settings"); |
957 | 915 | ||
958 | show_clock_logo(true, true); | 916 | show_clock_logo(true, true); |
959 | rb->lcd_update(); | 917 | rb->lcd_update(); |
@@ -966,25 +924,25 @@ void load_settings(void) | |||
966 | rb->close(fd); | 924 | rb->close(fd); |
967 | 925 | ||
968 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 926 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
969 | rb->lcd_fillrect(0, 56, 112, 8); | 927 | rb->lcd_fillrect(0, LCD_HEIGHT-8, LCD_WIDTH, 8); |
970 | rb->lcd_set_drawmode(DRMODE_SOLID); | 928 | rb->lcd_set_drawmode(DRMODE_SOLID); |
971 | center_text(56, "Loaded Settings"); | 929 | center_text(LCD_HEIGHT-8, "Loaded Settings"); |
972 | } | 930 | } |
973 | else /* must be invalid, bail out */ | 931 | else /* must be invalid, bail out */ |
974 | { | 932 | { |
975 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 933 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
976 | rb->lcd_fillrect(0, 56, 112, 8); | 934 | rb->lcd_fillrect(0, LCD_HEIGHT-8, LCD_WIDTH, 8); |
977 | rb->lcd_set_drawmode(DRMODE_SOLID); | 935 | rb->lcd_set_drawmode(DRMODE_SOLID); |
978 | center_text(56, "Old Settings File"); | 936 | center_text(LCD_HEIGHT-8, "Old Settings File"); |
979 | reset_settings(); | 937 | reset_settings(); |
980 | } | 938 | } |
981 | } | 939 | } |
982 | else /* must be missing, bail out */ | 940 | else /* must be missing, bail out */ |
983 | { | 941 | { |
984 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 942 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
985 | rb->lcd_fillrect(0, 56, 112, 8); | 943 | rb->lcd_fillrect(0, LCD_HEIGHT-8, LCD_WIDTH, 8); |
986 | rb->lcd_set_drawmode(DRMODE_SOLID); | 944 | rb->lcd_set_drawmode(DRMODE_SOLID); |
987 | center_text(56, "No Settings File"); | 945 | center_text(LCD_HEIGHT-8, "No Settings File"); |
988 | 946 | ||
989 | /* use the default in this case */ | 947 | /* use the default in this case */ |
990 | reset_settings(); | 948 | reset_settings(); |
@@ -1007,9 +965,11 @@ void load_settings(void) | |||
1007 | void init_clock(void) | 965 | void init_clock(void) |
1008 | { | 966 | { |
1009 | #define ANALOG_VALUES 60 | 967 | #define ANALOG_VALUES 60 |
1010 | #define ANALOG_MIN_RADIUS 28 | 968 | #define ANALOG_YCENTER (LCD_HEIGHT/2) |
1011 | #define ANALOG_HR_RADIUS 20 | 969 | #define ANALOG_XCENTER (LCD_WIDTH/2) |
1012 | #define ANALOG_CENTER 56 | 970 | #define ANALOG_MIN_RADIUS (LCD_HEIGHT/2 -10) |
971 | #define ANALOG_HR_RADIUS (ANALOG_MIN_RADIUS-8) | ||
972 | |||
1013 | #define PI 3.141592 | 973 | #define PI 3.141592 |
1014 | int i; | 974 | int i; |
1015 | 975 | ||
@@ -1028,9 +988,43 @@ void init_clock(void) | |||
1028 | for(i=0; i<ANALOG_VALUES; i++) | 988 | for(i=0; i<ANALOG_VALUES; i++) |
1029 | { | 989 | { |
1030 | xminute[i] = (sin(360 * i / ANALOG_VALUES) * ANALOG_MIN_RADIUS / 16384) + | 990 | xminute[i] = (sin(360 * i / ANALOG_VALUES) * ANALOG_MIN_RADIUS / 16384) + |
1031 | ANALOG_CENTER; | 991 | ANALOG_XCENTER; |
992 | yminute[i] = (sin(360*i/ ANALOG_VALUES+90) * ANALOG_MIN_RADIUS / 16384) + | ||
993 | ANALOG_YCENTER; | ||
1032 | xhour[i] = (sin(360 * i / ANALOG_VALUES) * ANALOG_HR_RADIUS / 16384) + | 994 | xhour[i] = (sin(360 * i / ANALOG_VALUES) * ANALOG_HR_RADIUS / 16384) + |
1033 | ANALOG_CENTER; | 995 | ANALOG_XCENTER; |
996 | yhour[i] = (sin(360 * i / ANALOG_VALUES+90) * ANALOG_HR_RADIUS / 16384) + | ||
997 | ANALOG_YCENTER; | ||
998 | |||
999 | /* Fullscreen initialization */ | ||
1000 | if(i==0) | ||
1001 | { | ||
1002 | xminute_full[i]=LCD_WIDTH/2; | ||
1003 | yminute_full[i]=1; | ||
1004 | } | ||
1005 | else if(i<10 || (i>50 && i <60) ) | ||
1006 | { | ||
1007 | xminute_full[i] = xminute_full[i-1]+LCD_WIDTH/20; | ||
1008 | yminute_full[i] = 1; | ||
1009 | } | ||
1010 | |||
1011 | else if (i>=10 && i < 20) | ||
1012 | { | ||
1013 | xminute_full[i] = LCD_WIDTH-2; | ||
1014 | yminute_full[i] = (i-10)*LCD_HEIGHT/10; | ||
1015 | } | ||
1016 | |||
1017 | else if(i>=20&&i<40) | ||
1018 | { | ||
1019 | xminute_full[i] = (40-i)*LCD_WIDTH/20; | ||
1020 | yminute_full[i] = LCD_HEIGHT- 2; | ||
1021 | |||
1022 | } | ||
1023 | else | ||
1024 | { | ||
1025 | xminute_full[i] = 1; | ||
1026 | yminute_full[i] = (50-i)*LCD_HEIGHT/10; | ||
1027 | } | ||
1034 | } | 1028 | } |
1035 | } | 1029 | } |
1036 | 1030 | ||
@@ -1321,9 +1315,9 @@ bool colon, bool lcd) | |||
1321 | if(settings.digital[digital_12h]) | 1315 | if(settings.digital[digital_12h]) |
1322 | { | 1316 | { |
1323 | if(hour > 12) | 1317 | if(hour > 12) |
1324 | rb->lcd_mono_bitmap(pm, 97, 55, 15, 8); | 1318 | rb->lcd_mono_bitmap(pm, 97, LCD_HEIGHT-9, 15, 8); |
1325 | else | 1319 | else |
1326 | rb->lcd_mono_bitmap(am, 1, 55, 15, 8); | 1320 | rb->lcd_mono_bitmap(am, 1, LCD_HEIGHT-9, 15, 8); |
1327 | } | 1321 | } |
1328 | } | 1322 | } |
1329 | else | 1323 | else |
@@ -1331,9 +1325,9 @@ bool colon, bool lcd) | |||
1331 | if(settings.lcd[lcd_12h]) | 1325 | if(settings.lcd[lcd_12h]) |
1332 | { | 1326 | { |
1333 | if(hour > 12) | 1327 | if(hour > 12) |
1334 | rb->lcd_mono_bitmap(pm, 97, 55, 15, 8); | 1328 | rb->lcd_mono_bitmap(pm, 97, LCD_HEIGHT-9, 15, 8); |
1335 | else | 1329 | else |
1336 | rb->lcd_mono_bitmap(am, 1, 55, 15, 8); | 1330 | rb->lcd_mono_bitmap(am, 1, LCD_HEIGHT-9, 15, 8); |
1337 | } | 1331 | } |
1338 | } | 1332 | } |
1339 | 1333 | ||
@@ -1384,17 +1378,13 @@ void fullscreen_clock(int hour, int minute, int second) | |||
1384 | /* Second hand */ | 1378 | /* Second hand */ |
1385 | if(settings.fullscreen[fullscreen_secondhand]) | 1379 | if(settings.fullscreen[fullscreen_secondhand]) |
1386 | { | 1380 | { |
1387 | pos = 90-second; | 1381 | pos = second; |
1388 | if(pos >= 60) | ||
1389 | pos -= 60; | ||
1390 | 1382 | ||
1391 | rb->lcd_drawline((LCDWIDTH/2), (LCDHEIGHT/2), | 1383 | rb->lcd_drawline((LCDWIDTH/2), (LCDHEIGHT/2), |
1392 | xminute_full[pos], yminute_full[pos]); | 1384 | xminute_full[pos], yminute_full[pos]); |
1393 | } | 1385 | } |
1394 | 1386 | ||
1395 | pos = 90-minute; | 1387 | pos = minute; |
1396 | if(pos >= 60) | ||
1397 | pos -= 60; | ||
1398 | 1388 | ||
1399 | /* Minute hand, thicker than the second hand */ | 1389 | /* Minute hand, thicker than the second hand */ |
1400 | rb->lcd_drawline(LCDWIDTH/2, LCDHEIGHT/2, | 1390 | rb->lcd_drawline(LCDWIDTH/2, LCDHEIGHT/2, |
@@ -1533,19 +1523,19 @@ void show_clock_logo(bool animate, bool show_clock_text) | |||
1533 | for(y_position = -74; y_position <= 20; y_position+=(40-y_position)/20) | 1523 | for(y_position = -74; y_position <= 20; y_position+=(40-y_position)/20) |
1534 | { | 1524 | { |
1535 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 1525 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
1536 | rb->lcd_fillrect(0, 0, 112, 48); | 1526 | rb->lcd_fillrect(0, 0, LCD_WIDTH, LCD_HEIGHT-16); |
1537 | rb->lcd_set_drawmode(DRMODE_SOLID); | 1527 | rb->lcd_set_drawmode(DRMODE_SOLID); |
1538 | rb->lcd_mono_bitmap(clocklogo, 0, y_position/2, 112, 37); | 1528 | rb->lcd_mono_bitmap(clock_logo, 0, y_position/2, BMPWIDTH_clock_logo, BMPHEIGHT_clock_logo); |
1539 | if(show_clock_text) | 1529 | if(show_clock_text) |
1540 | center_text(48, "Clock " CLOCK_VERSION); | 1530 | center_text(LCD_HEIGHT-16, "Clock " CLOCK_VERSION); |
1541 | rb->lcd_update(); | 1531 | rb->lcd_update(); |
1542 | } | 1532 | } |
1543 | } | 1533 | } |
1544 | else /* don't animate, just show */ | 1534 | else /* don't animate, just show */ |
1545 | { | 1535 | { |
1546 | rb->lcd_mono_bitmap(clocklogo, 0, 10, 112, 37); | 1536 | rb->lcd_mono_bitmap(clock_logo, 0, 10, BMPWIDTH_clock_logo, BMPHEIGHT_clock_logo); |
1547 | if(show_clock_text) | 1537 | if(show_clock_text) |
1548 | center_text(48, "Clock " CLOCK_VERSION); | 1538 | center_text(LCD_HEIGHT-16, "Clock " CLOCK_VERSION); |
1549 | rb->lcd_update(); | 1539 | rb->lcd_update(); |
1550 | } | 1540 | } |
1551 | } | 1541 | } |
@@ -1557,12 +1547,12 @@ void exit_logo() | |||
1557 | { | 1547 | { |
1558 | int y_position; | 1548 | int y_position; |
1559 | 1549 | ||
1560 | for(y_position = 20; y_position <= 128; y_position+=y_position/20) | 1550 | for(y_position = 20; y_position <= LCD_HEIGHT*2; y_position+=y_position/20) |
1561 | { | 1551 | { |
1562 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 1552 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
1563 | rb->lcd_fillrect(0, 10, 112, (y_position/2)); | 1553 | rb->lcd_fillrect(0, 10, LCD_WIDTH, (y_position/2)); |
1564 | rb->lcd_set_drawmode(DRMODE_SOLID); | 1554 | rb->lcd_set_drawmode(DRMODE_SOLID); |
1565 | rb->lcd_mono_bitmap(clocklogo, 0, y_position/2, 112, 37); | 1555 | rb->lcd_mono_bitmap(clock_logo, 0, y_position/2, BMPWIDTH_clock_logo, BMPHEIGHT_clock_logo); |
1566 | rb->lcd_update(); | 1556 | rb->lcd_update(); |
1567 | } | 1557 | } |
1568 | } | 1558 | } |
@@ -1598,6 +1588,7 @@ bool roll_credits(void) | |||
1598 | credits_pos += (credits_targetpos-credits_pos + 14) / 7) | 1588 | credits_pos += (credits_targetpos-credits_pos + 14) / 7) |
1599 | { | 1589 | { |
1600 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 1590 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
1591 | rb->lcd_fillrect(0, 0, LCD_WIDTH, 8); /* clear any trails left behind */ | ||
1601 | rb->lcd_drawline(credits_pos-1, 0, credits_pos-1, 8); | 1592 | rb->lcd_drawline(credits_pos-1, 0, credits_pos-1, 8); |
1602 | rb->lcd_set_drawmode(DRMODE_SOLID); | 1593 | rb->lcd_set_drawmode(DRMODE_SOLID); |
1603 | rb->lcd_putsxy(credits_pos, 0, elapsednames); | 1594 | rb->lcd_putsxy(credits_pos, 0, elapsednames); |
@@ -1629,9 +1620,9 @@ bool roll_credits(void) | |||
1629 | namepos += (name_targetpos - namepos + 14) / 7) | 1620 | namepos += (name_targetpos - namepos + 14) / 7) |
1630 | { | 1621 | { |
1631 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 1622 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
1632 | rb->lcd_fillrect(0, 48, 112, 8); /* clear any trails left behind */ | 1623 | rb->lcd_fillrect(0, LCD_HEIGHT-16, LCD_WIDTH, 8); /* clear any trails left behind */ |
1633 | rb->lcd_set_drawmode(DRMODE_SOLID); | 1624 | rb->lcd_set_drawmode(DRMODE_SOLID); |
1634 | rb->lcd_putsxy(namepos, 48, name); | 1625 | rb->lcd_putsxy(namepos, LCD_HEIGHT-16, name); |
1635 | rb->lcd_update(); | 1626 | rb->lcd_update(); |
1636 | 1627 | ||
1637 | /* exit on keypress */ | 1628 | /* exit on keypress */ |
@@ -1645,10 +1636,10 @@ bool roll_credits(void) | |||
1645 | jobpos -= (jobpos - job_targetpos + 14) / 7, namepos++) | 1636 | jobpos -= (jobpos - job_targetpos + 14) / 7, namepos++) |
1646 | { | 1637 | { |
1647 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 1638 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
1648 | rb->lcd_fillrect(0, 48, 112+job_w, 16); /* clear trails */ | 1639 | rb->lcd_fillrect(0, LCD_HEIGHT-16, LCD_WIDTH+job_w, 16); /* clear trails */ |
1649 | rb->lcd_set_drawmode(DRMODE_SOLID); | 1640 | rb->lcd_set_drawmode(DRMODE_SOLID); |
1650 | rb->lcd_putsxy(namepos, 48, name); | 1641 | rb->lcd_putsxy(namepos, LCD_HEIGHT-16, name); |
1651 | rb->lcd_putsxy(jobpos, 56, job); | 1642 | rb->lcd_putsxy(jobpos, LCD_HEIGHT-8, job); |
1652 | rb->lcd_update(); | 1643 | rb->lcd_update(); |
1653 | 1644 | ||
1654 | /* exit on keypress */ | 1645 | /* exit on keypress */ |
@@ -1661,10 +1652,10 @@ bool roll_credits(void) | |||
1661 | for(pause = 0; pause < 30; pause++) | 1652 | for(pause = 0; pause < 30; pause++) |
1662 | { | 1653 | { |
1663 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 1654 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
1664 | rb->lcd_fillrect(0, 48, 112, 16); | 1655 | rb->lcd_fillrect(0, LCD_HEIGHT-16, LCD_WIDTH, 16); |
1665 | rb->lcd_set_drawmode(DRMODE_SOLID); | 1656 | rb->lcd_set_drawmode(DRMODE_SOLID); |
1666 | rb->lcd_putsxy(namepos, 48, name); | 1657 | rb->lcd_putsxy(namepos, LCD_HEIGHT-16, name); |
1667 | rb->lcd_putsxy(jobpos, 56, job); | 1658 | rb->lcd_putsxy(jobpos, LCD_HEIGHT-8, job); |
1668 | rb->lcd_update(); | 1659 | rb->lcd_update(); |
1669 | 1660 | ||
1670 | btn = rb->button_get(false); | 1661 | btn = rb->button_get(false); |
@@ -1683,10 +1674,10 @@ bool roll_credits(void) | |||
1683 | while(namepos<LCDWIDTH+10 || jobpos > 0-job_w) | 1674 | while(namepos<LCDWIDTH+10 || jobpos > 0-job_w) |
1684 | { | 1675 | { |
1685 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 1676 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
1686 | rb->lcd_fillrect(0, 48, 112, 16); /* clear trails */ | 1677 | rb->lcd_fillrect(0, LCD_HEIGHT-16, LCD_WIDTH, 16); /* clear trails */ |
1687 | rb->lcd_set_drawmode(DRMODE_SOLID); | 1678 | rb->lcd_set_drawmode(DRMODE_SOLID); |
1688 | rb->lcd_putsxy(namepos, 48, name); | 1679 | rb->lcd_putsxy(namepos, LCD_HEIGHT-16, name); |
1689 | rb->lcd_putsxy(jobpos, 56, job); | 1680 | rb->lcd_putsxy(jobpos, LCD_HEIGHT-8, job); |
1690 | rb->lcd_update(); | 1681 | rb->lcd_update(); |
1691 | 1682 | ||
1692 | /* exit on keypress */ | 1683 | /* exit on keypress */ |
@@ -1712,11 +1703,12 @@ bool roll_credits(void) | |||
1712 | offset_dummy = 1; | 1703 | offset_dummy = 1; |
1713 | 1704 | ||
1714 | /* now make the text exit to the right */ | 1705 | /* now make the text exit to the right */ |
1715 | for(credits_pos = (LCDWIDTH/2)-(credits_w/2); credits_pos <= 122; | 1706 | for(credits_pos = (LCDWIDTH/2)-(credits_w/2); credits_pos <= LCD_WIDTH+10; |
1716 | credits_pos += offset_dummy, offset_dummy++) | 1707 | credits_pos += offset_dummy, offset_dummy++) |
1717 | { | 1708 | { |
1718 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 1709 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
1719 | rb->lcd_fillrect(0, 0, 112, 8); | 1710 | rb->lcd_fillrect(0, 0, LCD_WIDTH, 8); /* clear any trails left behind */ |
1711 | rb->lcd_fillrect(0, 0, LCD_WIDTH, 8); | ||
1720 | rb->lcd_set_drawmode(DRMODE_SOLID); | 1712 | rb->lcd_set_drawmode(DRMODE_SOLID); |
1721 | rb->lcd_putsxy(credits_pos, 0, elapsednames); | 1713 | rb->lcd_putsxy(credits_pos, 0, elapsednames); |
1722 | rb->lcd_update(); | 1714 | rb->lcd_update(); |
@@ -1737,7 +1729,7 @@ bool show_credits(void) | |||
1737 | 1729 | ||
1738 | rb->lcd_clear_display(); | 1730 | rb->lcd_clear_display(); |
1739 | 1731 | ||
1740 | center_text(56, "Credits"); | 1732 | center_text(LCD_HEIGHT-8, "Credits"); |
1741 | 1733 | ||
1742 | /* show the logo with an animation and the clock version text */ | 1734 | /* show the logo with an animation and the clock version text */ |
1743 | show_clock_logo(true, true); | 1735 | show_clock_logo(true, true); |
@@ -2068,10 +2060,10 @@ void settings_screen(void) | |||
2068 | for(; cursor_y>=cursor_dummy-8; cursor_y-=2) | 2060 | for(; cursor_y>=cursor_dummy-8; cursor_y-=2) |
2069 | { | 2061 | { |
2070 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 2062 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
2071 | rb->lcd_fillrect(0, 8, 112, 56); | 2063 | rb->lcd_fillrect(0, 8, LCD_WIDTH, LCD_HEIGHT-8); |
2072 | rb->lcd_set_drawmode(DRMODE_SOLID); | 2064 | rb->lcd_set_drawmode(DRMODE_SOLID); |
2073 | draw_settings(); | 2065 | draw_settings(); |
2074 | cursor(0, cursor_y, 112, 8); | 2066 | cursor(0, cursor_y, LCD_WIDTH, 8); |
2075 | rb->lcd_update(); | 2067 | rb->lcd_update(); |
2076 | } | 2068 | } |
2077 | cursorpos--; | 2069 | cursorpos--; |
@@ -2086,10 +2078,10 @@ void settings_screen(void) | |||
2086 | for(; cursor_y<=cursor_dummy+8; cursor_y+=2) | 2078 | for(; cursor_y<=cursor_dummy+8; cursor_y+=2) |
2087 | { | 2079 | { |
2088 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 2080 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
2089 | rb->lcd_fillrect(0, 8, 112, 56); | 2081 | rb->lcd_fillrect(0, 8, LCD_WIDTH, LCD_HEIGHT-8); |
2090 | rb->lcd_set_drawmode(DRMODE_SOLID); | 2082 | rb->lcd_set_drawmode(DRMODE_SOLID); |
2091 | draw_settings(); | 2083 | draw_settings(); |
2092 | cursor(0, cursor_y, 112, 8); | 2084 | cursor(0, cursor_y, LCD_WIDTH, 8); |
2093 | rb->lcd_update(); | 2085 | rb->lcd_update(); |
2094 | } | 2086 | } |
2095 | cursorpos++; | 2087 | cursorpos++; |
@@ -2223,7 +2215,7 @@ void general_settings(void) | |||
2223 | for(; cursor_y>cursor_dummy-8; cursor_y-=2) | 2215 | for(; cursor_y>cursor_dummy-8; cursor_y-=2) |
2224 | { | 2216 | { |
2225 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 2217 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
2226 | rb->lcd_fillrect(0, 8, 112, 56); | 2218 | rb->lcd_fillrect(0, 8, LCD_WIDTH, LCD_HEIGHT-8); |
2227 | rb->lcd_set_drawmode(DRMODE_SOLID); | 2219 | rb->lcd_set_drawmode(DRMODE_SOLID); |
2228 | 2220 | ||
2229 | rb->lcd_puts(2, 1, general_reset_text); | 2221 | rb->lcd_puts(2, 1, general_reset_text); |
@@ -2241,7 +2233,7 @@ void general_settings(void) | |||
2241 | draw_checkbox(settings.general[general_backlight], 0, 3, 1, 41); | 2233 | draw_checkbox(settings.general[general_backlight], 0, 3, 1, 41); |
2242 | draw_checkbox(idle_poweroff, 0, 1, 1, 49); | 2234 | draw_checkbox(idle_poweroff, 0, 1, 1, 49); |
2243 | 2235 | ||
2244 | cursor(0, cursor_y, 112, 8); | 2236 | cursor(0, cursor_y, LCD_WIDTH, 8); |
2245 | rb->lcd_update(); | 2237 | rb->lcd_update(); |
2246 | } | 2238 | } |
2247 | cursorpos--; | 2239 | cursorpos--; |
@@ -2256,7 +2248,7 @@ void general_settings(void) | |||
2256 | for(; cursor_y<cursor_dummy+8; cursor_y+=2) | 2248 | for(; cursor_y<cursor_dummy+8; cursor_y+=2) |
2257 | { | 2249 | { |
2258 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 2250 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
2259 | rb->lcd_fillrect(0, 8, 112, 56); | 2251 | rb->lcd_fillrect(0, 8, LCD_WIDTH, LCD_HEIGHT-8); |
2260 | rb->lcd_set_drawmode(DRMODE_SOLID); | 2252 | rb->lcd_set_drawmode(DRMODE_SOLID); |
2261 | 2253 | ||
2262 | rb->lcd_puts(2, 1, general_reset_text); | 2254 | rb->lcd_puts(2, 1, general_reset_text); |
@@ -2274,7 +2266,7 @@ void general_settings(void) | |||
2274 | draw_checkbox(settings.general[general_backlight], 0, 3, 1, 41); | 2266 | draw_checkbox(settings.general[general_backlight], 0, 3, 1, 41); |
2275 | draw_checkbox(idle_poweroff, 0, 1, 1, 49); | 2267 | draw_checkbox(idle_poweroff, 0, 1, 1, 49); |
2276 | 2268 | ||
2277 | cursor(0, cursor_y, 112, 8); | 2269 | cursor(0, cursor_y, LCD_WIDTH, 8); |
2278 | rb->lcd_update(); | 2270 | rb->lcd_update(); |
2279 | } | 2271 | } |
2280 | cursorpos++; | 2272 | cursorpos++; |
@@ -2323,7 +2315,7 @@ void draw_extras(int year, int day, int month, int hour, int minute, int second) | |||
2323 | 2315 | ||
2324 | struct tm* current_time = rb->get_time(); | 2316 | struct tm* current_time = rb->get_time(); |
2325 | 2317 | ||
2326 | int fill = LCDWIDTH * second / 60; | 2318 | int fill = (LCDWIDTH/60) * second; |
2327 | 2319 | ||
2328 | char moday[8]; | 2320 | char moday[8]; |
2329 | char dateyr[6]; | 2321 | char dateyr[6]; |
@@ -2345,9 +2337,9 @@ void draw_extras(int year, int day, int month, int hour, int minute, int second) | |||
2345 | if(settings.analog[analog_digits]) /* Digits around the face */ | 2337 | if(settings.analog[analog_digits]) /* Digits around the face */ |
2346 | { | 2338 | { |
2347 | rb->lcd_putsxy((LCDWIDTH/2)-6, 0, "12"); | 2339 | rb->lcd_putsxy((LCDWIDTH/2)-6, 0, "12"); |
2348 | rb->lcd_putsxy(20, (LCDHEIGHT/2)-4, "9"); | 2340 | rb->lcd_putsxy(LCD_WIDTH/2-(ANALOG_MIN_RADIUS+8), (LCDHEIGHT/2)-4, "9"); |
2349 | rb->lcd_putsxy((LCDWIDTH/2)-4, 56, "6"); | 2341 | rb->lcd_putsxy((LCDWIDTH/2)-4, LCD_HEIGHT-8, "6"); |
2350 | rb->lcd_putsxy(86, (LCDHEIGHT/2)-4, "3"); | 2342 | rb->lcd_putsxy(LCD_WIDTH/2+(ANALOG_MIN_RADIUS+2), (LCDHEIGHT/2)-4, "3"); |
2351 | } | 2343 | } |
2352 | if(settings.analog[analog_time] != 0) /* Digital readout */ | 2344 | if(settings.analog[analog_time] != 0) /* Digital readout */ |
2353 | { | 2345 | { |
@@ -2360,16 +2352,16 @@ void draw_extras(int year, int day, int month, int hour, int minute, int second) | |||
2360 | if(settings.analog[analog_time] == 2) | 2352 | if(settings.analog[analog_time] == 2) |
2361 | { | 2353 | { |
2362 | if(current_time->tm_hour > 12) /* PM */ | 2354 | if(current_time->tm_hour > 12) /* PM */ |
2363 | rb->lcd_mono_bitmap(pm, 96, 1, 15, 8); | 2355 | rb->lcd_mono_bitmap(pm, LCD_WIDTH-16, 1, 15, 8); |
2364 | else /* AM */ | 2356 | else /* AM */ |
2365 | rb->lcd_mono_bitmap(am, 96, 1, 15, 8); | 2357 | rb->lcd_mono_bitmap(am, LCD_WIDTH-16, 1, 15, 8); |
2366 | } | 2358 | } |
2367 | } | 2359 | } |
2368 | if(settings.analog[analog_date] != 0) /* Date readout */ | 2360 | if(settings.analog[analog_date] != 0) /* Date readout */ |
2369 | { | 2361 | { |
2370 | /* MM-DD (or DD.MM) */ | 2362 | /* MM-DD (or DD.MM) */ |
2371 | rb->lcd_putsxy(1, 48, moday); | 2363 | rb->lcd_putsxy(1, LCD_HEIGHT-16, moday); |
2372 | rb->lcd_putsxy(3, 56, dateyr); | 2364 | rb->lcd_putsxy(3, LCD_HEIGHT-8, dateyr); |
2373 | } | 2365 | } |
2374 | } | 2366 | } |
2375 | else if(settings.clock == DIGITAL) | 2367 | else if(settings.clock == DIGITAL) |
@@ -2379,13 +2371,13 @@ void draw_extras(int year, int day, int month, int hour, int minute, int second) | |||
2379 | { | 2371 | { |
2380 | rb->snprintf(buf, sizeof(buf), "%d/%d/%d", month, day, year); | 2372 | rb->snprintf(buf, sizeof(buf), "%d/%d/%d", month, day, year); |
2381 | rb->lcd_getstringsize(buf, &w, &h); | 2373 | rb->lcd_getstringsize(buf, &w, &h); |
2382 | rb->lcd_putsxy((LCDWIDTH/2)-(w/2), 56, buf); | 2374 | rb->lcd_putsxy((LCDWIDTH/2)-(w/2), LCD_HEIGHT-8, buf); |
2383 | } | 2375 | } |
2384 | else if(settings.digital[digital_date] == 2) /* European mode */ | 2376 | else if(settings.digital[digital_date] == 2) /* European mode */ |
2385 | { | 2377 | { |
2386 | rb->snprintf(buf, sizeof(buf), "%d.%d.%d", day, month, year); | 2378 | rb->snprintf(buf, sizeof(buf), "%d.%d.%d", day, month, year); |
2387 | rb->lcd_getstringsize(buf, &w, &h); | 2379 | rb->lcd_getstringsize(buf, &w, &h); |
2388 | rb->lcd_putsxy((LCDWIDTH/2)-(w/2), 56, buf); | 2380 | rb->lcd_putsxy((LCDWIDTH/2)-(w/2), LCD_HEIGHT-8, buf); |
2389 | } | 2381 | } |
2390 | if(settings.digital[digital_seconds] == 1) /* Second readout */ | 2382 | if(settings.digital[digital_seconds] == 1) /* Second readout */ |
2391 | { | 2383 | { |
@@ -2394,11 +2386,11 @@ void draw_extras(int year, int day, int month, int hour, int minute, int second) | |||
2394 | rb->lcd_putsxy((LCDWIDTH/2)-(w/2), 5, buf); | 2386 | rb->lcd_putsxy((LCDWIDTH/2)-(w/2), 5, buf); |
2395 | } | 2387 | } |
2396 | else if(settings.digital[digital_seconds] == 2) /* Second progressbar */ | 2388 | else if(settings.digital[digital_seconds] == 2) /* Second progressbar */ |
2397 | rb->scrollbar(0, 0, 112, 4, 60, 0, second, HORIZONTAL); | 2389 | rb->scrollbar(0, 0, LCD_WIDTH, 4, 60, 0, second, HORIZONTAL); |
2398 | else if(settings.digital[digital_seconds] == 3) /* Invert the LCD as seconds pass */ | 2390 | else if(settings.digital[digital_seconds] == 3) /* Invert the LCD as seconds pass */ |
2399 | { | 2391 | { |
2400 | rb->lcd_set_drawmode(DRMODE_COMPLEMENT); | 2392 | rb->lcd_set_drawmode(DRMODE_COMPLEMENT); |
2401 | rb->lcd_fillrect(0, 0, fill, 64); | 2393 | rb->lcd_fillrect(0, 0, fill, LCD_HEIGHT); |
2402 | rb->lcd_set_drawmode(DRMODE_SOLID); | 2394 | rb->lcd_set_drawmode(DRMODE_SOLID); |
2403 | } | 2395 | } |
2404 | } | 2396 | } |
@@ -2409,13 +2401,13 @@ void draw_extras(int year, int day, int month, int hour, int minute, int second) | |||
2409 | { | 2401 | { |
2410 | rb->snprintf(buf, sizeof(buf), "%d/%d/%d", month, day, year); | 2402 | rb->snprintf(buf, sizeof(buf), "%d/%d/%d", month, day, year); |
2411 | rb->lcd_getstringsize(buf, &w, &h); | 2403 | rb->lcd_getstringsize(buf, &w, &h); |
2412 | rb->lcd_putsxy((LCDWIDTH/2)-(w/2), 56, buf); | 2404 | rb->lcd_putsxy((LCDWIDTH/2)-(w/2), LCD_HEIGHT-8, buf); |
2413 | } | 2405 | } |
2414 | else if(settings.lcd[lcd_date] == 2) /* european mode */ | 2406 | else if(settings.lcd[lcd_date] == 2) /* european mode */ |
2415 | { | 2407 | { |
2416 | rb->snprintf(buf, sizeof(buf), "%d.%d.%d", day, month, year); | 2408 | rb->snprintf(buf, sizeof(buf), "%d.%d.%d", day, month, year); |
2417 | rb->lcd_getstringsize(buf, &w, &h); | 2409 | rb->lcd_getstringsize(buf, &w, &h); |
2418 | rb->lcd_putsxy((LCDWIDTH/2)-(w/2), 56, buf); | 2410 | rb->lcd_putsxy((LCDWIDTH/2)-(w/2), LCD_HEIGHT-8, buf); |
2419 | } | 2411 | } |
2420 | if(settings.lcd[lcd_seconds] == 1) /* Second readout */ | 2412 | if(settings.lcd[lcd_seconds] == 1) /* Second readout */ |
2421 | { | 2413 | { |
@@ -2425,12 +2417,12 @@ void draw_extras(int year, int day, int month, int hour, int minute, int second) | |||
2425 | } | 2417 | } |
2426 | else if(settings.lcd[lcd_seconds] == 2) /* Second progressbar */ | 2418 | else if(settings.lcd[lcd_seconds] == 2) /* Second progressbar */ |
2427 | { | 2419 | { |
2428 | rb->scrollbar(0, 0, 112, 4, 60, 0, second, HORIZONTAL); | 2420 | rb->scrollbar(0, 0, LCD_WIDTH, 4, 60, 0, second, HORIZONTAL); |
2429 | } | 2421 | } |
2430 | else if(settings.lcd[lcd_seconds] == 3) /* Invert the LCD as seconds pass */ | 2422 | else if(settings.lcd[lcd_seconds] == 3) /* Invert the LCD as seconds pass */ |
2431 | { | 2423 | { |
2432 | rb->lcd_set_drawmode(DRMODE_COMPLEMENT); | 2424 | rb->lcd_set_drawmode(DRMODE_COMPLEMENT); |
2433 | rb->lcd_fillrect(0, 0, fill, 64); | 2425 | rb->lcd_fillrect(0, 0, fill, LCD_HEIGHT); |
2434 | rb->lcd_set_drawmode(DRMODE_SOLID); | 2426 | rb->lcd_set_drawmode(DRMODE_SOLID); |
2435 | } | 2427 | } |
2436 | } | 2428 | } |
@@ -2444,7 +2436,7 @@ void draw_extras(int year, int day, int month, int hour, int minute, int second) | |||
2444 | if(settings.fullscreen[fullscreen_invertseconds]) /* Invert the LCD as seconds pass */ | 2436 | if(settings.fullscreen[fullscreen_invertseconds]) /* Invert the LCD as seconds pass */ |
2445 | { | 2437 | { |
2446 | rb->lcd_set_drawmode(DRMODE_COMPLEMENT); | 2438 | rb->lcd_set_drawmode(DRMODE_COMPLEMENT); |
2447 | rb->lcd_fillrect(0, 0, fill, 64); | 2439 | rb->lcd_fillrect(0, 0, fill, LCD_HEIGHT); |
2448 | rb->lcd_set_drawmode(DRMODE_SOLID); | 2440 | rb->lcd_set_drawmode(DRMODE_SOLID); |
2449 | } | 2441 | } |
2450 | } | 2442 | } |
@@ -2454,12 +2446,12 @@ void draw_extras(int year, int day, int month, int hour, int minute, int second) | |||
2454 | if(settings.plain[plain_date] == 1) /* american mode */ | 2446 | if(settings.plain[plain_date] == 1) /* american mode */ |
2455 | { | 2447 | { |
2456 | rb->snprintf(buf, sizeof(buf), "%d/%d/%d", month, day, year); | 2448 | rb->snprintf(buf, sizeof(buf), "%d/%d/%d", month, day, year); |
2457 | rb->lcd_putsxy(0, 38, buf); | 2449 | rb->lcd_putsxy(0, LCD_HEIGHT-28, buf); |
2458 | } | 2450 | } |
2459 | else if(settings.plain[plain_date] == 2) /* european mode */ | 2451 | else if(settings.plain[plain_date] == 2) /* european mode */ |
2460 | { | 2452 | { |
2461 | rb->snprintf(buf, sizeof(buf), "%d.%d.%d", day, month, year); | 2453 | rb->snprintf(buf, sizeof(buf), "%d.%d.%d", day, month, year); |
2462 | rb->lcd_putsxy(0, 38, buf); | 2454 | rb->lcd_putsxy(0, LCD_HEIGHT-28, buf); |
2463 | } | 2455 | } |
2464 | } | 2456 | } |
2465 | } | 2457 | } |
@@ -2486,7 +2478,7 @@ void select_mode(void) | |||
2486 | rb->lcd_mono_bitmap(arrow, 1, 8*(i+1)+1, 8, 6); | 2478 | rb->lcd_mono_bitmap(arrow, 1, 8*(i+1)+1, 8, 6); |
2487 | } | 2479 | } |
2488 | 2480 | ||
2489 | cursor(0, 8*cursorpos, 112, 8); /* draw cursor */ | 2481 | cursor(0, 8*cursorpos, LCD_WIDTH, 8); /* draw cursor */ |
2490 | 2482 | ||
2491 | rb->lcd_update(); | 2483 | rb->lcd_update(); |
2492 | 2484 | ||
@@ -2500,7 +2492,7 @@ void select_mode(void) | |||
2500 | for(; cursor_y>cursor_dummy-8; cursor_y-=2) | 2492 | for(; cursor_y>cursor_dummy-8; cursor_y-=2) |
2501 | { | 2493 | { |
2502 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 2494 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
2503 | rb->lcd_fillrect(0, 8, 112, 56); | 2495 | rb->lcd_fillrect(0, 8, LCD_WIDTH, LCD_HEIGHT-8); |
2504 | rb->lcd_set_drawmode(DRMODE_SOLID); | 2496 | rb->lcd_set_drawmode(DRMODE_SOLID); |
2505 | 2497 | ||
2506 | for(i=0; i<6; i++) | 2498 | for(i=0; i<6; i++) |
@@ -2509,7 +2501,7 @@ void select_mode(void) | |||
2509 | rb->lcd_mono_bitmap(arrow, 1, 8*(i+1)+1, 8, 6); | 2501 | rb->lcd_mono_bitmap(arrow, 1, 8*(i+1)+1, 8, 6); |
2510 | } | 2502 | } |
2511 | 2503 | ||
2512 | cursor(0, cursor_y, 112, 8); | 2504 | cursor(0, cursor_y, LCD_WIDTH, 8); |
2513 | rb->lcd_update(); | 2505 | rb->lcd_update(); |
2514 | } | 2506 | } |
2515 | cursorpos--; | 2507 | cursorpos--; |
@@ -2524,7 +2516,7 @@ void select_mode(void) | |||
2524 | for(; cursor_y<cursor_dummy+8; cursor_y+=2) | 2516 | for(; cursor_y<cursor_dummy+8; cursor_y+=2) |
2525 | { | 2517 | { |
2526 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 2518 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
2527 | rb->lcd_fillrect(0, 8, 112, 56); | 2519 | rb->lcd_fillrect(0, 8, LCD_WIDTH, LCD_HEIGHT-8); |
2528 | rb->lcd_set_drawmode(DRMODE_SOLID); | 2520 | rb->lcd_set_drawmode(DRMODE_SOLID); |
2529 | 2521 | ||
2530 | for(i=0; i<6; i++) | 2522 | for(i=0; i<6; i++) |
@@ -2533,7 +2525,7 @@ void select_mode(void) | |||
2533 | rb->lcd_mono_bitmap(arrow, 1, 8*(i+1)+1, 8, 6); | 2525 | rb->lcd_mono_bitmap(arrow, 1, 8*(i+1)+1, 8, 6); |
2534 | } | 2526 | } |
2535 | 2527 | ||
2536 | cursor(0, cursor_y, 112, 8); | 2528 | cursor(0, cursor_y, LCD_WIDTH, 8); |
2537 | rb->lcd_update(); | 2529 | rb->lcd_update(); |
2538 | } | 2530 | } |
2539 | cursorpos++; | 2531 | cursorpos++; |
@@ -2580,7 +2572,7 @@ void counter_finished(void) | |||
2580 | 2572 | ||
2581 | /* invert lcd */ | 2573 | /* invert lcd */ |
2582 | rb->lcd_set_drawmode(DRMODE_COMPLEMENT); | 2574 | rb->lcd_set_drawmode(DRMODE_COMPLEMENT); |
2583 | rb->lcd_fillrect(0, 0, 112, 64); | 2575 | rb->lcd_fillrect(0, 0, LCD_WIDTH, LCD_HEIGHT); |
2584 | rb->lcd_set_drawmode(DRMODE_SOLID); | 2576 | rb->lcd_set_drawmode(DRMODE_SOLID); |
2585 | 2577 | ||
2586 | rb->lcd_update(); | 2578 | rb->lcd_update(); |
@@ -2695,15 +2687,15 @@ void show_counter(void) | |||
2695 | if(settings.general[general_counter]) | 2687 | if(settings.general[general_counter]) |
2696 | { | 2688 | { |
2697 | if(settings.clock == ANALOG) | 2689 | if(settings.clock == ANALOG) |
2698 | rb->lcd_putsxy(69, 56, count_text); | 2690 | rb->lcd_putsxy(LCD_WIDTH/2+13, LCD_HEIGHT-8, count_text); |
2699 | else if(settings.clock == DIGITAL) | 2691 | else if(settings.clock == DIGITAL) |
2700 | rb->lcd_putsxy(1, 5, count_text); | 2692 | rb->lcd_putsxy(1, 5, count_text); |
2701 | else if(settings.clock == LCD) | 2693 | else if(settings.clock == LCD) |
2702 | rb->lcd_putsxy(1, 5, count_text); | 2694 | rb->lcd_putsxy(1, 5, count_text); |
2703 | else if(settings.clock == FULLSCREEN) | 2695 | else if(settings.clock == FULLSCREEN) |
2704 | rb->lcd_puts(6, 6, count_text); | 2696 | rb->lcd_putsxy(LCD_WIDTH/2-18, LCD_HEIGHT-20, count_text); |
2705 | else if(settings.clock == PLAIN) | 2697 | else if(settings.clock == PLAIN) |
2706 | rb->lcd_putsxy(0, 50, count_text); | 2698 | rb->lcd_putsxy(0, LCD_HEIGHT-14, count_text); |
2707 | } | 2699 | } |
2708 | } | 2700 | } |
2709 | 2701 | ||
@@ -2913,7 +2905,7 @@ void main_menu(void) | |||
2913 | rb->lcd_mono_bitmap(arrow, 1, 8*(i+1)+1, 8, 6); | 2905 | rb->lcd_mono_bitmap(arrow, 1, 8*(i+1)+1, 8, 6); |
2914 | } | 2906 | } |
2915 | 2907 | ||
2916 | cursor(0, 8*menupos, 112, 8); /* draw cursor */ | 2908 | cursor(0, 8*menupos, LCD_WIDTH, 8); /* draw cursor */ |
2917 | 2909 | ||
2918 | rb->lcd_update(); | 2910 | rb->lcd_update(); |
2919 | 2911 | ||
@@ -2926,7 +2918,7 @@ void main_menu(void) | |||
2926 | for(cursor_dummy = cursor_y; cursor_y>cursor_dummy-8; cursor_y-=2) | 2918 | for(cursor_dummy = cursor_y; cursor_y>cursor_dummy-8; cursor_y-=2) |
2927 | { | 2919 | { |
2928 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 2920 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
2929 | rb->lcd_fillrect(0, 8, 112, 56); | 2921 | rb->lcd_fillrect(0, 8, LCD_WIDTH, LCD_HEIGHT-8); |
2930 | rb->lcd_set_drawmode(DRMODE_SOLID); | 2922 | rb->lcd_set_drawmode(DRMODE_SOLID); |
2931 | 2923 | ||
2932 | for(i=0; i<7; i++) /* draw menu items and icons */ | 2924 | for(i=0; i<7; i++) /* draw menu items and icons */ |
@@ -2935,7 +2927,7 @@ void main_menu(void) | |||
2935 | rb->lcd_mono_bitmap(arrow, 1, 8*(i+1)+1, 8, 6); | 2927 | rb->lcd_mono_bitmap(arrow, 1, 8*(i+1)+1, 8, 6); |
2936 | } | 2928 | } |
2937 | 2929 | ||
2938 | cursor(0, cursor_y, 112, 8); /* draw cursor */ | 2930 | cursor(0, cursor_y, LCD_WIDTH, 8); /* draw cursor */ |
2939 | rb->lcd_update(); | 2931 | rb->lcd_update(); |
2940 | } | 2932 | } |
2941 | menupos--; | 2933 | menupos--; |
@@ -2951,7 +2943,7 @@ void main_menu(void) | |||
2951 | for(cursor_dummy = cursor_y; cursor_y<cursor_dummy+8; cursor_y+=2) | 2943 | for(cursor_dummy = cursor_y; cursor_y<cursor_dummy+8; cursor_y+=2) |
2952 | { | 2944 | { |
2953 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | 2945 | rb->lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); |
2954 | rb->lcd_fillrect(0, 8, 112, 56); | 2946 | rb->lcd_fillrect(0, 8, LCD_WIDTH, LCD_HEIGHT-8); |
2955 | rb->lcd_set_drawmode(DRMODE_SOLID); | 2947 | rb->lcd_set_drawmode(DRMODE_SOLID); |
2956 | 2948 | ||
2957 | for(i=0; i<7; i++) /* draw menu items and icons */ | 2949 | for(i=0; i<7; i++) /* draw menu items and icons */ |
@@ -2960,7 +2952,7 @@ void main_menu(void) | |||
2960 | rb->lcd_mono_bitmap(arrow, 1, 8*(i+1)+1, 8, 6); | 2952 | rb->lcd_mono_bitmap(arrow, 1, 8*(i+1)+1, 8, 6); |
2961 | } | 2953 | } |
2962 | 2954 | ||
2963 | cursor(0, cursor_y, 112, 8); /* draw cursor */ | 2955 | cursor(0, cursor_y, LCD_WIDTH, 8); /* draw cursor */ |
2964 | rb->lcd_update(); | 2956 | rb->lcd_update(); |
2965 | } | 2957 | } |
2966 | menupos++; | 2958 | menupos++; |
@@ -3074,17 +3066,17 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
3074 | else if(settings.clock == DIGITAL) | 3066 | else if(settings.clock == DIGITAL) |
3075 | { | 3067 | { |
3076 | if(settings.digital[digital_blinkcolon]) | 3068 | if(settings.digital[digital_blinkcolon]) |
3077 | draw_7seg_time(hour, minute, 8, 16, 16, 32, second & 1, false); | 3069 | draw_7seg_time(hour, minute, 8, 16, (LCD_WIDTH-48)/4, LCD_HEIGHT-32, second & 1, false); |
3078 | else | 3070 | else |
3079 | draw_7seg_time(hour, minute, 8, 16, 16, 32, true, false); | 3071 | draw_7seg_time(hour, minute, 8, 16, (LCD_WIDTH-48)/4, LCD_HEIGHT-32, true, false); |
3080 | } | 3072 | } |
3081 | /* LCD mode */ | 3073 | /* LCD mode */ |
3082 | else if(settings.clock == LCD) | 3074 | else if(settings.clock == LCD) |
3083 | { | 3075 | { |
3084 | if(settings.lcd[lcd_blinkcolon]) | 3076 | if(settings.lcd[lcd_blinkcolon]) |
3085 | draw_7seg_time(hour, minute, 8, 16, 16, 32, second & 1, true); | 3077 | draw_7seg_time(hour, minute, 8, 16, (LCD_WIDTH-48)/4, LCD_HEIGHT-32, second & 1, true); |
3086 | else | 3078 | else |
3087 | draw_7seg_time(hour, minute, 8, 16, 16, 32, true, true); | 3079 | draw_7seg_time(hour, minute, 8, 16, (LCD_WIDTH-48)/4, LCD_HEIGHT-32, true, true); |
3088 | } | 3080 | } |
3089 | /* Fullscreen mode */ | 3081 | /* Fullscreen mode */ |
3090 | else if(settings.clock == FULLSCREEN) | 3082 | else if(settings.clock == FULLSCREEN) |