mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-03-30 17:02:12 +02:00
55
This commit is contained in:
parent
16175f2b9b
commit
07369e7e4c
4 changed files with 11 additions and 6 deletions
|
|
@ -87,3 +87,5 @@ pio pkg exec -p tool-esptoolpy -- esptool.py --port COM9 read_flash 0x3F0000 0x1
|
||||||
|
|
||||||
|
|
||||||
esp-coredump info_corefile --core coredump.bin --core-format=raw --gdb C:\Users\oem\.platformio\packages\toolchain-xtensa-esp32\bin\xtensa-esp32-elf-gdb.exe .pio\build\esp32dev\firmware.elf > coredump_report.txt
|
esp-coredump info_corefile --core coredump.bin --core-format=raw --gdb C:\Users\oem\.platformio\packages\toolchain-xtensa-esp32\bin\xtensa-esp32-elf-gdb.exe .pio\build\esp32dev\firmware.elf > coredump_report.txt
|
||||||
|
|
||||||
|
C:\Users\oem\.platformio\packages\framework-espidf\export.ps1
|
||||||
|
|
@ -30,10 +30,10 @@ enum class radio_proto : byte { // Ordinal byte 0-255
|
||||||
};
|
};
|
||||||
enum class somfy_commands : byte {
|
enum class somfy_commands : byte {
|
||||||
Unknown0 = 0x0,
|
Unknown0 = 0x0,
|
||||||
My = 0x1,
|
My = 0x2,//DOWN
|
||||||
Up = 0x2,
|
Up = 0x3,
|
||||||
MyUp = 0x3,
|
MyUp = 0x4, //up
|
||||||
Down = 0x4,
|
Down = 0x1,
|
||||||
MyDown = 0x5,
|
MyDown = 0x5,
|
||||||
UpDown = 0x6,
|
UpDown = 0x6,
|
||||||
MyUpDown = 0x7,
|
MyUpDown = 0x7,
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ void setup() {
|
||||||
net.setup();
|
net.setup();
|
||||||
somfy.begin();
|
somfy.begin();
|
||||||
//git.checkForUpdate();
|
//git.checkForUpdate();
|
||||||
esp_task_wdt_init(7, true); //enable panic so ESP32 restarts
|
esp_task_wdt_init(15, true); //enable panic so ESP32 restarts
|
||||||
esp_task_wdt_add(NULL); //add current thread to WDT watch
|
esp_task_wdt_add(NULL); //add current thread to WDT watch
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,12 +46,15 @@ void JsonResponse::endResponse() {
|
||||||
server->sendContent("", 0);
|
server->sendContent("", 0);
|
||||||
}
|
}
|
||||||
void JsonResponse::send() {
|
void JsonResponse::send() {
|
||||||
|
Serial.println("JsonResponse::send start ");
|
||||||
|
unsigned long ts = millis();
|
||||||
esp_task_wdt_reset();
|
esp_task_wdt_reset();
|
||||||
if(!this->_headersSent) server->send_P(200, "application/json", this->buff);
|
if(!this->_headersSent) server->send_P(200, "application/json", this->buff);
|
||||||
else server->sendContent(this->buff);
|
else server->sendContent(this->buff);
|
||||||
//Serial.printf("Sent %d bytes %d\n", strlen(this->buff), this->buffSize);
|
//Serial.printf("Sent %d bytes %d\n", strlen(this->buff), this->buffSize);
|
||||||
this->buff[0] = 0x00;
|
this->buff[0] = 0x00;
|
||||||
this->_headersSent = true;
|
this->_headersSent = true;
|
||||||
|
Serial.printf("JsonResponse::send end took %d ms\n", millis() - ts);
|
||||||
}
|
}
|
||||||
void JsonResponse::_safecat(const char *val, bool escape) {
|
void JsonResponse::_safecat(const char *val, bool escape) {
|
||||||
size_t len = (escape ? this->calcEscapedLength(val) : strlen(val)) + strlen(this->buff);
|
size_t len = (escape ? this->calcEscapedLength(val) : strlen(val)) + strlen(this->buff);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue