mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-08-06 00:35:44 +08:00
加入轉向燈暫時取消 OP 方向盤控制選項
This commit is contained in:
@@ -6,6 +6,8 @@ from selfdrive.car import create_gas_command
|
||||
from selfdrive.car.honda import hondacan
|
||||
from selfdrive.car.honda.values import AH, CruiseButtons, CAR
|
||||
from selfdrive.can.packer import CANPacker
|
||||
from selfdrive.dragonpilot.dragonconf.dragonconf import dragonconf
|
||||
dragonconf = dragonconf()
|
||||
|
||||
def actuator_hystereses(brake, braking, brake_steady, v_ego, car_fingerprint):
|
||||
# hyst params
|
||||
@@ -146,6 +148,8 @@ class CarController(object):
|
||||
# Send CAN commands.
|
||||
can_sends = []
|
||||
|
||||
if (CS.left_blinker_on or CS.right_blinker_on) and dragonconf.conf["tempDisableSteerOnSignal"]:
|
||||
apply_steer = 0.
|
||||
# Send steering command.
|
||||
idx = frame % 4
|
||||
can_sends.append(hondacan.create_steering_control(self.packer, apply_steer,
|
||||
|
||||
@@ -8,6 +8,9 @@ from selfdrive.car.toyota.toyotacan import make_can_msg, create_video_target,\
|
||||
create_fcw_command
|
||||
from selfdrive.car.toyota.values import ECU, STATIC_MSGS, TSSP2_CAR
|
||||
from selfdrive.can.packer import CANPacker
|
||||
from selfdrive.dragonpilot.dragonconf.dragonconf import dragonconf
|
||||
dragonconf = dragonconf()
|
||||
|
||||
|
||||
VisualAlert = car.CarControl.HUDControl.VisualAlert
|
||||
AudibleAlert = car.CarControl.HUDControl.AudibleAlert
|
||||
@@ -197,6 +200,8 @@ class CarController(object):
|
||||
|
||||
can_sends = []
|
||||
|
||||
if (CS.left_blinker_on or CS.right_blinker_on) and dragonconf.conf["tempDisableSteerOnSignal"]:
|
||||
apply_steer = 0.
|
||||
#*** control msgs ***
|
||||
#print("steer {0} {1} {2} {3}".format(apply_steer, min_lim, max_lim, CS.steer_torque_motor)
|
||||
|
||||
|
||||
@@ -41,6 +41,13 @@ class dragonconf():
|
||||
if has_new_def:
|
||||
self.write(config)
|
||||
|
||||
# Temporary disable OP lat control when on turning singal, default False
|
||||
if "tempDisableSteerOnSignal" not in config:
|
||||
config["tempDisableSteerOnSignal"] = False
|
||||
has_new_def = True
|
||||
if has_new_def:
|
||||
self.write(config)
|
||||
|
||||
return config
|
||||
|
||||
def write(self, config):
|
||||
|
||||
Reference in New Issue
Block a user