gate pulsewidth (almost) works for subdivs, but not for multipliers

This commit is contained in:
Oleksiy
2025-03-08 14:57:17 +02:00
parent fd240e0341
commit 9840f23f77
3 changed files with 24 additions and 22 deletions

View File

@ -11,7 +11,7 @@ void updateScreen() {
//BPM Tab
if (displayTab == 0) { //BPM
u8g2.setFont(velvetscreen);
u8g2.setFont(stkS);
//Menu items
lastMenuItem = 4;
@ -91,19 +91,19 @@ void updateScreen() {
if ((!insideTab && !shiftBtnPushed) || (insideTab && menuItem != 0)) { //default view, nothing is selected or editable
u8g2.setFont(stkL);
u8g2.drawButtonUTF8(leftOffset-1, 28, U8G2_BTN_BW0|U8G2_BTN_HCENTER, width, 0, 3, valueStr.c_str() );
u8g2.setFont(velvetscreen);
u8g2.setFont(stkS);
valueStr = F("BPM");
u8g2.drawButtonUTF8(leftOffset, 40, U8G2_BTN_BW0|U8G2_BTN_HCENTER, width, 0, 2, valueStr.c_str() );
} else if ((!insideTab && shiftBtnPushed) || (insideTab && menuItem == 0 && (menuItemSelected || shiftBtnPushed))) { //show value as editable
u8g2.setFont(stkL);
u8g2.drawButtonUTF8(leftOffset-1, 28, U8G2_BTN_BW1|U8G2_BTN_HCENTER, width, 0, 3, valueStr.c_str() );
u8g2.setFont(velvetscreen);
u8g2.setFont(stkS);
valueStr = F("BPM");
u8g2.drawButtonUTF8(leftOffset, 40, U8G2_BTN_BW1|U8G2_BTN_INV|U8G2_BTN_HCENTER, width, 0, 2, valueStr.c_str() );
} else if (insideTab && menuItem == 0 && !menuItemSelected) { //show as selected menu item
u8g2.setFont(stkL);
u8g2.drawButtonUTF8(leftOffset-1, 28, U8G2_BTN_BW1|U8G2_BTN_INV|U8G2_BTN_HCENTER, width, 0, 3, valueStr.c_str() );
u8g2.setFont(velvetscreen);
u8g2.setFont(stkS);
valueStr = F("BPM");
u8g2.drawButtonUTF8(leftOffset, 40, U8G2_BTN_BW1|U8G2_BTN_INV|U8G2_BTN_HCENTER, width, 0, 2, valueStr.c_str() );
}
@ -121,7 +121,7 @@ void updateScreen() {
if (channels[displayTab - 1].mode == 3) {
lastMenuItem = 1;
} else if (channels[displayTab - 1].mode == 4) {
lastMenuItem = 2;
lastMenuItem = 3;
} else {
lastMenuItem = 3;
}
@ -136,6 +136,8 @@ void updateScreen() {
valueStr = F("SUBDIV:");
} else if (i == 2 && channels[displayTab - 1].mode == 2) {
valueStr = F("EDIT PATTERN");
} else if (i == 3 && channels[displayTab - 1].mode == 4) {
valueStr = (String(pulsePeriod) + " " + String(channelPulsesPerCycle[displayTab - 1]));
} else if (i == 3) {
valueStr = F("MOD:");
}
@ -208,7 +210,7 @@ void updateScreen() {
} else if (channels[displayTab - 1].mode == 3) {
valueStr = F("SWING");
} else if (channels[displayTab - 1].mode == 4) {
//valueStr = F("PULSES");
valueStr = gateLengthTime[displayTab - 1];
}
if ((!insideTab && shiftBtnPushed) || (insideTab && menuItem == 0)) {
@ -252,7 +254,7 @@ void updateScreen() {
//Tabs
u8g2.drawHLine(0, 53, 128);
u8g2.setFont(velvetscreen);
u8g2.setFont(stkS);
byte yPos = 61;
byte xWidth = 12;
valueStr = F("w");
@ -290,7 +292,7 @@ void updateScreen() {
//Edit Pattern Screen (Sequencer)
else if (displayScreen == 1) {
u8g2.setFont(velvetscreen);
u8g2.setFont(stkS);
byte pattern = channels[displayTab - 1].seqPattern;
if (pattern < 8) {
valueStr = F("PATTERN A");