Skip to content

Commit 2d7c4b4

Browse files
Casey FrancisComma Devicepd0wm
committed
Masteryota
Masteryota This reverts commit 916f2de. 1.8 accel max 1.25 follow Copied Sport vals from SA-Eco 3 hours off / saves your 12v battery Testing if the deadzone is causing the delay Or maybe it's the high ki values. Testing old known values from previous versions of OP. No deadzone Toyota logo instead of comma 1.2 follow Fork mods Fork mods lower gain, higher prediction, stiffer wheel, higher steer ratio Fork mods commit 5c673b6399737b3e0b9d9d54e0b830e0cb04b185 Author: cfranhonda <46506059+cfranhonda@users.noreply.github.com> Date: Wed Jul 28 15:47:27 2021 -0700 Fix steer max and make ki a bit higher. commit 039cf40ab0ac72ced1c19de6854b7761a109d4e6 Author: Casey Francis <@cfranhonda> Date: Tue Jul 27 23:19:30 2021 -0700 add LQR for other bosch kids commit 95efde9a50bc4ca38a81e5cfdb86d1307db41f3c Author: Casey Francis <@cfranhonda> Date: Tue Jul 27 22:34:51 2021 -0700 add LQR tune Fork mods commit 9b45eb1 Author: Daehyuk Ahn <daehyuk@live.com> Date: Mon May 24 23:14:34 2021 -0700 Add EnableGasPedal (toggle menu) commit 4e9ac3b Author: Casey Francis <@cfranhonda> Date: Sat Aug 21 17:36:22 2021 -0700 full speed fan commit 152dec1 Author: Casey Francis <@cfranhonda> Date: Sat Aug 21 07:45:17 2021 -0700 add vision/ disable radar toggle commit 5c48f3e Author: Casey Francis <@cfranhonda> Date: Sat Aug 21 07:35:54 2021 -0700 vaggy hack to stop jerk commit 87328dd Author: cfranhonda <46506059+cfranhonda@users.noreply.github.com> Date: Mon Aug 23 07:15:05 2021 -0700 eps mod / gasmax adjust commit baffaee Author: Vehicle Researcher <user@comma.ai> Date: Sun Aug 22 22:13:11 2021 -0700 openpilot v0.8.8 release adding "," fws for modded people Update thermald.py No sound for Saturated steering remove no gps alert Update power_monitoring.py Update interface.py green instead of red path LQR toggle add LQR toggle for select Honda's add LQR toggle for modded Civic's & CRV Revert "Universal LQR tune" This reverts commit c10adf7. add LQR toggle change description Universal LQR tune Universal LQR tune This tune taken from the Toyota Rav4 has shown to be a great alternative to the standard PID tune. It's worked very well on eps mod multipliers of 2, 2.5, 3.5, 4x. It climbs the torque scale much smoother and doesn't "jitter" like PID does sometimes. fix LQR for RDX kf under PID only. add Accord to LQR toggle Conflicts: selfdrive/boardd/boardd.cc selfdrive/controls/lib/events.py selfdrive/ui/qt/offroad/settings.cc LQR toggle lower ff +25% Cruise max add to release notes paramsd cpu usage has been increasing boardd: connect to all pandas if none specified (commaai#23805) Refactor convolutions (commaai#23807) * one conv with defines * add conv * building works on C3 * this is num_outputs too, process replay is so useful cleanup import chaining of T_IDXS (commaai#23806) bump panda ui.py: fix model lead plotting Param to allow upload over cellular (commaai#23811) * param to allow upload over cellular * brackets to be consistent * move outside loop * fix tests longitudinal planner: disable change cost when stopped. not engaged or gas pressed (commaai#23639) * disable change cost completely on standstill and gas press * cleanup * set accel to zero * clean up logic around standstill * update ref onroad_test: increase camerad cpu usage after debayer changes Update raw_logger/framereader to new new ffmpeg api (commaai#23799) * Update raw_logger/framereader to new new ffmpeg api * Can be removed now * Handled by avcodec_free_context * handle EAGAIN and clean up thneed: a few asserts in the optimizer for cases it will fail docs: fix title typo cabana for your terminal Fix tici bigmodel (commaai#23817) * Fix bigmodel on tici: cam intrinsics arent static * Give TICI route own name for import * Make function useable in offline test * typo * change tici ecam focal to trained focal * No shadow variable * Fixed ref * Force update this time * Update model replay ref commit 2022 Hyundai Elantra firmware versions (commaai#23818) Added 2022 Hyundai Elantra fwdCamera, transmission, and engine fingerprints. CARS.md add 2022 elantra hyundai: custom fw version for sonata eps (commaai#23816) * hyundai: custom fw version for sonata eps * another comment HKG: Kia Sorento FPv2 (commaai#23815) * Replace Kia Sorento FPv1 with FPv2 * keep old fingerprint Subaru: add FW for Impreza Limited UDM 2017 (commaai#23802) * FPv2: Add Subaru Impreza Limited USM 2017 * test_fw_query_on_routes.py: add subaru support Fix unmetered upload over cell (fix commaai#23811) (commaai#23820) omx encoder: move writing into thread (commaai#23771) * omx encoder: move writing to separate thread * fix include * pop * log buffers sizes * split copy and write adjust comma two model timing thresholds after bigmodel Toyota: fix flaky EV detection (commaai#23825) script to clear DTCs move lock clearing to uploader (commaai#23826) * move lock clearing to uploader * test case Honda: revert to button enable on Nidec (commaai#23828) * Honda: revert to button enable on Nidec * fix test * bump panda Added (Ecu.eps) fingerprint for Hyundai Ioniq EV 2017 (commaai#23823) fix mac_setup w/ tools+plotjuggler (commaai#23552) * fix pycurl issue: * use newer curl backend for pip install * update lib paths based on brew prefix * fix cert issue when using pycurl using certifi * make output setup nicer * fix linter * typo * dont need that actually * revert * pipenv in brew * forgot this * make brew available on fresh install * undo * more undo * oops * use sytem curl, but homebrew openssl replay: use QCoreApplication (commaai#23831) scons: use correct brew prefix (commaai#23833) replay: use VideoToolbox HW decoder on Mac (commaai#23832) * replay: support VideoToolbox HW decoding * rename flag * remove debug assert Fix watch3 on mac (commaai#23834) this seems to about what my car converges to (commaai#23836) boardd: handle missing pandas Subaru: remove Impreza CAN fingerprints (commaai#23841) * Subaru: remove Impreza CAN fingerprints * fix process replay * update refs Toyota: remove outdated comment (commaai#23844) Remove unused MPC_COST_LONG class (commaai#23843) Faster cruise max Update interface.py Co-Authored-By: Comma Device <device@comma.ai> Co-Authored-By: Willem Melching <willem.melching@gmail.com>
1 parent 4452416 commit 2d7c4b4

