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

View File

@ -2,17 +2,19 @@
#define APP_STATE_H
#include <gravity.h>
#include "channel.h"
// Global state for settings and app behavior.
struct AppState {
int tempo = 120;
int tempo = Clock::DEFAULT_TEMPO;
bool refresh_screen = true;
bool editing_param = false;
int selected_param = 0;
int selected_sub_param = 0;
byte selected_channel = 0; // 0=tempo, 1-6=output channel
Source selected_source = SOURCE_INTERNAL;
Channel channel[OUTPUT_COUNT];
Clock::Source selected_source = Clock::SOURCE_INTERNAL;
Channel channel[Gravity::OUTPUT_COUNT];
};
#endif // APP_STATE_H
#endif // APP_STATE_H