Skip to content

HKG: don't report Idle Stop and Go engine-off as a steering fault - #263

Open
ervteng wants to merge 2 commits into
StarPilotHQ:Domfrom
ervteng:hyundai-isg-steer-fault
Open

ervteng wants to merge 2 commits into
StarPilotHQ:Domfrom
ervteng:hyundai-isg-steer-fault

Conversation

@ervteng

@ervteng ervteng commented Oct 29, 2026 •

Copy link
Copy Markdown

I'm least confident about this PR. It works on my car (tm) but not sure if anyone else with ISG has this issue on HKG.

On classic-CAN Hyundai/Kia cars with Idle Stop and Go (ISG), the steering module (MDPS) raises CF_Mdps_ToiUnavail whenever ISG shuts the engine off at a stop. openpilot reads that as a temporary steering fault, so every auto-stop beeps and flashes the LKAS warning on the HUD, even though lateral isn't active at standstill anyway.

This masks ToiUnavail only while the car is stopped and LVR12 CF_Lvr_IsgState reports the engine stopped, plus a 200 ms grace period on restart (the MDPS was measured clearing it ~60 ms after the engine restarts).

  • Not masked: ToiFlt (real faults), anything while moving, and cars that steer at standstill.
  • No effect on cars without LVR12/CF_Lvr_IsgState.

Validation

  • Kia Stinger 2022, real drive: 3 auto-stops where the MDPS raised ToiUnavail (1,459 frames total), no steer fault or alert; steerFaultTemporary stayed false.
  • Unit tests in test_hyundai.py (engine stopped → masked, restart grace, ToiFlt still reported, moving still reported, steer-at-standstill car unaffected).

🤖 Generated with Claude Code

@ervteng ervteng changed the title Hyundai: don't report Idle Stop and Go engine-off as a steering fault HKG: don't report Idle Stop and Go engine-off as a steering fault Oct 29, 2026
@ervteng
ervteng marked this pull request as ready for review October 29, 2026 04:08
@ervteng
ervteng force-pushed the hyundai-isg-steer-fault branch 3 times, most recently from ee21838 to 05ccd75 Compare November 3, 2026 07:28
ervteng and others added 2 commits November 3, 2026 16:31
The MDPS sets CF_Mdps_ToiUnavail while ISG has the engine stopped, which
raised steerTempUnavailableSilent (beep and LKAS11 HUD warning) at every
auto-stop. Lateral is inactive at standstill, so mask ToiUnavail while
LVR12 CF_Lvr_IsgState reports the engine stopped, plus a 200 ms grace
period on restart (the MDPS was measured clearing ToiUnavail ~60 ms after
the engine restarts). ToiFlt, faults while moving and steer-at-standstill
cars are unaffected.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ervteng
ervteng force-pushed the hyundai-isg-steer-fault branch from 05ccd75 to 96c3a7c Compare November 4, 2026 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant