Fix format specifier for SSID debug log in WifiConnector::connect - #385
Open
qwerty1979bg wants to merge 1 commit into
Open
Fix format specifier for SSID debug log in WifiConnector::connect#385qwerty1979bg wants to merge 1 commit into
qwerty1979bg wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
One-character fix:
%d→%sin theSerial.printfcall that logs theconfigured SSID before attempting to connect to it.
Why
wifiSSID.c_str()is aconst char*;%dexpects anint. The mismatchmeant the log never showed the actual SSID — just the pointer value
interpreted as a decimal integer. Doesn't crash on this target (pointer and
intare both 4 bytes on ESP32), but the diagnostic was silently useless.This is how it looked in the logs:
Attempt connect to configured ssid: 1070229276(While the SSID is something else and not a literal 1070229276)
Fixes #384
Test plan
the real SSID instead of a numeric value
Note: drafted with AI assistance, verified manually