From d71f9600ade3d8b862d0d5451f7f0d21cbfeda19 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Thu, 10 Aug 2023 02:59:50 -0400 Subject: [PATCH] SBC --- firmware/config/engines/gm_sbc.cpp | 1 + firmware/controllers/sensors/thermistors.cpp | 4 ++++ firmware/controllers/sensors/thermistors.h | 1 + firmware/tunerstudio/rusefi.input | 2 +- 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/firmware/config/engines/gm_sbc.cpp b/firmware/config/engines/gm_sbc.cpp index 190caa2eff..62962d369b 100644 --- a/firmware/config/engines/gm_sbc.cpp +++ b/firmware/config/engines/gm_sbc.cpp @@ -89,6 +89,7 @@ void setSbc() { // wow high side relay control engineConfiguration->fuelPumpPin = PROTEUS_HS_1; + setGmCltSensor(&engineConfiguration->clt, PROTEUS_DEFAULT_AT_PULLUP); #endif // HW_PROTEUS engineConfiguration->mainRelayPin = Gpio::Unassigned; // vehicle controls main relay diff --git a/firmware/controllers/sensors/thermistors.cpp b/firmware/controllers/sensors/thermistors.cpp index 291319087c..d4afad4904 100644 --- a/firmware/controllers/sensors/thermistors.cpp +++ b/firmware/controllers/sensors/thermistors.cpp @@ -42,6 +42,10 @@ void setCommonNTCSensor(ThermistorConf *thermistorConf, float pullup) { /*resistance*/18000, /*resistance*/2100, /*resistance*/100, pullup}; } +void setGmCltSensor(ThermistorConf *thermistorConf, float pullup) { + thermistorConf->config = {-40, 40, 130, 100'000, 1459, 70, pullup}; +} + void set10K_4050K(ThermistorConf *thermistorConf, float pullup) { // see https://www.taydaelectronics.com/datasheets/A-409.pdf thermistorConf->config = {-30, 25, 130, 108000, 10000, 225, pullup}; diff --git a/firmware/controllers/sensors/thermistors.h b/firmware/controllers/sensors/thermistors.h index e0c387858b..c5d266b3f4 100644 --- a/firmware/controllers/sensors/thermistors.h +++ b/firmware/controllers/sensors/thermistors.h @@ -21,6 +21,7 @@ void setAtSensor(ThermistorConf *thermistorConf, float tempHigh, float rHigh); void setCommonNTCSensor(ThermistorConf *thermistorConf, float pullup); +void setGmCltSensor(ThermistorConf *thermistorConf, float pullup); void setDodgeSensor(ThermistorConf *thermistorConf, float pullup); void set10K_4050K(ThermistorConf *thermistorConf, float pullup); diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index d977c33d91..9befae3158 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -3042,7 +3042,7 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_ field = "Bias resistor", clt_bias_resistor, {clt_adcChannel != @@ADC_CHANNEL_NONE@@}@@if_ts_show_clt_iat_pullup settingSelector = "Common CLT Sensors" - settingOption = "GM CLT", clt_tempC_1=0,clt_resistance_1=9240,clt_tempC_2=40,clt_resistance_2=1459,clt_tempC_3=100,clt_resistance_3=177,useLinearCltSensor=0 + settingOption = "GM CLT", clt_tempC_1=-40,clt_resistance_1=100000,clt_tempC_2=40,clt_resistance_2=1459,clt_tempC_3=130,clt_resistance_3=70,useLinearCltSensor=0 settingOption = "Miata NA", clt_tempC_1=-20,clt_resistance_1=16150,clt_tempC_2=40,clt_resistance_2=1150,clt_tempC_3=80,clt_resistance_3=330,useLinearCltSensor=0 settingOption = "Miata NB", clt_tempC_1=-10,clt_resistance_1=9000,clt_tempC_2=20,clt_resistance_2=2500,clt_tempC_3=80,clt_resistance_3=320,useLinearCltSensor=0 settingOption = "Bosch Various", clt_tempC_1=0,clt_resistance_1=5896,clt_tempC_2=50,clt_resistance_2=834,clt_tempC_3=100,clt_resistance_3=187,useLinearCltSensor=0