From a1a0a5a6cfbf0d2e25151a33a10d40b413388ef5 Mon Sep 17 00:00:00 2001 From: Robin Dietzel Date: Fri, 13 Jan 2023 14:19:26 +0100 Subject: [PATCH] BUGFIX: didnt store cooldown value --- Middlewares/floatpump/Inc/Config_Store.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Middlewares/floatpump/Inc/Config_Store.h b/Middlewares/floatpump/Inc/Config_Store.h index 662fa47..b8738ac 100644 --- a/Middlewares/floatpump/Inc/Config_Store.h +++ b/Middlewares/floatpump/Inc/Config_Store.h @@ -44,7 +44,7 @@ namespace floatpump { } void saveToFlash() { - uint32_t data[10]; + uint32_t data[11]; data[0] = TankCalibLow.getValue(); data[1] = TankCalibHigh.getValue(); data[2] = TankMinLevel.getValue(); @@ -55,15 +55,16 @@ namespace floatpump { data[7] = RefillBlockEnable.getValue(); data[8] = RefillBelow.getValue(); data[9] = RefillHysteresis.getValue(); + data[10] = RefillCooldown.getValue(); - StoreInFlash(startAddr, data, 10); + StoreInFlash(startAddr, data, 11); return; }; void resetDefaults(); void loadFromFlash() { - uint32_t data[10]; + uint32_t data[11]; ReadFromFlash(startAddr, data, 10); TankCalibLow.setValue(data[0]); TankCalibHigh.setValue(data[1]); @@ -75,6 +76,7 @@ namespace floatpump { RefillBlockEnable.setValue(data[7]); RefillBelow.setValue(data[8]); RefillHysteresis.setValue(data[9]); + RefillCooldown.setValue(data[10]); return; };