thermferm/lcd-buffer.c

changeset 614
389097dc665d
parent 484
7362ebd40f26
child 667
bba6ca418e09
equal deleted inserted replaced
613:163fcb0914e2 614:389097dc665d
1 /***************************************************************************** 1 /*****************************************************************************
2 * Copyright (C) 2014-2015 2 * Copyright (C) 2014-2022
3 * 3 *
4 * Michiel Broek <mbroek at mbse dot eu> 4 * Michiel Broek <mbroek at mbse dot eu>
5 * 5 *
6 * This file is part of the mbsePi-apps 6 * This file is part of the mbsePi-apps
7 * 7 *
113 if (key == KEY_DOWN) { 113 if (key == KEY_DOWN) {
114 if (current_offset < (current_lines - Config.lcd_rows)) 114 if (current_offset < (current_lines - Config.lcd_rows))
115 current_offset += Config.lcd_rows; 115 current_offset += Config.lcd_rows;
116 else 116 else
117 current_offset = 0; 117 current_offset = 0;
118 syslog(LOG_NOTICE, "lcd_buf_step(KEY_DOWN) current_lines=%d current_offset=%d", current_lines, current_offset);
119 lcd_buf_show(); 118 lcd_buf_show();
120 } 119 }
121 if (key == KEY_UP) { 120 if (key == KEY_UP) {
122 if (current_offset >= Config.lcd_rows) 121 if (current_offset >= Config.lcd_rows)
123 current_offset -= Config.lcd_rows; 122 current_offset -= Config.lcd_rows;
124 else 123 else
125 current_offset = (current_lines - Config.lcd_rows); 124 current_offset = (current_lines - Config.lcd_rows);
126 syslog(LOG_NOTICE, "lcd_buf_step(KEY_UP) current_lines=%d current_offset=%d", current_lines, current_offset);
127 lcd_buf_show(); 125 lcd_buf_show();
128 } 126 }
129 } 127 }
130 128
131 129

mercurial