Skip to content

Commit

Permalink
Always auto-store Preset A
Browse files Browse the repository at this point in the history
(not necessarily straight to EEPROM)
  • Loading branch information
djphazer committed Jan 23, 2024
1 parent 8be3704 commit 3822941
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions software/src/APP_HEMISPHERE.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,12 @@ class HemisphereManager : public HSApplication {
}
void Suspend() {
if (hem_active_preset) {
if (HS::auto_save_enabled) StoreToPreset(preset_id);
if (HS::auto_save_enabled || 0 == preset_id) StoreToPreset(preset_id, !HS::auto_save_enabled);
hem_active_preset->OnSendSysEx();
}
}

void StoreToPreset(HemispherePreset* preset) {
void StoreToPreset(HemispherePreset* preset, bool skip_eeprom = false) {
bool doSave = (preset != hem_active_preset);

hem_active_preset = preset;
Expand All @@ -254,7 +254,7 @@ class HemisphereManager : public HSApplication {
hem_active_preset->SetClockData(data);

// initiate actual EEPROM save - ONLY if necessary!
if (doSave && HS::auto_save_enabled) {
if (doSave && !skip_eeprom) {
OC::CORE::app_isr_enabled = false;
OC::draw_save_message(60);
delay(1);
Expand All @@ -264,8 +264,8 @@ class HemisphereManager : public HSApplication {
}

}
void StoreToPreset(int id) {
StoreToPreset( (HemispherePreset*)(hem_presets + id) );
void StoreToPreset(int id, bool skip_eeprom = false) {
StoreToPreset( (HemispherePreset*)(hem_presets + id), skip_eeprom );
preset_id = id;
}
void LoadFromPreset(int id) {
Expand Down

0 comments on commit 3822941

Please sign in to comment.