tweaks and logic fixes
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Robin Müller 2023-02-06 10:30:17 +01:00
parent 4d6d4dd44d
commit 1a4dbce350
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
2 changed files with 6 additions and 9 deletions

View File

@ -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

View File

@ -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();
};