fix live display of play/pause icon and menu labels.

This commit is contained in:
2025-08-09 17:23:16 -07:00
parent c3c5196b58
commit 4828ec87e5
2 changed files with 7 additions and 13 deletions

View File

@ -94,15 +94,6 @@ void loop() {
// Check if cv run or reset is active and read cv. // Check if cv run or reset is active and read cv.
CheckRunReset(gravity.cv1, gravity.cv2); CheckRunReset(gravity.cv1, gravity.cv2);
for (int i = 0; i < Gravity::OUTPUT_COUNT; i++) {
auto& ch = app.channel[i];
// Only apply CV to the channel when the current channel has cv
// mod configured.
if (ch.isCvModActive()) {
ch.applyCvMod(gravity.cv1.Read(), gravity.cv2.Read());
}
}
// Check for dirty state eligible to be saved. // Check for dirty state eligible to be saved.
stateManager.update(app); stateManager.update(app);
@ -176,9 +167,11 @@ void CheckRunReset(AnalogInput& cv1, AnalogInput& cv2) {
const int val = (app.cv_run == 1) ? cv1.Read() : cv2.Read(); const int val = (app.cv_run == 1) ? cv1.Read() : cv2.Read();
if (val > AnalogInput::GATE_THRESHOLD && gravity.clock.IsPaused()) { if (val > AnalogInput::GATE_THRESHOLD && gravity.clock.IsPaused()) {
gravity.clock.Start(); gravity.clock.Start();
app.refresh_screen = true;
} else if (val < AnalogInput::GATE_THRESHOLD && !gravity.clock.IsPaused()) { } else if (val < AnalogInput::GATE_THRESHOLD && !gravity.clock.IsPaused()) {
gravity.clock.Stop(); gravity.clock.Stop();
ResetOutputs(); ResetOutputs();
app.refresh_screen = true;
} }
} }
@ -318,6 +311,7 @@ void editMainParameter(int val) {
} }
break; break;
} }
// These changes are applied upon encoder button press.
case PARAM_MAIN_ENCODER_DIR: case PARAM_MAIN_ENCODER_DIR:
updateSelection(app.selected_sub_param, val, 2); updateSelection(app.selected_sub_param, val, 2);
break; break;

View File

@ -262,8 +262,8 @@ void DisplayMainPage() {
} }
break; break;
case PARAM_MAIN_RUN: case PARAM_MAIN_RUN:
mainText = F("RUN SRC"); mainText = F("RUN");
switch (app.selected_sub_param) { switch (app.cv_run) {
case 0: case 0:
subText = F("NONE"); subText = F("NONE");
break; break;
@ -276,8 +276,8 @@ void DisplayMainPage() {
} }
break; break;
case PARAM_MAIN_RESET: case PARAM_MAIN_RESET:
mainText = F("RST SRC"); mainText = F("RST");
switch (app.selected_sub_param) { switch (app.cv_reset) {
case 0: case 0:
subText = F("NONE"); subText = F("NONE");
break; break;