mirror of https://github.com/arendst/Tasmota.git
Free some more bytes from GPIOViewer
This commit is contained in:
parent
9fc47b7d90
commit
1854b9a069
|
@ -18,7 +18,7 @@
|
|||
#define XDRV_121 121
|
||||
|
||||
#ifndef GV_PORT
|
||||
#define GV_PORT 5557
|
||||
#define GV_PORT 5557 // SSE webserver port
|
||||
#endif
|
||||
#ifndef GV_SAMPLING_INTERVAL
|
||||
#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
|
||||
|
||||
const char HTTP_GV_EVENT[] PROGMEM =
|
||||
// Set CORS headers for global responses
|
||||
"HTTP/1.1 200 OK\n"
|
||||
"Content-Type: text/event-stream;\n"
|
||||
"Connection: keep-alive\n"
|
||||
"Cache-Control: no-cache\n"
|
||||
"Access-Control-Allow-Origin: *\n\n";
|
||||
"Content-Type: text/event-stream;\n" // Server Sent Event protocol
|
||||
"Connection: keep-alive\n" // Permanent connection
|
||||
"Cache-Control: no-cache\n" // Do not store data into local cache
|
||||
"Access-Control-Allow-Origin: *\n\n"; // Enable CORS
|
||||
|
||||
enum GVPinTypes {
|
||||
GV_DigitalPin = 0,
|
||||
|
@ -172,8 +171,8 @@ void GVCloseEvent(void) {
|
|||
void GVEventSend(const char *message, const char *event, uint32_t id) {
|
||||
if (GV.WebClient.connected()) {
|
||||
// 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("id: %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\nevent:%s\ndata:%s\n\n"), id, event, message);
|
||||
} else {
|
||||
GVEventDisconnected();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue