Merge branch 'develop' into refactoring_bugfixes_power_switching
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Robin Müller 2023-03-15 16:27:54 +01:00
commit 94ae33a554
14 changed files with 71 additions and 20 deletions

View File

@ -16,6 +16,22 @@ will consitute of a breaking change warranting a new major release:
# [unreleased]
## Added
- Failure of Safe Mode Ctrl will now trigger an event. As this can only be caused by sensors not
being in the correct mode, the assemblies should take care that this will never happen and no
additional FDIR is needed.
## Changed
- Telemetry relevant datasets for the RWs are now set invalid and partially reset on shotdown.
- Bump FSFW: merged upstream.
# [v1.37.2] 2023-03-14
- Changed `PoolManager` bugfix implementation in the FSFW.
- Some tweaks for IPC and TM store configuration
# [v1.37.1] 2023-03-14
This version works on the EM as well.

View File

@ -11,7 +11,7 @@ cmake_minimum_required(VERSION 3.13)
set(OBSW_VERSION_MAJOR 1)
set(OBSW_VERSION_MINOR 37)
set(OBSW_VERSION_REVISION 1)
set(OBSW_VERSION_REVISION 2)
# set(CMAKE_VERBOSE TRUE)

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 277 translations.
* @brief Auto-generated event translation file. Contains 278 translations.
* @details
* Generated on: 2023-03-14 17:08:41
* Generated on: 2023-03-15 10:10:04
*/
#include "translateEvents.h"
@ -97,6 +97,7 @@ const char *SAFE_RATE_RECOVERY_STRING = "SAFE_RATE_RECOVERY";
const char *MULTIPLE_RW_INVALID_STRING = "MULTIPLE_RW_INVALID";
const char *MEKF_INVALID_INFO_STRING = "MEKF_INVALID_INFO";
const char *MEKF_INVALID_MODE_VIOLATION_STRING = "MEKF_INVALID_MODE_VIOLATION";
const char *SAFE_MODE_CONTROLLER_FAILURE_STRING = "SAFE_MODE_CONTROLLER_FAILURE";
const char *SWITCH_CMD_SENT_STRING = "SWITCH_CMD_SENT";
const char *SWITCH_HAS_CHANGED_STRING = "SWITCH_HAS_CHANGED";
const char *SWITCHING_Q7S_DENIED_STRING = "SWITCHING_Q7S_DENIED";
@ -464,6 +465,8 @@ const char *translateEvents(Event event) {
return MEKF_INVALID_INFO_STRING;
case (11204):
return MEKF_INVALID_MODE_VIOLATION_STRING;
case (11205):
return SAFE_MODE_CONTROLLER_FAILURE_STRING;
case (11300):
return SWITCH_CMD_SENT_STRING;
case (11301):

2
fsfw

@ -1 +1 @@
Subproject commit 5250423d1d61c318110d4e111e141d5863546149
Subproject commit 43fd0b2f59c3aeb2d3f4db10cfad56ee3709d68d

View File

@ -91,6 +91,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
11202;0x2bc2;MULTIPLE_RW_INVALID;HIGH;No description;mission/acsDefs.h
11203;0x2bc3;MEKF_INVALID_INFO;INFO;No description;mission/acsDefs.h
11204;0x2bc4;MEKF_INVALID_MODE_VIOLATION;HIGH;No description;mission/acsDefs.h
11205;0x2bc5;SAFE_MODE_CONTROLLER_FAILURE;HIGH;No description;mission/acsDefs.h
11300;0x2c24;SWITCH_CMD_SENT;INFO;Indicates that a FSFW object requested setting a switch P1: 1 if on was requested, 0 for off | P2: Switch Index;mission/devices/devicedefinitions/powerDefinitions.h
11301;0x2c25;SWITCH_HAS_CHANGED;INFO;Indicated that a switch state has changed P1: New switch state, 1 for on, 0 for off | P2: Switch Index;mission/devices/devicedefinitions/powerDefinitions.h
11302;0x2c26;SWITCHING_Q7S_DENIED;MEDIUM;No description;mission/devices/devicedefinitions/powerDefinitions.h

1 Event ID (dec) Event ID (hex) Name Severity Description File Path
91 11202 0x2bc2 MULTIPLE_RW_INVALID HIGH No description mission/acsDefs.h
92 11203 0x2bc3 MEKF_INVALID_INFO INFO No description mission/acsDefs.h
93 11204 0x2bc4 MEKF_INVALID_MODE_VIOLATION HIGH No description mission/acsDefs.h
94 11205 0x2bc5 SAFE_MODE_CONTROLLER_FAILURE HIGH No description mission/acsDefs.h
95 11300 0x2c24 SWITCH_CMD_SENT INFO Indicates that a FSFW object requested setting a switch P1: 1 if on was requested, 0 for off | P2: Switch Index mission/devices/devicedefinitions/powerDefinitions.h
96 11301 0x2c25 SWITCH_HAS_CHANGED INFO Indicated that a switch state has changed P1: New switch state, 1 for on, 0 for off | P2: Switch Index mission/devices/devicedefinitions/powerDefinitions.h
97 11302 0x2c26 SWITCHING_Q7S_DENIED MEDIUM No description mission/devices/devicedefinitions/powerDefinitions.h

View File

@ -91,6 +91,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
11202;0x2bc2;MULTIPLE_RW_INVALID;HIGH;No description;mission/acsDefs.h
11203;0x2bc3;MEKF_INVALID_INFO;INFO;No description;mission/acsDefs.h
11204;0x2bc4;MEKF_INVALID_MODE_VIOLATION;HIGH;No description;mission/acsDefs.h
11205;0x2bc5;SAFE_MODE_CONTROLLER_FAILURE;HIGH;No description;mission/acsDefs.h
11300;0x2c24;SWITCH_CMD_SENT;INFO;Indicates that a FSFW object requested setting a switch P1: 1 if on was requested, 0 for off | P2: Switch Index;mission/devices/devicedefinitions/powerDefinitions.h
11301;0x2c25;SWITCH_HAS_CHANGED;INFO;Indicated that a switch state has changed P1: New switch state, 1 for on, 0 for off | P2: Switch Index;mission/devices/devicedefinitions/powerDefinitions.h
11302;0x2c26;SWITCHING_Q7S_DENIED;MEDIUM;No description;mission/devices/devicedefinitions/powerDefinitions.h

1 Event ID (dec) Event ID (hex) Name Severity Description File Path
91 11202 0x2bc2 MULTIPLE_RW_INVALID HIGH No description mission/acsDefs.h
92 11203 0x2bc3 MEKF_INVALID_INFO INFO No description mission/acsDefs.h
93 11204 0x2bc4 MEKF_INVALID_MODE_VIOLATION HIGH No description mission/acsDefs.h
94 11205 0x2bc5 SAFE_MODE_CONTROLLER_FAILURE HIGH No description mission/acsDefs.h
95 11300 0x2c24 SWITCH_CMD_SENT INFO Indicates that a FSFW object requested setting a switch P1: 1 if on was requested, 0 for off | P2: Switch Index mission/devices/devicedefinitions/powerDefinitions.h
96 11301 0x2c25 SWITCH_HAS_CHANGED INFO Indicated that a switch state has changed P1: New switch state, 1 for on, 0 for off | P2: Switch Index mission/devices/devicedefinitions/powerDefinitions.h
97 11302 0x2c26 SWITCHING_Q7S_DENIED MEDIUM No description mission/devices/devicedefinitions/powerDefinitions.h

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 277 translations.
* @brief Auto-generated event translation file. Contains 278 translations.
* @details
* Generated on: 2023-03-14 17:08:41
* Generated on: 2023-03-15 10:10:04
*/
#include "translateEvents.h"
@ -97,6 +97,7 @@ const char *SAFE_RATE_RECOVERY_STRING = "SAFE_RATE_RECOVERY";
const char *MULTIPLE_RW_INVALID_STRING = "MULTIPLE_RW_INVALID";
const char *MEKF_INVALID_INFO_STRING = "MEKF_INVALID_INFO";
const char *MEKF_INVALID_MODE_VIOLATION_STRING = "MEKF_INVALID_MODE_VIOLATION";
const char *SAFE_MODE_CONTROLLER_FAILURE_STRING = "SAFE_MODE_CONTROLLER_FAILURE";
const char *SWITCH_CMD_SENT_STRING = "SWITCH_CMD_SENT";
const char *SWITCH_HAS_CHANGED_STRING = "SWITCH_HAS_CHANGED";
const char *SWITCHING_Q7S_DENIED_STRING = "SWITCHING_Q7S_DENIED";
@ -464,6 +465,8 @@ const char *translateEvents(Event event) {
return MEKF_INVALID_INFO_STRING;
case (11204):
return MEKF_INVALID_MODE_VIOLATION_STRING;
case (11205):
return SAFE_MODE_CONTROLLER_FAILURE_STRING;
case (11300):
return SWITCH_CMD_SENT_STRING;
case (11301):

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 277 translations.
* @brief Auto-generated event translation file. Contains 278 translations.
* @details
* Generated on: 2023-03-14 17:08:41
* Generated on: 2023-03-15 10:10:04
*/
#include "translateEvents.h"
@ -97,6 +97,7 @@ const char *SAFE_RATE_RECOVERY_STRING = "SAFE_RATE_RECOVERY";
const char *MULTIPLE_RW_INVALID_STRING = "MULTIPLE_RW_INVALID";
const char *MEKF_INVALID_INFO_STRING = "MEKF_INVALID_INFO";
const char *MEKF_INVALID_MODE_VIOLATION_STRING = "MEKF_INVALID_MODE_VIOLATION";
const char *SAFE_MODE_CONTROLLER_FAILURE_STRING = "SAFE_MODE_CONTROLLER_FAILURE";
const char *SWITCH_CMD_SENT_STRING = "SWITCH_CMD_SENT";
const char *SWITCH_HAS_CHANGED_STRING = "SWITCH_HAS_CHANGED";
const char *SWITCHING_Q7S_DENIED_STRING = "SWITCHING_Q7S_DENIED";
@ -464,6 +465,8 @@ const char *translateEvents(Event event) {
return MEKF_INVALID_INFO_STRING;
case (11204):
return MEKF_INVALID_MODE_VIOLATION_STRING;
case (11205):
return SAFE_MODE_CONTROLLER_FAILURE_STRING;
case (11300):
return SWITCH_CMD_SENT_STRING;
case (11301):

View File

@ -32,6 +32,8 @@ static constexpr Event MULTIPLE_RW_INVALID = MAKE_EVENT(2, severity::HIGH);
static constexpr Event MEKF_INVALID_INFO = MAKE_EVENT(3, severity::INFO);
//!< MEKF was not able to compute a solution during any pointing ACS mode for a prolonged time.
static constexpr Event MEKF_INVALID_MODE_VIOLATION = MAKE_EVENT(4, severity::HIGH);
//!< The ACS safe mode controller was not able to compute a solution and has failed.
static constexpr Event SAFE_MODE_CONTROLLER_FAILURE = MAKE_EVENT(5, severity::HIGH);
extern const char* getModeStr(AcsMode mode);

View File

@ -173,7 +173,16 @@ void AcsController::performSafe() {
sunTargetDir, satRateSafe, &errAng, magMomMtq);
}
if (result == returnvalue::FAILED) {
// ToDo: this should never ever happen or we are dead. prob add an event at least
if (not safeCtrlFailureFlag) {
triggerEvent(acs::SAFE_MODE_CONTROLLER_FAILURE);
safeCtrlFailureFlag = true;
}
safeCtrlFailureCounter++;
if (safeCtrlFailureCounter > 50) {
safeCtrlFailureFlag = false;
}
} else {
safeCtrlFailureFlag = false;
}
actuatorCmd.cmdDipolMtq(magMomMtq, cmdDipolMtqs,

View File

@ -62,6 +62,9 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes
uint8_t multipleRwUnavailableCounter = 0;
bool mekfInvalidFlag = false;
uint16_t mekfInvalidCounter = 0;
bool safeCtrlFailureFlag = false;
uint8_t safeCtrlFailureCounter = 0;
int32_t cmdSpeedRws[4] = {0, 0, 0, 0};
int16_t cmdDipolMtqs[3] = {0, 0, 0};

View File

@ -108,23 +108,23 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun
{
PoolManager::LocalPoolConfig poolCfg = {{250, 16}, {250, 32}, {250, 64},
{150, 128}, {120, 1024}, {120, 2048}};
tcStore = new PoolManager(objects::TC_STORE, poolCfg, true);
tcStore = new PoolManager(objects::TC_STORE, poolCfg);
}
{
PoolManager::LocalPoolConfig poolCfg = {{600, 32}, {400, 64}, {400, 128}, {300, 512},
{150, 1024}, {150, 1024}, {150, 2048}};
*tmStore = new PoolManager(objects::TM_STORE, poolCfg, true);
PoolManager::LocalPoolConfig poolCfg = {{600, 32}, {400, 64}, {400, 128},
{300, 512}, {250, 1024}, {150, 2048}};
*tmStore = new PoolManager(objects::TM_STORE, poolCfg);
}
{
PoolManager::LocalPoolConfig poolCfg = {{300, 16}, {200, 32}, {150, 64}, {150, 128},
PoolManager::LocalPoolConfig poolCfg = {{300, 16}, {250, 32}, {150, 64}, {150, 128},
{100, 256}, {50, 512}, {50, 1024}, {10, 2048}};
*ipcStore = new PoolManager(objects::IPC_STORE, poolCfg, true);
*ipcStore = new PoolManager(objects::IPC_STORE, poolCfg);
}
PoolManager::LocalPoolConfig poolCfg = {{300, 32}, {400, 64}, {250, 128},
{150, 512}, {150, 1024}, {150, 2048}};
auto* ramToFileStore = new PoolManager(objects::DOWNLINK_RAM_STORE, poolCfg, true);
auto* ramToFileStore = new PoolManager(objects::DOWNLINK_RAM_STORE, poolCfg);
#if OBSW_ADD_TCPIP_SERVERS == 1
#if OBSW_ADD_TMTC_UDP_SERVER == 1
@ -254,8 +254,8 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun
pus::PUS_SERVICE_20);
new CService200ModeCommanding(objects::PUS_SERVICE_200_MODE_MGMT, config::EIVE_PUS_APID,
pus::PUS_SERVICE_200, 8);
HealthServiceCfg healthCfg(objects::PUS_SERVICE_201_HEALTH, config::EIVE_PUS_APID, *healthTable,
20);
HealthServiceCfg healthCfg(objects::PUS_SERVICE_201_HEALTH, config::EIVE_PUS_APID,
objects::HEALTH_TABLE, 20);
new CServiceHealthCommanding(healthCfg);
#if OBSW_ADD_CFDP_COMPONENTS == 1

View File

@ -24,7 +24,6 @@ RwHandler::RwHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCooki
sif::error << "RwHandler: Invalid gpio communication interface" << std::endl;
}
}
RwHandler::~RwHandler() {}
void RwHandler::doStartUp() {
@ -43,6 +42,17 @@ void RwHandler::doShutDown() {
}
internalState = InternalState::DEFAULT;
updatePeriodicReply(false, rws::REPLY_ID);
{
PoolReadGuard pg(&statusSet);
statusSet.currSpeed = 0.0;
statusSet.referenceSpeed = 0.0;
statusSet.state = 0;
statusSet.setValidity(false, true);
}
{
PoolReadGuard pg(&tmDataset);
tmDataset.setValidity(false, true);
}
// The power switch is handled by the assembly, so we can go off here directly.
setMode(MODE_OFF);
}

View File

@ -33,7 +33,7 @@ void factory(void* args) {
{
PoolManager::LocalPoolConfig poolCfg = {{300, 16}, {200, 32}, {150, 64}, {150, 128},
{100, 256}, {50, 512}, {50, 1024}, {10, 2048}};
new PoolManager(objects::IPC_STORE, poolCfg, true);
new PoolManager(objects::IPC_STORE, poolCfg);
}
}