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

Nissan: allow B drive mode for Nissan Leaf #29228

Merged
merged 6 commits into from Aug 5, 2023
Merged

Nissan: allow B drive mode for Nissan Leaf #29228

merged 6 commits into from Aug 5, 2023

Conversation

cellfreak
Copy link
Contributor

Add B ( Battery save ) drive mode for Nissan Leaf - selfdrive/car/nissan/interface.py

Line 50 - events = self.create_common_events(ret, extra_gears=[car.CarState.GearShifter.brake])

Road test successful - https://connect.comma.ai/0b17985326a570c4/1691100300431/1691100676848

@cellfreak
Copy link
Contributor Author

cellfreak commented Aug 3, 2023

cd /data && rm -rf openpilot && git clone --recursive https://github.com/cellfreak/openpilot -b master && sudo reboot

Ran on my Comma Three with no issues.

2019 Nissan Leaf SL Plus

@cellfreak
Copy link
Contributor Author

B mode: ‘B mode’ enhances the driving range and improves regenerative braking efficiency.
D mode: the ‘D’ mode is significantly more responsive during acceleration and provides maximum EV performance. For drivers looking for an ideal driving experience and full EV perks, D mode is for you.
B mode with Eco: Great for downhill driving due to better regenerative braking; it also decreases required braking to reduce wear and tear on the vehicle.
D mode with Eco: Reduces energy consumption by moderating the AC unit and reducing responsiveness to acceleration; this is the best everyday driving mode.

@@ -47,7 +47,7 @@ def _update(self, c):
be.type = car.CarState.ButtonEvent.Type.accelCruise
buttonEvents.append(be)

events = self.create_common_events(ret)
events = self.create_common_events(ret, extra_gears=[car.CarState.GearShifter.brake])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked and this mode is only in the leaf DBC, so we can be sure that it will never occur on other cars

@sshane sshane added enhancement car vehicle-specific nissan labels Aug 5, 2023
@sshane sshane changed the title Add B drive mode for Nissan Leaf - selfdrive/car/nissan/interface.py Nissan: allow B drive mode for Nissan Leaf Aug 5, 2023
@sshane sshane merged commit b50ffc4 into commaai:master Aug 5, 2023
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants