openpilot icon indicating copy to clipboard operation
openpilot copied to clipboard

Hyundai: fix LFA_SysWarning

Open sshane opened this issue 3 years ago • 3 comments

  • Niro 2019 (https://github.com/commaai/openpilot/issues/25221): Cabana - The stock LFA_USM signal is 2 when disengaged, 3 when engaged, but openpilot sends 0. LFA_HDA is always 0
  • The cars on these two issues also set LFA_USM the same, and HDA_USM is also 0: https://github.com/commaai/openpilot/issues/20113 and https://github.com/commaai/openpilot/issues/20375

Our Sonata doesn't set LFA_USM, but does set HDA_USM, however it doesn't seem to care if we always set it to 0 which we currently do: https://cabana.comma.ai/?route=fb34fd9bd05858bc%7C2022-05-27--21-07-16&seekTime=2&url=https%3A%2F%2Fchffrprivate.azureedge.net%2Fchffrprivate3%2Fv2%2Ffb34fd9bd05858bc%2Fafb4a647948f67adde11ab5b4b444f37_2022-05-27--21-07-16

sshane avatar Jul 21 '22 18:07 sshane

Working with @DerGue69, it seems like forwarding CF_Lkas_FusionState causes LFA_SysWarning to contain an error code. We can either hard code it to 0 for this user's car, or never forward it for any car, depending on what the meaning is (I'll look into it)

sshane avatar Aug 01 '22 21:08 sshane

@DerGue69's car still reports oddities with some LKAS11 signals with this fix, however his FCW definitely still works as he got routes with FCW activating successfully. I'll post some plots. @gregjhogan what do you think? Should we block forwarding on all cars or specific cars?

sshane avatar Aug 12 '22 11:08 sshane

Showing FCW still works while disengaged: Getting engaged route now.

Screenshot from 2022-08-12 23-42-58

sshane avatar Aug 13 '22 06:08 sshane

We don't fully understand how this fixes it, so as per conversation, will keep trying things to solve the root issue.

sshane avatar Sep 05 '22 21:09 sshane