Restructure safety handle function. Now returns worst flag state set. Used to blink LED

This commit is contained in:
2022-07-30 16:04:46 +02:00
parent 6ac108e1b2
commit aaed95cc95
5 changed files with 33 additions and 19 deletions

View File

@@ -27,6 +27,15 @@
#ifndef __SAFETY_CONFIG_H__
#define __SAFETY_CONFIG_H__
/**
* @brief Weights of error flags.
*/
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 */
};
/**
* @brief Enum type representing safety flags.
*