single longitudinal toggle for e2e and disable radar (#25688)

* single longitudinal toggle for e2e and disable radar

* write disable radar param

* rename

* better param name

* clean that up

* update refs

* update translations

* not live for experimental

* write it out

* vanish
old-commit-hash: 655a64b60318ce44ef0271e03de16e8b135b5268
This commit is contained in:
Adeeb Shihadeh
2022-09-07 17:12:49 -07:00
committed by GitHub
parent 96be4599e7
commit e4f9781c17
33 changed files with 191 additions and 164 deletions
+14 -3
View File
@@ -1,11 +1,22 @@
#!/usr/bin/env python3
import sys
from cereal import car
from common.params import Params
from tools.lib.route import Route
from tools.lib.logreader import LogReader
if __name__ == "__main__":
r = Route(sys.argv[1])
cp = [m for m in LogReader(r.qlog_paths()[0]) if m.which() == 'carParams']
Params().put("CarParams", cp[0].carParams.as_builder().to_bytes())
CP = None
if len(sys.argv) > 1:
r = Route(sys.argv[1])
cps = [m for m in LogReader(r.qlog_paths()[0]) if m.which() == 'carParams']
CP = cps[0].carParams.as_builder()
else:
CP = car.CarParams.new_message()
CP.openpilotLongitudinalControl = True
CP.experimentalLongitudinalAvailable = False
cp_bytes = CP.to_bytes()
for p in ("CarParams", "CarParamsCache", "CarParamsPersistent"):
Params().put(p, cp_bytes)