File tree

12 files changed

+137
-23
lines changed

12 files changed

+137
-23
lines changed

selfdrive/assets/img_chffr_wheel.png

-837 Bytes
Loading
123 KB
Loading

selfdrive/car/honda/interface.py

+73-11
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,19 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[]): # py
9797
# modified filter output values: 0x009F, 0x0108, 0x0108, 0x0108, 0x0108, 0x0108, 0x0108, 0x0400, 0x0480
9898
# note: max request allowed is 4096, but request is capped at 3840 in firmware, so modifications result in 2x max
9999
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 2560, 8000], [0, 2560, 3840]]
100-
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.3], [0.1]]
100+
# Use LQR tune if param is set
101+
if Params().get_bool('LqrTune'):
102+
ret.lateralTuning.init('lqr')
103+
ret.lateralTuning.lqr.scale = 1200.0
104+
ret.lateralTuning.lqr.ki = 0.02
105+
ret.lateralTuning.lqr.a = [0., 1., -0.22619643, 1.21822268]
106+
ret.lateralTuning.lqr.b = [-1.92006585e-04, 3.95603032e-05]
107+
ret.lateralTuning.lqr.c = [1., 0.]
108+
ret.lateralTuning.lqr.k = [-110.73572306, 451.22718255]
109+
ret.lateralTuning.lqr.l = [0.3233671, 0.3185757]
110+
ret.lateralTuning.lqr.dcGain = 0.002737852961363602
111+
else:
112+
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.3], [0.1]]
101113
else:
102114
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 2560], [0, 2560]]
103115
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[1.1], [0.33]]
@@ -109,9 +121,25 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[]): # py
109121
ret.wheelbase = CivicParams.WHEELBASE
110122
ret.centerToFront = CivicParams.CENTER_TO_FRONT
111123
ret.steerRatio = 15.38 # 10.93 is end-to-end spec
112-
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 4096], [0, 4096]] # TODO: determine if there is a dead zone at the top end
124+
if eps_modified:
125+
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 2564, 8000], [0, 2564, 3840]]
126+
# Use LQR tune if param is set
127+
if Params().get_bool('LqrTune'):
128+
ret.lateralTuning.init('lqr')
129+
ret.lateralTuning.lqr.scale = 1200.0
130+
ret.lateralTuning.lqr.ki = 0.1
131+
ret.lateralTuning.lqr.a = [0., 1., -0.22619643, 1.21822268]
132+
ret.lateralTuning.lqr.b = [-1.92006585e-04, 3.95603032e-05]
133+
ret.lateralTuning.lqr.c = [1., 0.]
134+
ret.lateralTuning.lqr.k = [-110.73572306, 451.22718255]
135+
ret.lateralTuning.lqr.l = [0.3233671, 0.3185757]
136+
ret.lateralTuning.lqr.dcGain = 0.002237852961363602
137+
else:
138+
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.36], [0.108]] #minus 10% from 0.4, 0.12
139+
else:
140+
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 4096], [0, 4096]] # TODO: determine if there is a dead zone at the top end
141+
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.8], [0.24]]
113142
tire_stiffness_factor = 1.
114-
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.8], [0.24]]
115143

