mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-25 14:56:11 +02:00
0.6.6
* increased distance for `import` button in mobile view #879 * changed `led_high_active` to `bool` #879
This commit is contained in:
parent
1e1696ca15
commit
48ce948ede
6 changed files with 14 additions and 11 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//-------------------------------------
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 6
|
||||
#define VERSION_PATCH 5
|
||||
#define VERSION_PATCH 6
|
||||
|
||||
//-------------------------------------
|
||||
typedef struct {
|
||||
|
|
|
@ -3,3 +3,4 @@
|
|||
<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}"/>
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
|
|
|
@ -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…
Add table
Add a link
Reference in a new issue