Browse Source

0.6.6

* increased distance for `import` button in mobile view #879
* changed `led_high_active` to `bool` #879
pull/883/head
lumapu 2 years ago
parent
commit
48ce948ede
  1. 4
      src/CHANGES.md
  2. 8
      src/app.cpp
  3. 6
      src/config/settings.h
  4. 2
      src/defines.h
  5. 3
      src/web/html/includes/header.html
  6. 2
      src/web/html/setup.html

4
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

8
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);

6
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<uint8_t>(obj, F("0"), &mCfg.led.led0);
getVal<uint8_t>(obj, F("1"), &mCfg.led.led1);
getVal<uint8_t>(obj, F("act_high"), &mCfg.led.led_high_active);
getVal<bool>(obj, F("act_high"), &mCfg.led.led_high_active);
}
}

2
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 {

3
src/web/html/includes/header.html

@ -2,4 +2,5 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8">
<script type="text/javascript" src="api.js?v={#VERSION}"></script>
<link rel="stylesheet" type="text/css" href="colors.css?v={#VERSION}"/>
<link rel="stylesheet" type="text/css" href="colors.css?v={#VERSION}"/>
<meta name="robots" content="noindex, nofollow" />

2
src/web/html/setup.html

@ -292,7 +292,7 @@
<legend class="des">Import / Export JSON Settings</legend>
<div class="row mb-4 mt-4">
<div class="col-12 col-sm-3 my-2">Import</div>
<div class="col-12 col-sm-9">
<div class="col-12 col-sm-9 my-2">
<form id="form" method="POST" action="/upload" enctype="multipart/form-data" accept-charset="utf-8">
<input type="file" name="upload">
<input type="button" class="btn" value="Import" onclick="hide()">

Loading…
Cancel
Save