From 4828ec87e52fa54c5f90ed93e7298d7ecb6760a9 Mon Sep 17 00:00:00 2001 From: Adam Wonak Date: Sat, 9 Aug 2025 17:23:16 -0700 Subject: [PATCH] fix live display of play/pause icon and menu labels. --- firmware/Gravity/Gravity.ino | 12 +++--------- firmware/Gravity/display.h | 8 ++++---- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/firmware/Gravity/Gravity.ino b/firmware/Gravity/Gravity.ino index 6df0a9e..8618f46 100644 --- a/firmware/Gravity/Gravity.ino +++ b/firmware/Gravity/Gravity.ino @@ -94,15 +94,6 @@ void loop() { // Check if cv run or reset is active and read cv. 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. stateManager.update(app); @@ -176,9 +167,11 @@ void CheckRunReset(AnalogInput& cv1, AnalogInput& cv2) { const int val = (app.cv_run == 1) ? cv1.Read() : cv2.Read(); if (val > AnalogInput::GATE_THRESHOLD && gravity.clock.IsPaused()) { gravity.clock.Start(); + app.refresh_screen = true; } else if (val < AnalogInput::GATE_THRESHOLD && !gravity.clock.IsPaused()) { gravity.clock.Stop(); ResetOutputs(); + app.refresh_screen = true; } } @@ -318,6 +311,7 @@ void editMainParameter(int val) { } break; } + // These changes are applied upon encoder button press. case PARAM_MAIN_ENCODER_DIR: updateSelection(app.selected_sub_param, val, 2); break; diff --git a/firmware/Gravity/display.h b/firmware/Gravity/display.h index f404e89..d5a5f6e 100644 --- a/firmware/Gravity/display.h +++ b/firmware/Gravity/display.h @@ -262,8 +262,8 @@ void DisplayMainPage() { } break; case PARAM_MAIN_RUN: - mainText = F("RUN SRC"); - switch (app.selected_sub_param) { + mainText = F("RUN"); + switch (app.cv_run) { case 0: subText = F("NONE"); break; @@ -276,8 +276,8 @@ void DisplayMainPage() { } break; case PARAM_MAIN_RESET: - mainText = F("RST SRC"); - switch (app.selected_sub_param) { + mainText = F("RST"); + switch (app.cv_reset) { case 0: subText = F("NONE"); break;