GPS implementation (#216)

Implemented basic GPS support:
- GPS HAL
- GPS Service
- GPS Settings app
This commit is contained in:
Ken Van Hoeylandt
2025-02-11 23:46:52 +01:00
committed by GitHub
parent 2345ba6d13
commit 14e459e50f
36 changed files with 2596 additions and 30 deletions
@@ -0,0 +1,38 @@
#include "Tactility/service/ServiceManifest.h"
#include "Tactility/service/ServiceRegistry.h"
#include "Tactility/service/gps/GpsService.h"
using tt::hal::gps::GpsDevice;
namespace tt::service::gps {
extern ServiceManifest manifest;
static std::shared_ptr<GpsService> findGpsService() {
auto service = findServiceById(manifest.id);
assert(service != nullptr);
return std::static_pointer_cast<GpsService>(service);
}
void addGpsDevice(const std::shared_ptr<GpsDevice>& device) {
return findGpsService()->addGpsDevice(device);
}
void removeGpsDevice(const std::shared_ptr<GpsDevice>& device) {
return findGpsService()->removeGpsDevice(device);
}
bool startReceiving() {
return findGpsService()->startReceiving();
}
void stopReceiving() {
findGpsService()->stopReceiving();
}
bool isReceiving() {
return findGpsService()->isReceiving();
}
} // namespace tt::service::gps