mirror of https://github.com/lumapu/ahoy.git
Browse Source
* fixed timestamp for alarms send over MqTT * auto-patch of `AsyncWebServer` #834, #1036 * Update documentation in Git regarding `ESP8266` default NRF24 pin assignmentspull/1121/head
lumapu
1 year ago
7 changed files with 54 additions and 9 deletions
@ -0,0 +1,13 @@ |
|||||
|
diff --git a/src/WebResponses.cpp b/src/WebResponses.cpp
|
||||
|
index 22a549f..e0b36b3 100644
|
||||
|
--- a/src/WebResponses.cpp
|
||||
|
+++ b/src/WebResponses.cpp
|
||||
|
@@ -318,7 +318,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;
|
||||
|
while(outLen < headLen + 4) buf[outLen++] = ' '; |
||||
|
buf[outLen++] = '\r'; |
||||
|
buf[outLen++] = '\n'; |
@ -0,0 +1,20 @@ |
|||||
|
import os |
||||
|
import subprocess |
||||
|
Import("env") |
||||
|
|
||||
|
def applyPatch(libName, patchFile): |
||||
|
os.chdir('.pio/libdeps/' + env['PIOENV'] + '/' + libName) |
||||
|
|
||||
|
process = subprocess.run(['git', 'apply', '--reverse', '--check', '../../../../' + patchFile], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) |
||||
|
if (process.returncode == 0): |
||||
|
print('\'' + patchFile + '\' already applied') |
||||
|
else: |
||||
|
process = subprocess.run(['git', 'apply', '../../../../' + patchFile]) |
||||
|
if (process.returncode == 0): |
||||
|
print('\'' + patchFile + '\' applied') |
||||
|
else: |
||||
|
print('applying \'' + patchFile + '\' failed') |
||||
|
|
||||
|
|
||||
|
# list of patches to apply (relative to /src) |
||||
|
applyPatch("ESP Async WebServer", "../patches/AsyncWeb_Prometheus.patch") |
Loading…
Reference in new issue