mirror of https://github.com/lumapu/ahoy.git
lumapu
10 months ago
39 changed files with 913 additions and 383 deletions
@ -1,26 +1,26 @@ |
|||
diff --git a/src/AsyncWebSocket.cpp b/src/AsyncWebSocket.cpp
|
|||
index 12be5f8..cffeed7 100644
|
|||
index 6e88da9..09359c3 100644
|
|||
--- a/src/AsyncWebSocket.cpp
|
|||
+++ b/src/AsyncWebSocket.cpp
|
|||
@@ -737,7 +737,7 @@ void AsyncWebSocketClient::binary(const __FlashStringHelper *data, size_t len)
|
|||
IPAddress AsyncWebSocketClient::remoteIP() const |
|||
{ |
|||
if (!_client) |
|||
- return IPAddress(0U);
|
|||
+ return IPAddress();
|
|||
@@ -827,7 +827,7 @@ void AsyncWebSocketClient::binary(AsyncWebSocketMessageBuffer * buffer)
|
|||
|
|||
IPAddress AsyncWebSocketClient::remoteIP() { |
|||
if(!_client) { |
|||
- return IPAddress((uint32_t)0);
|
|||
+ return IPAddress();
|
|||
} |
|||
return _client->remoteIP(); |
|||
} |
|||
diff --git a/src/WebResponses.cpp b/src/WebResponses.cpp
|
|||
index 22a549f..e0b36b3 100644
|
|||
index a22e991..babef18 100644
|
|||
--- a/src/WebResponses.cpp
|
|||
+++ b/src/WebResponses.cpp
|
|||
@@ -318,7 +318,7 @@ size_t AsyncAbstractResponse::_ack(AsyncWebServerRequest *request, size_t len, u
|
|||
@@ -317,7 +317,7 @@ size_t AsyncAbstractResponse::_ack(AsyncWebServerRequest *request, size_t len, u
|
|||
free(buf); |
|||
return 0; |
|||
} |
|||
- outLen = sprintf_P((char*)buf+headLen, PSTR("%x"), readLen) + headLen;
|
|||
+ outLen = sprintf_P((char*)buf+headLen, PSTR("%04x"), readLen) + headLen;
|
|||
- outLen = sprintf((char*)buf+headLen, "%x", readLen) + headLen;
|
|||
+ outLen = sprintf((char*)buf+headLen, "%04x", readLen) + headLen;
|
|||
while(outLen < headLen + 4) buf[outLen++] = ' '; |
|||
buf[outLen++] = '\r'; |
|||
buf[outLen++] = '\n'; |
|||
|
@ -0,0 +1,44 @@ |
|||
//-----------------------------------------------------------------------------
|
|||
// 2024 Ahoy, https://ahoydtu.de
|
|||
// Creative Commons - http://creativecommons.org/licenses/by-nc-sa/4.0/deed
|
|||
//-----------------------------------------------------------------------------
|
|||
|
|||
#ifndef __PLUGIN_LANG_H__ |
|||
#define __PLUGIN_LANG_H__ |
|||
|
|||
#ifdef LANG_DE |
|||
#define STR_MONTHNAME_3_CHAR_LIST "ErrJanFebMrzAprMaiJunJulAugSepOktNovDez" |
|||
#define STR_DAYNAME_3_CHAR_LIST "ErrSonMonDieMitDonFreSam" |
|||
#define STR_OFFLINE "aus" |
|||
#define STR_ONLINE "aktiv" |
|||
#define STR_NO_INVERTER "kein inverter" |
|||
#define STR_NO_WIFI "WLAN nicht verbunden" |
|||
#define STR_VERSION "Version" |
|||
#define STR_ACTIVE_INVERTERS "aktive WR" |
|||
#define STR_TODAY "heute" |
|||
#define STR_TOTAL "Gesamt" |
|||
#elif LANG_FR |
|||
#define STR_MONTHNAME_3_CHAR_LIST "ErrJanFevMarAvrMaiJunJulAouSepOctNovDec" |
|||
#define STR_DAYNAME_3_CHAR_LIST "ErrDimLunMarMerJeuVenSam" |
|||
#define STR_OFFLINE "eteint" |
|||
#define STR_ONLINE "online" |
|||
#define STR_NO_INVERTER "pas d'onduleur" |
|||
#define STR_NO_WIFI "WiFi not connected" |
|||
#define STR_VERSION "Version" |
|||
#define STR_ACTIVE_INVERTERS "active Inv" |
|||
#define STR_TODAY "today" |
|||
#define STR_TOTAL "total" |
|||
#else |
|||
#define STR_MONTHNAME_3_CHAR_LIST "ErrJanFebMarAprMayJunJulAugSepOctNovDec" |
|||
#define STR_DAYNAME_3_CHAR_LIST "ErrSunMonTueWedThuFriSat" |
|||
#define STR_OFFLINE "offline" |
|||
#define STR_ONLINE "online" |
|||
#define STR_NO_INVERTER "no inverter" |
|||
#define STR_NO_WIFI "WiFi not connected" |
|||
#define STR_VERSION "Version" |
|||
#define STR_ACTIVE_INVERTERS "active Inv" |
|||
#define STR_TODAY "today" |
|||
#define STR_TOTAL "total" |
|||
#endif |
|||
|
|||
#endif /*__PLUGIN_LANG_H__*/ |
Loading…
Reference in new issue