Improve code
This commit is contained in:
		@@ -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)
 | 
					void adc_pt1000_get_resistance_calibration(float *offset, float *sensitivity_deviation, bool *active)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	if (!offset || !sensitivity_deviation || !active)
 | 
						if (offset)
 | 
				
			||||||
		return;
 | 
							*offset = pt1000_offset;
 | 
				
			||||||
 | 
						if (sensitivity_deviation)
 | 
				
			||||||
	*offset = pt1000_offset;
 | 
							*sensitivity_deviation = pt1000_sens_dev;
 | 
				
			||||||
	*sensitivity_deviation = pt1000_sens_dev;
 | 
						if (active)
 | 
				
			||||||
	*active = calibration_active;
 | 
							*active = calibration_active;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static inline float adc_pt1000_apply_calibration(float raw_resistance)
 | 
					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];
 | 
						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;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user