mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-09-17 04:53:44 +08:00
Compare commits
288 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8eb90c980e | |||
| aafa2c07dd | |||
| 4a3df5afbb | |||
| bb11d3596c | |||
| 42725594aa | |||
| a382a28fda | |||
| 725947813f | |||
| 322cbf930d | |||
| 236e261f64 | |||
| d6f6aa0049 | |||
| f188c6188f | |||
| 129a450fc3 | |||
| 02136e7ef3 | |||
| f47eb76c43 | |||
| 87b36e8dd8 | |||
| 6216c00a88 | |||
| 2260169379 | |||
| 5a1b15cfad | |||
| 028b852eea | |||
| f93e76e360 | |||
| 8a0c5fbb77 | |||
| 6ff353469c | |||
| bd1ce8d003 | |||
| 2bf3489e96 | |||
| 5af951b240 | |||
| 1b7e77c344 | |||
| 53f369d68c | |||
| c79b166009 | |||
| 8d2c063345 | |||
| 34ddbd59ba | |||
| 16bcfbd359 | |||
| f52ea2b035 | |||
| 8ff951e64c | |||
| 4b28d659bb | |||
| 115e5c346d | |||
| f76785b521 | |||
| 00e065dc49 | |||
| 4ce1507068 | |||
| c4ccb435c6 | |||
| cb72090236 | |||
| 26d6163bb0 | |||
| 0edc838459 | |||
| 57bb12e61e | |||
| af25dcccfd | |||
| 9add4a7217 | |||
| 2742fab6aa | |||
| 0be06a3fec | |||
| f9b8ee8cfa | |||
| 2cc099bcec | |||
| 113a6fbfdf | |||
| 79733afb64 | |||
| c4fe51dc57 | |||
| 53b466b496 | |||
| 22c1f205e1 | |||
| f14a1b4793 | |||
| cb7fd242f7 | |||
| 4861cc2987 | |||
| 39d4ad99a7 | |||
| 9c6d6cec92 | |||
| 0bfac4b8b3 | |||
| fec227373b | |||
| aed49074dc | |||
| 8698cc0c66 | |||
| b7e0f4cca4 | |||
| bd4f39dae9 | |||
| fd930c7333 | |||
| 23661b80ad | |||
| a70d9abccc | |||
| 8a2e191168 | |||
| d804adb00d | |||
| ba6a71b32c | |||
| c29f876f36 | |||
| e8aee5615a | |||
| d060fc0ef4 | |||
| 0ff5da9fc1 | |||
| d9200c3549 | |||
| 44d726bc8b | |||
| 2c4fb49eb6 | |||
| f7a90f17d3 | |||
| bebff76873 | |||
| d5c85bf88a | |||
| fa476b0cad | |||
| 2a1e4c8ca1 | |||
| cc2890a7f3 | |||
| e97324ef79 | |||
| 30f17dd1a5 | |||
| fd200f42e3 | |||
| 1ab7150b57 | |||
| 4b5a9a13fb | |||
| d8056f4e83 | |||
| b02c6aff8d | |||
| 52e9e4ee62 | |||
| ff26ef1c12 | |||
| 3d60864d47 | |||
| 594044fd91 | |||
| 5a6d6609f4 | |||
| 676cc12afa | |||
| bd47359811 | |||
| 5a205d0195 | |||
| 5e1e75ef80 | |||
| 524920fafe | |||
| 530a56e398 | |||
| e72cb1abe1 | |||
| 32d820bb6d | |||
| 00ec08868a | |||
| 4323f755fd | |||
| 02eafeafeb | |||
| 722aea251a | |||
| b5e026e44b | |||
| c6c10d67ae | |||
| d22759f0c8 | |||
| 632ee00a94 | |||
| d86555d52f | |||
| 7a04ebe2da | |||
| f8677eb260 | |||
| d4ae6d93d6 | |||
| 43814ab9aa | |||
| 0568abd542 | |||
| ce67df2e3c | |||
| de8cabf0f0 | |||
| a18b37863c | |||
| 18a4819add | |||
| 51570f7ff8 | |||
| 986e4c6f79 | |||
| bfa05df92f | |||
| 7219bd535a | |||
| 4168703dc5 | |||
| e487aaba64 | |||
| 3c1f1fb9a1 | |||
| bdf0964615 | |||
| c60744f903 | |||
| 35bf4794b1 | |||
| 70b7f21c8d | |||
| 472f9ed7b8 | |||
| 2fc7817831 | |||
| cb25bbd96a | |||
| 51c1801f22 | |||
| ebf7f3bd8a | |||
| f4a979d316 | |||
| f65c9b478a | |||
| c5a7eeea99 | |||
| 86d781f893 | |||
| 296daec59a | |||
| 9a1ceeb0e8 | |||
| 8934720785 | |||
| af1d476c50 | |||
| 4b806911ad | |||
| 2f49572d72 | |||
| 4f0061d71c | |||
| 95aca22809 | |||
| f5a9a08863 | |||
| 466dce4090 | |||
| 227578ef15 | |||
| 29d10aed97 | |||
| c2d2780772 | |||
| 6045192107 | |||
| b617372907 | |||
| 67a595e321 | |||
| e1509808ac | |||
| c21334cb95 | |||
| 2dc8bd5655 | |||
| cfe34284a4 | |||
| eebf70fd59 | |||
| be2bf61420 | |||
| d7a5fb0c65 | |||
| 55dad14711 | |||
| 6f47f3c4d6 | |||
| 234ddbebaf | |||
| 6f6c96735a | |||
| 691bb95a77 | |||
| ac45050c4a | |||
| fd731f1f27 | |||
| 8af6ddcd8b | |||
| a5e2f3cc22 | |||
| fa8e44d0b2 | |||
| 651f994d6a | |||
| 9c8a03ecfb | |||
| 66cac800cb | |||
| ec691a586a | |||
| f738ce6ec9 | |||
| dea170368e | |||
| 88558aa7a5 | |||
| bb535e797e | |||
| b01aa70635 | |||
| 7d86e2adef | |||
| 05fa8a5eda | |||
| db4ef15bed | |||
| 6365dbb34d | |||
| 854e662c57 | |||
| bd5db31b6a | |||
| 20e8d61f0c | |||
| 77460d8e7f | |||
| b2ef7ff80c | |||
| 01319c0251 | |||
| 0e249e2bed | |||
| d2a0782e1b | |||
| aa14e182af | |||
| 0a3a86637b | |||
| 03d8cf087b | |||
| 48c0937081 | |||
| 982b635653 | |||
| 3712ca6273 | |||
| 4c5ad29782 | |||
| 3d9596716b | |||
| c66b57daff | |||
| 8f8879eaac | |||
| c3f6af77ee | |||
| 652e1955b0 | |||
| 611172df48 | |||
| 4969ff7fbb | |||
| 66c08fb446 | |||
| dcc18e4e7c | |||
| bc8b6e7e6f | |||
| 05a3af4c39 | |||
| 62d499219a | |||
| 37d788449e | |||
| 2b746aa134 | |||
| 9a03511d2a | |||
| b0c7a50b06 | |||
| 31c65fa5e8 | |||
| a60dbb32df | |||
| 0ac693c74c | |||
| 321271c510 | |||
| f25ee81a81 | |||
| d232f16e07 | |||
| 2675651ca8 | |||
| aea6d53eaf | |||
| e0cbd452a0 | |||
| 4c3b24fcda | |||
| fb3e0969cc | |||
| 15ebf13cf1 | |||
| 71e9076e50 | |||
| 639a914846 | |||
| cff8a98850 | |||
| 999d157c75 | |||
| 9f414becd1 | |||
| 634de04d23 | |||
| b69089883f | |||
| 2474cd56cc | |||
| cf62e14547 | |||
| 261428ec98 | |||
| 5ecacfd879 | |||
| 2f6e0a59fd | |||
| e95ae50ab5 | |||
| b745bf1e5a | |||
| 8451eebe96 | |||
| 4f8b6f7b84 | |||
| cb47382c9d | |||
| c60e002440 | |||
| d727aea5ad | |||
| 851a5b2f44 | |||
| 0a208866ce | |||
| 0c26ac0da7 | |||
| 2d40ccfc16 | |||
| 1b06be660b | |||
| 8d5403b26a | |||
| 1150937f33 | |||
| 94d9ea0863 | |||
| 3ad47fb1d0 | |||
| 6bad4f56f7 | |||
| c041b0068c | |||
| d4bf69422c | |||
| e9c2249a81 | |||
| 63fa61ecd7 | |||
| 39808e3627 | |||
| ff717ae03e | |||
| 8bb3420b92 | |||
| 6365c3b17c | |||
| 8dd8f08d10 | |||
| 8d637c8e33 | |||
| 9f75a6b5a6 | |||
| 221e383f11 | |||
| 6b09953b09 | |||
| 255c58f6ba | |||
| 3fed5bfaf3 | |||
| 3543d4948c | |||
| 33b1bb50c1 | |||
| 42093dadd1 | |||
| 18eee85ff1 | |||
| 938b1aa189 | |||
| f362771af3 | |||
| 7251ea4ac6 | |||
| 7bc86efee9 | |||
| d60e071fa9 | |||
| b70289ce15 | |||
| be8cc7c15f | |||
| 589abe5519 | |||
| be622c7932 |
@@ -31,7 +31,7 @@
|
||||
|
||||
|
||||
# Android system locale, zh-TW = Traditional Chinese, zh-CN = Simplified Chinese
|
||||
lang=zh-CN
|
||||
lang=zh-TW
|
||||
|
||||
update_font=0
|
||||
remove_old_font=0
|
||||
|
||||
@@ -31,9 +31,9 @@ FRAMEBUFFER_LIBS = -lutils -lgui -lEGL
|
||||
.PHONY: all
|
||||
all: updater
|
||||
|
||||
OBJS = opensans_regular.ttf.o \
|
||||
opensans_semibold.ttf.o \
|
||||
opensans_bold.ttf.o \
|
||||
OBJS = NotoSansCJKtc-Regular.otf.o \
|
||||
NotoSansCJKtc-Medium.otf.o \
|
||||
NotoSansCJKtc-Bold.otf.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
|
||||
|
||||
opensans_regular.ttf.o: ../../selfdrive/assets/fonts/opensans_regular.ttf
|
||||
NotoSansCJKtc-Regular.otf.o: ../../selfdrive/assets/fonts/NotoSansCJKtc-Regular.otf
|
||||
@echo "[ bin2o ] $@"
|
||||
cd '$(dir $<)' && ld -r -b binary '$(notdir $<)' -o '$(abspath $@)'
|
||||
|
||||
opensans_bold.ttf.o: ../../selfdrive/assets/fonts/opensans_bold.ttf
|
||||
NotoSansCJKtc-Bold.otf.o: ../../selfdrive/assets/fonts/NotoSansCJKtc-Bold.otf
|
||||
@echo "[ bin2o ] $@"
|
||||
cd '$(dir $<)' && ld -r -b binary '$(notdir $<)' -o '$(abspath $@)'
|
||||
|
||||
opensans_semibold.ttf.o: ../../selfdrive/assets/fonts/opensans_semibold.ttf
|
||||
NotoSansCJKtc-Medium.otf.o: ../../selfdrive/assets/fonts/NotoSansCJKtc-Medium.otf
|
||||
@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_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");
|
||||
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");
|
||||
|
||||
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("Downloading " + name + "...");
|
||||
set_progress("下載 " + name + " 中...");
|
||||
bool r = download_file(url, out_fn);
|
||||
if (!r) {
|
||||
set_error("failed to download " + name);
|
||||
set_error("無法下載 " + name);
|
||||
return "";
|
||||
}
|
||||
|
||||
set_progress("Verifying " + name + "...");
|
||||
set_progress("驗證 " + name + " 中...");
|
||||
std::string fn_hash = sha256_file(out_fn);
|
||||
printf("got %s hash: %s\n", name.c_str(), hash.c_str());
|
||||
printf("得到 %s hash: %s\n", name.c_str(), hash.c_str());
|
||||
if (fn_hash != hash) {
|
||||
set_error(name + " was corrupt");
|
||||
set_error(name + " 已損壞");
|
||||
unlink(out_fn.c_str());
|
||||
return "";
|
||||
}
|
||||
@@ -357,7 +357,7 @@ struct Updater {
|
||||
}
|
||||
|
||||
if (!check_space()) {
|
||||
set_error("2GB of free space required to update");
|
||||
set_error("您需要至少 2GB 的空間進行升級");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -365,7 +365,7 @@ struct Updater {
|
||||
|
||||
const int EON = (access("/EON", F_OK) != -1);
|
||||
|
||||
set_progress("Finding latest version...");
|
||||
set_progress("尋找最新的版本...");
|
||||
std::string manifest_s;
|
||||
if (EON) {
|
||||
manifest_s = download_string(curl, manifest_url);
|
||||
@@ -374,12 +374,12 @@ struct Updater {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
printf("manifest: %s\n", manifest_s.c_str());
|
||||
printf("宣示說明: %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("failed to load update manifest");
|
||||
set_error("無法載入新的宣示說明");
|
||||
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("invalid update manifest");
|
||||
set_error("錯誤的宣示說明");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -406,12 +406,12 @@ struct Updater {
|
||||
|
||||
std::string recovery_fn;
|
||||
if (recovery_url.empty() || recovery_hash.empty() || recovery_len == 0) {
|
||||
set_progress("Skipping recovery flash...");
|
||||
set_progress("跳過 recovery 更新...");
|
||||
} else {
|
||||
// only download the recovery if it differs from what's flashed
|
||||
set_progress("Checking recovery...");
|
||||
set_progress("檢查 recovery...");
|
||||
std::string existing_recovery_hash = sha256_file(RECOVERY_DEV, recovery_len);
|
||||
printf("existing recovery hash: %s\n", existing_recovery_hash.c_str());
|
||||
printf("目前 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("Flashing recovery...");
|
||||
set_progress("刷新 recovery...");
|
||||
|
||||
FILE *flash_file = fopen(recovery_fn.c_str(), "rb");
|
||||
if (!flash_file) {
|
||||
set_error("failed to flash recovery");
|
||||
set_error("刷新 recovery 失敗");
|
||||
return;
|
||||
}
|
||||
|
||||
FILE *recovery_dev = fopen(RECOVERY_DEV, "w+b");
|
||||
if (!recovery_dev) {
|
||||
fclose(flash_file);
|
||||
set_error("failed to flash recovery");
|
||||
set_error("刷新 recovery 失敗");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -467,7 +467,7 @@ struct Updater {
|
||||
if (bytes_read != bytes_written) {
|
||||
fclose(recovery_dev);
|
||||
fclose(flash_file);
|
||||
set_error("failed to flash recovery: write failed");
|
||||
set_error("刷新 recovery 失敗: 無法寫入");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -475,12 +475,12 @@ struct Updater {
|
||||
fclose(recovery_dev);
|
||||
fclose(flash_file);
|
||||
|
||||
set_progress("Verifying flash...");
|
||||
set_progress("驗證新的 recovery...");
|
||||
std::string new_recovery_hash = sha256_file(RECOVERY_DEV, recovery_len);
|
||||
printf("new recovery hash: %s\n", new_recovery_hash.c_str());
|
||||
printf("新的 recovery hash: %s\n", new_recovery_hash.c_str());
|
||||
|
||||
if (new_recovery_hash != recovery_hash) {
|
||||
set_error("recovery flash corrupted");
|
||||
set_error("刷新 recovery 失敗");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -489,13 +489,13 @@ struct Updater {
|
||||
// write arguments to recovery
|
||||
FILE *cmd_file = fopen(RECOVERY_COMMAND, "wb");
|
||||
if (!cmd_file) {
|
||||
set_error("failed to reboot into recovery");
|
||||
set_error("無法重啟至 recovery");
|
||||
return;
|
||||
}
|
||||
fprintf(cmd_file, "--update_package=%s\n", ota_fn.c_str());
|
||||
fclose(cmd_file);
|
||||
|
||||
set_progress("Rebooting");
|
||||
set_progress("重新啟動");
|
||||
|
||||
// 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";
|
||||
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 + "%";
|
||||
low_battery_title = "電量過低";
|
||||
low_battery_text = "請將您的 EON 充電。當電量達到 35% 時系統將會繼續更新。";
|
||||
low_battery_context = "目前的電量為: " + 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, "Ensure EON is connected to power.", NULL);
|
||||
nvgText(vg, fb_w/2, 740, "請確保您的 EON 已接上充電器。", NULL);
|
||||
|
||||
NVGpaint paint = nvgBoxGradient(
|
||||
vg, progress_x + 1, progress_y + 1,
|
||||
@@ -635,10 +635,10 @@ struct Updater {
|
||||
|
||||
switch (state) {
|
||||
case CONFIRMATION:
|
||||
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");
|
||||
draw_ack_screen("NEOS 需要更新。",
|
||||
"您的設備將在點擊繼續後開始更新。\n更新檔約為 1GB 我們建議您先連接至無線網路。\n設備上現有的檔案不會丟失。",
|
||||
"繼續",
|
||||
"連線至無線網路");
|
||||
break;
|
||||
case LOW_BATTERY:
|
||||
draw_battery_screen();
|
||||
@@ -647,7 +647,7 @@ struct Updater {
|
||||
draw_progress_screen();
|
||||
break;
|
||||
case ERROR:
|
||||
draw_ack_screen("There was an error", (error_text).c_str(), NULL, "Reboot");
|
||||
draw_ack_screen("發生錯誤", (error_text).c_str(), NULL, "重新啟動");
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
+174
-175
@@ -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.none, AudibleAlert.none, .4, 0., 4.),
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, .4, 0., 1.),
|
||||
|
||||
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提示",
|
||||
"DEBUG ALERT",
|
||||
"",
|
||||
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",
|
||||
"试踩踏板",
|
||||
"無法使用 dragonpilot",
|
||||
"Pedal Pressed During Attempt",
|
||||
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",
|
||||
"TAKE CONTROL IMMEDIATELY",
|
||||
"Radar Communication Issue",
|
||||
"即刻接管控制",
|
||||
"雷達通訊出現問題",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, 2., 2.),
|
||||
|
||||
Alert(
|
||||
"radarCanError",
|
||||
"即刻接管控制",
|
||||
"雷達訊號錯誤:請重新發動車子",
|
||||
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.),
|
||||
|
||||
Alert(
|
||||
"radarFault",
|
||||
"即刻接管控制",
|
||||
"雷达讯号错误:请重新发动车辆",
|
||||
"AI 模型錯誤:請檢查網路連線",
|
||||
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,54 +778,53 @@ 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", "TAKE CONTROL IMMEDIATELY");
|
||||
snprintf(s->scene.alert_text2, sizeof(s->scene.alert_text2), "%s", "Controls Unresponsive");
|
||||
snprintf(s->scene.alert_text1, sizeof(s->scene.alert_text1), "%s", "即刻接管控制");
|
||||
snprintf(s->scene.alert_text2, sizeof(s->scene.alert_text2), "%s", "操控服務沒有反應");
|
||||
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