Add conversion function for resistance to temperature conversion and add it to thept command of the shell
This commit is contained in:
31
stm-firmware/include/reflow-controller/temp-converter.h
Normal file
31
stm-firmware/include/reflow-controller/temp-converter.h
Normal file
@@ -0,0 +1,31 @@
|
||||
/* Reflow Oven Controller
|
||||
*
|
||||
* Copyright (C) 2020 Mario Hüttel <mario.huettel@gmx.net>
|
||||
*
|
||||
* This file is part of the reflow Oven Controller Project.
|
||||
*
|
||||
* The reflow oven controller is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* GDSII-Converter is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GDSII-Converter. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __TEMP_CONVERTER_H__
|
||||
#define __TEMP_CONVERTER_H__
|
||||
|
||||
/**
|
||||
* @brief Convert PT1000 resistance to temperature in degrees celsius
|
||||
* @param resistance PT1000 resistance value
|
||||
* @param[out] temp_out Temperature output
|
||||
* @return 0 if ok, -1 if value is below conversion range, 1 if value is above conversion range,-1000 in case of pointer error
|
||||
*/
|
||||
int temp_converter_convert_resistance_to_temp(float resistance, float *temp_out);
|
||||
|
||||
#endif /* __TEMP_CONVERTER_H__ */
|
Reference in New Issue
Block a user