diff --git a/selfdrive/controls/lib/events.py b/selfdrive/controls/lib/events.py index 37c8b42..52dcf22 100644 --- a/selfdrive/controls/lib/events.py +++ b/selfdrive/controls/lib/events.py @@ -34,16 +34,16 @@ class Priority(IntEnum): # 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' + ENABLE = '启用' + PRE_ENABLE = '预启用' + OVERRIDE_LATERAL = '覆盖横向' + OVERRIDE_LONGITUDINAL = '覆盖纵向' + NO_ENTRY = '无入口' + WARNING = '警告' + USER_DISABLE = '用户禁用' + SOFT_DISABLE = '软禁用' + IMMEDIATE_DISABLE = '立即禁用' + PERMANENT = '永久' # get event name from enum @@ -149,7 +149,7 @@ class Alert: 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, @@ -158,7 +158,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.), @@ -168,12 +168,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.), @@ -195,12 +195,11 @@ 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.), - # ********** 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))) @@ -237,28 +236,27 @@ def startup_master_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubM def below_engage_speed_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> Alert: return NoEntryAlert(f"Drive above {get_display_speed(CP.minEnableSpeed, metric)} to engage") - def below_steer_speed_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> 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) def calibration_incomplete_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> 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) def no_gps_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> Alert: return Alert( - "Poor GPS reception", - "Hardware malfunctioning if sky is visible", + "GPS信号差", + "如果天空可见,则硬件故障", AlertStatus.normal, AlertSize.mid, Priority.LOWER, VisualAlert.none, AudibleAlert.none, .2, creation_delay=300.) @@ -266,13 +264,13 @@ def torque_nn_load_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubM model_name = params.get("NNFFModelName", encoding='utf-8') if model_name == "": return Alert( - "NNFF Torque Controller not available", - "Donate logs to Twilsonco to get your car supported!", + "NNFF扭矩控制器不可用", + "请捐赠日志给Twilsonco以支持您的车辆!", AlertStatus.userPrompt, AlertSize.mid, Priority.LOW, VisualAlert.none, AudibleAlert.prompt, 5.0) else: return Alert( - "NNFF Torque Controller loaded", + "NNFF扭矩控制器已加载", model_name, AlertStatus.frogpilot, AlertSize.mid, Priority.LOW, VisualAlert.none, AudibleAlert.engage, 5.0) @@ -281,75 +279,73 @@ def torque_nn_load_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) -> 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) -> 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} m/s" + return NoEntryAlert(msg, alert_text_1="姿态网络速度无效") def process_not_running_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> 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) -> 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) -> 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) -> 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 overheat_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> Alert: 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) -> 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) -> 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) -> Alert: - return NormalPermanentAlert("Driving Model Lagging", f"{sm['modelV2'].frameDropPerc:.1f}% frames dropped") + 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) -> Alert: - text = "Enable Adaptive Cruise to Engage" + text = "启用自适应巡航以进行接入" if CP.carName == "honda": - text = "Enable Main Switch to Engage" + text = "启用主开关以进行接入" return NoEntryAlert(text) def joystick_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> Alert: axes = sm['testJoystick'].axes gb, steer = list(axes)[:2] if len(axes) else (0., 0.) - 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) # FrogPilot Alerts def holiday_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> Alert: @@ -378,11 +374,11 @@ def holiday_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, def no_lane_available_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int) -> Alert: lane_width = sm['frogpilotPlan'].laneWidthLeft if CS.leftBlinker else sm['frogpilotPlan'].laneWidthRight - lane_width_msg = f"{lane_width:.1f} meters" if metric else f"{lane_width * CV.METER_TO_FOOT:.1f} feet" + lane_width_msg = f"{lane_width:.1f} 米" if metric else f"{lane_width * CV.METER_TO_FOOT:.1f} 英尺" return Alert( - "No lane available", - f"Detected lane width is only {lane_width_msg}", + "没有可用车道", + f"检测到的车道宽度仅为 {lane_width_msg}", AlertStatus.normal, AlertSize.mid, Priority.LOWEST, VisualAlert.none, AudibleAlert.none, .2) @@ -410,66 +406,66 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { ET.PERMANENT: startup_master_alert, }, - # Car is recognized, but marked as dashcam only + # 车辆已识别,但仅标记为行车记录仪模式 EventName.startupNoControl: { - ET.PERMANENT: StartupAlert("Dashcam mode"), - ET.NO_ENTRY: NoEntryAlert("Dashcam mode"), + ET.PERMANENT: StartupAlert("行车记录仪模式"), + ET.NO_ENTRY: NoEntryAlert("行车记录仪模式"), }, - # Car is not recognized + # 车辆未被识别 EventName.startupNoCar: { - ET.PERMANENT: StartupAlert("Dashcam mode for unsupported car"), + ET.PERMANENT: StartupAlert("不支持的车辆的行车记录仪模式"), }, EventName.startupNoFw: { - ET.PERMANENT: StartupAlert("Car Unrecognized", - "Check comma power connections", + ET.PERMANENT: StartupAlert("车辆未识别", + "检查逗号电源连接", alert_status=AlertStatus.userPrompt), }, EventName.dashcamMode: { - ET.PERMANENT: NormalPermanentAlert("Dashcam Mode", + ET.PERMANENT: NormalPermanentAlert("行车记录仪模式", priority=Priority.LOWEST), }, EventName.invalidLkasSetting: { - ET.PERMANENT: NormalPermanentAlert("Stock LKAS is on", - "Turn off stock LKAS to engage"), + ET.PERMANENT: NormalPermanentAlert("库存LKAS已开启", + "关闭库存LKAS以启用"), }, EventName.cruiseMismatch: { - #ET.PERMANENT: ImmediateDisableAlert("openpilot failed to cancel cruise"), + #ET.PERMANENT: ImmediateDisableAlert("openpilot未能取消巡航"), }, - # openpilot doesn't recognize the car. This switches openpilot into a + # openpilot未能识别车辆。这将使openpilot切换到一个 # 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.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.), @@ -479,7 +475,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), @@ -487,7 +483,7 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { EventName.preDriverDistracted: { ET.WARNING: Alert( - "Pay Attention", + "请注意", "", AlertStatus.normal, AlertSize.small, Priority.LOW, VisualAlert.none, AudibleAlert.none, .1), @@ -495,23 +491,23 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { EventName.promptDriverDistracted: { ET.WARNING: Alert( - "Pay Attention", - "Driver Distracted", + "请注意", + "驾驶员分心", AlertStatus.userPrompt, AlertSize.mid, Priority.MID, VisualAlert.steerRequired, AudibleAlert.promptDistracted, .1), }, EventName.driverDistracted: { ET.WARNING: Alert( - "DISENGAGE IMMEDIATELY", - "Driver Distracted", + "立即脱离控制", + "驾驶员分心", AlertStatus.critical, AlertSize.full, Priority.HIGH, VisualAlert.steerRequired, AudibleAlert.warningImmediate, .1), }, EventName.preDriverUnresponsive: { ET.WARNING: Alert( - "Touch Steering Wheel: No Face Detected", + "触摸方向盘:未检测到面部", "", AlertStatus.normal, AlertSize.small, Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, .1, alert_rate=0.75), @@ -519,31 +515,31 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { EventName.promptDriverUnresponsive: { ET.WARNING: Alert( - "Touch Steering Wheel", - "Driver Unresponsive", + "触摸方向盘", + "驾驶员未响应", AlertStatus.userPrompt, AlertSize.mid, Priority.MID, VisualAlert.steerRequired, AudibleAlert.promptDistracted, .1), }, EventName.driverUnresponsive: { ET.WARNING: 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.MID, VisualAlert.none, AudibleAlert.none, .2), @@ -555,7 +551,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, alert_rate=0.75), @@ -563,7 +559,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, alert_rate=0.75), @@ -571,7 +567,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), @@ -579,7 +575,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), @@ -587,44 +583,44 @@ 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.gpsMalfunction: { - ET.PERMANENT: NormalPermanentAlert("GPS Malfunction", "Likely Hardware Issue"), + ET.PERMANENT: NormalPermanentAlert("GPS故障", "可能的硬件问题"), }, 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 @@ -636,14 +632,14 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { # 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: NoEntryAlert("paramsd Temporary Error"), - ET.SOFT_DISABLE: soft_disable_alert("paramsd Temporary Error"), + ET.NO_ENTRY: NoEntryAlert("paramsd 临时错误"), + 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 ********** @@ -662,28 +658,28 @@ 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.USER_DISABLE: EngagementAlert(AudibleAlert.disengage), - ET.NO_ENTRY: NoEntryAlert("Brake Hold Active"), + ET.NO_ENTRY: NoEntryAlert("刹车保持激活"), }, 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.preEnableStandstill: { ET.PRE_ENABLE: Alert( - "Release Brake to Engage", + "释放刹车以启用", "", AlertStatus.normal, AlertSize.small, Priority.LOWEST, VisualAlert.none, AudibleAlert.none, .1, creation_delay=1.), @@ -711,27 +707,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: { @@ -740,12 +736,12 @@ 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: { @@ -753,12 +749,12 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { }, EventName.soundsUnavailable: { - ET.PERMANENT: NormalPermanentAlert("Speaker not found", "Reboot your Device"), - ET.NO_ENTRY: NoEntryAlert("Speaker not found"), + ET.PERMANENT: NormalPermanentAlert("未找到扬声器", "请重启设备"), + ET.NO_ENTRY: NoEntryAlert("未找到扬声器"), }, EventName.tooDistracted: { - ET.NO_ENTRY: NoEntryAlert("Distraction Level Too High"), + ET.NO_ENTRY: NoEntryAlert("分心程度过高"), }, EventName.overheat: { @@ -779,40 +775,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 @@ -820,36 +816,36 @@ 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.controlsdLagging: { - ET.SOFT_DISABLE: soft_disable_alert("Controls Lagging"), - ET.NO_ENTRY: NoEntryAlert("Controls 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("雷达错误:请重启汽车"), }, # 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, }, @@ -859,21 +855,21 @@ 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("姿态网络速度无效"), 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.highCpuUsage: { @@ -883,148 +879,142 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { }, 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.controlsMismatch: { - ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("Controls Mismatch"), - ET.NO_ENTRY: NoEntryAlert("Controls Mismatch"), + ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("控制不匹配"), + ET.NO_ENTRY: NoEntryAlert("控制不匹配"), }, EventName.roadCameraError: { - ET.PERMANENT: NormalPermanentAlert("Camera CRC Error - Road", + ET.PERMANENT: NormalPermanentAlert("摄像头 CRC 错误 - 道路", duration=1., creation_delay=30.), }, EventName.wideRoadCameraError: { - ET.PERMANENT: NormalPermanentAlert("Camera CRC Error - Road Fisheye", + ET.PERMANENT: NormalPermanentAlert("摄像头 CRC 错误 - 道路鱼眼", duration=1., creation_delay=30.), }, EventName.driverCameraError: { - ET.PERMANENT: NormalPermanentAlert("Camera CRC Error - Driver", + ET.PERMANENT: NormalPermanentAlert("摄像头 CRC 错误 - 驾驶员", duration=1., creation_delay=30.), }, - # Sometimes the USB stack on the device can get into a bad state - # causing the connection to the panda to be lost + # 有时设备上的 USB 堆栈可能会进入不良状态 + # 导致与 panda 的连接丢失 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: - # - 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 + # 此警报可能因以下原因触发: + # - 根本没有接收到 CAN 数据 + # - 收到了 CAN 数据,但某些消息未按正确频率接收 + # 如果您没有编写新的汽车端口,这通常是由于接线故障 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", + "倒车\n档", "", 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 - # 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("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.), }, - # 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.lowSpeedLockout: { - ET.PERMANENT: NormalPermanentAlert("Cruise Fault: Restart the car to engage"), - ET.NO_ENTRY: NoEntryAlert("Cruise Fault: Restart the Car"), + ET.PERMANENT: NormalPermanentAlert("巡航故障:重启汽车以启用"), + ET.NO_ENTRY: NoEntryAlert("巡航故障:重启汽车"), }, EventName.lkasDisabled: { - ET.PERMANENT: NormalPermanentAlert("LKAS Disabled: Enable LKAS to engage"), - ET.NO_ENTRY: NoEntryAlert("LKAS Disabled"), + ET.PERMANENT: NormalPermanentAlert("LKAS已禁用:启用LKAS以启用"), + ET.NO_ENTRY: NoEntryAlert("LKAS已禁用"), }, 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("车辆传感器正在校准"), }, - # FrogPilot Events EventName.blockUser: { - ET.NO_ENTRY: NoEntryAlert("Please don't use the 'Development' branch!"), + ET.NO_ENTRY: NoEntryAlert("请不要使用 'Development' 分支!"), }, EventName.goatSteerSaturated: { ET.WARNING: Alert( - "Turn Exceeds Steering Limit", - "JESUS TAKE THE WHEEL!!", + "转向超过限制", + "耶稣,请掌舵!!", AlertStatus.userPrompt, AlertSize.mid, Priority.LOW, VisualAlert.steerRequired, AudibleAlert.goat, 2.), }, EventName.greenLight: { ET.PERMANENT: Alert( - "Light turned green", + "灯变为绿色", "", AlertStatus.frogpilot, AlertSize.small, Priority.MID, VisualAlert.none, AudibleAlert.prompt, 3.), @@ -1036,7 +1026,7 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { EventName.laneChangeBlockedLoud: { ET.WARNING: Alert( - "Car Detected in Blindspot", + "盲区检测到车辆", "", AlertStatus.userPrompt, AlertSize.small, Priority.LOW, VisualAlert.none, AudibleAlert.warningSoft, .1), @@ -1044,7 +1034,7 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { EventName.leadDeparting: { ET.PERMANENT: Alert( - "Lead departed", + "前车已离开", "", AlertStatus.frogpilot, AlertSize.small, Priority.MID, VisualAlert.none, AudibleAlert.prompt, 3.), @@ -1056,23 +1046,23 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { EventName.openpilotCrashed: { ET.PERMANENT: Alert( - "openpilot crashed", - "Please post the error log in the FrogPilot Discord!", + "openpilot 崩溃", + "请在 FrogPilot Discord 中发布错误日志!", AlertStatus.normal, AlertSize.mid, Priority.HIGHEST, VisualAlert.none, AudibleAlert.none, 10.), }, EventName.pedalInterceptorNoBrake: { ET.WARNING: Alert( - "Braking Unavailable", - "Shift to L", + "刹车不可用", + "切换到 L", AlertStatus.userPrompt, AlertSize.mid, Priority.HIGH, VisualAlert.wrongGear, AudibleAlert.promptRepeat, 4.), }, EventName.speedLimitChanged: { ET.PERMANENT: Alert( - "Speed Limit Changed", + "速度限制已更改", "", AlertStatus.frogpilot, AlertSize.small, Priority.LOW, VisualAlert.none, AudibleAlert.prompt, 3.), @@ -1084,7 +1074,7 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { EventName.turningLeft: { ET.WARNING: Alert( - "Turning Left", + "左转", "", AlertStatus.normal, AlertSize.small, Priority.LOWEST, VisualAlert.none, AudibleAlert.none, .1, alert_rate=0.75), @@ -1092,7 +1082,7 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { EventName.turningRight: { ET.WARNING: Alert( - "Turning Right", + "右转", "", AlertStatus.normal, AlertSize.small, Priority.LOWEST, VisualAlert.none, AudibleAlert.none, .1, alert_rate=0.75), @@ -1101,7 +1091,7 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { # Random Events EventName.accel30: { ET.WARNING: Alert( - "UwU u went a bit fast there!", + "哇,你开得有点快!", "(⁄ ⁄•⁄ω⁄•⁄ ⁄)", AlertStatus.frogpilot, AlertSize.mid, Priority.LOW, VisualAlert.none, AudibleAlert.uwu, 4.), @@ -1109,15 +1099,15 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { EventName.accel35: { ET.WARNING: Alert( - "I ain't giving you no tree-fiddy", - "you damn Loch Ness monsta!", + "我不会给你树五十的", + "你这个该死的尼斯湖水怪!", AlertStatus.frogpilot, AlertSize.mid, Priority.LOW, VisualAlert.none, AudibleAlert.nessie, 4.), }, EventName.accel40: { ET.WARNING: Alert( - "Great Scott!", + "太棒了,斯科特!", "🚗💨", AlertStatus.frogpilot, AlertSize.mid, Priority.LOW, VisualAlert.none, AudibleAlert.doc, 4.), @@ -1125,23 +1115,23 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { EventName.firefoxSteerSaturated: { ET.WARNING: Alert( - "Turn Exceeds Steering Limit", - "IE Has Stopped Responding...", + "转向超过限制", + "IE 已停止响应...", AlertStatus.userPrompt, AlertSize.mid, Priority.LOW, VisualAlert.steerRequired, AudibleAlert.firefox, 4.), }, EventName.openpilotCrashedRandomEvents: { ET.PERMANENT: Alert( - "openpilot crashed 💩", - "Please post the error log in the FrogPilot Discord!", + "openpilot 崩溃 💩", + "请在 FrogPilot Discord 中发布错误日志!", AlertStatus.normal, AlertSize.mid, Priority.HIGHEST, VisualAlert.none, AudibleAlert.fart, 10.), }, EventName.vCruise69: { ET.PERMANENT: Alert( - "Lol 69", + "哈哈 69", "", AlertStatus.frogpilot, AlertSize.small, Priority.LOW, VisualAlert.none, AudibleAlert.noice, 2.), @@ -1149,7 +1139,7 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = { EventName.yourFrogTriedToKillMe: { ET.PERMANENT: Alert( - "Your frog tried to kill me...", + "你的青蛙试图杀了我...", "👺", AlertStatus.frogpilot, AlertSize.mid, Priority.MID, VisualAlert.none, AudibleAlert.angry, 5.),