Merge remote-tracking branch 'origin/main' into rework-pdec-fdir
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good

This commit is contained in:
Robin Müller 2023-08-14 10:32:55 +02:00
commit 73e9bc9598
Signed by: muellerr
GPG Key ID: 407F9B00F858F270
3 changed files with 21 additions and 15 deletions

View File

@ -16,12 +16,17 @@ will consitute of a breaking change warranting a new major release:
# [unreleased] # [unreleased]
## Changed ## Changed
- PDEC FDIR rework: A full PDEC reboot will now only be performed after a regular PDEC reset has - PDEC FDIR rework: A full PDEC reboot will now only be performed after a regular PDEC reset has
failed 10 times. The mechanism will reset after no PDEC reset has happended for 2 minutes. failed 10 times. The mechanism will reset after no PDEC reset has happended for 2 minutes.
The PDEC reset will be performed when counting 4 dirty frame events in 10 seconds just like done The PDEC reset will be performed when counting 4 dirty frame events 10 seconds after the count
before. was incremented initially.
## Fixed
- The handling function of the GPS data is only called once per GPS read. This should remove
the fake fix-has-changed events.
# [v6.3.0] 2023-08-03 # [v6.3.0] 2023-08-03

View File

@ -166,30 +166,32 @@ bool GpsHyperionLinuxController::readGpsDataFromGpsd() {
if (mode == MODE_OFF) { if (mode == MODE_OFF) {
return false; return false;
} }
unsigned int readIdx = 0;
if (readMode == ReadModes::SOCKET) { if (readMode == ReadModes::SOCKET) {
// Poll the GPS. // Poll the GPS.
if (gps_waiting(&gps, 0)) { while (gps_waiting(&gps, 0)) {
if (-1 == gps_read(&gps)) { int retval = gps_read(&gps);
if (retval < 0) {
readError(); readError();
return false; return false;
} }
oneShotSwitches.gpsReadFailedSwitch = true; readIdx++;
ReturnValue_t result = handleGpsReadData(); if (readIdx >= 40) {
if (result == returnvalue::OK) { sif::warning << "GpsHyperionLinuxController: Received " << readIdx
return true; << " GPSD message consecutively" << std::endl;
} else { break;
return false;
} }
noModeSetCntr = 0; }
} else { if (readIdx > 0) {
return false; oneShotSwitches.gpsReadFailedSwitch = true;
handleGpsReadData();
} }
} else if (readMode == ReadModes::SHM) { } else if (readMode == ReadModes::SHM) {
sif::error << "GpsHyperionLinuxController::readGpsDataFromGpsdPermanentLoop: " sif::error << "GpsHyperionLinuxController::readGpsDataFromGpsdPermanentLoop: "
"SHM read not implemented" "SHM read not implemented"
<< std::endl; << std::endl;
} }
return true; return false;
} }
ReturnValue_t GpsHyperionLinuxController::handleGpsReadData() { ReturnValue_t GpsHyperionLinuxController::handleGpsReadData() {

View File

@ -81,7 +81,6 @@ class GpsHyperionLinuxController : public ExtendedControllerBase {
} oneShotSwitches; } oneShotSwitches;
bool debugHyperionGps = false; bool debugHyperionGps = false;
int32_t noModeSetCntr = 0;
// Returns true if the function should be called again or false if other // Returns true if the function should be called again or false if other
// controller handling can be done. // controller handling can be done.