add const for pulse clock mod choices. update git ignore and readme for build command.

This commit is contained in:
2025-07-13 12:00:37 -07:00
parent 60a7a7a349
commit 385ce85da3
4 changed files with 14 additions and 4 deletions

3
.gitignore vendored
View File

@ -1,3 +1,4 @@
docs
.vscode
.DS_Store
.DS_Store
build/*

View File

@ -111,3 +111,8 @@ void UpdateDisplay() {
}
```
### Build for release
```
$ arduino-cli compile -v -b arduino:avr:nano ./firmware/Gravity/Gravity.ino -e --output-dir=./build/
```

View File

@ -125,13 +125,13 @@ void HandleIntClockTick(uint32_t tick) {
int clock_index;
switch (app.selected_pulse) {
case Clock::PULSE_PPQN_24:
clock_index = 0;
clock_index = PULSE_PPQN_24_CLOCK_MOD_INDEX;
break;
case Clock::PULSE_PPQN_4:
clock_index = 4;
clock_index = PULSE_PPQN_4_CLOCK_MOD_INDEX;
break;
case Clock::PULSE_PPQN_1:
clock_index = 7;
clock_index = PULSE_PPQN_1_CLOCK_MOD_INDEX;
break;
}

View File

@ -53,6 +53,10 @@ static const int CLOCK_MOD_PULSES[MOD_CHOICE_SIZE] PROGMEM = {
static const byte DEFAULT_CLOCK_MOD_INDEX = 8; // x1 or 96 PPQN.
static const byte PULSE_PPQN_24_CLOCK_MOD_INDEX = 0;
static const byte PULSE_PPQN_4_CLOCK_MOD_INDEX = 4;
static const byte PULSE_PPQN_1_CLOCK_MOD_INDEX = 8;
class Channel {
public:
Channel() {