We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
replace:
WiFiEventHandler ESP8266WiFiGenericClass::onWiFiModeChange(std::function<void(const WiFiEventModeChange&)> f) { WiFiEventHandler handler = std::make_shared<WiFiEventHandlerOpaque>(WIFI_EVENT_MODE_CHANGE, [f](System_Event_t* e){ WiFiEventModeChange& dst = *reinterpret_cast<WiFiEventModeChange*>(&e->event_info.opmode_changed); f(dst); }); sCbEventList.push_back(handler); return handler; }
with:
WiFiEventHandler ESP8266WiFiGenericClass::onWiFiModeChange(std::function<void(const WiFiEventModeChange&)> f) { WiFiEventHandler handler = std::make_shared<WiFiEventHandlerOpaque>(WIFI_EVENT_MODE_CHANGE, [f](System_Event_t* e){ auto& src = e->event_info.opmode_changed; WiFiEventModeChange dst; dst.oldMode = (WiFiMode)src.old_opmode; dst.newMode = (WiFiMode)src.new_opmode; f(dst); }); sCbEventList.push_back(handler); return handler; }
The text was updated successfully, but these errors were encountered:
@RastoH can you provide a small example of the issue that you patch is solving?
Sorry, something went wrong.
sorry, original line:
WiFiEventModeChange& dst = reinterpret_cast<WiFiEventModeChange>(&e->event_info);
handler caled, but oldMode and newMode values always 0
@RastoH will you open a pull request or are you ok if I do that?
make it. thnx
Successfully merging a pull request may close this issue.
replace:
with:
The text was updated successfully, but these errors were encountered: