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

ui/networking: do not skip the connected network #29396

Merged

Conversation

deanlee
Copy link
Contributor

@deanlee deanlee commented Aug 14, 2023

resolve #28688

Comment on lines 114 to 119
auto it = seenNetworks.find(ssid);
if (it != seenNetworks.end()) {
if (it.value().connected != ConnectedType::DISCONNECTED || it.value().strength >= strength) {
continue;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure this uses the max signal strength and still updates the connected status? if it's connected, it will always continue and never update the strength. perhaps we just update the Network in each section of this for loop.

Copy link
Contributor Author

@deanlee deanlee Aug 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seenNetworks is cleared before loop. all items in it are update-to-date. never mind.I misunderstood


SecurityType security = getSecurityType(properties);
ConnectedType ctype = ConnectedType::DISCONNECTED;
seenNetworks[ssid].security_type = getSecurityType(properties);
if (path.path() == activeAp) {
Copy link
Contributor

@sshane sshane Aug 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@deanlee looks like this is only true for the current access point, right? If so, does my change LGTY?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@sshane sshane merged commit b8b1e17 into commaai:master Aug 17, 2023
18 checks passed
@sshane
Copy link
Contributor

sshane commented Aug 17, 2023

thanks!

@deanlee deanlee deleted the ui_networking_dont_skip_connected_network branch August 18, 2023 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

three: won't show access point as connected even though it has an IP
2 participants