Commit Graph

14591 Commits

Author SHA1 Message Date
Jason Wen 4ac4fc855f don't set to exp mode initial if DEC is active 2025-01-15 15:12:13 -05:00
Jason Wen d937062724 more 2025-01-15 01:51:22 -05:00
Jason Wen f94eeb9780 Revert "explicit type hints"
This reverts commit c205497b
2025-01-15 01:46:31 -05:00
Jason Wen c6474fc3ad move to constants py 2025-01-15 01:45:29 -05:00
Jason Wen c205497b15 explicit type hints 2025-01-15 00:18:47 -05:00
Jason Wen 45f3c70596 move around 2025-01-14 21:55:56 -05:00
Jason Wen 21793721cc rename 2025-01-14 21:29:42 -05:00
Jason Wen d01b02b185 more 2025-01-14 20:50:57 -05:00
Jason Wen f4af0aa422 update name 2025-01-14 16:42:41 -05:00
Jason Wen 1f39c4ccfb remove to fail test 2025-01-14 00:04:48 -05:00
Jason Wen a56e1e6e69 slight cleanup 2025-01-14 00:01:31 -05:00
Jason Wen e630546250 more logs 2025-01-13 23:57:21 -05:00
Jason Wen 85faddc7af this is why it was never using DEC 2025-01-13 23:46:38 -05:00
Jason Wen 223abdc536 never used 2025-01-13 23:26:07 -05:00
Jason Wen dd12f86804 Merge branch 'master-new' into dec-redo
# Conflicts:
#	common/params.cc
2025-01-13 23:11:06 -05:00
Jason Wen 01c5dbdc4c Hyundai CAN: auto-enable radar tracks on applicable Mando radar (#561)
* more

* event and checks

* comments

* missed events

* retry 2 times is enough

* rename to radar tracks

* fix data type

* more rename

* bump opendbc

* drain first

* put it behind a toggle lol

* re-enable

* update comments

* revert lead smoothing

* Revert "revert lead smoothing"

This reverts commit 872267970c.

* real events and radard engagement

* only show up for hyundai with mando

* update translations

* bump opendbc

* fix event name

* update description

* move above

* translations

---------

Co-authored-by: rav4kumar <meetkumardesai@gmail.com>
2025-01-13 16:14:00 -05:00
Jason Wen dff2a5796d update name 2025-01-13 11:41:11 -05:00
Jason Wen 70918ccff3 Merge branch 'master-new' into dec-redo 2025-01-13 10:23:12 -05:00
Kumar c3bfd17028 Revert "Longitudinal: Dynamic Experimental Control" (#571)
Revert "Longitudinal: Dynamic Experimental Control (#564)"

This reverts commit bba3c39e2f.
2025-01-13 05:17:15 +00:00
Kumar bba3c39e2f Longitudinal: Dynamic Experimental Control (#564)
* init dec

* Update sunnypilot/selfdrive/controls/lib/dynamic_experimental_controller.py

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

* Update sunnypilot/selfdrive/controls/lib/dynamic_experimental_controller.py

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

* fix static test

* ff

* fix static test

* unitee testt

* Refactor test_dynamic_controller and fix formatting issues

Added a new import for STOP_AND_GO_FRAME and corrected a float initialization for v_ego in MockCarState. Also fixed indentation in the test_standstill_detection method for consistency.

* Refactor test indentation for dynamic controller tests

Adjust indentation and formatting in test_dynamic_controller.py to ensure consistency and readability. This change does not alter functionality but improves the maintainability of the test code.

* Migrated to pytest using claude

* Integrate radar parameter into dynamic controller's pytest tests

Added a `has_radar` parameter to the test functions in the dynamic controller's pytest file. This allows each function to run both with and without radar inputs, thus enhancing the coverage of our test cases.

* Disabling unittest file to allow checks on the pipeline to succeed.

Pending to remove this, but leaving it to validate the move to pytest is okay before merging

* Replace unittest with pytest for dynamic controller tests

Migrated dynamic controller tests from unittest to pytest for improved readability and maintainability. Refactored mock setup using pytest fixtures and monkeypatching while preserving test coverage.

* new line...

* Refactor and modularize DynamicExperimentalController logic

Moved DynamicExperimentalController logic and helper functions to a dedicated module for better readability and maintainability. Simplified longitudinal planner logic by introducing reusable methods to manage MPC mode and longitudinal plan publishing. Adjusted file structure for dynamic controller-related components and updated relevant imports.

* Add missing import for messaging in helpers.py

The `messaging` module was added to resolve potential issues with undefined references. This change ensures all required imports are present, improving the reliability and maintainability of the code.

* Format

* Formatting

* rebase fix

* Refactor MpcSource definition and update references.

Moved MpcSource enum into LongitudinalPlanSP for better encapsulation. Updated references in helpers.py to use the new path. This change improves code organization and maintains functionality.

* Format

* Refactor DEC into a dedicated longitudinal planner class

Move Dynamic Experimental Control (DEC) logic to a new `DecLongitudinalPlanner` class for better modularity and maintainability. This simplifies the `LongitudinalPlanner` by delegating DEC-specific behavior and consolidates related methods into a single file. Additionally, redundant code was removed to improve readability and reduce complexity.

* **Refactor DEC module structure for better organization**

Moved DEC-related files from `dec` to `lib` for improved clarity and consistency within the project structure. Updated all relevant import paths to reflect the new locations. Ensured functionality remains unaffected with these changes.

* static test

* static

* had moved to car_state

* cleanup

* some more

* static method

* move around

* more cleanup

* stuff

* into their own

* rename

* check live param

* sync with stock

* type hint

* unused

* smoother trans

* window time

* fix type hint

* pass sm.frame from plannerd

* more fixes

* more

* more explicit

* fix test

* Revert "fix test"

This reverts commit 635b15f2bc.

* Revert "pass sm.frame from plannerd"

This reverts commit a8deaa69b8.

* use internal frame

---------

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: DevTekVE <devtekve@gmail.com>
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
2025-01-12 19:11:58 -05:00
Jason Wen f6ef036158 use internal frame 2025-01-12 18:57:22 -05:00
Jason Wen 67692babdc Revert "pass sm.frame from plannerd"
This reverts commit a8deaa69b8.
2025-01-12 18:55:38 -05:00
Jason Wen ea6cd3429b Revert "fix test"
This reverts commit 635b15f2bc.
2025-01-12 18:55:33 -05:00
Jason Wen 635b15f2bc fix test 2025-01-12 18:54:17 -05:00
Jason Wen b42c060b2e more explicit 2025-01-12 18:37:47 -05:00
Jason Wen 1c1ef06489 more 2025-01-12 18:28:20 -05:00
Jason Wen 1b2586914f more fixes 2025-01-12 18:24:58 -05:00
Jason Wen a8deaa69b8 pass sm.frame from plannerd 2025-01-12 18:20:06 -05:00
Jason Wen c34a21980e fix type hint 2025-01-12 18:13:52 -05:00
rav4kumar 6e86d242cd window time 2025-01-12 16:03:17 -07:00
rav4kumar 7113d4a76a smoother trans 2025-01-12 15:54:50 -07:00
Jason Wen 5074881d6d unused 2025-01-12 17:40:21 -05:00
Jason Wen bf3350b7f2 type hint 2025-01-12 17:38:49 -05:00
Jason Wen c64b679704 sync with stock 2025-01-12 17:16:34 -05:00
Jason Wen f645e2cdb0 check live param 2025-01-12 17:12:31 -05:00
Jason Wen 426d41a0a7 rename 2025-01-12 16:56:57 -05:00
Jason Wen de305a81d5 into their own 2025-01-12 16:52:40 -05:00
Jason Wen e4c29a2c58 stuff 2025-01-12 16:50:16 -05:00
Jason Wen c3fde45000 more cleanup 2025-01-12 16:48:44 -05:00
Jason Wen e7d27f0bb9 move around 2025-01-12 16:46:43 -05:00
Jason Wen 12981e02f7 static method 2025-01-12 16:46:15 -05:00
Jason Wen e1cf216c89 some more 2025-01-12 16:44:54 -05:00
Jason Wen cc507a5cd9 cleanup 2025-01-12 16:40:07 -05:00
rav4kumar 87ca1513f4 had moved to car_state 2025-01-12 14:29:22 -07:00
rav4kumar 1d422ce5cf static 2025-01-12 14:06:50 -07:00
rav4kumar cb04017945 Merge branch 'dec-new-refactored-rebased-no-ui' of https://github.com/sunnypilot/sunnypilot into dec-new-refactored-rebased-no-ui 2025-01-12 13:49:17 -07:00
rav4kumar 7d6c9d1a8c static test 2025-01-12 13:48:08 -07:00
Jason Wen ba6559d32a Merge branch 'master-new' into dec-new-refactored-rebased-no-ui 2025-01-12 15:40:47 -05:00
Jason Wen 4a60eb50e5 ui: new design for Device panel buttons (#557)
* init btns

* better design

* force offroad in another PR

* old calibration design for now

* revert

* ci: fix position

* try this

* check ci

* Revert "check ci"

This reverts commit 80795cc700.

* test more ci

* Revert "test more ci"

This reverts commit 05670b5ad6.

* nuke more on CI

* unlikely but why not

* Revert "unlikely but why not"

This reverts commit 72f45a7516.

* Revert "nuke more on CI"

This reverts commit 7f406efc24.

* try this

* Revert "try this"

This reverts commit 3ce6768067.

* same across
2025-01-12 15:29:08 -05:00
DevTekVE c0c74e3761 **Refactor DEC module structure for better organization**
Moved DEC-related files from `dec` to `lib` for improved clarity and consistency within the project structure. Updated all relevant import paths to reflect the new locations. Ensured functionality remains unaffected with these changes.
2025-01-12 21:03:38 +01:00