finished ACS board ASS
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
This commit is contained in:
@ -28,6 +28,14 @@ LocalPoolDataSetBase *GPSHyperionLinuxController::getDataSetHandle(sid_t sid) {
|
||||
|
||||
ReturnValue_t GPSHyperionLinuxController::checkModeCommand(Mode_t mode, Submode_t submode,
|
||||
uint32_t *msToReachTheMode) {
|
||||
if(not modeCommanded) {
|
||||
if(mode == MODE_ON or mode == MODE_OFF) {
|
||||
// 10 minutes time to reach fix
|
||||
*msToReachTheMode = 600000;
|
||||
maxTimeToReachFix.resetTimer();
|
||||
modeCommanded = true;
|
||||
}
|
||||
}
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
@ -114,6 +122,13 @@ void GPSHyperionLinuxController::readGpsDataFromGpsd() {
|
||||
// 0: Not seen, 1: No fix, 2: 2D-Fix, 3: 3D-Fix
|
||||
gpsSet.fixMode.value = gps->fix.mode;
|
||||
if (gps->fix.mode == 0 or gps->fix.mode == 1) {
|
||||
if(modeCommanded and maxTimeToReachFix.hasTimedOut()) {
|
||||
// We are supposed to be on and functioning, but not fix was found
|
||||
if(mode == MODE_ON or mode == MODE_NORMAL) {
|
||||
mode = MODE_OFF;
|
||||
}
|
||||
modeCommanded = false;
|
||||
}
|
||||
gpsSet.setValidity(false, true);
|
||||
} else if (gps->satellites_used > 0) {
|
||||
gpsSet.setValidity(true, true);
|
||||
|
Reference in New Issue
Block a user