mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-25 06:46:10 +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
|
# 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
|
## 0.6.5 - 2023-04-11
|
||||||
* fix #845 MqTT subscription for `ctrl/power/[IV-ID]` was missing
|
* fix #845 MqTT subscription for `ctrl/power/[IV-ID]` was missing
|
||||||
* merge PR #876, check JSON settings during read for existance
|
* merge PR #876, check JSON settings during read for existance
|
||||||
|
|
|
@ -389,8 +389,7 @@ void app::mqttSubRxCb(JsonObject obj) {
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void app::setupLed(void) {
|
void app::setupLed(void) {
|
||||||
|
uint8_t led_off = (mConfig->led.led_high_active) ? LOW : HIGH;
|
||||||
uint8_t led_off = (mConfig->led.led_high_active != 0) ? LOW : HIGH;
|
|
||||||
|
|
||||||
if (mConfig->led.led0 != 0xff) {
|
if (mConfig->led.led0 != 0xff) {
|
||||||
pinMode(mConfig->led.led0, OUTPUT);
|
pinMode(mConfig->led.led0, OUTPUT);
|
||||||
|
@ -404,9 +403,8 @@ void app::setupLed(void) {
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void app::updateLed(void) {
|
void app::updateLed(void) {
|
||||||
|
uint8_t led_off = (mConfig->led.led_high_active) ? LOW : HIGH;
|
||||||
uint8_t led_off = (mConfig->led.led_high_active != 0) ? LOW : HIGH;
|
uint8_t led_on = (mConfig->led.led_high_active) ? HIGH : LOW;
|
||||||
uint8_t led_on = (mConfig->led.led_high_active != 0) ? HIGH : LOW;
|
|
||||||
|
|
||||||
if (mConfig->led.led0 != 0xff) {
|
if (mConfig->led.led0 != 0xff) {
|
||||||
Inverter<> *iv = mSys.getInverterByPos(0);
|
Inverter<> *iv = mSys.getInverterByPos(0);
|
||||||
|
|
|
@ -105,7 +105,7 @@ typedef struct {
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint8_t led0; // first LED pin
|
uint8_t led0; // first LED pin
|
||||||
uint8_t led1; // second 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;
|
} cfgLed_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -384,7 +384,7 @@ class settings {
|
||||||
|
|
||||||
mCfg.led.led0 = DEF_PIN_OFF;
|
mCfg.led.led0 = DEF_PIN_OFF;
|
||||||
mCfg.led.led1 = 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));
|
memset(&mCfg.inst, 0, sizeof(cfgInst_t));
|
||||||
|
|
||||||
|
@ -528,7 +528,7 @@ class settings {
|
||||||
} else {
|
} else {
|
||||||
getVal<uint8_t>(obj, F("0"), &mCfg.led.led0);
|
getVal<uint8_t>(obj, F("0"), &mCfg.led.led0);
|
||||||
getVal<uint8_t>(obj, F("1"), &mCfg.led.led1);
|
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_MAJOR 0
|
||||||
#define VERSION_MINOR 6
|
#define VERSION_MINOR 6
|
||||||
#define VERSION_PATCH 5
|
#define VERSION_PATCH 6
|
||||||
|
|
||||||
//-------------------------------------
|
//-------------------------------------
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -3,3 +3,4 @@
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<script type="text/javascript" src="api.js?v={#VERSION}"></script>
|
<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" />
|
||||||
|
|
|
@ -292,7 +292,7 @@
|
||||||
<legend class="des">Import / Export JSON Settings</legend>
|
<legend class="des">Import / Export JSON Settings</legend>
|
||||||
<div class="row mb-4 mt-4">
|
<div class="row mb-4 mt-4">
|
||||||
<div class="col-12 col-sm-3 my-2">Import</div>
|
<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">
|
<form id="form" method="POST" action="/upload" enctype="multipart/form-data" accept-charset="utf-8">
|
||||||
<input type="file" name="upload">
|
<input type="file" name="upload">
|
||||||
<input type="button" class="btn" value="Import" onclick="hide()">
|
<input type="button" class="btn" value="Import" onclick="hide()">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue