diff --git a/firmware/controllers/actuators/fan_control.cpp b/firmware/controllers/actuators/fan_control.cpp index f8e51552ed..d3a278cfdf 100644 --- a/firmware/controllers/actuators/fan_control.cpp +++ b/firmware/controllers/actuators/fan_control.cpp @@ -34,5 +34,5 @@ void updateFans(DECLARE_ENGINE_PARAMETER_SIGNATURE) { #endif fanControl(enginePins.fanRelay, CONFIG(fanOnTemperature), CONFIG(fanOffTemperature), CONFIG(enableFan1WithAc) PASS_ENGINE_PARAMETER_SUFFIX); - //fanControl(enginePins.fanRelay2, CONFIG(fan2OnTemperature), CONFIG(fan2OffTemperature), CONFIG(enableFan2WithAc) PASS_ENGINE_PARAMETER_SUFFIX); + fanControl(enginePins.fanRelay2, CONFIG(fan2OnTemperature), CONFIG(fan2OffTemperature), CONFIG(enableFan2WithAc) PASS_ENGINE_PARAMETER_SUFFIX); } diff --git a/firmware/controllers/algo/defaults/default_base_engine.cpp b/firmware/controllers/algo/defaults/default_base_engine.cpp index b89949c117..372c4d4a3f 100644 --- a/firmware/controllers/algo/defaults/default_base_engine.cpp +++ b/firmware/controllers/algo/defaults/default_base_engine.cpp @@ -53,9 +53,11 @@ void setDefaultBaseEngine(DECLARE_CONFIG_PARAMETER_SIGNATURE) { // Fuel pump engineConfiguration->startUpFuelPumpDuration = 4; - // Fan + // Fans engineConfiguration->fanOnTemperature = 95; engineConfiguration->fanOffTemperature = 91; + engineConfiguration->fan2OnTemperature = 95; + engineConfiguration->fan2OffTemperature = 91; // Tachometer // 50% duty cycle is the default for tach signal diff --git a/firmware/controllers/system/efi_gpio.cpp b/firmware/controllers/system/efi_gpio.cpp index a43d18d1f0..9a6a98c3a5 100644 --- a/firmware/controllers/system/efi_gpio.cpp +++ b/firmware/controllers/system/efi_gpio.cpp @@ -113,6 +113,7 @@ EnginePins::EnginePins() : starterControl("Starter Relay", CONFIG_PIN_OFFSETS(starterControl)), starterRelayDisable("Starter Disable Relay", CONFIG_PIN_OFFSETS(starterRelayDisable)), fanRelay("Fan Relay", CONFIG_PIN_OFFSETS(fan)), + fanRelay2("Fan Relay 2", CONFIG_PIN_OFFSETS(fan2)), acRelay("A/C Relay", CONFIG_PIN_OFFSETS(acRelay)), fuelPumpRelay("Fuel pump Relay", CONFIG_PIN_OFFSETS(fuelPump)), boostPin("Boost", CONFIG_PIN_OFFSETS(boostControl)), diff --git a/firmware/controllers/system/efi_gpio.h b/firmware/controllers/system/efi_gpio.h index 0276f0deb0..a5559c2882 100644 --- a/firmware/controllers/system/efi_gpio.h +++ b/firmware/controllers/system/efi_gpio.h @@ -176,6 +176,8 @@ public: RegisteredOutputPin starterRelayDisable; RegisteredOutputPin fanRelay; + RegisteredOutputPin fanRelay2; + // see acRelayPin RegisteredOutputPin acRelay; RegisteredOutputPin fuelPumpRelay; diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 2986caed98..d2af03ead7 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -1342,7 +1342,7 @@ tle8888_mode_e tle8888mode; custom injector_compensation_mode_e 1 bits, U08, @OFFSET@, [0:1], "None", "Fixed rail pressure", "Sensed Rail Pressure" injector_compensation_mode_e injectorCompensationMode;+None = I have a MAP-referenced fuel pressure regulator\nFixed rail pressure = I have an atmosphere-referenced fuel pressure regulator (returnless, typically)\nSensed rail pressure = I have a fuel pressure sensor; - uint8_t unused2419;;"units", 1, 0, -20, 100, 0 + pin_output_mode_e fan2PinMode; float fuelReferencePressure;+This is the pressure at which your injector flow is known.\nFor example if your injectors flow 400cc/min at 3.5 bar, enter 350kpa here.;"kPa", 1, 0, 0, 700000, 0 float unused244_2;;"units", 1, 0, -20, 100, 0 float unused244_3;;"units", 1, 0, -20, 100, 0 @@ -1392,9 +1392,9 @@ tle8888_mode_e tle8888mode; linear_sensor_s oilPressure; spi_device_e accelerometerSpiDevice; - uint8_t[1] unusedAuxVoltage1_TODO_332;;"units", 1, 0, -20, 100, 0 - uint8_t[1] unusedAuxVoltage2_TODO_332;;"units", 1, 0, -20, 100, 0 - uint8_t[1] unusedSpiPadding5;;"units", 1, 0, -20, 100, 0 + output_pin_e fan2Pin; + uint8_t fan2OnTemperature;+Cooling fan turn-on temperature threshold, in Celsius;"deg C", 1, 0, 0, 150, 0 + uint8_t fan2OffTemperature;+Cooling fan turn-off temperature threshold, in Celsius;"deg C", 1, 0, 0, 150, 0 float[FSIO_CURVE_16] fsioCurve1Bins;;"x", 1, 0, -999, 1000.0, 3 float[FSIO_CURVE_16] fsioCurve1;;"y", 1, 0, -999, 1000.0, 3 float[FSIO_CURVE_16] fsioCurve2Bins;;"x", 1, 0, -999, 1000.0, 3 diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 422b6f9bce..3b3469a9bf 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -2676,12 +2676,12 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@\x00\x31\x00\x00" field = "Off temperature", fanOffTemperature field = "Enable with AC", enableFan1WithAc - ;dialog = fan2Settings, "Fan 2" - ; field = "Pin", fan2Pin - ; field = "Pin mode", fan2PinMode - ; field = "On temperature", fan2OnTemperature - ; field = "Off temperature", fan2OffTemperature - ; field = "Enable with AC", enableFan2WithAc + dialog = fan2Settings, "Fan 2" + field = "Pin", fan2Pin + field = "Pin mode", fan2PinMode + field = "On temperature", fan2OnTemperature + field = "Off temperature", fan2OffTemperature + field = "Enable with AC", enableFan2WithAc dialog = acSettings, "A/C Settings" field = "A/C Relay", acRelayPin @@ -2689,7 +2689,7 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@\x00\x31\x00\x00" dialog = fanSetting, "Fan Settings" panel = fan1Settings - ;panel = fan2Settings + panel = fan2Settings panel = acSettings dialog = fuelPump, "Fuel Pump"