openpilot
openpilot copied to clipboard
Hyundai: fix LFA_SysWarning
- Niro 2019 (https://github.com/commaai/openpilot/issues/25221): Cabana - The stock
LFA_USMsignal is 2 when disengaged, 3 when engaged, but openpilot sends 0.LFA_HDAis always 0 - The cars on these two issues also set
LFA_USMthe same, andHDA_USMis 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
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)
@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?
Showing FCW still works while disengaged: Getting engaged route now.

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