From b179c6cc4534af548e12795880ad67eb23fe0308 Mon Sep 17 00:00:00 2001 From: fvanroie Date: Mon, 23 May 2022 10:17:25 +0200 Subject: [PATCH] Only run command scripts in HASP mode --- platformio.ini | 2 +- src/main_arduino.cpp | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/platformio.ini b/platformio.ini index bb8d1f9a..d7d936ed 100644 --- a/platformio.ini +++ b/platformio.ini @@ -67,7 +67,7 @@ build_flags = -D HASP_VER_MAJ=0 -D HASP_VER_MIN=6 ;-D HASP_VER_REV=3 - -D HASP_VER_REV=3-rc2 + -D HASP_VER_REV=3-rc3 ${override.build_flags} ; -- Shared library dependencies in all environments diff --git a/src/main_arduino.cpp b/src/main_arduino.cpp index c021b53e..559a6b56 100644 --- a/src/main_arduino.cpp +++ b/src/main_arduino.cpp @@ -58,10 +58,11 @@ void setup() dispatchSetup(); // before hasp and oobe, asap after logging starts guiSetup(); + bool oobe = false; #if HASP_USE_CONFIG > 0 - if(!oobeSetup()) + oobe = oobeSetup(); #endif - { + if(!oobe) { haspSetup(); } @@ -117,8 +118,10 @@ void setup() // guiStart(); delay(20); - dispatch_exec(NULL, "L:/boot.cmd", TAG_HASP); - wifi_run_scripts(); + if(!oobe) { + dispatch_exec(NULL, "L:/boot.cmd", TAG_HASP); + wifi_run_scripts(); + } mainLastLoopTime = -1000; // reset loop counter }