mirror of
https://github.com/lumapu/ahoy.git
synced 2025-08-03 00:18:24 +02:00
0.5.100
fix add inverter `setup.html` #766 fix MQTT retained flag for total values #726 renamed buttons for import and export `setup.html` added serial message `settings saved`
This commit is contained in:
parent
116a1e6a93
commit
6da58e3505
6 changed files with 15 additions and 7 deletions
|
@ -2,6 +2,12 @@
|
|||
|
||||
(starting from release version `0.5.66`)
|
||||
|
||||
## 0.5.100
|
||||
* fix add inverter `setup.html` #766
|
||||
* fix MQTT retained flag for total values #726
|
||||
* renamed buttons for import and export `setup.html`
|
||||
* added serial message `settings saved`
|
||||
|
||||
## 0.5.99
|
||||
* fix limit in [User_Manual.md](../User_Manual.md)
|
||||
* changed `contrast` to `luminance` in `setup.html`
|
||||
|
|
|
@ -210,6 +210,7 @@ class app : public IApp, public ah::Scheduler {
|
|||
onWifi(false);
|
||||
ah::Scheduler::resetTicker();
|
||||
WiFi.disconnect();
|
||||
delay(200);
|
||||
ESP.restart();
|
||||
}
|
||||
|
||||
|
|
|
@ -273,6 +273,7 @@ class settings {
|
|||
}
|
||||
fp.close();
|
||||
|
||||
DPRINTLN(DBG_INFO, F("settings saved"));
|
||||
if(stopFs)
|
||||
stop();
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//-------------------------------------
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 5
|
||||
#define VERSION_PATCH 99
|
||||
#define VERSION_PATCH 100
|
||||
|
||||
//-------------------------------------
|
||||
typedef struct {
|
||||
|
|
|
@ -59,7 +59,7 @@ class PubMqtt {
|
|||
|
||||
if((strlen(mCfgMqtt->user) > 0) && (strlen(mCfgMqtt->pwd) > 0))
|
||||
mClient.setCredentials(mCfgMqtt->user, mCfgMqtt->pwd);
|
||||
snprintf(mClientId, 26, "%s-", mDevName);
|
||||
snprintf(mClientId, 24, "%s-", mDevName);
|
||||
uint8_t pos = strlen(mClientId);
|
||||
mClientId[pos++] = WiFi.macAddress().substring( 9, 10).c_str()[0];
|
||||
mClientId[pos++] = WiFi.macAddress().substring(10, 11).c_str()[0];
|
||||
|
@ -582,8 +582,8 @@ class PubMqtt {
|
|||
|
||||
if (sendTotals) {
|
||||
uint8_t fieldId;
|
||||
bool retained = true;
|
||||
for (uint8_t i = 0; i < 4; i++) {
|
||||
bool retained = true;
|
||||
switch (i) {
|
||||
default:
|
||||
case 0:
|
||||
|
@ -635,7 +635,7 @@ class PubMqtt {
|
|||
// last will topic and payload must be available trough lifetime of 'espMqttClient'
|
||||
char mLwtTopic[MQTT_TOPIC_LEN+5];
|
||||
const char *mDevName, *mVersion;
|
||||
char mClientId[26]; // number of chars is limited to 23 up to v3.1 of MQTT
|
||||
char mClientId[24]; // number of chars is limited to 23 up to v3.1 of MQTT
|
||||
};
|
||||
|
||||
#endif /*__PUB_MQTT_H__*/
|
||||
|
|
|
@ -295,14 +295,14 @@
|
|||
<div class="col-4 col-sm-9">
|
||||
<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="Upload" onclick="hide()">
|
||||
<input type="button" class="btn" value="Import" onclick="hide()">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-4 mt-4">
|
||||
<div class="col-8 col-sm-3">Export</div>
|
||||
<div class="col-4 col-sm-9">
|
||||
<a class="btn" href="/get_setup" target="_blank">Download settings (JSON file)</a><span> (only values, passwords will be removed!)</span>
|
||||
<a class="btn" href="/get_setup" target="_blank">Export settings (JSON file)</a><span> (only values, passwords will be removed!)</span>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
@ -368,7 +368,7 @@
|
|||
|
||||
document.getElementById("btnAdd").addEventListener("click", function() {
|
||||
if(highestId <= (maxInv-1)) {
|
||||
ivHtml(JSON.parse('{"enabled":true,"name":"","serial":"","channels":4,"ch_max_power":[0,0,0,0],"ch_name":["","","",""],"ch_yield_cor":[0,0,0,0]}'), highestId);
|
||||
ivHtml(JSON.parse('{"enabled":true,"name":"","serial":"","channels":4,"ch_max_pwr":[0,0,0,0],"ch_name":["","","",""],"ch_yield_cor":[0,0,0,0]}'), highestId);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue