From 47cf5388e39e043b08e2662435485ef1d84e7b2e Mon Sep 17 00:00:00 2001 From: Robin Dietzel Date: Fri, 3 Feb 2023 12:50:09 +0100 Subject: [PATCH] Minor UI improvements --- floatpump/Core/Src/main.cpp | 9 +++++---- floatpump/Middlewares/floatpump/Src/Menu.cpp | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/floatpump/Core/Src/main.cpp b/floatpump/Core/Src/main.cpp index 8db61a0..f5e9f5c 100644 --- a/floatpump/Core/Src/main.cpp +++ b/floatpump/Core/Src/main.cpp @@ -326,23 +326,24 @@ int main(void) { //Execute Calibrations if necessary if (a_caliblow) { - tankLevel0.calibrateLow(); controller.execute(); - HAL_Delay(2000); + tankLevel0.calibrateLow(); a_caliblow = false; } else if (a_calibhigh) { - tankLevel0.calibrateHigh(); controller.execute(); - HAL_Delay(2000); + tankLevel0.calibrateHigh(); a_calibhigh = false; } //Store or restore if necessary if (f_store) { + controller.execute(); Config_Store::getInstance().saveToFlash(); f_store = false; } else if (f_restore) { + controller.execute(); Config_Store::getInstance().loadFromFlash(); + HAL_Delay(300); f_restore = false; } diff --git a/floatpump/Middlewares/floatpump/Src/Menu.cpp b/floatpump/Middlewares/floatpump/Src/Menu.cpp index a48309f..7f69155 100644 --- a/floatpump/Middlewares/floatpump/Src/Menu.cpp +++ b/floatpump/Middlewares/floatpump/Src/Menu.cpp @@ -19,7 +19,7 @@ namespace floatpump::menu { } auto MenuEntryExecute::toString() -> std::string { - return buildString({(*m_storage) ? "[--]" : "[XX]"}); + return buildString({(*m_storage) ? "[-]" : "[X]"}); } auto MenuEntryNumeric::u_press() -> void {