mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-11-13 07:53:45 +08:00
8da0c9d916
StarPilot's angle-only bluepilot_lateral adaptation and the BluePilot-derived curvature strategies (Mach-E, classic, Explorer, generic CAN FD, new-port curvature, manual-turn latch, curvature preview, pinion measurement) are removed, with their extended safety profiles 16/32/64 and the interim angle word 128. Ford lateral is upstream's stock curvature path until the BluePilot lateral library is mounted. StarPilot's own Ford features stay, re-keyed from the extended words to the stock ones: - AOL: classic 32 -> 0, Mach-E 18 and the CAN FD trucks 66 -> 2 (+1 with openpilot long); the CAN FD retained-display rules apply to word 2. Edge/Mondeo/Transit and the manual bit (256) are unchanged. - release CAN FD long: word 3 (was 19/67); 19 and 67 are now retired and denied. - stock cruise switch, CAN FD camera-lead radar handling, hands-free cluster: keyed on the Ford family. - classic stock ACC (0) keeps the no-ACCDATA TX list the extended classic profile had. Bits 9-14 of the Ford param are reserved for the BluePilot lateral library's startup bits (safety/modes/ford_param.h); AOL and pandad mask them out of the profile word. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
42 lines
1.6 KiB
Python
42 lines
1.6 KiB
Python
"""Existing positional vehicle startup preferences remain source-compatible."""
|
|
|
|
from openpilot.starpilot.vehicle_preferences import VehicleStartupPreferences
|
|
|
|
|
|
def test_original_positional_preferences_do_not_enable_door_features():
|
|
values = (True, False, True, False, True, False, True, False, True, False, True, False, True, 1)
|
|
preferences = VehicleStartupPreferences(*values)
|
|
names = (
|
|
'toyota_auto_hold',
|
|
'turn_assist',
|
|
'gm_long_pitch',
|
|
'disable_bolt_long',
|
|
'honda_bosch_a_radar',
|
|
'tesla_preap_stock',
|
|
'volt_sng',
|
|
'gm_auto_hold',
|
|
'volt_one_pedal',
|
|
'tesla_screen',
|
|
'tesla_screen_brake',
|
|
'gm_camera_pedal',
|
|
'toyota_filter',
|
|
'gm_longitudinal_tune',
|
|
)
|
|
assert tuple(getattr(preferences, name) for name in names) == values
|
|
assert not preferences.toyota_lock_doors and not preferences.toyota_unlock_doors
|
|
assert not preferences.gm_cancel_remap
|
|
assert VehicleStartupPreferences(True, True).turn_assist
|
|
|
|
|
|
def test_explicit_door_keywords_do_not_shift_turn_assist():
|
|
preferences = VehicleStartupPreferences(True, True, toyota_lock_doors=True, toyota_unlock_doors=True)
|
|
assert preferences.toyota_auto_hold and preferences.turn_assist
|
|
assert preferences.toyota_lock_doors and preferences.toyota_unlock_doors
|
|
|
|
|
|
def test_new_radar_keyword_preserves_all_legacy_positional_fields():
|
|
preferences = VehicleStartupPreferences(True, True, toyota_radar_mode=2)
|
|
assert preferences.toyota_auto_hold and preferences.turn_assist
|
|
assert preferences.toyota_radar_mode == 2
|
|
assert VehicleStartupPreferences(True, True).toyota_radar_mode == 0
|