2020-02-15 20:31:38 +01:00
|
|
|
/* Reflow Oven Controller
|
|
|
|
*
|
|
|
|
* Copyright (C) 2020 Mario Hüttel <mario.huettel@gmx.net>
|
|
|
|
*
|
2020-02-15 22:09:55 +01:00
|
|
|
* This file is part of the Reflow Oven Controller Project.
|
2020-02-15 20:31:38 +01:00
|
|
|
*
|
|
|
|
* 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
|
2020-02-15 22:09:55 +01:00
|
|
|
* along with the reflow oven controller project.
|
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
2020-02-15 20:31:38 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#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);
|
|
|
|
|
2021-02-02 19:32:12 +01:00
|
|
|
/**
|
|
|
|
* @brief Convert temperature to PT1000 resistance
|
|
|
|
* @param temp Temperature in degrees celsius
|
|
|
|
* @param[out] resistance_out Resistance value
|
|
|
|
* @return 0 if ok, -1 if tmeperature is below the lookup table, 1 if value is above the lookup table, -1000 in case of a pointer error,
|
|
|
|
* -100 if an internal error occured. This should never happen, if the lookup table is correct
|
|
|
|
*/
|
|
|
|
int temp_convertet_convert_temp_to_resistance(float temp, float *resistance_out);
|
|
|
|
|
2020-02-15 20:31:38 +01:00
|
|
|
#endif /* __TEMP_CONVERTER_H__ */
|