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
+6 -2
View File
@@ -30,8 +30,12 @@ public:
void updateApRecords();
const std::vector<service::wifi::ApRecord>& lockApRecords() const;
void unlockApRecords() const;
template <std::invocable<const std::vector<service::wifi::ApRecord>&> Func>
void withApRecords(Func&& onApRecords) const {
mutex.withLock([&]() {
std::invoke(std::forward<Func>(onApRecords), apRecords);
});
}
void setConnectSsid(const std::string& ssid);
std::string getConnectSsid() const;