Improve code

This commit is contained in:
Mario Hüttel 2020-08-16 20:33:17 +02:00
parent e06c9f7ddc
commit 58937b46f6
2 changed files with 7 additions and 7 deletions

View File

@ -199,12 +199,12 @@ void adc_pt1000_set_resistance_calibration(float offset, float sensitivity_devia
void adc_pt1000_get_resistance_calibration(float *offset, float *sensitivity_deviation, bool *active)
{
if (!offset || !sensitivity_deviation || !active)
return;
*offset = pt1000_offset;
*sensitivity_deviation = pt1000_sens_dev;
*active = calibration_active;
if (offset)
*offset = pt1000_offset;
if (sensitivity_deviation)
*sensitivity_deviation = pt1000_sens_dev;
if (active)
*active = calibration_active;
}
static inline float adc_pt1000_apply_calibration(float raw_resistance)

View File

@ -161,7 +161,7 @@ int sd_card_settings_try_load_calibration(float *sens_deviation, float *offset)
{
char path[128];
int status;
int ret = -2;
int ret = 0;
if (!sens_deviation || !offset)
return -1000;