116144
elif candidate in (CAR.ACCORD, CAR.ACCORDH):
117145
stop_and_go = True
@@ -120,13 +148,21 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[]): # py
120148
ret.centerToFront = ret.wheelbase * 0.39
121149
ret.steerRatio = 16.33 # 11.82 is spec end-to-end
122150
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 4096], [0, 4096]] # TODO: determine if there is a dead zone at the top end
123-
tire_stiffness_factor = 0.8467
124-
125-
if eps_modified:
126-
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.3], [0.09]]
151+
# Use LQR tune if param is set
152+
if Params().get_bool('LqrTune'):
153+
ret.lateralTuning.init('lqr')
154+
ret.lateralTuning.lqr.scale = 1200.0
155+
ret.lateralTuning.lqr.ki = 0.1
156+
ret.lateralTuning.lqr.a = [0., 1., -0.22619643, 1.21822268]
157+
ret.lateralTuning.lqr.b = [-1.92006585e-04, 3.95603032e-05]
158+
ret.lateralTuning.lqr.c = [1., 0.]
159+
ret.lateralTuning.lqr.k = [-110.73572306, 451.22718255]
160+
ret.lateralTuning.lqr.l = [0.3233671, 0.3185757]
161+
ret.lateralTuning.lqr.dcGain = 0.002237852961363602
127162
else:
128163
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.6], [0.18]]
129-
164+
tire_stiffness_factor = 0.8467
165+
130166
elif candidate == CAR.ACURA_ILX:
131167
stop_and_go = False
132168
ret.mass = 3095. * CV.LB_TO_KG + STD_CARGO_KG
@@ -159,7 +195,19 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[]): # py
159195
# stock request output values: 0x0000, 0x0500, 0x0A15, 0x0E6D, 0x1100, 0x1200, 0x129A, 0x134D, 0x1400
160196
# modified request output values: 0x0000, 0x0500, 0x0A15, 0x0E6D, 0x1100, 0x1200, 0x1ACD, 0x239A, 0x2800
161197
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 2560, 10000], [0, 2560, 3840]]
162-
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.21], [0.07]]
198+
# Use LQR tune if param is set
199+
if Params().get_bool('LqrTune'):
200+
ret.lateralTuning.init('lqr')
201+
ret.lateralTuning.lqr.scale = 1200.0
202+
ret.lateralTuning.lqr.ki = 0.1
203+
ret.lateralTuning.lqr.a = [0., 1., -0.22619643, 1.21822268]
204+
ret.lateralTuning.lqr.b = [-1.92006585e-04, 3.95603032e-05]
205+
ret.lateralTuning.lqr.c = [1., 0.]
206+
ret.lateralTuning.lqr.k = [-110.73572306, 451.22718255]
207+
ret.lateralTuning.lqr.l = [0.3233671, 0.3185757]
208+
ret.lateralTuning.lqr.dcGain = 0.002237852961363602
209+
else:
210+
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.21], [0.07]]
163211
else:
164212
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 3840], [0, 3840]]
165213
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.64], [0.192]]
@@ -224,11 +272,25 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[]): # py
224272
ret.mass = 4068. * CV.LB_TO_KG + STD_CARGO_KG
225273
ret.wheelbase = 2.75
226274
ret.centerToFront = ret.wheelbase * 0.41
227-
ret.steerRatio = 11.95 # as spec
275+
ret.steerRatio = 16.0 #11.95 is spec
228276
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 3840], [0, 3840]]
229-
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.2], [0.06]]
277+
# Use LQR tune if param is set
278+
if Params().get_bool('LqrTune'):
279+
ret.lateralTuning.init('lqr')
280+
ret.lateralTuning.lqr.scale = 1200.0
281+
ret.lateralTuning.lqr.ki = 0.1
282+
ret.lateralTuning.lqr.a = [0., 1., -0.22619643, 1.21822268]
283+
ret.lateralTuning.lqr.b = [-1.92006585e-04, 3.95603032e-05]
284+
ret.lateralTuning.lqr.c = [1., 0.]
285+
ret.lateralTuning.lqr.k = [-110.73572306, 451.22718255]
286+
ret.lateralTuning.lqr.l = [0.3233671, 0.3185757]
287+
ret.lateralTuning.lqr.dcGain = 0.002237852961363602
288+
else:
289+
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.2], [0.06]]
290+
ret.lateralTuning.pid.kf = 0.00007818594
230291
tire_stiffness_factor = 0.677
231292

