improve external switch check routine

This commit is contained in:
phdlee 2018-05-23 15:07:37 +09:00
parent 83dc1de18e
commit 8a6e01e289

View File

@ -199,7 +199,7 @@ int getBtnStatus(void){
readButtonValue = readButtonValue / 4; readButtonValue = readButtonValue / 4;
//return FKEY_VFOCHANGE; //return FKEY_VFOCHANGE;
for (int i = 0; i < 16; i++) for (int i = 0; i < 16; i++)
if (KeyValues[i][0] <= readButtonValue && KeyValues[i][1] >= readButtonValue) if (KeyValues[i][2] != 0 && KeyValues[i][0] <= readButtonValue && KeyValues[i][1] >= readButtonValue)
return KeyValues[i][2]; return KeyValues[i][2];
//return i; //return i;
} }