From c8e3bf5de27683796950582ecc5d019c5e79453c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Sun, 10 Oct 2021 20:45:59 +0200 Subject: [PATCH] Fix style problems in main.c --- stm-firmware/main.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/stm-firmware/main.c b/stm-firmware/main.c index c4b9e8e..efb8ad1 100644 --- a/stm-firmware/main.c +++ b/stm-firmware/main.c @@ -140,9 +140,9 @@ static bool mount_sd_card_if_avail(bool mounted) if (res == FR_OK) { led_set(1, 1); return true; - } - else + } else { return false; + } } return mounted; @@ -202,9 +202,8 @@ static inline void setup_system(void) 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) { + if (settings_load_overtemp_limit(&tmp) == SETT_LOAD_SUCCESS) safety_controller_set_overtemp_limit(tmp); - } handle_boot_status(); @@ -241,9 +240,8 @@ int main(void) /* Try load the calibration. This will only succeed if there's an EEPROM */ status = settings_load_calibration(&sens, &offset); - if (!status) { + if (!status) adc_pt1000_set_resistance_calibration(offset, sens, true); - } shell_handle = shell_init(write_shell_callback); shell_print_motd(shell_handle); @@ -261,9 +259,8 @@ int main(void) adc_pt1000_get_resistance_calibration(NULL, NULL, &cal_active); if (!cal_active) { status = settings_load_calibration(&sens, &offset); - if (!status) { + if (!status) adc_pt1000_set_resistance_calibration(offset, sens, true); - } } } @@ -277,9 +274,9 @@ int main(void) temp_profile_executer_handle(); safety_controller_handle(); - if (oven_pid_get_status() == OVEN_PID_RUNNING) { + if (oven_pid_get_status() == OVEN_PID_RUNNING) oven_pid_handle(); - } + oven_driver_apply_power_level(); safety_controller_report_timing(ERR_TIMING_MAIN_LOOP);