Fix style problems in main.c

This commit is contained in:
Mario Hüttel 2021-10-10 20:45:59 +02:00
parent 400c77f11c
commit c8e3bf5de2

View File

@ -140,9 +140,9 @@ static bool mount_sd_card_if_avail(bool mounted)
if (res == FR_OK) { if (res == FR_OK) {
led_set(1, 1); led_set(1, 1);
return true; return true;
} } else {
else
return false; return false;
}
} }
return mounted; return mounted;
@ -202,9 +202,8 @@ static inline void setup_system(void)
settings_setup(); settings_setup();
/* Load the overtemperature limit from eeprom if available. Otherwise the default value will be used */ /* 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); safety_controller_set_overtemp_limit(tmp);
}
handle_boot_status(); handle_boot_status();
@ -241,9 +240,8 @@ int main(void)
/* Try load the calibration. This will only succeed if there's an EEPROM */ /* Try load the calibration. This will only succeed if there's an EEPROM */
status = settings_load_calibration(&sens, &offset); status = settings_load_calibration(&sens, &offset);
if (!status) { if (!status)
adc_pt1000_set_resistance_calibration(offset, sens, true); adc_pt1000_set_resistance_calibration(offset, sens, true);
}
shell_handle = shell_init(write_shell_callback); shell_handle = shell_init(write_shell_callback);
shell_print_motd(shell_handle); shell_print_motd(shell_handle);
@ -261,9 +259,8 @@ int main(void)
adc_pt1000_get_resistance_calibration(NULL, NULL, &cal_active); adc_pt1000_get_resistance_calibration(NULL, NULL, &cal_active);
if (!cal_active) { if (!cal_active) {
status = settings_load_calibration(&sens, &offset); status = settings_load_calibration(&sens, &offset);
if (!status) { if (!status)
adc_pt1000_set_resistance_calibration(offset, sens, true); adc_pt1000_set_resistance_calibration(offset, sens, true);
}
} }
} }
@ -277,9 +274,9 @@ int main(void)
temp_profile_executer_handle(); temp_profile_executer_handle();
safety_controller_handle(); safety_controller_handle();
if (oven_pid_get_status() == OVEN_PID_RUNNING) { if (oven_pid_get_status() == OVEN_PID_RUNNING)
oven_pid_handle(); oven_pid_handle();
}
oven_driver_apply_power_level(); oven_driver_apply_power_level();
safety_controller_report_timing(ERR_TIMING_MAIN_LOOP); safety_controller_report_timing(ERR_TIMING_MAIN_LOOP);