一些中文

This commit is contained in:
1okko
2025-04-19 11:31:50 +08:00
parent 18b3117b83
commit 42b1379788
+6 -6
View File
@@ -192,7 +192,7 @@ class NormalPermanentAlert(Alert):
class StartupAlert(Alert):
def __init__(self, alert_text_1: str, alert_text_2: str = "Always keep hands on wheel and eyes on road", alert_status=AlertStatus.normal):
def __init__(self, alert_text_1: str, alert_text_2: str = "这不是自动驾驶", alert_status=AlertStatus.normal):
super().__init__(alert_text_1, alert_text_2,
alert_status, AlertSize.mid,
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 5.),
@@ -244,10 +244,10 @@ def below_steer_speed_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.S
def calibration_incomplete_alert(CP: car.CarParams, CS: car.CarState, sm: messaging.SubMaster, metric: bool, soft_disable_time: int, personality) -> Alert:
first_word = 'Recalibration' if sm['liveCalibration'].calStatus == log.LiveCalibrationData.Status.recalibrating else 'Calibration'
first_word = '重新校准' if sm['liveCalibration'].calStatus == log.LiveCalibrationData.Status.recalibrating else ''
return Alert(
f"{first_word} in Progress: {sm['liveCalibration'].calPerc:.0f}%",
f"Drive Above {get_display_speed(MIN_SPEED_FILTER, metric)}",
f"{first_word} : {sm['liveCalibration'].calPerc:.0f}%",
f"请保持车速高于 {get_display_speed(MIN_SPEED_FILTER, metric)}",
AlertStatus.normal, AlertSize.mid,
Priority.LOWEST, VisualAlert.none, AudibleAlert.none, .2)
@@ -384,7 +384,7 @@ EVENTS: dict[int, dict[str, Alert | AlertCallbackType]] = {
},
EventName.startup: {
ET.PERMANENT: StartupAlert("Be ready to take over at any time")
ET.PERMANENT: StartupAlert("注意安全、谨慎驾驶")
},
EventName.startupMaster: {
@@ -560,7 +560,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),