Fixed SYM function https://github.com/Xinyuan-LilyGO/T-Deck/issues/70
This commit is contained in:
@@ -27,7 +27,6 @@ bool changedValue[colCount][rowCount];
|
|||||||
char keyboard[colCount][rowCount];
|
char keyboard[colCount][rowCount];
|
||||||
char keyboard_symbol[colCount][rowCount];
|
char keyboard_symbol[colCount][rowCount];
|
||||||
|
|
||||||
bool symbolSelected;
|
|
||||||
bool BL_state = false;
|
bool BL_state = false;
|
||||||
bool comdata_flag = false;
|
bool comdata_flag = false;
|
||||||
char comdata;
|
char comdata;
|
||||||
@@ -145,7 +144,6 @@ void setup()
|
|||||||
pinMode(cols[x], INPUT_PULLUP);
|
pinMode(cols[x], INPUT_PULLUP);
|
||||||
}
|
}
|
||||||
|
|
||||||
symbolSelected = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop()
|
void loop()
|
||||||
@@ -220,10 +218,6 @@ void readMatrix()
|
|||||||
// disable the column
|
// disable the column
|
||||||
pinMode(curCol, INPUT);
|
pinMode(curCol, INPUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (keyPressed(0, 2)) {
|
|
||||||
symbolSelected = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool keyPressed(int colIndex, int rowIndex)
|
bool keyPressed(int colIndex, int rowIndex)
|
||||||
@@ -254,8 +248,8 @@ void printMatrix()
|
|||||||
// we only want to print if the key is pressed and it is a printable character
|
// we only want to print if the key is pressed and it is a printable character
|
||||||
if (keyPressed(colIndex, rowIndex) && isPrintableKey(colIndex, rowIndex)) {
|
if (keyPressed(colIndex, rowIndex) && isPrintableKey(colIndex, rowIndex)) {
|
||||||
char toPrint;
|
char toPrint;
|
||||||
if (symbolSelected) {
|
|
||||||
symbolSelected = false;
|
if (keyActive(0, 2)) {
|
||||||
toPrint = char(keyboard_symbol[colIndex][rowIndex]);
|
toPrint = char(keyboard_symbol[colIndex][rowIndex]);
|
||||||
} else {
|
} else {
|
||||||
toPrint = char(keyboard[colIndex][rowIndex]);
|
toPrint = char(keyboard[colIndex][rowIndex]);
|
||||||
|
|||||||
BIN
Binary file not shown.
Reference in New Issue
Block a user