support both SHM and socket read
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
2022-05-03 00:55:01 +02:00
parent c1d754d8ff
commit cce0d5448d
4 changed files with 161 additions and 43 deletions

View File

@@ -24,6 +24,8 @@ class GPSHyperionLinuxController : public ExtendedControllerBase {
public:
static constexpr uint32_t MAX_SECONDS_TO_REACH_FIX = 60 * 60 * 5;
enum ReadModes { SHM = 0, SOCKET = 1 };
GPSHyperionLinuxController(object_id_t objectId, object_id_t parentId,
bool debugHyperionGps = false);
virtual ~GPSHyperionLinuxController();
@@ -48,8 +50,10 @@ class GPSHyperionLinuxController : public ExtendedControllerBase {
LocalDataPoolManager& poolManager) override;
ReturnValue_t handleGpsRead(gps_data_t* gps);
private:
GpsPrimaryDataset gpsSet;
ReadModes readMode = ReadModes::SHM;
Countdown maxTimeToReachFix = Countdown(MAX_SECONDS_TO_REACH_FIX * 1000);
bool modeCommanded = true;
bool timeInit = true;