Started reworking menu to include main param

This commit is contained in:
2023-08-06 22:02:42 +03:00
parent fc622a1663
commit aec68332e4
3 changed files with 108 additions and 78 deletions

View File

@ -100,6 +100,7 @@ bool needPulseReset[6] = { true, true, true, true, true, true };
byte displayTab = 0;
bool insideTab = false;
byte menuItem = 0;
bool menuItemSelected = false;
byte lastMenuItem = 3;
byte displayScreen = 0; //0 - main, 1 - sequencer, 2 - settings
@ -508,14 +509,16 @@ void loadState() {
}
}
void resetFunc() {
wdt_enable(WDTO_15MS); // 8 ms watchdog
while(true); // infinite loop without feeding the dog, should reset in 8ms
void reboot() {
wdt_enable(WDTO_15MS); //reboot after 15ms
while(true);
}
void calibrateCVs() {
CV1Calibration = 511 - analogRead(ANALOGUE_INPUT_1_PIN);
CV2Calibration = 511 - analogRead(ANALOGUE_INPUT_2_PIN);
//CV1Calibration = 511 - analogRead(ANALOGUE_INPUT_1_PIN);
//CV2Calibration = 511 - analogRead(ANALOGUE_INPUT_2_PIN);
CV1Calibration = 255 - (analogRead(ANALOGUE_INPUT_1_PIN) / 2);
CV2Calibration = 255 - (analogRead(ANALOGUE_INPUT_2_PIN) / 2);
}
void checkScreenRotation() {