Changed long-press time, added encoder reverse settings. memory is tight, needs testing. also removed everything related to hardware
This commit is contained in:
@ -320,24 +320,30 @@ void updateScreen() {
|
||||
u8g2.drawStr(8, 5,"SETTINGS" );
|
||||
u8g2.drawStr(102, 5, version );
|
||||
u8g2.drawHLine(0, 8, 128);
|
||||
lastMenuItem = 2;
|
||||
lastMenuItem = 3;
|
||||
byte width = 112;
|
||||
if (menuItem == 0) {
|
||||
u8g2.drawButtonUTF8(8, 19, U8G2_BTN_BW0|U8G2_BTN_INV, width, 2, 3, "CALIBRATE CV INS" );
|
||||
} else {
|
||||
u8g2.drawButtonUTF8(8, 19, U8G2_BTN_BW0, width, 2, 3, "CALIBRATE CV INS" );
|
||||
}
|
||||
if (menuItem == 1) {
|
||||
u8g2.drawButtonUTF8(8, 31, U8G2_BTN_BW0|U8G2_BTN_INV, width, 2, 3, "ROTATE SCREEN" );
|
||||
} else {
|
||||
u8g2.drawButtonUTF8(8, 31, U8G2_BTN_BW0, width, 2, 3, "ROTATE SCREEN" );
|
||||
for (byte i = 0; i <= lastMenuItem; i++) {
|
||||
switch(i) {
|
||||
case 0:
|
||||
valueStr = "CALIBRATE CV";
|
||||
break;
|
||||
case 1:
|
||||
valueStr = "ROTATE SCREEN";
|
||||
break;
|
||||
case 2:
|
||||
valueStr = "REVERSE ENC";
|
||||
break;
|
||||
case 3:
|
||||
valueStr = "FACTORY RESET";
|
||||
break;
|
||||
};
|
||||
valueStr.toCharArray(valueChar, 16);
|
||||
if (menuItem == i) {
|
||||
u8g2.drawButtonUTF8(8, 19 + (i*11), U8G2_BTN_BW0|U8G2_BTN_INV, width, 2, 3, valueChar );
|
||||
} else {
|
||||
u8g2.drawButtonUTF8(8, 19 + (i*11), U8G2_BTN_BW0, width, 2, 3, valueChar );
|
||||
}
|
||||
}
|
||||
if (menuItem == 2) {
|
||||
u8g2.drawButtonUTF8(8, 43, U8G2_BTN_BW0|U8G2_BTN_INV, width, 2, 3, "FACTORY RESET" );
|
||||
} else {
|
||||
u8g2.drawButtonUTF8(8, 43, U8G2_BTN_BW0, width, 2, 3, "FACTORY RESET" );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (showDone) {
|
||||
|
||||
Reference in New Issue
Block a user