mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-03 14:43:48 +08:00
phase sync
This commit is contained in:
@@ -102,8 +102,7 @@ class CarController(CarControllerBase):
|
||||
if self.CP.carFingerprint == CAR.CHEVROLET_MALIBU_HYBRID_CC:
|
||||
phase_map = gmcan.malibu_phase_map_for_acc(CS.cruise_buttons)
|
||||
if phase_map and CS.steering_button_checksum in phase_map:
|
||||
# Malibu appears to need a larger lead to stay in phase with the camera.
|
||||
phase = (phase_map[CS.steering_button_checksum] + 2) % 4
|
||||
phase = (phase_map[CS.steering_button_checksum] + 1) % 4
|
||||
self.malibu_cancel_phase = phase
|
||||
self.malibu_button_phase = phase
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ from openpilot.selfdrive.car.gm.values import CAR, CruiseButtons, CanBus
|
||||
|
||||
|
||||
MALIBU_BUTTON_TABLE = {
|
||||
0: [0x15EE, 0x1FCC, 0x2FBC, 0x25DE],
|
||||
1: [0x6F7C, 0x659E, 0x55AE, 0x5F8C],
|
||||
4: [0x1ADD, 0x10FF, 0x2ACD, 0x20EF],
|
||||
5: [0x60AF, 0x6A8D, 0x50BF, 0x5A9D],
|
||||
0: [0x1FCC, 0x2FBC, 0x25DE, 0x15EE],
|
||||
1: [0x659E, 0x55AE, 0x5F8C, 0x6F7C],
|
||||
4: [0x10FF, 0x2ACD, 0x20EF, 0x1ADD],
|
||||
5: [0x6A8D, 0x50BF, 0x5A9D, 0x60AF],
|
||||
}
|
||||
|
||||
MALIBU_BUTTON_MAP = {
|
||||
|
||||
Reference in New Issue
Block a user