From f458279a359e4591d8638405fabe5b45d88a5351 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Sun, 26 Sep 2021 18:32:15 -0400 Subject: [PATCH] h-bridge dialog is disabled in TS when it should be enabled --- firmware/integration/rusefi_config.txt | 1 + firmware/tunerstudio/rusefi.input | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index b69974f33d..dc6d4369a9 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -215,6 +215,7 @@ struct_no_prefix engine_configuration_s #define MAP_ACCEL_TAPER 8 #define ADC_CHANNEL_NONE 0 #define ETB_FUNCTION_NONE 0 +#define DC_FUNCTION_IDLE 3 #define BARO_CORR_SIZE 4 diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 78dc33b410..9ccaf7dc6c 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -2642,7 +2642,7 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@\x00\x31\x00\x00" field = "Force parking every restart", stepperForceParkingEveryRestart, useStepperIdle panel = idleStepperHw, { useStepperIdle && !useHbridgesToDriveIdleStepper } ; todo: reminder that enable condition has to match in both usages of hbridgeHardware due to TS defect? - panel = hbridgeHardware, { etbFunctions1 != ETB_FUNCTION_NONE || etbFunctions2 = ETB_FUNCTION_NONE || (useStepperIdle && useHbridgesToDriveIdleStepper) } + panel = hbridgeHardware, { etbFunctions1 != @@ETB_FUNCTION_NONE@@ || etbFunctions2 = @@ETB_FUNCTION_NONE@@ || (useStepperIdle && useHbridgesToDriveIdleStepper) } dialog = idleHwType, "Idle Valve Hardware", border panel = idleSolenoid, West @@ -3388,7 +3388,7 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@\x00\x31\x00\x00" ; criteria for the same panel when used in multiple places ; todo: report bug to TS? ; another todo: split panel into two panels so that we can enable/disable h-bridge #1 separately from h-bridge #2 - panel = hbridgeHardware, { etbFunctions1 != ETB_FUNCTION_NONE || etbFunctions2 = ETB_FUNCTION_NONE || (useStepperIdle && useHbridgesToDriveIdleStepper) } + panel = hbridgeHardware, { etbFunctions1 != @@ETB_FUNCTION_NONE@@ || etbFunctions2 = @@ETB_FUNCTION_NONE@@ || (useStepperIdle && useHbridgesToDriveIdleStepper) } dialog = etbAutotune, "PID Autotune" field = "First step: calibrate TPS and hit 'Burn'" @@ -3404,7 +3404,7 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@\x00\x31\x00\x00" dialog = etbDialogRight panel = etbIdleDialog, { throttlePedalPositionAdcChannel != @@ADC_CHANNEL_NONE@@ } - panel = etbPidDialog, { (throttlePedalPositionAdcChannel != @@ADC_CHANNEL_NONE@@) } + panel = etbPidDialog, { (throttlePedalPositionAdcChannel != @@ADC_CHANNEL_NONE@@) || (etbFunctions1 == @@DC_FUNCTION_IDLE@@) } panel = etbAutotune ; Neutral position handling not yet implemented!