Merge pull request 'fixes and tweaks TCS and EM build' (#610) from fixes_and_tweaks into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

Reviewed-on: #610
Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
This commit is contained in:
Robin Müller 2023-04-17 11:53:15 +02:00
commit 61ced11766
17 changed files with 63 additions and 16 deletions

View File

@ -16,10 +16,18 @@ will consitute of a breaking change warranting a new major release:
# [unreleased]
# [v2.0.3] 2023-04-17
## Fixed
- Fixed shadowing within the `SafeCtrl`, which prevented actuator commands to be calculated during
eclipse phase.
- EM build idle mode fixes for RW dummy.
## Added
- Add `MGT_OVERHEATING` event and fallback to system SAFE mode if the MGT is overheating for
whatever reason.
## Changed

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 290 translations.
* @brief Auto-generated event translation file. Contains 291 translations.
* @details
* Generated on: 2023-04-14 20:23:17
* Generated on: 2023-04-17 11:34:19
*/
#include "translateEvents.h"
@ -280,6 +280,7 @@ const char *OBC_OVERHEATING_STRING = "OBC_OVERHEATING";
const char *CAMERA_OVERHEATING_STRING = "CAMERA_OVERHEATING";
const char *PCDU_SYSTEM_OVERHEATING_STRING = "PCDU_SYSTEM_OVERHEATING";
const char *HEATER_NOT_OFF_FOR_OFF_MODE_STRING = "HEATER_NOT_OFF_FOR_OFF_MODE";
const char *MGT_OVERHEATING_STRING = "MGT_OVERHEATING";
const char *TX_TIMER_EXPIRED_STRING = "TX_TIMER_EXPIRED";
const char *BIT_LOCK_TX_ON_STRING = "BIT_LOCK_TX_ON";
const char *POSSIBLE_FILE_CORRUPTION_STRING = "POSSIBLE_FILE_CORRUPTION";
@ -848,6 +849,8 @@ const char *translateEvents(Event event) {
return PCDU_SYSTEM_OVERHEATING_STRING;
case (14107):
return HEATER_NOT_OFF_FOR_OFF_MODE_STRING;
case (14108):
return MGT_OVERHEATING_STRING;
case (14201):
return TX_TIMER_EXPIRED_STRING;
case (14202):

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file.
* @details
* Contains 171 translations.
* Generated on: 2023-04-14 20:23:17
* Generated on: 2023-04-17 11:34:19
*/
#include "translateObjects.h"

View File

@ -37,6 +37,9 @@ uint32_t RwDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return
ReturnValue_t RwDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) {
localDataPoolMap.emplace(rws::RW_SPEED, &rwSpeed);
localDataPoolMap.emplace(rws::RAMP_TIME, &rampTime);
localDataPoolMap.emplace(rws::TEMPERATURE_C, new PoolEntry<int32_t>({0}));
localDataPoolMap.emplace(rws::CURR_SPEED, new PoolEntry<int32_t>({0}));

View File

@ -15,6 +15,9 @@ class RwDummy : public DeviceHandlerBase {
virtual ~RwDummy();
protected:
PoolEntry<int32_t> rwSpeed = PoolEntry<int32_t>({0});
PoolEntry<uint16_t> rampTime = PoolEntry<uint16_t>({10});
void doStartUp() override;
void doShutDown() override;
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;

View File

@ -274,6 +274,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
14105;0x3719;CAMERA_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
14106;0x371a;PCDU_SYSTEM_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
14107;0x371b;HEATER_NOT_OFF_FOR_OFF_MODE;MEDIUM;No description;mission/controller/tcsDefs.h
14108;0x371c;MGT_OVERHEATING;MEDIUM;No description;mission/controller/tcsDefs.h
14201;0x3779;TX_TIMER_EXPIRED;INFO;The transmit timer to protect the Syrlinks expired P1: The current timer value;mission/system/com/ComSubsystem.h
14202;0x377a;BIT_LOCK_TX_ON;INFO;Transmitter will be turned on due to detection of bitlock;mission/system/com/ComSubsystem.h
14300;0x37dc;POSSIBLE_FILE_CORRUPTION;LOW;P1: Result code of TM packet parser. P2: Timestamp of possibly corrupt file as a unix timestamp.;mission/persistentTmStoreDefs.h

1 Event ID (dec) Event ID (hex) Name Severity Description File Path
274 14105 0x3719 CAMERA_OVERHEATING HIGH No description mission/controller/tcsDefs.h
275 14106 0x371a PCDU_SYSTEM_OVERHEATING HIGH No description mission/controller/tcsDefs.h
276 14107 0x371b HEATER_NOT_OFF_FOR_OFF_MODE MEDIUM No description mission/controller/tcsDefs.h
277 14108 0x371c MGT_OVERHEATING MEDIUM No description mission/controller/tcsDefs.h
278 14201 0x3779 TX_TIMER_EXPIRED INFO The transmit timer to protect the Syrlinks expired P1: The current timer value mission/system/com/ComSubsystem.h
279 14202 0x377a BIT_LOCK_TX_ON INFO Transmitter will be turned on due to detection of bitlock mission/system/com/ComSubsystem.h
280 14300 0x37dc POSSIBLE_FILE_CORRUPTION LOW P1: Result code of TM packet parser. P2: Timestamp of possibly corrupt file as a unix timestamp. mission/persistentTmStoreDefs.h

View File

@ -274,6 +274,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
14105;0x3719;CAMERA_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
14106;0x371a;PCDU_SYSTEM_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
14107;0x371b;HEATER_NOT_OFF_FOR_OFF_MODE;MEDIUM;No description;mission/controller/tcsDefs.h
14108;0x371c;MGT_OVERHEATING;MEDIUM;No description;mission/controller/tcsDefs.h
14201;0x3779;TX_TIMER_EXPIRED;INFO;The transmit timer to protect the Syrlinks expired P1: The current timer value;mission/system/com/ComSubsystem.h
14202;0x377a;BIT_LOCK_TX_ON;INFO;Transmitter will be turned on due to detection of bitlock;mission/system/com/ComSubsystem.h
14300;0x37dc;POSSIBLE_FILE_CORRUPTION;LOW;P1: Result code of TM packet parser. P2: Timestamp of possibly corrupt file as a unix timestamp.;mission/persistentTmStoreDefs.h

1 Event ID (dec) Event ID (hex) Name Severity Description File Path
274 14105 0x3719 CAMERA_OVERHEATING HIGH No description mission/controller/tcsDefs.h
275 14106 0x371a PCDU_SYSTEM_OVERHEATING HIGH No description mission/controller/tcsDefs.h
276 14107 0x371b HEATER_NOT_OFF_FOR_OFF_MODE MEDIUM No description mission/controller/tcsDefs.h
277 14108 0x371c MGT_OVERHEATING MEDIUM No description mission/controller/tcsDefs.h
278 14201 0x3779 TX_TIMER_EXPIRED INFO The transmit timer to protect the Syrlinks expired P1: The current timer value mission/system/com/ComSubsystem.h
279 14202 0x377a BIT_LOCK_TX_ON INFO Transmitter will be turned on due to detection of bitlock mission/system/com/ComSubsystem.h
280 14300 0x37dc POSSIBLE_FILE_CORRUPTION LOW P1: Result code of TM packet parser. P2: Timestamp of possibly corrupt file as a unix timestamp. mission/persistentTmStoreDefs.h

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 290 translations.
* @brief Auto-generated event translation file. Contains 291 translations.
* @details
* Generated on: 2023-04-14 20:23:17
* Generated on: 2023-04-17 11:34:19
*/
#include "translateEvents.h"
@ -280,6 +280,7 @@ const char *OBC_OVERHEATING_STRING = "OBC_OVERHEATING";
const char *CAMERA_OVERHEATING_STRING = "CAMERA_OVERHEATING";
const char *PCDU_SYSTEM_OVERHEATING_STRING = "PCDU_SYSTEM_OVERHEATING";
const char *HEATER_NOT_OFF_FOR_OFF_MODE_STRING = "HEATER_NOT_OFF_FOR_OFF_MODE";
const char *MGT_OVERHEATING_STRING = "MGT_OVERHEATING";
const char *TX_TIMER_EXPIRED_STRING = "TX_TIMER_EXPIRED";
const char *BIT_LOCK_TX_ON_STRING = "BIT_LOCK_TX_ON";
const char *POSSIBLE_FILE_CORRUPTION_STRING = "POSSIBLE_FILE_CORRUPTION";
@ -848,6 +849,8 @@ const char *translateEvents(Event event) {
return PCDU_SYSTEM_OVERHEATING_STRING;
case (14107):
return HEATER_NOT_OFF_FOR_OFF_MODE_STRING;
case (14108):
return MGT_OVERHEATING_STRING;
case (14201):
return TX_TIMER_EXPIRED_STRING;
case (14202):

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file.
* @details
* Contains 175 translations.
* Generated on: 2023-04-14 20:23:17
* Generated on: 2023-04-17 11:34:19
*/
#include "translateObjects.h"

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 290 translations.
* @brief Auto-generated event translation file. Contains 291 translations.
* @details
* Generated on: 2023-04-14 20:23:17
* Generated on: 2023-04-17 11:34:19
*/
#include "translateEvents.h"
@ -280,6 +280,7 @@ const char *OBC_OVERHEATING_STRING = "OBC_OVERHEATING";
const char *CAMERA_OVERHEATING_STRING = "CAMERA_OVERHEATING";
const char *PCDU_SYSTEM_OVERHEATING_STRING = "PCDU_SYSTEM_OVERHEATING";
const char *HEATER_NOT_OFF_FOR_OFF_MODE_STRING = "HEATER_NOT_OFF_FOR_OFF_MODE";
const char *MGT_OVERHEATING_STRING = "MGT_OVERHEATING";
const char *TX_TIMER_EXPIRED_STRING = "TX_TIMER_EXPIRED";
const char *BIT_LOCK_TX_ON_STRING = "BIT_LOCK_TX_ON";
const char *POSSIBLE_FILE_CORRUPTION_STRING = "POSSIBLE_FILE_CORRUPTION";
@ -848,6 +849,8 @@ const char *translateEvents(Event event) {
return PCDU_SYSTEM_OVERHEATING_STRING;
case (14107):
return HEATER_NOT_OFF_FOR_OFF_MODE_STRING;
case (14108):
return MGT_OVERHEATING_STRING;
case (14201):
return TX_TIMER_EXPIRED_STRING;
case (14202):

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file.
* @details
* Contains 175 translations.
* Generated on: 2023-04-14 20:23:17
* Generated on: 2023-04-17 11:34:19
*/
#include "translateObjects.h"

View File

@ -435,8 +435,7 @@ ReturnValue_t PdecHandler::releasePdec() {
}
ReturnValue_t PdecHandler::pdecToReset() {
ReturnValue_t result = returnvalue::OK;
result = gpioComIF->pullLow(pdecReset);
ReturnValue_t result = gpioComIF->pullLow(pdecReset);
if (result != returnvalue::OK) {
sif::error << "PdecHandler::pdecToReset: Failed to pull PDEC reset line"
" to low"

View File

@ -20,6 +20,8 @@
#define LOWER_SYRLINKS_UPPER_LIMITS 0
#define LOWER_EBAND_UPPER_LIMITS 0
#define LOWER_PLOC_UPPER_LIMITS 0
#define LOWER_MGT_UPPER_LIMITS 0
#define LOWER_RW_UPPER_LIMITS 0
ThermalController::ThermalController(object_id_t objectId, HeaterHandler& heater,
const std::atomic_bool& tcsBoardShortUnavailable)
@ -111,7 +113,7 @@ void ThermalController::performControlOperation() {
break;
}
if (cycles == 50) {
if (cycles == 40) {
bool changedLimits = false;
#if LOWER_SYRLINKS_UPPER_LIMITS == 1
changedLimits = true;
@ -130,9 +132,21 @@ void ThermalController::performControlOperation() {
hpaLimits.cutOffLimit = 0;
hpaLimits.opUpperLimit = 0;
hpaLimits.nopUpperLimit = 0;
#endif
#if LOWER_MGT_UPPER_LIMITS == 1
changedLimits = true;
mgtLimits.cutOffLimit = 0;
mgtLimits.opUpperLimit = 0;
mgtLimits.nopUpperLimit = 0;
#endif
#if LOWER_RW_UPPER_LIMITS == 1
changedLimits = true;
rwLimits.cutOffLimit = 0;
rwLimits.opUpperLimit = 0;
rwLimits.nopUpperLimit = 0;
#endif
if (changedLimits) {
sif::debug << "ThermalController: changing limits" << std::endl; // TODO: rausschmeissen
sif::debug << "ThermalController: changing limits" << std::endl;
}
}
@ -1055,7 +1069,12 @@ void ThermalController::ctrlMgt() {
numSensors = 3;
HeaterContext htrCtx(heater::HEATER_2_ACS_BRD, heater::HEATER_3_PCDU_PDU, mgtLimits);
ctrlComponentTemperature(htrCtx);
// TODO: trigger special event
if (componentAboveUpperLimit and not mgtTooHotFlag) {
triggerEvent(tcsCtrl::MGT_OVERHEATING, tempFloatToU32());
mgtTooHotFlag = true;
} else if (not componentAboveUpperLimit) {
mgtTooHotFlag = false;
}
}
void ThermalController::ctrlRw() {
@ -1240,7 +1259,7 @@ void ThermalController::ctrlObcIfBoard() {
triggerEvent(tcsCtrl::OBC_OVERHEATING, tempFloatToU32());
obcTooHotFlag = true;
} else if (not componentAboveUpperLimit) {
obcTooHotFlag = false; // TODO: !!
obcTooHotFlag = false;
}
}

View File

@ -267,6 +267,7 @@ class ThermalController : public ExtendedControllerBase {
bool pcduSystemTooHotFlag = false;
bool syrlinksTooHotFlag = false;
bool obcTooHotFlag = false;
bool mgtTooHotFlag = false;
bool strTooHotFlag = false;
bool rwTooHotFlag = false;

View File

@ -17,6 +17,7 @@ static constexpr Event OBC_OVERHEATING = MAKE_EVENT(4, severity::HIGH);
static constexpr Event CAMERA_OVERHEATING = MAKE_EVENT(5, severity::HIGH);
static constexpr Event PCDU_SYSTEM_OVERHEATING = MAKE_EVENT(6, severity::HIGH);
static constexpr Event HEATER_NOT_OFF_FOR_OFF_MODE = MAKE_EVENT(7, severity::MEDIUM);
static constexpr Event MGT_OVERHEATING = MAKE_EVENT(8, severity::HIGH);
enum SetId : uint32_t {
SENSOR_TEMPERATURES = 0,

View File

@ -114,6 +114,7 @@ ReturnValue_t EiveSystem::initialize() {
manager->subscribeToEvent(eventQueue->getId(),
event::getEventId(tcsCtrl::PCDU_SYSTEM_OVERHEATING));
manager->subscribeToEvent(eventQueue->getId(), event::getEventId(tcsCtrl::OBC_OVERHEATING));
manager->subscribeToEvent(eventQueue->getId(), event::getEventId(tcsCtrl::MGT_OVERHEATING));
manager->subscribeToEvent(eventQueue->getId(), event::getEventId(pdec::INVALID_TC_FRAME));
return Subsystem::initialize();
}
@ -132,6 +133,7 @@ void EiveSystem::handleEventMessages() {
break;
}
case tcsCtrl::OBC_OVERHEATING:
case tcsCtrl::MGT_OVERHEATING:
case tcsCtrl::PCDU_SYSTEM_OVERHEATING: {
if (isInTransition) {
performSafeRecovery = true;

2
tmtc

@ -1 +1 @@
Subproject commit 3bb0a08e951133cc230baccf59f476169b790993
Subproject commit 0c6a9677e1b9b86456efff2e11ba31f99e15ac2a