diff --git a/launch_chffrplus.sh b/launch_chffrplus.sh
index 0901fea1..e67eec5a 100755
--- a/launch_chffrplus.sh
+++ b/launch_chffrplus.sh
@@ -90,6 +90,7 @@ function launch {
fi
# events language init
+ #LANG=$(cat ${PARAMS_ROOT}/d/LanguageSetting)
LANG=$(cat /data/params/d/LanguageSetting)
EVENTSTAT=$(git status)
@@ -97,6 +98,10 @@ function launch {
if [ "${LANG}" = "main_ko" ] && [[ ! "${EVENTSTAT}" == *"modified: selfdrive/controls/lib/events.py"* ]]; then
cp -f $DIR/selfdrive/selfdrived/events.py $DIR/scripts/add/events_en.py
cp -f $DIR/scripts/add/events_ko.py $DIR/selfdrive/selfdrived/events.py
+ elif [ "${LANG}" = "main_zh-CHS" ] && [[ ! "${EVENTSTAT}" == *"modified: selfdrive/controls/lib/events.py"* ]]; then
+ # Backup current events.py (assumed English) and install Simplified Chinese events
+ cp -f $DIR/selfdrive/selfdrived/events.py $DIR/scripts/add/events_en.py
+ cp -f $DIR/scripts/add/events_zh.py $DIR/selfdrive/selfdrived/events.py
elif [ "${LANG}" = "main_en" ] && [[ "${EVENTSTAT}" == *"modified: selfdrive/controls/lib/events.py"* ]]; then
cp -f $DIR/scripts/add/events_en.py $DIR/selfdrive/selfdrived/events.py
fi
diff --git a/scripts/add/events_zh.py b/scripts/add/events_zh.py
new file mode 100644
index 00000000..498cca05
--- /dev/null
+++ b/scripts/add/events_zh.py
@@ -0,0 +1,1133 @@
+#!/usr/bin/env python3
+import bisect
+import math
+import os
+from enum import IntEnum
+from collections.abc import Callable
+
+from cereal import log, car
+import cereal.messaging as messaging
+from openpilot.common.conversions import Conversions as CV
+from openpilot.common.git import get_short_branch
+from openpilot.common.params import Params
+from openpilot.common.realtime import DT_CTRL
+from openpilot.selfdrive.locationd.calibrationd import MIN_SPEED_FILTER
+
+AlertSize = log.SelfdriveState.AlertSize
+AlertStatus = log.SelfdriveState.AlertStatus
+VisualAlert = car.CarControl.HUDControl.VisualAlert
+AudibleAlert = car.CarControl.HUDControl.AudibleAlert
+EventName = log.OnroadEvent.EventName
+
+
+# Alert priorities
+class Priority(IntEnum):
+ LOWEST = 0
+ LOWER = 1
+ LOW = 2
+ MID = 3
+ HIGH = 4
+ HIGHEST = 5
+
+
+# Event types
+class ET:
+ ENABLE = 'enable'
+ PRE_ENABLE = 'preEnable'
+ OVERRIDE_LATERAL = 'overrideLateral'
+ OVERRIDE_LONGITUDINAL = 'overrideLongitudinal'
+ NO_ENTRY = 'noEntry'
+ WARNING = 'warning'
+ USER_DISABLE = 'userDisable'
+ SOFT_DISABLE = 'softDisable'
+ IMMEDIATE_DISABLE = 'immediateDisable'
+ PERMANENT = 'permanent'
+
+
+# get event name from enum
+EVENT_NAME = {v: k for k, v in EventName.schema.enumerants.items()}
+
+
+class Events:
+ def __init__(self):
+ self.events: list[int] = []
+ self.static_events: list[int] = []
+ self.event_counters = dict.fromkeys(EVENTS.keys(), 0)
+
+ @property
+ def names(self) -> list[int]:
+ return self.events
+
+ def __len__(self) -> int:
+ return len(self.events)
+
+ def add(self, event_name: int, static: bool=False) -> None:
+ if static:
+ bisect.insort(self.static_events, event_name)
+ bisect.insort(self.events, event_name)
+
+ def clear(self) -> None:
+ self.event_counters = {k: (v + 1 if k in self.events else 0) for k, v in self.event_counters.items()}
+ self.events = self.static_events.copy()
+
+ def contains(self, event_type: str) -> bool:
+ return any(event_type in EVENTS.get(e, {}) for e in self.events)
+
+ def create_alerts(self, event_types: list[str], callback_args=None):
+ if callback_args is None:
+ callback_args = []
+
+ ret = []
+ for e in self.events:
+ types = EVENTS[e].keys()
+ for et in event_types:
+ if et in types:
+ alert = EVENTS[e][et]
+ if not isinstance(alert, Alert):
+ alert = alert(*callback_args)
+
+ if DT_CTRL * (self.event_counters[e] + 1) >= alert.creation_delay:
+ alert.alert_type = f"{EVENT_NAME[e]}/{et}"
+ alert.event_type = et
+ ret.append(alert)
+ return ret
+
+ def add_from_msg(self, events):
+ for e in events:
+ bisect.insort(self.events, e.name.raw)
+
+ def to_msg(self):
+ ret = []
+ for event_name in self.events:
+ event = log.OnroadEvent.new_message()
+ event.name = event_name
+ for event_type in EVENTS.get(event_name, {}):
+ setattr(event, event_type, True)
+ ret.append(event)
+ return ret
+
+
+class Alert:
+ def __init__(self,
+ alert_text_1: str,
+ alert_text_2: str,
+ alert_status: log.SelfdriveState.AlertStatus,
+ alert_size: log.SelfdriveState.AlertSize,
+ priority: Priority,
+ visual_alert: car.CarControl.HUDControl.VisualAlert,
+ audible_alert: car.CarControl.HUDControl.AudibleAlert,
+ duration: float,
+ creation_delay: float = 0.):
+
+ self.alert_text_1 = alert_text_1
+ self.alert_text_2 = alert_text_2
+ self.alert_status = alert_status
+ self.alert_size = alert_size
+ self.priority = priority
+ self.visual_alert = visual_alert
+ self.audible_alert = audible_alert
+
+ self.duration = int(duration / DT_CTRL)
+
+ self.creation_delay = creation_delay
+
+ self.alert_type = ""
+ self.event_type: str | None = None
+
+ def __str__(self) -> str:
+ return f"{self.alert_text_1}/{self.alert_text_2} {self.priority} {self.visual_alert} {self.audible_alert}"
+
+ def __gt__(self, alert2) -> bool:
+ if not isinstance(alert2, Alert):
+ return False
+ return self.priority > alert2.priority
+
+EmptyAlert = Alert("" , "", AlertStatus.normal, AlertSize.none, Priority.LOWEST,
+ VisualAlert.none, AudibleAlert.none, 0)
+
+class NoEntryAlert(Alert):
+ def __init__(self, alert_text_2: str,
+ 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,
+ AudibleAlert.refuse, 3.)
+
+
+class SoftDisableAlert(Alert):
+ def __init__(self, alert_text_2: str):
+ super().__init__("请立即接管", alert_text_2,
+ AlertStatus.userPrompt, AlertSize.full,
+ Priority.MID, VisualAlert.steerRequired,
+ AudibleAlert.warningSoft, 2.),
+
+
+# less harsh version of SoftDisable, where the condition is user-triggered
+class UserSoftDisableAlert(SoftDisableAlert):
+ def __init__(self, alert_text_2: str):
+ super().__init__(alert_text_2),
+ self.alert_text_1 = "openpilot即将解除"
+
+
+class ImmediateDisableAlert(Alert):
+ def __init__(self, alert_text_2: str):
+ super().__init__("请立即接管", alert_text_2,
+ AlertStatus.critical, AlertSize.full,
+ Priority.HIGHEST, VisualAlert.steerRequired,
+ AudibleAlert.warningImmediate, 4.),
+
+
+class EngagementAlert(Alert):
+ def __init__(self, audible_alert: car.CarControl.HUDControl.AudibleAlert):
+ super().__init__("", "",
+ AlertStatus.normal, AlertSize.none,
+ Priority.MID, VisualAlert.none,
+ audible_alert, .2),
+
+
+class NormalPermanentAlert(Alert):
+ def __init__(self, alert_text_1: str, alert_text_2: str = "", duration: float = 0.2, priority: Priority = Priority.LOWER, creation_delay: float = 0.):
+ super().__init__(alert_text_1, alert_text_2,
+ AlertStatus.normal, AlertSize.mid if len(alert_text_2) else AlertSize.small,
+ priority, VisualAlert.none, AudibleAlert.none, duration, creation_delay=creation_delay),
+
+
+class StartupAlert(Alert):
+ 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.),
+
+
+# ********** helper functions **********
+def get_display_speed(speed_ms: float, metric: bool) -> str:
+ speed = int(round(speed_ms * (CV.MS_TO_KPH if metric else CV.MS_TO_MPH)))
+ unit = 'km/h' if metric else 'mph'
+ return f"{speed} {unit}"
+
+
+# ********** alert callback functions **********
+
+AlertCallbackType = Callable[[car.CarParams, car.CarState, messaging.SubMaster, bool, int, log.ControlsState], Alert]
+
+
+def soft_disable_alert(alert_text_2: str) -> AlertCallbackType:
+ def func(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert:
+ if soft_disable_time < int(0.5 / DT_CTRL):
+ return ImmediateDisableAlert(alert_text_2)
+ return SoftDisableAlert(alert_text_2)
+ return func
+
+def user_soft_disable_alert(alert_text_2: str) -> AlertCallbackType:
+ def func(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert:
+ if soft_disable_time < int(0.5 / DT_CTRL):
+ return ImmediateDisableAlert(alert_text_2)
+ return UserSoftDisableAlert(alert_text_2)
+ return func
+
+def startup_master_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert:
+ branch = get_short_branch() # Ensure get_short_branch is cached to avoid lags on startup
+ if "REPLAY" in os.environ:
+ branch = "replay"
+
+ return StartupAlert("提醒:需配合CarrotAmap或CP搭子 App才能实现高德地图的NOO", 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"车速超过{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"当前车速低于{get_display_speed(CP.minSteerSpeed, metric)}时无法提供转向",
+ "",
+ AlertStatus.userPrompt, AlertSize.small,
+ Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, 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 = '重新校准' if sm['liveCalibration'].calStatus == log.LiveCalibrationData.Status.recalibrating else '校准'
+ return Alert(
+ 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)
+
+def torque_nn_load_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert:
+ model_name = Params().get("NNFFModelName", encoding='utf-8')
+ if model_name == "":
+ return Alert(
+ "NNFF扭矩控制器不可用",
+ "请向Twilsonco提供日志以便添加!",
+ AlertStatus.userPrompt, AlertSize.mid,
+ Priority.LOW, VisualAlert.none, AudibleAlert.prompt, 6.0)
+ else:
+ return Alert(
+ "NNFF扭矩控制器已加载",
+ model_name,
+ AlertStatus.userPrompt, AlertSize.mid,
+ Priority.LOW, VisualAlert.none, AudibleAlert.prompt, 5.0)
+
+# *** debug alerts ***
+
+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("存储空间不足", 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"速度误差:{err:.1f} m/s"
+ 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="进程未运行")
+
+
+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="进程间通信异常")
+
+
+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("摄像头故障", ', '.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"请重新安装设备(俯仰:{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 = "检测到转向未对准"
+ text = f"角度偏移过大(偏移:{angle_offset_deg:.1f}°)"
+ elif not sm['liveParameters'].steerRatioValid:
+ steer_ratio = sm['liveParameters'].steerRatio
+ title = "转向比不匹配"
+ text = f"转向齿条几何可能异常(比例:{steer_ratio:.1f})"
+ elif not sm['liveParameters'].stiffnessFactorValid:
+ stiffness_factor = sm['liveParameters'].stiffnessFactor
+ title = "轮胎刚度异常"
+ text = f"请检查轮胎、胎压或定位(系数:{stiffness_factor:.1f})"
+ else:
+ return NoEntryAlert("paramsd临时错误")
+
+ return NoEntryAlert(alert_text_1=title, alert_text_2=text)
+
+def overheat_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert:
+ cpu = max(sm['deviceState'].cpuTempC, default=0.)
+ gpu = max(sm['deviceState'].gpuTempC, default=0.)
+ temp = max((cpu, gpu, sm['deviceState'].memoryTempC))
+ 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("内存不足", 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("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("驾驶模型延迟", f"丢帧率{sm['modelV2'].frameDropPerc:.1f}%")
+
+
+def wrong_car_mode_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert:
+ text = "请启用自适应巡航以接入"
+ if CP.brand == "honda":
+ text = "请打开主开关以接入"
+ return NoEntryAlert(text)
+
+
+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"油门:{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:
+ ad = sm['alertDebug']
+ audible_alert = AudibleAlert.prompt if 'Active' in ad.alertText1 else AudibleAlert.none
+ alert_status = AlertStatus.userPrompt if 'Active' in ad.alertText1 else AlertStatus.normal
+ alert_size = AlertSize.mid if ad.alertText2 else AlertSize.small
+ return Alert(ad.alertText1, ad.alertText2,
+ alert_status, alert_size,
+ Priority.LOW, VisualAlert.none, audible_alert, 0.2)
+
+
+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"驾驶风格:{personality}", duration=1.5)
+
+def car_parser_result(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert:
+ results = Params().get("CanParserResult")
+ if results is None:
+ results = ""
+ return Alert(
+ "CAN错误:请检查连接!!",
+ results,
+ AlertStatus.normal, AlertSize.small,
+ Priority.LOW, VisualAlert.none, AudibleAlert.none, 1., creation_delay=1.)
+
+
+EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = {
+ # ********** events with no alerts **********
+
+ EventName.stockFcw: {},
+ EventName.actuatorsApiUnavailable: {},
+
+ # ********** events only containing alerts displayed in all states **********
+
+ EventName.joystickDebug: {
+ ET.WARNING: joystick_alert,
+ ET.PERMANENT: NormalPermanentAlert("手柄模式"),
+ },
+
+ EventName.longitudinalManeuver: {
+ ET.WARNING: longitudinal_maneuver_alert,
+ ET.PERMANENT: NormalPermanentAlert("纵向操作模式",
+ "请确保前方道路无障碍"),
+ },
+
+ EventName.selfdriveInitializing: {
+ ET.NO_ENTRY: NoEntryAlert("系统初始化中"),
+ },
+
+ EventName.startup: {
+ ET.PERMANENT: StartupAlert("随时准备接管")
+ },
+
+ EventName.startupMaster: {
+ ET.PERMANENT: startup_master_alert,
+ },
+
+ EventName.startupNoControl: {
+ ET.PERMANENT: StartupAlert("行车记录仪模式"),
+ ET.NO_ENTRY: NoEntryAlert("行车记录仪模式"),
+ },
+
+ EventName.startupNoCar: {
+ ET.PERMANENT: StartupAlert("不支持车型,仅提供行车记录仪模式"),
+ },
+
+ EventName.startupNoSecOcKey: {
+ ET.PERMANENT: NormalPermanentAlert("行车记录仪模式",
+ "安全密钥不可用",
+ priority=Priority.HIGH),
+ },
+
+ EventName.dashcamMode: {
+ ET.PERMANENT: NormalPermanentAlert("行车记录仪模式",
+ priority=Priority.LOWEST),
+ },
+
+ EventName.invalidLkasSetting: {
+ ET.PERMANENT: NormalPermanentAlert("LKAS设置无效",
+ "请切换原厂LKAS开关后再接入"),
+ ET.NO_ENTRY: NoEntryAlert("LKAS设置无效"),
+ },
+
+ EventName.cruiseMismatch: {
+ #ET.PERMANENT: ImmediateDisableAlert("openpilot failed to cancel cruise"),
+ },
+
+ # openpilot doesn't recognize the car. This switches openpilot into a
+ # 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("行车记录仪模式",
+ "车辆未识别",
+ priority=Priority.LOWEST),
+ },
+
+ EventName.aeb: {
+ ET.PERMANENT: Alert(
+ "刹车!",
+ "紧急制动:存在碰撞风险",
+ AlertStatus.critical, AlertSize.full,
+ Priority.HIGHEST, VisualAlert.fcw, AudibleAlert.stopStop, 2.),
+ ET.NO_ENTRY: NoEntryAlert("AEB:存在碰撞风险"),
+ },
+
+ EventName.stockAeb: {
+ ET.PERMANENT: Alert(
+ "刹车!",
+ "原厂AEB:存在碰撞风险",
+ AlertStatus.critical, AlertSize.full,
+ Priority.HIGHEST, VisualAlert.fcw, AudibleAlert.stopStop, 2.),
+ ET.NO_ENTRY: NoEntryAlert("原厂AEB:存在碰撞风险"),
+ },
+
+ EventName.fcw: {
+ ET.PERMANENT: Alert(
+ "刹车!",
+ "存在碰撞风险",
+ AlertStatus.critical, AlertSize.full,
+ Priority.HIGHEST, VisualAlert.fcw, AudibleAlert.stopStop, 2.),
+ },
+
+ EventName.ldw: {
+ ET.PERMANENT: Alert(
+ "检测到车道偏离",
+ "",
+ AlertStatus.userPrompt, AlertSize.small,
+ Priority.LOW, VisualAlert.ldw, AudibleAlert.prompt, 3.),
+ },
+
+ # ********** events only containing alerts that display while engaged **********
+
+ EventName.steerTempUnavailableSilent: {
+ ET.WARNING: Alert(
+ "小鸽提醒:驻车中...",
+ "",
+ AlertStatus.userPrompt, AlertSize.small,
+ Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, 1.8),
+ },
+
+ EventName.preDriverDistracted: {
+ ET.WARNING: Alert(
+ "请注意驾驶",
+ "",
+ AlertStatus.normal, AlertSize.small,
+ Priority.LOW, VisualAlert.none, AudibleAlert.none, .1),
+ },
+
+ EventName.promptDriverDistracted: {
+ ET.WARNING: Alert(
+ "请注意驾驶",
+ "驾驶员分心",
+ AlertStatus.userPrompt, AlertSize.mid,
+ Priority.MID, VisualAlert.steerRequired, AudibleAlert.promptDistracted, .1),
+ },
+
+ EventName.driverDistracted: {
+ ET.WARNING: Alert(
+ "请立即解除",
+ "驾驶员分心",
+ AlertStatus.critical, AlertSize.full,
+ Priority.HIGH, VisualAlert.steerRequired, AudibleAlert.warningImmediate, .1),
+ },
+
+ EventName.preDriverUnresponsive: {
+ ET.WARNING: Alert(
+ "请握住方向盘:未检测到人脸",
+ "",
+ AlertStatus.normal, AlertSize.small,
+ Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, .1),
+ },
+
+ EventName.promptDriverUnresponsive: {
+ ET.WARNING: Alert(
+ "请握住方向盘",
+ "驾驶员无响应",
+ AlertStatus.userPrompt, AlertSize.mid,
+ Priority.MID, VisualAlert.steerRequired, AudibleAlert.promptDistracted, .1),
+ },
+
+ EventName.driverUnresponsive: {
+ ET.WARNING: Alert(
+ "请立即解除",
+ "驾驶员无响应",
+ AlertStatus.critical, AlertSize.full,
+ Priority.HIGH, VisualAlert.steerRequired, AudibleAlert.warningImmediate, .1),
+ },
+
+ EventName.manualRestart: {
+ ET.WARNING: Alert(
+ "请接管",
+ "请手动恢复驾驶",
+ AlertStatus.userPrompt, AlertSize.mid,
+ Priority.LOW, VisualAlert.none, AudibleAlert.none, .2),
+ },
+
+ EventName.resumeRequired: {
+ ET.WARNING: Alert(
+ "按下恢复以结束静止",
+ "",
+ AlertStatus.userPrompt, AlertSize.small,
+ Priority.LOW, VisualAlert.none, AudibleAlert.none, .2),
+ },
+
+ EventName.belowSteerSpeed: {
+ ET.WARNING: below_steer_speed_alert,
+ },
+
+ EventName.preLaneChangeLeft: {
+ ET.WARNING: Alert(
+ "确认安全后向左转向开始变道",
+ "",
+ AlertStatus.normal, AlertSize.none,
+ Priority.LOW, VisualAlert.none, AudibleAlert.none, .1),
+ },
+
+ EventName.preLaneChangeRight: {
+ ET.WARNING: Alert(
+ "确认安全后向右转向开始变道",
+ "",
+ AlertStatus.normal, AlertSize.none,
+ Priority.LOW, VisualAlert.none, AudibleAlert.none, .1),
+ },
+
+ EventName.laneChangeBlocked: {
+ ET.WARNING: Alert(
+ "盲区内检测到车辆",
+ "",
+ AlertStatus.userPrompt, AlertSize.none,
+ Priority.LOW, VisualAlert.none, AudibleAlert.bsdWarning, .1),
+ },
+
+ EventName.laneChange: {
+ ET.WARNING: Alert(
+ "正在变道",
+ "",
+ AlertStatus.normal, AlertSize.none,
+ Priority.LOW, VisualAlert.none, AudibleAlert.none, .1),
+ },
+
+ EventName.steerSaturated: {
+ ET.WARNING: Alert(
+ "请接管",
+ "转向角超出限制",
+ AlertStatus.normal, AlertSize.small,
+ Priority.LOW, VisualAlert.none, AudibleAlert.none, 1.),
+ },
+
+ # Thrown when the fan is driven at >50% but is not rotating
+ EventName.fanMalfunction: {
+ ET.PERMANENT: NormalPermanentAlert("风扇故障", "可能是硬件问题"),
+ },
+
+ # Camera is not outputting frames
+ EventName.cameraMalfunction: {
+ ET.PERMANENT: camera_malfunction_alert,
+ ET.SOFT_DISABLE: soft_disable_alert("摄像头故障"),
+ ET.NO_ENTRY: NoEntryAlert("摄像头故障:请重启设备"),
+ },
+ # Camera framerate too low
+ EventName.cameraFrameRate: {
+ ET.PERMANENT: NormalPermanentAlert("摄像头帧率过低", "请重启设备"),
+ ET.SOFT_DISABLE: soft_disable_alert("摄像头帧率过低"),
+ ET.NO_ENTRY: NoEntryAlert("摄像头帧率过低:请重启设备"),
+ },
+
+ # Unused
+
+ EventName.locationdTemporaryError: {
+ ET.NO_ENTRY: NoEntryAlert("locationd临时错误"),
+ ET.SOFT_DISABLE: soft_disable_alert("locationd临时错误"),
+ },
+
+ EventName.locationdPermanentError: {
+ 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
+ # how the car behaves to steering inputs from both human and openpilot driving.
+ # This includes:
+ # - steer ratio: gear ratio of the steering rack. Steering angle divided by tire angle
+ # - tire stiffness: how much grip your tires have
+ # - angle offset: most steering angle sensors are offset and measure a non zero angle when driving straight
+ # This alert is thrown when any of these values exceed a sanity check. This can be caused by
+ # 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临时错误"),
+ },
+
+ EventName.paramsdPermanentError: {
+ ET.NO_ENTRY: NoEntryAlert("paramsd永久错误"),
+ ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("paramsd永久错误"),
+ ET.PERMANENT: NormalPermanentAlert("paramsd永久错误"),
+ },
+
+ # ********** events that affect controls state transitions **********
+
+ EventName.pcmEnable: {
+ ET.ENABLE: EngagementAlert(AudibleAlert.engage),
+ },
+
+ EventName.buttonEnable: {
+ ET.ENABLE: EngagementAlert(AudibleAlert.engage),
+ },
+
+ EventName.pcmDisable: {
+ ET.USER_DISABLE: EngagementAlert(AudibleAlert.disengage),
+ },
+
+ EventName.buttonCancel: {
+ ET.USER_DISABLE: EngagementAlert(AudibleAlert.disengage),
+ ET.NO_ENTRY: NoEntryAlert("已按下取消"),
+ },
+
+ EventName.brakeHold: {
+ ET.WARNING: Alert(
+ "按下恢复以解除制动保持",
+ "",
+ AlertStatus.userPrompt, AlertSize.small,
+ Priority.LOW, VisualAlert.none, AudibleAlert.none, .2),
+ },
+
+ EventName.parkBrake: {
+ ET.USER_DISABLE: EngagementAlert(AudibleAlert.disengage),
+ ET.NO_ENTRY: NoEntryAlert("驻车制动已启用"),
+ },
+
+ EventName.pedalPressed: {
+ ET.USER_DISABLE: EngagementAlert(AudibleAlert.disengage),
+ ET.NO_ENTRY: NoEntryAlert("踏板被踩下",
+ visual_alert=VisualAlert.brakePressed),
+ },
+
+ EventName.preEnableStandstill: {
+ ET.PRE_ENABLE: Alert(
+ "松开刹车以接入",
+ "",
+ AlertStatus.normal, AlertSize.small,
+ Priority.LOWEST, VisualAlert.none, AudibleAlert.none, .1, creation_delay=1.),
+ },
+
+ EventName.gasPressedOverride: {
+ ET.OVERRIDE_LONGITUDINAL: Alert(
+ "",
+ "",
+ AlertStatus.normal, AlertSize.none,
+ Priority.LOWEST, VisualAlert.none, AudibleAlert.none, .1),
+ },
+
+ EventName.steerOverride: {
+ ET.OVERRIDE_LATERAL: Alert(
+ "",
+ "",
+ AlertStatus.normal, AlertSize.none,
+ Priority.LOWEST, VisualAlert.none, AudibleAlert.none, .1),
+ },
+
+ EventName.wrongCarMode: {
+ ET.USER_DISABLE: EngagementAlert(AudibleAlert.disengage),
+ ET.NO_ENTRY: wrong_car_mode_alert,
+ },
+
+ EventName.resumeBlocked: {
+ ET.NO_ENTRY: NoEntryAlert("按下设定以接入"),
+ },
+
+ EventName.wrongCruiseMode: {
+ ET.USER_DISABLE: EngagementAlert(AudibleAlert.disengage),
+ ET.NO_ENTRY: NoEntryAlert("自适应巡航已关闭"),
+ },
+
+ EventName.steerTempUnavailable: {
+ ET.SOFT_DISABLE: soft_disable_alert("转向暂时不可用"),
+ ET.NO_ENTRY: NoEntryAlert("转向暂时不可用"),
+ },
+
+ EventName.steerTimeLimit: {
+ ET.SOFT_DISABLE: soft_disable_alert("车辆转向时间限制"),
+ ET.NO_ENTRY: NoEntryAlert("车辆转向时间限制"),
+ },
+
+ EventName.outOfSpace: {
+ ET.PERMANENT: out_of_space_alert,
+ ET.NO_ENTRY: NoEntryAlert("存储空间不足"),
+ },
+
+ EventName.belowEngageSpeed: {
+ ET.NO_ENTRY: below_engage_speed_alert,
+ },
+
+ EventName.sensorDataInvalid: {
+ ET.PERMANENT: Alert(
+ "传感器数据无效",
+ "可能是硬件问题",
+ AlertStatus.normal, AlertSize.mid,
+ Priority.LOWER, VisualAlert.none, AudibleAlert.none, .2, creation_delay=1.),
+ ET.NO_ENTRY: NoEntryAlert("传感器数据无效"),
+ ET.SOFT_DISABLE: soft_disable_alert("传感器数据无效"),
+ },
+
+ EventName.noGps: {
+ ET.PERMANENT: Alert(
+ "GPS信号弱",
+ "请确保设备具有开阔的天空视野",
+ AlertStatus.normal, AlertSize.mid,
+ Priority.LOWER, VisualAlert.none, AudibleAlert.none, .2, creation_delay=600.)
+ },
+
+ EventName.tooDistracted: {
+ ET.NO_ENTRY: NoEntryAlert("分心程度过高"),
+ },
+
+ EventName.overheat: {
+ ET.PERMANENT: overheat_alert,
+ ET.SOFT_DISABLE: soft_disable_alert("系统过热"),
+ ET.NO_ENTRY: NoEntryAlert("系统过热"),
+ },
+
+ EventName.wrongGear: {
+ ET.USER_DISABLE: EngagementAlert(AudibleAlert.disengage), #carrot
+ #ET.SOFT_DISABLE: user_soft_disable_alert("Gear not D"),
+ ET.NO_ENTRY: NoEntryAlert("挡位非D挡"),
+ },
+
+ # This alert is thrown when the calibration angles are outside of the acceptable range.
+ # For example if the device is pointed too much to the left or the right.
+ # Usually this can only be solved by removing the mount from the windshield completely,
+ # and attaching while making sure the device is pointed straight forward and is level.
+ # See https://comma.ai/setup for more information
+ EventName.calibrationInvalid: {
+ ET.PERMANENT: calibration_invalid_alert,
+ ET.SOFT_DISABLE: soft_disable_alert("校准无效:请重新安装设备并重新校准"),
+ ET.NO_ENTRY: NoEntryAlert("校准无效:请重新安装设备并重新校准"),
+ },
+
+ EventName.calibrationIncomplete: {
+ ET.PERMANENT: calibration_incomplete_alert,
+ ET.SOFT_DISABLE: soft_disable_alert("校准未完成"),
+ ET.NO_ENTRY: NoEntryAlert("校准进行中"),
+ },
+
+ EventName.calibrationRecalibrating: {
+ ET.PERMANENT: calibration_incomplete_alert,
+ ET.SOFT_DISABLE: soft_disable_alert("检测到设备重新安装:重新校准中"),
+ ET.NO_ENTRY: NoEntryAlert("检测到重新安装:正在重新校准"),
+ },
+
+ EventName.doorOpen: {
+ ET.SOFT_DISABLE: user_soft_disable_alert("车门已打开"),
+ ET.NO_ENTRY: NoEntryAlert("车门已打开"),
+ },
+
+ EventName.seatbeltNotLatched: {
+ ET.SOFT_DISABLE: user_soft_disable_alert("安全带未扣"),
+ ET.NO_ENTRY: NoEntryAlert("安全带未扣"),
+ },
+
+ EventName.espDisabled: {
+ ET.SOFT_DISABLE: soft_disable_alert("电子稳定控制已关闭"),
+ ET.NO_ENTRY: NoEntryAlert("电子稳定控制已关闭"),
+ },
+
+ EventName.lowBattery: {
+ ET.SOFT_DISABLE: soft_disable_alert("电量低"),
+ ET.NO_ENTRY: NoEntryAlert("电量低"),
+ },
+
+ # Different openpilot services communicate between each other at a certain
+ # interval. If communication does not follow the regular schedule this alert
+ # 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("进程间通信异常"),
+ ET.NO_ENTRY: comm_issue_alert,
+ },
+ EventName.commIssueAvgFreq: {
+ ET.SOFT_DISABLE: soft_disable_alert("进程间通信速率低"),
+ ET.NO_ENTRY: NoEntryAlert("进程间通信速率低"),
+ },
+
+ EventName.selfdrivedLagging: {
+ 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("进程未运行"),
+ },
+
+ EventName.radarFault: {
+ ET.SOFT_DISABLE: soft_disable_alert("雷达错误:请重启车辆"),
+ ET.NO_ENTRY: NoEntryAlert("雷达错误:请重启车辆"),
+ },
+
+ EventName.radarTempUnavailable: {
+ 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("驾驶模型延迟"),
+ ET.NO_ENTRY: NoEntryAlert("驾驶模型延迟"),
+ ET.PERMANENT: modeld_lagging_alert,
+ },
+
+ # Besides predicting the path, lane lines and lead car data the model also
+ # predicts the current velocity and rotation speed of the car. If the model is
+ # very uncertain about the current velocity while the car is moving, this
+ # 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速度无效"),
+ 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("设备从支架掉落"),
+ ET.NO_ENTRY: NoEntryAlert("设备从支架掉落"),
+ },
+
+ EventName.lowMemory: {
+ ET.SOFT_DISABLE: soft_disable_alert("内存不足:请重启设备"),
+ ET.PERMANENT: low_memory_alert,
+ ET.NO_ENTRY: NoEntryAlert("内存不足:请重启设备"),
+ },
+
+ EventName.accFaulted: {
+ ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("巡航acc故障:请重启车辆"),
+ ET.PERMANENT: NormalPermanentAlert("巡航故障:重启车辆后再接入"),
+ ET.NO_ENTRY: NoEntryAlert("巡航故障:请重启车辆"),
+ },
+
+ EventName.espActive: {
+ ET.SOFT_DISABLE: soft_disable_alert("电子稳定控制介入"),
+ ET.NO_ENTRY: NoEntryAlert("电子稳定控制介入"),
+ },
+
+ EventName.controlsMismatch: {
+ 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错误:请重启设备"),
+ ET.PERMANENT: NormalPermanentAlert("USB错误:请重启设备", ""),
+ ET.NO_ENTRY: NoEntryAlert("USB错误:请重启设备"),
+ },
+
+ # This alert can be thrown for the following reasons:
+ # - No CAN data received at all
+ # - 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.PERMANENT: car_parser_result,
+ ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("CAN错误"),
+ #ET.PERMANENT: Alert(
+ # "CAN Error: Check Connections",
+ # "",
+ # AlertStatus.normal, AlertSize.small,
+ # Priority.LOW, VisualAlert.none, AudibleAlert.none, 1., creation_delay=1.),
+ ET.NO_ENTRY: NoEntryAlert("CAN错误:请检查连接"),
+ },
+
+ EventName.canBusMissing: {
+ ET.PERMANENT: car_parser_result,
+ ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("CAN总线已断开"),
+ #ET.PERMANENT: Alert(
+ # "CAN Bus Disconnected: Likely Faulty Cable",
+ # "",
+ # AlertStatus.normal, AlertSize.small,
+ # Priority.LOW, VisualAlert.none, AudibleAlert.none, 1., creation_delay=1.),
+ ET.NO_ENTRY: NoEntryAlert("CAN总线断开:请检查连接"),
+ },
+
+ EventName.steerUnavailable: {
+ ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("LKAS故障:请重启车辆"),
+ ET.PERMANENT: ImmediateDisableAlert("LKAS故障:重启车辆后再接入"),
+ ET.NO_ENTRY: NoEntryAlert("LKAS故障:请重启车辆"),
+ },
+
+ EventName.reverseGear: {
+ ET.PERMANENT: Alert(
+ "倒车\n档",
+ "",
+ AlertStatus.normal, AlertSize.none,
+ Priority.LOWEST, VisualAlert.none, AudibleAlert.reverseGear, .2, creation_delay=0.5),
+ ET.SOFT_DISABLE: SoftDisableAlert("倒挡"),
+ 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("巡航已关闭"),
+ },
+
+ # When the relay in the harness box opens the CAN bus between the LKAS camera
+ # and the rest of the car is separated. When messages from the LKAS camera
+ # 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("线束继电器故障"),
+ ET.PERMANENT: NormalPermanentAlert("线束继电器故障", "请检查硬件"),
+ ET.NO_ENTRY: NoEntryAlert("线束继电器故障"),
+ },
+
+ EventName.speedTooLow: {
+ ET.IMMEDIATE_DISABLE: Alert(
+ "openpilot已取消",
+ "车速过低",
+ AlertStatus.normal, AlertSize.mid,
+ Priority.HIGH, VisualAlert.none, AudibleAlert.disengage, 3.),
+ },
+
+ # When the car is driving faster than most cars in the training data, the model outputs can be unpredictable.
+ EventName.speedTooHigh: {
+ ET.WARNING: Alert(
+ "车速过高",
+ "模型在该车速下存在不确定性",
+ AlertStatus.userPrompt, AlertSize.mid,
+ Priority.HIGH, VisualAlert.steerRequired, AudibleAlert.promptRepeat, 4.),
+ ET.NO_ENTRY: NoEntryAlert("请减速后接入"),
+ },
+
+ EventName.vehicleSensorsInvalid: {
+ ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("车辆传感器无效"),
+ ET.PERMANENT: NormalPermanentAlert("车辆传感器校准中", "请行驶以完成校准"),
+ ET.NO_ENTRY: NoEntryAlert("车辆传感器校准中"),
+ },
+
+ EventName.personalityChanged: {
+ ET.WARNING: personality_changed_alert,
+ },
+
+ EventName.softHold: {
+ ET.WARNING: Alert(
+ "软保持",
+ "",
+ AlertStatus.normal, AlertSize.small,
+ Priority.LOW, VisualAlert.none, AudibleAlert.none, .1),
+ },
+ EventName.trafficStopping: {
+ ET.WARNING: EngagementAlert(AudibleAlert.stopping),
+ #ET.WARNING: Alert(
+ # "신호 감속정지중입니다.",
+ # "",
+ # AlertStatus.normal, AlertSize.small,
+ # Priority.LOW, VisualAlert.none, AudibleAlert.stopping, 3.),
+ },
+ EventName.audioPrompt: {
+ ET.WARNING: EngagementAlert(AudibleAlert.prompt),
+ },
+ EventName.audioRefuse: {
+ ET.WARNING: EngagementAlert(AudibleAlert.refuse),
+ },
+ EventName.stopStop: {
+ ET.WARNING: EngagementAlert(AudibleAlert.stopStop),
+ },
+ EventName.audioLaneChange: {
+ ET.WARNING: EngagementAlert(AudibleAlert.laneChange),
+ },
+ EventName.audioTurn: {
+ ET.WARNING: EngagementAlert(AudibleAlert.audioTurn),
+ },
+ EventName.trafficSignGreen: {
+ ET.WARNING: EngagementAlert(AudibleAlert.trafficSignGreen),
+ #ET.WARNING: Alert(
+ # "출발합니다.",
+ # "",
+ # AlertStatus.normal, AlertSize.small,
+ # Priority.LOW, VisualAlert.none, AudibleAlert.trafficSignGreen, 3.),
+ },
+ EventName.trafficSignChanged: {
+ ET.WARNING: Alert(
+ "信号灯已变化",
+ "",
+ AlertStatus.normal, AlertSize.small,
+ Priority.LOW, VisualAlert.none, AudibleAlert.trafficSignChanged, 1.),
+ },
+ EventName.turningLeft: {
+ ET.WARNING: Alert(
+ "左转中",
+ "",
+ AlertStatus.normal, AlertSize.small,
+ Priority.LOW, VisualAlert.none, AudibleAlert.none, .1),
+ },
+
+ EventName.turningRight: {
+ ET.WARNING: Alert(
+ "右转中",
+ "",
+ AlertStatus.normal, AlertSize.small,
+ Priority.LOW, VisualAlert.none, AudibleAlert.none, .1),
+ },
+ EventName.audio1: {
+ ET.WARNING: EngagementAlert(AudibleAlert.audio1),
+ },
+ EventName.audio2: {
+ ET.WARNING: EngagementAlert(AudibleAlert.audio2),
+ },
+ EventName.audio3: {
+ ET.WARNING: EngagementAlert(AudibleAlert.audio3),
+ },
+ EventName.audio4: {
+ ET.WARNING: EngagementAlert(AudibleAlert.audio4),
+ },
+ EventName.audio5: {
+ ET.WARNING: EngagementAlert(AudibleAlert.audio5),
+ },
+ EventName.audio6: {
+ ET.WARNING: EngagementAlert(AudibleAlert.audio6),
+ },
+ EventName.audio7: {
+ ET.WARNING: EngagementAlert(AudibleAlert.audio7),
+ },
+ EventName.audio8: {
+ ET.WARNING: EngagementAlert(AudibleAlert.audio8),
+ },
+ EventName.audio9: {
+ ET.WARNING: EngagementAlert(AudibleAlert.audio9),
+ },
+ EventName.audio10: {
+ ET.WARNING: EngagementAlert(AudibleAlert.audio10),
+ },
+ EventName.audio0: {
+ ET.WARNING: EngagementAlert(AudibleAlert.longDisengaged),
+ },
+ EventName.torqueNNLoad: {
+ ET.PERMANENT: torque_nn_load_alert,
+ },
+
+}
+
+
+if __name__ == '__main__':
+ # print all alerts by type and priority
+ from cereal.services import SERVICE_LIST
+ from collections import defaultdict
+
+ event_names = {v: k for k, v in EventName.schema.enumerants.items()}
+ alerts_by_type: dict[str, dict[Priority, list[str]]] = defaultdict(lambda: defaultdict(list))
+
+ CP = car.CarParams.new_message()
+ CS = car.CarState.new_message()
+ sm = messaging.SubMaster(list(SERVICE_LIST.keys()))
+
+ for i, alerts in EVENTS.items():
+ for et, alert in alerts.items():
+ if callable(alert):
+ alert = alert(CP, CS, sm, False, 1, log.LongitudinalPersonality.standard)
+ alerts_by_type[et][alert.priority].append(event_names[i])
+
+ all_alerts: dict[str, list[tuple[Priority, list[str]]]] = {}
+ for et, priority_alerts in alerts_by_type.items():
+ all_alerts[et] = sorted(priority_alerts.items(), key=lambda x: x[0], reverse=True)
+
+ for status, evs in sorted(all_alerts.items(), key=lambda x: x[0]):
+ print(f"**** {status} ****")
+ for p, alert_list in evs:
+ print(f" {repr(p)}:")
+ print(" ", ', '.join(alert_list), "\n")
diff --git a/selfdrive/carrot/carrot_serv.py b/selfdrive/carrot/carrot_serv.py
index bdd85ea5..85d1d45b 100644
--- a/selfdrive/carrot/carrot_serv.py
+++ b/selfdrive/carrot/carrot_serv.py
@@ -540,24 +540,24 @@ class CarrotServ:
}
sdi_zh = {
- 0: "信号测速/闯灯取缔",
+ 0: "信号测速/闯灯拍照",
1: "固定测速摄像头",
2: "区间测速开始",
3: "区间测速结束",
4: "区间测速中",
- 5: "路口压线取缔摄像头",
- 6: "闯红灯取缔",
- 7: "移动测速摄像头",
- 8: "固定测速区(箱式)",
+ 5: "路口压线摄像头",
+ 6: "闯红灯拍照",
+ 7: "流动测速摄像头",
+ 8: "测速拍照",
9: "公交专用车道区间",
- 10: "可变/潮汐车道取缔",
- 11: "应急车道监控点",
+ 10: "可变/潮汐车道拍照",
+ 11: "应急车道拍照",
12: "禁止加塞",
13: "交通信息采集点",
14: "治安监控",
15: "超载车辆风险区",
- 16: "装载不当取缔",
- 17: "违停取缔点",
+ 16: "装载不当拍照",
+ 17: "违停拍照点",
18: "单行道",
19: "铁路道口",
20: "学校区域开始",
@@ -566,7 +566,7 @@ class CarrotServ:
23: "LPG加气站",
24: "隧道区间",
25: "服务区",
- 26: "收费站",
+ 26: "ETC计费拍照",
27: "多雾路段",
28: "危险品区域",
29: "事故多发路段",
@@ -605,7 +605,7 @@ class CarrotServ:
62: "目的地在对面",
63: "瞌睡停车区",
64: "老旧柴油车管制",
- 65: "隧道内变道取缔",
+ 65: "隧道内变道拍照",
66: "",
}
@@ -979,15 +979,10 @@ class CarrotServ:
if self.turnSpeedControlMode == 2:
if -500 < self.xDistToTurn < 500:
speed_n_sources.append((route_speed, "route"))
- elif self.turnSpeedControlMode in [3, 4]:
+ elif self.turnSpeedControlMode == 3:
speed_n_sources.append((route_speed, "route"))
#speed_n_sources.append((self.calculate_current_speed(dist, speed * self.mapTurnSpeedFactor, 0, 1.2), "route"))
-
- model_turn_speed = max(sm['modelV2'].meta.modelTurnSpeed, self.autoCurveSpeedLowerLimit)
- if model_turn_speed < 200 and abs(vturn_speed) < 120:
- speed_n_sources.append((model_turn_speed, "model"))
-
desired_speed, source = min(speed_n_sources, key=lambda x: x[0])
if CS is not None:
@@ -1218,7 +1213,7 @@ class CarrotServ:
if nRoadLimitSpeed > 200:
nRoadLimitSpeed = (nRoadLimitSpeed - 20) / 10
elif nRoadLimitSpeed == 120:
- nRoadLimitSpeed = 30
+ nRoadLimitSpeed = 115 # 120 -> 115 fix bug
else:
nRoadLimitSpeed = 30
#self.nRoadLimitSpeed = nRoadLimitSpeed
diff --git a/selfdrive/ui/translations/main_zh-CHS.ts b/selfdrive/ui/translations/main_zh-CHS.ts
index 58f12daf..6be8677c 100644
--- a/selfdrive/ui/translations/main_zh-CHS.ts
+++ b/selfdrive/ui/translations/main_zh-CHS.ts
@@ -91,37 +91,37 @@
CarrotPanel
Reboot
- 重启
+ 重启
Exit
- 退出
+ 退出
openpilot
- openpilot
+ openpilot
%n minute(s) ago
-
+
%n 分钟前
%n hour(s) ago
-
+
%n 小时前
%n day(s) ago
-
+
%n 天前
now
- 现在
+ 现在
Start
@@ -153,379 +153,379 @@
Button: Cruise Button Mode
- 按键:巡航按钮模式
+ 按键:巡航按钮模式
0:Normal,1:User1,2:User2
- 0:默认, 1:用户1, 2:用户2
+ 0:默认, 1:用户1, 2:用户2
Button: Cancel Button Mode
- 按键:取消按钮模式
+ 按键:取消按钮模式
0:Long,1:Long+Lat
- 0:纵向, 1:纵向+横向
+ 0:仅纵向, 1:纵向+横向
Button: LFA Button Mode
- 按键:LFA 按钮模式
+ 按键:LFA 按钮模式
0:Normal,1:Decel&Stop&LeadCarReady
- 0:默认, 1:减速&停车&前车就绪
+ 0:默认, 1:减速&停车&前车就绪
Button: Cruise Speed Unit(Basic)
- 按键:巡航步进(基础)
+ 按键:巡航步进(基础)
Button: Cruise Speed Unit(Extra)
- 按键:巡航步进(扩展)
+ 按键:巡航步进(扩展)
CRUISE: Eco control(4km/h)
- 巡航:经济控制(4km/h)
+ 巡航:经济控制(4km/h)
Temporarily increasing the set speed to improve fuel efficiency.
- 短暂提高设定车速以提升燃油效率。
+ 临时提高设定车速以提升燃油经济性。
CRUISE: Auto speed up (0%)
- 巡航:自动提速 (0%)
+ 巡航:自动提速(0%)
Auto speed up based on the lead car up to RoadSpeedLimit.
- 基于前车自动提速,最高不超过道路限速。
+ 根据前车自动提速,最高不超过道路限速。
GAP1: Apply TFollow (110)x0.01s
- 间距1:应用时距(110)x0.01秒
+ 间距1:跟车时距 (110)x0.01 秒
GAP2: Apply TFollow (120)x0.01s
- 间距2:应用时距(120)x0.01秒
+ 间距2:跟车时距 (120)x0.01 秒
GAP3: Apply TFollow (160)x0.01s
- 间距3:应用时距(160)x0.01秒
+ 间距3:跟车时距 (160)x0.01 秒
GAP4: Apply TFollow (180)x0.01s
- 间距4:应用时距(180)x0.01秒
+ 间距4:跟车时距 (180)x0.01 秒
Dynamic GAP control
- 动态间距控制
+ 动态间距控制
Dynamic GAP control (LaneChange)
- 动态间距控制(变道)
+ 动态间距控制(变道)
DRIVEMODE: Select
- 驾驶模式:选择
+ 驾驶模式:选择
1:ECO,2:SAFE,3:NORMAL,4:HIGH
- 1:节能, 2:安全, 3:标准, 4:高速
+ 1:节能, 2:安全, 3:标准, 4:高速
DRIVEMODE: Auto
- 驾驶模式:自动
+ 驾驶模式:自动
NORMAL mode only
- 仅在标准模式下生效
+ 仅在标准模式下生效
TrafficLight DetectMode
- 红绿灯检测模式
+ 红绿灯检测模式
0:None, 1:Stopping only, 2: Stop & Go
- 0:关闭, 1:仅停车, 2:停车后起步
+ 0:关闭, 1:仅停车, 2:停走
Laneline mode speed(0)
- 车道线模式速度(0)
+ 车道线模式速度(0)
Laneline mode, lat_mpc control used
- 车道线模式,使用横向 MPC 控制
+ 车道线模式,使用横向 MPC 控制
Laneline mode curve speed(0)
- 车道线模式弯道速度(0)
+ 车道线模式弯道速度(0)
Laneline mode, high speed only
- 车道线模式,仅在高速下使用
+ 车道线模式,仅在高速使用
AdjustLaneOffset(0)cm
- 车道偏移调整(0)cm
+ 车道偏移调整(0)cm
LaneChange need torque
- 变道需要扭矩
+ 变道需要方向盘扭矩
-1:Disable lanechange, 0: no need torque, 1:need torque
- -1:禁用变道, 0:无需扭矩, 1:需要扭矩
+ -1:禁用变道, 0:不需要扭矩, 1:需要扭矩
LaneChange delay
- 变道延迟
+ 变道延迟
x0.1sec
- 单位0.1秒
+ 单位 0.1 秒
LaneChange Bsd
- 变道盲区检测
+ 变道盲区监测
-1:ignore bsd, 0:BSD detect, 1: block steer torque
- -1:忽略BSD, 0:检测BSD, 1:限制转向扭矩
+ -1:忽略BSD, 0:启用BSD检测, 1:限制转向扭矩
- LAT: SteerRatiox0.1(0)
- 横向:转向比x0.1(0)
+ LAT: SteerRatiox0.1(0)
+ 横向:转向比x0.1(0)
- Custom SteerRatio
- 自定义转向比
+ Custom SteerRatio
+ 自定义转向比
- LAT: SteerRatioRatex0.01(100)
- 横向:转向比变化率x0.01(100)
+ LAT: SteerRatioRatex0.01(100)
+ 横向:转向比变化率x0.01(100)
- SteerRatio apply rate
- 转向比应用速率
+ SteerRatio apply rate
+ 转向比应用速率
- LAT: PathOffset
- 横向:路径偏移
+ LAT: PathOffset
+ 横向:路径偏移
- (-)left, (+)right
- (-)左移, (+)右移
+ (-)left, (+)right
+ (-)左移, (+)右移
- LAT:SteerActuatorDelay(30)
- 横向:转向执行器延迟(30)
+ LAT:SteerActuatorDelay(30)
+ 横向:转向执行器延迟(30)
x0.01, 0:LiveDelay
- 单位0.01,0为实时延迟
+ 单位 0.01,0 表示实时延迟
- LAT: TorqueCustom(0)
- 横向:自定义扭矩(0)
+ LAT: TorqueCustom(0)
+ 横向:自定义扭矩(0)
- LAT: TorqueAccelFactor(2500)
- 横向:扭矩加速度系数(2500)
+ LAT: TorqueAccelFactor(2500)
+ 横向:扭矩加速度系数(2500)
- LAT: TorqueFriction(100)
- 横向:扭矩摩擦(100)
+ LAT: TorqueFriction(100)
+ 横向:扭矩摩擦(100)
- LAT: CustomSteerMax(0)
- 横向:自定义最大转向(0)
+ LAT: CustomSteerMax(0)
+ 横向:自定义最大转向(0)
- LAT: CustomSteerDeltaUp(0)
- 横向:自定义转向上升速率(0)
+ LAT: CustomSteerDeltaUp(0)
+ 横向:自定义转向上升速率(0)
- LAT: CustomSteerDeltaDown(0)
- 横向:自定义转向下降速率(0)
+ LAT: CustomSteerDeltaDown(0)
+ 横向:自定义转向下降速率(0)
- LONG: P Gain(100)
- 纵向:P增益(100)
+ LONG: P Gain(100)
+ 纵向:P增益(100)
- LONG: I Gain(0)
- 纵向:I增益(0)
+ LONG: I Gain(0)
+ 纵向:I增益(0)
- LONG: FF Gain(100)
- 纵向:前馈增益(100)
+ LONG: FF Gain(100)
+ 纵向:前馈增益(100)
- LONG: ActuatorDelay(20)
- 纵向:执行器延迟(20)
+ LONG: ActuatorDelay(20)
+ 纵向:执行器延迟(20)
- LONG: VEgoStopping(50)
- 纵向:自车停止因子(50)
+ LONG: VEgoStopping(50)
+ 纵向:自车停止因子(50)
- Stopping factor
- 停止因子
+ Stopping factor
+ 停止因子
- LONG: Radar reaction factor(100)
- 纵向:雷达反应系数(100)
+ LONG: Radar reaction factor(100)
+ 纵向:雷达反应系数(100)
- LONG: StoppingStartAccelx0.01(-40)
- 纵向:停止开始加速度x0.01(-40)
+ LONG: StoppingStartAccelx0.01(-40)
+ 纵向:停止开始加速度x0.01(-40)
- LONG: StopDistance (600)cm
- 纵向:停止距离(600)cm
+ LONG: StopDistance (600)cm
+ 纵向:停止距离(600)cm
- LONG: Jerk Lead Factor (0)
- 纵向:前车冲击因子(0)
+ LONG: Jerk Lead Factor (0)
+ 纵向:前车冲击因子(0)
- x0.01
- x0.01
+ x0.01
+ x0.01
- ACCEL:0km/h(160)
- 加速:0km/h(160)
+ ACCEL:0km/h(160)
+ 加速:0km/h(160)
Acceleration needed at specified speed.(x0.01m/s^2)
- 指定速度所需加速度(x0.01m/s^2)。
+ 指定速度所需加速度(x0.01 m/s^2)。
- ACCEL:10km/h(160)
- 加速:10km/h(160)
+ ACCEL:10km/h(160)
+ 加速:10km/h(160)
- ACCEL:40km/h(120)
- 加速:40km/h(120)
+ ACCEL:40km/h(120)
+ 加速:40km/h(120)
- ACCEL:60km/h(100)
- 加速:60km/h(100)
+ ACCEL:60km/h(100)
+ 加速:60km/h(100)
- ACCEL:80km/h(80)
- 加速:80km/h(80)
+ ACCEL:80km/h(80)
+ 加速:80km/h(80)
- ACCEL:110km/h(70)
- 加速:110km/h(70)
+ ACCEL:110km/h(70)
+ 加速:110km/h(70)
- ACCEL:140km/h(60)
- 加速:140km/h(60)
+ ACCEL:140km/h(60)
+ 加速:140km/h(60)
MaxAngleFrames(89)
- 最大角度帧(89)
+ 最大转角帧数(89)
89:Basic, steering instrument panel error 85~87
- 89:基础;仪表转向错误85~87
+ 89:基础;仪表盘转向报错 85~87
- Debug Info
- 调试信息
+ Debug Info
+ 调试信息
Tpms Info
- 胎压信息
+ 胎压监测信息
- Time Info
- 时间信息
+ Time Info
+ 时间信息
- 0:None,1:Time/Date,2:Time,3:Date
- 0:无, 1:时间/日期, 2:时间, 3:日期
+ 0:None,1:Time/Date,2:Time,3:Date
+ 0:无, 1:时间/日期, 2:时间, 3:日期
- Path End
- 路径终点
+ Path End
+ 路径终点
- 0:None,1:Display
- 0:不显示, 1:显示
+ 0:None,1:Display
+ 0:不显示, 1:显示
- Device State
- 设备状态
+ Device State
+ 设备状态
- Lane Info
- 车道信息
+ Lane Info
+ 车道信息
- -1:None, 0:Path, 1:Path+Lane, 2: Path+Lane+RoadEdge
- -1:无, 0:路径, 1:路径+车道, 2:路径+车道+路缘
+ -1:None, 0:Path, 1:Path+Lane, 2: Path+Lane+RoadEdge
+ -1:无, 0:路径, 1:路径+车道, 2:路径+车道+路缘
- Radar Info
- 雷达信息
+ Radar Info
+ 雷达信息
- 0:None,1:Display,2:RelPos,3:Stopped Car
- 0:不显示, 1:显示, 2:相对位置, 3:静止车辆
+ 0:None,1:Display,2:RelPos,3:Stopped Car
+ 0:不显示, 1:显示, 2:相对位置, 3:静止车辆
- Route Info
- 路线信息
+ Route Info
+ 路线信息
Debug plot
- 调试曲线
+ 调试图表
- Brightness ratio
- 亮度比例
+ Brightness ratio
+ 亮度比例
- Path Color: Cruise OFF
- 路径颜色:未巡航
+ Path Color: Cruise OFF
+ 路径颜色:未巡航
- (+10:Stroke)0:Red,1:Orange,2:Yellow,3:Green,4:Blue,5:Indigo,6:Violet,7:Brown,8:White,9:Black
- (+10:描边)0:红,1:橙,2:黄,3:绿,4:蓝,5:靛,6:紫,7:棕,8:白,9:黑
+ (+10:Stroke)0:Red,1:Orange,2:Yellow,3:Green,4:Blue,5:Indigo,6:Violet,7:Brown,8:White,9:Black
+ (+10:描边)0:红,1:橙,2:黄,3:绿,4:蓝,5:靛,6:紫,7:棕,8:白,9:黑
- Path Mode: Laneless
- 路径模式:无车道线
+ Path Mode: Laneless
+ 路径模式:无车道线
- 0:Normal,1,2:Rec,3,4:^^,5,6:Rec,7,8:^^,9,10,11,12:Smooth^^
- 0:普通,1,2:推荐,3,4:^^,5,6:推荐,7,8:^^,9~12:平滑^^
+ 0:Normal,1,2:Rec,3,4:^^,5,6:Rec,7,8:^^,9,10,11,12:Smooth^^
+ 0:普通,1,2:推荐,3,4:^^,5,6:推荐,7,8:^^,9~12:平滑^^
- Path Color: Laneless
- 路径颜色:无车道线
+ Path Color: Laneless
+ 路径颜色:无车道线
- Path Mode: LaneMode
- 路径模式:有车道线
+ Path Mode: LaneMode
+ 路径模式:有车道线
- Path Color: LaneMode
- 路径颜色:有车道线
+ Path Color: LaneMode
+ 路径颜色:有车道线
- Path Width ratio(100%)
- 路径宽度比例(100%)
+ Path Width ratio(100%)
+ 路径宽度比例(100%)
HYUNDAI: CAMERA SCC
- 现代:摄像头SCC
+ 现代:摄像头 SCC
1:Connect the SCC's CAN line to CAM, 2:Sync Cruise state, 3:StockLong
- 1:将SCC的CAN接至CAM, 2:同步巡航状态, 3:原厂纵向
+ 1:将 SCC 的 CAN 接至 CAM, 2:同步巡航状态, 3:保留原厂纵向
CANFD: HDA2 mode
@@ -806,27 +806,27 @@
DestinationWidget
Home
-
+ 家
Work
-
+ 公司
No destination set
-
+ 未设置目的地
home
-
+ 家
work
-
+ 公司
No %1 location set
-
+ 未设置 %1 位置
@@ -888,11 +888,11 @@
Reset Calibration
- 重置设备校准
+ 重置设备校准
RESET
- 重置
+ 重置
Are you sure you want to reset calibration?
@@ -984,7 +984,7 @@
Reset
- 重置
+ 重置
Review
@@ -1059,23 +1059,23 @@
DrawCarrot
ECO
-
+ 经济
SAFE
-
+ 安全
NORM
-
+ 标准
FAST
-
+ 激进
ERRM
-
+ 错误
@@ -1106,27 +1106,29 @@
openpilot 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.
-
+ openpilot 通过观察人类驾驶来学习驾驶,就像你一样。
+
+训练数据上传模式允许您最大化训练数据上传,以提高 openpilot 的驾驶模型。更多数据意味着更大的模型,这意味着更好的试验模式。
Firehose Mode: ACTIVE
-
+ 训练数据上传模式:启用
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>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 openpilot (and particular forks) are able to be used for training.
-
+ 为了最大效果,请将设备带入室内并每周连接到好的 USB-C 适配器和 Wi-Fi。<br><br>训练数据上传模式也可以在您驾驶时使用,如果连接到热点或无限 SIM 卡。<br><br><br><b>常见问题</b><br><br><i>我驾驶的方式或地点重要吗?</i> 不重要,只需像平常一样驾驶。<br><br><i>什么是好的 USB-C 适配器?</i> 任何快速的手机或笔记本电脑充电器都应该可以。<br><br><i>运行哪个软件很重要吗?</i> 是的,只有上游 openpilot(和特定分支)才能用于训练。
<b>%1 %2</b> of your driving are in the training dataset so far.
-
+ <b>%1 %2</b> 的驾驶数据已纳入训练数据集。
ACTIVE
-
+ 启用
<span stylesheet='font-size: 60px; font-weight: bold; color: #e74c3c;'>INACTIVE</span>: connect to unmetered network
-
+ <span stylesheet='font-size: 60px; font-weight: bold; color: #e74c3c;'>未启用</span>: 连接到未计量网络
@@ -1168,45 +1170,45 @@ Firehose Mode allows you to maximize your training data uploads to improve openp
MapETA
eta
-
+ 预计到达
min
-
+ 分钟
hr
-
+ 小时
MapSettings
NAVIGATION
-
+ 导航
Manage at %1
-
+ 在 %1 管理
Manage at connect.comma.ai
-
+ 在 connect.comma.ai 管理
MapWindow
Map Loading
-
+ 地图加载中
Waiting for GPS(APN)
-
+ 正在等待 GPS(APN)
Waiting for route
-
+ 正在等待路线
@@ -1364,15 +1366,15 @@ Firehose Mode allows you to maximize your training data uploads to improve openp
PathEndDrawer
Signal Error
-
+ 信号错误
Signal Ready
-
+ 信号就绪
Signal slowing
-
+ 信号减速
@@ -1421,419 +1423,419 @@ Firehose Mode allows you to maximize your training data uploads to improve openp
QObject
Button: Cruise Button Mode
- 按键:巡航按钮模式
+ 按键:巡航按钮模式
0:Normal,1:User1,2:User2
- 0:默认, 1:用户1, 2:用户2
+ 0:默认, 1:用户1, 2:用户2
Button: Cancel Button Mode
- 按键:取消按钮模式
+ 按键:取消按钮模式
0:Long,1:Long+Lat
- 0:纵向, 1:纵向+横向
+ 0:纵向, 1:纵向+横向
Button: LFA Button Mode
- 按键:LFA 按钮模式
+ 按键:LFA 按钮模式
0:Normal,1:Decel&Stop&LeadCarReady
- 0:默认, 1:减速&停车&前车就绪
+ 0:默认, 1:减速&停车&前车就绪
Button: Cruise Speed Unit(Basic)
- 按键:巡航步进(基础)
+ 按键:巡航步进(基础)
Button: Cruise Speed Unit(Extra)
- 按键:巡航步进(扩展)
+ 按键:巡航步进(扩展)
CRUISE: Eco control(4km/h)
- 巡航:经济控制(4km/h)
+ 巡航:经济控制(4km/h)
Temporarily increasing the set speed to improve fuel efficiency.
- 短暂提高设定车速以提升燃油效率。
+ 短暂提高设定车速以提升燃油效率。
CRUISE: Auto speed up (0%)
- 巡航:自动提速 (0%)
+ 巡航:自动提速 (0%)
Auto speed up based on the lead car up to RoadSpeedLimit.
- 基于前车自动提速,最高不超过道路限速。
+ 基于前车自动提速,最高不超过道路限速。
GAP1: Apply TFollow (110)x0.01s
- 间距1:应用时距(110)x0.01秒
+ 间距1:应用时距(110)x0.01秒
GAP2: Apply TFollow (120)x0.01s
- 间距2:应用时距(120)x0.01秒
+ 间距2:应用时距(120)x0.01秒
GAP3: Apply TFollow (160)x0.01s
- 间距3:应用时距(160)x0.01秒
+ 间距3:应用时距(160)x0.01秒
GAP4: Apply TFollow (180)x0.01s
- 间距4:应用时距(180)x0.01秒
+ 间距4:应用时距(180)x0.01秒
Dynamic GAP control
- 动态间距控制
+ 动态间距控制
Dynamic GAP control (LaneChange)
- 动态间距控制(变道)
+ 动态间距控制(变道)
DRIVEMODE: Select
- 驾驶模式:选择
+ 驾驶模式:选择
1:ECO,2:SAFE,3:NORMAL,4:HIGH
- 1:节能, 2:安全, 3:标准, 4:高速
+ 1:节能, 2:安全, 3:标准, 4:高速
DRIVEMODE: Auto
- 驾驶模式:自动
+ 驾驶模式:自动
NORMAL mode only
- 仅在标准模式下生效
+ 仅在标准模式下生效
TrafficLight DetectMode
- 红绿灯检测模式
+ 红绿灯检测模式
0:None, 1:Stopping only, 2: Stop & Go
- 0:关闭, 1:仅停车, 2:停车后起步
+ 0:关闭, 1:仅停车, 2:停车后起步
Laneline mode speed(0)
- 车道线模式速度(0)
+ 车道线模式速度(0)
Laneline mode, lat_mpc control used
- 车道线模式,使用横向 MPC 控制
+ 车道线模式,使用横向 MPC 控制
Laneline mode curve speed(0)
- 车道线模式弯道速度(0)
+ 车道线模式弯道速度(0)
Laneline mode, high speed only
- 车道线模式,仅在高速下使用
+ 车道线模式,仅在高速下使用
AdjustLaneOffset(0)cm
- 车道偏移调整(0)cm
+ 车道偏移调整(0)cm
LaneChange need torque
- 变道需要扭矩
+ 变道需要扭矩
-1:Disable lanechange, 0: no need torque, 1:need torque
- -1:禁用变道, 0:无需扭矩, 1:需要扭矩
+ -1:禁用变道, 0:无需扭矩, 1:需要扭矩
LaneChange delay
- 变道延迟
+ 变道延迟
x0.1sec
- 单位0.1秒
+ 单位0.1秒
LaneChange Bsd
- 变道盲区检测
+ 变道盲区检测
-1:ignore bsd, 0:BSD detect, 1: block steer torque
- -1:忽略BSD, 0:检测BSD, 1:限制转向扭矩
+ -1:忽略BSD, 0:检测BSD, 1:限制转向扭矩
LAT: SteerRatiox0.1(0)
- 横向:转向比x0.1(0)
+ 横向:转向比x0.1(0)
Custom SteerRatio
- 自定义转向比
+ 自定义转向比
LAT: SteerRatioRatex0.01(100)
- 横向:转向比变化率x0.01(100)
+ 横向:转向比变化率x0.01(100)
SteerRatio apply rate
- 转向比应用速率
+ 转向比应用速率
LAT: PathOffset
- 横向:路径偏移
+ 横向:路径偏移
(-)left, (+)right
- (-)左移, (+)右移
+ (-)左移, (+)右移
LAT:SteerActuatorDelay(30)
- 横向:转向执行器延迟(30)
+ 横向:转向执行器延迟(30)
x0.01, 0:LiveDelay
- 单位0.01,0为实时延迟
+ 单位0.01,0为实时延迟
LAT: TorqueCustom(0)
- 横向:自定义扭矩(0)
+ 横向:自定义扭矩(0)
LAT: TorqueAccelFactor(2500)
- 横向:扭矩加速度系数(2500)
+ 横向:扭矩加速度系数(2500)
LAT: TorqueFriction(100)
- 横向:扭矩摩擦(100)
+ 横向:扭矩摩擦(100)
LAT: CustomSteerMax(0)
- 横向:自定义最大转向(0)
+ 横向:自定义最大转向(0)
LAT: CustomSteerDeltaUp(0)
- 横向:自定义转向上升速率(0)
+ 横向:自定义转向上升速率(0)
LAT: CustomSteerDeltaDown(0)
- 横向:自定义转向下降速率(0)
+ 横向:自定义转向下降速率(0)
LONG: P Gain(100)
- 纵向:P增益(100)
+ 纵向:P增益(100)
LONG: I Gain(0)
- 纵向:I增益(0)
+ 纵向:I增益(0)
LONG: FF Gain(100)
- 纵向:前馈增益(100)
+ 纵向:前馈增益(100)
LONG: ActuatorDelay(20)
- 纵向:执行器延迟(20)
+ 纵向:执行器延迟(20)
LONG: VEgoStopping(50)
- 纵向:自车停止因子(50)
+ 纵向:自车停止因子(50)
Stopping factor
- 停止因子
+ 停止因子
LONG: Radar reaction factor(100)
- 纵向:雷达反应系数(100)
+ 纵向:雷达反应系数(100)
LONG: StoppingStartAccelx0.01(-40)
- 纵向:停止开始加速度x0.01(-40)
+ 纵向:停止开始加速度x0.01(-40)
LONG: StopDistance (600)cm
- 纵向:停止距离(600)cm
+ 纵向:停止距离(600)cm
LONG: Jerk Lead Factor (0)
- 纵向:前车冲击因子(0)
+ 纵向:前车冲击因子(0)
x0.01
- x0.01
+ x0.01
ACCEL:0km/h(160)
- 加速:0km/h(160)
+ 加速:0km/h(160)
Acceleration needed at specified speed.(x0.01m/s^2)
- 指定速度所需加速度(x0.01m/s^2)。
+ 指定速度所需加速度(x0.01m/s^2)。
ACCEL:10km/h(160)
- 加速:10km/h(160)
+ 加速:10km/h(160)
ACCEL:40km/h(120)
- 加速:40km/h(120)
+ 加速:40km/h(120)
ACCEL:60km/h(100)
- 加速:60km/h(100)
+ 加速:60km/h(100)
ACCEL:80km/h(80)
- 加速:80km/h(80)
+ 加速:80km/h(80)
ACCEL:110km/h(70)
- 加速:110km/h(70)
+ 加速:110km/h(70)
ACCEL:140km/h(60)
- 加速:140km/h(60)
+ 加速:140km/h(60)
MaxAngleFrames(89)
- 最大角度帧(89)
+ 最大角度帧(89)
89:Basic, steering instrument panel error 85~87
- 89:基础;仪表转向错误85~87
+ 89:基础;仪表转向错误85~87
Debug Info
- 调试信息
+ 调试信息
Tpms Info
- 胎压信息
+ 胎压信息
Time Info
- 时间信息
+ 时间信息
0:None,1:Time/Date,2:Time,3:Date
- 0:无, 1:时间/日期, 2:时间, 3:日期
+ 0:无, 1:时间/日期, 2:时间, 3:日期
Path End
- 路径终点
+ 路径终点
0:None,1:Display
- 0:不显示, 1:显示
+ 0:不显示, 1:显示
Device State
- 设备状态
+ 设备状态
Lane Info
- 车道信息
+ 车道信息
-1:None, 0:Path, 1:Path+Lane, 2: Path+Lane+RoadEdge
- -1:无, 0:路径, 1:路径+车道, 2:路径+车道+路缘
+ -1:无, 0:路径, 1:路径+车道, 2:路径+车道+路缘
Radar Info
- 雷达信息
+ 雷达信息
0:None,1:Display,2:RelPos,3:Stopped Car
- 0:不显示, 1:显示, 2:相对位置, 3:静止车辆
+ 0:不显示, 1:显示, 2:相对位置, 3:静止车辆
Route Info
- 路线信息
+ 路线信息
Debug plot
- 调试曲线
+ 调试曲线
Brightness ratio
- 亮度比例
+ 亮度比例
Path Color: Cruise OFF
- 路径颜色:未巡航
+ 路径颜色:未巡航
(+10:Stroke)0:Red,1:Orange,2:Yellow,3:Green,4:Blue,5:Indigo,6:Violet,7:Brown,8:White,9:Black
- (+10:描边)0:红,1:橙,2:黄,3:绿,4:蓝,5:靛,6:紫,7:棕,8:白,9:黑
+ (+10:描边)0:红,1:橙,2:黄,3:绿,4:蓝,5:靛,6:紫,7:棕,8:白,9:黑
Path Mode: Laneless
- 路径模式:无车道线
+ 路径模式:无车道线
0:Normal,1,2:Rec,3,4:^^,5,6:Rec,7,8:^^,9,10,11,12:Smooth^^
- 0:普通,1,2:推荐,3,4:^^,5,6:推荐,7,8:^^,9~12:平滑^^
+ 0:普通,1,2:推荐,3,4:^^,5,6:推荐,7,8:^^,9~12:平滑^^
Path Color: Laneless
- 路径颜色:无车道线
+ 路径颜色:无车道线
Path Mode: LaneMode
- 路径模式:有车道线
+ 路径模式:有车道线
Path Color: LaneMode
- 路径颜色:有车道线
+ 路径颜色:有车道线
Path Width ratio(100%)
- 路径宽度比例(100%)
+ 路径宽度比例(100%)
km
-
+ 千米
m
-
+ 米
mi
-
+ 英里
ft
-
+ 英尺
Reboot
- 重启
+ 重启
Exit
- 退出
+ 退出
carrotpilot
-
+ carrotpilot
now
- 现在
+ 现在
%n minute(s) ago
-
+
%n 分钟前
%n hour(s) ago
-
+
%n 小时前
%n day(s) ago
-
+
%n 天前
@@ -2232,11 +2234,11 @@ This may take up to a minute.
Welcome to openpilot
-
+ 欢迎使用openpilot
You must accept the Terms and Conditions to use openpilot. Read the latest terms at <span style='color: #465BEA;'>https://comma.ai/terms</span> before continuing.
-
+ 您必须接受使用条款和条件才能使用openpilot。在继续之前,请阅读最新的使用条款 <span style='color: #465BEA;'>https://comma.ai/terms</span>。
@@ -2355,11 +2357,11 @@ This may take up to a minute.
Record and Upload Microphone Audio
-
+ 录制并上传麦克风音频
Record and store microphone audio while driving. The audio will be included in the dashcam video in comma connect.
-
+ 录制并存储麦克风音频。音频将包含在comma connect中的行车记录仪视频中。