From 91511da688479d16382c735c1e810d8e6daa0d55 Mon Sep 17 00:00:00 2001 From: Oleksiy Date: Thu, 3 Apr 2025 21:31:11 +0300 Subject: [PATCH] minor formatting changes --- Software/Gravity/Gravity.ino | 11 ++++++----- Software/Gravity/Interactions.ino | 8 ++++---- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Software/Gravity/Gravity.ino b/Software/Gravity/Gravity.ino index bbd6b11..7bb59be 100644 --- a/Software/Gravity/Gravity.ino +++ b/Software/Gravity/Gravity.ino @@ -99,7 +99,7 @@ int playingModes[7]; // should be renamed to currentSubdivs or something. Updat int playingModesOld[7]; uint16_t pulsePeriod; -bool isPlaying;// = false; // replace to something like uint8_t status where 1xxxxxx isPlaying, x1xxxxx isRecording etc +bool isPlaying;// = false; // replace with some flags like uint8_t status where 1xxxxxx isPlaying, x1xxxxx isRecording etc bool isRecording = false; bool recordToNextStep = false; bool MIDIClockReceived = false; @@ -125,12 +125,13 @@ bool menuItemSelected = false; uint8_t lastMenuItem = 3; uint8_t displayScreen = 0; //0 - main, 1 - sequencer, 2 - settings -bool playBtnPushed = false; -bool shiftBtnPushed = false; - int16_t CV1Input = 0; int16_t CV2Input = 0; +bool playBtnPushed = false; +bool shiftBtnPushed = false; +bool encBtnPushed; + int encPositionOld = 0; uint8_t encDirectionOld = 0; uint32_t encPressedTime; @@ -139,7 +140,7 @@ uint32_t playPressedTime; uint32_t playReleasedTime; uint32_t shiftPressedTime; uint32_t shiftReleasedTime; -bool encBtnPushed; + int extResetCountdown; int extTriggerCount; diff --git a/Software/Gravity/Interactions.ino b/Software/Gravity/Interactions.ino index d12d3d5..2cb5889 100644 --- a/Software/Gravity/Interactions.ino +++ b/Software/Gravity/Interactions.ino @@ -108,8 +108,8 @@ void checkInputs() { //channels[displayTab - 1].offset = 0; if (channels[displayTab - 1].subDiv > 100) { channels[displayTab - 1].subDiv = 0; - } if (channels[displayTab - 1].subDiv > (sizeof(subDivs) / sizeof(int)) - 1) { - channels[displayTab - 1].subDiv = (sizeof(subDivs) / sizeof(int)) - 1; + } if (channels[displayTab - 1].subDiv > (sizeof(subDivs) / sizeof(subDivs[0])) - 1) { + channels[displayTab - 1].subDiv = (sizeof(subDivs) / sizeof(subDivs[0])) - 1; } if (!isPlaying) { calculateCycles(); @@ -268,8 +268,8 @@ void checkInputs() { channels[displayTab - 1].subDiv = channels[displayTab - 1].subDiv - change; if (channels[displayTab - 1].subDiv > 200) { channels[displayTab - 1].subDiv = 0; - } else if (channels[displayTab - 1].subDiv > (sizeof(subDivs) / sizeof(int)) - 1) { - channels[displayTab - 1].subDiv = (sizeof(subDivs) / sizeof(int)) - 1; + } else if (channels[displayTab - 1].subDiv > (sizeof(subDivs) / sizeof(subDivs[0])) - 1) { + channels[displayTab - 1].subDiv = (sizeof(subDivs) / sizeof(subDivs[0])) - 1; } if (!isPlaying) { calculateCycles();