rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
thermistor_func.h
Go to the documentation of this file.
1/**
2 * @author Matthew Kennedy, (c) 2019
3 *
4 * A function to convert resistance to thermistor temperature (NTC). Uses the
5 * Steinhart-Hart equation to avoid having to compute many logarithms at runtime.
6 */
7
8#pragma once
9
12#include "resistance_func.h"
13#include "func_chain.h"
14
15class ThermistorFunc final : public SensorConverter {
16public:
17 SensorResult convert(float ohms) const override;
18
20
21 void showInfo(float testRawValue) const override;
22
23 // Steinhart-Hart coefficients
24 float m_a = 0;
25 float m_b = 0;
26 float m_c = 0;
27};
28
31
void showInfo(float testRawValue) const override
void configure(thermistor_conf_s &cfg)
SensorResult convert(float ohms) const override
expected< float > SensorResult
Definition sensor.h:46
FuncChain< resist, therm > thermistor_t