293+
232294
elif candidate == CAR.ODYSSEY:
233295
stop_and_go = False
234296
ret.mass = 4471. * CV.LB_TO_KG + STD_CARGO_KG

selfdrive/car/honda/values.py

+9
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,15 @@ class CAR:
493493
b'39990-TGG-J510\x00\x00',
494494
b'39990-TGL-E130\x00\x00',
495495
b'39990-TGN-E120\x00\x00',
496+
b'39990-TBA,C020\x00\x00',
497+
b'39990-TBA,C120\x00\x00',
498+
b'39990-TEA,T820\x00\x00',
499+
b'39990-TEZ,T020\x00\x00',
500+
b'39990-TGG,A020\x00\x00',
501+
b'39990-TGG,A120\x00\x00',
502+
b'39990-TGG,J510\x00\x00',
503+
b'39990-TGL,E130\x00\x00',
504+
b'39990-TGN,E120\x00\x00',
496505
],
497506
(Ecu.srs, 0x18da53f1, None): [
498507
b'77959-TBA-A060\x00\x00',

selfdrive/car/toyota/interface.py

+38-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env python3
22
from cereal import car
3+
from common.numpy_fast import interp
4+
from common.params import Params
35
from selfdrive.config import Conversions as CV
46
from selfdrive.car.toyota.tunes import LatTunes, LongTunes, set_long_tune, set_lat_tune
57
from selfdrive.car.toyota.values import Ecu, CAR, ToyotaFlags, TSS2_CAR, NO_DSU_CAR, MIN_ACC_SPEED, EPS_SCALE, EV_HYBRID_CAR, CarControllerParams
@@ -84,7 +86,18 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[]): # py
8486
ret.steerRatio = 13.7
8587
tire_stiffness_factor = 0.7933
8688
ret.mass = 3400. * CV.LB_TO_KG + STD_CARGO_KG # mean between normal and hybrid
87-
set_lat_tune(ret.lateralTuning, LatTunes.PID_C)
89+
if Params().get_bool('LqrTune'):
90+
ret.lateralTuning.init('lqr')
91+
ret.lateralTuning.lqr.scale = 1500.0
92+
ret.lateralTuning.lqr.ki = 0.1
93+
ret.lateralTuning.lqr.a = [0., 1., -0.22619643, 1.21822268]
94+
ret.lateralTuning.lqr.b = [-1.92006585e-04, 3.95603032e-05]
95+
ret.lateralTuning.lqr.c = [1., 0.]
96+
ret.lateralTuning.lqr.k = [-110.73572306, 451.22718255]
97+
ret.lateralTuning.lqr.l = [0.3233671, 0.3185757]
98+
ret.lateralTuning.lqr.dcGain = 0.002237852961363602
99+
else:
100+
set_lat_tune(ret.lateralTuning, LatTunes.PID_C)
88101

