mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-07-20 20:32:06 +08:00
Compare commits
298 Commits
0.7.4-i18n
...
v0.7.4-zht
| Author | SHA1 | Date | |
|---|---|---|---|
| 7fa3899883 | |||
| d61d7c21c9 | |||
| a3bce89635 | |||
| 895eee3b95 | |||
| 13ecf69e32 | |||
| af09d09ca1 | |||
| 6ff40b6284 | |||
| f61949bd55 | |||
| 95a2afef18 | |||
| c1d2f6893e | |||
| 1d259a2275 | |||
| d1c47059a2 | |||
| 6cd95ae615 | |||
| 4cb93b8674 | |||
| e366ae40c2 | |||
| 504f44eb97 | |||
| 26b7682e72 | |||
| 8085b03447 | |||
| 10addc25d1 | |||
| 01412aeb76 | |||
| 49ea4d0329 | |||
| a02e331c26 | |||
| d6c12928ff | |||
| 7ffb1ed00d | |||
| ffa84400fe | |||
| 59a7f99e1b | |||
| 97a8b5329c | |||
| f2e275708b | |||
| 1b3e431acb | |||
| cbce7adad0 | |||
| cb7d6dbda0 | |||
| e3ab074e1d | |||
| bdf5cb2e5e | |||
| 422f57d7c6 | |||
| 18e12b813f | |||
| 26016f4082 | |||
| 2799779f28 | |||
| d791f0e74f | |||
| f64ffbdc4e | |||
| c809db4d14 | |||
| 59fdb08e90 | |||
| bb4217906e | |||
| 519a2c3f7c | |||
| ddf9967140 | |||
| 0c07b3bf84 | |||
| 2948e058f1 | |||
| 44701b21ac | |||
| 241c94bf7c | |||
| 9da86984d7 | |||
| 624725bb54 | |||
| 9a8e094db4 | |||
| 2e8bd5e3f9 | |||
| c1b14a342e | |||
| e59026f7ab | |||
| 6fd8edd115 | |||
| af1d977ab2 | |||
| fb2a14ddfd | |||
| 334dfc88d3 | |||
| 5a720bd4c3 | |||
| 4c8a5d189a | |||
| 03e7c6c504 | |||
| 9b9f9447fc | |||
| 7b48dcc0d6 | |||
| fbfcdeab61 | |||
| 3cac144b51 | |||
| 5cc255941d | |||
| 06079802eb | |||
| 56711d5e7b | |||
| dcad6ea6e1 | |||
| 721467ff0d | |||
| 63ec430d63 | |||
| 5d7a4ef9ef | |||
| 63ac70dfb4 | |||
| 83ce66b4c4 | |||
| 9095357e77 | |||
| 843dc44ca5 | |||
| 458742decc | |||
| 8cc0d2bbda | |||
| 95b7ba9292 | |||
| 1ea1114a46 | |||
| f20f1395c5 | |||
| 2b45a1bedc | |||
| 623202e42f | |||
| 109dd6c124 | |||
| 33fe61381f | |||
| f47260498a | |||
| 686cadcc3b | |||
| aa6a29b131 | |||
| a688db5d1f | |||
| 88c7fec070 | |||
| e30427c8ae | |||
| a2505dfacd | |||
| 87f88030ba | |||
| 55d81668fa | |||
| 8414b92cb6 | |||
| b2d26f87a0 | |||
| 486aa87955 | |||
| 6543308a37 | |||
| e2c778c8da | |||
| 2147e67a9e | |||
| d66e766cb1 | |||
| 80f7f3caad | |||
| 035e224fcb | |||
| 45892d1eea | |||
| d02bf7f40e | |||
| 2145cfdaef | |||
| 79db0ff796 | |||
| 29fd3412be | |||
| 7b262445f3 | |||
| 57a8178717 | |||
| d351e3c30e | |||
| 454a8a224f | |||
| 13ca838ad2 | |||
| 34393c5f60 | |||
| 3f0e8c8ffb | |||
| 55313f8ffe | |||
| d55e6c2e25 | |||
| 168ca679ef | |||
| ca3872566f | |||
| 1c2ee28c10 | |||
| 5fbb85eac7 | |||
| 1670fae9a6 | |||
| 4e8813b672 | |||
| c89edafb32 | |||
| c7d48ce2e9 | |||
| 0995a1ef49 | |||
| e02f0f7396 | |||
| b5050b15a6 | |||
| 56283e7d9a | |||
| da590e7080 | |||
| 7e0b289bb0 | |||
| 6d23d68c3e | |||
| 739627a7ec | |||
| ec1b04b1c3 | |||
| 4e0a923332 | |||
| 6dfd4f28c3 | |||
| a5cebd5e5a | |||
| fa61c2d23a | |||
| 1a631a4b65 | |||
| d9d2fb6a6e | |||
| af6b8ce49f | |||
| 437de933a4 | |||
| 428bdb0517 | |||
| c52b6aba74 | |||
| 382b1ab9a9 | |||
| 42cd92734b | |||
| ec0ed455a4 | |||
| ab370780f0 | |||
| f0702c4e81 | |||
| 6771c7b1d7 | |||
| b7dafb4c7a | |||
| 72d5f9f92b | |||
| 742a2fd31d | |||
| a030b89a8c | |||
| e60463ed43 | |||
| 2a0d64b8c5 | |||
| 89ccd869d5 | |||
| 5de7c2e931 | |||
| 390c8a6261 | |||
| df51d1227e | |||
| c19ffdf25b | |||
| 0ab0bd8a06 | |||
| 27b3cc95e7 | |||
| 66e5df437a | |||
| f15e689142 | |||
| 4e7a464fef | |||
| c7a392b19c | |||
| 94aa1efebf | |||
| 9eb6ce5721 | |||
| fe6b9bfef3 | |||
| 8742f29a84 | |||
| 493220a57e | |||
| c8026e7485 | |||
| 113a7fa3a7 | |||
| 9a2548f9ea | |||
| f5c704a61e | |||
| d0c6f10130 | |||
| 483b51389f | |||
| 3cc4a9936a | |||
| 0bc0937e74 | |||
| 9b445c9a3b | |||
| 2b3f80a62c | |||
| 5794196452 | |||
| c6feedcd39 | |||
| e724ebc27b | |||
| edcbffb727 | |||
| 660834c5bc | |||
| 88ee5426a4 | |||
| cf368cbf4a | |||
| 118837fdc1 | |||
| 47d9615a7b | |||
| b9c29aa347 | |||
| 4ebaf34e83 | |||
| d58977aba0 | |||
| bfb28e73be | |||
| 3c88face3d | |||
| 3df4721fc5 | |||
| ff7428a9fa | |||
| 8ef746eb4f | |||
| b2f25fd938 | |||
| 2c8321a115 | |||
| ca53ab0c00 | |||
| 398728334e | |||
| eb65a385ea | |||
| 1b2703ff98 | |||
| c2fc3df39f | |||
| d5b8edd30f | |||
| a790bd7b5a | |||
| 713d5b2298 | |||
| a514d2cb6e | |||
| fc8a6fb9bd | |||
| 41b466e34a | |||
| 0fd0e6219f | |||
| 901bb726ed | |||
| a037825934 | |||
| ed3c3d08c8 | |||
| 5450405875 | |||
| 96fd81b6dd | |||
| 9c119858e6 | |||
| f08a21821a | |||
| 82beac2773 | |||
| 53f0769bc1 | |||
| b72416df91 | |||
| 18ca040023 | |||
| 83c1bd1b1a | |||
| 9cfc7160b5 | |||
| bceaea130e | |||
| b7753e0fff | |||
| 8b7d601637 | |||
| 42f31523ed | |||
| de86c4cc62 | |||
| a95d0ee8f1 | |||
| 75325a0266 | |||
| b022dde0b8 | |||
| 70c6d56258 | |||
| a0539281a7 | |||
| 4a6c682b54 | |||
| 6694d4b8f4 | |||
| ce4d9b1179 | |||
| f527b82632 | |||
| eb73df9d54 | |||
| fe548a1b8d | |||
| e2e657d95b | |||
| fec395cc01 | |||
| 8a477d1ba5 | |||
| 44e503dde2 | |||
| e8e55e7083 | |||
| a4be7514d8 | |||
| 3fdc1ae3ae | |||
| 8763450529 | |||
| a9c8e64455 | |||
| 6a069f16ce | |||
| 10c56ea0d7 | |||
| 2133830e8c | |||
| bdfaa87837 | |||
| e92209ce1d | |||
| 64e92848c7 | |||
| 94103e3cb2 | |||
| 00ee1ff666 | |||
| ead5cb7d15 | |||
| 042efada91 | |||
| 9c9b709e62 | |||
| 007bf14639 | |||
| 2334cb5898 | |||
| 9e89f5c60b | |||
| 0a579ec35c | |||
| 48c079e98d | |||
| 8af74aa9fa | |||
| 32081799cf | |||
| 4e73f70e47 | |||
| 8979aebf77 | |||
| ac77d0d8cc | |||
| 8eaa60e6bd | |||
| bbd7b3a37c | |||
| e220f7e316 | |||
| cf7a0dd77a | |||
| 4fe2e7179b | |||
| 167d216edb | |||
| 7a7b9fd38a | |||
| 2e8d84555e | |||
| 46caedb19e | |||
| 464a755416 | |||
| 215dbe3134 | |||
| b088acf167 | |||
| ea081bd910 | |||
| c2622e7013 | |||
| 14d2a5837b | |||
| c620ec8103 | |||
| 52e5d5048e | |||
| 678cc85b90 | |||
| 98847efe34 | |||
| 2d09e9dc0a | |||
| 71f07b2c78 | |||
| e0a3becdf2 | |||
| ed3336340b | |||
| de44c1c27e | |||
| e5c536f470 | |||
| 65adaa15f0 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -31,7 +31,7 @@
|
||||
|
||||
|
||||
# Android system locale, zh-TW = Traditional Chinese, zh-CN = Simplified Chinese
|
||||
#lang=en
|
||||
lang=zh-TW
|
||||
|
||||
update_font=0
|
||||
remove_old_font=0
|
||||
@@ -67,5 +67,5 @@ if [ $update_font -eq "1" ] || [ $remove_old_font -eq "1" ]; then
|
||||
# change system locale
|
||||
fi
|
||||
|
||||
#setprop persist.sys.locale $lang
|
||||
#setprop persist.sys.local $lang
|
||||
setprop persist.sys.locale $lang
|
||||
setprop persist.sys.local $lang
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
+197
-198
@@ -77,99 +77,99 @@ ALERTS = [
|
||||
|
||||
Alert(
|
||||
"fcw",
|
||||
"BRAKE!",
|
||||
"Risk of Collision",
|
||||
"剎車!",
|
||||
"有碰撞的風險",
|
||||
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",
|
||||
"TAKE CONTROL",
|
||||
"Turn Exceeds Steering Limit",
|
||||
"接管控制",
|
||||
"彎道超過方向盤轉向限制",
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimePrompt, 1., 2., 3.),
|
||||
|
||||
Alert(
|
||||
"steerTempUnavailable",
|
||||
"TAKE CONTROL",
|
||||
"Steering Temporarily Unavailable",
|
||||
"接管控制",
|
||||
"轉向控制暫時失效",
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimeWarning1, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"steerTempUnavailableMute",
|
||||
"TAKE CONTROL",
|
||||
"Steering Temporarily Unavailable",
|
||||
"接管控制",
|
||||
"轉向控制暫時失效",
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, .2, .2, .2),
|
||||
|
||||
Alert(
|
||||
"preDriverDistracted",
|
||||
"KEEP EYES ON ROAD: Driver Appears Distracted",
|
||||
"注意路況:駕駛分心",
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, .0, .1, .1, alert_rate=0.75),
|
||||
|
||||
Alert(
|
||||
"promptDriverDistracted",
|
||||
"KEEP EYES ON ROAD",
|
||||
"Driver Appears Distracted",
|
||||
"注意路況",
|
||||
"駕駛分心",
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarning2, .1, .1, .1),
|
||||
|
||||
Alert(
|
||||
"driverDistracted",
|
||||
"DISENGAGE IMMEDIATELY",
|
||||
"Driver Was Distracted",
|
||||
"立即解除",
|
||||
"駕駛分心",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGH, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, .1, .1),
|
||||
|
||||
Alert(
|
||||
"preDriverUnresponsive",
|
||||
"TOUCH STEERING WHEEL: No Face Detected",
|
||||
"請觸碰方向盤:無駕駛監控",
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, .0, .1, .1, alert_rate=0.75),
|
||||
|
||||
Alert(
|
||||
"promptDriverUnresponsive",
|
||||
"TOUCH STEERING WHEEL",
|
||||
"Driver Is Unresponsive",
|
||||
"請觸碰方向盤",
|
||||
"駕駛沒有反應",
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarning2, .1, .1, .1),
|
||||
|
||||
Alert(
|
||||
"driverUnresponsive",
|
||||
"DISENGAGE IMMEDIATELY",
|
||||
"Driver Was Unresponsive",
|
||||
"立即解除",
|
||||
"駕駛沒有反應",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGH, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, .1, .1),
|
||||
|
||||
Alert(
|
||||
"driverMonitorLowAcc",
|
||||
"CHECK DRIVER FACE VISIBILITY",
|
||||
"Driver Monitor Model Output Uncertain",
|
||||
"請檢查駕駛面部的可見度",
|
||||
"駕駛監控模型輸出不明確",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, .4, 0., 1.),
|
||||
|
||||
Alert(
|
||||
"geofence",
|
||||
"DISENGAGEMENT REQUIRED",
|
||||
"Not in Geofenced Area",
|
||||
"不在地理圍欄區域之內",
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.HIGH, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, .1, .1),
|
||||
|
||||
Alert(
|
||||
"startup",
|
||||
"Be ready to take over at any time",
|
||||
"Always keep hands on wheel and eyes on road",
|
||||
"隨時準備好接管",
|
||||
"請您將手放在方向盤上並持續注意路況",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., 15.),
|
||||
|
||||
@@ -182,50 +182,50 @@ ALERTS = [
|
||||
|
||||
Alert(
|
||||
"startupNoControl",
|
||||
"Dashcam mode",
|
||||
"Always keep hands on wheel and eyes on road",
|
||||
"行車記錄模式",
|
||||
"請您將手放在方向盤上並持續注意路況",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., 15.),
|
||||
|
||||
Alert(
|
||||
"startupNoCar",
|
||||
"Dashcam mode with unsupported car",
|
||||
"Always keep hands on wheel and eyes on road",
|
||||
"行車記錄模式 (尚未支援車種)",
|
||||
"請您將手放在方向盤上並持續注意路況",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., 15.),
|
||||
|
||||
Alert(
|
||||
"ethicalDilemma",
|
||||
"TAKE CONTROL IMMEDIATELY",
|
||||
"即刻接管控制",
|
||||
"Ethical Dilemma Detected",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGHEST, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, 1., 3., 3.),
|
||||
|
||||
Alert(
|
||||
"steerTempUnavailableNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Steering Temporarily Unavailable",
|
||||
"無法使用 dragonpilot",
|
||||
"轉向控制暫時失效",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 0., 3.),
|
||||
|
||||
Alert(
|
||||
"manualRestart",
|
||||
"TAKE CONTROL",
|
||||
"Resume Driving Manually",
|
||||
"接管控制",
|
||||
"請自行恢復駕駛",
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
|
||||
Alert(
|
||||
"resumeRequired",
|
||||
"STOPPED",
|
||||
"Press Resume to Move",
|
||||
"已停止",
|
||||
"請按 RES 繼續",
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
|
||||
Alert(
|
||||
"belowSteerSpeed",
|
||||
"TAKE CONTROL",
|
||||
"Steer Unavailable Below ",
|
||||
"接管控制",
|
||||
"轉向控制暫時失效,車速低於 ",
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.none, 0., 0.4, .3),
|
||||
|
||||
@@ -237,539 +237,539 @@ ALERTS = [
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, .1, .1, .1),
|
||||
Alert(
|
||||
"preLaneChangeLeft",
|
||||
"Steer Left to Start Lane Change",
|
||||
"Monitor Other Vehicles",
|
||||
"請往左打方向盤切換車道",
|
||||
"請注意其它車輛",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, .0, .1, .1, alert_rate=0.75),
|
||||
|
||||
Alert(
|
||||
"preLaneChangeRight",
|
||||
"Steer Right to Start Lane Change",
|
||||
"Monitor Other Vehicles",
|
||||
"請往右打方向盤切換車道",
|
||||
"請注意其它車輛",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, .0, .1, .1, alert_rate=0.75),
|
||||
|
||||
Alert(
|
||||
"laneChange",
|
||||
"Changing Lane",
|
||||
"Monitor Other Vehicles",
|
||||
"切換車道中",
|
||||
"請注意其它車輛",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, .0, .1, .1),
|
||||
|
||||
Alert(
|
||||
"posenetInvalid",
|
||||
"TAKE CONTROL",
|
||||
"Vision Model Output Uncertain",
|
||||
"接管控制",
|
||||
"視覺模型輸出不明確",
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimeWarning1, .4, 2., 3.),
|
||||
|
||||
# Non-entry only alerts
|
||||
Alert(
|
||||
"wrongCarModeNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Main Switch Off",
|
||||
"無法使用 dragonpilot",
|
||||
"主開關關閉",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 0., 3.),
|
||||
|
||||
Alert(
|
||||
"dataNeededNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Data Needed for Calibration. Upload Drive, Try Again",
|
||||
"無法使用 dragonpilot",
|
||||
"需要更多的數據來協助校準,請將行車記錄上傳後再試",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 0., 3.),
|
||||
|
||||
Alert(
|
||||
"outOfSpaceNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Out of Storage Space",
|
||||
"無法使用 dragonpilot",
|
||||
"儲存空間不足",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 0., 3.),
|
||||
|
||||
Alert(
|
||||
"pedalPressedNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"無法使用 dragonpilot",
|
||||
"Pedal Pressed During Attempt",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, "brakePressed", AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"speedTooLowNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Speed Too Low",
|
||||
"無法使用 dragonpilot",
|
||||
"車速過慢",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"brakeHoldNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Brake Hold Active",
|
||||
"無法使用 dragonpilot",
|
||||
"駐車煞車已啟用",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"parkBrakeNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Park Brake Engaged",
|
||||
"無法使用 dragonpilot",
|
||||
"電子駐車已啟動",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"lowSpeedLockoutNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Cruise Fault: Restart the Car",
|
||||
"無法使用 dragonpilot",
|
||||
"巡航系統錯誤:請重新發動車子",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"lowBatteryNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Low Battery",
|
||||
"無法使用 dragonpilot",
|
||||
"電池電量過低",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"sensorDataInvalidNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"No Data from Device Sensors",
|
||||
"無法使用 dragonpilot",
|
||||
"沒有收到任何來自裝置傳感器的資料",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"soundsUnavailableNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Speaker not found",
|
||||
"無法使用 dragonpilot",
|
||||
"找不到音效裝置",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"tooDistractedNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Distraction Level Too High",
|
||||
"無法使用 dragonpilot",
|
||||
"駕駛分心次數過高",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
# Cancellation alerts causing soft disabling
|
||||
Alert(
|
||||
"overheat",
|
||||
"TAKE CONTROL IMMEDIATELY",
|
||||
"System Overheated",
|
||||
"即刻接管控制",
|
||||
"系統過熱",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, 2., 2.),
|
||||
|
||||
Alert(
|
||||
"wrongGear",
|
||||
"TAKE CONTROL IMMEDIATELY",
|
||||
"Gear not D",
|
||||
"即刻接管控制",
|
||||
"檔位不在 D 檔",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, 2., 2.),
|
||||
|
||||
Alert(
|
||||
"calibrationInvalid",
|
||||
"TAKE CONTROL IMMEDIATELY",
|
||||
"Calibration Invalid: Reposition Device and Recalibrate",
|
||||
"即刻接管控制",
|
||||
"校準無效:請將裝置放於新的位置並重新校準",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, 2., 2.),
|
||||
|
||||
Alert(
|
||||
"calibrationIncomplete",
|
||||
"TAKE CONTROL IMMEDIATELY",
|
||||
"Calibration in Progress",
|
||||
"即刻接管控制",
|
||||
"正在校準相機中",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, 2., 2.),
|
||||
|
||||
Alert(
|
||||
"doorOpen",
|
||||
"TAKE CONTROL IMMEDIATELY",
|
||||
"Door Open",
|
||||
"即刻接管控制",
|
||||
"車門開啟",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, 2., 2.),
|
||||
|
||||
Alert(
|
||||
"seatbeltNotLatched",
|
||||
"TAKE CONTROL IMMEDIATELY",
|
||||
"Seatbelt Unlatched",
|
||||
"即刻接管控制",
|
||||
"安全帶未繫",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, 2., 2.),
|
||||
|
||||
Alert(
|
||||
"espDisabled",
|
||||
"TAKE CONTROL IMMEDIATELY",
|
||||
"ESP Off",
|
||||
"即刻接管控制",
|
||||
"ESP 關閉",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, 2., 2.),
|
||||
|
||||
Alert(
|
||||
"lowBattery",
|
||||
"TAKE CONTROL IMMEDIATELY",
|
||||
"Low Battery",
|
||||
"即刻接管控制",
|
||||
"電池電量過低",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, 2., 2.),
|
||||
|
||||
Alert(
|
||||
"commIssue",
|
||||
"TAKE CONTROL IMMEDIATELY",
|
||||
"Communication Issue between Processes",
|
||||
"即刻接管控制",
|
||||
"雷達訊號錯誤:請重新發動車子",
|
||||
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",
|
||||
"TAKE CONTROL IMMEDIATELY",
|
||||
"Radar Error: Restart the Car",
|
||||
"即刻接管控制",
|
||||
"雷達訊號錯誤:請重新發動車子",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, 2., 2.),
|
||||
|
||||
Alert(
|
||||
"radarFault",
|
||||
"TAKE CONTROL IMMEDIATELY",
|
||||
"Radar Error: Restart the Car",
|
||||
"即刻接管控制",
|
||||
"AI 模型錯誤:請檢查網路連線",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, 2., 2.),
|
||||
|
||||
|
||||
Alert(
|
||||
"lowMemory",
|
||||
"TAKE CONTROL IMMEDIATELY",
|
||||
"Low Memory: Reboot Your Device",
|
||||
"即刻接管控制",
|
||||
"記憶體不足:請重啟您的裝置",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, 2., 2.),
|
||||
|
||||
# Cancellation alerts causing immediate disabling
|
||||
Alert(
|
||||
"controlsFailed",
|
||||
"TAKE CONTROL IMMEDIATELY",
|
||||
"Controls Failed",
|
||||
"即刻接管控制",
|
||||
"控制發生錯誤",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGHEST, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, 2.2, 3., 4.),
|
||||
|
||||
Alert(
|
||||
"controlsMismatch",
|
||||
"TAKE CONTROL IMMEDIATELY",
|
||||
"Controls Mismatch",
|
||||
"即刻接管控制",
|
||||
"控制不匹配",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGHEST, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, 2.2, 3., 4.),
|
||||
|
||||
Alert(
|
||||
"canError",
|
||||
"TAKE CONTROL IMMEDIATELY",
|
||||
"CAN Error: Check Connections",
|
||||
"即刻接管控制",
|
||||
"CAN 訊號錯誤:請檢查接線",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGHEST, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, 2.2, 3., 4.),
|
||||
|
||||
Alert(
|
||||
"steerUnavailable",
|
||||
"TAKE CONTROL IMMEDIATELY",
|
||||
"LKAS Fault: Restart the Car",
|
||||
"即刻接管控制",
|
||||
"LKAS 錯誤:請重新發動車子",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGHEST, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, 2.2, 3., 4.),
|
||||
|
||||
Alert(
|
||||
"brakeUnavailable",
|
||||
"TAKE CONTROL IMMEDIATELY",
|
||||
"Cruise Fault: Restart the Car",
|
||||
"即刻接管控制",
|
||||
"巡航系統錯誤:請重新發動車子",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGHEST, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, 2.2, 3., 4.),
|
||||
|
||||
Alert(
|
||||
"gasUnavailable",
|
||||
"TAKE CONTROL IMMEDIATELY",
|
||||
"Gas Fault: Restart the Car",
|
||||
"即刻接管控制",
|
||||
"油門錯誤:請重新發動車子",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGHEST, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, 2.2, 3., 4.),
|
||||
|
||||
Alert(
|
||||
"reverseGear",
|
||||
"TAKE CONTROL IMMEDIATELY",
|
||||
"Reverse Gear",
|
||||
"即刻接管控制",
|
||||
"切換至倒車檔",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGHEST, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, 2.2, 3., 4.),
|
||||
|
||||
Alert(
|
||||
"cruiseDisabled",
|
||||
"TAKE CONTROL IMMEDIATELY",
|
||||
"Cruise Is Off",
|
||||
"即刻接管控制",
|
||||
"巡航系統關閉",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGHEST, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, 2.2, 3., 4.),
|
||||
|
||||
Alert(
|
||||
"plannerError",
|
||||
"TAKE CONTROL IMMEDIATELY",
|
||||
"Planner Solution Error",
|
||||
"即刻接管控制",
|
||||
"Planner Solution 錯誤",
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGHEST, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, 2.2, 3., 4.),
|
||||
|
||||
# not loud cancellations (user is in control)
|
||||
Alert(
|
||||
"noTarget",
|
||||
"openpilot Canceled",
|
||||
"No close lead car",
|
||||
"dragonpilot 已取消",
|
||||
"沒有偵測到前車",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.HIGH, VisualAlert.none, AudibleAlert.chimeDisengage, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"speedTooLow",
|
||||
"openpilot Canceled",
|
||||
"Speed too low",
|
||||
"dragonpilot 已取消",
|
||||
"車速過慢",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.HIGH, VisualAlert.none, AudibleAlert.chimeDisengage, .4, 2., 3.),
|
||||
|
||||
# Cancellation alerts causing non-entry
|
||||
Alert(
|
||||
"overheatNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"System overheated",
|
||||
"無法使用 dragonpilot",
|
||||
"系統過熱",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"wrongGearNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Gear not D",
|
||||
"無法使用 dragonpilot",
|
||||
"車子不在 D 檔",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"calibrationInvalidNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Calibration Invalid: Reposition Device and Recalibrate",
|
||||
"無法使用 dragonpilot",
|
||||
"校準無效:請將裝置放於新的位置並重新校準",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"calibrationIncompleteNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Calibration in Progress",
|
||||
"無法使用 dragonpilot",
|
||||
"正在校準相機中",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"doorOpenNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Door open",
|
||||
"無法使用 dragonpilot",
|
||||
"車門未關",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"seatbeltNotLatchedNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Seatbelt unlatched",
|
||||
"無法使用 dragonpilot",
|
||||
"安全帶未繫",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"espDisabledNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"ESP Off",
|
||||
"無法使用 dragonpilot",
|
||||
"ESP 關閉",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"geofenceNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Not in Geofenced Area",
|
||||
"無法使用 dragonpilot",
|
||||
"不在地理圍欄區域之內",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.MID, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"radarCanErrorNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Radar Error: Restart the Car",
|
||||
"無法使用 dragonpilot",
|
||||
"雷達訊號錯誤:請重新發動車子",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"radarFaultNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Radar Error: Restart the Car",
|
||||
"無法使用 dragonpilot",
|
||||
"雷達訊號錯誤:請重新發動車子",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"posenetInvalidNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Vision Model Output Uncertain",
|
||||
"無法使用 dragonpilot",
|
||||
"視覺模型輸出不明確",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"controlsFailedNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Controls Failed",
|
||||
"無法使用 dragonpilot",
|
||||
"控制發生錯誤",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"canErrorNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"CAN Error: Check Connections",
|
||||
"無法使用 dragonpilot",
|
||||
"CAN 訊號錯誤:請檢查接線",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"steerUnavailableNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"LKAS Fault: Restart the Car",
|
||||
"無法使用 dragonpilot",
|
||||
"LKAS 錯誤:請重新發動車子",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"brakeUnavailableNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Cruise Fault: Restart the Car",
|
||||
"無法使用 dragonpilot",
|
||||
"巡航系統錯誤:請重新發動車子",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"gasUnavailableNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Gas Error: Restart the Car",
|
||||
"無法使用 dragonpilot",
|
||||
"油門錯誤:請重新發動車子",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"reverseGearNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Reverse Gear",
|
||||
"無法使用 dragonpilot",
|
||||
"切換至倒車檔",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"cruiseDisabledNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Cruise is Off",
|
||||
"無法使用 dragonpilot",
|
||||
"巡航系統關閉",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"noTargetNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"No Close Lead Car",
|
||||
"無法使用 dragonpilot",
|
||||
"沒有偵測到前車",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"plannerErrorNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Planner Solution Error",
|
||||
"無法使用 dragonpilot",
|
||||
"Planner Solution 錯誤",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"commIssueNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Communication Issue between Processes",
|
||||
"無法使用 dragonpilot",
|
||||
"行程出現通訊問題",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeDisengage, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"radarCommIssueNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Radar Communication Issue",
|
||||
"無法使用 dragonpilot",
|
||||
"雷達通訊出現問題",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeDisengage, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"internetConnectivityNeededNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Please Connect to Internet",
|
||||
"無法使用 dragonpilot",
|
||||
"請連接網路",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeDisengage, .4, 2., 3.),
|
||||
|
||||
Alert(
|
||||
"lowMemoryNoEntry",
|
||||
"openpilot Unavailable",
|
||||
"Low Memory: Reboot Your Device",
|
||||
"無法使用 dragonpilot",
|
||||
"記憶體不足:請重啟您的裝置",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeDisengage, .4, 2., 3.),
|
||||
|
||||
# permanent alerts
|
||||
Alert(
|
||||
"steerUnavailablePermanent",
|
||||
"LKAS Fault: Restart the car to engage",
|
||||
"LKAS 錯誤:請重新發動車子",
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
|
||||
Alert(
|
||||
"brakeUnavailablePermanent",
|
||||
"Cruise Fault: Restart the car to engage",
|
||||
"巡航系統錯誤:請重新發動車子",
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
|
||||
Alert(
|
||||
"lowSpeedLockoutPermanent",
|
||||
"Cruise Fault: Restart the car to engage",
|
||||
"巡航系統錯誤:請重新發動車子",
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
|
||||
Alert(
|
||||
"calibrationIncompletePermanent",
|
||||
"Calibration in Progress: ",
|
||||
"Drive Above ",
|
||||
"正在校準相機中:",
|
||||
"車速請高於 ",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOWEST, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
|
||||
Alert(
|
||||
"invalidGiraffeToyotaPermanent",
|
||||
"Unsupported Giraffe Configuration",
|
||||
"Visit comma.ai/tg",
|
||||
"未支援的 Giraffe 設置",
|
||||
"請查閱 comma.ai/tg",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
|
||||
Alert(
|
||||
"internetConnectivityNeededPermanent",
|
||||
"Please connect to Internet",
|
||||
"An Update Check Is Required to Engage",
|
||||
"請連接網路",
|
||||
"需檢查更新後才能啟用",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
|
||||
Alert(
|
||||
"communityFeatureDisallowedPermanent",
|
||||
"Community Feature Detected",
|
||||
"Enable Community Features in Developer Settings",
|
||||
"偵測到社群開發功能",
|
||||
"請至開發人員設定裡啟用社群開發功能",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, 0., 0., .2), # LOW priority to overcome Cruise Error
|
||||
|
||||
Alert(
|
||||
"sensorDataInvalidPermanent",
|
||||
"No Data from Device Sensors",
|
||||
"Reboot your Device",
|
||||
"沒有收到任何來自 EON 傳感器的資料",
|
||||
"請重啟您的裝置",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
|
||||
Alert(
|
||||
"soundsUnavailablePermanent",
|
||||
"Speaker not found",
|
||||
"Reboot your Device",
|
||||
"找不到音效裝置",
|
||||
"請重啟您的裝置",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
|
||||
Alert(
|
||||
"lowMemoryPermanent",
|
||||
"RAM Critically Low",
|
||||
"Reboot your Device",
|
||||
"記憶體嚴重不足",
|
||||
"請重啟您的裝置",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
|
||||
Alert(
|
||||
"carUnrecognizedPermanent",
|
||||
"Dashcam Mode",
|
||||
"Car Unrecognized",
|
||||
"行車記錄模式",
|
||||
"無法辨識您的車款",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
|
||||
Alert(
|
||||
"vehicleModelInvalid",
|
||||
"Vehicle Parameter Identification Failed",
|
||||
"車子參數識別失敗",
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOWEST, VisualAlert.steerRequired, AudibleAlert.none, .0, .0, .1),
|
||||
@@ -777,55 +777,54 @@ ALERTS = [
|
||||
# offroad alerts
|
||||
Alert(
|
||||
"ldwPermanent",
|
||||
"TAKE CONTROL",
|
||||
"Lane Departure Detected",
|
||||
"接管控制",
|
||||
"偵測到已偏離車道",
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimePrompt, 1., 2., 3.),
|
||||
# dragonpilot
|
||||
Alert(
|
||||
"manualSteeringRequired",
|
||||
"STEERING REQUIRED: Lane Keeping OFF",
|
||||
"請接管方向盤:車道維持關閉",
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, .0, .1, .1, alert_rate=0.25),
|
||||
|
||||
Alert(
|
||||
"manualSteeringRequiredBlinkersOn",
|
||||
"STEERING REQUIRED: Blinkers ON",
|
||||
"請接管方向盤:方向燈開啟",
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, .0, .1, .1, alert_rate=0.25),
|
||||
Alert(
|
||||
"leadCarMoving",
|
||||
"Lead Car Is Moving",
|
||||
"前車移動中,請開始加速",
|
||||
"",
|
||||
AlertStatus.userPrompt, AlertSize.small,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimeWarning2, .1, .1, .1),
|
||||
Alert(
|
||||
"leadCarDetected",
|
||||
"Lead Car Detected",
|
||||
"偵測到前車,等待中",
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, .0, .1, .1, alert_rate=0.25),
|
||||
Alert(
|
||||
"preAutoLaneChangeLeft",
|
||||
"Left Auto Lane Change will engage in 3 seconds",
|
||||
"Monitor Other Vehicles",
|
||||
"將在三秒後自動切至左車道",
|
||||
"請注意其它車輛",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimeWarning2, .1, .1, .1, alert_rate=0.75),
|
||||
|
||||
Alert(
|
||||
"preAutoLaneChangeRight",
|
||||
"Right Auto Lane Change will engage in 3 seconds",
|
||||
"Monitor Other Vehicles",
|
||||
"將在三秒後自動切至右車道",
|
||||
"請注意其它車輛",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimeWarning2, .1, .1, .1, alert_rate=0.75),
|
||||
|
||||
Alert(
|
||||
"autoLaneChange",
|
||||
"Changing Lane",
|
||||
"Monitor Other Vehicles",
|
||||
"切換車道中",
|
||||
"請注意其它車輛",
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimeWarning2, .1, .1, .1),
|
||||
|
||||
]
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
{
|
||||
"Offroad_ChargeDisabled": {
|
||||
"text": "EON charging disabled after car being off for more than 30 hours. Turn ignition on to start charging again.",
|
||||
"text": "因車輛已熄火超過 30 小時,系統將會停止為 EON 充電,再次發動車輛後 EON 會恢復充電",
|
||||
"severity": 0
|
||||
},
|
||||
"Offroad_TemperatureTooHigh": {
|
||||
"text": "Device temperature too high. System won't start.",
|
||||
"text": "裝置溫度過高,系統暫時無法啟用。",
|
||||
"severity": 1
|
||||
},
|
||||
"Offroad_ConnectivityNeededPrompt": {
|
||||
"text": "Immediately connect to the internet to check for updates. If you do not connect to the internet, openpilot won't engage in ",
|
||||
"text": "目前 dragonpilot 無法啟用,請馬上連網檢查更新。",
|
||||
"severity": 0,
|
||||
"_comment": "Append the number of days at the end of the text"
|
||||
},
|
||||
"Offroad_ConnectivityNeeded": {
|
||||
"text": "Connect to internet to check for updates. openpilot won't engage until it connects to internet to check for updates.",
|
||||
"text": "請連網檢查更新。不然 dragonpilot 將無法啟用。",
|
||||
"severity": 1
|
||||
},
|
||||
"Offroad_PandaFirmwareMismatch": {
|
||||
"text": "Unexpected panda firmware version. System won't start. Reboot your device to reflash panda.",
|
||||
"text": "Panda 的韌體版本出現異常,系統無法啟用。請重啟您的裝置以刷新 Panda 韌體。",
|
||||
"severity": 1
|
||||
},
|
||||
"Offroad_InvalidTime": {
|
||||
"text": "Invalid date and time settings, system won't start. Connect to internet to set time.",
|
||||
"text": "系統日期/時間設定錯誤,系統無法啟用。請連上網設定的時間。",
|
||||
"severity": 1
|
||||
},
|
||||
"Offroad_IsTakingSnapshot": {
|
||||
"text": "Taking camera snapshots. System won't start until finished.",
|
||||
"text": "相機拍攝中,完成前系統無法啟用。",
|
||||
"severity": 0
|
||||
}
|
||||
}
|
||||
|
||||
@@ -973,7 +973,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, "REL DIST",
|
||||
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 );
|
||||
@@ -1008,7 +1008,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, "REL SPEED",
|
||||
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 );
|
||||
@@ -1053,7 +1053,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, "REAL STEER",
|
||||
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 );
|
||||
@@ -1077,7 +1077,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, "DESIR STEER",
|
||||
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 );
|
||||
@@ -1342,11 +1342,11 @@ void ui_nvg_init(UIState *s) {
|
||||
|
||||
s->font_courbd = nvgCreateFont(s->vg, "courbd", "../assets/fonts/courbd.ttf");
|
||||
assert(s->font_courbd >= 0);
|
||||
s->font_sans_regular = nvgCreateFont(s->vg, "sans-regular", "../assets/fonts/opensans_regular.ttf");
|
||||
s->font_sans_regular = nvgCreateFont(s->vg, "sans-regular", "../../dragonpilot/chinese-fonts/NotoSansCJKtc-Regular.otf");
|
||||
assert(s->font_sans_regular >= 0);
|
||||
s->font_sans_semibold = nvgCreateFont(s->vg, "sans-semibold", "../assets/fonts/opensans_semibold.ttf");
|
||||
s->font_sans_semibold = nvgCreateFont(s->vg, "sans-semibold", "../../dragonpilot/chinese-fonts/NotoSansCJKtc-Medium.otf");
|
||||
assert(s->font_sans_semibold >= 0);
|
||||
s->font_sans_bold = nvgCreateFont(s->vg, "sans-bold", "../assets/fonts/opensans_bold.ttf");
|
||||
s->font_sans_bold = nvgCreateFont(s->vg, "sans-bold", "../../dragonpilot/chinese-fonts/NotoSansCJKtc-Bold.otf");
|
||||
assert(s->font_sans_bold >= 0);
|
||||
|
||||
assert(s->img_wheel >= 0);
|
||||
|
||||
@@ -216,7 +216,7 @@ static void ui_draw_sidebar_storage_metric(UIState *s, bool hasSidebar) {
|
||||
|
||||
snprintf(storage_value_str, sizeof(storage_value_str), "%d", (int)storage_pct);
|
||||
snprintf(storage_value_unit, sizeof(storage_value_unit), "%s", "%");
|
||||
snprintf(storage_label_str, sizeof(storage_label_str), "%s", "STORAGE");
|
||||
snprintf(storage_label_str, sizeof(storage_label_str), "%s", "儲存空間");
|
||||
strcat(storage_value_str, storage_value_unit);
|
||||
|
||||
ui_draw_sidebar_metric(s, storage_label_str, storage_value_str, storage_severity, storage_y_offset, NULL, hasSidebar);
|
||||
@@ -240,8 +240,8 @@ static void ui_draw_sidebar_temp_metric(UIState *s, bool hasSidebar) {
|
||||
}
|
||||
|
||||
snprintf(temp_value_str, sizeof(temp_value_str), "%d", s->scene.paTemp);
|
||||
snprintf(temp_value_unit, sizeof(temp_value_unit), "%s", "°C");
|
||||
snprintf(temp_label_str, sizeof(temp_label_str), "%s", "TEMP");
|
||||
snprintf(temp_value_unit, sizeof(temp_value_unit), "%s", "℃");
|
||||
snprintf(temp_label_str, sizeof(temp_label_str), "%s", "溫度");
|
||||
strcat(temp_value_str, temp_value_unit);
|
||||
|
||||
ui_draw_sidebar_metric(s, temp_label_str, temp_value_str, temp_severity, temp_y_offset, NULL, hasSidebar);
|
||||
@@ -254,17 +254,17 @@ static void ui_draw_sidebar_panda_metric(UIState *s, bool hasSidebar) {
|
||||
|
||||
if (s->scene.hwType == cereal_HealthData_HwType_unknown) {
|
||||
panda_severity = 2;
|
||||
snprintf(panda_message_str, sizeof(panda_message_str), "%s", "NO PANDA");
|
||||
snprintf(panda_message_str, sizeof(panda_message_str), "%s", "無 PANDA");
|
||||
} else if (s->scene.hwType == cereal_HealthData_HwType_whitePanda) {
|
||||
panda_severity = 0;
|
||||
snprintf(panda_message_str, sizeof(panda_message_str), "%s", "PANDA\nACTIVE");
|
||||
snprintf(panda_message_str, sizeof(panda_message_str), "%s", "PANDA\n已連接");
|
||||
} else if (
|
||||
(s->scene.hwType == cereal_HealthData_HwType_greyPanda) ||
|
||||
(s->scene.hwType == cereal_HealthData_HwType_blackPanda) ||
|
||||
(s->scene.hwType == cereal_HealthData_HwType_uno)) {
|
||||
if (s->scene.satelliteCount == -1) {
|
||||
panda_severity = 0;
|
||||
snprintf(panda_message_str, sizeof(panda_message_str), "%s", "PANDA\nACTIVE");
|
||||
snprintf(panda_message_str, sizeof(panda_message_str), "%s", "PANDA\n已連接");
|
||||
} else {
|
||||
if (s->scene.satelliteCount < 6) {
|
||||
panda_severity = 1;
|
||||
|
||||
+2
-2
@@ -1073,8 +1073,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