From 58b274c80c5649b2e304fcaaed167a03809ea375 Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Sun, 30 May 2021 05:04:04 -0600 Subject: [PATCH] safe boost duty (#2764) --- firmware/controllers/actuators/boost_control.cpp | 3 +-- firmware/integration/rusefi_config.txt | 2 +- firmware/tunerstudio/rusefi.input | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/firmware/controllers/actuators/boost_control.cpp b/firmware/controllers/actuators/boost_control.cpp index 83e41c8c27..b880ea3957 100644 --- a/firmware/controllers/actuators/boost_control.cpp +++ b/firmware/controllers/actuators/boost_control.cpp @@ -128,8 +128,7 @@ expected BoostController::getClosedLoop(float target, float manifoldP } void BoostController::setOutput(expected output) { - // TODO: hook up safe duty cycle - percent_t percent = output.value_or(/*CONFIG(boostControlSafeDutyCycle)*/ 0); + percent_t percent = output.value_or(CONFIG(boostControlSafeDutyCycle)); float duty = PERCENT_TO_DUTY(percent); if (m_pwm) { diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index f6e67927d5..b98f3c9deb 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -690,7 +690,7 @@ trigger_config_s trigger; custom spi_device_e 1 bits, U08, @OFFSET@, [0:2], "Off", "SPI1", "SPI2", "SPI3", "SPI4", "INVALID", "INVALID", "INVALID" spi_device_e hip9011SpiDevice; uint8_t failedMapFallback;+This value is only used for speed density fueling calculations.;"kPa", 1, 0, 0, 100, 0 - uint8_t unused542;;"unit", 1, 0, 0, 100, 0 + uint8_t boostControlSafeDutyCycle;+Duty cycle to use in case of a sensor failure. This duty cycle should produce the minimum possible amount of boost.;"%",1,0,0,100,0 adc_channel_e mafAdcChannel float globalFuelCorrection;set global_fuel_correction X;"coef", 1, 0.0, 0, 1000.0, 2 diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 5e51fd33a2..7e71ec6500 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -3265,6 +3265,7 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@\x00\x31\x00\x00" field = "Output Mode", boostControlPinMode, { isBoostControlEnabled } field = "Frequency", boostPwmFrequency, { isBoostControlEnabled } + field = "Safe duty cycle", boostControlSafeDutyCycle, { isBoostControlEnabled } dialog = boostDialog, "", border panel = boost_left, West panel = boostTableTbl, Center