mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-21 04:53:47 +08:00
LagdToggle: fix inverted get_lat_delay branches (#1906)
* helpers.py get_lat_delay fix * fix trailing whitespace * lint --------- Co-authored-by: Nayan <nayan8teen@gmail.com>
This commit is contained in:
@@ -8,7 +8,10 @@ from openpilot.common.params import Params
|
||||
|
||||
|
||||
def get_lat_delay(params: Params, stock_lat_delay: float) -> float:
|
||||
if params.get_bool("LagdToggle"):
|
||||
return float(params.get("LagdValueCache", return_default=True))
|
||||
# live learning on: use what lagd publishes.
|
||||
# off: use the fixed steerActuatorDelay + software delay sum that LagdToggle caches.
|
||||
|
||||
return stock_lat_delay
|
||||
if params.get_bool("LagdToggle"):
|
||||
return stock_lat_delay
|
||||
|
||||
return float(params.get("LagdValueCache", return_default=True))
|
||||
|
||||
Reference in New Issue
Block a user