Skip to content

Commit

Permalink
fix: use global Persistence instance in schism config
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyHaystack committed Jun 8, 2024
1 parent a1ccfc4 commit ac0e9b3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions config/schism/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,9 @@ void setup() {
gpio_put(PICO_DEFAULT_LED_PIN, 1);

// Attempt to load config, or write default config to flash if failed to load config.
Persistence *persistence = new Persistence();
if (!persistence->LoadConfig(config)) {
persistence->SaveConfig(config);
if (!persistence.LoadConfig(config)) {
persistence.SaveConfig(config);
}
delete persistence;

// Create array of input sources to be used.
static InputSource *input_sources[] = {};
Expand Down

0 comments on commit ac0e9b3

Please sign in to comment.