Skip to content

Instantly share code, notes, and snippets.

View mcspr's full-sized avatar
⚕️
don't let it steal your eyes

Max Prokhorov mcspr

⚕️
don't let it steal your eyes
View GitHub Profile
@mcspr
mcspr / show_template.cpp
Last active December 25, 2019 21:04
Show tasmota template as text
#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
#include <cstdint>
#include <functional>
#include <iostream>
#include <memory>
#include <queue>
#include <vector>
struct JsonObject {};
diff --git a/code/espurna/button.cpp b/code/espurna/button.cpp
index da8acc5b..fc9eb0dd 100644
--- a/code/espurna/button.cpp
+++ b/code/espurna/button.cpp
@@ -715,24 +715,35 @@ void buttonSetup() {
_buttons.reserve(buttons);
- // TODO: allow to change gpio pin type based on config?
- #if (BUTTON_EVENTS_SOURCE == BUTTON_EVENTS_SOURCE_GENERIC)
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();
#include <ESP8266WiFi.h>
void setup() {
delay(1000);
Serial.begin(115200);
Serial.println();
WiFi.mode(WIFI_OFF);
}
struct Auth {