Commit b6401a26 authored by user2684's avatar user2684
Browse files

SensorThermistor class is limited int value #64

parent dcc7e621
......@@ -394,7 +394,7 @@ SensorThermistor::SensorThermistor(int child_id, int pin): Sensor(child_id, pin)
}
// setter/getter
void SensorThermistor::setNominalResistor(int value) {
void SensorThermistor::setNominalResistor(long value) {
_nominal_resistor = value;
}
void SensorThermistor::setNominalTemperature(int value) {
......@@ -403,7 +403,7 @@ void SensorThermistor::setNominalTemperature(int value) {
void SensorThermistor::setBCoefficient(int value) {
_b_coefficient = value;
}
void SensorThermistor::setSeriesResistor(int value) {
void SensorThermistor::setSeriesResistor(long value) {
_series_resistor = value;
}
void SensorThermistor::setOffset(float value) {
......
......@@ -387,13 +387,13 @@ class SensorThermistor: public Sensor {
public:
SensorThermistor(int child_id, int pin);
// resistance at 25 degrees C (default: 10000)
void setNominalResistor(int value);
void setNominalResistor(long value);
// temperature for nominal resistance (default: 25)
void setNominalTemperature(int value);
// The beta coefficient of the thermistor (default: 3950)
void setBCoefficient(int value);
// the value of the resistor in series with the thermistor (default: 10000)
void setSeriesResistor(int value);
void setSeriesResistor(long value);
// set a temperature offset
void setOffset(float value);
// define what to do at each stage of the sketch
......@@ -402,10 +402,10 @@ class SensorThermistor: public Sensor {
void onLoop();
void onReceive(const MyMessage & message);
protected:
int _nominal_resistor = 10000;
long _nominal_resistor = 10000;
int _nominal_temperature = 25;
int _b_coefficient = 3950;
int _series_resistor = 10000;
long _series_resistor = 10000;
float _offset = 0;
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment