mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-09-15 12:03:44 +08:00
Compare commits
240 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 203de1ed49 | |||
| 1891c11918 | |||
| ed6f1da31f | |||
| 67a2ac0732 | |||
| 8e0dbb5486 | |||
| 0e17475449 | |||
| c8a01c5248 | |||
| 83be042013 | |||
| 8dd8d7e33e | |||
| 28dc70fe29 | |||
| 272adcb960 | |||
| ac47815391 | |||
| 1f9d3825bf | |||
| b68f0cff4a | |||
| 6be0e673b3 | |||
| 4b4c04b387 | |||
| 0f31b841ec | |||
| 294fd0eb8d | |||
| 9501be7614 | |||
| d020d2c83d | |||
| 775edcf65f | |||
| 444e219608 | |||
| 147a7593e7 | |||
| 2376b8b2e0 | |||
| 0ed5c393dc | |||
| 692129f012 | |||
| a866998462 | |||
| c500e51f29 | |||
| ddda7c7953 | |||
| 8d10aeb437 | |||
| e6647e61db | |||
| 73d8a0ca40 | |||
| 264e56f228 | |||
| c16791d735 | |||
| 5d900611ff | |||
| 29128cb006 | |||
| 5d0fccc8e4 | |||
| 38f446dfd0 | |||
| db753906ad | |||
| b9981168f1 | |||
| a50dbb22d0 | |||
| f3eb105e7a | |||
| 5dbcd65a7d | |||
| dddc29fdb7 | |||
| 9bfdbab1da | |||
| a9570e7eab | |||
| 0612f6162b | |||
| bdc5497603 | |||
| 461b0adcb2 | |||
| 04d7684b7c | |||
| 30737d6f18 | |||
| 2d9cc41871 | |||
| 6a353954e8 | |||
| 4507453c1d | |||
| 7ea0f9636f | |||
| 682bb349df | |||
| 14fd00051f | |||
| d8160015b7 | |||
| 53422a42e4 | |||
| b7ae456df0 | |||
| 6cbfa9ef2b | |||
| debfe847ff | |||
| ae0dbf52d9 | |||
| ab305f4d4f | |||
| 3ba8e21aa8 | |||
| e7580fd47f | |||
| 5281c6e047 | |||
| 2100ebb4db | |||
| 97c10c6a76 | |||
| eb4c746f9e | |||
| 06d301042a | |||
| c5a1244bfe | |||
| 2a5625e43d | |||
| f5a4fee857 | |||
| a6527a4af1 | |||
| 69c15b6c24 | |||
| 74d5114bb3 | |||
| 51e3102563 | |||
| 01e859daee | |||
| b255a2b3a8 | |||
| 26f73d91bc | |||
| 9080ac3b59 | |||
| 1d99e4bed7 | |||
| 409de73850 | |||
| 7d24dfc389 | |||
| ad6a84d1da | |||
| f875a55221 | |||
| a7f87c55cb | |||
| 0fbd36f6a5 | |||
| ba85e0125a | |||
| c9ce994f5e | |||
| b21b4c4d5c | |||
| 231a84bbda | |||
| 6798f3ea7f | |||
| 06cbc7c363 | |||
| 46c180dc2c | |||
| 08cd6e0c10 | |||
| b0e1df656b | |||
| 30a17d23cc | |||
| a647d01502 | |||
| a2ca21b502 | |||
| d04fd932e4 | |||
| 9ed6830263 | |||
| d14540b46a | |||
| f05c53ad8c | |||
| 2ee5cb61ee | |||
| 82721d8bc8 | |||
| 6f91fc9051 | |||
| c9ef907a3f | |||
| fff423ea5e | |||
| 1aefaf9bcf | |||
| ee5945fcb9 | |||
| b852ef96e4 | |||
| 50e0ee1e98 | |||
| 794331b9b3 | |||
| 1b13875c24 | |||
| e308d9df21 | |||
| c47d92d53e | |||
| ffba949e80 | |||
| 62aff30042 | |||
| a39185d4ff | |||
| 8c0a81dd51 | |||
| 00b52381e7 | |||
| 8f89061cc8 | |||
| f447d535ce | |||
| 2212764112 | |||
| 0539ed33de | |||
| 4f75739f81 | |||
| 7f895f57e4 | |||
| ff616558cc | |||
| 9750c8eae1 | |||
| ce85c85a40 | |||
| cdcf110c97 | |||
| 08071b48af | |||
| c050b6c383 | |||
| e5783bf3fd | |||
| 8cd913dade | |||
| 50fbc5cf71 | |||
| 921c91993a | |||
| 0ebb6441e9 | |||
| f46f416556 | |||
| a926ee5ef7 | |||
| ce7f054671 | |||
| 0f987c799c | |||
| 39a3480d26 | |||
| c4afd612cf | |||
| df7d57c657 | |||
| db709ce0ce | |||
| d3084128e4 | |||
| 4f7b7aac14 | |||
| 3957d92c14 | |||
| 19d91897aa | |||
| 41b57f4568 | |||
| d99dce1aa5 | |||
| fdde1eba3d | |||
| 8f981df2bb | |||
| 10e0ed5461 | |||
| f569f9a2f3 | |||
| 880ba97b8d | |||
| 9c4e6e4f1a | |||
| b70736ab33 | |||
| a35b875282 | |||
| 19ae57ad46 | |||
| 7a60cdd3aa | |||
| fd194c14a3 | |||
| 017c2e8473 | |||
| d47895f42e | |||
| 68a2fc2424 | |||
| e9340892f6 | |||
| e71738a666 | |||
| c9171abe1c | |||
| 1014772fd5 | |||
| 809ed323e9 | |||
| 1128037183 | |||
| 46994e713f | |||
| 6c0ef49134 | |||
| 4e3cfb5eeb | |||
| 21e04e4859 | |||
| ba6b5a754d | |||
| 495cfc9f9d | |||
| b44d0d9a41 | |||
| 94bace2180 | |||
| 5992dfad64 | |||
| 24587c52ad | |||
| 84829791ec | |||
| 3e8377ec69 | |||
| 91c106c50d | |||
| f1c249c315 | |||
| 33db3a46a6 | |||
| b6a7a76f94 | |||
| 201147b641 | |||
| 31f25d67b9 | |||
| e0c027647f | |||
| 3811b73472 | |||
| e4e0f9ae0e | |||
| 2dec513506 | |||
| 1b10f26612 | |||
| db8f6f2030 | |||
| f3d4fc2fb0 | |||
| a9dfc2c6b7 | |||
| 4acf552ee2 | |||
| 1a6246dc26 | |||
| 402bbc38dc | |||
| 2a28a5d45c | |||
| 91c322f32b | |||
| cecd626758 | |||
| c8d0db8245 | |||
| 7f0d7ad126 | |||
| c39515d089 | |||
| b3a5ca8665 | |||
| 0b34cf80ce | |||
| 448e332a6c | |||
| d7ac244156 | |||
| 0d40204bab | |||
| 5c1834fd74 | |||
| 4c19b948a2 | |||
| 677070934a | |||
| 42ef74155a | |||
| 7153b10dc9 | |||
| 66c382734a | |||
| d3fadbb53c | |||
| 1db92a0295 | |||
| 9b58d66b0c | |||
| 1249d3ceeb | |||
| d71241393b | |||
| 4a7b35aa5f | |||
| b9668d3992 | |||
| 21689dc822 | |||
| e77a179265 | |||
| 1cea4442f0 | |||
| b175441c76 | |||
| c137dd39bd | |||
| fe55d580f8 | |||
| 5d6cc9667f | |||
| 5e3bb1dcb9 | |||
| d23aee32c1 | |||
| 9a62d62e7c | |||
| acf9e76c49 | |||
| e799115747 | |||
| 3dcd643ac6 |
@@ -31,7 +31,7 @@
|
||||
|
||||
|
||||
# Android system locale, zh-TW = Traditional Chinese, zh-CN = Simplified Chinese
|
||||
lang=zh-TW
|
||||
lang=zh-CN
|
||||
|
||||
update_font=0
|
||||
remove_old_font=0
|
||||
|
||||
@@ -31,9 +31,9 @@ FRAMEBUFFER_LIBS = -lutils -lgui -lEGL
|
||||
.PHONY: all
|
||||
all: updater
|
||||
|
||||
OBJS = NotoSansCJKtc-Regular.otf.o \
|
||||
NotoSansCJKtc-Medium.otf.o \
|
||||
NotoSansCJKtc-Bold.otf.o \
|
||||
OBJS = opensans_regular.ttf.o \
|
||||
opensans_semibold.ttf.o \
|
||||
opensans_bold.ttf.o \
|
||||
../../selfdrive/common/touch.o \
|
||||
../../selfdrive/common/framebuffer.o \
|
||||
$(PHONELIBS)/json11/json11.o \
|
||||
@@ -52,15 +52,15 @@ updater: updater.o $(OBJS)
|
||||
-lcutils -lm -llog
|
||||
strip updater
|
||||
|
||||
NotoSansCJKtc-Regular.otf.o: ../../selfdrive/assets/fonts/NotoSansCJKtc-Regular.otf
|
||||
opensans_regular.ttf.o: ../../selfdrive/assets/fonts/opensans_regular.ttf
|
||||
@echo "[ bin2o ] $@"
|
||||
cd '$(dir $<)' && ld -r -b binary '$(notdir $<)' -o '$(abspath $@)'
|
||||
|
||||
NotoSansCJKtc-Bold.otf.o: ../../selfdrive/assets/fonts/NotoSansCJKtc-Bold.otf
|
||||
opensans_bold.ttf.o: ../../selfdrive/assets/fonts/opensans_bold.ttf
|
||||
@echo "[ bin2o ] $@"
|
||||
cd '$(dir $<)' && ld -r -b binary '$(notdir $<)' -o '$(abspath $@)'
|
||||
|
||||
NotoSansCJKtc-Medium.otf.o: ../../selfdrive/assets/fonts/NotoSansCJKtc-Medium.otf
|
||||
opensans_semibold.ttf.o: ../../selfdrive/assets/fonts/opensans_semibold.ttf
|
||||
@echo "[ bin2o ] $@"
|
||||
cd '$(dir $<)' && ld -r -b binary '$(notdir $<)' -o '$(abspath $@)'
|
||||
|
||||
|
||||
Binary file not shown.
@@ -43,12 +43,12 @@ const char *manifest_url = MANIFEST_URL_EON;
|
||||
|
||||
#define UPDATE_DIR "/data/neoupdate"
|
||||
|
||||
extern const uint8_t bin_opensans_regular[] asm("_binary_NotoSansCJKtc_Regular_otf_start");
|
||||
extern const uint8_t bin_opensans_regular_end[] asm("_binary_NotoSansCJKtc_Regular_otf_end");
|
||||
extern const uint8_t bin_opensans_semibold[] asm("_binary_NotoSansCJKtc_Medium_otf_start");
|
||||
extern const uint8_t bin_opensans_semibold_end[] asm("_binary_NotoSansCJKtc_Medium_otf_end");
|
||||
extern const uint8_t bin_opensans_bold[] asm("_binary_NotoSansCJKtc_Bold_otf_start");
|
||||
extern const uint8_t bin_opensans_bold_end[] asm("_binary_NotoSansCJKtc_Bold_otf_end");
|
||||
extern const uint8_t bin_opensans_regular[] asm("_binary_opensans_regular_ttf_start");
|
||||
extern const uint8_t bin_opensans_regular_end[] asm("_binary_opensans_regular_ttf_end");
|
||||
extern const uint8_t bin_opensans_semibold[] asm("_binary_opensans_semibold_ttf_start");
|
||||
extern const uint8_t bin_opensans_semibold_end[] asm("_binary_opensans_semibold_ttf_end");
|
||||
extern const uint8_t bin_opensans_bold[] asm("_binary_opensans_bold_ttf_start");
|
||||
extern const uint8_t bin_opensans_bold_end[] asm("_binary_opensans_bold_ttf_end");
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -322,18 +322,18 @@ struct Updater {
|
||||
std::string stage_download(std::string url, std::string hash, std::string name) {
|
||||
std::string out_fn = UPDATE_DIR "/" + util::base_name(url);
|
||||
|
||||
set_progress("下載 " + name + " 中...");
|
||||
set_progress("Downloading " + name + "...");
|
||||
bool r = download_file(url, out_fn);
|
||||
if (!r) {
|
||||
set_error("無法下載 " + name);
|
||||
set_error("failed to download " + name);
|
||||
return "";
|
||||
}
|
||||
|
||||
set_progress("驗證 " + name + " 中...");
|
||||
set_progress("Verifying " + name + "...");
|
||||
std::string fn_hash = sha256_file(out_fn);
|
||||
printf("得到 %s hash: %s\n", name.c_str(), hash.c_str());
|
||||
printf("got %s hash: %s\n", name.c_str(), hash.c_str());
|
||||
if (fn_hash != hash) {
|
||||
set_error(name + " 已損壞");
|
||||
set_error(name + " was corrupt");
|
||||
unlink(out_fn.c_str());
|
||||
return "";
|
||||
}
|
||||
@@ -357,7 +357,7 @@ struct Updater {
|
||||
}
|
||||
|
||||
if (!check_space()) {
|
||||
set_error("您需要至少 2GB 的空間進行升級");
|
||||
set_error("2GB of free space required to update");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -365,7 +365,7 @@ struct Updater {
|
||||
|
||||
const int EON = (access("/EON", F_OK) != -1);
|
||||
|
||||
set_progress("尋找最新的版本...");
|
||||
set_progress("Finding latest version...");
|
||||
std::string manifest_s;
|
||||
if (EON) {
|
||||
manifest_s = download_string(curl, manifest_url);
|
||||
@@ -374,12 +374,12 @@ struct Updater {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
printf("宣示說明: %s\n", manifest_s.c_str());
|
||||
printf("manifest: %s\n", manifest_s.c_str());
|
||||
|
||||
std::string err;
|
||||
auto manifest = json11::Json::parse(manifest_s, err);
|
||||
if (manifest.is_null() || !err.empty()) {
|
||||
set_error("無法載入新的宣示說明");
|
||||
set_error("failed to load update manifest");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -394,7 +394,7 @@ struct Updater {
|
||||
// std::string installer_hash = manifest["installer_hash"].string_value();
|
||||
|
||||
if (ota_url.empty() || ota_hash.empty()) {
|
||||
set_error("錯誤的宣示說明");
|
||||
set_error("invalid update manifest");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -406,12 +406,12 @@ struct Updater {
|
||||
|
||||
std::string recovery_fn;
|
||||
if (recovery_url.empty() || recovery_hash.empty() || recovery_len == 0) {
|
||||
set_progress("跳過 recovery 更新...");
|
||||
set_progress("Skipping recovery flash...");
|
||||
} else {
|
||||
// only download the recovery if it differs from what's flashed
|
||||
set_progress("檢查 recovery...");
|
||||
set_progress("Checking recovery...");
|
||||
std::string existing_recovery_hash = sha256_file(RECOVERY_DEV, recovery_len);
|
||||
printf("目前 recovery 的 hash: %s\n", existing_recovery_hash.c_str());
|
||||
printf("existing recovery hash: %s\n", existing_recovery_hash.c_str());
|
||||
|
||||
if (existing_recovery_hash != recovery_hash) {
|
||||
recovery_fn = stage_download(recovery_url, recovery_hash, "recovery");
|
||||
@@ -441,18 +441,18 @@ struct Updater {
|
||||
|
||||
if (!recovery_fn.empty()) {
|
||||
// flash recovery
|
||||
set_progress("刷新 recovery...");
|
||||
set_progress("Flashing recovery...");
|
||||
|
||||
FILE *flash_file = fopen(recovery_fn.c_str(), "rb");
|
||||
if (!flash_file) {
|
||||
set_error("刷新 recovery 失敗");
|
||||
set_error("failed to flash recovery");
|
||||
return;
|
||||
}
|
||||
|
||||
FILE *recovery_dev = fopen(RECOVERY_DEV, "w+b");
|
||||
if (!recovery_dev) {
|
||||
fclose(flash_file);
|
||||
set_error("刷新 recovery 失敗");
|
||||
set_error("failed to flash recovery");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -467,7 +467,7 @@ struct Updater {
|
||||
if (bytes_read != bytes_written) {
|
||||
fclose(recovery_dev);
|
||||
fclose(flash_file);
|
||||
set_error("刷新 recovery 失敗: 無法寫入");
|
||||
set_error("failed to flash recovery: write failed");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -475,12 +475,12 @@ struct Updater {
|
||||
fclose(recovery_dev);
|
||||
fclose(flash_file);
|
||||
|
||||
set_progress("驗證新的 recovery...");
|
||||
set_progress("Verifying flash...");
|
||||
std::string new_recovery_hash = sha256_file(RECOVERY_DEV, recovery_len);
|
||||
printf("新的 recovery hash: %s\n", new_recovery_hash.c_str());
|
||||
printf("new recovery hash: %s\n", new_recovery_hash.c_str());
|
||||
|
||||
if (new_recovery_hash != recovery_hash) {
|
||||
set_error("刷新 recovery 失敗");
|
||||
set_error("recovery flash corrupted");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -489,13 +489,13 @@ struct Updater {
|
||||
// write arguments to recovery
|
||||
FILE *cmd_file = fopen(RECOVERY_COMMAND, "wb");
|
||||
if (!cmd_file) {
|
||||
set_error("無法重啟至 recovery");
|
||||
set_error("failed to reboot into recovery");
|
||||
return;
|
||||
}
|
||||
fprintf(cmd_file, "--update_package=%s\n", ota_fn.c_str());
|
||||
fclose(cmd_file);
|
||||
|
||||
set_progress("重新啟動");
|
||||
set_progress("Rebooting");
|
||||
|
||||
// remove the continue.sh so we come back into the setup.
|
||||
// maybe we should go directly into the installer, but what if we don't come back with internet? :/
|
||||
@@ -562,9 +562,9 @@ struct Updater {
|
||||
}
|
||||
|
||||
void draw_battery_screen() {
|
||||
low_battery_title = "電量過低";
|
||||
low_battery_text = "請將您的 EON 充電。當電量達到 35% 時系統將會繼續更新。";
|
||||
low_battery_context = "目前的電量為: " + battery_cap_text + "%";
|
||||
low_battery_title = "Low Battery";
|
||||
low_battery_text = "Please connect EON to your charger. Update will continue once EON battery reaches 35%.";
|
||||
low_battery_context = "Current battery charge: " + battery_cap_text + "%";
|
||||
|
||||
nvgFillColor(vg, nvgRGBA(255,255,255,255));
|
||||
nvgTextAlign(vg, NVG_ALIGN_CENTER | NVG_ALIGN_BASELINE);
|
||||
@@ -601,7 +601,7 @@ struct Updater {
|
||||
int powerprompt_y = 312;
|
||||
nvgFontFace(vg, "opensans_regular");
|
||||
nvgFontSize(vg, 64.0f);
|
||||
nvgText(vg, fb_w/2, 740, "請確保您的 EON 已接上充電器。", NULL);
|
||||
nvgText(vg, fb_w/2, 740, "Ensure EON is connected to power.", NULL);
|
||||
|
||||
NVGpaint paint = nvgBoxGradient(
|
||||
vg, progress_x + 1, progress_y + 1,
|
||||
@@ -635,10 +635,10 @@ struct Updater {
|
||||
|
||||
switch (state) {
|
||||
case CONFIRMATION:
|
||||
draw_ack_screen("NEOS 需要更新。",
|
||||
"您的設備將在點擊繼續後開始更新。\n更新檔約為 1GB 我們建議您先連接至無線網路。\n設備上現有的檔案不會丟失。",
|
||||
"繼續",
|
||||
"連線至無線網路");
|
||||
draw_ack_screen("An update to NEOS is required.",
|
||||
"Your device will now be reset and upgraded. You may want to connect to wifi as download is around 1 GB. Existing data on device should not be lost.",
|
||||
"Continue",
|
||||
"Connect to WiFi");
|
||||
break;
|
||||
case LOW_BATTERY:
|
||||
draw_battery_screen();
|
||||
@@ -647,7 +647,7 @@ struct Updater {
|
||||
draw_progress_screen();
|
||||
break;
|
||||
case ERROR:
|
||||
draw_ack_screen("發生錯誤", (error_text).c_str(), NULL, "重新啟動");
|
||||
draw_ack_screen("There was an error", (error_text).c_str(), NULL, "Reboot");
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
+175
-174
@@ -77,99 +77,99 @@ ALERTS = [
|
||||
|
||||
Alert(
|
||||
"fcw",
|
||||
"剎車!",
|
||||
"有碰撞的風險",
|
||||
"刹车!",
|
||||
"有碰撞的风险",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGHEST, VisualAlert.fcw, AudibleAlert.chimeWarningRepeat, 1., 2., 2.),
|
||||
|
||||
Alert(
|
||||
"fcwStock",
|
||||
"馬上剎車!",
|
||||
"有碰撞風險",
|
||||
"BRAKE!",
|
||||
"Risk of Collision",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGHEST, VisualAlert.fcw, AudibleAlert.none, 1., 2., 2.), # no EON chime for stock FCW
|
||||
|
||||
Alert(
|
||||
"steerSaturated",
|
||||
"接管控制",
|
||||
"彎道超過方向盤轉向限制",
|
||||
"弯道超过方向盘转向限制",
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimePrompt, 1., 2., 3.),
|
||||
|
||||
Alert(
|
||||
"steerTempUnavailable",
|
||||
"接管控制",
|
||||
"轉向控制暫時失效",
|
||||
"转向控制暂时失效",
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimeWarning1, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"steerTempUnavailableMute",
|
||||
"接管控制",
|
||||
"轉向控制暫時失效",
|
||||
"转向控制暂时失效",
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, .2, .2, .2),
|
||||
|
||||
Alert(
|
||||
"preDriverDistracted",
|
||||
"注意路況:駕駛分心",
|
||||
"注意路况:驾驶出现分心",
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, .0, .1, .1, alert_rate=0.75),
|
||||
|
||||
Alert(
|
||||
"promptDriverDistracted",
|
||||
"注意路況",
|
||||
"駕駛分心",
|
||||
"注意路况",
|
||||
"驾驶出现分心",
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarning2, .1, .1, .1),
|
||||
|
||||
Alert(
|
||||
"driverDistracted",
|
||||
"立即解除",
|
||||
"駕駛分心",
|
||||
"驾驶出现分心",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGH, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, .1, .1),
|
||||
|
||||
Alert(
|
||||
"preDriverUnresponsive",
|
||||
"請觸碰方向盤:無駕駛監控",
|
||||
"触碰方向盘:无驾驶监控",
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, .0, .1, .1, alert_rate=0.75),
|
||||
|
||||
Alert(
|
||||
"promptDriverUnresponsive",
|
||||
"請觸碰方向盤",
|
||||
"駕駛沒有反應",
|
||||
"触碰方向盘",
|
||||
"驾驶没有反应",
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarning2, .1, .1, .1),
|
||||
|
||||
Alert(
|
||||
"driverUnresponsive",
|
||||
"立即解除",
|
||||
"駕駛沒有反應",
|
||||
"驾驶没有反应",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGH, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, .1, .1),
|
||||
|
||||
Alert(
|
||||
"driverMonitorLowAcc",
|
||||
"請檢查駕駛面部的可見度",
|
||||
"駕駛監控模型輸出不明確",
|
||||
"检查驾驶面部能见度",
|
||||
"驾驶监控模型输出不明确",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, .4, 0., 1.),
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, .4, 0., 4.),
|
||||
|
||||
Alert(
|
||||
"geofence",
|
||||
"DISENGAGEMENT REQUIRED",
|
||||
"不在地理圍欄區域之內",
|
||||
"请求解除",
|
||||
"不在地理围栏区域之内",
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.HIGH, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, .1, .1),
|
||||
|
||||
Alert(
|
||||
"startup",
|
||||
"隨時準備好接管",
|
||||
"請您將手放在方向盤上並持續注意路況",
|
||||
"随时准备好接管",
|
||||
"请您将手放在方向盘上并持续注意路况",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW_LOWEST, VisualAlert.none, AudibleAlert.none, 0., 0., 15.),
|
||||
|
||||
@@ -182,169 +182,169 @@ ALERTS = [
|
||||
|
||||
Alert(
|
||||
"startupNoControl",
|
||||
"行車記錄模式",
|
||||
"請您將手放在方向盤上並持續注意路況",
|
||||
"硬扯记录模式",
|
||||
"请您将手放在方向盘上并持续注意路况",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW_LOWEST, VisualAlert.none, AudibleAlert.none, 0., 0., 15.),
|
||||
|
||||
Alert(
|
||||
"startupNoCar",
|
||||
"行車記錄模式 (尚未支援車種)",
|
||||
"請您將手放在方向盤上並持續注意路況",
|
||||
"行车记录模式(为支持的车型)",
|
||||
"请您将手放在方向盘上并持续注意路况",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW_LOWEST, VisualAlert.none, AudibleAlert.none, 0., 0., 15.),
|
||||
|
||||
Alert(
|
||||
"ethicalDilemma",
|
||||
"即刻接管控制",
|
||||
"Ethical Dilemma Detected",
|
||||
"即可接管控制",
|
||||
"检测到困难",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGHEST, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, 1., 3., 3.),
|
||||
|
||||
Alert(
|
||||
"steerTempUnavailableNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"轉向控制暫時失效",
|
||||
"无法使用 dragonpilot",
|
||||
"转向控制暂时失效",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 0., 3.),
|
||||
|
||||
Alert(
|
||||
"manualRestart",
|
||||
"接管控制",
|
||||
"請自行恢復駕駛",
|
||||
"请自行恢复驾驶",
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
|
||||
Alert(
|
||||
"resumeRequired",
|
||||
"已停止",
|
||||
"請按 RES 繼續",
|
||||
"请按RES继续",
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
|
||||
Alert(
|
||||
"belowSteerSpeed",
|
||||
"接管控制",
|
||||
"轉向控制暫時失效,車速低於 ",
|
||||
"转向控制暂时失效,车速低于",
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.none, 0., 0.4, .3),
|
||||
|
||||
Alert(
|
||||
"debugAlert",
|
||||
"DEBUG ALERT",
|
||||
"DEBUG提示",
|
||||
"",
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, .1, .1, .1),
|
||||
Alert(
|
||||
"preLaneChangeLeft",
|
||||
"請往左打方向盤切換車道",
|
||||
"請注意其它車輛",
|
||||
"往左打方向盘开始切换车道",
|
||||
"请注意其他车辆",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, .0, .1, .1, alert_rate=0.75),
|
||||
|
||||
Alert(
|
||||
"preLaneChangeRight",
|
||||
"請往右打方向盤切換車道",
|
||||
"請注意其它車輛",
|
||||
"往右打方向盘开始切换车道",
|
||||
"请注意其他车辆",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, .0, .1, .1, alert_rate=0.75),
|
||||
|
||||
Alert(
|
||||
"laneChange",
|
||||
"切換車道中",
|
||||
"請注意其它車輛",
|
||||
"切换车道中",
|
||||
"请注意其他车辆",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, .0, .1, .1),
|
||||
|
||||
Alert(
|
||||
"posenetInvalid",
|
||||
"接管控制",
|
||||
"視覺模型輸出不明確",
|
||||
"视觉模型输出不明确",
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimeWarning1, .4, 2., 3.),
|
||||
|
||||
# Non-entry only alerts
|
||||
Alert(
|
||||
"wrongCarModeNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"主開關關閉",
|
||||
"无法使用 dragonpilot",
|
||||
"主开关关闭",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 0., 3.),
|
||||
|
||||
Alert(
|
||||
"dataNeededNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"需要更多的數據來協助校準,請將行車記錄上傳後再試",
|
||||
"无法使用 dragonpilot",
|
||||
"需要更多的数据来协助校准,请将行车记录上传后再试",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 0., 3.),
|
||||
|
||||
Alert(
|
||||
"outOfSpaceNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"儲存空間不足",
|
||||
"无法使用 dragonpilot",
|
||||
"储存空间不足",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 0., 3.),
|
||||
|
||||
Alert(
|
||||
"pedalPressedNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"Pedal Pressed During Attempt",
|
||||
"无法使用 dragonpilot",
|
||||
"试踩踏板",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, "brakePressed", AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"speedTooLowNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"車速過慢",
|
||||
"无法使用 dragonpilot",
|
||||
"车速过慢",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"brakeHoldNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"駐車煞車已啟用",
|
||||
"无法使用 dragonpilot",
|
||||
"驻车刹车已启用",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"parkBrakeNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"電子駐車已啟動",
|
||||
"无法使用 dragonpilot",
|
||||
"电车驻车已启动",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"lowSpeedLockoutNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"巡航系統錯誤:請重新發動車子",
|
||||
"无法使用 dragonpilot",
|
||||
"巡航系统错误,请重新发动车辆",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"lowBatteryNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"電池電量過低",
|
||||
"无法使用 dragonpilot",
|
||||
"电池电量过低",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"sensorDataInvalidNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"沒有收到任何來自裝置傳感器的資料",
|
||||
"无法使用 dragonpilot",
|
||||
"没有收到任何来自传感器的数据",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"soundsUnavailableNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"找不到音效裝置",
|
||||
"无法使用 dragonpilot",
|
||||
"找不到音效装置",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"tooDistractedNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"駕駛分心次數過高",
|
||||
"无法使用 dragonpilot",
|
||||
"注意力高度不集中",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
@@ -352,84 +352,84 @@ ALERTS = [
|
||||
Alert(
|
||||
"overheat",
|
||||
"即刻接管控制",
|
||||
"系統過熱",
|
||||
"系统过热",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, 2., 2.),
|
||||
|
||||
Alert(
|
||||
"wrongGear",
|
||||
"即刻接管控制",
|
||||
"檔位不在 D 檔",
|
||||
"档位不在D档",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, 2., 2.),
|
||||
|
||||
Alert(
|
||||
"calibrationInvalid",
|
||||
"即刻接管控制",
|
||||
"校準無效:請將裝置放於新的位置並重新校準",
|
||||
"校准无效:请将传感器放于新的位置并重新校准",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, 2., 2.),
|
||||
|
||||
Alert(
|
||||
"calibrationIncomplete",
|
||||
"即刻接管控制",
|
||||
"正在校準相機中",
|
||||
"正在校准相机中",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, 2., 2.),
|
||||
|
||||
Alert(
|
||||
"doorOpen",
|
||||
"即刻接管控制",
|
||||
"車門開啟",
|
||||
"车门开启",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, 2., 2.),
|
||||
|
||||
Alert(
|
||||
"seatbeltNotLatched",
|
||||
"即刻接管控制",
|
||||
"安全帶未繫",
|
||||
"未系安全带",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, 2., 2.),
|
||||
|
||||
Alert(
|
||||
"espDisabled",
|
||||
"即刻接管控制",
|
||||
"ESP 關閉",
|
||||
"ESP关闭",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, 2., 2.),
|
||||
|
||||
Alert(
|
||||
"lowBattery",
|
||||
"即刻接管控制",
|
||||
"電池電量過低",
|
||||
"电池电量过低",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, 2., 2.),
|
||||
|
||||
Alert(
|
||||
"commIssue",
|
||||
"即刻接管控制",
|
||||
"雷達訊號錯誤:請重新發動車子",
|
||||
"雷达讯号错误:请重新发动车辆",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, 2., 2.),
|
||||
|
||||
Alert(
|
||||
"radarCommIssue",
|
||||
"即刻接管控制",
|
||||
"雷達通訊出現問題",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, 2., 2.),
|
||||
|
||||
Alert(
|
||||
"radarCanError",
|
||||
"即刻接管控制",
|
||||
"雷達訊號錯誤:請重新發動車子",
|
||||
"TAKE CONTROL IMMEDIATELY",
|
||||
"Radar Communication Issue",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, 2., 2.),
|
||||
|
||||
Alert(
|
||||
"radarFault",
|
||||
"即刻接管控制",
|
||||
"AI 模型錯誤:請檢查網路連線",
|
||||
"雷达讯号错误:请重新发动车辆",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, 2., 2.),
|
||||
|
||||
Alert(
|
||||
"radarFault",
|
||||
"即刻接管控制",
|
||||
"雷达讯号错误:请重新发动车辆",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, 2., 2.),
|
||||
|
||||
@@ -437,7 +437,7 @@ ALERTS = [
|
||||
Alert(
|
||||
"lowMemory",
|
||||
"即刻接管控制",
|
||||
"記憶體不足:請重啟您的裝置",
|
||||
"内存过低: 请重启装置",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, 2., 2.),
|
||||
|
||||
@@ -445,7 +445,7 @@ ALERTS = [
|
||||
Alert(
|
||||
"controlsFailed",
|
||||
"即刻接管控制",
|
||||
"控制發生錯誤",
|
||||
"控制错误",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGHEST, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, 2.2, 3., 4.),
|
||||
|
||||
@@ -459,49 +459,49 @@ ALERTS = [
|
||||
Alert(
|
||||
"canError",
|
||||
"即刻接管控制",
|
||||
"CAN 訊號錯誤:請檢查接線",
|
||||
"CAN错误:请检查连接",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGHEST, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, 2.2, 3., 4.),
|
||||
|
||||
Alert(
|
||||
"steerUnavailable",
|
||||
"即刻接管控制",
|
||||
"LKAS 錯誤:請重新發動車子",
|
||||
"LKAS错误:请重新发动车辆",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGHEST, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, 2.2, 3., 4.),
|
||||
|
||||
Alert(
|
||||
"brakeUnavailable",
|
||||
"即刻接管控制",
|
||||
"巡航系統錯誤:請重新發動車子",
|
||||
"巡航系统错误:请重新发动车辆",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGHEST, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, 2.2, 3., 4.),
|
||||
|
||||
Alert(
|
||||
"gasUnavailable",
|
||||
"即刻接管控制",
|
||||
"油門錯誤:請重新發動車子",
|
||||
"油门错误:请重新发动车辆",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGHEST, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, 2.2, 3., 4.),
|
||||
|
||||
Alert(
|
||||
"reverseGear",
|
||||
"即刻接管控制",
|
||||
"切換至倒車檔",
|
||||
"切换至倒车档",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGHEST, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, 2.2, 3., 4.),
|
||||
|
||||
Alert(
|
||||
"cruiseDisabled",
|
||||
"即刻接管控制",
|
||||
"巡航系統關閉",
|
||||
"巡航系统关闭",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGHEST, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, 2.2, 3., 4.),
|
||||
|
||||
Alert(
|
||||
"plannerError",
|
||||
"即刻接管控制",
|
||||
"Planner Solution 錯誤",
|
||||
"Planner Solution 错误",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGHEST, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, 2.2, 3., 4.),
|
||||
|
||||
@@ -509,267 +509,267 @@ ALERTS = [
|
||||
Alert(
|
||||
"noTarget",
|
||||
"dragonpilot 已取消",
|
||||
"沒有偵測到前車",
|
||||
"没有侦测到前车",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.HIGH, VisualAlert.none, AudibleAlert.chimeDisengage, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"speedTooLow",
|
||||
"dragonpilot 已取消",
|
||||
"車速過慢",
|
||||
"车速过慢",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.HIGH, VisualAlert.none, AudibleAlert.chimeDisengage, .4, 2., 3.),
|
||||
|
||||
# Cancellation alerts causing non-entry
|
||||
Alert(
|
||||
"overheatNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"系統過熱",
|
||||
"无法使用 dragonpilot",
|
||||
"系统过热",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"wrongGearNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"車子不在 D 檔",
|
||||
"无法使用 dragonpilot",
|
||||
"车辆不在D档",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"calibrationInvalidNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"校準無效:請將裝置放於新的位置並重新校準",
|
||||
"无法使用 dragonpilot",
|
||||
"校准无效:请将传感器放于新的位置并重新校准",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"calibrationIncompleteNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"正在校準相機中",
|
||||
"无法使用 dragonpilot",
|
||||
"正在校准相机中",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"doorOpenNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"車門未關",
|
||||
"无法使用 dragonpilot",
|
||||
"车门开启",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"seatbeltNotLatchedNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"安全帶未繫",
|
||||
"无法使用 dragonpilot",
|
||||
"未系安全带",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"espDisabledNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"ESP 關閉",
|
||||
"无法使用 dragonpilot",
|
||||
"ESP关闭",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"geofenceNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"不在地理圍欄區域之內",
|
||||
"无法使用 dragonpilot",
|
||||
"不在地理围栏区域之内",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.MID, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"radarCanErrorNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"雷達訊號錯誤:請重新發動車子",
|
||||
"无法使用 dragonpilot",
|
||||
"雷达信号错误:请重新发动车辆",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"radarFaultNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"雷達訊號錯誤:請重新發動車子",
|
||||
"无法使用 dragonpilot",
|
||||
"雷达信号错误:请重新发动车辆",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"posenetInvalidNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"視覺模型輸出不明確",
|
||||
"无法使用 dragonpilot",
|
||||
"视觉模型输出不明确",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"controlsFailedNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"控制發生錯誤",
|
||||
"无法使用 dragonpilot",
|
||||
"控制发生错误",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"canErrorNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"CAN 訊號錯誤:請檢查接線",
|
||||
"无法使用 dragonpilot",
|
||||
"CAN错误:请检查连接",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"steerUnavailableNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"LKAS 錯誤:請重新發動車子",
|
||||
"无法使用 dragonpilot",
|
||||
"LKAS错误: 请重新发动车辆",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"brakeUnavailableNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"巡航系統錯誤:請重新發動車子",
|
||||
"无法使用 dragonpilot",
|
||||
"巡航系统错误:请重新发动车辆",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"gasUnavailableNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"油門錯誤:請重新發動車子",
|
||||
"无法使用 dragonpilot",
|
||||
"油门错误:请重新发动车辆",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"reverseGearNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"切換至倒車檔",
|
||||
"无法使用 dragonpilot",
|
||||
"切换至倒车档",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"cruiseDisabledNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"巡航系統關閉",
|
||||
"无法使用 dragonpilot",
|
||||
"巡航系统关闭",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"noTargetNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"沒有偵測到前車",
|
||||
"无法使用 dragonpilot",
|
||||
"没有侦测到前车",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"plannerErrorNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"Planner Solution 錯誤",
|
||||
"无法使用 dragonpilot",
|
||||
"Planner Solution 错误",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"commIssueNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"行程出現通訊問題",
|
||||
"无法使用 dragonpilot",
|
||||
"进程通讯异常",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeDisengage, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"radarCommIssueNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"雷達通訊出現問題",
|
||||
"无法使用 dragonpilot",
|
||||
"雷达通讯异常",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeDisengage, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"internetConnectivityNeededNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"請連接網路",
|
||||
"无法使用 dragonpilot",
|
||||
"需要连接到网络",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeDisengage, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"lowMemoryNoEntry",
|
||||
"無法使用 dragonpilot",
|
||||
"記憶體不足:請重啟您的裝置",
|
||||
"无法使用 dragonpilot",
|
||||
"内存过低: 请重启装置",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeDisengage, .4, 2., 3.),
|
||||
|
||||
# permanent alerts
|
||||
Alert(
|
||||
"steerUnavailablePermanent",
|
||||
"LKAS 錯誤:請重新發動車子",
|
||||
"LKAS错误: 请重新发动车辆",
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOW_LOWEST, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
|
||||
Alert(
|
||||
"brakeUnavailablePermanent",
|
||||
"巡航系統錯誤:請重新發動車子",
|
||||
"巡航系统错误:请重新发动车辆",
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOW_LOWEST, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
|
||||
Alert(
|
||||
"lowSpeedLockoutPermanent",
|
||||
"巡航系統錯誤:請重新發動車子",
|
||||
"巡航系统错误:请重新发动车辆",
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOW_LOWEST, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
|
||||
Alert(
|
||||
"calibrationIncompletePermanent",
|
||||
"正在校準相機中:",
|
||||
"車速請高於 ",
|
||||
"正在校准相机中 ",
|
||||
"车速请高于",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOWEST, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
|
||||
Alert(
|
||||
"invalidGiraffeToyotaPermanent",
|
||||
"未支援的 Giraffe 設置",
|
||||
"請查閱 comma.ai/tg",
|
||||
"不支持的 Giraffe 配置",
|
||||
"请查看 comma.ai/tg",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW_LOWEST, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
|
||||
Alert(
|
||||
"internetConnectivityNeededPermanent",
|
||||
"請連接網路",
|
||||
"需檢查更新後才能啟用",
|
||||
"需要连接到网络",
|
||||
"检查更新后才能启用",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW_LOWEST, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
|
||||
Alert(
|
||||
"communityFeatureDisallowedPermanent",
|
||||
"偵測到社群開發功能",
|
||||
"請至開發人員設定裡啟用社群開發功能",
|
||||
"检测到社区功能",
|
||||
"请在开发者设置中启用社区功能",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, 0., 0., .2), # LOW priority to overcome Cruise Error
|
||||
|
||||
Alert(
|
||||
"sensorDataInvalidPermanent",
|
||||
"沒有收到任何來自 EON 傳感器的資料",
|
||||
"請重啟您的裝置",
|
||||
"没有收到任何来自传感器的数据",
|
||||
"请重启您的装置",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW_LOWEST, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
|
||||
Alert(
|
||||
"soundsUnavailablePermanent",
|
||||
"找不到音效裝置",
|
||||
"請重啟您的裝置",
|
||||
"找不到音效装置",
|
||||
"请重启您的装置",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW_LOWEST, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
|
||||
Alert(
|
||||
"lowMemoryPermanent",
|
||||
"記憶體嚴重不足",
|
||||
"請重啟您的裝置",
|
||||
"内存严重不足",
|
||||
"请重启您的装置",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW_LOWEST, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
|
||||
Alert(
|
||||
"carUnrecognizedPermanent",
|
||||
"行車記錄模式",
|
||||
"無法辨識您的車款",
|
||||
"Dashcam Mode",
|
||||
"Car Unrecognized",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW_LOWEST, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
|
||||
Alert(
|
||||
"vehicleModelInvalid",
|
||||
"車子參數識別失敗",
|
||||
"车辆参数识别失败",
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOWEST, VisualAlert.steerRequired, AudibleAlert.none, .0, .0, .1),
|
||||
@@ -778,53 +778,54 @@ ALERTS = [
|
||||
Alert(
|
||||
"ldwPermanent",
|
||||
"接管控制",
|
||||
"偵測到已偏離車道",
|
||||
"检测到车道偏离",
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimePrompt, 1., 2., 3.),
|
||||
# dragonpilot
|
||||
Alert(
|
||||
"manualSteeringRequired",
|
||||
"請接管方向盤:車道維持關閉",
|
||||
"接管控制: 车道保持关闭",
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, .0, .1, .1, alert_rate=0.25),
|
||||
|
||||
Alert(
|
||||
"manualSteeringRequiredBlinkersOn",
|
||||
"請接管方向盤:方向燈開啟",
|
||||
"接管控制: 转向灯开启",
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, .0, .1, .1, alert_rate=0.25),
|
||||
Alert(
|
||||
"leadCarMoving",
|
||||
"前車移動中,請開始加速",
|
||||
"前车移动中,请开始加速",
|
||||
"",
|
||||
AlertStatus.userPrompt, AlertSize.small,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimeWarning2, .1, .1, .1),
|
||||
Alert(
|
||||
"leadCarDetected",
|
||||
"偵測到前車,等待中",
|
||||
"侦测到前车,等待中",
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, .0, .1, .1, alert_rate=0.25),
|
||||
Alert(
|
||||
"preAutoLaneChangeLeft",
|
||||
"將在三秒後自動切至左車道",
|
||||
"請注意其它車輛",
|
||||
"将在三秒后自动切入左道",
|
||||
"请注意其他车辆",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimeWarning2, .1, .1, .1, alert_rate=0.75),
|
||||
|
||||
Alert(
|
||||
"preAutoLaneChangeRight",
|
||||
"將在三秒後自動切至右車道",
|
||||
"請注意其它車輛",
|
||||
"将在三秒后自动切入入右道",
|
||||
"请注意其他车辆",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimeWarning2, .1, .1, .1, alert_rate=0.75),
|
||||
|
||||
Alert(
|
||||
"autoLaneChange",
|
||||
"切換車道中",
|
||||
"請注意其它車輛",
|
||||
"切换车道中",
|
||||
"请注意其他车辆",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimeWarning2, .1, .1, .1),
|
||||
|
||||
]
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
{
|
||||
"Offroad_ChargeDisabled": {
|
||||
"text": "因車輛已熄火超過 30 小時,系統將會停止為 EON 充電,再次發動車輛後 EON 會恢復充電",
|
||||
"text": "车辆熄火 30 小时后将停止为 EON 充电,再次启动车辆后,EON 恢复充电。",
|
||||
"severity": 0
|
||||
},
|
||||
"Offroad_TemperatureTooHigh": {
|
||||
"text": "裝置溫度過高,系統暫時無法啟用。",
|
||||
"text": "装置温度过高,系统暂不可用。",
|
||||
"severity": 1
|
||||
},
|
||||
"Offroad_ConnectivityNeededPrompt": {
|
||||
"text": "目前 dragonpilot 無法啟用,請馬上連網檢查更新。",
|
||||
"text": "请立即连网检查更新,否则 dragonpilot 将不可用。",
|
||||
"severity": 0,
|
||||
"_comment": "Append the number of days at the end of the text"
|
||||
},
|
||||
"Offroad_ConnectivityNeeded": {
|
||||
"text": "請連網檢查更新。不然 dragonpilot 將無法啟用。",
|
||||
"text": "请连网并检查更新,连网更新后 dragonpilot 才能正常使用。",
|
||||
"severity": 1
|
||||
},
|
||||
"Offroad_PandaFirmwareMismatch": {
|
||||
"text": "Panda 的韌體版本出現異常,系統無法啟用。請重啟您的裝置以刷新 Panda 韌體。",
|
||||
"text": "Panda 固件版本异常,系统无法启用,请重启装置并更新 Panda 固件。",
|
||||
"severity": 1
|
||||
},
|
||||
"Offroad_InvalidTime": {
|
||||
"text": "系統日期/時間設定錯誤,系統無法啟用。請連上網設定的時間。",
|
||||
"text": "系统时间设置错误,系统无法启用。请连网更新时间设置。",
|
||||
"severity": 1
|
||||
},
|
||||
"Offroad_IsTakingSnapshot": {
|
||||
"text": "相機拍攝中,完成前系統無法啟用。",
|
||||
"text": "相机拍摄中,完成前系统无法启动。",
|
||||
"severity": 0
|
||||
}
|
||||
}
|
||||
|
||||
@@ -954,7 +954,7 @@ static void bb_ui_draw_measures_left(UIState *s, int bb_x, int bb_y, int bb_w )
|
||||
snprintf(val_str, sizeof(val_str), "-");
|
||||
}
|
||||
snprintf(uom_str, sizeof(uom_str), "m ");
|
||||
bb_h +=bb_ui_draw_measure(s, val_str, uom_str, "相對距離",
|
||||
bb_h +=bb_ui_draw_measure(s, val_str, uom_str, "相对距离",
|
||||
bb_rx, bb_ry, bb_uom_dx,
|
||||
val_color, lab_color, uom_color,
|
||||
value_fontSize, label_fontSize, uom_fontSize );
|
||||
@@ -989,7 +989,7 @@ static void bb_ui_draw_measures_left(UIState *s, int bb_x, int bb_y, int bb_w )
|
||||
} else {
|
||||
snprintf(uom_str, sizeof(uom_str), "mph");
|
||||
}
|
||||
bb_h +=bb_ui_draw_measure(s, val_str, uom_str, "相對速度",
|
||||
bb_h +=bb_ui_draw_measure(s, val_str, uom_str, "相对速度",
|
||||
bb_rx, bb_ry, bb_uom_dx,
|
||||
val_color, lab_color, uom_color,
|
||||
value_fontSize, label_fontSize, uom_fontSize );
|
||||
@@ -1034,7 +1034,7 @@ static void bb_ui_draw_measures_right(UIState *s, int bb_x, int bb_y, int bb_w )
|
||||
snprintf(val_str, sizeof(val_str), "%.1f°",(scene->angleSteers));
|
||||
|
||||
snprintf(uom_str, sizeof(uom_str), "");
|
||||
bb_h +=bb_ui_draw_measure(s, val_str, uom_str, "實際轉角",
|
||||
bb_h +=bb_ui_draw_measure(s, val_str, uom_str, "实际转角",
|
||||
bb_rx, bb_ry, bb_uom_dx,
|
||||
val_color, lab_color, uom_color,
|
||||
value_fontSize, label_fontSize, uom_fontSize );
|
||||
@@ -1058,7 +1058,7 @@ static void bb_ui_draw_measures_right(UIState *s, int bb_x, int bb_y, int bb_w )
|
||||
snprintf(val_str, sizeof(val_str), "%.1f°",(scene->angleSteersDes));
|
||||
|
||||
snprintf(uom_str, sizeof(uom_str), "");
|
||||
bb_h +=bb_ui_draw_measure(s, val_str, uom_str, "所需轉角",
|
||||
bb_h +=bb_ui_draw_measure(s, val_str, uom_str, "所需转角",
|
||||
bb_rx, bb_ry, bb_uom_dx,
|
||||
val_color, lab_color, uom_color,
|
||||
value_fontSize, label_fontSize, uom_fontSize );
|
||||
|
||||
+2
-2
@@ -986,8 +986,8 @@ int main(int argc, char* argv[]) {
|
||||
if (s->status != STATUS_STOPPED) {
|
||||
update_status(s, STATUS_ALERT);
|
||||
}
|
||||
snprintf(s->scene.alert_text1, sizeof(s->scene.alert_text1), "%s", "即刻接管控制");
|
||||
snprintf(s->scene.alert_text2, sizeof(s->scene.alert_text2), "%s", "操控服務沒有反應");
|
||||
snprintf(s->scene.alert_text1, sizeof(s->scene.alert_text1), "%s", "TAKE CONTROL IMMEDIATELY");
|
||||
snprintf(s->scene.alert_text2, sizeof(s->scene.alert_text2), "%s", "Controls Unresponsive");
|
||||
ui_draw_vision_alert(s, s->scene.alert_size, s->status, s->scene.alert_text1, s->scene.alert_text2);
|
||||
|
||||
s->alert_sound_timeout = 2 * UI_FREQ;
|
||||
|
||||
Reference in New Issue
Block a user