Ken Van Hoeylandt f34440eb6f
Fixes and improvements (#132)
- Fix glitch when turning on WiFi: It would temporarily show "No networks found" right before starting the first scan.
- Fix spinner to use Assets.h
- Replace statusbar battery icons 
- Better statusbar icon for when WiFi is on but not connected
- Replace statusbar WiFi icons and Wifi Manage RSSI/lock icons
- Fix for crash when timer is null in I2cScanner
- Deprecate Spacer
- Fixes for toolbar layout (simplified)
- Improved ImageViewer app: center image and add filename text on the bottom
- Add LV debug params to sdkconfig.developer
- Disabled LV spinner, msgbox and window widgets. These have equivalents in Tactility.
2024-12-17 23:32:43 +01:00

41 lines
907 B
C++

#pragma once
#include "service/wifi/Wifi.h"
#include "Mutex.h"
namespace tt::app::wifimanage {
/**
* View's state
*/
class State {
Mutex mutex = Mutex(Mutex::TypeRecursive);
bool scanning = false;
bool scannedAfterRadioOn = false;
service::wifi::WifiRadioState radioState;
std::vector<service::wifi::WifiApRecord> apRecords;
std::string connectSsid;
public:
State() {}
void setScanning(bool isScanning);
bool isScanning() const;
bool hasScannedAfterRadioOn() const { return scannedAfterRadioOn; }
void setRadioState(service::wifi::WifiRadioState state);
service::wifi::WifiRadioState getRadioState() const;
void updateApRecords();
const std::vector<service::wifi::WifiApRecord>& lockApRecords() const;
void unlockApRecords() const;
void setConnectSsid(std::string ssid);
std::string getConnectSsid() const;
};
} // namespace