From 9e3f6c8303a159c4f7ca5a7bdade66e2ed37a839 Mon Sep 17 00:00:00 2001 From: Gregg Date: Fri, 24 Nov 2023 10:30:20 -0600 Subject: [PATCH] Override new operator for SpanAccessory, SpanService, and SpanCharacteristic New Operator now uses PSRAM if available, else uses Internal RAM. Obviates the need for the ps_new() macro, though will keep definition since it may be useful for any class that does not already override malloc() to use PSRAM. --- src/HomeSpan.cpp | 6 +++--- src/HomeSpan.h | 7 +++++-- src/Settings.h | 2 +- src/src.ino | 26 +++++++++++++------------- 4 files changed, 22 insertions(+), 19 deletions(-) diff --git a/src/HomeSpan.cpp b/src/HomeSpan.cpp index 99cb3ef..8ac4089 100644 --- a/src/HomeSpan.cpp +++ b/src/HomeSpan.cpp @@ -185,9 +185,9 @@ void Span::pollTask() { HAPClient::init(); // read NVS and load HAP settings - if(heap_caps_get_minimum_free_size(MALLOC_CAP_DEFAULT)