enjoying C++11

This commit is contained in:
rusefi 2019-01-13 23:25:15 -05:00
parent 02fcc40b8b
commit 43735bffa0
2 changed files with 4 additions and 10 deletions

View File

@ -65,16 +65,15 @@ private:
class ThermistorMath {
public:
ThermistorMath();
void setConfig(thermistor_conf_s *config);
void prepareThermistorCurve(thermistor_conf_s *tc);
bool isLinearSensor();
float getKelvinTemperatureByResistance(float resistance);
float s_h_a;
float s_h_b;
float s_h_c;
float s_h_a = 0;
float s_h_b = 0;
float s_h_c = 0;
private:
thermistor_conf_s currentConfig;
thermistor_conf_s currentConfig = {};
};
class Accelerometer {

View File

@ -249,11 +249,6 @@ void initThermistors(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX) {
#endif
}
ThermistorMath::ThermistorMath() {
memset(&currentConfig, 0, sizeof(currentConfig));
s_h_a = s_h_b = s_h_c = 0;
}
void ThermistorMath::setConfig(thermistor_conf_s *config) {
bool isSameConfig = memcmp(config, &currentConfig, sizeof(currentConfig)) == 0;
if (isSameConfig) {