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

update NGs after loading from NVS #317

Closed
wants to merge 1 commit into from

Conversation

moshe-braner
Copy link
Contributor

from SetupCommon::initSetup() instead of later in SetupMenu::begin() - this moves, for example, init_routing() to SetupNG. And therefore also moved update_routing() from a menu action function to an NG set() action function. This change will allow being more selective in starting WiFi TCP server tasks, based on individual router settings rather than the bitfield variables as a whole. For example, rt_s1_s2 (which has nothing to do with WiFi) should not require starting up both 8881 and 8882 TCP servers. This cannot be done with init_routing() currently in SetupMenu::begin() since it is called after the WiFi TCP server tasks have been started. I also see other uses for this mechanism later, for example, unpacking additional settings bitfields, and handling an overall master_mode variable.

from SetupCommon::initSetup() instead of later in SetupMenu::begin() - this moves, for example, init_routing() to SetupNG.  And therefore also moved update_routing() from a menu action function to an NG set() action function.  This change will allow being more selective in starting WiFi TCP server tasks, based on individual router settings rather than the bitfield variables as a whole.  For example, rt_s1_s2 (which has nothing to do with WiFi) should not require starting up both 8881 and 8882 TCP servers.
@iltis42
Copy link
Owner

iltis42 commented Aug 4, 2024

Current flexibility in WiFi server task startup is okay for almost any usage.
Beside that, the proclaimed startup of 8881 and 8882 TCP servers, are not started both by rt_s1_s2, but from serial1_speed and serial2_speed, see:

if( serial2_speed.get() != 0 && serial2_tx.get() != 0 ) // makes only sense if there is data from AUX = serial interface S2

Risk of this change without a concrete benefit for the master branch is too high. Unclear what happens in upgrades from older version. Therefore not taken over.

@iltis42 iltis42 closed this Aug 4, 2024
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

Successfully merging this pull request may close these issues.

None yet

2 participants