Calling system flags ie SPARK_WLAN_RESET or WLAN_CONNECTING

Just wondering if anyone knows how I can set system flags within my code? I am looking to reset the SPARK_WLAN_RESET so that all previously set flags are cleared like wifi_connecting,etc.

Some example code is below:

if(earlyWiFiOFF && battPower && millis() - sleepDelay > 20000){
                Particle.disconnect();
                WiFi.disconnect();
                WLAN_CONNECTING = 0;
                //SPARK_WLAN_RESET = 1;
                WiFi.off(); //safety shut off.
                earlyWiFiOFF = false;
              }```

https://github.com/spark/firmware/blob/9a99ba61c7b6399ccdf8a1238d05803beb7bd1ee/system/system-flags.md

Hey @mdma are you able to help them with this?

These flags are internal to the system. To clear the flags, you could try turning WiFi.off() then on again.

I submitted a git issue for this one, looks like its being investigated there.