mirror of https://github.com/FOME-Tech/fome-fw.git
enjoying C++11
This commit is contained in:
parent
02fcc40b8b
commit
43735bffa0
|
@ -65,16 +65,15 @@ private:
|
||||||
|
|
||||||
class ThermistorMath {
|
class ThermistorMath {
|
||||||
public:
|
public:
|
||||||
ThermistorMath();
|
|
||||||
void setConfig(thermistor_conf_s *config);
|
void setConfig(thermistor_conf_s *config);
|
||||||
void prepareThermistorCurve(thermistor_conf_s *tc);
|
void prepareThermistorCurve(thermistor_conf_s *tc);
|
||||||
bool isLinearSensor();
|
bool isLinearSensor();
|
||||||
float getKelvinTemperatureByResistance(float resistance);
|
float getKelvinTemperatureByResistance(float resistance);
|
||||||
float s_h_a;
|
float s_h_a = 0;
|
||||||
float s_h_b;
|
float s_h_b = 0;
|
||||||
float s_h_c;
|
float s_h_c = 0;
|
||||||
private:
|
private:
|
||||||
thermistor_conf_s currentConfig;
|
thermistor_conf_s currentConfig = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
class Accelerometer {
|
class Accelerometer {
|
||||||
|
|
|
@ -249,11 +249,6 @@ void initThermistors(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
ThermistorMath::ThermistorMath() {
|
|
||||||
memset(¤tConfig, 0, sizeof(currentConfig));
|
|
||||||
s_h_a = s_h_b = s_h_c = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ThermistorMath::setConfig(thermistor_conf_s *config) {
|
void ThermistorMath::setConfig(thermistor_conf_s *config) {
|
||||||
bool isSameConfig = memcmp(config, ¤tConfig, sizeof(currentConfig)) == 0;
|
bool isSameConfig = memcmp(config, ¤tConfig, sizeof(currentConfig)) == 0;
|
||||||
if (isSameConfig) {
|
if (isSameConfig) {
|
||||||
|
|
Loading…
Reference in New Issue