Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quick fix for NIDEC #188

Open
wants to merge 3 commits into
base: deprecated-beta2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion selfdrive/car/honda/carcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,10 @@ def update(self, CC, CS, now_nanos, dragonconf):
apply_brake = clip(self.brake_last - wind_brake, 0.0, 1.0)
apply_brake = int(clip(apply_brake * self.params.NIDEC_BRAKE_MAX, 0, self.params.NIDEC_BRAKE_MAX - 1))
pump_on, self.last_pump_ts = brake_pump_hysteresis(apply_brake, self.apply_brake_last, self.last_pump_ts, ts)

# some hybrid nidecs like Odyssey hybrid and Clarity need to keep pump on during braking or they'll lose pressure
if self.CP.carFingerprint == CAR.ODYSSEY_HYBRID:
pump_on = True
pump_on = apply_brake > 0

pcm_override = True
can_sends.append(hondacan.create_brake_command(self.packer, apply_brake, pump_on,
Expand Down
2 changes: 1 addition & 1 deletion selfdrive/car/honda/hondacan.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ def create_ui_commands(packer, CP, enabled, pcm_speed, hud, is_metric, acc_hud,
'IMPERIAL_UNIT': int(not is_metric),
'HUD_LEAD': 2 if enabled and hud.lead_visible else 1 if enabled else 0,
'SET_ME_X01_2': 1,
'ACC_ON': int(enabled),
}

if CP.carFingerprint in HONDA_BOSCH:
acc_hud_values['ACC_ON'] = int(enabled)
acc_hud_values['FCM_OFF'] = 1
acc_hud_values['FCM_OFF_2'] = 1
else:
Expand Down