Issue #15: Implement safety weight table

* CRC protected flag weight table.
* Currently only filled with dummy values. Has to be finished in issue #5
* Config overrides from safety memor ynot yet implemented
This commit is contained in:
2020-09-06 21:05:00 +02:00
parent 192bcf01f6
commit 403786e0c6
4 changed files with 118 additions and 42 deletions

View File

@@ -124,10 +124,10 @@ enum config_override_entry_type {
/**
* @brief Weights of error flags.
*/
enum config_override_weight {
SAFETY_MEMORY_CONFIG_WEIGHT_NONE = 0, /**< @brief This flag has no global error consequence, but might be respected by certain software modules. */
SAFETY_MEMORY_CONFIG_WEIGHT_PID = 1, /**< @brief This flag will force a stop of the temperature PID controller */
SAFETY_MEMORY_CONFIG_WEIGHT_PANIC = 2, /**< @brief This flag will trigger the panic mode */
enum config_weight {
SAFETY_FLAG_CONFIG_WEIGHT_NONE = 0, /**< @brief This flag has no global error consequence, but might be respected by certain software modules. */
SAFETY_FLAG_CONFIG_WEIGHT_PID = 1, /**< @brief This flag will force a stop of the temperature PID controller */
SAFETY_FLAG_CONFIG_WEIGHT_PANIC = 2, /**< @brief This flag will trigger the panic mode */
};
/**
@@ -138,7 +138,7 @@ struct config_override {
union {
struct {
uint8_t flag;
enum config_override_weight weight;
enum config_weight weight;
} weight_override;
struct {
uint8_t flag;