Add the ability to reset state from the main menu. Refactor gravity.h global const definitions to be static and more readable.

This commit is contained in:
2025-06-15 11:23:57 -07:00
parent 696229cfe1
commit 0cef942f2c
8 changed files with 185 additions and 140 deletions

20
clock.h
View File

@ -23,22 +23,22 @@
#define MIDI_STOP 0xFC
#define MIDI_CONTINUE 0xFB
const int DEFAULT_TEMPO = 120;
typedef void (*ExtCallback)(void);
static ExtCallback extUserCallback = nullptr;
static void serialEventNoop(uint8_t msg, uint8_t status) {}
enum Source {
SOURCE_INTERNAL,
SOURCE_EXTERNAL_PPQN_24,
SOURCE_EXTERNAL_PPQN_4,
SOURCE_EXTERNAL_MIDI,
SOURCE_LAST,
};
class Clock {
public:
static constexpr int DEFAULT_TEMPO = 120;
enum Source {
SOURCE_INTERNAL,
SOURCE_EXTERNAL_PPQN_24,
SOURCE_EXTERNAL_PPQN_4,
SOURCE_EXTERNAL_MIDI,
SOURCE_LAST,
};
void Init() {
NeoSerial.begin(31250);