0
1
mirror of https://github.com/radio95-rnt/rds95.git synced 2026-02-27 12:53:53 +01:00

when file is corrupted, also call the on_init

This commit is contained in:
2025-12-22 21:53:00 +01:00
parent ceae7ec6ce
commit 7dce2b6300
4 changed files with 11 additions and 7 deletions

View File

@@ -696,7 +696,7 @@ void set_rds_defaults(RDSEncoder* enc, uint8_t program) {
void init_rds_encoder(RDSEncoder* enc) {
for(int i = 0; i < PROGRAMS; i++) set_rds_defaults(enc, i);
if (encoder_saved()) encoder_loadFromFile(enc);
if (encoder_saved() && encoder_loadFromFile(enc)) lua_on_init();
else {
encoder_saveToFile(enc);
lua_on_init();