Fix timer data conversion

This commit is contained in:
elecpower
2021-08-08 09:05:59 +10:00
parent f5dec4e31e
commit b46773c730
@@ -125,7 +125,7 @@ void convertModelData_219_to_220(ModelData &model)
timer.mode = timer_219.mode; timer.mode = timer_219.mode;
} }
else { else {
timer.mode = TMRMODE_START; timer.mode = TMRMODE_ON;
if (timer_219.mode > 0) if (timer_219.mode > 0)
timer.swtch = timer_219.mode - (TMRMODE_COUNT - 1); timer.swtch = timer_219.mode - (TMRMODE_COUNT - 1);
else else
@@ -133,7 +133,12 @@ void convertModelData_219_to_220(ModelData &model)
} }
timer.start = timer_219.start; timer.start = timer_219.start;
timer.value = timer_219.value;
timer.countdownBeep = timer_219.countdownBeep;
timer.minuteBeep = timer_219.minuteBeep;
timer.persistent = timer_219.persistent;
timer.countdownStart = timer_219.countdownStart;
} }
// MixData::name // MixData::name
@@ -175,7 +180,7 @@ void convertModelData_219_to_220(ModelData &model)
convertToStr(model.scriptsData[i].file, LEN_SCRIPT_FILENAME); convertToStr(model.scriptsData[i].file, LEN_SCRIPT_FILENAME);
convertToStr(model.scriptsData[i].name, LEN_SCRIPT_NAME); convertToStr(model.scriptsData[i].name, LEN_SCRIPT_NAME);
} }
// Input names // Input names
for (uint8_t i=0; i<MAX_INPUTS_219; ++i) { for (uint8_t i=0; i<MAX_INPUTS_219; ++i) {
convertToStr(model.inputNames[i], LEN_INPUT_NAME_219); convertToStr(model.inputNames[i], LEN_INPUT_NAME_219);