Various improvements (#264)
- Replace C function pointers with C++ `std::function` in `Thread`, `Timer` and `DispatcherThread` - Rename `SystemEvent`-related functions - WiFi: fix auto-connect when WiFi disconnects from bad signal - WiFi: fix auto-connect when WiFi fails to auto-connect - WiFi: implement disconnect() when tapping connected WiFi ap in WiFi management app
This commit is contained in:
committed by
GitHub
parent
d72852a6e2
commit
3f1bfee3f5
@@ -117,7 +117,7 @@ private:
|
||||
lv_obj_add_event_cb(btn, &onListItemSelectedCallback, LV_EVENT_SHORT_CLICKED, (void*)index);
|
||||
}
|
||||
|
||||
static void updateTimerCallback(std::shared_ptr<void> context) {
|
||||
static void updateTimerCallback() {
|
||||
auto appContext = getCurrentAppContext();
|
||||
if (appContext != nullptr && appContext->getManifest().id == manifest.id) {
|
||||
auto app = std::static_pointer_cast<TimeZoneApp>(appContext->getApp());
|
||||
@@ -231,7 +231,7 @@ public:
|
||||
}
|
||||
|
||||
void onCreate(AppContext& app) override {
|
||||
updateTimer = std::make_unique<Timer>(Timer::Type::Once, updateTimerCallback, nullptr);
|
||||
updateTimer = std::make_unique<Timer>(Timer::Type::Once, []() { updateTimerCallback(); });
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user