diff --git a/launch_openpilot.sh b/launch_openpilot.sh index d4841b6..6f4cf65 100755 --- a/launch_openpilot.sh +++ b/launch_openpilot.sh @@ -17,4 +17,7 @@ if [ "$MODEL" = "comma tici" ]; then exec "$C3_LAUNCH_SH" fi +export API_HOST=https://api.konik.ai +export ATHENA_HOST=wss://athena.konik.ai + exec ./launch_chffrplus.sh diff --git a/opendbc_repo/opendbc/car/tests/routes.py b/opendbc_repo/opendbc/car/tests/routes.py index e1d3200..47f44ea 100644 --- a/opendbc_repo/opendbc/car/tests/routes.py +++ b/opendbc_repo/opendbc/car/tests/routes.py @@ -38,7 +38,7 @@ non_tested_cars = [ HYUNDAI.KIA_SELTOS_2023_NON_SCC, HYUNDAI.GENESIS_G70_2021_NON_SCC, HONDA.HONDA_CLARITY, - TOYOTA.TOYOTA_WILDLANDER, + TOYOTA.TOYOTA_WILDLANDER_PHEV, ] diff --git a/opendbc_repo/opendbc/car/torque_data/substitute.toml b/opendbc_repo/opendbc/car/torque_data/substitute.toml index b603eff..8b08fdd 100644 --- a/opendbc_repo/opendbc/car/torque_data/substitute.toml +++ b/opendbc_repo/opendbc/car/torque_data/substitute.toml @@ -97,4 +97,4 @@ legend = ["LAT_ACCEL_FACTOR", "MAX_LAT_ACCEL_MEASURED", "FRICTION"] "GENESIS_G70_2021_NON_SCC" = "HYUNDAI_SONATA" "HYUNDAI_BAYON_1ST_GEN_NON_SCC" = "HYUNDAI_SONATA" "HONDA_CLARITY" = "HONDA_CIVIC" -"TOYOTA_WILDLANDER" = "TOYOTA_RAV4_TSS2" +"TOYOTA_WILDLANDER_PHEV" = "TOYOTA_RAV4_TSS2" diff --git a/opendbc_repo/opendbc/car/toyota/interface.py b/opendbc_repo/opendbc/car/toyota/interface.py index 6362efd..1bcf4f2 100644 --- a/opendbc_repo/opendbc/car/toyota/interface.py +++ b/opendbc_repo/opendbc/car/toyota/interface.py @@ -157,7 +157,7 @@ class CarInterface(CarInterfaceBase): if candidate in UNSUPPORTED_DSU_CAR: ret.safetyParam |= ToyotaSafetyFlagsSP.UNSUPPORTED_DSU - if candidate in (CAR.TOYOTA_WILDLANDER, ): + if candidate in (CAR.TOYOTA_WILDLANDER_PHEV, ): stock_cp.lateralTuning.init('pid') stock_cp.lateralTuning.pid.kiBP = [0.0] stock_cp.lateralTuning.pid.kpBP = [0.0] diff --git a/opendbc_repo/opendbc/car/toyota/values.py b/opendbc_repo/opendbc/car/toyota/values.py index 63b3afe..33d4fb8 100644 --- a/opendbc_repo/opendbc/car/toyota/values.py +++ b/opendbc_repo/opendbc/car/toyota/values.py @@ -397,7 +397,7 @@ class CAR(Platforms): ) # port extensions - TOYOTA_WILDLANDER = ToyotaSecOCPlatformConfig( + TOYOTA_WILDLANDER_PHEV = ToyotaSecOCPlatformConfig( [ToyotaCarDocs("Toyota Wildlander PHEV 2021", min_enable_speed=MIN_ACC_SPEED)], CarSpecs(mass=4155. * CV.LB_TO_KG, wheelbase=2.69, steerRatio=16.88, tireStiffnessFactor=0.5533), ) diff --git a/opendbc_repo/opendbc/sunnypilot/car/car_list.json b/opendbc_repo/opendbc/sunnypilot/car/car_list.json index e37b8eb..1f2b1b8 100644 --- a/opendbc_repo/opendbc/sunnypilot/car/car_list.json +++ b/opendbc_repo/opendbc/sunnypilot/car/car_list.json @@ -3586,7 +3586,7 @@ "package": "All" }, "Toyota Wildlander PHEV 2021": { - "platform": "TOYOTA_WILDLANDER", + "platform": "TOYOTA_WILDLANDER_PHEV", "make": "Toyota", "brand": "toyota", "model": "Wildlander PHEV", diff --git a/opendbc_repo/opendbc/sunnypilot/car/toyota/fingerprints_ext.py b/opendbc_repo/opendbc/sunnypilot/car/toyota/fingerprints_ext.py index 1ea021a..995fff5 100644 --- a/opendbc_repo/opendbc/sunnypilot/car/toyota/fingerprints_ext.py +++ b/opendbc_repo/opendbc/sunnypilot/car/toyota/fingerprints_ext.py @@ -4,7 +4,7 @@ from opendbc.car.toyota.values import CAR Ecu = CarParams.Ecu FW_VERSIONS_EXT = { - CAR.TOYOTA_WILDLANDER: { + CAR.TOYOTA_WILDLANDER_PHEV: { (Ecu.engine, 0x700, None): [ b'\x01896630R57001\x00\x00\x00\x00', ], @@ -20,5 +20,11 @@ FW_VERSIONS_EXT = { (Ecu.fwdRadar, 0x750, 0xf): [ b'\x018821F3301400\x00\x00\x00\x00', ], + (Ecu.srs, 0x780, None): [ + b'\x018917F0R18000\x00\x00\x00\x00' + ], + (Ecu.hybrid, 0x7d2, None): [ + b'\x02899830R24000\x00\x00\x00\x00899850R05000\x00\x00\x00\x00' + ], }, } diff --git a/selfdrive/monitoring/dmonitoringd.py b/selfdrive/monitoring/dmonitoringd.py index 71733f9..a435df0 100755 --- a/selfdrive/monitoring/dmonitoringd.py +++ b/selfdrive/monitoring/dmonitoringd.py @@ -23,7 +23,7 @@ def dmonitoringd_thread(): continue valid = sm.all_checks() - if valid: + if DM.always_on and valid: DM.run_step(sm) # publish diff --git a/selfdrive/selfdrived/events.py b/selfdrive/selfdrived/events.py index 591e549..040e04a 100755 --- a/selfdrive/selfdrived/events.py +++ b/selfdrive/selfdrived/events.py @@ -72,25 +72,25 @@ def startup_master_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubM if "REPLAY" in os.environ: branch = "replay" - return StartupAlert("WARNING: This branch is not tested", branch, alert_status=AlertStatus.userPrompt) + return StartupAlert("警告:此分支未经测试", branch, alert_status=AlertStatus.userPrompt) def below_engage_speed_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert: - return NoEntryAlert(f"Drive above {get_display_speed(CP.minEnableSpeed, metric)} to engage") + return NoEntryAlert(f"请将时速提高至 {get_display_speed(CP.minEnableSpeed, metric)} 来启用") def below_steer_speed_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert: return Alert( - f"Steer Unavailable Below {get_display_speed(CP.minSteerSpeed, metric)}", + f"转向在 {get_display_speed(CP.minSteerSpeed, metric)} 以下不可用", "", AlertStatus.userPrompt, AlertSize.small, - Priority.LOW, VisualAlert.steerRequired, AudibleAlert.prompt, 0.4) + Priority.LOW, VisualAlert.none, AudibleAlert.prompt, 0.4) def calibration_incomplete_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert: - first_word = 'Recalibration' if sm['liveCalibration'].calStatus == log.LiveCalibrationData.Status.recalibrating else 'Calibration' + first_word = '重新校准' if sm['liveCalibration'].calStatus == log.LiveCalibrationData.Status.recalibrating else '校准' return Alert( - f"{first_word} in Progress: {sm['liveCalibration'].calPerc:.0f}%", - f"Drive Above {get_display_speed(MIN_SPEED_FILTER, metric)}", + f"{first_word}进行中:{sm['liveCalibration'].calPerc:.0f}%", + f"请将时速提高至 {get_display_speed(MIN_SPEED_FILTER, metric)} 进行校准", AlertStatus.normal, AlertSize.mid, Priority.LOWEST, VisualAlert.none, AudibleAlert.none, .2) @@ -107,57 +107,57 @@ def audio_feedback_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubM def out_of_space_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert: full_perc = round(100. - sm['deviceState'].freeSpacePercent) - return NormalPermanentAlert("Out of Storage", f"{full_perc}% full") + return NormalPermanentAlert("存储空间不足", f"已用 {full_perc}%") def posenet_invalid_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert: mdl = sm['modelV2'].velocity.x[0] if len(sm['modelV2'].velocity.x) else math.nan err = CS.vEgo - mdl - msg = f"Speed Error: {err:.1f} m/s" - return NoEntryAlert(msg, alert_text_1="Posenet Speed Invalid") + msg = f"速度误差: {err:.1f} 米/秒" + return NoEntryAlert(msg, alert_text_1="Posenet速度无效") def process_not_running_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert: not_running = [p.name for p in sm['managerState'].processes if not p.running and p.shouldBeRunning] msg = ', '.join(not_running) - return NoEntryAlert(msg, alert_text_1="Process Not Running") + return NoEntryAlert(msg, alert_text_1="进程未运行") def comm_issue_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert: bs = [s for s in sm.data.keys() if not sm.all_checks([s, ])] msg = ', '.join(bs[:4]) # can't fit too many on one line - return NoEntryAlert(msg, alert_text_1="Communication Issue Between Processes") + return NoEntryAlert(msg, alert_text_1="进程间通信问题") def camera_malfunction_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert: all_cams = ('roadCameraState', 'driverCameraState', 'wideRoadCameraState') bad_cams = [s.replace('State', '') for s in all_cams if s in sm.data.keys() and not sm.all_checks([s, ])] - return NormalPermanentAlert("Camera Malfunction", ', '.join(bad_cams)) + return NormalPermanentAlert("摄像头故障", ', '.join(bad_cams)) def calibration_invalid_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert: rpy = sm['liveCalibration'].rpyCalib yaw = math.degrees(rpy[2] if len(rpy) == 3 else math.nan) pitch = math.degrees(rpy[1] if len(rpy) == 3 else math.nan) - angles = f"Remount Device (Pitch: {pitch:.1f}°, Yaw: {yaw:.1f}°)" - return NormalPermanentAlert("Calibration Invalid", angles) + angles = f"请重新安装设备 (俯仰角: {pitch:.1f}°, 偏航角: {yaw:.1f}°)" + return NormalPermanentAlert("校准无效", angles) def paramsd_invalid_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert: if not sm['liveParameters'].angleOffsetValid: angle_offset_deg = sm['liveParameters'].angleOffsetDeg - title = "Steering misalignment detected" - text = f"Angle offset too high (Offset: {angle_offset_deg:.1f}°)" + title = "转向系统未对准" + text = f"角度偏移过大 (偏移量: {angle_offset_deg:.1f}°)" elif not sm['liveParameters'].steerRatioValid: steer_ratio = sm['liveParameters'].steerRatio - title = "Steer ratio mismatch" - text = f"Steering rack geometry may be off (Ratio: {steer_ratio:.1f})" + title = "转向传动比不匹配" + text = f"转向齿条几何可能不正确 (传动比: {steer_ratio:.1f})" elif not sm['liveParameters'].stiffnessFactorValid: stiffness_factor = sm['liveParameters'].stiffnessFactor - title = "Abnormal tire stiffness" - text = f"Check tires, pressure, or alignment (Factor: {stiffness_factor:.1f})" + title = "轮胎刚度异常" + text = f"请检查轮胎、胎压或定位 (系数: {stiffness_factor:.1f})" else: - return NoEntryAlert("paramsd Temporary Error") + return NoEntryAlert("paramsd 临时错误") return NoEntryAlert(alert_text_1=title, alert_text_2=text) @@ -165,27 +165,27 @@ def overheat_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, cpu = max(sm['deviceState'].cpuTempC, default=0.) gpu = max(sm['deviceState'].gpuTempC, default=0.) temp = max((cpu, gpu, sm['deviceState'].memoryTempC)) - return NormalPermanentAlert("System Overheated", f"{temp:.0f} °C") + return NormalPermanentAlert("系统过热", f"{temp:.0f} °C") def low_memory_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert: - return NormalPermanentAlert("Low Memory", f"{sm['deviceState'].memoryUsagePercent}% used") + return NormalPermanentAlert("内存不足", f"已用 {sm['deviceState'].memoryUsagePercent}%") def high_cpu_usage_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert: x = max(sm['deviceState'].cpuUsagePercent, default=0.) - return NormalPermanentAlert("High CPU Usage", f"{x}% used") + return NormalPermanentAlert("CPU使用率过高", f"已用 {x}%") def modeld_lagging_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert: - return NormalPermanentAlert("Driving Model Lagging", f"{sm['modelV2'].frameDropPerc:.1f}% frames dropped") + return NormalPermanentAlert("驾驶模型滞后", f"已丢帧 {sm['modelV2'].frameDropPerc:.1f}%") def joystick_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert: gb = sm['carControl'].actuators.accel / 4. steer = sm['carControl'].actuators.torque - vals = f"Gas: {round(gb * 100.)}%, Steer: {round(steer * 100.)}%" - return NormalPermanentAlert("Joystick Mode", vals) + vals = f"油门: {round(gb * 100.)}%, 转向: {round(steer * 100.)}%" + return NormalPermanentAlert("操纵杆模式", vals) def longitudinal_maneuver_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert: @@ -200,18 +200,25 @@ def longitudinal_maneuver_alert(CP: car.CarParams, CS: car.CarState, sm: messagi def personality_changed_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert: personality = str(personality).title() - return NormalPermanentAlert(f"Driving Personality: {personality}", duration=1.5) + personality_en = "" + if personality == "Aggressive": + personality_en = "激进" + elif personality == "Standard": + personality_en = "标准" + elif personality == "Relaxed": + personality_en = "舒适" + return NormalPermanentAlert(f"驾驶风格: {personality_en}", duration=1.5) def invalid_lkas_setting_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert: - text = "Toggle stock LKAS on or off to engage" + text = "请切换原厂LKAS状态以启用" if CP.brand == "tesla": - text = "Switch to Traffic-Aware Cruise Control to engage" + text = "请切换到交通感知巡航控制以启用" elif CP.brand == "mazda": - text = "Enable your car's LKAS to engage" + text = "请启用您的车辆LKAS以启用" elif CP.brand == "nissan": - text = "Disable your car's stock LKAS to engage" - return NormalPermanentAlert("Invalid LKAS setting", text) + text = "请禁用您的车辆原厂LKAS以启用" + return NormalPermanentAlert("无效的LKAS设置", text) @@ -225,21 +232,21 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { EventName.joystickDebug: { ET.WARNING: joystick_alert, - ET.PERMANENT: NormalPermanentAlert("Joystick Mode"), + ET.PERMANENT: NormalPermanentAlert("操纵杆模式"), }, EventName.longitudinalManeuver: { ET.WARNING: longitudinal_maneuver_alert, - ET.PERMANENT: NormalPermanentAlert("Longitudinal Maneuver Mode", - "Ensure road ahead is clear"), + ET.PERMANENT: NormalPermanentAlert("纵向操作模式", + "确保前方道路畅通"), }, EventName.selfdriveInitializing: { - ET.NO_ENTRY: NoEntryAlert("System Initializing"), + ET.NO_ENTRY: NoEntryAlert("系统初始化中"), }, EventName.startup: { - ET.PERMANENT: StartupAlert("Be ready to take over at any time") + ET.PERMANENT: StartupAlert("请随时准备接管您的车辆控制权") }, EventName.startupMaster: { @@ -247,28 +254,28 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { }, EventName.startupNoControl: { - ET.PERMANENT: StartupAlert("Dashcam mode"), - ET.NO_ENTRY: NoEntryAlert("Dashcam mode"), + ET.PERMANENT: StartupAlert("仅行车记录仪模式"), + ET.NO_ENTRY: NoEntryAlert("仅行车记录仪模式"), }, EventName.startupNoCar: { - ET.PERMANENT: StartupAlert("Dashcam mode for unsupported car"), + ET.PERMANENT: StartupAlert("不支持车辆的行车记录仪模式"), }, EventName.startupNoSecOcKey: { - ET.PERMANENT: NormalPermanentAlert("Dashcam Mode", - "Security Key Not Available", + ET.PERMANENT: NormalPermanentAlert("仅行车记录仪模式", + "安全密钥不可用", priority=Priority.HIGH), }, EventName.dashcamMode: { - ET.PERMANENT: NormalPermanentAlert("Dashcam Mode", + ET.PERMANENT: NormalPermanentAlert("行车记录仪模式", priority=Priority.LOWEST), }, EventName.invalidLkasSetting: { ET.PERMANENT: invalid_lkas_setting_alert, - ET.NO_ENTRY: NoEntryAlert("Invalid LKAS setting"), + ET.NO_ENTRY: NoEntryAlert("车道保持辅助系统(LKAS)设置无效"), }, EventName.cruiseMismatch: { @@ -279,40 +286,40 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { # read-only mode. This can be solved by adding your fingerprint. # See https://github.com/commaai/openpilot/wiki/Fingerprinting for more information EventName.carUnrecognized: { - ET.PERMANENT: NormalPermanentAlert("Dashcam Mode", - "Car Unrecognized", + ET.PERMANENT: NormalPermanentAlert("行车记录仪模式", + "车辆未识别", priority=Priority.LOWEST), }, EventName.aeb: { ET.PERMANENT: Alert( - "BRAKE!", - "Emergency Braking: Risk of Collision", + "刹车!", + "紧急制动:可能发生碰撞", AlertStatus.critical, AlertSize.full, Priority.HIGHEST, VisualAlert.fcw, AudibleAlert.none, 2.), - ET.NO_ENTRY: NoEntryAlert("AEB: Risk of Collision"), + ET.NO_ENTRY: NoEntryAlert("AEB:可能发生碰撞"), }, EventName.stockAeb: { ET.PERMANENT: Alert( - "BRAKE!", - "Stock AEB: Risk of Collision", + "刹车!", + "原厂AEB:可能发生碰撞", AlertStatus.critical, AlertSize.full, Priority.HIGHEST, VisualAlert.fcw, AudibleAlert.none, 2.), - ET.NO_ENTRY: NoEntryAlert("Stock AEB: Risk of Collision"), + ET.NO_ENTRY: NoEntryAlert("原厂AEB:可能发生碰撞"), }, EventName.fcw: { ET.PERMANENT: Alert( - "BRAKE!", - "Risk of Collision", + "刹车!", + "可能发生碰撞", AlertStatus.critical, AlertSize.full, Priority.HIGHEST, VisualAlert.fcw, AudibleAlert.warningSoft, 2.), }, EventName.ldw: { ET.PERMANENT: Alert( - "Lane Departure Detected", + "监测偏离车道", "", AlertStatus.userPrompt, AlertSize.small, Priority.LOW, VisualAlert.ldw, AudibleAlert.prompt, 3.), @@ -322,7 +329,7 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { EventName.steerTempUnavailableSilent: { ET.WARNING: Alert( - "Steering Temporarily Unavailable", + "转向暂时不可用", "", AlertStatus.userPrompt, AlertSize.small, Priority.LOW, VisualAlert.steerRequired, AudibleAlert.prompt, 1.8), @@ -330,7 +337,7 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { EventName.preDriverDistracted: { ET.PERMANENT: Alert( - "Pay Attention", + "请注意", "", AlertStatus.normal, AlertSize.small, Priority.LOW, VisualAlert.none, AudibleAlert.none, .1), @@ -338,23 +345,23 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { EventName.promptDriverDistracted: { ET.PERMANENT: Alert( - "Pay Attention", - "Driver Distracted", + "请注意", + "驾驶员分心", AlertStatus.userPrompt, AlertSize.mid, Priority.MID, VisualAlert.steerRequired, AudibleAlert.promptDistracted, .1), }, EventName.driverDistracted: { ET.PERMANENT: Alert( - "DISENGAGE IMMEDIATELY", - "Driver Distracted", + "立即解除控制", + "驾驶员分心", AlertStatus.critical, AlertSize.full, Priority.HIGH, VisualAlert.steerRequired, AudibleAlert.warningImmediate, .1), }, EventName.preDriverUnresponsive: { ET.PERMANENT: Alert( - "Touch Steering Wheel: No Face Detected", + "触摸方向盘:未检测到面部", "", AlertStatus.normal, AlertSize.small, Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, .1), @@ -362,31 +369,31 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { EventName.promptDriverUnresponsive: { ET.PERMANENT: Alert( - "Touch Steering Wheel", - "Driver Unresponsive", + "触摸方向盘", + "驾驶员无响应", AlertStatus.userPrompt, AlertSize.mid, Priority.MID, VisualAlert.steerRequired, AudibleAlert.promptDistracted, .1), }, EventName.driverUnresponsive: { ET.PERMANENT: Alert( - "DISENGAGE IMMEDIATELY", - "Driver Unresponsive", + "立即解除控制", + "驾驶员无响应", AlertStatus.critical, AlertSize.full, Priority.HIGH, VisualAlert.steerRequired, AudibleAlert.warningImmediate, .1), }, EventName.manualRestart: { ET.WARNING: Alert( - "TAKE CONTROL", - "Resume Driving Manually", + "接管控制", + "请手动继续驾驶", AlertStatus.userPrompt, AlertSize.mid, Priority.LOW, VisualAlert.none, AudibleAlert.none, .2), }, EventName.resumeRequired: { ET.WARNING: Alert( - "Press Resume to Exit Standstill", + "按恢复键以解除停止状态", "", AlertStatus.userPrompt, AlertSize.small, Priority.LOW, VisualAlert.none, AudibleAlert.none, .2), @@ -398,7 +405,7 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { EventName.preLaneChangeLeft: { ET.WARNING: Alert( - "Steer Left to Start Lane Change Once Safe", + "请确认安全后进行左转变道", "", AlertStatus.normal, AlertSize.small, Priority.LOW, VisualAlert.none, AudibleAlert.none, .1), @@ -406,7 +413,7 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { EventName.preLaneChangeRight: { ET.WARNING: Alert( - "Steer Right to Start Lane Change Once Safe", + "请确认安全后进行右转变道", "", AlertStatus.normal, AlertSize.small, Priority.LOW, VisualAlert.none, AudibleAlert.none, .1), @@ -414,7 +421,7 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { EventName.laneChangeBlocked: { ET.WARNING: Alert( - "Car Detected in Blindspot", + "盲点检测到车辆", "", AlertStatus.userPrompt, AlertSize.small, Priority.LOW, VisualAlert.none, AudibleAlert.prompt, .1), @@ -422,7 +429,7 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { EventName.laneChange: { ET.WARNING: Alert( - "Changing Lanes", + "正在变道", "", AlertStatus.normal, AlertSize.small, Priority.LOW, VisualAlert.none, AudibleAlert.none, .1), @@ -430,41 +437,41 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { EventName.steerSaturated: { ET.WARNING: Alert( - "Take Control", - "Turn Exceeds Steering Limit", + "请接管控制", + "转向超出限制", AlertStatus.userPrompt, AlertSize.mid, Priority.LOW, VisualAlert.steerRequired, AudibleAlert.promptRepeat, 2.), }, # Thrown when the fan is driven at >50% but is not rotating EventName.fanMalfunction: { - ET.PERMANENT: NormalPermanentAlert("Fan Malfunction", "Likely Hardware Issue"), + ET.PERMANENT: NormalPermanentAlert("风扇故障", "可能是硬件问题"), }, # Camera is not outputting frames EventName.cameraMalfunction: { ET.PERMANENT: camera_malfunction_alert, - ET.SOFT_DISABLE: soft_disable_alert("Camera Malfunction"), - ET.NO_ENTRY: NoEntryAlert("Camera Malfunction: Reboot Your Device"), + ET.SOFT_DISABLE: soft_disable_alert("摄像头故障"), + ET.NO_ENTRY: NoEntryAlert("摄像头故障:请重启设备"), }, # Camera framerate too low EventName.cameraFrameRate: { - ET.PERMANENT: NormalPermanentAlert("Camera Frame Rate Low", "Reboot your Device"), - ET.SOFT_DISABLE: soft_disable_alert("Camera Frame Rate Low"), - ET.NO_ENTRY: NoEntryAlert("Camera Frame Rate Low: Reboot Your Device"), + ET.PERMANENT: NormalPermanentAlert("摄像头帧率低", "请重启设备"), + ET.SOFT_DISABLE: soft_disable_alert("摄像头帧率低"), + ET.NO_ENTRY: NoEntryAlert("摄像头帧率低:请重启设备"), }, # Unused EventName.locationdTemporaryError: { - ET.NO_ENTRY: NoEntryAlert("locationd Temporary Error"), - ET.SOFT_DISABLE: soft_disable_alert("locationd Temporary Error"), + ET.NO_ENTRY: NoEntryAlert("locationd临时错误"), + ET.SOFT_DISABLE: soft_disable_alert("locationd临时错误"), }, EventName.locationdPermanentError: { - ET.NO_ENTRY: NoEntryAlert("locationd Permanent Error"), - ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("locationd Permanent Error"), - ET.PERMANENT: NormalPermanentAlert("locationd Permanent Error"), + ET.NO_ENTRY: NoEntryAlert("locationd永久错误"), + ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("locationd永久错误"), + ET.PERMANENT: NormalPermanentAlert("locationd永久错误"), }, # openpilot tries to learn certain parameters about your car by observing @@ -477,13 +484,13 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { # bad alignment or bad sensor data. If this happens consistently consider creating an issue on GitHub EventName.paramsdTemporaryError: { ET.NO_ENTRY: paramsd_invalid_alert, - ET.SOFT_DISABLE: soft_disable_alert("paramsd Temporary Error"), + ET.SOFT_DISABLE: soft_disable_alert("paramsd 临时错误"), }, EventName.paramsdPermanentError: { - ET.NO_ENTRY: NoEntryAlert("paramsd Permanent Error"), - ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("paramsd Permanent Error"), - ET.PERMANENT: NormalPermanentAlert("paramsd Permanent Error"), + ET.NO_ENTRY: NoEntryAlert("paramsd永久错误"), + ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("paramsd永久错误"), + ET.PERMANENT: NormalPermanentAlert("paramsd永久错误"), }, # ********** events that affect controls state transitions ********** @@ -502,12 +509,12 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { EventName.buttonCancel: { ET.USER_DISABLE: EngagementAlert(AudibleAlert.disengage), - ET.NO_ENTRY: NoEntryAlert("Cancel Pressed"), + ET.NO_ENTRY: NoEntryAlert("取消按钮被按下"), }, EventName.brakeHold: { ET.WARNING: Alert( - "Press Resume to Exit Brake Hold", + "按恢复键以解除制动保持", "", AlertStatus.userPrompt, AlertSize.small, Priority.LOW, VisualAlert.none, AudibleAlert.none, .2), @@ -515,23 +522,23 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { EventName.parkBrake: { ET.USER_DISABLE: EngagementAlert(AudibleAlert.disengage), - ET.NO_ENTRY: NoEntryAlert("Parking Brake Engaged"), + ET.NO_ENTRY: NoEntryAlert("停车制动已启用"), }, EventName.pedalPressed: { ET.USER_DISABLE: EngagementAlert(AudibleAlert.disengage), - ET.NO_ENTRY: NoEntryAlert("Pedal Pressed", + ET.NO_ENTRY: NoEntryAlert("踏板被按下", visual_alert=VisualAlert.brakePressed), }, EventName.steerDisengage: { ET.USER_DISABLE: EngagementAlert(AudibleAlert.disengage), - ET.NO_ENTRY: NoEntryAlert("Steering Pressed"), + ET.NO_ENTRY: NoEntryAlert("方向盘被转动"), }, EventName.preEnableStandstill: { ET.PRE_ENABLE: Alert( - "Release Brake to Engage", + "释放制动以启用", "", AlertStatus.normal, AlertSize.small, Priority.LOWEST, VisualAlert.none, AudibleAlert.none, .1, creation_delay=1.), @@ -559,27 +566,27 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { }, EventName.resumeBlocked: { - ET.NO_ENTRY: NoEntryAlert("Press Set to Engage"), + ET.NO_ENTRY: NoEntryAlert("请按设定键以启用"), }, EventName.wrongCruiseMode: { ET.USER_DISABLE: EngagementAlert(AudibleAlert.disengage), - ET.NO_ENTRY: NoEntryAlert("Adaptive Cruise Disabled"), + ET.NO_ENTRY: NoEntryAlert("自适应巡航已禁用"), }, EventName.steerTempUnavailable: { - ET.SOFT_DISABLE: soft_disable_alert("Steering Temporarily Unavailable"), - ET.NO_ENTRY: NoEntryAlert("Steering Temporarily Unavailable"), + ET.SOFT_DISABLE: soft_disable_alert("转向暂时不可用"), + ET.NO_ENTRY: NoEntryAlert("转向暂时不可用"), }, EventName.steerTimeLimit: { - ET.SOFT_DISABLE: soft_disable_alert("Vehicle Steering Time Limit"), - ET.NO_ENTRY: NoEntryAlert("Vehicle Steering Time Limit"), + ET.SOFT_DISABLE: soft_disable_alert("车辆转向时间限制"), + ET.NO_ENTRY: NoEntryAlert("车辆转向时间限制"), }, EventName.outOfSpace: { ET.PERMANENT: out_of_space_alert, - ET.NO_ENTRY: NoEntryAlert("Out of Storage"), + ET.NO_ENTRY: NoEntryAlert("出库"), }, EventName.belowEngageSpeed: { @@ -588,19 +595,19 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { EventName.sensorDataInvalid: { ET.PERMANENT: Alert( - "Sensor Data Invalid", - "Possible Hardware Issue", + "传感器数据无效", + "可能是硬件问题", AlertStatus.normal, AlertSize.mid, Priority.LOWER, VisualAlert.none, AudibleAlert.none, .2, creation_delay=1.), - ET.NO_ENTRY: NoEntryAlert("Sensor Data Invalid"), - ET.SOFT_DISABLE: soft_disable_alert("Sensor Data Invalid"), + ET.NO_ENTRY: NoEntryAlert("传感器数据无效"), + ET.SOFT_DISABLE: soft_disable_alert("传感器数据无效"), }, EventName.noGps: { }, EventName.tooDistracted: { - ET.NO_ENTRY: NoEntryAlert("Distraction Level Too High"), + ET.NO_ENTRY: NoEntryAlert("注意力分散程度过高"), }, EventName.excessiveActuation: { @@ -610,13 +617,13 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { EventName.overheat: { ET.PERMANENT: overheat_alert, - ET.SOFT_DISABLE: soft_disable_alert("System Overheated"), - ET.NO_ENTRY: NoEntryAlert("System Overheated"), + ET.SOFT_DISABLE: soft_disable_alert("系统过热"), + ET.NO_ENTRY: NoEntryAlert("系统过热"), }, EventName.wrongGear: { - ET.SOFT_DISABLE: user_soft_disable_alert("Gear not D"), - ET.NO_ENTRY: NoEntryAlert("Gear not D"), + ET.SOFT_DISABLE: user_soft_disable_alert("挡位不在D挡"), + ET.NO_ENTRY: NoEntryAlert("挡位不在D挡"), }, # This alert is thrown when the calibration angles are outside of the acceptable range. @@ -626,40 +633,40 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { # See https://comma.ai/setup for more information EventName.calibrationInvalid: { ET.PERMANENT: calibration_invalid_alert, - ET.SOFT_DISABLE: soft_disable_alert("Calibration Invalid: Remount Device & Recalibrate"), - ET.NO_ENTRY: NoEntryAlert("Calibration Invalid: Remount Device & Recalibrate"), + ET.SOFT_DISABLE: soft_disable_alert("校准无效:重新安装设备并重新校准"), + ET.NO_ENTRY: NoEntryAlert("校准无效:重新安装设备并重新校准"), }, EventName.calibrationIncomplete: { ET.PERMANENT: calibration_incomplete_alert, - ET.SOFT_DISABLE: soft_disable_alert("Calibration Incomplete"), - ET.NO_ENTRY: NoEntryAlert("Calibration in Progress"), + ET.SOFT_DISABLE: soft_disable_alert("校准未完成"), + ET.NO_ENTRY: NoEntryAlert("校准进行中"), }, EventName.calibrationRecalibrating: { ET.PERMANENT: calibration_incomplete_alert, - ET.SOFT_DISABLE: soft_disable_alert("Device Remount Detected: Recalibrating"), - ET.NO_ENTRY: NoEntryAlert("Remount Detected: Recalibrating"), + ET.SOFT_DISABLE: soft_disable_alert("设备重新安装检测到:重新校准中"), + ET.NO_ENTRY: NoEntryAlert("设备重新安装检测到:重新校准中"), }, EventName.doorOpen: { - ET.SOFT_DISABLE: user_soft_disable_alert("Door Open"), - ET.NO_ENTRY: NoEntryAlert("Door Open"), + ET.SOFT_DISABLE: user_soft_disable_alert("车门开启"), + ET.NO_ENTRY: NoEntryAlert("车门开启"), }, EventName.seatbeltNotLatched: { - ET.SOFT_DISABLE: user_soft_disable_alert("Seatbelt Unlatched"), - ET.NO_ENTRY: NoEntryAlert("Seatbelt Unlatched"), + ET.SOFT_DISABLE: user_soft_disable_alert("安全带未系"), + ET.NO_ENTRY: NoEntryAlert("安全带未系"), }, EventName.espDisabled: { - ET.SOFT_DISABLE: soft_disable_alert("Electronic Stability Control Disabled"), - ET.NO_ENTRY: NoEntryAlert("Electronic Stability Control Disabled"), + ET.SOFT_DISABLE: soft_disable_alert("电子稳定控制系统已禁用"), + ET.NO_ENTRY: NoEntryAlert("电子稳定控制系统已禁用"), }, EventName.lowBattery: { - ET.SOFT_DISABLE: soft_disable_alert("Low Battery"), - ET.NO_ENTRY: NoEntryAlert("Low Battery"), + ET.SOFT_DISABLE: soft_disable_alert("电池电量低"), + ET.NO_ENTRY: NoEntryAlert("电池电量低"), }, # Different openpilot services communicate between each other at a certain @@ -667,41 +674,41 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { # is thrown. This can mean a service crashed, did not broadcast a message for # ten times the regular interval, or the average interval is more than 10% too high. EventName.commIssue: { - ET.SOFT_DISABLE: soft_disable_alert("Communication Issue Between Processes"), + ET.SOFT_DISABLE: soft_disable_alert("进程间通信问题"), ET.NO_ENTRY: comm_issue_alert, }, EventName.commIssueAvgFreq: { - ET.SOFT_DISABLE: soft_disable_alert("Low Communication Rate Between Processes"), - ET.NO_ENTRY: NoEntryAlert("Low Communication Rate Between Processes"), + ET.SOFT_DISABLE: soft_disable_alert("进程间通信速率低"), + ET.NO_ENTRY: NoEntryAlert("进程间通信速率低"), }, EventName.selfdrivedLagging: { - ET.SOFT_DISABLE: soft_disable_alert("System Lagging"), - ET.NO_ENTRY: NoEntryAlert("Selfdrive Process Lagging: Reboot Your Device"), + ET.SOFT_DISABLE: soft_disable_alert("系统滞后"), + ET.NO_ENTRY: NoEntryAlert("自驾车进程滞后:请重启设备"), }, # Thrown when manager detects a service exited unexpectedly while driving EventName.processNotRunning: { ET.NO_ENTRY: process_not_running_alert, - ET.SOFT_DISABLE: soft_disable_alert("Process Not Running"), + ET.SOFT_DISABLE: soft_disable_alert("进程未运行"), }, EventName.radarFault: { - ET.SOFT_DISABLE: soft_disable_alert("Radar Error: Restart the Car"), - ET.NO_ENTRY: NoEntryAlert("Radar Error: Restart the Car"), + ET.SOFT_DISABLE: soft_disable_alert("雷达错误:请重启车辆"), + ET.NO_ENTRY: NoEntryAlert("雷达错误:请重启车辆"), }, EventName.radarTempUnavailable: { - ET.SOFT_DISABLE: soft_disable_alert("Radar Temporarily Unavailable"), - ET.NO_ENTRY: NoEntryAlert("Radar Temporarily Unavailable"), + ET.SOFT_DISABLE: soft_disable_alert("雷达暂时不可用"), + ET.NO_ENTRY: NoEntryAlert("雷达暂时不可用"), }, # Every frame from the camera should be processed by the model. If modeld # is not processing frames fast enough they have to be dropped. This alert is # thrown when over 20% of frames are dropped. EventName.modeldLagging: { - ET.SOFT_DISABLE: soft_disable_alert("Driving Model Lagging"), - ET.NO_ENTRY: NoEntryAlert("Driving Model Lagging"), + ET.SOFT_DISABLE: soft_disable_alert("驾驶模型滞后"), + ET.NO_ENTRY: NoEntryAlert("驾驶模型滞后"), ET.PERMANENT: modeld_lagging_alert, }, @@ -711,45 +718,45 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { # usually means the model has trouble understanding the scene. This is used # as a heuristic to warn the driver. EventName.posenetInvalid: { - ET.SOFT_DISABLE: soft_disable_alert("Posenet Speed Invalid"), + ET.SOFT_DISABLE: soft_disable_alert("Posenet速度无效"), ET.NO_ENTRY: posenet_invalid_alert, }, # When the localizer detects an acceleration of more than 40 m/s^2 (~4G) we # alert the driver the device might have fallen from the windshield. EventName.deviceFalling: { - ET.SOFT_DISABLE: soft_disable_alert("Device Fell Off Mount"), - ET.NO_ENTRY: NoEntryAlert("Device Fell Off Mount"), + ET.SOFT_DISABLE: soft_disable_alert("设备从支架掉落"), + ET.NO_ENTRY: NoEntryAlert("设备从支架掉落"), }, EventName.lowMemory: { - ET.SOFT_DISABLE: soft_disable_alert("Low Memory: Reboot Your Device"), + ET.SOFT_DISABLE: soft_disable_alert("内存不足:请重启设备"), ET.PERMANENT: low_memory_alert, - ET.NO_ENTRY: NoEntryAlert("Low Memory: Reboot Your Device"), + ET.NO_ENTRY: NoEntryAlert("内存不足:请重启设备"), }, EventName.accFaulted: { - ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("Cruise Fault: Restart the Car"), - ET.PERMANENT: NormalPermanentAlert("Cruise Fault: Restart the car to engage"), - ET.NO_ENTRY: NoEntryAlert("Cruise Fault: Restart the Car"), + ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("巡航故障:请重启车辆"), + ET.PERMANENT: NormalPermanentAlert("巡航故障:重启车辆以启用"), + ET.NO_ENTRY: NoEntryAlert("巡航故障:请重启车辆"), }, EventName.espActive: { - ET.SOFT_DISABLE: soft_disable_alert("Electronic Stability Control Active"), - ET.NO_ENTRY: NoEntryAlert("Electronic Stability Control Active"), + ET.SOFT_DISABLE: soft_disable_alert("电子稳定控制系统激活中"), + ET.NO_ENTRY: NoEntryAlert("电子稳定控制系统激活中"), }, EventName.controlsMismatch: { - ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("Controls Mismatch"), - ET.NO_ENTRY: NoEntryAlert("Controls Mismatch"), + ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("控制不匹配"), + ET.NO_ENTRY: NoEntryAlert("控制不匹配"), }, # Sometimes the USB stack on the device can get into a bad state # causing the connection to the panda to be lost EventName.usbError: { - ET.SOFT_DISABLE: soft_disable_alert("USB Error: Reboot Your Device"), - ET.PERMANENT: NormalPermanentAlert("USB Error: Reboot Your Device"), - ET.NO_ENTRY: NoEntryAlert("USB Error: Reboot Your Device"), + ET.SOFT_DISABLE: soft_disable_alert("USB错误:请重启设备"), + ET.PERMANENT: NormalPermanentAlert("USB错误:请重启设备"), + ET.NO_ENTRY: NoEntryAlert("USB错误:请重启设备"), }, # This alert can be thrown for the following reasons: @@ -757,45 +764,45 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { # - CAN data is received, but some message are not received at the right frequency # If you're not writing a new car port, this is usually cause by faulty wiring EventName.canError: { - ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("CAN Error"), + ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("CAN总线错误"), ET.PERMANENT: Alert( - "CAN Error: Check Connections", + "CAN总线错误:请检查连接", "", AlertStatus.normal, AlertSize.small, Priority.LOW, VisualAlert.none, AudibleAlert.none, 1., creation_delay=1.), - ET.NO_ENTRY: NoEntryAlert("CAN Error: Check Connections"), + ET.NO_ENTRY: NoEntryAlert("CAN总线错误:请检查连接"), }, EventName.canBusMissing: { - ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("CAN Bus Disconnected"), + ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("CAN总线断开连接"), ET.PERMANENT: Alert( - "CAN Bus Disconnected: Likely Faulty Cable", + "CAN总线断开连接:可能电缆故障", "", AlertStatus.normal, AlertSize.small, Priority.LOW, VisualAlert.none, AudibleAlert.none, 1., creation_delay=1.), - ET.NO_ENTRY: NoEntryAlert("CAN Bus Disconnected: Check Connections"), + ET.NO_ENTRY: NoEntryAlert("CAN总线断开连接:请检查连接"), }, EventName.steerUnavailable: { - ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("LKAS Fault: Restart the Car"), - ET.PERMANENT: NormalPermanentAlert("LKAS Fault: Restart the car to engage"), - ET.NO_ENTRY: NoEntryAlert("LKAS Fault: Restart the Car"), + ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("LKAS故障:请重启车辆"), + ET.PERMANENT: NormalPermanentAlert("LKAS故障:重启车辆以启用"), + ET.NO_ENTRY: NoEntryAlert("LKAS故障:请重启车辆"), }, EventName.reverseGear: { ET.PERMANENT: Alert( - "Reverse\nGear", + "倒车中", "", AlertStatus.normal, AlertSize.full, Priority.LOWEST, VisualAlert.none, AudibleAlert.none, .2, creation_delay=0.5), - ET.USER_DISABLE: ImmediateDisableAlert("Reverse Gear"), - ET.NO_ENTRY: NoEntryAlert("Reverse Gear"), + ET.USER_DISABLE: ImmediateDisableAlert("倒档"), + ET.NO_ENTRY: NoEntryAlert("倒档"), }, # On cars that use stock ACC the car can decide to cancel ACC for various reasons. # When this happens we can no long control the car so the user needs to be warned immediately. EventName.cruiseDisabled: { - ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("Cruise Is Off"), + ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("巡航已关闭"), }, # When the relay in the harness box opens the CAN bus between the LKAS camera @@ -803,15 +810,15 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { # are received on the car side this usually means the relay hasn't opened correctly # and this alert is thrown. EventName.relayMalfunction: { - ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("Harness Relay Malfunction"), - ET.PERMANENT: NormalPermanentAlert("Harness Relay Malfunction", "Check Hardware"), - ET.NO_ENTRY: NoEntryAlert("Harness Relay Malfunction"), + ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("线束继电器故障"), + ET.PERMANENT: NormalPermanentAlert("线束继电器故障", "检查硬件"), + ET.NO_ENTRY: NoEntryAlert("线束继电器故障"), }, EventName.speedTooLow: { ET.IMMEDIATE_DISABLE: Alert( - "openpilot Canceled", - "Speed too low", + "openpilot已取消", + "速度过低", AlertStatus.normal, AlertSize.mid, Priority.HIGH, VisualAlert.none, AudibleAlert.disengage, 3.), }, @@ -819,17 +826,17 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { # When the car is driving faster than most cars in the training data, the model outputs can be unpredictable. EventName.speedTooHigh: { ET.WARNING: Alert( - "Speed Too High", - "Model uncertain at this speed", + "速度过高", + "在此速度下模型不稳定", AlertStatus.userPrompt, AlertSize.mid, Priority.HIGH, VisualAlert.steerRequired, AudibleAlert.promptRepeat, 4.), - ET.NO_ENTRY: NoEntryAlert("Slow down to engage"), + ET.NO_ENTRY: NoEntryAlert("减速以进行接合"), }, EventName.vehicleSensorsInvalid: { - ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("Vehicle Sensors Invalid"), - ET.PERMANENT: NormalPermanentAlert("Vehicle Sensors Calibrating", "Drive to Calibrate"), - ET.NO_ENTRY: NoEntryAlert("Vehicle Sensors Calibrating"), + ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("车辆传感器无效"), + ET.PERMANENT: NormalPermanentAlert("车辆传感器校准中", "行驶以校准"), + ET.NO_ENTRY: NoEntryAlert("车辆传感器校准中"), }, EventName.personalityChanged: { @@ -837,7 +844,7 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { }, EventName.userBookmark: { - ET.PERMANENT: NormalPermanentAlert("Bookmark Saved", duration=1.5), + ET.PERMANENT: NormalPermanentAlert("书签已保存", duration=1.5), }, EventName.audioFeedback: { diff --git a/selfdrive/selfdrived/selfdrived.py b/selfdrive/selfdrived/selfdrived.py index c56c7fe..c670322 100755 --- a/selfdrive/selfdrived/selfdrived.py +++ b/selfdrive/selfdrived/selfdrived.py @@ -22,7 +22,6 @@ from openpilot.selfdrive.selfdrived.state import StateMachine from openpilot.selfdrive.selfdrived.alertmanager import AlertManager, set_offroad_alert from openpilot.system.hardware import HARDWARE -from openpilot.system.version import get_build_metadata from openpilot.sunnypilot.mads.mads import ModularAssistiveDrivingSystem from openpilot.sunnypilot.selfdrive.car.car_specific import CarSpecificEventsSP @@ -51,9 +50,6 @@ class SelfdriveD(CruiseHelper): def __init__(self, CP=None, CP_SP=None): self.params = Params() - # Ensure the current branch is cached, otherwise the first cycle lags - build_metadata = get_build_metadata() - if CP is None: cloudlog.info("selfdrived is waiting for CarParams") self.CP = messaging.log_from_bytes(self.params.get("CarParams", block=True), car.CarParams) @@ -144,8 +140,7 @@ class SelfdriveD(CruiseHelper): self.ignored_processes.update({'mapd'}) # Determine startup event - is_remote = build_metadata.openpilot.comma_remote or build_metadata.openpilot.sunnypilot_remote - self.startup_event = EventName.startup if is_remote and build_metadata.tested_channel else EventName.startupMaster + self.startup_event = EventName.startup if not car_recognized: self.startup_event = EventName.startupNoCar elif car_recognized and self.CP.passive: diff --git a/selfdrive/ui/translations/auto_translate.py b/selfdrive/ui/translations/auto_translate.py index c2e4bbc..74bdd8f 100755 --- a/selfdrive/ui/translations/auto_translate.py +++ b/selfdrive/ui/translations/auto_translate.py @@ -12,7 +12,7 @@ import requests TRANSLATIONS_DIR = pathlib.Path(__file__).resolve().parent TRANSLATIONS_LANGUAGES = TRANSLATIONS_DIR / "languages.json" -OPENAI_MODEL = "gpt-4" +OPENAI_MODEL = "deepseek-chat" OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY") OPENAI_PROMPT = "You are a professional translator from English to {language} (ISO 639 language code). " + \ "The following sentence or word is in the GUI of a software called openpilot, translate it accordingly." @@ -36,7 +36,7 @@ def get_language_files(languages: list[str] = None) -> dict[str, pathlib.Path]: def translate_phrase(text: str, language: str) -> str: response = requests.post( - "https://api.openai.com/v1/chat/completions", + "https://api.deepseek.com/chat/completions", json={ "model": OPENAI_MODEL, "messages": [ @@ -96,6 +96,7 @@ def translate_file(path: pathlib.Path, language: str, all_: bool) -> None: f"LLM translation: {llm_translation}") translation.text = llm_translation + translation.set("type", f"{OPENAI_MODEL}") with path.open("w", encoding="utf-8") as fp: fp.write('\n' + diff --git a/selfdrive/ui/translations/main_th.qm b/selfdrive/ui/translations/main_th.qm index 7fb80b7..299a529 100644 Binary files a/selfdrive/ui/translations/main_th.qm and b/selfdrive/ui/translations/main_th.qm differ diff --git a/selfdrive/ui/translations/main_zh-CHS.ts b/selfdrive/ui/translations/main_zh-CHS.ts index 1f4db2d..83e3509 100644 --- a/selfdrive/ui/translations/main_zh-CHS.ts +++ b/selfdrive/ui/translations/main_zh-CHS.ts @@ -75,8 +75,8 @@ 输入密码 - for "%1" - 网络名称:"%1" + for "%1" + 网络名称:"%1" Prevent large data uploads when on a metered cellular connection @@ -107,47 +107,49 @@ AutoLaneChangeTimer Auto Lane Change by Blinker - + 通过转向灯自动变道 Set a timer to delay the auto lane change operation when the blinker is used. No nudge on the steering wheel is required to auto lane change if a timer is set. Default is Nudge. Please use caution when using this feature. Only use the blinker when traffic and road conditions permit. - + 设置定时器以在使用转向灯时延迟自动变道操作。若设置了定时器,无需轻推方向盘即可实现自动变道。默认设置为需轻推方向盘。 + +使用此功能时请务必谨慎。仅在交通和道路条件允许时使用转向灯。 s - + 系统消息:请提供需要翻译的英文内容。 Off - + 关闭 Nudge - + 轻推 Nudgeless - + 无需轻推 Brightness Brightness - + 亮度 Overrides the brightness of the device. - + 覆盖设备的亮度设置。 Auto (Dark) - + 自动(深色) Auto - + 自动 @@ -173,7 +175,7 @@ Please use caution when using this feature. Only use the blinker when traffic an You must accept the Terms and Conditions in order to use sunnypilot. - + 您必须接受条款与条件才能使用sunnypilot。 @@ -203,52 +205,53 @@ Please use caution when using this feature. Only use the blinker when traffic an ADB(Android调试桥接)允许通过USB或网络连接到您的设备。更多信息请参见 [https://docs.comma.ai/how-to/connect-to-comma](https://docs.comma.ai/how-to/connect-to-comma)。 - On this car, sunnypilot defaults to the car's built-in ACC instead of openpilot's longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha. - + On this car, sunnypilot defaults to the car's built-in ACC instead of openpilot's longitudinal control. Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha. + 在这款车型上,sunnypilot默认使用车辆自带的ACC系统,而非openpilot的纵向控制功能。启用此项可切换至openpilot纵向控制。建议在启用openpilot纵向控制测试版时,同时开启实验模式。 DeveloperPanelSP Show Advanced Controls - + 显示高级控制选项 Toggle visibility of advanced sunnypilot controls. This only toggles the visibility of the controls; it does not toggle the actual control enabled/disabled state. - + 切换高级SunnyPilot控制项的可见性。 +此操作仅切换控制项的显示状态,不会改变实际控制功能的启用或禁用状态。 Enable GitHub runner service - + 启用GitHub运行器服务 Enables or disables the github runner service. - + 启用或禁用GitHub运行器服务。 Enable Quickboot Mode - + 启用快速启动模式 Error Log - + 错误日志 VIEW - 查看 + 视图 View the error log for sunnypilot crashes. - + 查看sunnypilot崩溃的错误日志。 When toggled on, this creates a prebuilt file to allow accelerated boot times. When toggled off, it immediately removes the prebuilt file so compilation of locally edited cpp files can be made. <br><br><b>To edit C++ files locally on device, you MUST first turn off this toggle so the changes can recompile.</b> - + 启用此选项后,会生成预编译文件以加速启动过程。关闭时,系统将立即删除预编译文件,以便能够重新编译本地修改的C++文件。<br><br><b>若需在设备上本地编辑C++文件,必须首先关闭此选项,更改内容才能被重新编译。</b> - Quickboot mode requires updates to be disabled.<br>Enable 'Disable Updates' in the Software panel first. - + Quickboot mode requires updates to be disabled.<br>Enable 'Disable Updates' in the Software panel first. + 快速启动模式需要禁用更新功能。<br>请先在软件面板中启用“禁用更新”选项。 @@ -419,150 +422,172 @@ Steering lag calibration is complete. Review the rules, features, and limitations of sunnypilot - + sunnypilot 是一款基于开源自动驾驶系统 openpilot 的增强型分支,旨在提供更多定制化功能和优化体验。以下是其主要规则、功能与限制的概述: + +### 规则 +1. **安全第一**:始终将驾驶安全置于首位,系统仅为辅助工具,驾驶员需全程保持注意力。 +2. **合法使用**:遵守当地交通法规,仅在允许的区域和条件下启用辅助驾驶功能。 +3. **定期更新**:保持软件为最新版本,以获取功能改进和安全补丁。 + +### 主要功能 +1. **增强型自适应巡航控制(ACC)**:支持更平滑的加减速和更广的跟车范围。 +2. **车道居中辅助(LKA)优化**:提供更精准的车道保持能力,包括弯道辅助。 +3. **自定义驾驶模式**:允许用户调整跟车距离、转向灵敏度等参数。 +4. **交通标志识别支持**:部分版本可识别限速等标志并自动调整车速。 +5. **用户界面个性化**:可修改显示信息与提示音,提升交互体验。 + +### 限制 +1. **硬件依赖**:需兼容的车辆和硬件(如特定型号的行车记录仪或控制器)。 +2. **非全自动驾驶**:无法处理所有道路场景(如复杂交叉路口或施工区域)。 +3. **天气与能见度影响**:恶劣天气(如大雨、浓雾)可能降低系统性能。 +4. **责任归属**:用户对驾驶行为负全部责任,开发者不承担事故相关法律风险。 +5. **兼容性局限**:并非支持所有车型,需查阅官方列表确认适配情况。 + +建议通过官方社区或文档获取详细操作指南和最新动态。 sunnypilot requires the device to be mounted within 4° left or right and within 5° up or 9° down. - + sunnypilot要求设备安装时左右偏差不超过4°,上下偏差不超过5°上或9°下。 DevicePanelSP Quiet Mode - + 静音模式 Driver Camera Preview - + 驾驶员摄像头预览 Training Guide - + 培训指南 Regulatory - 监管信息 + 合规性 Language - + 语言 Reset Settings - + 重置设置 Are you sure you want to review the training guide? - 您确定要查看新手指南吗? + 您确定要查看培训指南吗? Review - 预览 + 审核 Select a language - 选择语言 + 选择语言 Wake-Up Behavior - + 唤醒行为 Interactivity Timeout - + 交互超时 Apply a custom timeout for settings UI. This is the time after which settings UI closes automatically if user is not interacting with the screen. - + 为设置界面应用自定义超时时间。 +此时间设定后,若用户未与屏幕交互,设置界面将自动关闭。 Reboot - 重启 + 重启 Power Off - 关机 + 关机 Offroad Mode - + 越野模式 Are you sure you want to exit Always Offroad mode? - + 您确定要退出“始终越野”模式吗? Confirm - + 确认 Are you sure you want to enter Always Offroad mode? - + 您确定要进入“始终越野”模式吗? Disengage to Enter Always Offroad Mode - + 解除以进入始终越野模式 Are you sure you want to reset all sunnypilot settings to default? Once the settings are reset, there is no going back. - + 您确定要将所有sunnypilot设置重置为默认值吗?一旦重置设置,将无法恢复。 Reset - 重置 + 重置 The reset cannot be undone. You have been warned. - + 重置操作无法撤销。您已被警告。 Exit Always Offroad - + 始终禁止退出越野模式 Always Offroad - + 始终越野 ⁍ Default: Device will boot/wake-up normally & will be ready to engage. - + ⁍ 默认:设备将正常启动/唤醒,并准备就绪以启用。 ⁍ Offroad: Device will be in Always Offroad mode after boot/wake-up. - + ⁍ 越野模式:设备在启动/唤醒后将始终处于越野模式。 Controls state of the device after boot/sleep. - + 控制设备在启动/休眠后的状态。 DriveStats Drives - + 驾驶 Hours - + 小时 ALL TIME - + 总时间 PAST WEEK - + 过去一周 KM - + 公里 Miles - + 英里 @@ -576,15 +601,15 @@ This is the time after which settings UI closes automatically if user is not int ExitOffroadButton Are you sure you want to exit Always Offroad mode? - + 您确定要退出始终越野模式吗? Confirm - + 确认 EXIT ALWAYS OFFROAD MODE - + 始终退出越野模式 @@ -615,8 +640,8 @@ This is the time after which settings UI closes automatically if user is not int - <span stylesheet='font-size: 60px; font-weight: bold; color: #e74c3c;'>INACTIVE</span>: connect to an unmetered network - <span stylesheet='font-size: 60px; font-weight: bold; color: #e74c3c;'>闲置</span>:请连接到不限流量的网络 + <span stylesheet='font-size: 60px; font-weight: bold; color: #e74c3c;'>INACTIVE</span>: connect to an unmetered network + <span stylesheet='font-size: 60px; font-weight: bold; color: #e74c3c;'>闲置</span>:请连接到不限流量的网络 Firehose Mode @@ -625,12 +650,14 @@ This is the time after which settings UI closes automatically if user is not int sunnypilot learns to drive by watching humans, like you, drive. -Firehose Mode allows you to maximize your training data uploads to improve openpilot's driving models. More data means bigger models, which means better Experimental Mode. - +Firehose Mode allows you to maximize your training data uploads to improve openpilot's driving models. More data means bigger models, which means better Experimental Mode. + sunnypilot通过观察像您这样的人类驾驶来学习驾驶。 + +Firehose模式让您能够最大化训练数据的上传,以改进openpilot的驾驶模型。更多数据意味着更大的模型,也意味着更出色的实验模式。 - For maximum effectiveness, bring your device inside and connect to a good USB-C adapter and Wi-Fi weekly.<br><br>Firehose Mode can also work while you're driving if connected to a hotspot or unlimited SIM card.<br><br><br><b>Frequently Asked Questions</b><br><br><i>Does it matter how or where I drive?</i> Nope, just drive as you normally would.<br><br><i>Do all of my segments get pulled in Firehose Mode?</i> No, we selectively pull a subset of your segments.<br><br><i>What's a good USB-C adapter?</i> Any fast phone or laptop charger should be fine.<br><br><i>Does it matter which software I run?</i> Yes, only upstream sunnypilot (and particular forks) are able to be used for training. - + For maximum effectiveness, bring your device inside and connect to a good USB-C adapter and Wi-Fi weekly.<br><br>Firehose Mode can also work while you're driving if connected to a hotspot or unlimited SIM card.<br><br><br><b>Frequently Asked Questions</b><br><br><i>Does it matter how or where I drive?</i> Nope, just drive as you normally would.<br><br><i>Do all of my segments get pulled in Firehose Mode?</i> No, we selectively pull a subset of your segments.<br><br><i>What's a good USB-C adapter?</i> Any fast phone or laptop charger should be fine.<br><br><i>Does it matter which software I run?</i> Yes, only upstream sunnypilot (and particular forks) are able to be used for training. + 为了达到最佳效果,请每周将设备带入室内,并连接优质的USB-C适配器和Wi-Fi。<br><br>若连接到热点或无限流量SIM卡,Firehose模式在驾驶时也可使用。<br><br><br><b>常见问题解答</b><br><br><i>驾驶方式或地点有影响吗?</i> 没有影响,按您平时的驾驶习惯即可。<br><br><i>Firehose模式下会提取所有行程片段吗?</i> 不会,我们仅选择性提取部分行程片段。<br><br><i>什么是好的USB-C适配器?</i> 任何快速手机或笔记本电脑充电器均可使用。<br><br><i>运行的软件有要求吗?</i> 是的,仅上游sunnypilot(及特定分支版本)可用于训练。 @@ -652,43 +679,43 @@ Firehose Mode allows you to maximize your training data uploads to improve openp HyundaiSettings Off - + 关闭 Dynamic - + 动态 Predictive - + 预测性 Custom Longitudinal Tuning - + 自定义纵向调校 This feature can only be used with openpilot longitudinal control enabled. - + 此功能仅在启用 openpilot 纵向控制时可用。 - Enable "Always Offroad" in Device panel, or turn vehicle off to select an option. - + Enable "Always Offroad" in Device panel, or turn vehicle off to select an option. + 在设备面板中启用“始终越野”模式,或关闭车辆以选择选项。 Off: Uses default tuning - + 关闭:使用默认调校 Dynamic: Adjusts acceleration limits based on current speed - + 动态:根据当前速度调整加速度限制 Predictive: Uses future trajectory data to anticipate needed adjustments - + 预测性:利用未来轨迹数据预测所需调整 Fine-tune your driving experience by adjusting acceleration smoothness with openpilot longitudinal control. - + 通过调整openpilot纵向控制中的加速平顺性,优化您的驾驶体验。 @@ -708,339 +735,340 @@ Firehose Mode allows you to maximize your training data uploads to improve openp LaneChangeSettings Back - 返回 + 返回 Auto Lane Change: Delay with Blind Spot - + 自动车道变更:盲点检测延迟 Toggle to enable a delay timer for seamless lane changes when blind spot monitoring (BSM) detects a obstructing vehicle, ensuring safe maneuvering. - + 切换以启用盲点监测(BSM)检测到障碍车辆时的无缝变道延迟计时器,确保安全操控。 LateralPanel Modular Assistive Driving System (MADS) - + 模块化辅助驾驶系统(MADS) Enable the beloved MADS feature. Disable toggle to revert back to stock sunnypilot engagement/disengagement. - + 启用备受喜爱的MADS功能。禁用切换以恢复至默认sunnypilot接管/退出模式。 Customize MADS - + 自定义MADS Customize Lane Change - + 自定义车道变更 Pause Lateral Control with Blinker - + 使用转向灯暂停横向控制 Pause lateral control with blinker when traveling below the desired speed selected. - + 当行驶速度低于所选期望速度时,使用转向灯暂停横向控制。 Enables independent engagements of Automatic Lane Centering (ALC) and Adaptive Cruise Control (ACC). - + 允许独立启用自动车道居中(ALC)和自适应巡航控制(ACC)。 Start the vehicle to check vehicle compatibility. - + 启动车辆以检查车辆兼容性。 This platform supports all MADS settings. - + 该平台支持所有MADS设置。 This platform supports limited MADS settings. - + 该平台支持的MADS设置有限。 LongitudinalPanel Custom ACC Speed Increments - + 自定义自适应巡航速度增量 Enable custom Short & Long press increments for cruise speed increase/decrease. - + 启用自定义短按与长按增量以调整巡航速度增减。 This feature can only be used with openpilot longitudinal control enabled. - + 此功能仅在启用 openpilot 纵向控制时可用。 This feature is not supported on this platform due to vehicle limitations. - + 由于车辆限制,此功能在此平台上不受支持。 Start the vehicle to check vehicle compatibility. - + 启动车辆以检查车辆兼容性。 MadsSettings Toggle with Main Cruise - + 与主巡航切换 Unified Engagement Mode (UEM) - + 统一接合模式 (UEM) Steering Mode on Brake Pedal - + 刹车踏板转向模式 Note: For vehicles without LFA/LKAS button, disabling this will prevent lateral control engagement. - + 注意:对于没有LFA/LKAS按钮的车辆,禁用此功能将阻止横向控制启动。 Engage lateral and longitudinal control with cruise control engagement. - + 启用巡航控制以启动横向和纵向控制。 Note: Once lateral control is engaged via UEM, it will remain engaged until it is manually disabled via the MADS button or car shut off. - + 注意:一旦通过UEM启动横向控制,该功能将持续保持启用状态,直至通过MADS按钮手动关闭或车辆熄火。 Start the vehicle to check vehicle compatibility. - + 启动车辆以检查车辆兼容性。 This feature defaults to OFF, and does not allow selection due to vehicle limitations. - + 此功能默认设置为关闭,且因车辆限制无法进行选择。 This feature defaults to ON, and does not allow selection due to vehicle limitations. - + 此功能默认开启,由于车辆限制,不允许进行选择。 This platform only supports Disengage mode due to vehicle limitations. - + 由于车辆限制,本平台仅支持解除模式。 Remain Active - + 保持激活 Remain Active: ALC will remain active when the brake pedal is pressed. - + 保持激活状态:当踩下刹车踏板时,ALC(主动车道居中)将保持激活。 Pause - + 暂停 Pause: ALC will pause when the brake pedal is pressed. - + 暂停:当踩下刹车踏板时,自动车道居中(ALC)将暂停工作。 Disengage - + 解除控制 Disengage: ALC will disengage when the brake pedal is pressed. - + 解除:当踩下刹车踏板时,自动车道居中功能将解除。 Choose how Automatic Lane Centering (ALC) behaves after the brake pedal is manually pressed in sunnypilot. - + 选择在sunnypilot中手动踩下刹车踏板后自动车道居中(ALC)的行为方式。 MaxTimeOffroad Max Time Offroad - + 最长离线时间 Device will automatically shutdown after set time once the engine is turned off.<br/>(30h is the default) - + 设备将在发动机熄火后,按设定时间自动关闭。<br/>(默认时间为30小时) Always On - + 始终开启 h - + 您好!请问有什么可以帮您翻译的吗? m - + 嗯?您只发了一个“m”,是想让我翻译什么呢?请提供需要翻译的英文内容,我会尽力帮您准确翻译成中文。 (default) - + (默认) ModelsPanel Current Model - + 当前模型 SELECT - 选择 + 选择 Clear Model Cache - + 清除模型缓存 CLEAR - + 清除 Driving Model - + 驾驶模型 Navigation Model - + 导航模型 Vision Model - + 视觉模型 Policy Model - + 策略模型 Live Learning Steer Delay - + 实时学习转向延迟 Adjust Software Delay - + 调整软件延迟 Adjust the software delay when Live Learning Steer Delay is toggled off. The default software delay value is 0.2 - + 当“实时学习转向延迟”关闭时,调整软件延迟。 +默认软件延迟值为0.2秒。 %1 - %2 - + %1 - %2 downloaded - + 已下载 ready - + 准备就绪 from cache - + 来自缓存 download failed - %1 - + 下载失败 - %1 pending - %1 - + 待处理 - %1 Fetching models... - + 正在获取模型... Select a Model - + 选择型号 Default - + 默认 Model download has started in the background. - + 模型下载已在后台开始。 We STRONGLY suggest you to reset calibration. - + 我们强烈建议您重置校准。 Would you like to do that now? - + 你现在要执行这个操作吗? Reset Calibration - 重置设备校准 + 重置校准 Driving Model Selector - + 驾驶模式选择器 This will delete ALL downloaded models from the cache<br/><u>except the currently active model</u>.<br/><br/>Are you sure you want to continue? - + 这将删除缓存中<u>除当前活动模型外</u>的所有已下载模型。<br/><br/>确定要继续吗? Clear Cache - + 清除缓存 Warning: You are on a metered connection! - + 警告:您正在使用按流量计费的连接! Continue - 继续 + 继续 on Metered - + 按流量计费 Cancel - 取消 + 取消 Refresh Model List - + 刷新模型列表 REFRESH - + 刷新 Fetching Latest Models - + 正在获取最新模型 Enable this for the car to learn and adapt its steering response time. Disable to use a fixed steering response time. Keeping this on provides the stock openpilot experience. - + 开启此功能,车辆将学习并调整其转向响应时间;关闭则使用固定转向响应时间。保持开启可获得原汁原味的openpilot体验。 Live Steer Delay: - + 实时转向延迟: Actuator Delay: - + 执行器延迟: Software Delay: - + 软件延迟: Total Delay: - + 总延迟: @@ -1065,8 +1093,8 @@ The default software delay value is 0.2 输入密码 - for "%1" - 网络名称:"%1" + for "%1" + 网络名称:"%1" Wrong password @@ -1077,70 +1105,70 @@ The default software delay value is 0.2 NetworkingSP Scan - + 扫描 Scanning... - + 扫描中... NeuralNetworkLateralControl Neural Network Lateral Control (NNLC) - + 神经网络横向控制(NNLC) NNLC is currently not available on this platform. - + NNLC 当前在此平台上不可用。 Start the car to check car compatibility - + 启动车辆以检查车辆兼容性 NNLC Not Loaded - + 神经网络车道控制器未加载 NNLC Loaded - + NNLC 已加载 Match - + 匹配 Exact - + 精确 Fuzzy - + 模糊 - Match: "Exact" is ideal, but "Fuzzy" is fine too. - + Match: "Exact" is ideal, but "Fuzzy" is fine too. + 匹配:"精确" 是最佳选择,但"模糊"也可以接受。 - Formerly known as <b>"NNFF"</b>, this replaces the lateral <b>"torque"</b> controller, with one using a neural network trained on each car's (actually, each separate EPS firmware) driving data for increased controls accuracy. - + Formerly known as <b>"NNFF"</b>, this replaces the lateral <b>"torque"</b> controller, with one using a neural network trained on each car's (actually, each separate EPS firmware) driving data for increased controls accuracy. + 此前被称为<b>"NNFF"</b>,它取代了横向<b>"扭矩"</b>控制器,采用基于每款车型(实际上是每个独立的EPS固件)驾驶数据训练的神经网络,以提升控制精度。 Reach out to the sunnypilot team in the following channel at the sunnypilot Discord server - + 在sunnypilot Discord服务器的以下频道中联系sunnypilot团队 with feedback, or to provide log data for your car if your car is currently unsupported: - + 如有反馈,或您的车辆目前不受支持,需要提供车辆日志数据: if there are any issues: - + 如有任何问题: and donate logs to get NNLC loaded for your car: - + 并捐赠日志以获取适用于您车辆的NNLC加载: @@ -1152,11 +1180,11 @@ The default software delay value is 0.2 %1 - Taking camera snapshots. System won't start until finished. + Taking camera snapshots. System won't start until finished. 正在使用相机拍摄中。在完成之前,系统将无法启动。 - An update to your device's operating system is downloading in the background. You will be prompted to update when it's ready to install. + An update to your device's operating system is downloading in the background. You will be prompted to update when it's ready to install. 一个针对您设备的操作系统更新正在后台下载中。当更新准备好安装时,您将收到提示进行更新。 @@ -1173,37 +1201,39 @@ The default software delay value is 0.2 Acknowledge Excessive Actuation - + 确认过度操作 Snooze Update - 暂停更新 + 暂停更新 - openpilot detected excessive %1 actuation on your last drive. Please contact support at https://comma.ai/support and share your device's Dongle ID for troubleshooting. - + openpilot detected excessive %1 actuation on your last drive. Please contact support at https://comma.ai/support and share your device's Dongle ID for troubleshooting. + openpilot 检测到您上次驾驶中 %1 的作动过度。请联系技术支持 https://comma.ai/support 并提供您设备的 Dongle ID 以便进行故障排查。 - Immediately connect to the internet to check for updates. If you do not connect to the internet, sunnypilot won't engage in %1 - + Immediately connect to the internet to check for updates. If you do not connect to the internet, sunnypilot won't engage in %1 + 请立即连接互联网以检查更新。如果未连接互联网,sunnypilot 将不会在 %1 中启用。 - Connect to internet to check for updates. sunnypilot won't automatically start until it connects to internet to check for updates. - + Connect to internet to check for updates. sunnypilot won't automatically start until it connects to internet to check for updates. + 连接到互联网以检查更新。sunnypilot 在连接到互联网检查更新之前不会自动启动。 sunnypilot was unable to identify your car. Your car is either unsupported or its ECUs are not recognized. Please submit a pull request to add the firmware versions to the proper vehicle. Need help? Join discord.comma.ai. - + sunnypilot 无法识别您的车辆。您的车辆可能不受支持或其电子控制单元(ECU)未被识别。请提交拉取请求,将固件版本添加到相应的车辆配置中。需要帮助?请加入 discord.comma.ai。 - sunnypilot detected a change in the device's mounting position. Ensure the device is fully seated in the mount and the mount is firmly secured to the windshield. - + sunnypilot detected a change in the device's mounting position. Ensure the device is fully seated in the mount and the mount is firmly secured to the windshield. + sunnypilot检测到设备安装位置发生变化。请确保设备完全嵌入支架,且支架牢固固定在挡风玻璃上。 OpenStreetMap database is out of date. New maps must be downloaded if you wish to continue using OpenStreetMap data for Enhanced Speed Control and road name display. %1 - + OpenStreetMap数据库已过时。如果您希望继续使用OpenStreetMap数据以实现增强型速度控制和道路名称显示功能,必须下载新的地图数据。 + +%1 @@ -1225,7 +1255,7 @@ The default software delay value is 0.2 OffroadHomeSP ALWAYS OFFROAD ACTIVE - + 始终开启越野模式 @@ -1248,138 +1278,140 @@ The default software delay value is 0.2 sunnypilot Unavailable - + 阳光驾驶助手 不可用 OsmPanel Mapd Version - + 地图版本 Offline Maps ETA - + 离线地图预计到达时间 Time Elapsed - + 已用时间 Downloaded Maps - + 已下载地图 DELETE - + 删除 This will delete ALL downloaded maps Are you sure you want to delete all the maps? - + 这将删除所有已下载的地图 + +您确定要删除所有地图吗? Yes, delete all the maps. - + 是的,删除所有地图。 Database Update - + 数据库更新 CHECK - 查看 + 检查 Country - + 国家 SELECT - 选择 + 选择 Fetching Country list... - + 正在获取国家列表... State - + 状态 Fetching State list... - + 正在获取状态列表... All - + 全部 REFRESH - + 刷新 UPDATE - 更新 + 更新 Download starting... - + 下载开始... Error: Invalid download. Retry. - + 错误:下载无效。请重试。 Download complete! - + 下载完成! Warning: You are on a metered connection! - + 警告:您正在使用计量连接! This will start the download process and it might take a while to complete. - + 这将开始下载过程,可能需要一段时间才能完成。 Continue on Metered - + 按计费继续 Start Download - + 开始下载 m - + s - + 系统消息:请提供需要翻译的英文内容。 Calculating... - + 计算中... Downloaded - + 已下载 Calculating ETA... - + 正在计算预计到达时间... Ready - + 就绪 Time remaining: - + 剩余时间: @@ -1393,7 +1425,7 @@ Warning: You are on a metered connection! 在手机上访问 https://connect.comma.ai - Click "add new device" and scan the QR code on the right + Click "add new device" and scan the QR code on the right 点击“添加新设备”,扫描右侧二维码 @@ -1420,90 +1452,90 @@ Warning: You are on a metered connection! ParamControlSP Enable - 启用 + 启用 Cancel - 取消 + 取消 PlatformSelector Vehicle - + 车辆 SEARCH - + 搜索 Search your vehicle - + 搜索您的车辆 Enter model year (e.g., 2021) and model name (Toyota Corolla): - + 请输入车型年份(例如:2021)和车型名称(丰田卡罗拉): SEARCHING - + 正在搜索 REMOVE - 删除 + 移除 This setting will take effect immediately. - + 此设置将立即生效。 This setting will take effect once the device enters offroad state. - + 该设置将在设备进入脱机状态后生效。 Vehicle Selector - + 车辆选择器 Confirm - + 确认 Cancel - 取消 + 取消 No vehicles found for query: %1 - + 未找到符合查询条件的车辆:%1 Select a vehicle - + 选择车辆 Unrecognized Vehicle - + 无法识别的车辆 Fingerprinted automatically - + 已自动识别指纹 Manually selected - + 手动选择 Not fingerprinted or manually selected - + 未进行指纹识别或手动选择 Select vehicle to force fingerprint manually. - + 选择车辆以手动强制指纹识别。 Colors represent fingerprint status: - + 颜色代表指纹状态: @@ -1574,7 +1606,7 @@ Warning: You are on a metered connection! sunnypilot - + 阳光领航员 @@ -1612,63 +1644,63 @@ Warning: You are on a metered connection! SettingsWindowSP × - × + × Device - 设备 + 设备 Network - 网络 + 网络 sunnylink - + 阳光链接 Toggles - 设定 + 切换 Software - 软件 + 软件 Models - + 模型 Steering - + 转向 Cruise - + 巡航 Visuals - + 视觉界面 OSM - + 开放式地图系统 Trips - + 行程 Vehicle - + 车辆 Firehose - Firehose + 火线 Developer - 开发人员 + 开发者 @@ -1765,27 +1797,27 @@ Warning: You are on a metered connection! SidebarSP DISABLED - + 已禁用 OFFLINE - 离线 + 离线 REGIST... - + 注册中... ONLINE - 在线 + 在线 ERROR - 连接出错 + 错误 SUNNYLINK - + 阳光链接 @@ -1867,43 +1899,43 @@ Warning: You are on a metered connection! SoftwarePanelSP Search Branch - + 搜索分支 Enter search keywords, or leave blank to list all branches. - + 输入搜索关键词,或留空以列出所有分支。 Disable Updates - + 禁用更新 When enabled, software updates will be disabled. <b>This requires a reboot to take effect.</b> - + 启用后,软件更新将被禁用。<b>此操作需要重启才能生效。</b> No branches found for keywords: %1 - + 未找到与关键词“%1”相关的分支。 Select a branch - 选择分支 + 选择一个分支 %1 updates requires a reboot.<br>Reboot now? - + %1 个更新需要重启系统。<br>现在重启吗? Reboot - 重启 + 重启 When enabled, software updates will be disabled.<br><b>This requires a reboot to take effect.</b> - + 启用后,软件更新将被禁用。<br><b>此操作需要重启才能生效。</b> Please enable always offroad mode or turn off vehicle to adjust these toggles - + 请启用始终越野模式或关闭车辆以调整这些开关。 @@ -1933,7 +1965,7 @@ Warning: You are on a metered connection! 删除 - Username '%1' has no keys on GitHub + Username '%1' has no keys on GitHub 用户名“%1”在GitHub上没有密钥 @@ -1941,7 +1973,7 @@ Warning: You are on a metered connection! 请求超时 - Username '%1' doesn't exist on GitHub + Username '%1' doesn't exist on GitHub GitHub上不存在用户名“%1” @@ -1956,186 +1988,186 @@ Warning: You are on a metered connection! SunnylinkPanel This is the master switch, it will allow you to cutoff any sunnylink requests should you want to do that. - + 这是主控开关,它能让您在需要时切断所有Sunnylink请求。 Enable sunnylink - + 启用阳光链接 Sponsor Status - + 赞助状态 SPONSOR - + 赞助商 Become a sponsor of sunnypilot to get early access to sunnylink features when they become available. - + 成为sunnypilot的赞助者,即可在sunnylink功能推出时抢先体验。 Pair GitHub Account - + 关联GitHub账户 PAIR - 配对 + 配对 Pair your GitHub account to grant your device sponsor benefits, including API access on sunnylink. - + 将您的 GitHub 账户配对,以授予您的设备赞助者权益,包括在 SunnyLink 上的 API 访问权限。 N/A - N/A + 无输入内容 sunnylink Dongle ID not found. This may be due to weak internet connection or sunnylink registration issue. Please reboot and try again. - + Sunnylink Dongle ID 未找到。可能是由于网络信号弱或 Sunnylink 注册问题导致。请重启设备后重试。 - 🎉Welcome back! We're excited to see you've enabled sunnylink again! 🚀 - + 🎉Welcome back! We're excited to see you've enabled sunnylink again! 🚀 + 🎉欢迎回来!很高兴看到您再次启用了Sunnylink!🚀 - 👋Not going to lie, it's sad to see you disabled sunnylink 😢, but we'll be here when you're ready to come back 🎉. - + 👋Not going to lie, it's sad to see you disabled sunnylink 😢, but we'll be here when you're ready to come back 🎉. + 说实话,看到你停用Sunnylink确实有点难过😢,但我们随时欢迎你回来🎉。 Backup Settings - + 备份设置 Are you sure you want to backup sunnypilot settings? - + 您确定要备份sunnypilot设置吗? Back Up - + 备份 Restore Settings - + 恢复设置 Are you sure you want to restore the last backed up sunnypilot settings? - + 您确定要恢复上次备份的sunnypilot设置吗? Restore - + 恢复 Backup in progress %1% - + 备份进行中 %1% Backup Failed - + 备份失败 Settings backup completed. - + 设置备份已完成。 Restore in progress %1% - + 恢复进行中 %1% Restore Failed - + 恢复失败 Unable to restore the settings, try again later. - + 无法恢复设置,请稍后再试。 Settings restored. Confirm to restart the interface. - + 设置已恢复。确认重启界面。 Device ID - + 设备ID THANKS ♥ - + 谢谢 ♥ Not Sponsor - + 非赞助 Paired - + 已配对 Not Paired - + 未配对 Enable sunnylink uploader to allow sunnypilot to upload your driving data to sunnypilot servers. (only for highest tiers, and does NOT bring ANY benefit to you. We are just testing data volume.) - + 启用Sunnylink上传器,允许Sunnypilot将您的驾驶数据上传至Sunnypilot服务器。(仅限最高等级用户,且不会为您带来任何益处。我们仅在进行数据量测试。) - [Don't use] Enable sunnylink uploader - + [Don't use] Enable sunnylink uploader + [请勿使用] 启用阳光链接上传器 🚀 sunnylink 🚀 - + 🚀 阳光链接 🚀 For secure backup, restore, and remote configuration - + 用于安全备份、恢复及远程配置 - Sponsorship isn't required for basic backup/restore - + Sponsorship isn't required for basic backup/restore + 基本备份/恢复无需赞助 Click the sponsor button for more details - + 点击赞助按钮了解更多详情 SunnylinkSponsorPopup Scan the QR code to login to your GitHub account - + 扫描二维码以登录您的GitHub账户 Follow the prompts to complete the pairing process - + 按照提示完成配对过程。 - Re-enter the "sunnylink" panel to verify sponsorship status - + Re-enter the "sunnylink" panel to verify sponsorship status + 重新进入“阳光链接”面板以验证赞助状态 If sponsorship status was not updated, please contact a moderator on Discord at https://discord.gg/sunnypilot - + 如果赞助状态未更新,请通过 Discord 联系管理员,网址为 https://discord.gg/sunnypilot。 - Scan the QR code to visit sunnyhaibin's GitHub Sponsors page - + Scan the QR code to visit sunnyhaibin's GitHub Sponsors page + 扫描二维码访问sunnyhaibin的GitHub赞助页面 Choose your sponsorship tier and confirm your support - + 选择您的赞助等级并确认您的支持 Join our community on Discord at https://discord.gg/sunnypilot and reach out to a moderator to confirm your sponsor status - + 加入我们的 Discord 社区:https://discord.gg/sunnypilot,联系管理员确认您的赞助者身份。 Pair your GitHub account - + 关联您的GitHub账户 Early Access: Become a sunnypilot Sponsor - + 早期体验:成为sunnypilot赞助者 @@ -2150,11 +2182,11 @@ Warning: You are on a metered connection! Welcome to sunnypilot - + 欢迎使用sunnypilot - You must accept the Terms and Conditions to use sunnypilot. Read the latest terms at <span style='color: #465BEA;'>https://comma.ai/terms</span> before continuing. - + You must accept the Terms and Conditions to use sunnypilot. Read the latest terms at <span style='color: #465BEA;'>https://comma.ai/terms</span> before continuing. + 您必须接受条款和条件才能使用sunnypilot。请在继续之前阅读最新条款:<span style='color: #465BEA;'>https://comma.ai/terms</span>。 @@ -2196,7 +2228,7 @@ Warning: You are on a metered connection! 新驾驶视角 - Experimental mode is currently unavailable on this car since the car's stock ACC is used for longitudinal control. + Experimental mode is currently unavailable on this car since the car's stock ACC is used for longitudinal control. 由于此车辆使用自带的ACC纵向控制,当前无法使用试验模式。 @@ -2245,101 +2277,101 @@ Warning: You are on a metered connection! Enable sunnypilot - + 启用SunnyPilot Use the sunnypilot system for adaptive cruise control and lane keep driver assistance. Your attention is required at all times to use this feature. - + 使用sunnypilot系统进行自适应巡航控制和车道保持辅助驾驶。使用此功能时需始终保持注意力。 Enable Dynamic Experimental Control - + 启用动态实验控制 Enable toggle to allow the model to determine when to use sunnypilot ACC or sunnypilot End to End Longitudinal. - + 启用切换开关,让模型决定何时使用sunnypilot自适应巡航控制或sunnypilot端到端纵向控制。 When enabled, pressing the accelerator pedal will disengage sunnypilot. - + 当启用时,按下加速踏板将解除sunnypilot。 Enable driver monitoring even when sunnypilot is not engaged. - + 即使SunnyPilot未启动,也启用驾驶员监控。 Standard is recommended. In aggressive mode, sunnypilot will follow lead cars closer and be more aggressive with the gas and brake. In relaxed mode sunnypilot will stay further away from lead cars. On supported cars, you can cycle through these personalities with your steering wheel distance button. - + 标准模式为推荐设置。在激进模式下,sunnypilot会以更近的距离跟随前车,并对油门和刹车采取更积极的操控。在舒缓模式下,sunnypilot会与前车保持更远的距离。在支持的车辆上,您可以通过方向盘上的跟车距离按钮循环切换这些驾驶模式。 - sunnypilot defaults to driving in <b>chill mode</b>. Experimental mode enables <b>alpha-level features</b> that aren't ready for chill mode. Experimental features are listed below: - + sunnypilot defaults to driving in <b>chill mode</b>. Experimental mode enables <b>alpha-level features</b> that aren't ready for chill mode. Experimental features are listed below: + sunnypilot 默认以<b>轻松模式</b>进行驾驶。实验模式则启用<b>处于测试阶段的功能</b>,这些功能尚未在轻松模式下就绪。以下是实验性功能的列表: Let the driving model control the gas and brakes. sunnypilot will drive as it thinks a human would, including stopping for red lights and stop signs. Since the driving model decides the speed to drive, the set speed will only act as an upper bound. This is an alpha quality feature; mistakes should be expected. - + 让驾驶模型控制油门与刹车。sunnypilot将模拟人类驾驶行为,包括在红灯和停车标志前制动。由于驾驶模型自主决定行驶速度,设定速度仅作为上限参考。此为Alpha测试阶段功能,可能出现操作偏差。 An alpha version of sunnypilot longitudinal control can be tested, along with Experimental mode, on non-release branches. - + 可以在非发布分支上测试sunnypilot纵向控制的alpha版本,同时也可以体验实验模式。 Enable the sunnypilot longitudinal control (alpha) toggle to allow Experimental mode. - + 启用sunnypilot纵向控制(测试版)开关以启用实验模式。 TreeOptionDialog Select - 选择 + 选择 Cancel - 取消 + 取消 VisualsPanel Show Blind Spot Warnings - + 显示盲点警告 Enabling this will display warnings when a vehicle is detected in your blind spot as long as your car has BSM supported. - + 启用此功能后,只要您的车辆支持盲点监测系统(BSM),当检测到盲区有车辆时就会显示警告。 Changing this setting will restart openpilot if the car is powered on. - 如果车辆已通电,更改此设置将会重新启动 openpilot。 + 更改此设置后,若车辆处于通电状态,将重启openpilot系统。 Off - + 关闭 Distance - + 距离 Speed - + 速度 Time - + 时间 All - + 全部 Display Metrics Below Chevron - + 在V形标志下方显示指标 Display useful metrics below the chevron that tracks the lead car (only applicable to cars with openpilot longitudinal control). - + 在跟踪前导车辆的箭头下方显示有用的指标(仅适用于配备openpilot纵向控制的车辆)。 @@ -2349,12 +2381,12 @@ Warning: You are on a metered connection! 开启 - Maximize your training data uploads to improve openpilot's driving models. + Maximize your training data uploads to improve openpilot's driving models. 最大化您的训练数据上传,以改善 openpilot 的驾驶模型。 - <span style='font-family: "Noto Color Emoji";'>🔥</span> Firehose Mode <span style='font-family: Noto Color Emoji;'>🔥</span> - <span style='font-family: "Noto Color Emoji";'>🔥</span> Firehose 模式 <span style='font-family: Noto Color Emoji;'>🔥</span> + <span style='font-family: "Noto Color Emoji";'>🔥</span> Firehose Mode <span style='font-family: Noto Color Emoji;'>🔥</span> + <span style='font-family: "Noto Color Emoji";'>🔥</span> Firehose 模式 <span style='font-family: Noto Color Emoji;'>🔥</span> @@ -2372,12 +2404,12 @@ Warning: You are on a metered connection! 忽略 - Forget Wi-Fi Network "%1"? - 忽略WiFi网络 "%1"? + Forget Wi-Fi Network "%1"? + 忽略WiFi网络 "%1"? Forget 忽略 - + \ No newline at end of file diff --git a/sunnypilot/neural_network_data/neural_network_lateral_control/TOYOTA_WILDLANDER_PHEV.json b/sunnypilot/neural_network_data/neural_network_lateral_control/TOYOTA_WILDLANDER_PHEV.json new file mode 100644 index 0000000..c219d98 --- /dev/null +++ b/sunnypilot/neural_network_data/neural_network_lateral_control/TOYOTA_WILDLANDER_PHEV.json @@ -0,0 +1 @@ +{"input_std":[[9.668097],[1.5244726],[1.2700657],[0.03216253],[1.6078212],[1.5848233],[1.5577372],[1.3927742],[1.2935301],[1.1931615],[1.1020583],[0.032136116],[0.03217024],[0.032196537],[0.03225218],[0.032214258],[0.032031752],[0.03179372]],"model_test_loss":0.018995385617017746,"input_size":18,"current_date_and_time":"2025-05-15_14-47-45","input_mean":[[18.09652],[-0.017798662],[0.027145168],[-0.0054331655],[-0.025215305],[-0.022640774],[-0.019500963],[-0.010056124],[-0.0057649272],[0.001960505],[0.0020118994],[-0.005499858],[-0.005477372],[-0.005444631],[-0.0053683305],[-0.005257134],[-0.005035867],[-0.0050971555]],"input_vars":["v_ego","lateral_accel","lateral_jerk","roll","lateral_accel_m03","lateral_accel_m02","lateral_accel_m01","lateral_accel_p03","lateral_accel_p06","lateral_accel_p10","lateral_accel_p15","roll_m03","roll_m02","roll_m01","roll_p03","roll_p06","roll_p10","roll_p15"],"output_size":1,"layers":[{"dense_1_b":[[-0.016405884],[1.4187009],[-0.30671495],[-1.4047697],[-0.20383339],[-0.3632745],[-0.028944347]],"dense_1_W":[[0.13070685,-0.6662394,-1.0739188,-0.41523784,0.019285621,-0.5666617,0.02941118,0.2413377,0.11430891,-0.15557496,-0.36541316,0.44118378,0.038414165,0.117383294,-0.026998837,-0.3802126,-0.23443018,0.43427357],[0.5493235,0.7341044,0.30259728,-0.09170222,-0.066015296,0.41798133,-0.062179696,-0.1925674,-0.15322368,0.017662844,0.21162434,-0.12112619,-0.027021965,0.05653779,0.14749303,0.28017008,-0.15880422,-0.07834965],[1.3052936,-0.038109165,1.2192534,-0.18676366,0.21888737,0.45998427,0.94506985,-0.87686205,0.044812016,-0.07512292,0.69492793,-0.59623814,0.3278255,0.39913544,0.15354112,0.04995451,-0.031020898,-0.10582342],[-0.4683151,1.0002598,0.29120648,-0.05860625,0.010191997,0.17896307,-0.3321235,0.19332078,-0.44497126,0.09236495,0.17685813,0.022076255,-0.23972619,0.11622197,0.11574386,0.1640551,0.028836682,-0.14775941],[1.2240227,0.5504716,-1.161672,0.10151114,-0.6311718,-0.4365897,-0.63896364,0.4033335,0.012773022,0.025944846,-0.62420815,0.05751297,0.043608528,-0.13193272,-0.33345297,0.18925929,0.0925279,-0.03600548],[-0.0033800902,-0.41361037,-8.50345,0.27523437,2.0881453,2.3587928,2.1091182,-2.467406,-1.9167688,-0.8961217,-0.22510983,0.037862107,-0.23643681,0.03247474,0.067485854,0.04660773,-0.2583531,0.077512406],[0.0035197088,-0.43985325,0.07051937,0.38219255,-0.67769414,-0.29911998,1.0818627,-0.6217103,-0.5443828,0.22882973,0.013560748,-0.29820752,0.11540977,-0.40309906,-0.00034299958,0.69976795,0.13301164,-0.32934943]],"activation":"σ"},{"dense_2_W":[[-0.014842439,-0.3306524,0.254514,-0.6639507,-0.534733,0.07840164,0.2324318],[-0.15334646,-0.290343,-1.047474,0.41780674,0.04612693,-0.73001504,-0.3465528],[-0.6260714,-0.5115335,-0.71161246,0.4046027,-1.2324069,-1.2851475,-0.16620061],[-0.05566019,0.48536706,-0.42460826,0.83332616,0.47045597,-0.061004266,-1.1440438],[0.42156544,-0.6722497,-0.10824958,-0.32994938,0.31952205,-0.46266714,-0.07230821],[-0.38416666,-0.7271572,-0.39645803,-0.4259647,-0.24740903,-0.17667961,-0.10970643],[0.19652602,0.026280575,-0.1651507,-0.38475782,-0.5457258,-0.1882665,0.82107437],[-0.08976335,0.35238677,0.25231764,0.004611504,-0.5936927,-0.29342756,-0.22477138],[0.25490662,-0.4851788,-0.07538396,-0.36808714,-0.05157315,-0.2439695,0.9720866],[0.48479185,-0.68759876,0.42557424,-0.56957704,-0.32759178,-0.3047872,0.7597776],[0.4211342,-1.4932247,-0.66635305,-0.10591562,-0.9298172,1.04872,0.32208702],[-0.2918295,0.63893354,0.044817235,0.87641054,0.38387123,-0.48429132,-0.8803729],[-0.60936576,-0.29061803,-0.94329685,0.6586833,0.15280105,-0.8124564,-0.538523]],"activation":"σ","dense_2_b":[[-0.009386154],[-0.25074136],[0.02986496],[-0.028872054],[-0.06481484],[-0.2976481],[-0.072934344],[-0.117011935],[0.028236326],[-0.009000545],[-0.42297846],[0.030614687],[-0.105583444]]},{"dense_3_W":[[-0.035136532,-0.27008098,-0.5048698,-0.5295355,0.29823285,0.5058221,-0.09186966,0.26433602,0.50751793,0.49806535,0.8154631,-0.5854975,-0.525581],[0.08374179,0.16962804,0.2263017,0.5973136,0.2815238,-0.0505521,0.26001385,0.36577544,-0.68805265,-0.8057493,-0.42594707,0.633128,0.08724391],[0.5107981,0.064214274,-0.061156582,-0.33331737,0.07700428,-0.40398338,0.3673148,-0.42669702,0.38095382,0.33056983,-0.3025643,-0.58125204,-0.3484819]],"activation":"identity","dense_3_b":[[0.01880667],[-0.04986152],[0.030190725]]},{"dense_4_W":[[-1.0120764,0.477425,-1.0690569]],"dense_4_b":[[-0.027314244]],"activation":"identity"}]} \ No newline at end of file diff --git a/sunnypilot/selfdrive/selfdrived/events.py b/sunnypilot/selfdrive/selfdrived/events.py index 7c72339..e484219 100644 --- a/sunnypilot/selfdrive/selfdrived/events.py +++ b/sunnypilot/selfdrive/selfdrived/events.py @@ -41,16 +41,16 @@ EVENTS_SP: dict[int, dict[str, Alert | AlertCallbackType]] = { EventNameSP.manualSteeringRequired: { ET.USER_DISABLE: Alert( - "Automatic Lane Centering is OFF", - "Manual Steering Required", + "自动车道居中功能已关闭", + "需要手动转向", AlertStatus.normal, AlertSize.mid, Priority.LOW, VisualAlert.none, AudibleAlert.disengage, 1.), }, EventNameSP.manualLongitudinalRequired: { ET.WARNING: Alert( - "Smart/Adaptive Cruise Control: OFF", - "Manual Speed Control Required", + "智能/自适应巡航控制:关闭", + "需要手动速度控制", AlertStatus.normal, AlertSize.mid, Priority.LOW, VisualAlert.none, AudibleAlert.none, 1.), }, @@ -65,7 +65,7 @@ EVENTS_SP: dict[int, dict[str, Alert | AlertCallbackType]] = { EventNameSP.silentBrakeHold: { ET.WARNING: EngagementAlert(AudibleAlert.none), - ET.NO_ENTRY: NoEntryAlert("Brake Hold Active"), + ET.NO_ENTRY: NoEntryAlert("刹车保持激活"), }, EventNameSP.silentWrongGear: { @@ -75,19 +75,19 @@ EVENTS_SP: dict[int, dict[str, Alert | AlertCallbackType]] = { AlertStatus.normal, AlertSize.none, Priority.LOWEST, VisualAlert.none, AudibleAlert.none, 0.), ET.NO_ENTRY: Alert( - "Gear not D", - "openpilot Unavailable", + "档位不在D档", + "openpilot不可用", AlertStatus.normal, AlertSize.mid, Priority.LOW, VisualAlert.none, AudibleAlert.none, 0.), }, EventNameSP.silentReverseGear: { ET.PERMANENT: Alert( - "Reverse\nGear", + "倒车中", "", AlertStatus.normal, AlertSize.full, Priority.LOWEST, VisualAlert.none, AudibleAlert.none, .2, creation_delay=0.5), - ET.NO_ENTRY: NoEntryAlert("Reverse Gear"), + ET.NO_ENTRY: NoEntryAlert("倒车中"), }, EventNameSP.silentDoorOpen: { @@ -96,7 +96,7 @@ EVENTS_SP: dict[int, dict[str, Alert | AlertCallbackType]] = { "", AlertStatus.normal, AlertSize.none, Priority.LOWEST, VisualAlert.none, AudibleAlert.none, 0.), - ET.NO_ENTRY: NoEntryAlert("Door Open"), + ET.NO_ENTRY: NoEntryAlert("车门已打开"), }, EventNameSP.silentSeatbeltNotLatched: { @@ -105,7 +105,7 @@ EVENTS_SP: dict[int, dict[str, Alert | AlertCallbackType]] = { "", AlertStatus.normal, AlertSize.none, Priority.LOWEST, VisualAlert.none, AudibleAlert.none, 0.), - ET.NO_ENTRY: NoEntryAlert("Seatbelt Unlatched"), + ET.NO_ENTRY: NoEntryAlert("请系好安全带"), }, EventNameSP.silentParkBrake: { @@ -114,16 +114,16 @@ EVENTS_SP: dict[int, dict[str, Alert | AlertCallbackType]] = { "", AlertStatus.normal, AlertSize.none, Priority.LOWEST, VisualAlert.none, AudibleAlert.none, 0.), - ET.NO_ENTRY: NoEntryAlert("Parking Brake Engaged"), + ET.NO_ENTRY: NoEntryAlert("手刹已启用"), }, EventNameSP.controlsMismatchLateral: { - ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("Controls Mismatch: Lateral"), - ET.NO_ENTRY: NoEntryAlert("Controls Mismatch: Lateral"), + ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("控制装置不匹配:横向"), + ET.NO_ENTRY: NoEntryAlert("控制装置不匹配:横向"), }, EventNameSP.experimentalModeSwitched: { - ET.WARNING: NormalPermanentAlert("Experimental Mode Switched", duration=1.5) + ET.WARNING: NormalPermanentAlert("实验模式切换", duration=1.5) }, EventNameSP.wrongCarModeAlertOnly: { @@ -131,12 +131,12 @@ EVENTS_SP: dict[int, dict[str, Alert | AlertCallbackType]] = { }, EventNameSP.pedalPressedAlertOnly: { - ET.WARNING: NoEntryAlert("Pedal Pressed") + ET.WARNING: NoEntryAlert("踏板被踩下") }, EventNameSP.laneTurnLeft: { ET.WARNING: Alert( - "Turning Left", + "左转", "", AlertStatus.normal, AlertSize.small, Priority.LOW, VisualAlert.none, AudibleAlert.none, 1.), @@ -144,7 +144,7 @@ EVENTS_SP: dict[int, dict[str, Alert | AlertCallbackType]] = { EventNameSP.laneTurnRight: { ET.WARNING: Alert( - "Turning Right", + "右转", "", AlertStatus.normal, AlertSize.small, Priority.LOW, VisualAlert.none, AudibleAlert.none, 1.), diff --git a/sunnypilot/selfdrive/selfdrived/events_base.py b/sunnypilot/selfdrive/selfdrived/events_base.py index 66396c4..6ecc688 100644 --- a/sunnypilot/selfdrive/selfdrived/events_base.py +++ b/sunnypilot/selfdrive/selfdrived/events_base.py @@ -87,9 +87,9 @@ AlertCallbackType = Callable[[car.CarParams, car.CarState, messaging.SubMaster, def wrong_car_mode_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert: - text = "Enable Adaptive Cruise to Engage" + text = "启用自适应巡航" if CP.brand == "honda": - text = "Enable Main Switch to Engage" + text = "启用主开关" return NoEntryAlert(text) @@ -183,7 +183,7 @@ EmptyAlert = Alert("" , "", AlertStatus.normal, AlertSize.none, Priority.LOWEST, class NoEntryAlert(Alert): def __init__(self, alert_text_2: str, - alert_text_1: str = "openpilot Unavailable", + alert_text_1: str = "openpilot不可用", visual_alert: car.CarControl.HUDControl.VisualAlert=VisualAlert.none): super().__init__(alert_text_1, alert_text_2, AlertStatus.normal, AlertSize.mid, Priority.LOW, visual_alert, @@ -192,7 +192,7 @@ class NoEntryAlert(Alert): class SoftDisableAlert(Alert): def __init__(self, alert_text_2: str): - super().__init__("TAKE CONTROL IMMEDIATELY", alert_text_2, + super().__init__("立即控制", alert_text_2, AlertStatus.userPrompt, AlertSize.full, Priority.MID, VisualAlert.steerRequired, AudibleAlert.warningSoft, 2.), @@ -202,12 +202,12 @@ class SoftDisableAlert(Alert): class UserSoftDisableAlert(SoftDisableAlert): def __init__(self, alert_text_2: str): super().__init__(alert_text_2), - self.alert_text_1 = "openpilot will disengage" + self.alert_text_1 = "openpilot将停止工作" class ImmediateDisableAlert(Alert): def __init__(self, alert_text_2: str): - super().__init__("TAKE CONTROL IMMEDIATELY", alert_text_2, + super().__init__("立即掌控", alert_text_2, AlertStatus.critical, AlertSize.full, Priority.HIGHEST, VisualAlert.steerRequired, AudibleAlert.warningImmediate, 4.), @@ -229,7 +229,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 = "驾驶时请双手握住方向盘并眼睛目视前方", alert_status=AlertStatus.normal): super().__init__(alert_text_1, alert_text_2, alert_status, AlertSize.mid, Priority.LOWER, VisualAlert.none, AudibleAlert.none, 5.),