diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bb1b9c7..0404791f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,9 +22,11 @@ will consitute of a breaking change warranting a new major release: to be busy before returning the BUSY returnvalue. Also propagate and check for that case properly. Ideally, this will never be an issue and the PAPB VC interface should never block for a longer period. +- The `mekfInvalidCounter` now resets on setting the STR to faulty. ## Added +- The event `MEKF_RECOVERY` will be triggered in case the `MEKF` does manage to recover itself. - The persistent TM stores now have low priorities and behave like background threads now. This should prevent them from blocking or slowing down the system even during dumps (at least in theory). @@ -36,7 +38,6 @@ will consitute of a breaking change warranting a new major release: - Rework FSFW OSALs to properly support regular scheduling (NICE priorities) and real-time scheduling. -- Tweak scheduling priorities. - STR: Move datalink layer to `StrComHandler` completely. DLL is now completely hidden from device handler. - STR: Is now scheduled twice in ACS PST. @@ -47,6 +48,8 @@ will consitute of a breaking change warranting a new major release: and should make communication more reliable even on high CPU loads. - Syrlinks: Two communication cycles per PST. - Fine-tuning of various task priorities. +- The CSP router now is scheduled with the `SCHED_RR` policy and the same priority as the PCDU + handlers as well. # [v1.39.1] 2023-03-22 diff --git a/bsp_hosted/fsfwconfig/events/translateEvents.cpp b/bsp_hosted/fsfwconfig/events/translateEvents.cpp index 1bb84896..786e7aa7 100644 --- a/bsp_hosted/fsfwconfig/events/translateEvents.cpp +++ b/bsp_hosted/fsfwconfig/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** * @brief Auto-generated event translation file. Contains 279 translations. * @details - * Generated on: 2023-03-24 14:58:20 + * Generated on: 2023-03-24 15:01:12 */ #include "translateEvents.h" @@ -96,7 +96,7 @@ const char *SAFE_RATE_VIOLATION_STRING = "SAFE_RATE_VIOLATION"; 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_AUTOMATIC_RECOVERY_STRING = "MEKF_AUTOMATIC_RECOVERY"; +const char *MEKF_RECOVERY_STRING = "MEKF_RECOVERY"; 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"; @@ -466,7 +466,7 @@ const char *translateEvents(Event event) { case (11203): return MEKF_INVALID_INFO_STRING; case (11204): - return MEKF_AUTOMATIC_RECOVERY_STRING; + return MEKF_RECOVERY_STRING; case (11205): return MEKF_INVALID_MODE_VIOLATION_STRING; case (11206): diff --git a/bsp_hosted/fsfwconfig/objects/translateObjects.cpp b/bsp_hosted/fsfwconfig/objects/translateObjects.cpp index 739bc8fc..f48a9fd2 100644 --- a/bsp_hosted/fsfwconfig/objects/translateObjects.cpp +++ b/bsp_hosted/fsfwconfig/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 169 translations. - * Generated on: 2023-03-24 14:58:20 + * Generated on: 2023-03-24 15:01:12 */ #include "translateObjects.h" diff --git a/generators/bsp_hosted_events.csv b/generators/bsp_hosted_events.csv index 7c70988c..a6ef0d08 100644 --- a/generators/bsp_hosted_events.csv +++ b/generators/bsp_hosted_events.csv @@ -86,13 +86,13 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path 10802;0x2a32;SERIALIZATION_ERROR;LOW;No description;fsfw/src/fsfw/cfdp/handler/defs.h 10803;0x2a33;FILESTORE_ERROR;LOW;No description;fsfw/src/fsfw/cfdp/handler/defs.h 10804;0x2a34;FILENAME_TOO_LARGE_ERROR;LOW;P1: Transaction step ID, P2: 0 for source file name, 1 for dest file name;fsfw/src/fsfw/cfdp/handler/defs.h -11200;0x2bc0;SAFE_RATE_VIOLATION;MEDIUM;The limits for the rotation in safe mode were violated.;mission/acsDefs.h -11201;0x2bc1;SAFE_RATE_RECOVERY;MEDIUM;The system has recovered from a safe rate rotation violation.;mission/acsDefs.h -11202;0x2bc2;MULTIPLE_RW_INVALID;HIGH;Multiple RWs are invalid, uncommandable and therefore higher ACS modes cannot be maintained.;mission/acsDefs.h -11203;0x2bc3;MEKF_INVALID_INFO;INFO;MEKF was not able to compute a solution. P1: MEKF state on exit;mission/acsDefs.h -11204;0x2bc4;MEKF_AUTOMATIC_RECOVERY;INFO;MEKF performed an automatic recovery after detection of nonfinite values.;mission/acsDefs.h -11205;0x2bc5;MEKF_INVALID_MODE_VIOLATION;HIGH;MEKF was not able to compute a solution during any pointing ACS mode for a prolonged time.;mission/acsDefs.h -11206;0x2bc6;SAFE_MODE_CONTROLLER_FAILURE;HIGH;The ACS safe mode controller was not able to compute a solution and has failed. P1: Missing information about magnetic field, P2: Missing information about rotational rate;mission/acsDefs.h +11200;0x2bc0;SAFE_RATE_VIOLATION;MEDIUM;No description;mission/acsDefs.h +11201;0x2bc1;SAFE_RATE_RECOVERY;MEDIUM;No description;mission/acsDefs.h +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_RECOVERY;INFO;No description;mission/acsDefs.h +11205;0x2bc5;MEKF_INVALID_MODE_VIOLATION;HIGH;No description;mission/acsDefs.h +11206;0x2bc6;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 diff --git a/generators/bsp_hosted_returnvalues.csv b/generators/bsp_hosted_returnvalues.csv index 2a867f00..a5488056 100644 --- a/generators/bsp_hosted_returnvalues.csv +++ b/generators/bsp_hosted_returnvalues.csv @@ -357,6 +357,7 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 0x3a02;MQI_Full;No space left for more messages;2;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h 0x3a03;MQI_NoReplyPartner;Returned if a reply method was called without partner;3;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h 0x3a04;MQI_DestinationInvalid;Returned if the target destination is invalid.;4;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h +0x3b00;SPH_ConnBroken;No description;0;SEMAPHORE_IF;fsfw/src/fsfw/osal/common/TcpTmTcServer.h 0x3b01;SPH_SemaphoreTimeout;No description;1;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h 0x3b02;SPH_SemaphoreNotOwned;No description;2;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h 0x3b03;SPH_SemaphoreInvalid;No description;3;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h @@ -372,7 +373,6 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 0x3e05;HKM_DatasetNotFound;No description;5;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h 0x3f01;DLEE_NoPacketFound;No description;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleParser.h 0x3f02;DLEE_PossiblePacketLoss;No description;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleParser.h -0x4100;PUS9_ConnBroken;No description;0;PUS_SERVICE_9;fsfw/src/fsfw/osal/common/TcpTmTcServer.h 0x4201;PUS11_InvalidTypeTimeWindow;No description;1;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h 0x4202;PUS11_InvalidTimeWindow;No description;2;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h 0x4203;PUS11_TimeshiftingNotPossible;No description;3;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h @@ -417,12 +417,11 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 0x4807;HGIO_GpioGetValueFailed;No description;7;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h 0x4c00;SPPA_NoPacketFound;No description;0;SPACE_PACKET_PARSER;fsfw/src/fsfw/tmtcservices/SpacePacketParser.h 0x4c01;SPPA_SplitPacket;No description;1;SPACE_PACKET_PARSER;fsfw/src/fsfw/tmtcservices/SpacePacketParser.h -0x4fa0;HEATER_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;HEATER_HANDLER;mission/devices/RwHandler.h -0x4fa1;HEATER_InvalidRampTime;Action Message with invalid ramp time was received.;161;HEATER_HANDLER;mission/devices/RwHandler.h -0x4fa2;HEATER_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;HEATER_HANDLER;mission/devices/RwHandler.h -0x4fa3;HEATER_ExecutionFailed;Command execution failed;163;HEATER_HANDLER;mission/devices/RwHandler.h -0x4fa4;HEATER_CrcError;Reaction wheel reply has invalid crc;164;HEATER_HANDLER;mission/devices/RwHandler.h -0x4fa5;HEATER_ValueNotRead;No description;165;HEATER_HANDLER;mission/devices/RwHandler.h +0x4fa1;HEATER_CommandNotSupported;No description;161;HEATER_HANDLER;mission/devices/HeaterHandler.h +0x4fa2;HEATER_InitFailed;No description;162;HEATER_HANDLER;mission/devices/HeaterHandler.h +0x4fa3;HEATER_InvalidSwitchNr;No description;163;HEATER_HANDLER;mission/devices/HeaterHandler.h +0x4fa4;HEATER_MainSwitchSetTimeout;No description;164;HEATER_HANDLER;mission/devices/HeaterHandler.h +0x4fa5;HEATER_CommandAlreadyWaiting;No description;165;HEATER_HANDLER;mission/devices/HeaterHandler.h 0x50a0;SYRLINKS_CrcFailure;No description;160;SYRLINKS_HANDLER;mission/devices/SyrlinksHandler.h 0x50a1;SYRLINKS_UartFraminOrParityErrorAck;No description;161;SYRLINKS_HANDLER;mission/devices/SyrlinksHandler.h 0x50a2;SYRLINKS_BadCharacterAck;No description;162;SYRLINKS_HANDLER;mission/devices/SyrlinksHandler.h @@ -460,11 +459,12 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 0x5d05;GOMS_UnknownReplyId;No description;5;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h 0x60a0;CCSDS_CommandNotImplemented;Received action message with unknown action id;160;CCSDS_HANDLER;mission/tmtc/CcsdsIpCoreHandler.h 0x63a0;NVMB_KeyNotExists;Specified key does not exist in json file;160;NVM_PARAM_BASE;mission/memory/NvmParameterBase.h -0x66a0;SADPL_CommandNotSupported;No description;160;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h -0x66a1;SADPL_DeploymentAlreadyExecuting;No description;161;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h -0x66a2;SADPL_MainSwitchTimeoutFailure;No description;162;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h -0x66a3;SADPL_SwitchingDeplSa1Failed;No description;163;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h -0x66a4;SADPL_SwitchingDeplSa2Failed;No description;164;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h +0x66a0;SADPL_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;SA_DEPL_HANDLER;mission/devices/RwHandler.h +0x66a1;SADPL_InvalidRampTime;Action Message with invalid ramp time was received.;161;SA_DEPL_HANDLER;mission/devices/RwHandler.h +0x66a2;SADPL_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;SA_DEPL_HANDLER;mission/devices/RwHandler.h +0x66a3;SADPL_ExecutionFailed;Command execution failed;163;SA_DEPL_HANDLER;mission/devices/RwHandler.h +0x66a4;SADPL_CrcError;Reaction wheel reply has invalid crc;164;SA_DEPL_HANDLER;mission/devices/RwHandler.h +0x66a5;SADPL_ValueNotRead;No description;165;SA_DEPL_HANDLER;mission/devices/RwHandler.h 0x6900;ACSCTRL_FileDeletionFailed;No description;0;ACS_CTRL;mission/controller/AcsController.h 0x6a02;ACSMEKF_MekfUninitialized;No description;2;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h 0x6a03;ACSMEKF_MekfNoGyrData;No description;3;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h @@ -474,11 +474,7 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 0x6a07;ACSMEKF_MekfNotFinite;No description;7;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h 0x6a08;ACSMEKF_MekfInitialized;No description;8;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h 0x6a09;ACSMEKF_MekfRunning;No description;9;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h -0x6b02;ACSSAF_SafectrlNoMagFieldForControl;No description;2;ACS_SAFE;mission/controller/acs/control/SafeCtrl.h -0x6b03;ACSSAF_SafectrlUseMekf;No description;3;ACS_SAFE;mission/controller/acs/control/SafeCtrl.h -0x6b04;ACSSAF_SafectrlUseNonmekf;No description;4;ACS_SAFE;mission/controller/acs/control/SafeCtrl.h -0x6b05;ACSSAF_SafectrlUseDamping;No description;5;ACS_SAFE;mission/controller/acs/control/SafeCtrl.h -0x6b06;ACSSAF_SafectrlNoSensorsForControl;No description;6;ACS_SAFE;mission/controller/acs/control/SafeCtrl.h +0x6b01;ACSSAF_SafectrlMekfInputInvalid;No description;1;ACS_SAFE;mission/controller/acs/control/SafeCtrl.h 0x6c01;ACSPTG_PtgctrlMekfInputInvalid;No description;1;ACS_PTG;mission/controller/acs/control/PtgCtrl.h 0x6d01;ACSDTB_DetumbleNoSensordata;No description;1;ACS_DETUMBLE;mission/controller/acs/control/Detumble.h 0x7000;PTM_DumpDone;No description;0;PERSISTENT_TM_STORE;mission/tmtc/PersistentTmStore.h diff --git a/generators/bsp_q7s_events.csv b/generators/bsp_q7s_events.csv index 7c70988c..a6ef0d08 100644 --- a/generators/bsp_q7s_events.csv +++ b/generators/bsp_q7s_events.csv @@ -86,13 +86,13 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path 10802;0x2a32;SERIALIZATION_ERROR;LOW;No description;fsfw/src/fsfw/cfdp/handler/defs.h 10803;0x2a33;FILESTORE_ERROR;LOW;No description;fsfw/src/fsfw/cfdp/handler/defs.h 10804;0x2a34;FILENAME_TOO_LARGE_ERROR;LOW;P1: Transaction step ID, P2: 0 for source file name, 1 for dest file name;fsfw/src/fsfw/cfdp/handler/defs.h -11200;0x2bc0;SAFE_RATE_VIOLATION;MEDIUM;The limits for the rotation in safe mode were violated.;mission/acsDefs.h -11201;0x2bc1;SAFE_RATE_RECOVERY;MEDIUM;The system has recovered from a safe rate rotation violation.;mission/acsDefs.h -11202;0x2bc2;MULTIPLE_RW_INVALID;HIGH;Multiple RWs are invalid, uncommandable and therefore higher ACS modes cannot be maintained.;mission/acsDefs.h -11203;0x2bc3;MEKF_INVALID_INFO;INFO;MEKF was not able to compute a solution. P1: MEKF state on exit;mission/acsDefs.h -11204;0x2bc4;MEKF_AUTOMATIC_RECOVERY;INFO;MEKF performed an automatic recovery after detection of nonfinite values.;mission/acsDefs.h -11205;0x2bc5;MEKF_INVALID_MODE_VIOLATION;HIGH;MEKF was not able to compute a solution during any pointing ACS mode for a prolonged time.;mission/acsDefs.h -11206;0x2bc6;SAFE_MODE_CONTROLLER_FAILURE;HIGH;The ACS safe mode controller was not able to compute a solution and has failed. P1: Missing information about magnetic field, P2: Missing information about rotational rate;mission/acsDefs.h +11200;0x2bc0;SAFE_RATE_VIOLATION;MEDIUM;No description;mission/acsDefs.h +11201;0x2bc1;SAFE_RATE_RECOVERY;MEDIUM;No description;mission/acsDefs.h +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_RECOVERY;INFO;No description;mission/acsDefs.h +11205;0x2bc5;MEKF_INVALID_MODE_VIOLATION;HIGH;No description;mission/acsDefs.h +11206;0x2bc6;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 diff --git a/generators/bsp_q7s_returnvalues.csv b/generators/bsp_q7s_returnvalues.csv index a3938699..61fb831b 100644 --- a/generators/bsp_q7s_returnvalues.csv +++ b/generators/bsp_q7s_returnvalues.csv @@ -357,6 +357,7 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 0x3a02;MQI_Full;No space left for more messages;2;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h 0x3a03;MQI_NoReplyPartner;Returned if a reply method was called without partner;3;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h 0x3a04;MQI_DestinationInvalid;Returned if the target destination is invalid.;4;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h +0x3b00;SPH_ConnBroken;No description;0;SEMAPHORE_IF;fsfw/src/fsfw/osal/common/TcpTmTcServer.h 0x3b01;SPH_SemaphoreTimeout;No description;1;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h 0x3b02;SPH_SemaphoreNotOwned;No description;2;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h 0x3b03;SPH_SemaphoreInvalid;No description;3;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h @@ -372,7 +373,6 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 0x3e05;HKM_DatasetNotFound;No description;5;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h 0x3f01;DLEE_NoPacketFound;No description;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleParser.h 0x3f02;DLEE_PossiblePacketLoss;No description;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleParser.h -0x4100;PUS9_ConnBroken;No description;0;PUS_SERVICE_9;fsfw/src/fsfw/osal/common/TcpTmTcServer.h 0x4201;PUS11_InvalidTypeTimeWindow;No description;1;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h 0x4202;PUS11_InvalidTimeWindow;No description;2;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h 0x4203;PUS11_TimeshiftingNotPossible;No description;3;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h @@ -417,12 +417,11 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 0x4807;HGIO_GpioGetValueFailed;No description;7;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h 0x4c00;SPPA_NoPacketFound;No description;0;SPACE_PACKET_PARSER;fsfw/src/fsfw/tmtcservices/SpacePacketParser.h 0x4c01;SPPA_SplitPacket;No description;1;SPACE_PACKET_PARSER;fsfw/src/fsfw/tmtcservices/SpacePacketParser.h -0x4fa0;HEATER_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;HEATER_HANDLER;mission/devices/RwHandler.h -0x4fa1;HEATER_InvalidRampTime;Action Message with invalid ramp time was received.;161;HEATER_HANDLER;mission/devices/RwHandler.h -0x4fa2;HEATER_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;HEATER_HANDLER;mission/devices/RwHandler.h -0x4fa3;HEATER_ExecutionFailed;Command execution failed;163;HEATER_HANDLER;mission/devices/RwHandler.h -0x4fa4;HEATER_CrcError;Reaction wheel reply has invalid crc;164;HEATER_HANDLER;mission/devices/RwHandler.h -0x4fa5;HEATER_ValueNotRead;No description;165;HEATER_HANDLER;mission/devices/RwHandler.h +0x4fa1;HEATER_CommandNotSupported;No description;161;HEATER_HANDLER;mission/devices/HeaterHandler.h +0x4fa2;HEATER_InitFailed;No description;162;HEATER_HANDLER;mission/devices/HeaterHandler.h +0x4fa3;HEATER_InvalidSwitchNr;No description;163;HEATER_HANDLER;mission/devices/HeaterHandler.h +0x4fa4;HEATER_MainSwitchSetTimeout;No description;164;HEATER_HANDLER;mission/devices/HeaterHandler.h +0x4fa5;HEATER_CommandAlreadyWaiting;No description;165;HEATER_HANDLER;mission/devices/HeaterHandler.h 0x50a0;SYRLINKS_CrcFailure;No description;160;SYRLINKS_HANDLER;mission/devices/SyrlinksHandler.h 0x50a1;SYRLINKS_UartFraminOrParityErrorAck;No description;161;SYRLINKS_HANDLER;mission/devices/SyrlinksHandler.h 0x50a2;SYRLINKS_BadCharacterAck;No description;162;SYRLINKS_HANDLER;mission/devices/SyrlinksHandler.h @@ -491,8 +490,9 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 0x58a1;SUSS_ErrorLockMutex;No description;161;SUS_HANDLER;mission/devices/LegacySusHandler.h 0x59a0;IPCI_PapbBusy;No description;160;CCSDS_IP_CORE_BRIDGE;linux/ipcore/PapbVcInterface.h 0x5aa0;PTME_UnknownVcId;No description;160;PTME;linux/ipcore/Ptme.h -0x5c01;STRHLP_SdNotMounted;SD card specified in path string not mounted;1;STR_HELPER;linux/devices/startracker/StrComHandler.h -0x5c02;STRHLP_FileNotExists;Specified file does not exist on filesystem;2;STR_HELPER;linux/devices/startracker/StrComHandler.h +0x5c00;STRHLP_NoReplyAvailable;No description;0;STR_HELPER;linux/devices/ImtqPollingTask.h +0x5c01;STRHLP_NoPacketFound;No description;1;STR_HELPER;linux/devices/SyrlinksComHandler.h +0x5c02;STRHLP_InvalidCrc;No description;2;STR_HELPER;linux/devices/ScexHelper.h 0x5c03;STRHLP_PathNotExists;Specified path does not exist;3;STR_HELPER;linux/devices/startracker/StrComHandler.h 0x5c04;STRHLP_FileCreationFailed;Failed to create download image or read flash file;4;STR_HELPER;linux/devices/startracker/StrComHandler.h 0x5c05;STRHLP_RegionMismatch;Region in flash write/read reply does not match expected region;5;STR_HELPER;linux/devices/startracker/StrComHandler.h @@ -508,9 +508,6 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 0x5d03;GOMS_InvalidParamSize;No description;3;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h 0x5d04;GOMS_InvalidPayloadSize;No description;4;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h 0x5d05;GOMS_UnknownReplyId;No description;5;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h -0x5e00;PLMEMDUMP_NoReplyAvailable;No description;0;PLOC_MEMORY_DUMPER;linux/devices/ImtqPollingTask.h -0x5e01;PLMEMDUMP_NoPacketFound;No description;1;PLOC_MEMORY_DUMPER;linux/devices/SyrlinksComHandler.h -0x5e02;PLMEMDUMP_InvalidCrc;No description;2;PLOC_MEMORY_DUMPER;linux/devices/ScexHelper.h 0x5ea0;PLMEMDUMP_MramAddressTooHigh;The capacity of the MRAM amounts to 512 kB. Thus the maximum address must not be higher than 0x7d000.;160;PLOC_MEMORY_DUMPER;linux/devices/ploc/PlocMemoryDumper.h 0x5ea1;PLMEMDUMP_MramInvalidAddressCombination;The specified end address is lower than the start address;161;PLOC_MEMORY_DUMPER;linux/devices/ploc/PlocMemoryDumper.h 0x5fa0;PDEC_AbandonedCltuRetval;No description;160;PDEC_HANDLER;linux/ipcore/PdecHandler.h @@ -540,11 +537,12 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 0x64a0;FSHLP_SdNotMounted;SD card specified with path string not mounted;160;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h 0x64a1;FSHLP_FileNotExists;Specified file does not exist on filesystem;161;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h 0x65a0;PLMPHLP_FileClosedAccidentally;File accidentally close;160;PLOC_MPSOC_HELPER;linux/devices/ploc/PlocMPSoCHelper.h -0x66a0;SADPL_CommandNotSupported;No description;160;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h -0x66a1;SADPL_DeploymentAlreadyExecuting;No description;161;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h -0x66a2;SADPL_MainSwitchTimeoutFailure;No description;162;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h -0x66a3;SADPL_SwitchingDeplSa1Failed;No description;163;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h -0x66a4;SADPL_SwitchingDeplSa2Failed;No description;164;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h +0x66a0;SADPL_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;SA_DEPL_HANDLER;mission/devices/RwHandler.h +0x66a1;SADPL_InvalidRampTime;Action Message with invalid ramp time was received.;161;SA_DEPL_HANDLER;mission/devices/RwHandler.h +0x66a2;SADPL_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;SA_DEPL_HANDLER;mission/devices/RwHandler.h +0x66a3;SADPL_ExecutionFailed;Command execution failed;163;SA_DEPL_HANDLER;mission/devices/RwHandler.h +0x66a4;SADPL_CrcError;Reaction wheel reply has invalid crc;164;SA_DEPL_HANDLER;mission/devices/RwHandler.h +0x66a5;SADPL_ValueNotRead;No description;165;SA_DEPL_HANDLER;mission/devices/RwHandler.h 0x67a0;MPSOCRTVIF_CrcFailure;Space Packet received from PLOC has invalid CRC;160;MPSOC_RETURN_VALUES_IF;linux/devices/devicedefinitions/MPSoCReturnValuesIF.h 0x67a1;MPSOCRTVIF_ReceivedAckFailure;Received ACK failure reply from PLOC;161;MPSOC_RETURN_VALUES_IF;linux/devices/devicedefinitions/MPSoCReturnValuesIF.h 0x67a2;MPSOCRTVIF_ReceivedExeFailure;Received execution failure reply from PLOC;162;MPSOC_RETURN_VALUES_IF;linux/devices/devicedefinitions/MPSoCReturnValuesIF.h @@ -588,11 +586,7 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 0x6a07;ACSMEKF_MekfNotFinite;No description;7;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h 0x6a08;ACSMEKF_MekfInitialized;No description;8;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h 0x6a09;ACSMEKF_MekfRunning;No description;9;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h -0x6b02;ACSSAF_SafectrlNoMagFieldForControl;No description;2;ACS_SAFE;mission/controller/acs/control/SafeCtrl.h -0x6b03;ACSSAF_SafectrlUseMekf;No description;3;ACS_SAFE;mission/controller/acs/control/SafeCtrl.h -0x6b04;ACSSAF_SafectrlUseNonmekf;No description;4;ACS_SAFE;mission/controller/acs/control/SafeCtrl.h -0x6b05;ACSSAF_SafectrlUseDamping;No description;5;ACS_SAFE;mission/controller/acs/control/SafeCtrl.h -0x6b06;ACSSAF_SafectrlNoSensorsForControl;No description;6;ACS_SAFE;mission/controller/acs/control/SafeCtrl.h +0x6b01;ACSSAF_SafectrlMekfInputInvalid;No description;1;ACS_SAFE;mission/controller/acs/control/SafeCtrl.h 0x6c01;ACSPTG_PtgctrlMekfInputInvalid;No description;1;ACS_PTG;mission/controller/acs/control/PtgCtrl.h 0x6d01;ACSDTB_DetumbleNoSensordata;No description;1;ACS_DETUMBLE;mission/controller/acs/control/Detumble.h 0x6e00;SDMA_OpOngoing;No description;0;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h diff --git a/generators/events/translateEvents.cpp b/generators/events/translateEvents.cpp index 1bb84896..786e7aa7 100644 --- a/generators/events/translateEvents.cpp +++ b/generators/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** * @brief Auto-generated event translation file. Contains 279 translations. * @details - * Generated on: 2023-03-24 14:58:20 + * Generated on: 2023-03-24 15:01:12 */ #include "translateEvents.h" @@ -96,7 +96,7 @@ const char *SAFE_RATE_VIOLATION_STRING = "SAFE_RATE_VIOLATION"; 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_AUTOMATIC_RECOVERY_STRING = "MEKF_AUTOMATIC_RECOVERY"; +const char *MEKF_RECOVERY_STRING = "MEKF_RECOVERY"; 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"; @@ -466,7 +466,7 @@ const char *translateEvents(Event event) { case (11203): return MEKF_INVALID_INFO_STRING; case (11204): - return MEKF_AUTOMATIC_RECOVERY_STRING; + return MEKF_RECOVERY_STRING; case (11205): return MEKF_INVALID_MODE_VIOLATION_STRING; case (11206): diff --git a/generators/objects/translateObjects.cpp b/generators/objects/translateObjects.cpp index ee535ba1..e63c74d3 100644 --- a/generators/objects/translateObjects.cpp +++ b/generators/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 173 translations. - * Generated on: 2023-03-24 14:58:20 + * Generated on: 2023-03-24 15:01:12 */ #include "translateObjects.h" diff --git a/linux/csp/CspComIF.cpp b/linux/csp/CspComIF.cpp index 919bf983..554ecba0 100644 --- a/linux/csp/CspComIF.cpp +++ b/linux/csp/CspComIF.cpp @@ -354,6 +354,11 @@ ReturnValue_t CspComIF::startRouterTask() { pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); + res = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED); + if (res != 0) { + return returnvalue::FAILED; + } + // Set scheduling policy to SCHED_RR res = pthread_attr_setschedpolicy(&attr, SCHED_RR); if (res) { @@ -369,17 +374,18 @@ ReturnValue_t CspComIF::startRouterTask() { return returnvalue::FAILED; } - res = pthread_setname_np(pthread_self(), routerTaskName); + res = pthread_create(&routerTaskHandle, &attr, routerWorkWrapper, NULL); if (res) { pthread_attr_destroy(&attr); return returnvalue::FAILED; } - res = pthread_create(&routerTaskHandle, &attr, routerWorkWrapper, NULL); - pthread_attr_destroy(&attr); + res = pthread_setname_np(routerTaskHandle, routerTaskName); if (res) { + pthread_attr_destroy(&attr); return returnvalue::FAILED; } + pthread_attr_destroy(&attr); return returnvalue::OK; } diff --git a/linux/fsfwconfig/events/translateEvents.cpp b/linux/fsfwconfig/events/translateEvents.cpp index 1bb84896..786e7aa7 100644 --- a/linux/fsfwconfig/events/translateEvents.cpp +++ b/linux/fsfwconfig/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** * @brief Auto-generated event translation file. Contains 279 translations. * @details - * Generated on: 2023-03-24 14:58:20 + * Generated on: 2023-03-24 15:01:12 */ #include "translateEvents.h" @@ -96,7 +96,7 @@ const char *SAFE_RATE_VIOLATION_STRING = "SAFE_RATE_VIOLATION"; 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_AUTOMATIC_RECOVERY_STRING = "MEKF_AUTOMATIC_RECOVERY"; +const char *MEKF_RECOVERY_STRING = "MEKF_RECOVERY"; 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"; @@ -466,7 +466,7 @@ const char *translateEvents(Event event) { case (11203): return MEKF_INVALID_INFO_STRING; case (11204): - return MEKF_AUTOMATIC_RECOVERY_STRING; + return MEKF_RECOVERY_STRING; case (11205): return MEKF_INVALID_MODE_VIOLATION_STRING; case (11206): diff --git a/linux/fsfwconfig/objects/translateObjects.cpp b/linux/fsfwconfig/objects/translateObjects.cpp index ee535ba1..e63c74d3 100644 --- a/linux/fsfwconfig/objects/translateObjects.cpp +++ b/linux/fsfwconfig/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 173 translations. - * Generated on: 2023-03-24 14:58:20 + * Generated on: 2023-03-24 15:01:12 */ #include "translateObjects.h" diff --git a/mission/acsDefs.h b/mission/acsDefs.h index fa3bd3ad..6af803ab 100644 --- a/mission/acsDefs.h +++ b/mission/acsDefs.h @@ -30,6 +30,8 @@ static constexpr Event MULTIPLE_RW_INVALID = MAKE_EVENT(2, severity::HIGH); //! [EXPORT] : [COMMENT] MEKF was not able to compute a solution. //! P1: MEKF state on exit static constexpr Event MEKF_INVALID_INFO = MAKE_EVENT(3, severity::INFO); +//!< MEKF is able to compute a solution again. +static constexpr Event MEKF_RECOVERY = MAKE_EVENT(4, severity::INFO); //! [EXPORT] : [COMMENT] MEKF performed an automatic recovery after detection of nonfinite values. static constexpr Event MEKF_AUTOMATIC_RECOVERY = MAKE_EVENT(4, severity::INFO); //! [EXPORT] : [COMMENT] MEKF was not able to compute a solution during any pointing ACS mode for a diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index 96a25c9d..62bf82b1 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -311,6 +311,7 @@ void AcsController::performPointingCtrl() { &susDataProcessed, &mekfData, &acsParameters); if (result != MultiplicativeKalmanFilter::MEKF_RUNNING && result != MultiplicativeKalmanFilter::MEKF_INITIALIZED) { + mekfInvalidCounter++; if (not mekfInvalidFlag) { triggerEvent(acs::MEKF_INVALID_INFO, (uint32_t)mekfData.mekfStatus.value); mekfInvalidFlag = true; @@ -323,15 +324,18 @@ void AcsController::performPointingCtrl() { if (mekfInvalidCounter > acsParameters.onBoardParams.mekfViolationTimer) { // Trigger this so STR FDIR can set the device faulty. EventManagerIF::triggerEvent(objects::STAR_TRACKER, acs::MEKF_INVALID_MODE_VIOLATION, 0, 0); + mekfInvalidCounter = 0; } - mekfInvalidCounter++; // commandActuators(0, 0, 0, acsParameters.magnetorquesParameter.torqueDuration, // cmdSpeedRws[0], // cmdSpeedRws[1], cmdSpeedRws[2], cmdSpeedRws[3], // acsParameters.rwHandlingParameters.rampTime); return; } else { - mekfInvalidFlag = false; + if (mekfInvalidFlag) { + triggerEvent(acs::MEKF_RECOVERY); + mekfInvalidFlag = false; + } mekfInvalidCounter = 0; } uint8_t enableAntiStiction = true; diff --git a/tmtc b/tmtc index 9f17661f..5e0d33c9 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 9f17661f529e045e92714817bdc52572f976da2d +Subproject commit 5e0d33c9a843c3cd2da10304050665ef25a08f2a