Skip to content

Commit 6b11e25

Browse files
committed
add image to readme and only print password length
1 parent 506d222 commit 6b11e25

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

components/wifi/example/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,7 @@ idf.py -p PORT flash monitor
3636
(To exit the serial monitor, type ``Ctrl-]``.)
3737

3838
See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects.
39+
40+
### Example Output
41+
42+
<img width="1885" height="4148" alt="CleanShot 2025-10-25 at 23 48 55" src="https://github.com/user-attachments/assets/86b791b6-6dd4-4c4a-985c-7050413c8680" />

components/wifi/include/wifi_ap.hpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -441,11 +441,12 @@ namespace fmt {
441441
template <> struct formatter<espp::WifiAp::Config> : fmt::formatter<std::string> {
442442
template <typename FormatContext>
443443
auto format(const espp::WifiAp::Config &config, FormatContext &ctx) const {
444-
return fmt::format_to(ctx.out(),
445-
"WifiAp::Config {{ ssid: '{}', password: '{}', phy_rate: {}, channel: "
446-
"{}, max_number_of_stations: {} }}",
447-
config.ssid, config.password, config.phy_rate, config.channel,
448-
config.max_number_of_stations);
444+
return fmt::format_to(
445+
ctx.out(),
446+
"WifiAp::Config {{ ssid: '{}', password length: {}, phy_rate: {}, channel: "
447+
"{}, max_number_of_stations: {} }}",
448+
config.ssid, config.password.size(), config.phy_rate, config.channel,
449+
config.max_number_of_stations);
449450
}
450451
};
451452
} // namespace fmt

components/wifi/include/wifi_sta.hpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -632,11 +632,12 @@ template <> struct formatter<espp::WifiSta::Config> : fmt::formatter<std::string
632632
auto format(const espp::WifiSta::Config &config, FormatContext &ctx) const {
633633
return fmt::format_to(
634634
ctx.out(),
635-
"WifiSta::Config {{ ssid: '{}', password: '{}', phy_rate: {}, num_connect_retries: {}, "
635+
"WifiSta::Config {{ ssid: '{}', password length: {}, phy_rate: {}, num_connect_retries: "
636+
"{}, "
636637
"channel: {}, set_ap_mac: {}, ap_mac: {:02x}:{:02x}:{:02x}:{:02x}:{:02x}:{:02x} }}",
637-
config.ssid, config.password, config.phy_rate, config.num_connect_retries, config.channel,
638-
config.set_ap_mac, config.ap_mac[0], config.ap_mac[1], config.ap_mac[2], config.ap_mac[3],
639-
config.ap_mac[4], config.ap_mac[5]);
638+
config.ssid, config.password.size(), config.phy_rate, config.num_connect_retries,
639+
config.channel, config.set_ap_mac, config.ap_mac[0], config.ap_mac[1], config.ap_mac[2],
640+
config.ap_mac[3], config.ap_mac[4], config.ap_mac[5]);
640641
}
641642
};
642643

0 commit comments

Comments
 (0)