mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-09-30 11:23:44 +08:00
dragonpilot 2023-02-08T03:42:25 for EON/C2
version: dragonpilot v0.9.1 beta for EON/C2 date: 2023-02-08T03:42:25 dp-dev(priv2) master commit: 806adddf718b97255ba36d4a9dbd5f6bad383787
This commit is contained in:
Binary file not shown.
+1
-1
@@ -107,7 +107,7 @@ confs = [
|
||||
{'name': 'dp_dm', 'default': False, 'type': 'Bool', 'conf_type': ['param']},
|
||||
{'name': 'dp_speed_check', 'default': True, 'type': 'Bool', 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_temp_check', 'default': True, 'type': 'Bool', 'conf_type': ['param']},
|
||||
{'name': 'dp_vag_resume_fix', 'default': False, 'type': 'Bool', 'conf_type': ['param']},
|
||||
# {'name': 'dp_vag_resume_fix', 'default': False, 'type': 'Bool', 'conf_type': ['param']},
|
||||
# # lat ctrl
|
||||
# {'name': 'dp_lane_less_mode_ctrl', 'default': False, 'type': 'Bool', 'conf_type': ['param', 'struct']},
|
||||
# {'name': 'dp_lane_less_mode', 'default': 2, 'type': 'UInt8', 'min': 0, 'max': 2, 'depends': [{'name': 'dp_lane_less_mode_ctrl', 'vals': [True]}], 'conf_type': ['param', 'struct']},
|
||||
|
||||
Binary file not shown.
+1
-1
@@ -1 +1 @@
|
||||
#define COMMA_VERSION "2023.02.07"
|
||||
#define COMMA_VERSION "2023.02.08"
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -131,6 +131,7 @@ class ALTERNATIVE_EXPERIENCE:
|
||||
DISABLE_DISENGAGE_ON_GAS = 1
|
||||
DISABLE_STOCK_AEB = 2
|
||||
RAISE_LONGITUDINAL_LIMITS_TO_ISO_MAX = 8
|
||||
ALKA = 16
|
||||
|
||||
class Panda:
|
||||
|
||||
@@ -206,13 +207,11 @@ class Panda:
|
||||
# first byte is for EPS scaling factor
|
||||
FLAG_TOYOTA_ALT_BRAKE = (1 << 8)
|
||||
FLAG_TOYOTA_STOCK_LONGITUDINAL = (2 << 8)
|
||||
FLAG_TOYOTA_ALKA = (4 << 8)
|
||||
|
||||
FLAG_HONDA_ALT_BRAKE = 1
|
||||
FLAG_HONDA_BOSCH_LONG = 2
|
||||
FLAG_HONDA_NIDEC_ALT = 4
|
||||
FLAG_HONDA_RADARLESS = 8
|
||||
FLAG_HONDA_ALKA = 16
|
||||
|
||||
FLAG_HYUNDAI_EV_GAS = 1
|
||||
FLAG_HYUNDAI_HYBRID_GAS = 2
|
||||
@@ -221,13 +220,11 @@ class Panda:
|
||||
FLAG_HYUNDAI_CANFD_HDA2 = 16
|
||||
FLAG_HYUNDAI_CANFD_ALT_BUTTONS = 32
|
||||
FLAG_HYUNDAI_ALT_LIMITS = 64
|
||||
FLAG_HYUNDAI_ALKA = 128
|
||||
|
||||
FLAG_TESLA_POWERTRAIN = 1
|
||||
FLAG_TESLA_LONG_CONTROL = 2
|
||||
|
||||
FLAG_VOLKSWAGEN_LONG_CONTROL = 1
|
||||
FLAG_VOLKSWAGEN_ALKA = 2
|
||||
|
||||
FLAG_CHRYSLER_RAM_DT = 1
|
||||
FLAG_CHRYSLER_RAM_HD = 2
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -53,14 +53,11 @@ class CarInterface(CarInterfaceBase):
|
||||
|
||||
# dp - attempt to disable op long
|
||||
params = Params()
|
||||
dp_atl = int(params.get("dp_atl").decode('utf-8'))
|
||||
if dp_atl > 0:
|
||||
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_HONDA_ALKA
|
||||
if dp_atl == 1:
|
||||
ret.openpilotLongitudinalControl = False
|
||||
# update pcmCruise again
|
||||
if candidate in HONDA_BOSCH:
|
||||
ret.pcmCruise = not ret.openpilotLongitudinalControl
|
||||
if int(params.get("dp_atl").decode('utf-8')) == 1:
|
||||
ret.openpilotLongitudinalControl = False
|
||||
# update pcmCruise again
|
||||
if candidate in HONDA_BOSCH:
|
||||
ret.pcmCruise = True
|
||||
|
||||
if candidate == CAR.CRV_5G:
|
||||
ret.enableBsm = 0x12f8bfa7 in fingerprint[0]
|
||||
|
||||
@@ -229,6 +229,9 @@ class CarInterface(CarInterfaceBase):
|
||||
ret.experimentalLongitudinalAvailable = candidate not in (LEGACY_SAFETY_MODE_CAR | CAMERA_SCC_CAR)
|
||||
|
||||
ret.openpilotLongitudinalControl = experimental_long and ret.experimentalLongitudinalAvailable
|
||||
params = Params()
|
||||
if int(params.get("dp_atl").decode('utf-8')) == 1:
|
||||
ret.openpilotLongitudinalControl = False
|
||||
ret.pcmCruise = not ret.openpilotLongitudinalControl
|
||||
|
||||
ret.stoppingControl = True
|
||||
@@ -269,15 +272,6 @@ class CarInterface(CarInterfaceBase):
|
||||
if candidate in CAMERA_SCC_CAR:
|
||||
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_HYUNDAI_CAMERA_SCC
|
||||
|
||||
params = Params()
|
||||
dp_atl = int(params.get("dp_atl").decode('utf-8'))
|
||||
if dp_atl > 0:
|
||||
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_HYUNDAI_ALKA
|
||||
if dp_atl == 1:
|
||||
ret.openpilotLongitudinalControl = False
|
||||
# update pcmCruise again
|
||||
ret.pcmCruise = not ret.openpilotLongitudinalControl
|
||||
|
||||
if ret.openpilotLongitudinalControl:
|
||||
ret.safetyConfigs[-1].safetyParam |= Panda.FLAG_HYUNDAI_LONG
|
||||
if candidate in HYBRID_CAR:
|
||||
|
||||
@@ -222,15 +222,8 @@ class CarInterface(CarInterfaceBase):
|
||||
ret.openpilotLongitudinalControl = smartDsu or ret.enableDsu or candidate in (TSS2_CAR - RADAR_ACC_CAR)
|
||||
ret.autoResumeSng = ret.openpilotLongitudinalControl and candidate in NO_STOP_TIMER_CAR
|
||||
|
||||
dp_atl = int(Params().get("dp_atl").decode('utf-8'))
|
||||
if dp_atl > 0:
|
||||
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_TOYOTA_ALKA
|
||||
|
||||
if dp_atl == 1:
|
||||
ret.openpilotLongitudinalControl = False
|
||||
|
||||
if smartDsu and dp_atl == 2:
|
||||
ret.openpilotLongitudinalControl = True
|
||||
if int(Params().get("dp_atl").decode('utf-8')) == 1:
|
||||
ret.openpilotLongitudinalControl = False
|
||||
|
||||
if candidate == CAR.CHR_TSS2:
|
||||
ret.enableBsm = True
|
||||
|
||||
@@ -82,10 +82,8 @@ class CarInterface(CarInterfaceBase):
|
||||
# Global longitudinal tuning defaults, can be overridden per-vehicle
|
||||
|
||||
dp_atl = int(Params().get("dp_atl").decode('utf-8'))
|
||||
if dp_atl > 0:
|
||||
ret.safetyConfigs[0].safetyParam |= Panda.FLAG_VOLKSWAGEN_ALKA
|
||||
if dp_atl == 1:
|
||||
ret.openpilotLongitudinalControl = False
|
||||
if dp_atl == 1:
|
||||
ret.openpilotLongitudinalControl = False
|
||||
|
||||
ret.experimentalLongitudinalAvailable = ret.networkLocation == NetworkLocation.gateway or use_off_car_defaults
|
||||
if experimental_long and dp_atl != 1:
|
||||
|
||||
@@ -114,10 +114,6 @@ class Controls:
|
||||
self.CI, self.CP = CI, CI.CP
|
||||
|
||||
self.joystick_mode = self.params.get_bool("JoystickDebugMode") or (self.CP.notCar and sm is None)
|
||||
# dp
|
||||
self.sm['dragonConf'].dpAtl = int(self.params.get('dp_atl', encoding='utf8'))
|
||||
self.dp_temp_check = self.params.get_bool('dp_temp_check')
|
||||
self.dp_vag_resume_fix = self.params.get_bool('dp_vag_resume_fix')
|
||||
|
||||
# set alternative experiences from parameters
|
||||
self.disengage_on_accelerator = self.params.get_bool("DisengageOnAccelerator")
|
||||
@@ -128,6 +124,12 @@ class Controls:
|
||||
if self.CP.dashcamOnly and self.params.get_bool("DashcamOverride"):
|
||||
self.CP.dashcamOnly = False
|
||||
|
||||
# dp
|
||||
self.sm['dragonConf'].dpAtl = int(self.params.get('dp_atl', encoding='utf8'))
|
||||
if self.sm['dragonConf'].dpAtl:
|
||||
self.CP.alternativeExperience |= ALTERNATIVE_EXPERIENCE.ALKA
|
||||
self.dp_temp_check = self.params.get_bool('dp_temp_check')
|
||||
|
||||
# read params
|
||||
self.is_metric = self.params.get_bool("IsMetric")
|
||||
self.is_ldw_enabled = self.params.get_bool("IsLdwEnabled")
|
||||
@@ -597,16 +599,12 @@ class Controls:
|
||||
pass
|
||||
elif not CS.cruiseState.available:
|
||||
pass
|
||||
# CC.latActive = False
|
||||
elif CS.steerFaultTemporary:
|
||||
pass
|
||||
# CC.latActive = False
|
||||
elif CS.steerFaultPermanent:
|
||||
pass
|
||||
# CC.latActive = False
|
||||
elif CS.standstill:
|
||||
pass
|
||||
# CC.latActive = False
|
||||
elif CS.gearShifter == car.CarState.GearShifter.reverse:
|
||||
pass
|
||||
else:
|
||||
|
||||
@@ -195,7 +195,7 @@ class NormalPermanentAlert(Alert):
|
||||
|
||||
|
||||
class StartupAlert(Alert):
|
||||
def __init__(self, alert_text_1: str, alert_text_2: str = _("Always keep hands on wheel and eyes on road"), alert_status=AlertStatus.normal):
|
||||
def __init__(self, alert_text_1: str, alert_text_2: str = _("Happy Holiday / New Years! Safe Travel, cya in 2023"), alert_status=AlertStatus.normal):
|
||||
super().__init__(alert_text_1, alert_text_2,
|
||||
alert_status, AlertSize.mid,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 10.),
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user