auto-sync
This commit is contained in:
parent
483d870175
commit
73ac4177b5
|
@ -57,7 +57,7 @@ class ThermistorMath {
|
||||||
public:
|
public:
|
||||||
ThermistorMath();
|
ThermistorMath();
|
||||||
thermistor_curve_s curve;
|
thermistor_curve_s curve;
|
||||||
void init(thermistor_conf_s *config);
|
void setConfig(thermistor_conf_s *config);
|
||||||
private:
|
private:
|
||||||
thermistor_conf_s currentConfig;
|
thermistor_conf_s currentConfig;
|
||||||
};
|
};
|
||||||
|
|
|
@ -452,12 +452,14 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
// todo: this value is way off! I am pretty sure temp coeffs are off also
|
// todo: this value is way off! I am pretty sure temp coeffs are off also
|
||||||
engineConfiguration->iat.config.bias_resistor = 2700;
|
engineConfiguration->iat.config.bias_resistor = 2700;
|
||||||
|
|
||||||
|
engineConfiguration->auxTempSensor1.adcChannel = EFI_ADC_NONE;
|
||||||
|
engineConfiguration->auxTempSensor2.adcChannel = EFI_ADC_NONE;
|
||||||
|
|
||||||
#if EFI_PROD_CODE
|
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||||
engineConfiguration->warningPeriod = 10;
|
engineConfiguration->warningPeriod = 10;
|
||||||
#else
|
#else
|
||||||
engineConfiguration->warningPeriod = 0;
|
engineConfiguration->warningPeriod = 0;
|
||||||
#endif
|
#endif /* EFI_PROD_CODE */
|
||||||
|
|
||||||
engineConfiguration->step1rpm = 3000;
|
engineConfiguration->step1rpm = 3000;
|
||||||
engineConfiguration->step1timing = 10;
|
engineConfiguration->step1timing = 10;
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
#include "engine_math.h"
|
#include "engine_math.h"
|
||||||
|
|
||||||
|
#define _5_VOLTS 5.0
|
||||||
|
|
||||||
// Celsius
|
// Celsius
|
||||||
#define NO_IAT_SENSOR_TEMPERATURE 32.0f
|
#define NO_IAT_SENSOR_TEMPERATURE 32.0f
|
||||||
#define LIMPING_MODE_IAT_TEMPERATURE 30.0f
|
#define LIMPING_MODE_IAT_TEMPERATURE 30.0f
|
||||||
|
@ -48,7 +50,7 @@ float getVoutInVoltageDividor(float Vin, float r1, float r2) {
|
||||||
}
|
}
|
||||||
|
|
||||||
float getKelvinTemperature(ThermistorConf *config, float resistance, ThermistorMath *tm) {
|
float getKelvinTemperature(ThermistorConf *config, float resistance, ThermistorMath *tm) {
|
||||||
tm->init(&config->config); // implementation checks if config has changed or not
|
tm->setConfig(&config->config); // implementation checks if config has changed or not
|
||||||
thermistor_curve_s * curve = &tm->curve;
|
thermistor_curve_s * curve = &tm->curve;
|
||||||
efiAssert(curve != NULL, "thermistor pointer is NULL", NAN);
|
efiAssert(curve != NULL, "thermistor pointer is NULL", NAN);
|
||||||
|
|
||||||
|
@ -223,7 +225,7 @@ void initThermistors(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_S) {
|
||||||
logger = sharedLogger;
|
logger = sharedLogger;
|
||||||
efiAssertVoid(engine!=NULL, "e NULL initThermistors");
|
efiAssertVoid(engine!=NULL, "e NULL initThermistors");
|
||||||
|
|
||||||
#if EFI_PROD_CODE
|
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||||
addConsoleActionF("test_clt_by_r", testCltByR);
|
addConsoleActionF("test_clt_by_r", testCltByR);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -235,7 +237,7 @@ ThermistorMath::ThermistorMath() {
|
||||||
memset(&curve, 0, sizeof(curve));
|
memset(&curve, 0, sizeof(curve));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThermistorMath::init(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) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
|
||||||
#define _5_VOLTS 5.0
|
|
||||||
#define KELV 273.15f
|
#define KELV 273.15f
|
||||||
|
|
||||||
#include "sensor_types.h"
|
#include "sensor_types.h"
|
||||||
|
|
Loading…
Reference in New Issue