Merge pull request 'now fix loss should always be detected and reported' (#445) from bugfix_gps_fix_logic into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #445 Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
This commit is contained in:
commit
0bdc6d3d7c
@ -31,6 +31,7 @@ will consitute of a breaking change warranting a new major release:
|
|||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
|
|
||||||
|
- GPS fix loss was not reported if mode is unset.
|
||||||
- Star Tracker: OFF to NORMAL transition now posssible. Requires FSFW bump which sets
|
- Star Tracker: OFF to NORMAL transition now posssible. Requires FSFW bump which sets
|
||||||
transition source modes properly for those transitions.
|
transition source modes properly for those transitions.
|
||||||
FSFW PR: https://egit.irs.uni-stuttgart.de/eive/fsfw/pulls/131
|
FSFW PR: https://egit.irs.uni-stuttgart.de/eive/fsfw/pulls/131
|
||||||
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
|||||||
Subproject commit 1b7493f945302b3785ceba6e7a34a727e3898a13
|
Subproject commit 7f6ba5f40b47bc32802efdc4ed41b4bad4b8071b
|
@ -214,16 +214,14 @@ ReturnValue_t GpsHyperionLinuxController::handleGpsReadData() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool validFix = false;
|
bool validFix = false;
|
||||||
|
uint8_t newFix = 0;
|
||||||
if (modeIsSet) {
|
if (modeIsSet) {
|
||||||
// 0: Not seen, 1: No fix, 2: 2D-Fix, 3: 3D-Fix
|
// 0: Not seen, 1: No fix, 2: 2D-Fix, 3: 3D-Fix
|
||||||
if (gps.fix.mode == 2 or gps.fix.mode == 3) {
|
if (gps.fix.mode == 2 or gps.fix.mode == 3) {
|
||||||
validFix = true;
|
validFix = true;
|
||||||
}
|
}
|
||||||
if (gpsSet.fixMode.value != gps.fix.mode) {
|
newFix = gps.fix.mode;
|
||||||
triggerEvent(GpsHyperion::GPS_FIX_CHANGE, gpsSet.fixMode.value, gps.fix.mode);
|
if (newFix == 0 or newFix == 1) {
|
||||||
}
|
|
||||||
gpsSet.fixMode.value = gps.fix.mode;
|
|
||||||
if (gps.fix.mode == 0 or gps.fix.mode == 1) {
|
|
||||||
if (modeCommanded and maxTimeToReachFix.hasTimedOut()) {
|
if (modeCommanded and maxTimeToReachFix.hasTimedOut()) {
|
||||||
// We are supposed to be on and functioning, but no fix was found
|
// We are supposed to be on and functioning, but no fix was found
|
||||||
if (mode == MODE_ON or mode == MODE_NORMAL) {
|
if (mode == MODE_ON or mode == MODE_NORMAL) {
|
||||||
@ -233,6 +231,10 @@ ReturnValue_t GpsHyperionLinuxController::handleGpsReadData() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (gpsSet.fixMode.value != newFix) {
|
||||||
|
triggerEvent(GpsHyperion::GPS_FIX_CHANGE, gpsSet.fixMode.value, newFix);
|
||||||
|
}
|
||||||
|
gpsSet.fixMode = newFix;
|
||||||
gpsSet.fixMode.setValid(modeIsSet);
|
gpsSet.fixMode.setValid(modeIsSet);
|
||||||
|
|
||||||
// Only set on specific messages, so only set a valid flag to invalid
|
// Only set on specific messages, so only set a valid flag to invalid
|
||||||
|
Loading…
x
Reference in New Issue
Block a user