89102
elif candidate in (CAR.HIGHLANDER_TSS2, CAR.HIGHLANDERH_TSS2):
90103
stop_and_go = True
@@ -130,7 +143,18 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[]): # py
130143
ret.steerRatio = 13.9
131144
tire_stiffness_factor = 0.444 # not optimized yet
132145
ret.mass = 3060. * CV.LB_TO_KG + STD_CARGO_KG
133-
set_lat_tune(ret.lateralTuning, LatTunes.PID_D)
146+
if Params().get_bool('LqrTune'):
147+
ret.lateralTuning.init('lqr')
148+
ret.lateralTuning.lqr.scale = 1500.0
149+
ret.lateralTuning.lqr.ki = 0.1
150+
ret.lateralTuning.lqr.a = [0., 1., -0.22619643, 1.21822268]
151+
ret.lateralTuning.lqr.b = [-1.92006585e-04, 3.95603032e-05]
152+
ret.lateralTuning.lqr.c = [1., 0.]
153+
ret.lateralTuning.lqr.k = [-110.73572306, 451.22718255]
154+
ret.lateralTuning.lqr.l = [0.3233671, 0.3185757]
155+
ret.lateralTuning.lqr.dcGain = 0.002237852961363602
156+
else:
157+
set_lat_tune(ret.lateralTuning, LatTunes.PID_D)
134158

135159
elif candidate in (CAR.LEXUS_ES_TSS2, CAR.LEXUS_ESH_TSS2, CAR.LEXUS_ESH):
136160
stop_and_go = True
@@ -177,7 +201,18 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[]): # py
177201
ret.steerRatio = 13.4 # True steerRatio from older prius
178202
tire_stiffness_factor = 0.6371 # hand-tune
179203
ret.mass = 3115. * CV.LB_TO_KG + STD_CARGO_KG
180-
set_lat_tune(ret.lateralTuning, LatTunes.PID_N)
204+
if Params().get_bool('LqrTune'):
205+
ret.lateralTuning.init('lqr')
206+
ret.lateralTuning.lqr.scale = 1500.0
207+
ret.lateralTuning.lqr.ki = 0.15
208+
ret.lateralTuning.lqr.a = [0., 1., -0.22619643, 1.21822268]
209+
ret.lateralTuning.lqr.b = [-1.92006585e-04, 3.95603032e-05]
210+
ret.lateralTuning.lqr.c = [1., 0.]
211+
ret.lateralTuning.lqr.k = [-110.73572306, 451.22718255]
212+
ret.lateralTuning.lqr.l = [0.3233671, 0.3185757]
213+
ret.lateralTuning.lqr.dcGain = 0.002237852961363602
214+
else:
215+
set_lat_tune(ret.lateralTuning, LatTunes.PID_N)
181216

182217
elif candidate == CAR.MIRAI:
183218
stop_and_go = True

selfdrive/common/params.cc

+1
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ std::unordered_map<std::string, uint32_t> keys = {
176176
{"Offroad_TemperatureTooHigh", CLEAR_ON_MANAGER_START},
177177
{"Offroad_UnofficialHardware", CLEAR_ON_MANAGER_START},
178178
{"Offroad_UpdateFailed", CLEAR_ON_MANAGER_START},
179+
{"LqrTune", PERSISTENT},
179180
};
180181

181182
} // namespace

