chore: Update esp-wifi-connect version in idf_component.yml and refac… (#1769)
* chore: Update esp-wifi-connect version in idf_component.yml and refactor event callback in WifiBoard class - Bumped esp-wifi-connect version from ~3.0.2 to ~3.1.1 in idf_component.yml. - Refactored the event callback in WifiBoard to use a string parameter for SSID data, improving clarity and consistency in network event handling. * refactor: Change logging level for OpusHead and OpusTags detection in OggDemuxer - Updated log statements from ESP_LOGI to ESP_LOGD for OpusHead and OpusTags found events, improving log verbosity control.
This commit is contained in:
@ -59,17 +59,16 @@ void WifiBoard::StartNetwork() {
|
||||
wifi_manager.Initialize(config);
|
||||
|
||||
// Set unified event callback - forward to NetworkEvent with SSID data
|
||||
wifi_manager.SetEventCallback([this, &wifi_manager](WifiEvent event) {
|
||||
std::string ssid = wifi_manager.GetSsid();
|
||||
wifi_manager.SetEventCallback([this](WifiEvent event, const std::string& data) {
|
||||
switch (event) {
|
||||
case WifiEvent::Scanning:
|
||||
OnNetworkEvent(NetworkEvent::Scanning);
|
||||
break;
|
||||
case WifiEvent::Connecting:
|
||||
OnNetworkEvent(NetworkEvent::Connecting, ssid);
|
||||
OnNetworkEvent(NetworkEvent::Connecting, data);
|
||||
break;
|
||||
case WifiEvent::Connected:
|
||||
OnNetworkEvent(NetworkEvent::Connected, ssid);
|
||||
OnNetworkEvent(NetworkEvent::Connected, data);
|
||||
break;
|
||||
case WifiEvent::Disconnected:
|
||||
OnNetworkEvent(NetworkEvent::Disconnected);
|
||||
|
||||
Reference in New Issue
Block a user