finished ACS board ASS
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit

This commit is contained in:
2022-03-03 10:12:59 +01:00
parent 5873371d36
commit 5255e7d2ed
4 changed files with 101 additions and 55 deletions

View File

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