Issue #26: Add overtemp limit setting to settings module and load it from EEPROM at startup

This commit is contained in:
2021-02-15 20:28:45 +01:00
parent 7c5b60ec6b
commit b9dfe35652
6 changed files with 50 additions and 4 deletions

View File

@@ -168,6 +168,8 @@ static inline void handle_boot_status(void)
static inline void setup_system(void)
{
float tmp;
setup_nvic_priorities();
/* Init safety controller and safety memory */
@@ -182,6 +184,11 @@ static inline void setup_system(void)
uart_gpio_config();
settings_setup();
/* Load the overtemperature limit from eeprom if available. Otherwise the default value will be used */
if (settings_load_overtemp_limit(&tmp) == SETT_LOAD_SUCCESS) {
safety_controller_set_overtemp_limit(tmp);
}
handle_boot_status();
setup_shell_uart(&shell_uart);