Skip to content

Commit ed5bc0f

Browse files
authored
tuning typos
1 parent 8a4cec4 commit ed5bc0f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

opendbc/car/honda/carcontroller.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def compute_gb_honda_bosch(accel, speed):
1919

2020

2121
def compute_gb_honda_nidec(accel, speed): # longitudinal tuner by MVL
22-
gb = np.interp ( float(accel), [-3.5, 0, 2.0 ] , [-900, 0, 198 ] )
22+
gb = np.interp ( float(accel), [-3.5, 0, 2.0 ] , [-225, 0, 198 ] )
2323
return np.maximum ( 0.0, gb ) , np.minimum ( gb, 0 )
2424

2525
def compute_gas_brake(accel, speed, fingerprint):
@@ -225,7 +225,7 @@ def update(self, CC, CS, now_nanos):
225225
pcm_override = True
226226

227227
stopping = actuators.longControlState == LongCtrlState.stopping
228-
brake = np.clip (-brake, 0, NIDEC_BRAKE_MAX )
228+
brake = np.clip (-brake, 0.0, 256.0 ) # NIDEC_BRAKE_MAX
229229
can_sends.append(hondacan.create_brake_command(self.packer, self.CAN, brake, stopping,
230230
pcm_override, pcm_cancel_cmd, fcw_display,
231231
self.CP.carFingerprint, CS.stock_brake))
@@ -240,7 +240,7 @@ def update(self, CC, CS, now_nanos):
240240
# Send dashboard UI commands.
241241
# On Nidec, this controls longitudinal positive acceleration
242242
if self.frame % 10 == 0:
243-
gas = np.clip ( gas, 0, NIDEC_GAS_MAX )
243+
gas = np.clip ( gas, 0.0, 196.0 ) # NIDEC_GAS_MAX
244244
hud = HUDData(int(gas), int(round(hud_v_cruise)), hud_control.leadVisible,
245245
hud_control.lanesVisible, fcw_display, acc_alert, steer_required, hud_control.leadDistanceBars)
246246
# hud = HUDData(int(pcm_accel), int(round(hud_v_cruise)), hud_control.leadVisible,

0 commit comments

Comments
 (0)