Issue #26: Add configuration for overtemperature flag to safety controller and include the config in the memory checking

This commit is contained in:
2021-02-02 20:35:45 +01:00
parent 64bb06882f
commit 50ad31d58a
4 changed files with 92 additions and 1 deletions

View File

@@ -129,6 +129,11 @@ enum analog_value_monitor {
#define SAFETY_EXT_WATCHDOG_RCC_MASK RCC_AHB1ENR_GPIODEN
#define SAFETY_EXT_WATCHDOG_PIN (12)
/**
* @brief Default Limit of the overtemperature detection
*/
#define SAFETY_DEFAULT_OVERTEMP_LIMIT_DEGC (260.0f)
/**
* @brief Key used to lock the safety flags coming from the measurment ADC from external ack'ing
*/

View File

@@ -250,7 +250,22 @@ int safety_controller_get_timing_mon_name_by_index(uint32_t index, char *buffer,
* @brief Get the count of timing monitors
* @return Timing monitor count
*/
uint32_t safety_controller_get_timing_monitor_count();
uint32_t safety_controller_get_timing_monitor_count(void);
/**
* @brief Set the overtemperature limit and store it permanently in the EEPROM
*
* If no EEPROM is present, this will fail. The default value @ref SAFETY_DEFAULT_OVERTEMP_LIMIT_DEGC will be used.
* @param over_temperature Over temperature to set
* @return 0 if successfully saved and applied, negative if error
*/
int safety_controller_configure_overtemp_limit(float over_temperature);
/**
* @brief Read the current overtemperature limit.
* @return Over temperature limit
*/
float safety_controller_get_overtemp_limit(void);
#endif /* __SAFETY_CONTROLLER_H__ */