selfdrive/controls/lib/events.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -238,10 +238,10 @@ def calibration_incomplete_alert(CP: car.CarParams, sm: messaging.SubMaster, met
238238
def no_gps_alert(CP: car.CarParams, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> Alert:
239239
gps_integrated = sm['peripheralState'].pandaType in (log.PandaState.PandaType.uno, log.PandaState.PandaType.dos)
240240
return Alert(
241-
"Poor GPS reception",
242-
"If sky is visible, contact support" if gps_integrated else "Check GPS antenna placement",
243-
AlertStatus.normal, AlertSize.mid,
244-
Priority.LOWER, VisualAlert.none, AudibleAlert.none, .2, creation_delay=300.)
241+
"",
242+
"If sky is visible, contact support" if gps_integrated else "",
243+
AlertStatus.normal, AlertSize.none,
244+
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2)
245245

246246

247247
def wrong_car_mode_alert(CP: car.CarParams, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> Alert:
@@ -484,7 +484,7 @@ def joystick_alert(CP: car.CarParams, sm: messaging.SubMaster, metric: bool, sof
484484
"Take Control",
485485
"Turn Exceeds Steering Limit",
486486
AlertStatus.userPrompt, AlertSize.mid,
487-
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.promptRepeat, 1.),
487+
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, 1., 1., 1.),
488488
},
489489

490490
# Thrown when the fan is driven at >50% but is not rotating

selfdrive/controls/lib/longitudinal_planner.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
LON_MPC_STEP = 0.2 # first step is 0.2s
1818
AWARENESS_DECEL = -0.2 # car smoothly decel at .2m/s^2 when user is distracted
1919
A_CRUISE_MIN = -1.2
20-
A_CRUISE_MAX_VALS = [1.2, 1.2, 0.8, 0.6]
21-
A_CRUISE_MAX_BP = [0., 15., 25., 40.]
20+
A_CRUISE_MAX_VALS = [1.4, 1.3, 1.2, 0.8, 0.5] # Sets the limits of the planner accel, PID may exceed
21+
A_CRUISE_MAX_BP = [0., 5., 10., 20., 55.]
2222

2323
# Lookup table for turns
2424
_A_TOTAL_MAX_V = [1.7, 3.2]

selfdrive/manager/manager.py

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def manager_init() -> None:
4040
("CompletedTrainingVersion", "0"),
4141
("HasAcceptedTerms", "0"),
4242
("OpenpilotEnabledToggle", "1"),
43+
("DisableRadar_Allow", "1"),
4344
]
4445
if not PC:
4546
default_params.append(("LastUpdateTime", datetime.datetime.utcnow().isoformat().encode('utf8')))

selfdrive/thermald/power_monitoring.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
VBATT_PAUSE_CHARGING = 11.0 # Lower limit on the LPF car battery voltage
2222
VBATT_INSTANT_PAUSE_CHARGING = 7.0 # Lower limit on the instant car battery voltage measurements to avoid triggering on instant power loss
23-
MAX_TIME_OFFROAD_S = 30*3600
23+
MAX_TIME_OFFROAD_S = 3*3600 #3 hours
2424
MIN_ON_TIME_S = 3600
2525

2626
class PowerMonitoring:

selfdrive/thermald/thermald.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def set_eon_fan(val):
102102
# temp thresholds to control fan speed - low hysteresis
103103
_TEMP_THRS_L = [42.5, 57.5, 72.5, 10000]
104104
# fan speed options
105-
_FAN_SPEEDS = [0, 16384, 32768, 65535]
105+
_FAN_SPEEDS = [0, 65535, 65535, 65535]
106106

107107

108108
def handle_fan_eon(controller, max_cpu_temp, fan_speed, ignition):

selfdrive/ui/qt/offroad/settings.cc

+6
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ TogglesPanel::TogglesPanel(SettingsWindow *parent) : ListWidget(parent) {
7171
"In this mode openpilot will ignore lanelines and just drive how it thinks a human would.",
7272
"../assets/offroad/icon_road.png",
7373
},
74+
{
75+
"LqrTune",
76+
"Use LQR Tune",
77+
"Use LQR tuning values. For select models only..",
78+
"../assets/offroad/icon_openpilot.png",
79+
},
7480
#ifdef ENABLE_MAPS
7581
{
7682
"NavSettingTime24h",

0 commit comments

Comments
 (0)