From 48ce948ede2c657680ea60a0acfadc668abc159a Mon Sep 17 00:00:00 2001 From: lumapu Date: Wed, 12 Apr 2023 22:50:37 +0200 Subject: [PATCH] 0.6.6 * increased distance for `import` button in mobile view #879 * changed `led_high_active` to `bool` #879 --- src/CHANGES.md | 4 ++++ src/app.cpp | 8 +++----- src/config/settings.h | 6 +++--- src/defines.h | 2 +- src/web/html/includes/header.html | 3 ++- src/web/html/setup.html | 2 +- 6 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/CHANGES.md b/src/CHANGES.md index bfe6eb31..4e5900ad 100644 --- a/src/CHANGES.md +++ b/src/CHANGES.md @@ -1,5 +1,9 @@ # Development Changes +## 0.6.6 - 2023-04-12 +* increased distance for `import` button in mobile view #879 +* changed `led_high_active` to `bool` #879 + ## 0.6.5 - 2023-04-11 * fix #845 MqTT subscription for `ctrl/power/[IV-ID]` was missing * merge PR #876, check JSON settings during read for existance diff --git a/src/app.cpp b/src/app.cpp index 7a0e5f2a..d2d87f50 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -389,8 +389,7 @@ void app::mqttSubRxCb(JsonObject obj) { //----------------------------------------------------------------------------- void app::setupLed(void) { - - uint8_t led_off = (mConfig->led.led_high_active != 0) ? LOW : HIGH; + uint8_t led_off = (mConfig->led.led_high_active) ? LOW : HIGH; if (mConfig->led.led0 != 0xff) { pinMode(mConfig->led.led0, OUTPUT); @@ -404,9 +403,8 @@ void app::setupLed(void) { //----------------------------------------------------------------------------- void app::updateLed(void) { - - uint8_t led_off = (mConfig->led.led_high_active != 0) ? LOW : HIGH; - uint8_t led_on = (mConfig->led.led_high_active != 0) ? HIGH : LOW; + uint8_t led_off = (mConfig->led.led_high_active) ? LOW : HIGH; + uint8_t led_on = (mConfig->led.led_high_active) ? HIGH : LOW; if (mConfig->led.led0 != 0xff) { Inverter<> *iv = mSys.getInverterByPos(0); diff --git a/src/config/settings.h b/src/config/settings.h index dc5a4408..d04fdce5 100644 --- a/src/config/settings.h +++ b/src/config/settings.h @@ -105,7 +105,7 @@ typedef struct { typedef struct { uint8_t led0; // first LED pin uint8_t led1; // second LED pin - uint8_t led_high_active; // determines if LEDs are high or low active + bool led_high_active; // determines if LEDs are high or low active } cfgLed_t; typedef struct { @@ -384,7 +384,7 @@ class settings { mCfg.led.led0 = DEF_PIN_OFF; mCfg.led.led1 = DEF_PIN_OFF; - mCfg.led.led_high_active = LOW; + mCfg.led.led_high_active = false; memset(&mCfg.inst, 0, sizeof(cfgInst_t)); @@ -528,7 +528,7 @@ class settings { } else { getVal(obj, F("0"), &mCfg.led.led0); getVal(obj, F("1"), &mCfg.led.led1); - getVal(obj, F("act_high"), &mCfg.led.led_high_active); + getVal(obj, F("act_high"), &mCfg.led.led_high_active); } } diff --git a/src/defines.h b/src/defines.h index f4adc55e..b3a961a1 100644 --- a/src/defines.h +++ b/src/defines.h @@ -13,7 +13,7 @@ //------------------------------------- #define VERSION_MAJOR 0 #define VERSION_MINOR 6 -#define VERSION_PATCH 5 +#define VERSION_PATCH 6 //------------------------------------- typedef struct { diff --git a/src/web/html/includes/header.html b/src/web/html/includes/header.html index d591eb42..ab3b0545 100644 --- a/src/web/html/includes/header.html +++ b/src/web/html/includes/header.html @@ -2,4 +2,5 @@ - \ No newline at end of file + + diff --git a/src/web/html/setup.html b/src/web/html/setup.html index 97bf5608..32484308 100644 --- a/src/web/html/setup.html +++ b/src/web/html/setup.html @@ -292,7 +292,7 @@ Import / Export JSON Settings
Import
-
+