forked from commaai/opendbc
-
Notifications
You must be signed in to change notification settings - Fork 29
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
WIP: Adding 2025 Ioniq 5 PE #63
Draft
devtekve
wants to merge
1
commit into
master-new
Choose a base branch
from
2025-ioniq5
base: master-new
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reviewer's Guide by SourceryThis pull request adds support for the 2025 Hyundai Ioniq 5 PE, including angle-based control. It also refactors the steering torque logic to better handle driver input and adds a new CAN message for angle control. Sequence diagram for steering control logicsequenceDiagram
participant D as Driver
participant C as CarController
participant S as Steering System
Note over C: Initialize torque control
D->>C: Apply steering torque
activate C
C->>C: Calculate ego_weight based on speed
C->>C: Update driver_applied_torque_reducer
alt driver applying torque
C->>C: Reduce max torque (down to 30)
else no driver torque
C->>C: Increase max torque (up to 150)
end
C->>S: Apply calculated steering angle and torque
deactivate C
Class diagram for updated CarController and HyundaiFlagsclassDiagram
class CarController {
+apply_angle_last: float
+lkas_max_torque: int
+driver_applied_torque_reducer: int
+update(CC, CC_SP, CS, now_nanos)
}
class HyundaiFlags {
+ANGLE_CONTROL
+CANFD_HDA2
+CANFD_HDA2_ALT_STEERING
+EV
}
note for CarController "Added new fields for angle-based control"
note for HyundaiFlags "Added ANGLE_CONTROL flag"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This update adds angle control functionality specifically for the Hyundai Ioniq 5 PE model. Changes were made across several files and variables to accommodate this additional feature. This control type provides enhanced handling and steering performance depending on the driving conditions, given its ability to adjust steering angle precisely. Angle control stems from the angle of the steering wheel rather than torque, providing a more sophisticated steering response. In the Hyundai Ioniq 5 PE, adjustments for the input angle and torque calculations have been added, ensuring a more dynamic and responsive driving experience. Variable additions include '`apply_angle_last`', '`lkas_max_torque`' and '`driver_applied_torque_reducer`', and a new condition was created for if the driver is manually applying some torque. All of these changes allow for the application of correct torque when the driver is not actively steering, emulating the behavior of a stock LKAS system when engaged.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WIP do not use, not safe yet
Summary by Sourcery
New Features:
Related
Upstream PR
commaai#1676
sunnypilot PR
sunnypilot/sunnypilot#625