Fixed sequence player

This commit is contained in:
2023-08-01 16:26:47 +03:00
parent dbf6cfe85a
commit fd77b88b6f
3 changed files with 67 additions and 73 deletions

View File

@ -2,7 +2,6 @@ void updateScreen() {
u8g2.firstPage();
do {
//u8g2.clearBuffer();
//BPM Tab
if (displayTab == 0) { //BPM
@ -145,6 +144,7 @@ void updateScreen() {
u8g2.drawButtonUTF8(menuItemWidth+6, 6, U8G2_BTN_BW0, valueWidth, 3, 2, "SEQ" );
}
//Main Param
if (channels[displayTab - 1].mode == 0) {
valueStr = String(channels[displayTab - 1].offset) + "/";
valueStr = valueStr + String(channelPulsesPerCycle[displayTab-1]+1);
@ -155,9 +155,9 @@ void updateScreen() {
}
valueStr.toCharArray(valueChar, 8);
if (menuItem == 1 && insideTab && channels[displayTab - 1].mode == 0) {
if (menuItem == 1 && insideTab) {
u8g2.drawButtonUTF8(menuItemWidth+6, 16, U8G2_BTN_BW0|U8G2_BTN_INV, valueWidth, 2, 2, valueChar );
} else if ((menuItem != 1 || !insideTab) && channels[displayTab - 1].mode == 0) {
} else if ((menuItem != 1 || !insideTab)) {
u8g2.drawButtonUTF8(menuItemWidth+6, 16, U8G2_BTN_BW0, valueWidth, 3, 2, valueChar );
}
@ -167,8 +167,10 @@ void updateScreen() {
valueStr = "x" + String(abs(subDivs[channels[displayTab - 1].subDiv]));
} else if (channels[displayTab - 1].mode == 1) {
valueStr = String(channels[displayTab - 1].random) + "0%";
} else if (channels[displayTab - 1].mode == 2) {
valueStr = "A" + String(channels[displayTab - 1].random + 1);
} else if (channels[displayTab - 1].mode == 2 && channels[displayTab - 1].seqPattern < 8) {
valueStr = "A" + String(channels[displayTab - 1].seqPattern + 1);
} else if (channels[displayTab - 1].mode == 2 && channels[displayTab - 1].seqPattern >= 8) {
valueStr = "B" + String(channels[displayTab - 1].seqPattern - 7);
}
valueStr.toCharArray(valueChar, 8);
@ -361,6 +363,5 @@ void updateScreen() {
}
}
//u8g2.sendBuffer();
} while ( u8g2.nextPage() );
}