Open FredM67 opened 3 years ago
So I'm totally stucked.... I've put "everywhere" debug lines to print "ctrl_mode"... I cannot find where, during the first seconds after reboot, the variable is turned from "Off" to "On".... May be it's somewhere in a javascript file ?!?
Ok, got it.... the problem is on line 202 or src.ino. At each reboot, the condition on line 200 is true and it leads to turn ctrl_mode from "Off" to "On".
BTW, I don't understand what's the purpose of this block. Is it specific to an environment ? For emonesp, except a couple of time at the beginning of the boot, we never go inside the "if", even after pushing the "GPIO0" button.
Start with a "blank" chip, with default config. "ctrl_mode" defaults to "Off". At the end of setup(), ctrl_mode is "Off". After a couple of loop(), it turns to "On". I'm still searching where the variable gets changed.