diff --git a/firmware/controllers/limp_manager.h b/firmware/controllers/limp_manager.h index 3cbc38f4ee..45aff0e7f4 100644 --- a/firmware/controllers/limp_manager.h +++ b/firmware/controllers/limp_manager.h @@ -26,6 +26,18 @@ enum class ClearReason : uint8_t { // todo: add a code generator between ClearReason and fuelIgnCutCodeList in rusefi.input }; + +enum class TpsState : uint8_t { + None, // 0 + Setting, + TpsError, + PpsError, // 3 + InputJitter, + PidJitter, + + // keep this list in sync with etbCutCodeList +}; + // Only allows clearing the value, but never resetting it. class Clearable { public: diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index ad30470641..970ea1ed9d 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -1348,7 +1348,7 @@ custom stepper_num_micro_steps_e 1 bits, U08, @OFFSET@, [0:3], @@stepper_num_mic brain_input_pin_e[SENT_INPUT_COUNT iterate] sentInputPins; int8_t launchFuelAdderPercent - int8_t[1 iterate] sorryUnused + int8_t tpsErrorCode int16_t etbExpAverageLength float etbDutyThreshold diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 471cbe442e..3c25d4b188 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -235,8 +235,12 @@ enable2ndByteCanID = false wboFaultCodeList = bits, U08, [0:3], "OK", "Unk", "Unk", "failed to heat", "overheat", "underheat", "no supply" +; ClearReason fuelIgnCutCodeList = bits, U08, [0:7], "None", "fatal error", "setting disabled", "RPM limit", "fault RPM limit", "boost cut", "oil pressure", "stop requested", "ETB problem", "launch control", "max injector duty", "flood clear", "engine sync", "kickstart", "ign off" +; TpsState + etbCutCodeList = bits, U08, [0:7], "None", "engine off setting", "TPS error", "PPS error", "Input noise", "PID noise" + [ConstantsExtensions] ; defaultValue is used to provide TunerStudio with a value to use in the case of ; the constant not yet being initialized. This is primarily important if the @@ -1464,6 +1468,7 @@ gaugeCategory = GPPWM Outputs indicator = { isTriggerError}, "Trigger OK", "Trigger ERR", white, black, red, black indicator = { fuelCutReason != 0 }, "Injection OK", { Fuel cut: bitStringValue(fuelIgnCutCodeList, fuelCutReason)}, white, black, yellow, black indicator = { sparkCutReason != 0 }, "Ignition OK", { Ign cut: bitStringValue(fuelIgnCutCodeList, sparkCutReason)}, white, black, yellow, black + indicator = { tpsErrorCode != 0 }, "ETB OK", { ETB: bitStringValue(etbCutCodeList, tpsErrorCode)}, white, black, yellow, black ; this is required so that the "config error" feature works in TS ; DO NOT CHANGE THIS LINE - TS is looking for an indicator with particular text/styling