mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-08-21 08:03:42 +08:00
Merge pull request #4 from eFiniLan/dragonpilot-dev-lkmod
加入 honda 的 Lane Keeping 模式開關
This commit is contained in:
@@ -72,7 +72,7 @@ def process_hud_alert(hud_alert):
|
||||
|
||||
HUDData = namedtuple("HUDData",
|
||||
["pcm_accel", "v_cruise", "mini_car", "car", "X4",
|
||||
"lanes", "beep", "chime", "fcw", "acc_alert", "steer_required"])
|
||||
"lanes", "beep", "chime", "fcw", "acc_alert", "steer_required", "dashed_lanes"])
|
||||
|
||||
|
||||
class CarController(object):
|
||||
@@ -126,7 +126,7 @@ class CarController(object):
|
||||
fcw_display, steer_required, acc_alert = process_hud_alert(hud_alert)
|
||||
|
||||
hud = HUDData(int(pcm_accel), int(round(hud_v_cruise)), 1, hud_car,
|
||||
0xc1, hud_lanes, int(snd_beep), snd_chime, fcw_display, acc_alert, steer_required)
|
||||
0xc1, hud_lanes, int(snd_beep), snd_chime, fcw_display, acc_alert, steer_required, CS.lkMode)
|
||||
|
||||
# **** process the car messages ****
|
||||
|
||||
@@ -146,7 +146,7 @@ class CarController(object):
|
||||
apply_brake = int(clip(self.brake_last * BRAKE_MAX, 0, BRAKE_MAX - 1))
|
||||
apply_steer = int(clip(-actuators.steer * STEER_MAX, -STEER_MAX, STEER_MAX))
|
||||
|
||||
lkas_active = enabled and not CS.steer_not_allowed
|
||||
lkas_active = enabled and not CS.steer_not_allowed and CS.lkMode
|
||||
|
||||
# Send CAN commands.
|
||||
can_sends = []
|
||||
|
||||
Reference in New Issue
Block a user