minor cosmetic updates

This commit is contained in:
Paul
2019-08-16 22:23:48 +02:00
parent 479c69436f
commit b6c8fa8331
6 changed files with 29 additions and 17 deletions

View File

@@ -30,15 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Merged with @susisstrolch's TxMode2 branch for improved support for sending EMS packages, and removed tx_mode command - Merged with @susisstrolch's TxMode2 branch for improved support for sending EMS packages, and removed tx_mode command
- Renamed heartbeat to mqtt_heartbeat - Renamed heartbeat to mqtt_heartbeat
- Renamed MQTT topic "wwactivated" to "boiler_cmd_wwactivated" - Renamed MQTT topic "wwactivated" to "boiler_cmd_wwactivated"
- Completely new web code with more features
## [1.9.0b1_web] 2019-08-02
### Breaking changes for first time use
### Added
- New web code
- New MyESP code optimizations - New MyESP code optimizations
- Magic Fairy dust - Magic Fairy dust

View File

@@ -2215,7 +2215,7 @@ void MyESP::_sendEventLog(uint8_t page) {
char buffer[MYESP_JSON_MAXSIZE]; char buffer[MYESP_JSON_MAXSIZE];
size_t len = serializeJson(root, buffer); size_t len = serializeJson(root, buffer);
//Serial.printf("\nEVENTLOG: page %d\n", page); // turn on for debugging XXX //Serial.printf("\nEVENTLOG: page %d\n", page); // turn on for debugging
//serializeJson(root, Serial); // turn on for debugging //serializeJson(root, Serial); // turn on for debugging
_ws->textAll(buffer, len); _ws->textAll(buffer, len);
@@ -2282,10 +2282,21 @@ void MyESP::_procMsg(AsyncWebSocketClient * client, size_t sz) {
// Check whatever the command is and act accordingly // Check whatever the command is and act accordingly
if (strcmp(command, "configfile") == 0) { if (strcmp(command, "configfile") == 0) {
fs_saveConfig(root); if (_ota_pre_callback_f) {
_shouldRestart = true; (_ota_pre_callback_f)();
}
_shouldRestart = fs_saveConfig(root);
if (_ota_post_callback_f) {
(_ota_post_callback_f)();
}
} else if (strcmp(command, "custom_configfile") == 0) { } else if (strcmp(command, "custom_configfile") == 0) {
fs_saveCustomConfig(root); if (_ota_pre_callback_f) {
(_ota_pre_callback_f)();
}
(void)fs_saveCustomConfig(root);
if (_ota_post_callback_f) {
(_ota_post_callback_f)();
}
} else if (strcmp(command, "status") == 0) { } else if (strcmp(command, "status") == 0) {
_sendStatus(); _sendStatus();
} else if (strcmp(command, "custom_status") == 0) { } else if (strcmp(command, "custom_status") == 0) {

View File

@@ -190,8 +190,8 @@ struct RtcmemData {
static_assert(sizeof(RtcmemData) <= (RTCMEM_BLOCKS * 4u), "RTCMEM struct is too big"); static_assert(sizeof(RtcmemData) <= (RTCMEM_BLOCKS * 4u), "RTCMEM struct is too big");
#define MYESP_SYSTEM_CHECK_TIME 60000 // The system is considered stable after these many millis (1 minute) #define MYESP_SYSTEM_CHECK_TIME 60000 // The system is considered stable after these many millis (1 minute)
#define MYESP_SYSTEM_CHECK_MAX 10 // After this many crashes on boot #define MYESP_SYSTEM_CHECK_MAX 10 // After this many crashes on boot
#define MYESP_HEARTBEAT_INTERVAL 120000 // in milliseconds, how often the MQTT heartbeat is sent (2 mins) #define MYESP_HEARTBEAT_INTERVAL 120000 // in milliseconds, how often the MQTT heartbeat is sent (2 mins)
typedef struct { typedef struct {

View File

@@ -225,6 +225,7 @@
</div> </div>
</div> </div>
<div class="row form-group" style="text-align: center;"> <div class="row form-group" style="text-align: center;">
<button onclick="refreshEMS()" class="btn btn-primary">Refresh Data</button> <button onclick="refreshStatus()" class="btn btn-primary">Refresh</button>
</div> </div>
</div> </div>

View File

@@ -487,4 +487,8 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row form-group" style="text-align: center;">
<button onclick="refreshStatus()" class="btn btn-primary">Refresh</button>
</div>
<br>
</div> </div>

View File

@@ -994,5 +994,9 @@ function refreshEMS() {
websock.send("{\"command\":\"custom_status\"}"); websock.send("{\"command\":\"custom_status\"}");
} }
function refreshStatus() {
websock.send("{\"command\":\"status\"}");
}
document.addEventListener("touchstart", handleTouchStart, false); document.addEventListener("touchstart", handleTouchStart, false);
document.addEventListener("touchmove", handleTouchMove, false); document.addEventListener("touchmove", handleTouchMove, false);