Comments (14)
๐
I had this on one of my other issues and it was closed, I forgot to pull it out into its own issues.
This becomes a bit more complicated quickly as there could be some secure some open, different signal levels so you gotta max the best one for display, maybe also show the count (n) so you know it is a institutional AP.
It almost becomes easier to do in js.
from wifimanager.
it would be easier to do in js... maybe it s worth considering, as then you would only have to pass the array to js, and a progmem string containing the actual js...
what i m mostly worried about is uncontrolable growth and memory usage with this, which is not justified in my mind as you are really only using the lib once in a blue moon to make your life easier, but decreases resources on your ESP at all times...
from wifimanager.
i am close this, don t think there s a big need for it really
if anyone strongly feels different, reopen for another discussion
from wifimanager.
Im gonna pr it regardless
from wifimanager.
:))
thank you, i ll reopen then
from wifimanager.
@tablatronix Shawn, i just have a thought.
If you are considering going down the javascript route for this, which it would be a lot easier, there a new function i added to add custom elements. ( `setCustomHeadElement("<script> function doSomething() {}</script>")
it could be then offered as a custom head/script snippet that anyone can add, and whoever is not interested can choose to skip it.
there could be a whole range of customisations offered like this for maximum flexibility
from wifimanager.
I was gonna just do another n2 loop and remove them but only if there are duplicates detected, but I noticed you changed your sort loop to std::sort comparison
Is it any faster ?
I guess a map might work, I barely know C though and had a hard time trying to modify references in a lambda. shrug.
I was also going to use the sort loop to check if there was any dups before bothering another loop.
Or do them both in one loop, but it wound up being easier to not combine the two in case the sort algorithm needed to change for memory vs speed on different platforms. I imagine n2 loop is pretty fast even at 16mhz...
Ill look at the JS solution again since you added that callout.
from wifimanager.
welcome to the club, i barely know c as well :)
the std::sort came from a discussion on how to best do it. i doubt very much that at the amount of n s we have, it will make any difference. it was more of a try and see if you can do it kind of thing :d
any way of doing it would probably not have much impact, it might make sense to pull the networks in an array before any looping first, that might make it faster...
js would be interesting, maybe with a count as well, but that would probably waste the most memory as well...
from wifimanager.
yeah i looked at a hash table and it was not worth even looking at for memory, the extra microsecond for a n2 loop was better, for eg i have 22 duplicate network at this one location, more elsewhere.
hmm but there will probably only ever be 1 or 2 duplicate ids...
from wifimanager.
Well it looks like std::sort uses quicksort and is around 30% faster in my real world test.
from wifimanager.
from wifimanager.
I added _removeDupAps
global in case you want to expose it or toggle it.
Adds 7ms to my code, for 22 dups. negligible.
from wifimanager.
Cool :-)
from wifimanager.
that s perfect, will pull it in a bit later and add the toggle for it
boy you ve got lots of networks :))
from wifimanager.
Related Issues (20)
- Dedicated Parameter Page HOT 1
- Unable to save/retrieve custom variables in WiFiManager
- Q: ESP Reboot after successful initial connection to own wifi possible (bind issue with Async Webserver from AP to STA)
- Esp32 wroom 32 UE
- Question: Is there a way to detect if the WiFi connection is successful before the config portal closes? HOT 1
- Force remove DNS input from Captive portal
- Question: Is possible change deep link to redirect to an App instead of Captive Portal HOT 3
- Add new Release to platformio HOT 5
- Custom Param doesn't load when starting ConfigPortal on demand & WiFi has been already connected.
- Hi
- How to refresh (repaint) custom param element on setValue() HOT 2
- unable to do OTA update for esp32 s3. update failed due to error in downloading version. unable to find the where the exact issue is?
- OTA UPDATE ISSUE HOT 1
- Changing STA config's authmode causes the STA config's SSID to become empty
- Custom configuration, on demand server, and invoking web server for future config updates
- Get stored SSID before connection is made, to connect to strongest of multiple identical SSIDs HOT 2
- CN language strings ็้ข่ฎพ็ฝฎไธบไธญๆ็่งฃๅณๅๆณ HOT 2
- Blue LED HOT 1
- OnDemand AP fails with unhandled exception HOT 2
- Enhancement request : reconnect to AP when available, even if portal was started
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wifimanager.