WiFi fixes and improvements (#100)
This commit is contained in:
committed by
GitHub
parent
33bb742dfb
commit
e9c02ab58e
@@ -0,0 +1,33 @@
|
||||
#include <Check.h>
|
||||
#include "WifiManage.h"
|
||||
|
||||
namespace tt::app::wifimanage {
|
||||
|
||||
void State::setScanning(bool isScanning) {
|
||||
tt_check(mutex.acquire(TtWaitForever) == TtStatusOk);
|
||||
scanning = isScanning;
|
||||
tt_check(mutex.release() == TtStatusOk);
|
||||
}
|
||||
|
||||
void State::setRadioState(service::wifi::WifiRadioState state) {
|
||||
tt_check(mutex.acquire(TtWaitForever) == TtStatusOk);
|
||||
radioState = state;
|
||||
tt_check(mutex.release() == TtStatusOk);
|
||||
}
|
||||
|
||||
const std::vector<service::wifi::WifiApRecord>& State::lockApRecords() const {
|
||||
tt_check(mutex.acquire(TtWaitForever) == TtStatusOk);
|
||||
return apRecords;
|
||||
}
|
||||
|
||||
void State::unlockApRecords() const {
|
||||
tt_check(mutex.release() == TtStatusOk);
|
||||
}
|
||||
|
||||
void State::updateApRecords() {
|
||||
tt_check(mutex.acquire(TtWaitForever) == TtStatusOk);
|
||||
apRecords = service::wifi::getScanResults();
|
||||
tt_check(mutex.release() == TtStatusOk);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
Reference in New Issue
Block a user