From f94735759aef69d0e3933e373b2427557823e8a5 Mon Sep 17 00:00:00 2001 From: Maxim Prokhorov Date: Sat, 8 Apr 2023 15:51:09 +0300 Subject: [PATCH] wifi: small static overhead --- code/espurna/wifi.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/espurna/wifi.cpp b/code/espurna/wifi.cpp index 3047bba4..fd9b7c51 100644 --- a/code/espurna/wifi.cpp +++ b/code/espurna/wifi.cpp @@ -296,6 +296,9 @@ namespace internal { bool enabled { false }; ActionsQueue actions; +State state { State::Boot }; +State last_state { state }; + } // namespace internal void tx_power(float dbm) { @@ -2825,9 +2828,6 @@ bool prepareConnection() { } void loop() { - static State state { State::Boot }; - static State last_state { state }; - if (last_state != state) { DEBUG_MSG_P(PSTR("[WIFI] State %s -> %s\n"), debug::state(last_state),