Skip to content

Commit

Permalink
jam detect ignore button #489
Browse files Browse the repository at this point in the history
  • Loading branch information
mck1117 committed Sep 18, 2024
1 parent 5fa9d34 commit 05e5456
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions firmware/controllers/algo/engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ class Engine final : public TriggerStateListener {

// todo: move to electronic_throttle something?
bool etbAutoTune = false;
bool etbIgnoreJamProtection = false;

#if EFI_UNIT_TEST
bool tdcMarkEnabled = true;
Expand Down
2 changes: 1 addition & 1 deletion firmware/controllers/algo/engine_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,6 @@ typedef enum {
COMMAND_X14_ETB2_AUTO_CALIBRATE = 0x11,
COMMAND_X14_WIDEBAND_FIRMWARE_UPDATE = 0x12,
COMMAND_X14_ENABLE_EXTERNAL_STIM = 0x13,
COMMAND_X14_UNUSED_20 = 0x14,
COMMAND_X14_ETB_DISABLE_JAM_DETECT = 0x14,
COMMAND_X14_BURN_WITHOUT_FLASH = 0x15,
} command_x14_e;
3 changes: 3 additions & 0 deletions firmware/controllers/bench_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,9 @@ static void handleCommandX14(uint16_t index) {
engine->outputChannels.calibrationMode = (uint8_t)TsCalMode::None;
#endif // EFI_TUNER_STUDIO
return;
case COMMAND_X14_ETB_DISABLE_JAM_DETECT:
engine->etbIgnoreJamProtection = true;
return;
#endif // EFI_ELECTRONIC_THROTTLE_BODY
case COMMAND_X14_WIDEBAND_FIRMWARE_UPDATE:
widebandUpdatePending = true;
Expand Down
2 changes: 1 addition & 1 deletion firmware/controllers/limp_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ void LimpManager::setFaultRevLimit(int limit) {
}

bool LimpManager::allowElectronicThrottle() const {
return m_allowEtb;
return m_allowEtb || engine->etbIgnoreJamProtection;
}

bool LimpManager::allowTriggerInput() const {
Expand Down
4 changes: 2 additions & 2 deletions firmware/tunerstudio/tunerstudio.template.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1267,8 +1267,6 @@ gaugeCategory = "ETB more"
idlePositionGauge = idlePosition,"ETB: idlePosition", "per", 0.0,10.0, 0.0,10.0, 0.0,10.0, 2,2
luaAdjustmentGauge = luaAdjustment,"ETB: luaAdjustment", "per", 0.0,3.0, 0.0,3.0, 0.0,3.0, 2,2
m_wastegatePositionGauge = m_wastegatePosition,"DC: wastegatePosition", "per", 0.0,3.0, 0.0,3.0, 0.0,3.0, 2,2
etbDutyRateOfChangeGauge = etbDutyRateOfChange,"ETB duty rate of change", "per", -0.0,20.0, -0.0,20.0, -0.0,20.0, 2,2
etbDutyAverageGauge = etbDutyAverage,"ETB average duty", "per", -20.0,50.0, -20.0,50.0, -20.0,50.0, 2,2
etbTpsErrorCounterGauge = etbTpsErrorCounter,"ETB TPS error counter", "count", 0.0,3.0, 0.0,3.0, 0.0,3.0, 0,0
etbPpsErrorCounterGauge = etbPpsErrorCounter,"ETB pedal error counter", "count", 0.0,3.0, 0.0,3.0, 0.0,3.0, 0,0
dcOutput0Gauge = dcOutput0,"DC: output0", "per", 0.0,10.0, 0.0,10.0, 0.0,10.0, 2,2
Expand Down Expand Up @@ -2103,6 +2101,7 @@ cmd_etb_autotune_stop = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_X14_16_he
cmd_etb_2_auto_calibrate = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_X14_16_hex@@\x00\x11"
cmd_wideband_firmare_update = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_X14_16_hex@@\x00\x12"
cmd_enable_ext_stim = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_X14_16_hex@@\x00\x13"
cmd_etb_disable_jam_detect = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_X14_16_hex@@\x00\x14"
cmd_burn_without_flash = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_X14_16_hex@@\x00\x15"

cmd_set_wideband_idx_0 = "@@TS_IO_TEST_COMMAND_char@@@@ts_command_e_TS_WIDEBAND_16_hex@@\x00\x00"
Expand Down Expand Up @@ -4227,6 +4226,7 @@ dialog = tcuControls, "Transmission Settings"
field = "Maximum ETB position", etbMaximumPosition
field = "Jam detection error max", jamDetectThreshold
field = "Jam detection timeout period", etbJamTimeout
commandButton = "Temporarily disable jam detection", cmd_etb_disable_jam_detect
field = "Duty Averaging Length", etbExpAverageLength
field = "Rate of change Averaging Length", etbRocExpAverageLength
; we need the term about stepper idle in here, because there's a bug in TS that you can't have different visibility
Expand Down

0 comments on commit 05e5456

Please sign in to comment.