fix for LCD row tracking, fix for "phantom" keypress at powerup
This commit is contained in:
parent
4734fe5a0e
commit
240dd570ae
@ -97,6 +97,9 @@ void KeyInit(void){
|
||||
last_count[i][j] = COUNT_LIM_LOW;
|
||||
}
|
||||
}
|
||||
|
||||
//no new key
|
||||
NewKeyPressed = -1;
|
||||
}
|
||||
|
||||
static void raw_scan(void){
|
||||
|
@ -224,7 +224,7 @@ short TERMIO_PutChar(unsigned char letter) {
|
||||
} else {
|
||||
LCD_OutChar(letter);
|
||||
col++;
|
||||
if (col > MAX_CHARS_PER_LINE) {
|
||||
if (col >= MAX_CHARS_PER_LINE) {
|
||||
if (row == 0) {
|
||||
to_row(1);
|
||||
} else {
|
||||
|
@ -101,7 +101,7 @@ short TERMIO_PutChar(unsigned char letter) {
|
||||
lcd_buf[lcd_row][lcd_col] = letter;
|
||||
}
|
||||
lcd_col++;
|
||||
if (lcd_col > MAX_CHARS_PER_LINE) {
|
||||
if (lcd_col >= MAX_CHARS_PER_LINE) {
|
||||
if (lcd_row == 0) {
|
||||
to_row(1);
|
||||
} else {
|
||||
|
@ -28,7 +28,7 @@ static const char KEY_MAP[20] = {
|
||||
|
||||
|
||||
#ifdef DESKTOP
|
||||
QSemaphore KeysAvailable(1);
|
||||
QSemaphore KeysAvailable(0);
|
||||
QSemaphore LcdAvailable(1);
|
||||
#endif
|
||||
|
||||
@ -160,9 +160,9 @@ int main()
|
||||
#endif
|
||||
|
||||
latch_on();
|
||||
Timer0Init(); // display refresh & switch read
|
||||
LCD_Open();
|
||||
KeyInit();
|
||||
Timer0Init(); // display refresh & switch read
|
||||
BACKLIGHT_ON(); //turn on led backlight
|
||||
|
||||
ExpBuf[0] = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user