WiFi fixes and improvements (#100)
This commit is contained in:
committed by
GitHub
parent
33bb742dfb
commit
e9c02ab58e
@@ -1,24 +1,34 @@
|
||||
#pragma once
|
||||
|
||||
#include "Mutex.h"
|
||||
#include "WifiManageView.h"
|
||||
#include "View.h"
|
||||
#include "State.h"
|
||||
#include "service/wifi/Wifi.h"
|
||||
|
||||
namespace tt::app::wifimanage {
|
||||
|
||||
typedef struct {
|
||||
PubSubSubscription* wifi_subscription;
|
||||
Mutex* mutex;
|
||||
WifiManageState state;
|
||||
WifiManageView view;
|
||||
bool view_enabled;
|
||||
WifiManageBindings bindings;
|
||||
} WifiManage;
|
||||
class WifiManage {
|
||||
|
||||
void lock(WifiManage* wifi);
|
||||
PubSubSubscription* wifiSubscription = nullptr;
|
||||
Mutex mutex;
|
||||
tt::app::wifimanage::State state;
|
||||
tt::app::wifimanage::View view;
|
||||
Bindings bindings = { };
|
||||
bool isViewEnabled = false;
|
||||
|
||||
void unlock(WifiManage* wifi);
|
||||
public:
|
||||
|
||||
void request_view_update(WifiManage* wifi);
|
||||
WifiManage();
|
||||
|
||||
void lock();
|
||||
void unlock();
|
||||
|
||||
void onShow(App& app, lv_obj_t* parent);
|
||||
void onHide(App& app);
|
||||
|
||||
State& getState() { return state; }
|
||||
|
||||
void requestViewUpdate();
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user