Cleanup and improvements (#194)

- Lots of changes for migrating C code to C++
- Improved `Lockable` in several ways like adding `withLock()` (+ tests)
- Improved `Semaphore` a bit for improved readability, and also added some tests
- Upgrade Linux machine in GitHub Actions so that we can compile with a newer GCC
- Simplification of WiFi connection
- Updated funding options
- (and more)
This commit is contained in:
Ken Van Hoeylandt
2025-01-28 17:39:58 +01:00
committed by GitHub
parent 1bb1260ea0
commit 6c67845645
54 changed files with 518 additions and 531 deletions
@@ -91,14 +91,15 @@ static void wifiManageEventCallback(const void* message, void* context) {
TT_LOG_I(TAG, "Update with state %s", service::wifi::radioStateToString(radio_state));
wifi->getState().setRadioState(radio_state);
switch (event->type) {
case tt::service::wifi::EventType::ScanStarted:
using enum tt::service::wifi::EventType;
case ScanStarted:
wifi->getState().setScanning(true);
break;
case tt::service::wifi::EventType::ScanFinished:
case ScanFinished:
wifi->getState().setScanning(false);
wifi->getState().updateApRecords();
break;
case tt::service::wifi::EventType::RadioStateOn:
case RadioStateOn:
if (!service::wifi::isScanning()) {
service::wifi::scan();
}