From 72ddee9061b4e8f71d406a93b23cac43493a2dcc Mon Sep 17 00:00:00 2001 From: Gregg Date: Sat, 21 May 2022 17:26:27 -0500 Subject: [PATCH] Add weakly-define Arduino loop() function (defined as NO OP) Allows you to compile a sketch without defining the Arduino loop() function. Useful in cases where homeSpan.autoPoll() is used instead. --- src/HomeSpan.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/HomeSpan.cpp b/src/HomeSpan.cpp index d25f631..05e7de0 100644 --- a/src/HomeSpan.cpp +++ b/src/HomeSpan.cpp @@ -2119,6 +2119,11 @@ void SpanOTA::error(ota_error_t err){ /////////////////////////////// +void __attribute__((weak)) loop(){ +} + +/////////////////////////////// + int SpanOTA::otaPercent; boolean SpanOTA::safeLoad; boolean SpanOTA::enabled=false;