This file contains hidden or 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 <ESP8266WiFi.h> | |
void setup() { | |
delay(1000); | |
Serial.begin(115200); | |
Serial.println(); | |
WiFi.mode(WIFI_OFF); | |
} | |
struct Auth { |
This file contains hidden or 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/cores/esp8266/WString.cpp b/cores/esp8266/WString.cpp | |
index 07ab99b..81175fa 100644 | |
--- a/cores/esp8266/WString.cpp | |
+++ b/cores/esp8266/WString.cpp | |
@@ -36,6 +36,7 @@ String::String(const char *cstr) { | |
} | |
String::String(const String &value) { | |
+ Serial.printf("%p copy from %p\n", this, &value); | |
init(); |
This file contains hidden or 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 <cstdint> | |
#include <functional> | |
#include <iostream> | |
#include <memory> | |
#include <queue> | |
#include <vector> | |
struct JsonObject {}; |
This file contains hidden or 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 <cstdint> | |
#include <cstdio> | |
#include <cassert> | |
#include <string> | |
// Arduino-specific defines | |
#define ARDUINOJSON_ENABLE_PROGMEM 0 | |
#define pgm_read_byte(x) static_cast<uint8_t>(*x) | |
#define PROGMEM |
This file contains hidden or 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(); |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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) |
NewerOlder