-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Improve WiFi scan result display #10253
Conversation
Signed-off-by: DL6ER <dl6er@dl6er.de>
This is a nice feature but I'm not in favor of spending precious flash space for a cosmetic feature used only once in the lifetime of the device. Even if we were to add the feature, avoid |
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
41e35af
to
1d4a341
Compare
Current
My branch:
If we leave off the description of the WiFi encryption type (because it shouldn't really matter), we get my new scanning display at a mere 96 bytes of extra space:
|
The failed CI run seems to be a mistake of the CI itself:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With both suggested changes, you should be at only +64 bytes.
delay(0); | ||
|
||
int j = 0; | ||
String nextSSID = ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can save code with
String nextSSID;
You don't need to give it a value, is it still initialized.
tasmota/xdrv_01_webserver.ino
Outdated
if(quality > 50) { | ||
// Scale red component to go from yellow to green (full green) | ||
colors[0] = (0xFF * (100-quality))/50; | ||
} else { | ||
// Scale green component to go from red to yellow (full red) | ||
colors[1] = (0xFF * quality)/50; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can save even more here:
if(quality > 50) {
// Scale red component to go from yellow to green (full green)
colors[0] = changeUIntScale(quality, 50, 100, 0xFF, 0);
} else {
// Scale green component to go from red to yellow (full red)
colors[0] = changeUIntScale(quality, 0, 50, 0, 0xFF);
}
I would also suggest to avoid pure Yellow #FFFF00 which is not readable with light background. Maybe going for a darker version would still do it:
uint8_t colors[2] = { 0xAA, 0xAA };
if(quality > 50) {
// Scale red component to go from yellow to green (full green)
colors[0] = changeUIntScale(quality, 50, 100, 0xAA, 0);
} else {
// Scale green component to go from red to yellow (full red)
colors[0] = changeUIntScale(quality, 0, 50, 0, 0xAA);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I figured that most (all?) will run Tasmota in the standard configuration which seems to be a black background. This seems to be a wrong assumption and getting colors what are visible for all (e.g. green or orange background) is hard if not impossible.
Removing the quality colors isn't much of a loss as the results are anyway sorted by RSSI (= quality) and I still think my improvement brings advantage to the display. Removing the color code, we're down to 597492 bytes so even less (8 bytes) than current development
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As said in the original issue I won't do changes regarding preferred (b)ssid. This change is only half of what needs to be changed as the command line part has not been tackled. Changing that too will increase code while current functionality is good enough for most users. As it stands I won't merge but I will keep it in mind. |
This change is not meant at all into the direction of preferred BSSID, it just helps users to get a better picture of their WiFi neighborhood at the exact location of the Tasmota device. Hence, I also felt no need to change the command line part. Concerning BSSID, I can see |
… with arbitrary background colors. Signed-off-by: DL6ER <dl6er@dl6er.de>
No offence at all but did you notice you are using the same channel on equal ssids? The general approach is to NOT have the same channels on near APs. They should not overlap as if they do they interfere eachother. If you manage to change them you'll see tasmota will much easier switch to the strongest signal AP. |
I have the very widely used Fritz!Box in its "Mesh" configuration. I noticed this defect as well, however, the manufacturer says that it is expected. I set both 2.4 GHz and 5GHz to "auto-channel". As result, the 2.4 GHz WiFi are all on the same channel. The interesting bit to note is that the 5GHz are all on different channels... And, of course, the channels can only be configured at the "master", not allowing any manual intervention as to what channels the individual APs use. Feel free to close the PR if this is not where you think the project should be going. I'll rather concentrate on features rather than UI tweaks in the future (even when we have a variant right now that uses even less Flash than the current |
Add BSSID and Signal Strength Indicator to GUI wifi scan result (#10253)
In the end it became this: at the cost of over 500 bytes (!) but I would like to see the Signal Strength Indicator. It can be disabled by removing Thx for the idea. NB. To not needing translations and screwing up GUI I do not display texts like "Channel" or "Quality". The Italians tend to use abnormal long names for simple things ;-) |
Description:
Checklist:
I cannot test ESP32 myself, however, compilation passes fine.
This improves WiFi scan results:
Exemplary screenshots:
Further less important details like encryption type and RSSI are hidden in a tooltip, like