Ken Van Hoeylandt e6abd496f9
Various improvements (#461)
* **New Features**
  * Time and delay utilities added (ticks, ms, µs); SD card now uses an expansion-header CS pin; HTTP downloads warn when run on the GUI task and yield to avoid blocking.

* **Bug Fixes / Reliability**
  * Many hard-crash paths converted to guarded checks to reduce abrupt termination and improve stability.

* **Tests**
  * Unit tests added to validate time and delay accuracy.

* **Chores**
  * License header and build/macro updates.
2026-01-27 08:04:21 +01:00

36 lines
947 B
C++

#include <Tactility/service/wifi/Wifi.h>
#include <Tactility/Check.h>
#include <Tactility/CoreDefines.h>
#include <Tactility/service/ServiceManifest.h>
#include <Tactility/service/ServiceRegistration.h>
namespace tt::service::wifi {
const char* radioStateToString(RadioState state) {
switch (state) {
using enum RadioState;
case OnPending:
return TT_STRINGIFY(OnPending);
case On:
return TT_STRINGIFY(On);
case ConnectionPending:
return TT_STRINGIFY(ConnectionPending);
case ConnectionActive:
return TT_STRINGIFY(ConnectionActive);
case OffPending:
return TT_STRINGIFY(OffPending);
case Off:
return TT_STRINGIFY(Off);
}
check(false, "not implemented");
}
extern const ServiceManifest manifest;
std::shared_ptr<ServiceContext> findServiceContext() {
return findServiceContextById(manifest.id);
}
}