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

Feature: Modular Assistive Driving System (MADS) #29

Draft
wants to merge 35 commits into
base: master-new
Choose a base branch
from

Conversation

devtekve
Copy link

@devtekve devtekve commented Nov 15, 2024

No description provided yet. Please note: This is not ready for public use. Currently, it may contain bugs and mismatched states that could lead to bans for users who are not actively known SP developers. Please do not attempt to install at this time. However, feel free to review the code and leave comments if you have questions or concerns.

Relates to:

# Conflicts:
#	opendbc/car/hyundai/carstate.py
@@ -6,7 +6,8 @@
from opendbc.car.hyundai.carstate import CarState
from opendbc.car.hyundai.hyundaicanfd import CanBus
from opendbc.car.hyundai.values import HyundaiFlags, Buttons, CarControllerParams, CAR
from opendbc.car.interfaces import CarControllerBase

from openpilot.sunnypilot.selfdrive.car.hyundai.carcontroller import CarControllerSP
Copy link
Author

Choose a reason for hiding this comment

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

Because this is defined on SP repo and not on opendbc, a reviewer would be unable to quickly see and understand what is this new controller bringing. We should keep make-specific changes together on the same repo.

see https://github.com/sunnypilot/sunnypilot/pull/446/files#r1843398527

@@ -521,7 +521,7 @@ struct CarParams {
safetyModel @0 :SafetyModel;
safetyParam @3 :UInt16;
safetyParamDEPRECATED @1 :Int16;
safetyParam2DEPRECATED @2 :UInt32;
spFlags @2 :UInt32;
Copy link
Author

Choose a reason for hiding this comment

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

instead of introducing these flags here this way, we probably should do as the PR for ESCC introduces, where we are defining a structure for sunnyParams and there we can add both madsActive and flags (the later we already do)

https://github.com/sunnypilot/opendbc/pull/28/files#diff-ba34b66b457f1732655ac8db8d3b889c7ef276bb776ec7ba59200e0fdf6e1ffe

@@ -99,6 +99,10 @@ class HyundaiFlags(IntFlag):
MIN_STEER_32_MPH = 2 ** 23


class HyundaiFlagsSP(IntFlag):
Copy link
Author

Choose a reason for hiding this comment

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

We are achieving a greater separation from stock definitions by offloading this to it's own "module" within opendbc like this on ESCC https://github.com/sunnypilot/opendbc/pull/28/files#diff-ad070579ae1782339d2a8490c5e15b6d61894caa7cc374edd98a6bba1a2c6374

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants