mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-06 12:41:37 +02:00
improved payload handling (retransmit all fragments on CRC error)
improved `isAvailable`, checkes all record structs, inverter becomes available more early because version is check first fix tickers were not set if NTP is not available disabled annoying `FlashStringHelper` it gives randomly Expeptions during development, feels more stable since then moved erase button to the bottom in settings, not nice but more functional split `tx_count` to `tx_cnt` and `retransmits` in `system.html` fix mqtt retransmit IP address #602 added debug infos for `scheduler` (web -> `/debug` as trigger prints list of tickers to serial console)
This commit is contained in:
parent
3d3e3dc8c6
commit
3adcb68d98
19 changed files with 191 additions and 115 deletions
|
@ -86,6 +86,7 @@ class Web {
|
|||
mWeb.on("/upload", HTTP_POST, std::bind(&Web::onUpload, this, std::placeholders::_1),
|
||||
std::bind(&Web::onUpload2, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4, std::placeholders::_5, std::placeholders::_6));
|
||||
mWeb.on("/serial", HTTP_GET, std::bind(&Web::onSerial, this, std::placeholders::_1));
|
||||
mWeb.on("/debug", HTTP_GET, std::bind(&Web::onDebug, this, std::placeholders::_1));
|
||||
|
||||
|
||||
mEvts.onConnect(std::bind(&Web::onConnect, this, std::placeholders::_1));
|
||||
|
@ -189,12 +190,15 @@ class Web {
|
|||
msg.replace("\r\n", "<rn>");
|
||||
if(mSerialAddTime) {
|
||||
if((9 + mSerialBufFill) <= WEB_SERIAL_BUF_SIZE) {
|
||||
strncpy(&mSerialBuf[mSerialBufFill], mApp->getTimeStr(mApp->getTimezoneOffset()).c_str(), 9);
|
||||
mSerialBufFill += 9;
|
||||
if(mApp->getTimestamp() > 0) {
|
||||
strncpy(&mSerialBuf[mSerialBufFill], mApp->getTimeStr(mApp->getTimezoneOffset()).c_str(), 9);
|
||||
mSerialBufFill += 9;
|
||||
}
|
||||
}
|
||||
else {
|
||||
mSerialBufFill = 0;
|
||||
mEvts.send("webSerial, buffer overflow!", "serial", millis());
|
||||
mEvts.send("webSerial, buffer overflow!<rn>", "serial", millis());
|
||||
return;
|
||||
}
|
||||
mSerialAddTime = false;
|
||||
}
|
||||
|
@ -209,7 +213,7 @@ class Web {
|
|||
}
|
||||
else {
|
||||
mSerialBufFill = 0;
|
||||
mEvts.send("webSerial, buffer overflow!", "serial", millis());
|
||||
mEvts.send("webSerial, buffer overflow!<rn>", "serial", millis());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -649,6 +653,12 @@ class Web {
|
|||
request->send(200, "text/json", "{success:true}");
|
||||
}*/
|
||||
|
||||
void onDebug(AsyncWebServerRequest *request) {
|
||||
mApp->getSchedulerNames();
|
||||
AsyncWebServerResponse *response = request->beginResponse(200, F("text/html"), "ok");
|
||||
request->send(response);
|
||||
}
|
||||
|
||||
void onSerial(AsyncWebServerRequest *request) {
|
||||
DPRINTLN(DBG_VERBOSE, F("onSerial"));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue