Add global/hardware settings to metadata EEPROM (#15)

Settings like Encoder Direction and Display Orientation should persist when resetting channel state.

Fixes https://github.com/awonak/alt-gravity/issues/7

Reviewed-on: https://git.pinkduck.xyz/awonak/libGravity/pulls/15
This commit is contained in:
2025-07-21 00:27:32 +00:00
parent 1bf90e1674
commit 4f04137f67
3 changed files with 39 additions and 12 deletions

View File

@ -196,8 +196,8 @@ void HandleEncoderPressed() {
if (app.selected_channel == 0) { // main page
// TODO: rewrite as switch
if (app.selected_param == PARAM_MAIN_ENCODER_DIR) {
bool reversed = app.selected_sub_param == 1;
gravity.encoder.SetReverseDirection(reversed);
app.encoder_reversed = app.selected_sub_param == 1;
gravity.encoder.SetReverseDirection(app.encoder_reversed);
}
if (app.selected_param == PARAM_MAIN_SAVE_DATA) {
if (app.selected_sub_param < MAX_SAVE_SLOTS) {