Environment | Downloads |
---|---|
itead-sonoff-rfbridge | 2303 |
itead-sonoff-basic | 2180 |
itead-sonoff-pow | 1163 |
itead-s20 | 831 |
itead-sonoff-th | 757 |
nodemcu-lolin | 663 |
itead-sonoff-basic-dht | 441 |
itead-sonoff-rf | 423 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <functional> | |
#include <iostream> | |
#include <vector> | |
template <typename Event> | |
class Broker { | |
public: | |
virtual ~Broker() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduino.h> | |
#include <ESP8266WiFi.h> | |
#include <ESPAsyncWebServer.h> | |
#include <AsyncWebSocket.h> | |
#include "mtu_break_progmem.h" | |
AsyncWebServer server(80); | |
AsyncWebSocket ws("/ws"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/AsyncWebSocket.cpp b/src/AsyncWebSocket.cpp | |
index f507aa7..9499414 100644 | |
--- a/src/AsyncWebSocket.cpp | |
+++ b/src/AsyncWebSocket.cpp | |
@@ -536,6 +536,7 @@ void AsyncWebSocketClient::_runQueue(){ | |
while(!_messageQueue.isEmpty() && _messageQueue.front()->finished()){ | |
_messageQueue.remove(_messageQueue.front()); | |
} | |
+ Serial.printf("> _runQueue() size:%u heap:%u\n", _messageQueue.length(), ESP.getFreeHeap()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Arduino.h> | |
#ifdef ESP8266 | |
#include <ESP8266WiFi.h> | |
#include <ESPAsyncTCP.h> | |
#elif ESP32 | |
#include <WiFi.h> | |
#include <AsyncTCP.h> | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import("env") | |
import os | |
PROJECT_CFG = env.GetProjectConfig() | |
STORAGE = os.path.join(env["PROJECT_DIR"], PROJECT_CFG.get("common", "shared_libdeps_dir")) | |
LIB_DEPS = env.GetProjectOption("lib_deps") | |
#print("using", STORAGE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ g++ -std=c++17 -o hsv hsv.cpp | |
$ ./hsv 2,100,59 | |
brightness=0, rgb=0,0,0 | |
input=2,100,59 | |
_setRGBInputValue(255,8,0) | |
brightness=150, rgb=255,8,0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/tools/sdk/lwip2/include/lwipopts.h b/tools/sdk/lwip2/include/lwipopts.h | |
index 22acb6b4..fcd7ba4e 100644 | |
--- a/tools/sdk/lwip2/include/lwipopts.h | |
+++ b/tools/sdk/lwip2/include/lwipopts.h | |
@@ -3571,9 +3571,9 @@ extern "C" { | |
#define SNTP_SET_SYSTEM_TIME_US(t,us) do { struct timeval tv = { t, us }; settimeofday(&tv, NULL); } while (0) | |
#define SNTP_UPDATE_DELAY_DEFAULT 3600000 | |
-#define SNTP_SUPPRESS_DELAY_CHECK 1 | |
-#define SNTP_UPDATE_DELAY sntp_update_delay_not_less_than_15000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arrays | |
{"relays":{"gpio":[15,15,15,15,15,15,15,15,15,15],"type":[1,1,1,1,1,1,1,1,1,1],"reset":[153,153,153,153,153,153,153,153,153,153],"boot":[2,2,2,2,2,2,2,2,2,2],"pulse":[1,1,1,1,1,1,1,1,1,1],"pulse_time":[3600,3600,3600,3600,3600,3600,3600,3600,3600,3600],"group":["something/else","something/else","something/else","something/else","something/else","something/else","something/else","something/else","something/else","something/else"],"group_sync":[2,2,2,2,2,2,2,2,2,2],"on_disc":[0,0,0,0,0,0,0,0,0,0]}} | |
objs | |
{"relays":[{"gpio":15,"type":1,"reset":153,"boot":2,"pulse":1,"pulse_time":3600,"group":"something/else","group_sync":2,"on_disc":0},{"gpio":15,"type":1,"reset":153,"boot":2,"pulse":1,"pulse_time":3600,"group":"something/else","group_sync":2,"on_disc":0},{"gpio":15,"type":1,"reset":153,"boot":2,"pulse":1,"pulse_time":3600,"group":"something/else","group_sync":2,"on_disc":0},{"gpio":15,"type":1,"reset":153,"boot":2,"pulse":1,"pulse_time":3600,"group":"something/else","group_sync":2,"on_disc":0},{"gpio":15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ArduinoJson.h> | |
#include <iostream> | |
int main(int argc, char **argv) { | |
DynamicJsonBuffer buffer(1024); | |
JsonObject& shared = buffer.createObject(); | |
JsonObject& a = buffer.createObject(); | |
JsonObject& b = buffer.createObject(); |
OlderNewer