mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 12:46:34 +00:00
Free some more bytes from GPIOViewer
This commit is contained in:
parent
9fc47b7d90
commit
1854b9a069
@ -18,7 +18,7 @@
|
|||||||
#define XDRV_121 121
|
#define XDRV_121 121
|
||||||
|
|
||||||
#ifndef GV_PORT
|
#ifndef GV_PORT
|
||||||
#define GV_PORT 5557
|
#define GV_PORT 5557 // SSE webserver port
|
||||||
#endif
|
#endif
|
||||||
#ifndef GV_SAMPLING_INTERVAL
|
#ifndef GV_SAMPLING_INTERVAL
|
||||||
#define GV_SAMPLING_INTERVAL 100 // [GvSampling] milliseconds - Use Tasmota Scheduler (100) or Ticker (20..99,101..1000)
|
#define GV_SAMPLING_INTERVAL 100 // [GvSampling] milliseconds - Use Tasmota Scheduler (100) or Ticker (20..99,101..1000)
|
||||||
@ -49,12 +49,11 @@ const char *GVRelease = "1.0.7";
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char HTTP_GV_EVENT[] PROGMEM =
|
const char HTTP_GV_EVENT[] PROGMEM =
|
||||||
// Set CORS headers for global responses
|
|
||||||
"HTTP/1.1 200 OK\n"
|
"HTTP/1.1 200 OK\n"
|
||||||
"Content-Type: text/event-stream;\n"
|
"Content-Type: text/event-stream;\n" // Server Sent Event protocol
|
||||||
"Connection: keep-alive\n"
|
"Connection: keep-alive\n" // Permanent connection
|
||||||
"Cache-Control: no-cache\n"
|
"Cache-Control: no-cache\n" // Do not store data into local cache
|
||||||
"Access-Control-Allow-Origin: *\n\n";
|
"Access-Control-Allow-Origin: *\n\n"; // Enable CORS
|
||||||
|
|
||||||
enum GVPinTypes {
|
enum GVPinTypes {
|
||||||
GV_DigitalPin = 0,
|
GV_DigitalPin = 0,
|
||||||
@ -172,8 +171,8 @@ void GVCloseEvent(void) {
|
|||||||
void GVEventSend(const char *message, const char *event, uint32_t id) {
|
void GVEventSend(const char *message, const char *event, uint32_t id) {
|
||||||
if (GV.WebClient.connected()) {
|
if (GV.WebClient.connected()) {
|
||||||
// generateEventMessage() in AsyncEventSource.cpp
|
// generateEventMessage() in AsyncEventSource.cpp
|
||||||
// GV.WebClient.printf_P(PSTR("retry: 0\r\nid: %u\r\nevent: %s\r\ndata: %s\r\n\r\n"), id, event, message);
|
// GV.WebClient.printf_P(PSTR("retry:0\nid:%u\nevent:%s\ndata:%s\n\n"), id, event, message);
|
||||||
GV.WebClient.printf_P(PSTR("id: %u\r\nevent: %s\r\ndata: %s\r\n\r\n"), id, event, message);
|
GV.WebClient.printf_P(PSTR("id:%u\nevent:%s\ndata:%s\n\n"), id, event, message);
|
||||||
} else {
|
} else {
|
||||||
GVEventDisconnected();
|
GVEventDisconnected();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user