add extended Keys (mode, band, tunestep) and i2clcd working

This commit is contained in:
phdlee
2018-04-17 21:26:29 +09:00
parent 0e245fc488
commit f600c18541
6 changed files with 173 additions and 171 deletions

View File

@@ -162,12 +162,37 @@ void drawMeter(int needle)
//returns true if the button is pressed
int btnDown(void){
#ifdef EXTEND_KEY_GROUP1
if (analogRead(FBUTTON) > FUNCTION_KEY_ADC)
return 0;
else
return 1;
#else
if (digitalRead(FBUTTON) == HIGH)
return 0;
else
return 1;
#endif
}
#ifdef EXTEND_KEY_GROUP1
int getBtnStatus(void){
int readButtonValue = analogRead(FBUTTON);
if (analogRead(FBUTTON) < FUNCTION_KEY_ADC)
return FKEY_PRESS;
else
{
for (int i = 0; i < 16; i++)
if (KeyValues[i][0] <= readButtonValue && KeyValues[i][1] >= readButtonValue)
return i;
}
return -1;
}
#endif
int enc_prev_state = 3;
/**