diff --git a/linux/devices/GpsHyperionLinuxController.cpp b/linux/devices/GpsHyperionLinuxController.cpp index 9f3ebbbd..e557f5c2 100644 --- a/linux/devices/GpsHyperionLinuxController.cpp +++ b/linux/devices/GpsHyperionLinuxController.cpp @@ -94,8 +94,8 @@ void GpsHyperionLinuxController::setResetPinTriggerFunction(gpioResetFunction_t ReturnValue_t GpsHyperionLinuxController::performOperation(uint8_t opCode) { while (true) { - bool noDataRead = readGpsDataFromGpsd(); - if (noDataRead) { + bool callAgain = readGpsDataFromGpsd(); + if (not callAgain) { handleQueue(); poolManager.performHkOperation(); } @@ -137,7 +137,7 @@ ReturnValue_t GpsHyperionLinuxController::handleCommandMessage(CommandMessage *m return ExtendedControllerBase::handleCommandMessage(message); } -#ifdef FSFW_OSAL_LINUX +void GpsHyperionLinuxController::performControlOperation() {} bool GpsHyperionLinuxController::readGpsDataFromGpsd() { auto readError = [&](int error) { @@ -159,7 +159,7 @@ bool GpsHyperionLinuxController::readGpsDataFromGpsd() { } if (result == -1) { readError(result); - return false; + return true; } if (MODE_SET != (MODE_SET & gps.set)) { if (mode == MODE_ON) { @@ -327,5 +327,3 @@ ReturnValue_t GpsHyperionLinuxController::handleGpsReadData() { } return returnvalue::OK; } - -#endif diff --git a/linux/devices/GpsHyperionLinuxController.h b/linux/devices/GpsHyperionLinuxController.h index 829857b2..d2dc91b6 100644 --- a/linux/devices/GpsHyperionLinuxController.h +++ b/linux/devices/GpsHyperionLinuxController.h @@ -67,9 +67,8 @@ class GpsHyperionLinuxController : public ExtendedControllerBase { uint32_t timeIsConstantCounter = 0; Countdown timeUpdateCd = Countdown(60); - // Returns true if data was read and function should be called again - // immediately, and false if the gps_waiting blocked for 0.2 seconds - // without new data arriving. + // Returns true if the function should be called again or false if other + // controller handling can be done. bool readGpsDataFromGpsd(); };