* remove fsio

* hard code impl

* test it

* enable fan with AC

* make commented stuff match

* second fan config

* second fan ui

* defaults

* impl
This commit is contained in:
Matthew Kennedy 2021-06-13 05:06:45 -07:00 committed by GitHub
parent ca2244a043
commit 097bf85faf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 18 additions and 13 deletions

View File

@ -34,5 +34,5 @@ void updateFans(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
#endif #endif
fanControl(enginePins.fanRelay, CONFIG(fanOnTemperature), CONFIG(fanOffTemperature), CONFIG(enableFan1WithAc) PASS_ENGINE_PARAMETER_SUFFIX); 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);
} }

View File

@ -53,9 +53,11 @@ void setDefaultBaseEngine(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
// Fuel pump // Fuel pump
engineConfiguration->startUpFuelPumpDuration = 4; engineConfiguration->startUpFuelPumpDuration = 4;
// Fan // Fans
engineConfiguration->fanOnTemperature = 95; engineConfiguration->fanOnTemperature = 95;
engineConfiguration->fanOffTemperature = 91; engineConfiguration->fanOffTemperature = 91;
engineConfiguration->fan2OnTemperature = 95;
engineConfiguration->fan2OffTemperature = 91;
// Tachometer // Tachometer
// 50% duty cycle is the default for tach signal // 50% duty cycle is the default for tach signal

View File

@ -113,6 +113,7 @@ EnginePins::EnginePins() :
starterControl("Starter Relay", CONFIG_PIN_OFFSETS(starterControl)), starterControl("Starter Relay", CONFIG_PIN_OFFSETS(starterControl)),
starterRelayDisable("Starter Disable Relay", CONFIG_PIN_OFFSETS(starterRelayDisable)), starterRelayDisable("Starter Disable Relay", CONFIG_PIN_OFFSETS(starterRelayDisable)),
fanRelay("Fan Relay", CONFIG_PIN_OFFSETS(fan)), fanRelay("Fan Relay", CONFIG_PIN_OFFSETS(fan)),
fanRelay2("Fan Relay 2", CONFIG_PIN_OFFSETS(fan2)),
acRelay("A/C Relay", CONFIG_PIN_OFFSETS(acRelay)), acRelay("A/C Relay", CONFIG_PIN_OFFSETS(acRelay)),
fuelPumpRelay("Fuel pump Relay", CONFIG_PIN_OFFSETS(fuelPump)), fuelPumpRelay("Fuel pump Relay", CONFIG_PIN_OFFSETS(fuelPump)),
boostPin("Boost", CONFIG_PIN_OFFSETS(boostControl)), boostPin("Boost", CONFIG_PIN_OFFSETS(boostControl)),

View File

@ -176,6 +176,8 @@ public:
RegisteredOutputPin starterRelayDisable; RegisteredOutputPin starterRelayDisable;
RegisteredOutputPin fanRelay; RegisteredOutputPin fanRelay;
RegisteredOutputPin fanRelay2;
// see acRelayPin // see acRelayPin
RegisteredOutputPin acRelay; RegisteredOutputPin acRelay;
RegisteredOutputPin fuelPumpRelay; RegisteredOutputPin fuelPumpRelay;

View File

@ -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" 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; 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 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_2;;"units", 1, 0, -20, 100, 0
float unused244_3;;"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; linear_sensor_s oilPressure;
spi_device_e accelerometerSpiDevice; spi_device_e accelerometerSpiDevice;
uint8_t[1] unusedAuxVoltage1_TODO_332;;"units", 1, 0, -20, 100, 0 output_pin_e fan2Pin;
uint8_t[1] unusedAuxVoltage2_TODO_332;;"units", 1, 0, -20, 100, 0 uint8_t fan2OnTemperature;+Cooling fan turn-on temperature threshold, in Celsius;"deg C", 1, 0, 0, 150, 0
uint8_t[1] unusedSpiPadding5;;"units", 1, 0, -20, 100, 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] fsioCurve1Bins;;"x", 1, 0, -999, 1000.0, 3
float[FSIO_CURVE_16] fsioCurve1;;"y", 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 float[FSIO_CURVE_16] fsioCurve2Bins;;"x", 1, 0, -999, 1000.0, 3

View File

@ -2676,12 +2676,12 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@\x00\x31\x00\x00"
field = "Off temperature", fanOffTemperature field = "Off temperature", fanOffTemperature
field = "Enable with AC", enableFan1WithAc field = "Enable with AC", enableFan1WithAc
;dialog = fan2Settings, "Fan 2" dialog = fan2Settings, "Fan 2"
; field = "Pin", fan2Pin field = "Pin", fan2Pin
; field = "Pin mode", fan2PinMode field = "Pin mode", fan2PinMode
; field = "On temperature", fan2OnTemperature field = "On temperature", fan2OnTemperature
; field = "Off temperature", fan2OffTemperature field = "Off temperature", fan2OffTemperature
; field = "Enable with AC", enableFan2WithAc field = "Enable with AC", enableFan2WithAc
dialog = acSettings, "A/C Settings" dialog = acSettings, "A/C Settings"
field = "A/C Relay", acRelayPin 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" dialog = fanSetting, "Fan Settings"
panel = fan1Settings panel = fan1Settings
;panel = fan2Settings panel = fan2Settings
panel = acSettings panel = acSettings
dialog = fuelPump, "Fuel Pump" dialog = fuelPump, "Fuel Pump"