Skip to content

Commit

Permalink
wifi: export func to serialize mac address
Browse files Browse the repository at this point in the history
  • Loading branch information
mcspr committed Jun 13, 2024
1 parent afe7a62 commit 94b3340
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions code/espurna/wifi.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ enum class ApMode {
};

} // namespace wifi

namespace settings {
namespace internal {

String serialize(wifi::Mac);

} // namespace internal
} // namespace settings
} // namespace espurna

// Note that 'connected' status is *only* for the WiFi STA.
Expand Down
3 changes: 2 additions & 1 deletion code/espurna/ws.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ void _wsUpdateSta(JsonObject& root) {
}

root[F("ssid")] = network.ssid;
root[F("bssid")] = network.bssid;
root[F("bssid")] =
::espurna::settings::internal::serialize(network.bssid);
root[F("channel")] = network.channel;
root[F("staip")] = ip.toString();
}
Expand Down

0 comments on commit 94b3340

Please sign in to comment.