use full polling for gps_wating, manual delay
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
540bd63f4c
commit
b2de4ee08c
@ -45,7 +45,10 @@ ReturnValue_t GpsHyperionLinuxController::checkModeCommand(Mode_t mode, Submode_
|
||||
if (mode == MODE_OFF) {
|
||||
PoolReadGuard pg(&gpsSet);
|
||||
gpsSet.setValidity(false, true);
|
||||
// There can't be a fix with a device that is off.
|
||||
triggerEvent(GpsHyperion::GPS_FIX_CHANGE, gpsSet.fixMode.value, 0);
|
||||
oneShotSwitches.reset();
|
||||
modeCommanded = false;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
@ -102,6 +105,7 @@ ReturnValue_t GpsHyperionLinuxController::performOperation(uint8_t opCode) {
|
||||
if (not callAgainImmediately) {
|
||||
handleQueue();
|
||||
poolManager.performHkOperation();
|
||||
TaskFactory::delayTask(250);
|
||||
}
|
||||
}
|
||||
// Should never be reached.
|
||||
@ -152,9 +156,13 @@ bool GpsHyperionLinuxController::readGpsDataFromGpsd() {
|
||||
<< errno << " | " << gps_errstr(errno) << std::endl;
|
||||
}
|
||||
};
|
||||
// GPS is off, no point in reading data from GPSD.
|
||||
if(mode == MODE_OFF) {
|
||||
return false;
|
||||
}
|
||||
if (readMode == ReadModes::SOCKET) {
|
||||
// Perform other necessary handling if not data seen for 0.2 seconds.
|
||||
if (gps_waiting(&gps, 200000)) {
|
||||
if (gps_waiting(&gps, 0)) {
|
||||
if (-1 == gps_read(&gps)) {
|
||||
readError();
|
||||
return false;
|
||||
@ -212,7 +220,7 @@ ReturnValue_t GpsHyperionLinuxController::handleGpsReadData() {
|
||||
modeCommanded = false;
|
||||
}
|
||||
gpsSet.setValidity(false, true);
|
||||
} else if (gps.satellites_used > 0 && validFix) {
|
||||
} else if (gps.satellites_used > 0 && validFix && mode != MODE_OFF) {
|
||||
gpsSet.setValidity(true, true);
|
||||
}
|
||||
|
||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
||||
Subproject commit d6445d38a8eb644a5e1bd27f0fc56d29e93c030d
|
||||
Subproject commit 8a96e21d1a1ca790cd1053594495dd74beb12133
|
Loading…
x
Reference in New Issue
Block a user