2 this file is part of smoothie (http://smoothieware.org/). the motion control part is heavily based on grbl (https://github.com/simen/grbl).
3 smoothie is free software: you can redistribute it and/or modify it under the terms of the gnu general public license as published by the free software foundation, either version 3 of the license, or (at your option) any later version.
4 smoothie 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.
5 you should have received a copy of the gnu general public license along with smoothie. if not, see <http://www.gnu.org/licenses/>.
11 #include "TempSensor.h"
12 #include "RingBuffer.h"
21 class Thermistor
: public TempSensor
27 // TempSensor interface.
28 void UpdateConfig(uint16_t module_checksum
, uint16_t name_checksum
);
29 float get_temperature();
30 bool set_optional(const sensor_options_t
& options
);
31 bool get_optional(sensor_options_t
& options
);
33 static std::tuple
<float,float,float> calculate_steinhart_hart_coefficients(float t1
, float r1
, float t2
, float r2
, float t3
, float r3
);
34 static void print_predefined_thermistors(StreamOutput
*);
37 int new_thermistor_reading();
38 float adc_value_to_temperature(uint32_t adc_value
);
41 // Thermistor computation settings using beta, not used if using Steinhart-Hart
45 // on board resistor settings
50 // this saves memory as we only use either beta or SHH
65 float min_temp
, max_temp
;
68 bool use_steinhart_hart
:1;
70 uint8_t thermistor_number
;