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,11 +199,11 @@ void adc_pt1000_set_resistance_calibration(float offset, float sensitivity_devia
void adc_pt1000_get_resistance_calibration(float *offset, float *sensitivity_deviation, bool *active) void adc_pt1000_get_resistance_calibration(float *offset, float *sensitivity_deviation, bool *active)
{ {
if (!offset || !sensitivity_deviation || !active) if (offset)
return;
*offset = pt1000_offset; *offset = pt1000_offset;
if (sensitivity_deviation)
*sensitivity_deviation = pt1000_sens_dev; *sensitivity_deviation = pt1000_sens_dev;
if (active)
*active = calibration_active; *active = calibration_active;
} }

View File

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