diff --git a/src/settings.cpp b/src/settings.cpp index 93134ec..7eaac23 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -47,14 +47,15 @@ Setting all_settings[] = { {"effects.tv_static.black_bar_speed", &settings.effects.tv_static.black_bar_speed, TYPE_UINT16}, }; -const uint8_t all_settings_size = 28; +const uint8_t all_settings_size = 29; bool change_setting(const char* key, uint16_t new_value) { LOGln("Settings * Setting %s to new value %d.", key, new_value); Setting* s = NULL; for (uint8_t i=0; iname)==0) { break; } } @@ -99,13 +100,14 @@ bool save_settings() { return false; } - for (int i=0; ivalue); + uint16_t default_value = setting_default(s); if (default_value != value) { char buf[50]; - snprintf(buf, 50, "%s=%d", s.name, value); + snprintf(buf, 50, "%s=%d", s->name, value); LOGln("Saving: %s", buf); f.println(buf); }