different API

This commit is contained in:
rusefillc 2023-03-27 23:57:56 -04:00
parent c90e66e1db
commit c125263b0e
2 changed files with 19 additions and 0 deletions

View File

@ -16,6 +16,20 @@ void setDodgeSensor(ThermistorConf *thermistorConf, float pullup) {
thermistorConf->config = {-40, 30, 120, 336660, 7550, 390, pullup};
}
void setAtSensor(ThermistorConf *thermistorConf,
float tempLow, float rLow,
float tempMid, float rMid,
float tempHigh, float rHigh) {
thermistorConf->config.tempC_1 = tempLow;
thermistorConf->config.resistance_1 = rLow;
thermistorConf->config.tempC_2 = tempMid;
thermistorConf->config.resistance_2 = rMid;
thermistorConf->config.tempC_3 = tempHigh;
thermistorConf->config.resistance_3 = rHigh;
}
// todo: better method name?
void setCommonNTCSensor(ThermistorConf *thermistorConf, float pullup) {
/**

View File

@ -15,6 +15,11 @@
#define convertKelvinToCelcius(tempK) ((tempK) - KELV)
#define convertCelsiusToKelvin(tempC) ((tempC) + KELV)
void setAtSensor(ThermistorConf *thermistorConf,
float tempLow, float rLow,
float tempMid, float rMid,
float tempHigh, float rHigh);
void setCommonNTCSensor(ThermistorConf *thermistorConf, float pullup);
void setDodgeSensor(ThermistorConf *thermistorConf, float pullup);
void set10K_4050K(ThermistorConf *thermistorConf, float pullup);