tweaks and logic fixes
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
parent
4d6d4dd44d
commit
1a4dbce350
@ -94,8 +94,8 @@ void GpsHyperionLinuxController::setResetPinTriggerFunction(gpioResetFunction_t
|
|||||||
|
|
||||||
ReturnValue_t GpsHyperionLinuxController::performOperation(uint8_t opCode) {
|
ReturnValue_t GpsHyperionLinuxController::performOperation(uint8_t opCode) {
|
||||||
while (true) {
|
while (true) {
|
||||||
bool noDataRead = readGpsDataFromGpsd();
|
bool callAgain = readGpsDataFromGpsd();
|
||||||
if (noDataRead) {
|
if (not callAgain) {
|
||||||
handleQueue();
|
handleQueue();
|
||||||
poolManager.performHkOperation();
|
poolManager.performHkOperation();
|
||||||
}
|
}
|
||||||
@ -137,7 +137,7 @@ ReturnValue_t GpsHyperionLinuxController::handleCommandMessage(CommandMessage *m
|
|||||||
return ExtendedControllerBase::handleCommandMessage(message);
|
return ExtendedControllerBase::handleCommandMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef FSFW_OSAL_LINUX
|
void GpsHyperionLinuxController::performControlOperation() {}
|
||||||
|
|
||||||
bool GpsHyperionLinuxController::readGpsDataFromGpsd() {
|
bool GpsHyperionLinuxController::readGpsDataFromGpsd() {
|
||||||
auto readError = [&](int error) {
|
auto readError = [&](int error) {
|
||||||
@ -159,7 +159,7 @@ bool GpsHyperionLinuxController::readGpsDataFromGpsd() {
|
|||||||
}
|
}
|
||||||
if (result == -1) {
|
if (result == -1) {
|
||||||
readError(result);
|
readError(result);
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
if (MODE_SET != (MODE_SET & gps.set)) {
|
if (MODE_SET != (MODE_SET & gps.set)) {
|
||||||
if (mode == MODE_ON) {
|
if (mode == MODE_ON) {
|
||||||
@ -327,5 +327,3 @@ ReturnValue_t GpsHyperionLinuxController::handleGpsReadData() {
|
|||||||
}
|
}
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -67,9 +67,8 @@ class GpsHyperionLinuxController : public ExtendedControllerBase {
|
|||||||
uint32_t timeIsConstantCounter = 0;
|
uint32_t timeIsConstantCounter = 0;
|
||||||
Countdown timeUpdateCd = Countdown(60);
|
Countdown timeUpdateCd = Countdown(60);
|
||||||
|
|
||||||
// Returns true if data was read and function should be called again
|
// Returns true if the function should be called again or false if other
|
||||||
// immediately, and false if the gps_waiting blocked for 0.2 seconds
|
// controller handling can be done.
|
||||||
// without new data arriving.
|
|
||||||
bool readGpsDataFromGpsd();
|
bool readGpsDataFromGpsd();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user