From d5dc1e029cad15851ccd5538788c3ccca677f0e8 Mon Sep 17 00:00:00 2001 From: pezinek Date: Tue, 12 May 2020 22:08:34 +0200 Subject: [PATCH] rpn: $relayX variables were not populated on boot (#2246) --- code/espurna/main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/espurna/main.cpp b/code/espurna/main.cpp index 3c804351..6138f6c4 100644 --- a/code/espurna/main.cpp +++ b/code/espurna/main.cpp @@ -192,6 +192,10 @@ void setup() { #if LIGHT_PROVIDER != LIGHT_PROVIDER_NONE lightSetup(); #endif + // rpnSetup must be called before relaySetup + #if RPN_RULES_SUPPORT + rpnSetup(); + #endif #if RELAY_SUPPORT relaySetup(); #endif @@ -262,9 +266,6 @@ void setup() { #if SCHEDULER_SUPPORT schSetup(); #endif - #if RPN_RULES_SUPPORT - rpnSetup(); - #endif #if UART_MQTT_SUPPORT uartmqttSetup(); #endif