Improve code
This commit is contained in:
parent
e06c9f7ddc
commit
58937b46f6
@ -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)
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user