summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/drivers/lcd-h100-remote.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/firmware/drivers/lcd-h100-remote.c b/firmware/drivers/lcd-h100-remote.c
index f4a5b48f6b..256934613a 100644
--- a/firmware/drivers/lcd-h100-remote.c
+++ b/firmware/drivers/lcd-h100-remote.c
@@ -473,13 +473,13 @@ void lcd_remote_update_rect (int x_start, int y,
473 * remapping only and all operations on the lcd are affected. 473 * remapping only and all operations on the lcd are affected.
474 * -> 474 * ->
475 * @param int lines - The number of lines that are rolled. 475 * @param int lines - The number of lines that are rolled.
476 * The value must be 0 <= pixels < LCD_HEIGHT. 476 * The value must be 0 <= pixels < LCD_REMOTE_HEIGHT.
477 */ 477 */
478void lcd_remote_roll(int lines) 478void lcd_remote_roll(int lines)
479{ 479{
480 char data[2]; 480 char data[2];
481 481
482 lines &= LCD_HEIGHT-1; 482 lines &= LCD_REMOTE_HEIGHT-1;
483 data[0] = lines & 0xff; 483 data[0] = lines & 0xff;
484 data[1] = lines >> 8; 484 data[1] = lines >> 8;
485 485
@@ -539,7 +539,7 @@ void lcd_remote_puts_style(int x, int y, const unsigned char *str, int style)
539 lcd_remote_putsxy(xpos, ypos, str); 539 lcd_remote_putsxy(xpos, ypos, str);
540 lcd_remote_clearrect(xpos + w, ypos, LCD_REMOTE_WIDTH - (xpos + w), h); 540 lcd_remote_clearrect(xpos + w, ypos, LCD_REMOTE_WIDTH - (xpos + w), h);
541 if (style & STYLE_INVERT) 541 if (style & STYLE_INVERT)
542 lcd_remote_invertrect(xpos, ypos, LCD_WIDTH - xpos, h); 542 lcd_remote_invertrect(xpos, ypos, LCD_REMOTE_WIDTH - xpos, h);
543 543
544} 544}
545 545
@@ -549,7 +549,7 @@ static void lcd_remote_putsxyofs(int x, int y, int ofs, const unsigned char *str
549 int ch; 549 int ch;
550 struct font* pf = font_get(curfont); 550 struct font* pf = font_get(curfont);
551 551
552 while ((ch = *str++) != '\0' && x < LCD_WIDTH) 552 while ((ch = *str++) != '\0' && x < LCD_REMOTE_WIDTH)
553 { 553 {
554 int gwidth, width; 554 int gwidth, width;
555 555
@@ -560,7 +560,7 @@ static void lcd_remote_putsxyofs(int x, int y, int ofs, const unsigned char *str
560 560
561 /* get proportional width and glyph bits */ 561 /* get proportional width and glyph bits */
562 gwidth = pf->width ? pf->width[ch] : pf->maxwidth; 562 gwidth = pf->width ? pf->width[ch] : pf->maxwidth;
563 width = MIN (gwidth, LCD_WIDTH - x); 563 width = MIN (gwidth, LCD_REMOTE_WIDTH - x);
564 564
565 if (ofs != 0) 565 if (ofs != 0)
566 { 566 {
@@ -869,7 +869,7 @@ void lcd_remote_puts_scroll_style(int x, int y, const unsigned char *string, int
869 } 869 }
870 870
871 end = strchr(s->line, '\0'); 871 end = strchr(s->line, '\0');
872 strncpy(end, string, LCD_WIDTH/2); 872 strncpy(end, string, LCD_REMOTE_WIDTH/2);
873 873
874 s->len = strlen(string); 874 s->len = strlen(string);
875 s->offset = 0; 875 s->offset = 0;
@@ -952,9 +952,9 @@ static void scroll_thread(void)
952 s->backward = false; 952 s->backward = false;
953 s->start_tick = current_tick + scroll_delay * 2; 953 s->start_tick = current_tick + scroll_delay * 2;
954 } 954 }
955 if (s->offset >= s->width - (LCD_WIDTH - xpos)) { 955 if (s->offset >= s->width - (LCD_REMOTE_WIDTH - xpos)) {
956 /* at end of line */ 956 /* at end of line */
957 s->offset = s->width - (LCD_WIDTH - xpos); 957 s->offset = s->width - (LCD_REMOTE_WIDTH - xpos);
958 s->backward = true; 958 s->backward = true;
959 s->start_tick = current_tick + scroll_delay * 2; 959 s->start_tick = current_tick + scroll_delay * 2;
960 } 960 }
@@ -965,11 +965,11 @@ static void scroll_thread(void)
965 s->offset %= s->width; 965 s->offset %= s->width;
966 } 966 }
967 967
968 lcd_remote_clearrect(xpos, ypos, LCD_WIDTH - xpos, pf->height); 968 lcd_remote_clearrect(xpos, ypos, LCD_REMOTE_WIDTH - xpos, pf->height);
969 lcd_remote_putsxyofs(xpos, ypos, s->offset, s->line); 969 lcd_remote_putsxyofs(xpos, ypos, s->offset, s->line);
970 if (s->invert) 970 if (s->invert)
971 lcd_remote_invertrect(xpos, ypos, LCD_WIDTH - xpos, pf->height); 971 lcd_remote_invertrect(xpos, ypos, LCD_REMOTE_WIDTH - xpos, pf->height);
972 lcd_remote_update_rect(xpos, ypos, LCD_WIDTH - xpos, pf->height); 972 lcd_remote_update_rect(xpos, ypos, LCD_REMOTE_WIDTH - xpos, pf->height);
973 } 973 }
974 974
975 sleep(scroll_ticks); 975 sleep(scroll_ticks);