Fix code style

This commit is contained in:
Mario Hüttel 2020-09-27 22:13:49 +02:00
parent 84c747c81c
commit eec15df271
4 changed files with 13 additions and 10 deletions

View File

@ -309,7 +309,9 @@ static inline __attribute__((optimize("O3"))) void adc_pt1000_filter(float adc_p
safety_controller_ack_flag_with_key(ERR_FLAG_MEAS_ADC_UNSTABLE, MEAS_ADC_SAFETY_FLAG_KEY); safety_controller_ack_flag_with_key(ERR_FLAG_MEAS_ADC_UNSTABLE, MEAS_ADC_SAFETY_FLAG_KEY);
} }
pt1000_res_raw_lf = (1.0f-filter_alpha) * pt1000_res_raw_lf + filter_alpha * ADC_TO_RES(adc_prefiltered_value); pt1000_res_raw_lf = (1.0f - filter_alpha) * pt1000_res_raw_lf +
filter_alpha * ADC_TO_RES(adc_prefiltered_value);
safety_controller_report_timing(ERR_TIMING_MEAS_ADC); safety_controller_report_timing(ERR_TIMING_MEAS_ADC);
} }

View File

@ -42,8 +42,8 @@ int watchdog_ack(uint32_t magic);
/** /**
* @brief Check if reset was generated by the watchdog. * @brief Check if reset was generated by the watchdog.
* @note This also clears the relevant flag, so the function will reutrn false when called a second time * @note This also clears the relevant flag, so the function will return false when called a second time
* @return * @return true, if reset was generated by the watchdog
*/ */
bool watchdog_check_reset_source(void); bool watchdog_check_reset_source(void);

View File

@ -52,17 +52,17 @@ int watchdog_setup(uint8_t prescaler)
/** - Wait for the oscillator to be ready */ /** - Wait for the oscillator to be ready */
while (!(RCC->CSR & RCC_CSR_LSIRDY)); while (!(RCC->CSR & RCC_CSR_LSIRDY));
if (prescaler == 4) if (prescaler == 4U)
prescaler_reg_val = 0UL; prescaler_reg_val = 0UL;
else if (prescaler == 8) else if (prescaler == 8U)
prescaler_reg_val = 1UL; prescaler_reg_val = 1UL;
else if (prescaler == 16) else if (prescaler == 16U)
prescaler_reg_val = 2UL; prescaler_reg_val = 2UL;
else if (prescaler == 32) else if (prescaler == 32U)
prescaler_reg_val = 3UL; prescaler_reg_val = 3UL;
else if (prescaler == 64) else if (prescaler == 64U)
prescaler_reg_val = 4UL; prescaler_reg_val = 4UL;
else if (prescaler == 128) else if (prescaler == 128U)
prescaler_reg_val = 5UL; prescaler_reg_val = 5UL;
else else
prescaler_reg_val = 6UL; prescaler_reg_val = 6UL;

View File

@ -433,7 +433,8 @@ static shellmatta_retCode_t shell_cmd_read_flags(const shellmatta_handle_t handl
shellmatta_printf(handle, "Inactive\r\n"); shellmatta_printf(handle, "Inactive\r\n");
} else { } else {
shellmatta_printf(handle, " valid from %-8.2f to %-8.2f", amon_info.min, amon_info.max); shellmatta_printf(handle, " valid from %-8.2f to %-8.2f", amon_info.min, amon_info.max);
shellmatta_printf(handle, "\tchecked %llu ms ago\r\n", systick_get_global_tick() - amon_info.timestamp); shellmatta_printf(handle, "\tchecked %llu ms ago\r\n",
systick_get_global_tick() - amon_info.timestamp);
} }
} }