From 68c251226d2173f0bf0d0ac6b6cf6abd5ef254f1 Mon Sep 17 00:00:00 2001 From: David Gauchard Date: Wed, 6 Sep 2023 22:35:41 +0200 Subject: [PATCH] minor fixes for restoring warning-less emulation on host for debugging (using emuAsync, see main readme) --- examples/completeExample/completeExample.cpp | 5 +++-- examples/completeExample/completeExample.ino | 3 +++ examples/gui-generic-api/gui-generic-api.ino | 2 +- examples/gui/gui.ino | 2 +- examples/tabbedGui/tabbedGui.ino | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/examples/completeExample/completeExample.cpp b/examples/completeExample/completeExample.cpp index 364a4f9..f81231c 100644 --- a/examples/completeExample/completeExample.cpp +++ b/examples/completeExample/completeExample.cpp @@ -35,7 +35,7 @@ #warning use decorators: { HeapSelectIram doAllocationsInIRAM; ESPUI.addControl(...) ... } (cf. https://arduino-esp8266.readthedocs.io/en/latest/mmu.html#how-to-select-heap) #warning then check http:///heap #endif // MMU_IRAM_HEAP -#ifndef DEBUG_ESP_OOM +#if !defined(DEBUG_ESP_OOM) && !defined(CORE_MOCK) #error on ESP8266 and ESPUI, you must define OOM debug option when developping #endif #endif @@ -396,7 +396,7 @@ void extendedCallback(Control* sender, int type, void* param) Serial.print(sender->label); Serial.print("' = "); Serial.println(sender->value); - Serial.println(String("param = ") + String((int)param)); + Serial.println(String("param = ") + String((long)param)); } void setup() { @@ -443,6 +443,7 @@ void loop() { #if !defined(ESP32) ((void (*)())0xf00fdead)(); #endif + break; default: Serial.print('#'); break; diff --git a/examples/completeExample/completeExample.ino b/examples/completeExample/completeExample.ino index ff7bd09..a4db808 100644 --- a/examples/completeExample/completeExample.ino +++ b/examples/completeExample/completeExample.ino @@ -1 +1,4 @@ // placeholder +#if CORE_MOCK +#include "completeExample.cpp" +#endif diff --git a/examples/gui-generic-api/gui-generic-api.ino b/examples/gui-generic-api/gui-generic-api.ino index 815e66d..003ce48 100644 --- a/examples/gui-generic-api/gui-generic-api.ino +++ b/examples/gui-generic-api/gui-generic-api.ino @@ -16,7 +16,7 @@ DNSServer dnsServer; #warning use decorators: { HeapSelectIram doAllocationsInIRAM; ESPUI.addControl(...) ... } (cf. https://arduino-esp8266.readthedocs.io/en/latest/mmu.html#how-to-select-heap) #warning then check http:///heap #endif // MMU_IRAM_HEAP -#ifndef DEBUG_ESP_OOM +#if !defined(DEBUG_ESP_OOM) && !defined(CORE_MOCK) #error on ESP8266 and ESPUI, you must define OOM debug option when developping #endif #endif diff --git a/examples/gui/gui.ino b/examples/gui/gui.ino index 1aca2f1..bcccd82 100644 --- a/examples/gui/gui.ino +++ b/examples/gui/gui.ino @@ -16,7 +16,7 @@ DNSServer dnsServer; #warning use decorators: { HeapSelectIram doAllocationsInIRAM; ESPUI.addControl(...) ... } (cf. https://arduino-esp8266.readthedocs.io/en/latest/mmu.html#how-to-select-heap) #warning then check http:///heap #endif // MMU_IRAM_HEAP -#ifndef DEBUG_ESP_OOM +#if !defined(DEBUG_ESP_OOM) && !defined(CORE_MOCK) #error on ESP8266 and ESPUI, you must define OOM debug option when developping #endif #endif diff --git a/examples/tabbedGui/tabbedGui.ino b/examples/tabbedGui/tabbedGui.ino index 7aa0b2f..d19cebe 100644 --- a/examples/tabbedGui/tabbedGui.ino +++ b/examples/tabbedGui/tabbedGui.ino @@ -16,7 +16,7 @@ DNSServer dnsServer; #warning use decorators: { HeapSelectIram doAllocationsInIRAM; ESPUI.addControl(...) ... } (cf. https://arduino-esp8266.readthedocs.io/en/latest/mmu.html#how-to-select-heap) #warning then check http:///heap #endif // MMU_IRAM_HEAP -#ifndef DEBUG_ESP_OOM +#if !defined(DEBUG_ESP_OOM) && !defined(CORE_MOCK) #error on ESP8266 and ESPUI, you must define OOM debug option when developping #endif #endif