# HG changeset patch # User Michiel Broek # Date 1407950041 -7200 # Node ID 11655e7124c5681fabcfc08529326f84952f26dd # Parent 1cb55ea51f764671c04c28cdaeace1852052d54c Fixed stepping down in LCD screens. diff -r 1cb55ea51f76 -r 11655e7124c5 thermferm/lcd-buffer.c --- a/thermferm/lcd-buffer.c Wed Aug 13 17:37:59 2014 +0200 +++ b/thermferm/lcd-buffer.c Wed Aug 13 19:14:01 2014 +0200 @@ -92,15 +92,15 @@ { if (key == KEY_DOWN) { if (current_offset < (current_lines - Config.lcd_rows)) - current_offset = current_offset + Config.lcd_rows; + current_offset += Config.lcd_rows; else current_offset = 0; syslog(LOG_NOTICE, "lcd_buf_step(KEY_DOWN) current_lines=%d current_offset=%d", current_lines, current_offset); lcd_buf_show(); } if (key == KEY_UP) { - if (current_offset > Config.lcd_rows) - current_offset = current_offset - Config.lcd_rows; + if (current_offset >= Config.lcd_rows) + current_offset -= Config.lcd_rows; else current_offset = (current_lines - Config.lcd_rows); syslog(LOG_NOTICE, "lcd_buf_step(KEY_UP) current_lines=%d current_offset=%d", current_lines, current_offset); diff -r 1cb55ea51f76 -r 11655e7124c5 thermferm/panel.c --- a/thermferm/panel.c Wed Aug 13 17:37:59 2014 +0200 +++ b/thermferm/panel.c Wed Aug 13 19:14:01 2014 +0200 @@ -137,8 +137,7 @@ /* * Any key is pressed. */ -// if (Backlight == 0) - setBacklight(1); + setBacklight(1); Backlight = LCD_SLEEP; menutimer = 0; } else {