Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default values get overwritten... wrong behaviour #94

Open
FredM67 opened this issue Oct 20, 2021 · 2 comments
Open

Default values get overwritten... wrong behaviour #94

FredM67 opened this issue Oct 20, 2021 · 2 comments

Comments

@FredM67
Copy link
Contributor

FredM67 commented Oct 20, 2021

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.

@FredM67
Copy link
Contributor Author

FredM67 commented Oct 20, 2021

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 ?!?

@FredM67
Copy link
Contributor Author

FredM67 commented Oct 20, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant