mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-19 21:12:04 +08:00
Compare commits
7 Commits
0.8.13
...
0.7.7-i18n
| Author | SHA1 | Date | |
|---|---|---|---|
| 565f53ff8f | |||
| 1fc12cfdeb | |||
| 589a90e585 | |||
| 2f340da85d | |||
| fc73a3b5ee | |||
| 84b6ee1947 | |||
| 1095df55ac |
@@ -0,0 +1,491 @@
|
||||
dragonpilot 0.7.7.2
|
||||
========================
|
||||
* 加入 d_poly offset。 (感謝 @ShaneSmiskol)
|
||||
* Added d_poly offset. (Thanks to @ShaneSmiskol)
|
||||
* 加入 ZSS 支援。(感謝 @bobbydough, @WilliamPrius 建議, @bobbydough 測試)
|
||||
* Added ZSS support. (Thanks to @bobbydough, @WilliamPrius for recommendation, @bobbydough for testing)
|
||||
* 加入錯誤記錄至 /sdcard/crash_logs/ (感謝 @ShaneSmiskol 提供代碼)
|
||||
* Added error logs to /sdcard/crash_logs/ (Special Thanks to @ShaneSmiskol)
|
||||
* 加入 LQR 控制器開關進設定畫面。
|
||||
* Added LQR Controller toggle to settings.
|
||||
|
||||
dragonpilot 0.7.7.1
|
||||
========================
|
||||
* 加入 C2 風扇靜音模式。(感謝 @dingliangxue)
|
||||
* Added C2 quiet fan mode. (Thanks to @dingliangxue)
|
||||
* 加入「輔助換道最低啟動速度」、「自動換道最低啟動速度」設定。
|
||||
* Added "Assisted Lane Change Min Engage Speed" and "Auto Lane Change Min Engage Speed" settings.
|
||||
* 加入回調校介面。(感謝 @Kent)
|
||||
* Re-added Dev UI. (Thanks to @Kent)
|
||||
* 加入 "dp_lqr" 設定來強制使用 RAV4 的 lqr 調校。(感謝 @eisenheim)
|
||||
* Added "dp_lqr" setting to force enable lqr tuning from RAV4. (Thanks to eisenheim)
|
||||
|
||||
dragonpilot 0.7.7.0
|
||||
========================
|
||||
* 基於最新 openpilot 0.7.7 devel.
|
||||
* Based on latest openpilot 0.7.7 devel.
|
||||
* 當 Manager 出現錯誤時,顯示 IP 位置。(感謝 @dingliangxue)
|
||||
* When Manager failed, display IP address. (Thanks to @dingliangxue)
|
||||
* 加回 sr learner 開關。
|
||||
* Re-added sr learner toggle.
|
||||
* 加回 加速模式 開關。
|
||||
* Re-added Accel Profile toggle.
|
||||
* Toyota 加入改寫最低巡航速度功能。(感謝 @Mojo)
|
||||
* Added Toyota to override lowerest cruise speed. (Thanks to @Mojo)
|
||||
* 介面加入盲點偵測顯示。(感謝 @wabes)
|
||||
* Added BSM indicator to UI. (Thanks to @wabes)
|
||||
* 加回彎道減速功能。(感謝 @Mojo)
|
||||
* re-added Slow On Curve functionality. (Thanks to @Mojo)
|
||||
|
||||
dragonpilot 0.7.6.2
|
||||
========================
|
||||
* 修正無法正確關閉駕駛監控的問題。
|
||||
* Fixed unable to properly turn off driver monitor issue.
|
||||
|
||||
dragonpilot 0.7.6.1
|
||||
========================
|
||||
* 基於最新 openpilot 0.7.6.1 devel.
|
||||
* Based on latest openpilot 0.7.6.1 devel.
|
||||
* 優化並整合 dp 服務。 (所有的設定檔已改名,請重新設定所有的功能)
|
||||
* Optimized and integrated several dp services. (Settings have been renamed, please re-config all settings)
|
||||
* 完全關閉 steer ratio learner。
|
||||
* Completely disabled steer ratio learner.
|
||||
* 移除「加速模式」。
|
||||
* Removed Accel Profile.
|
||||
* 加入本田皓影混電版指紋v1。(感謝 @劉駿)
|
||||
* Added Honda Breeze Hybrid FPv1. (Thanks to @劉駿)
|
||||
* 加入台灣版 Toyota Prius 4.5 指紋v1。(感謝 @jeekid)
|
||||
* Added Taiwan Toyota Prius 4.5 FPv1. (Thanks to @jeekid)
|
||||
|
||||
dragonpilot 0.7.5.4
|
||||
========================
|
||||
* Dynamic Follow 更新模型。(感謝 @ShaneSmiskol 提供代碼、 @cgw1968 測試)
|
||||
* Updated Dynamic Follow model. (Special Thanks to @ShaneSmiskol for the feature and @cgw1968 for testing)
|
||||
|
||||
dragonpilot 0.7.5.3
|
||||
========================
|
||||
* Dynamic Follow 更新至 ShaneSmiskol:stock_additions 0.7.5 版。(感謝 @ShaneSmiskol 提供代碼、 @Wei 測試)
|
||||
* Updated Dynamic Follow to ShaneSmiskol:stock_additions 0.7.5. (Special Thanks to @ShaneSmiskol for the feature and @Wei for testing)
|
||||
* 優化 Lexus GSH 轉向。(感謝 @簡銘佑 測試)
|
||||
* Optimize Lexus GSH steering. (Thanks to @簡銘佑)
|
||||
* C2 支援自動關機「DragonAutoShutdownAt」參數。(感謝 @cgw1968 建議)
|
||||
* C2 to support auto shutdown "DragonAutoShutDownAt" param. (Thanks to @cgw1968)
|
||||
* 修正出現「pedalPressed」的錯誤。(感謝 @Wei 回報)
|
||||
* Fixed issue showing "pedalPressed" error. (Thanks to @Wei)
|
||||
* 將剎車狀熊顯示於 dp 資訊欄。
|
||||
* Added brake indicator to dp infobar.
|
||||
* 修正「溫度監控」燈示。
|
||||
* Fixed "Temp monitor" indicator.
|
||||
* 加入「方向燈取消控制」延遲控制設。(感謝 @wabes 建議)
|
||||
* Added delay config to "Disable Lat Control on Blinker". (Thanks to @wabes)
|
||||
* 加入巴西版 2020 Corolla Hybrid 指紋v2。(感謝 @berno22 提供)
|
||||
* Added Brazil 2020 Corolla Hybrid FPv2. (Thanks to @berno22)
|
||||
|
||||
dragonpilot 0.7.5.2
|
||||
========================
|
||||
* 加入對 VW MQB/PQ 的支援。(感謝 @dingliangxue 移植)
|
||||
* Added support to VW MQB/PQ platform. (Thanks to @dingliangxue)
|
||||
* 修改成 3 小時後停止供電。(感謝 @Wei 建議)
|
||||
* Updated to stop charging after 3 hrs. (Thanks to @Wei)
|
||||
* 移除行車記錄下的「碰撞偵測」功能。
|
||||
* Removed Impact Detection in Dashcam.
|
||||
* 修正開啟「Noctua 風扇」模式導致的錯誤。(感謝 @阿濤 回報)
|
||||
* Fixed a bug caused by enabling "Noctua Mod". (Thanks to @阿濤)
|
||||
* 修正「位智模式」無法顯示警示的問題。(感謝 @axandres 回報)
|
||||
* Fixed alert issue in waze mode. (Thanks to @axandres)
|
||||
* 修正無法顯示更新中圖示的問題。
|
||||
* Fixed unable to display "UPDATING" icon issue.
|
||||
* 加入「允許多次自動換道」功能。(感謝 @阿濤 建議)
|
||||
* Added "Allow Continuous Auto Lane Change" Toggle. (Thanks to @阿濤)
|
||||
* 修正開機後設定頁面有時會錯誤的問題。(感謝 @salmankhan、@Wei 回報)
|
||||
* Fixed setting page crash issue. (Thanks to @salmankhan, @Wei)
|
||||
* 修正熄火後一直出現更新訊息的錯誤。(感謝 @Sky Chang 回報)
|
||||
* Fixed issue that keep showing update prompt. (Thanks to @Sky Chang)
|
||||
|
||||
dragonpilot 0.7.5.1
|
||||
========================
|
||||
* 修正因同時使用「社群功能」和「自定車型」造成的加減速問題。(特別感謝 @Wei、@Sky Chang、@Han9365、@鄧育林 的測試以及回報。)
|
||||
* Fixed acceleration issue caused by used of both "Community Maintain Feature" and "Custom Car Model". (Special Thanks to @Wei, @Sky Chang, @Han9365, @鄧育林)
|
||||
* 新增 DragonMaxSpeedLimit 設定值 (mph),當如果車速高於此值 op 將會停止操控。(感謝 @Anthony 建議)
|
||||
* Added DragonMaxSpeedLimit parameter (mph), op will stop controlling when car speed is high than the value. (Thanks to @Anthony)
|
||||
* 更新 appd 使用 cnpmjs 來下載 APKs。
|
||||
* Updated appd to use cnpmjs to download APKs.
|
||||
* 修正更新服務。(感謝 @Wei)
|
||||
* Fixed Update Service. (Thanks to @Wei)
|
||||
* 新增加拿大版 2018 Toyota Sienna LTD 指紋(v2)。(感謝 明峰 提供)
|
||||
* Added Canada 2018 Toyota Sienna LTD fingerprint (v2). (Thanks to 明峰)
|
||||
* 新增「通過移動網路上傳」開關
|
||||
* Added Upload Over Mobile Network toggle.
|
||||
* 新增「通過熱點上傳」開關
|
||||
* Added Upload Over Hotspot toggle.
|
||||
* 新增加拿大版 2018 Toyota Sienna LTD 指紋(v1)。(感謝 明峰 提供)
|
||||
* Added Canada 2018 Toyota Sienna LTD fingerprint (v1). (Thanks to 明峰)
|
||||
* 新增大陸版 Volkswagen Golf GTI 指紋 (v1)。(感謝 easyeiji 提供)
|
||||
* Added China Volkswagen Golf GTI fingerprint (v1). (Thanks to easyeiji)
|
||||
|
||||
dragonpilot 0.7.5.0
|
||||
========================
|
||||
* 基於最新 openpilot 0.7.5 devel-staging.
|
||||
* Based on latest openpilot 0.7.5 devel-staging.
|
||||
* 更新 dp 圖示 (特別感謝 @wabes 的設計與提供)。
|
||||
* Updated dp logo, special thanks to @wabes for the design.
|
||||
* 簡/繁中文版和 i18n 整合成為單一版本。
|
||||
* Merged zhs/zht/i18n versions into one.
|
||||
* 新增大陸版 CAMRY HYBRID 指紋v2。(感謝 @杜子腾)
|
||||
* Added China Camery Hybrid FPv2. (Thanks to @杜子腾)
|
||||
* 新增台灣版 Altis HYBRID 指紋v1。(感謝 @Fish)
|
||||
* Added Taiwan Altis Hybrid FPv1. (Thanks to @Fish)
|
||||
* 新增行駛時關閉畫面功能。
|
||||
* Added Screen off while driving feature.
|
||||
* 新增倒車時關閉畫面功能。
|
||||
* Added Screen off while reversing feature.
|
||||
* 新增駕駛介面加入「加速模式」切換鈕。
|
||||
* Added acceleration profile toggle onto driving UI.
|
||||
* 新增自定車型功能,取代指紋暫存功能。
|
||||
* Replaced fingerprint cache with custom car model selector.
|
||||
* 新增可調亮度。
|
||||
* Added Brightness changer.
|
||||
* 新增部分德語支持。(特別感謝 @arne182 提供)
|
||||
* Added partial de_DE language support (Thanks to @arne182)
|
||||
* 新增停車碰撞偵測記錄功能。
|
||||
* Added off road impact detection to dashcam.
|
||||
|
||||
2020-05-06
|
||||
========================
|
||||
* 更新 dp 圖示 (特別感謝 @wabes 的設計與提供)。
|
||||
* 中文版整合進 i18n 版。
|
||||
* 刪除指紋暫存功能。
|
||||
* 新增 CAMERY HIBRID 指紋。(感謝 @杜子腾)
|
||||
* 新增行駛時關閉畫面功能。
|
||||
* 新增倒車時關閉畫面功能。
|
||||
* 新增駕駛介面加入「加速模式」切換鈕。
|
||||
* 新增自定義車型。
|
||||
|
||||
2020-04-16
|
||||
========================
|
||||
* [DEVEL] 加入台灣版 2016 Lexus IS200t 指紋。(感謝 Philip / Cody Dai)
|
||||
* [DEVEL] 加入台灣版 2016 Toyota Prius 4.5 代指紋。(感謝 Philip)
|
||||
* [DEVEL] 加入台灣版 201x Toyota RAV4 4WD 指紋。(感謝 Philip)
|
||||
* [DEVEL] 加入台灣版 2020 Toyota Auris w/ LTA 指紋。(感謝 Philip)
|
||||
* [DEVEL] 修正 commIssue 錯誤。(感謝 Kent 協助)
|
||||
|
||||
2020-04-13
|
||||
========================
|
||||
* [DEVEL] 加入可調整 Toyota Sng 起步反應值 (DragonToyotaSngResponse)。 (特別感謝 @Wei 提供 PR)
|
||||
* [DEVEL] 駕駛介面加入「動態調整車距」按鈕。(感謝 @cgw1968-5779 建議)
|
||||
* [DEVEL] 更新 update script。(感謝 深鯨希西 回報)
|
||||
|
||||
2020-04-10
|
||||
========================
|
||||
* [DEVEL] 更新 panda 至最新的 comma:master 分支。
|
||||
* [DEVEL] 移除所有的第三方應用改為自動下載。
|
||||
* [DEVEL] 移除「啟用原廠 DSU 模式」、「安全帶檢查」、「車門檢查」開關。
|
||||
|
||||
2020-03-31
|
||||
========================
|
||||
* [DEVEL] 更新至 2020-03-31 testing 分支。
|
||||
|
||||
2020-03-27
|
||||
========================
|
||||
* [DEVEL] 更新至最新的 testing 分支:
|
||||
* 加入波蘭版 2015 Lexus NX200T 支援。(感謝 wabes 提供)
|
||||
* 調整「啟用原廠 DSU 模式」為不再需要 AHB 。(Enable Stock DSU Mode no longer requires "AHB" toggle)
|
||||
* 加入「安全帶檢查」、「車門檢查」、「檔位檢查」、「溫度檢查」開關。
|
||||
* 加入曲率學習功能 - Curvature Learner 。(感謝 zorrobyte 提供)
|
||||
* 加入大陸版 2018 Toyota Highlander 支援。(感謝 toyboxZ 提供)
|
||||
* 加入大陸版 2018 Toyota Camry 2.0 支援。(感謝 Rming 提供)
|
||||
* 加入韓文支持。(感謝 crwusiz 提供)
|
||||
* 調整 OFFROAD 主頁翻譯將 "dragonpilot" 改回 "openpilot"。
|
||||
|
||||
2020-03-22
|
||||
========================
|
||||
* [DEVEL] 更新至最新的 testing 分支。
|
||||
|
||||
2020-03-17
|
||||
========================
|
||||
* [DEVEL] 更新至最新的 testing 分支 (commaai:devel-staging 0.7.4)。
|
||||
* [DEVEL] 加入動態調整車距功能。(特別感謝 @ShaneSmiskol 提供 PR)
|
||||
|
||||
2020-03-14
|
||||
========================
|
||||
* [DEVEL] 更新 pt-Br (葡萄牙語) 翻譯。(感謝 berno22 提供)
|
||||
* [DEVEL] 加入自動關機開關。(感謝 Rzxd 建議)
|
||||
* [DEVEL] 調高 Toyota 扭力容錯值。
|
||||
* [DEVEL] 優化讀取 dp 設定值。
|
||||
* [DEVEL] 加入 2019 手動 Civic 指紋。感謝 (AlexNoop 提供)
|
||||
* [DEVEL] dp 功能加入對 Subaru 車系的支援。
|
||||
|
||||
2020-03-06
|
||||
========================
|
||||
* [DEVEL] 加入葡萄牙語支持。(感謝 berno22 提供)
|
||||
* [DEVEL] 加入大陸 2018 Camry、2020 RAV4 指紋。(感謝 笨木匠 提供)
|
||||
* [DEVEL] 建立 devel-i18n 取代 devel-en。
|
||||
* [DEVEL] devel-en is deprecated, please switch to devel-i18n instead.
|
||||
|
||||
2020-03-04
|
||||
========================
|
||||
* [DEVEL] 加入顯示駕駛監控畫面。
|
||||
* [DEVEL] 加入加速模式選項。(特別感謝 @arne182, @cgw1968-5779 提供 PR)
|
||||
* [DEVEL] 修正 shutdownd 在 comma two 可能會不正常關機的錯誤。(感謝 @Wei, @Rzxd 回報)
|
||||
|
||||
2020-02-25
|
||||
========================
|
||||
* [DEVEL] 更新至最新的 commaai:devel (0.7.3)。
|
||||
|
||||
2020-02-21
|
||||
========================
|
||||
* [DEVEL] 更新至最新的 commaai:devel (0.7.3)。
|
||||
|
||||
2020-02-14
|
||||
========================
|
||||
* [DEVEL] 更新至最新的 commaai:devel (0.7.2)。
|
||||
* [DEVEL] 修正錯誤。
|
||||
|
||||
2020-02-08
|
||||
========================
|
||||
* [DEVEL] 更新至最新的 commaai:devel (0.7.2)。
|
||||
* [DEVEL] dp 功能加入對現代 (Hyundai) 車系的支援。
|
||||
* [DEVEL] 加入神盾測速照相自動啟動的開關。
|
||||
* [DEVEL] 更新高德地圖至 v4.5.0.600053。
|
||||
* [DEVEL] 使用 0.6.6 版的更新系統。
|
||||
* [DEVEL] 修正急剎問題。(感謝 kumar 提供)
|
||||
|
||||
2020-01-31
|
||||
========================
|
||||
* [DEVEL] 移除行車介面電量、溫度顯示,(修正畫面當機、黑屏問題)
|
||||
|
||||
2020-01-29
|
||||
========================
|
||||
* [DEVEL] 修正行車介面錯誤。(感謝 深鲸希西 測試;eisenheim、HeatNation 反應)
|
||||
|
||||
2020-01-23
|
||||
========================
|
||||
* [DEVEL] 加入 Steer Ratio Learner 關閉。(感謝 eisenheim 建議)
|
||||
* [DEVEL] 行車介面加入電量、溫度。(感謝 eisenheim 建議)
|
||||
* [DEVEL] 優化 appd。
|
||||
|
||||
2020-01-19
|
||||
========================
|
||||
* [DEVEL] 更新至最新的 commaai:devel (0.7.1)。
|
||||
* [DEVEL] 調整 appd 和 ALC 邏輯。
|
||||
|
||||
2020-01-14
|
||||
========================
|
||||
* [DEVEL] 加入開機啟動個人熱點。(感謝 eisenheim 建議)
|
||||
|
||||
2020-01-08
|
||||
========================
|
||||
* [DEVEL] 加入大陸版 2018 Lexus RX300 支援。(感謝 cafe 提供)
|
||||
* [DEVEL] 加入 DragonBTG 設定。(感謝 CloudJ、低調哥、歐姓Altis車主 提供)
|
||||
|
||||
2019-12-31
|
||||
========================
|
||||
* [DEVEL-ZHS] 加回第三方應用。
|
||||
|
||||
2019-12-29
|
||||
========================
|
||||
* [DEVEL] 更新至最新的 commaai:devel (0.7.0)。
|
||||
* [DEVEL] 輔助/自動變道改為可調整參數 (進階用戶)。(DragonAssistedLCMinMPH、DragonAutoLCMinMPH、DragonAutoLCDelay)
|
||||
* [DEVEL-ZHS] 修正無法運行第三方應用錯誤。(感謝 深鲸希西 反應)
|
||||
|
||||
2019-12-18
|
||||
========================
|
||||
* [DEVEL] 修正自動換道邏輯。
|
||||
* [DEVEL] 更新 offroad 翻譯。
|
||||
* [DEVEL] 錯誤修正。
|
||||
* [DEVEL] 移除美版 2017 Civic Hatchback 指紋。(與其它車型衝突)
|
||||
|
||||
2019-12-17
|
||||
========================
|
||||
* [DEVEL] 更新至最新的 commaai:devel (0.7.0)。
|
||||
* [DEVEL] 加入輔助換道開關。(24mph / 40kph 以上)
|
||||
* [DEVEL] 加入自動換道開關。(40mph / 65kph 以上)
|
||||
* [DEVEL] 加入大陸版 2019 雷凌汽油版指紋。 (感謝 Shell 提供)
|
||||
* [DEVEL] 加入大陸版 2019 卡羅拉汽油版指紋。 (感謝 Shell 提供)
|
||||
* [DEVEL] 加入美版 2017 Civic Hatchback 指紋。(感謝 CFranHonda 提供)
|
||||
|
||||
2019-12-10
|
||||
========================
|
||||
* [DEVEL] 加入位智車機模式。 (Waze Mode)
|
||||
|
||||
2019-11-21
|
||||
========================
|
||||
* [DEVEL] 修正 offroad 翻譯。(感謝 鄧育林 回報)
|
||||
* [DEVEL] 調整前車靜止移動偵測參數。
|
||||
* [DEVEL] 前車靜止移動偵測可在未啟用 dp 時運作。
|
||||
|
||||
2019-11-18
|
||||
========================
|
||||
* [DEVEL] 修正 offroad 翻譯。(感謝 Cody、鄧育林 回報)
|
||||
|
||||
2019-11-18
|
||||
========================
|
||||
* [DEVEL] 修正 frame 翻譯。
|
||||
|
||||
2019-11-15
|
||||
========================
|
||||
* [DEVEL] 修正不會充電的錯誤。 (感謝 袁昊 反應)
|
||||
|
||||
2019-11-15
|
||||
========================
|
||||
* [DEVEL] 修正充電控制。 (感謝 KT 反應)
|
||||
* [DEVEL] 更新 frame 翻譯,改為多語言版。 (感謝 深鲸希西、shaoching885、鄧育林 反應)
|
||||
* [DEVEL] 更新至最新的 commaai:devel (0.6.6)。
|
||||
|
||||
2019-11-12
|
||||
========================
|
||||
* [DEVEL] 只顯示電量文字 (注意:有時不會更新,需要拔插 USB 線)
|
||||
* [DEVEL] 自動偵測並鎖定硬體 (EON / UNO)。
|
||||
|
||||
2019-11-12
|
||||
========================
|
||||
* [DEVEL] 加入鎖定硬體 (EON / UNO) 的程式碼。
|
||||
|
||||
2019-11-11
|
||||
========================
|
||||
* [DEVEL] 更新高德地圖至 v4.3.0.600310 R2098NSLAE
|
||||
* [DEVEL] 更新 MiXplorer 至 v6.40.3
|
||||
* [DEVEL] 更新至最新的 commaai:devel (0.6.6)。
|
||||
* [DEVEL] 前車靜止移動偵測加入偵測警示。
|
||||
|
||||
2019-11-07
|
||||
========================
|
||||
* [DEVEL] 讓 Bosch 系統顯示三角。 (感謝 ching885 回報)
|
||||
* [DEVEL] 更新 offroad 多語言版簡體中文翻譯 (感謝 Rming 提供)
|
||||
|
||||
2019-11-06
|
||||
========================
|
||||
* [DEVEL] 修正 0.6.6 appd 和 dashcamd 錯誤。 (感謝 鄧育林 回報)
|
||||
* [DEVEL] 更新至最新的 commaai:devel (0.6.6)。
|
||||
|
||||
2019-11-05
|
||||
========================
|
||||
* [DEVEL] 加入台灣 Lexus 2017 GS450h 支援。 (感謝 簡銘佑 提供指紋)
|
||||
|
||||
2019-11-01
|
||||
========================
|
||||
* [DEVEL] 新增神盾測速照相。 (感謝 Sky Chang 和 Wei Yi Chen)
|
||||
* [DEVEL] 修正 offroad 翻譯。 (感謝 Leo Hsieh)
|
||||
|
||||
2019-11-01
|
||||
========================
|
||||
* [DEVEL] 移除 Miui 字型,縮小 dp 使用空間。
|
||||
* [DEVEL] 更新 offroad 為多語言版
|
||||
* [DEVEL] 更新至最新的 commaai:devel (0.6.5)。
|
||||
|
||||
2019-10-29
|
||||
========================
|
||||
* [DEVEL] 加入 SnG 補丁。(感謝 楊雅智)
|
||||
|
||||
2019-10-28
|
||||
========================
|
||||
* [DEVEL] 更新至最新的 commaai:devel (0.6.5)。
|
||||
* [DEVEL] 調整 dragon_allow_gas 邏輯 (請回報任何問題,需更新 Panda 韌體)
|
||||
|
||||
2019-10-18
|
||||
========================
|
||||
* [DEVEL] 加入前車靜止移動偵測。(測試版,感謝 ucolchen)
|
||||
* [DEVEL] 移除強迫網路連線提示。(感謝 Shell)
|
||||
* [DEVEL] 修正 allow_gas 功能。
|
||||
|
||||
2019-10-18
|
||||
========================
|
||||
* [DEVEL] 加入彎道減速功能開關。
|
||||
* [DEVEL] 強迫使用 dp 版 Panda 韌體。
|
||||
* [DEVEL] 更新至最新的 commaai:devel (0.6.5)。
|
||||
|
||||
2019-10-17
|
||||
========================
|
||||
* [DEVEL] 加入「車型」顯示於 dp 設定畫面。
|
||||
* [DEVEL] 修正充電控制讀取預設值的錯誤。
|
||||
* [DEVEL] 修正無法顯示更新記錄的錯誤。
|
||||
|
||||
2019-10-16
|
||||
========================
|
||||
* [DEVEL] 刷新 Panda 韌體按鈕將會自動重啟 EON。(感謝 鄧育林 建議)
|
||||
* [DEVEL] 下載更新記錄時使用 "no-cache" 標頭。
|
||||
* [DEVEL] 更新高德地圖至 v4.3.0
|
||||
* [DEVEL] 刪除 bs (Branch Switcher)
|
||||
|
||||
2019-10-14
|
||||
========================
|
||||
* [DEVEL] 啟用自動更新功能。(感謝 鄧育林 提供)
|
||||
* [DEVEL] 清除不再使用的 dp params。
|
||||
* [DEVEL] 加入數字電量指示。(感謝 鄧育林 建議)
|
||||
* [DEVEL] 加入刷新 Panda 韌體按鈕。
|
||||
|
||||
2019-10-11
|
||||
========================
|
||||
* [DEVEL] 更新至最新的 commaai:devel (0.6.5)。
|
||||
* [DEVEL] 加入台灣 2019 RAV4 汽油版指紋。 (感謝 Max Duan / CloudJ 提供)
|
||||
|
||||
2019-10-09
|
||||
========================
|
||||
* [DEVEL] 加入當 LatCtrl 關閉時,畫面顯示提示訊息。
|
||||
|
||||
2019-10-08
|
||||
========================
|
||||
* [DEVEL] 加回駕駛監控開關。
|
||||
* [DEVEL] 加入 bs (branch switcher) 程式。
|
||||
|
||||
2019-10-07
|
||||
========================
|
||||
* [DEVEL] 加入台灣版 2019 RAV4H 油電版指紋。(感謝 Max Duan 提供)
|
||||
|
||||
2019-10-05
|
||||
========================
|
||||
* [DEVEL] 移除 curvature learner: 轉角明顯比原廠小。
|
||||
* [DEVEL] 更新至最新的 commaai:devel (0.6.4)。
|
||||
|
||||
2019-09-30
|
||||
========================
|
||||
* [DEVEL] 更新 curvature learner 版本至 v4。
|
||||
* [DEVEL] Lexus ISH 使用更精確的 EPS Steering Angle Sensor
|
||||
|
||||
2019-09-27
|
||||
========================
|
||||
* [DEVEL] 加入 Zorrobyte 的 curvature learner (https://github.com/zorrobyte/openpilot)
|
||||
* [DEVEL] 加入可開關駕駛監控的程式碼。
|
||||
* [DEVEL] 取消當 steering 出現錯誤時,自動切斷方向控制 2 秒的機制。
|
||||
* [DEVEL] 讓行車介面的「方向盤」/「轉彎」圖示半透明化。
|
||||
|
||||
2019-09-26
|
||||
========================
|
||||
* [DEVEL] 修正當「啟用記錄服務」關閉時,make 會有問題的錯誤。 (感謝 shaoching885 和 afa 回報)
|
||||
|
||||
2019-09-24
|
||||
========================
|
||||
* [DEVEL] 行車介面加入可開關的「前車」、「路線」、「車道」設定。
|
||||
* [DEVEL] 行車介面加入可開關的「方向燈號」提示。 (感謝 CloudJ 建議,程式碼來源: https://github.com/kegman/openpilot)
|
||||
|
||||
2019-09-23
|
||||
========================
|
||||
* [DEVEL] 優化讀取 params 的次數。
|
||||
* [DEVEL] 加入可開關的車道偏移警示。
|
||||
* [DEVEL] 修正充電控制邏輯。
|
||||
* [DEVEL] 加入台灣 Prius 4.5 指紋。 (感謝 Lin Hsin Hung 提供)
|
||||
|
||||
2019-09-20
|
||||
========================
|
||||
* [DEVEL] 加入充電控制功能。 (感謝 loveloveses 和 KT 建議)
|
||||
|
||||
2019-09-16
|
||||
========================
|
||||
* [DEVEL] 加入台灣 CT200h 指紋。 (感謝 CloudJ 提供)
|
||||
* [DEVEL] 加入美版 CT200h 移植。 (感謝 thomaspich 提供)
|
||||
|
||||
2019-09-13
|
||||
========================
|
||||
* [DEVEL] 行車介面加入可開關的「速度顯示」設定。
|
||||
|
||||
2019-09-09
|
||||
========================
|
||||
* [DEVEL] 加入 GreyPanda 模式。
|
||||
|
||||
2019-08-28
|
||||
========================
|
||||
* [DEVEL] 加入可調警示音量。
|
||||
|
||||
2019-08-27
|
||||
========================
|
||||
* [DEVEL] 自動關機改為可調時長。
|
||||
@@ -0,0 +1,245 @@
|
||||
dragonpilot 0.7.7
|
||||
========================
|
||||
* 基於 openpilot 0.7.7 devel.
|
||||
* Based on openpilot 0.7.7 devel.
|
||||
* 當 Manager 出現錯誤時,顯示 IP 位置。(感謝 @dingliangxue)
|
||||
* When Manager failed, display IP address. (Thanks to @dingliangxue)
|
||||
* 加回 sr learner 開關。
|
||||
* Re-added sr learner toggle.
|
||||
* 加回 加速模式 開關。
|
||||
* Re-added Accel Profile toggle.
|
||||
* Toyota 加入改寫最低巡航速度功能。(感謝 @Mojo)
|
||||
* Added Toyota to override lowerest cruise speed. (Thanks to @Mojo)
|
||||
* 介面加入盲點偵測顯示。(感謝 @wabes)
|
||||
* Added BSM indicator to UI. (Thanks to @wabes)
|
||||
* 加回彎道減速功能。(感謝 @Mojo)
|
||||
* re-added Slow On Curve functionality. (Thanks to @Mojo)
|
||||
* 加入 C2 風扇靜音模式。(感謝 @dingliangxue)
|
||||
* Added C2 quiet fan mode. (Thanks to @dingliangxue)
|
||||
* 加入「輔助換道最低啟動速度」、「自動換道最低啟動速度」設定。
|
||||
* Added "Assisted Lane Change Min Engage Speed" and "Auto Lane Change Min Engage Speed" settings.
|
||||
* 加入回調校介面。(感謝 @Kent)
|
||||
* Re-added Dev UI. (Thanks to @Kent)
|
||||
* 加入 "dp_lqr" 設定來強制使用 RAV4 的 lqr 調校。(感謝 @eisenheim)
|
||||
* Added "dp_lqr" setting to force enable lqr tuning from RAV4. (Thanks to eisenheim)
|
||||
* 加入 d_poly offset。 (感謝 @ShaneSmiskol)
|
||||
* Added d_poly offset. (Thanks to @ShaneSmiskol)
|
||||
* 加入 ZSS 支援。(感謝 @bobbydough, @WilliamPrius 建議, @bobbydough 測試)
|
||||
* Added ZSS support. (Thanks to @bobbydough, @WilliamPrius for recommendation, @bobbydough for testing)
|
||||
* 加入錯誤記錄至 /sdcard/crash_logs/ (感謝 @ShaneSmiskol 提供代碼)
|
||||
* Added error logs to /sdcard/crash_logs/ (Special Thanks to @ShaneSmiskol)
|
||||
* 加入 LQR 控制器開關進設定畫面。
|
||||
* Added LQR Controller toggle to settings.
|
||||
|
||||
dragonpilot 0.7.6
|
||||
========================
|
||||
* 基於最新 openpilot 0.7.6.1 devel.
|
||||
* Based on latest openpilot 0.7.6.1 devel.
|
||||
* 優化並整合 dp 服務。 (所有的設定檔已改名,請重新設定所有的功能)
|
||||
* Optimized and integrated several dp services. (Settings have been renamed, please re-config all settings)
|
||||
* 完全關閉 steer ratio learner。
|
||||
* Completely disabled steer ratio learner.
|
||||
* 移除「加速模式」。
|
||||
* Removed Accel Profile.
|
||||
* 加入本田皓影混電版指紋v1。(感謝 @劉駿)
|
||||
* Added Honda Breeze Hybrid FPv1. (Thanks to @劉駿)
|
||||
* 加入台灣版 Toyota Prius 4.5 指紋v1。(感謝 @jeekid)
|
||||
* Added Taiwan Toyota Prius 4.5 FPv1. (Thanks to @jeekid)
|
||||
* 加入 2020 Toyota Prius 指紋v2。(感謝 @Trae)
|
||||
* Added Toyota Prius 2020 FPv2. (Thanks to @Trae)
|
||||
* 優化 Honda CR-V Hybrid 轉向。(感謝 @martint1980)
|
||||
× Optomised Honda CR-V Hybrid lateral control. (Thanks to @martint1980)
|
||||
|
||||
dragonpilot 0.7.5
|
||||
========================
|
||||
* 優化 Lexus GSH 轉向。(感謝 @簡銘佑 測試)
|
||||
* Optimize Lexus GSH steering. (Thanks to @簡銘佑)
|
||||
* C2 支援自動關機「DragonAutoShutdownAt」參數。(感謝 @cgw1968 建議)
|
||||
* C2 to support auto shutdown "DragonAutoShutDownAt" param. (Thanks to @cgw1968)
|
||||
* 將剎車狀熊顯示於 dp 資訊欄。
|
||||
* Added brake indicator to dp infobar.
|
||||
* 加入「方向燈取消控制」延遲控制設。(感謝 @wabes 建議)
|
||||
* Added delay config to "Disable Lat Control on Blinker". (Thanks to @wabes)
|
||||
* 加入巴西版 2020 Corolla Hybrid 指紋v2。(感謝 @berno22 提供)
|
||||
* Added Brazil 2020 Corolla Hybrid FPv2. (Thanks to @berno22)
|
||||
* 加入對 VW MQB/PQ 的支援。(感謝 @dingliangxue 移植)
|
||||
* Added support to VW MQB/PQ platform. (Thanks to @dingliangxue)
|
||||
* 加入「允許多次自動換道」功能。(感謝 @阿濤 建議)
|
||||
* Added "Allow Continuous Auto Lane Change" Toggle. (Thanks to @阿濤)
|
||||
* 新增 DragonMaxSpeedLimit 設定值 (mph),當如果車速高於此值 op 將會停止操控。(感謝 @Anthony 建議)
|
||||
* Added DragonMaxSpeedLimit parameter (mph), op will stop controlling when car speed is high than the value. (Thanks to @Anthony)
|
||||
* 新增加拿大版 2018 Toyota Sienna LTD 指紋(v2)。(感謝 明峰 提供)
|
||||
* Added Canada 2018 Toyota Sienna LTD fingerprint (v2). (Thanks to 明峰)
|
||||
* 新增「通過移動網路上傳」開關
|
||||
* Added Upload Over Mobile Network toggle.
|
||||
* 新增「通過熱點上傳」開關
|
||||
* Added Upload Over Hotspot toggle.
|
||||
* 新增加拿大版 2018 Toyota Sienna LTD 指紋(v1)。(感謝 明峰 提供)
|
||||
* Added Canada 2018 Toyota Sienna LTD fingerprint (v1). (Thanks to 明峰)
|
||||
* 新增大陸版 Volkswagen Golf GTI 指紋 (v1)。(感謝 easyeiji 提供)
|
||||
* Added China Volkswagen Golf GTI fingerprint (v1). (Thanks to easyeiji)
|
||||
* 更新 dp 圖示 (特別感謝 @wabes 的設計與提供)。
|
||||
* Updated dp logo, special thanks to @wabes for the design.
|
||||
* 簡/繁中文版和 i18n 整合成為單一版本。
|
||||
* Merged zhs/zht/i18n versions into one.
|
||||
* 新增大陸版 CAMRY HYBRID 指紋v2。(感謝 @杜子腾)
|
||||
* Added China Camery Hybrid FPv2. (Thanks to @杜子腾)
|
||||
* 新增台灣版 Altis HYBRID 指紋v1。(感謝 @Fish)
|
||||
* Added Taiwan Altis Hybrid FPv1. (Thanks to @Fish)
|
||||
* 新增行駛時關閉畫面功能。
|
||||
* Added Screen off while driving feature.
|
||||
* 新增倒車時關閉畫面功能。
|
||||
* Added Screen off while reversing feature.
|
||||
* 新增駕駛介面加入「加速模式」切換鈕。
|
||||
* Added acceleration profile toggle onto driving UI.
|
||||
* 新增自定車型功能,取代指紋暫存功能。
|
||||
* Replaced fingerprint cache with custom car model selector.
|
||||
* 新增可調亮度。
|
||||
* Added Brightness changer.
|
||||
* 新增部分德語支持。(特別感謝 @arne182 提供)
|
||||
* Added partial de_DE language support (Thanks to @arne182)
|
||||
|
||||
dragonpilot 0.7.4
|
||||
========================
|
||||
* [2020-04-10] 移除所有的第三方應用改為自動下載。
|
||||
* [2020-04-10] 移除「啟用原廠 DSU 模式」、「安全帶檢查」、「車門檢查」開關。
|
||||
* [2020-03-31] 還原部分修改代碼以達到 comma ai 安全準則。 (Reverted changes to panda safety code to comply with comma ai safety guideline.)
|
||||
* [2020-03-31] 調整「啟用原廠 DSU 模式」為踩剎車時會暫時斷開控制 。(Enable Stock DSU Mode will temporary disable controls when brake is pressed.)
|
||||
* [2020-03-27] 加入波蘭版 2015 Lexus NX200T 支援。(感謝 wabes 提供)
|
||||
* [2020-03-27] 調整「啟用原廠 DSU 模式」為不再需要 AHB 。(Enable Stock DSU Mode no longer requires "AHB" toggle)
|
||||
* [2020-03-27] 加入「安全帶檢查」、「車門檢查」、「檔位檢查」、「溫度檢查」開關。
|
||||
* [2020-03-27] 加入曲率學習功能 - Curvature Learner 。(感謝 zorrobyte 提供)
|
||||
* [2020-03-27] 加入大陸版 2018 Toyota Highlander 支援。(感謝 toyboxZ 提供)
|
||||
* [2020-03-27] 加入大陸版 2018 Toyota Camry 2.0 支援。(感謝 Rming 提供)
|
||||
* [2020-03-27] 加入韓文支持。(感謝 crwusiz 提供)
|
||||
* [2020-03-27] 調整 OFFROAD 主頁翻譯將 "dragonpilot" 改回 "openpilot"。
|
||||
|
||||
dragonpilot 0.7.3
|
||||
========================
|
||||
* [2020-03-17] 加入動態調整車距功能。(特別感謝 @ShaneSmiskol 提供 PR)
|
||||
* [2020-03-14] 更新 pt-Br (葡萄牙語) 翻譯。(感謝 berno22 提供)
|
||||
* [2020-03-14] 加入自動關機開關。(感謝 Rzxd 建議)
|
||||
* [2020-03-14] 調高 Toyota 扭力容錯值。
|
||||
* [2020-03-14] 優化讀取 dp 設定值。
|
||||
* [2020-03-14] 加入 2019 手動 Civic 指紋。感謝 (AlexNoop 提供)
|
||||
* [2020-03-14] dp 功能加入對 Subaru 車系的支援。
|
||||
* [2020-03-06] 加入葡萄牙語支持。(感謝 berno22 提供)
|
||||
* [2020-03-06] 加入大陸 2018 Camry、2020 RAV4 指紋。(感謝 笨木匠 提供)
|
||||
* [2020-03-04] 加入顯示駕駛監控畫面。
|
||||
* [2020-03-04] 加入加速模式選項。(特別感謝 @arne182, @cgw1968-5779 提供 PR)
|
||||
* [2020-03-04] 修正 shutdownd 在 comma two 可能會不正常關機的錯誤。(感謝 @Wei, @Rzxd 回報)
|
||||
|
||||
dragonpilot 0.7.2
|
||||
========================
|
||||
* [2020-02-08] dp 功能加入對現代 (Hyundai) 車系的支援。
|
||||
* [2020-02-08] 加入神盾測速照相自動啟動的開關。
|
||||
* [2020-02-08] 更新高德地圖至 v4.5.0.600053。
|
||||
* [2020-02-08] 使用 0.6.6 版的更新系統。
|
||||
* [2020-02-08] 修正急剎問題。(感謝 kumar 提供)
|
||||
* [2020-01-31] 移除行車介面電量、溫度顯示,(修正畫面當機、黑屏問題)
|
||||
* [2020-01-29] 修正行車介面錯誤。(感謝 深鲸希西 測試;eisenheim、HeatNation 反應)
|
||||
* [2020-01-23] 加入 Steer Ratio Learner 關閉。(感謝 eisenheim 建議)
|
||||
* [2020-01-23] 行車介面加入電量、溫度。(感謝 eisenheim 建議)
|
||||
* [2020-01-23] 優化 appd。
|
||||
|
||||
dragonpilot 0.7.1
|
||||
========================
|
||||
* [2020-01-19] 調整 appd 和 ALC 邏輯。
|
||||
* [2020-01-14] 加入開機啟動個人熱點。(感謝 eisenheim 建議)
|
||||
* [2020-01-18] 加入大陸版 2018 Lexus RX300 支援。(感謝 cafe 提供)
|
||||
* [2020-01-18] 加入 DragonBTG 設定。(感謝 CloudJ、低調哥、歐姓Altis車主 提供)
|
||||
|
||||
dragonpilot 0.7.0
|
||||
========================
|
||||
* [DEVEL] 更新至最新的 commaai:devel (0.7.0)。
|
||||
* [2019-12-29] 輔助/自動變道改為可調整參數 (進階用戶)。(DragonAssistedLCMinMPH、DragonAutoLCMinMPH、DragonAutoLCDelay)
|
||||
* [2019-12-29] 修正無法運行第三方應用錯誤。(感謝 深鲸希西 反應)
|
||||
* [2019-12-18] 修正自動換道邏輯。
|
||||
* [2019-12-18] 更新 offroad 翻譯。
|
||||
* [2019-12-18] 錯誤修正。
|
||||
* [2019-12-18] 移除美版 2017 Civic Hatchback 指紋。(與其它車型衝突)
|
||||
* [2019-12-17] 加入輔助換道開關。(24mph / 40kph 以上)
|
||||
* [2019-12-17] 加入自動換道開關。(40mph / 65kph 以上)
|
||||
* [2019-12-17] 加入大陸版 2019 雷凌汽油版指紋。 (感謝 Shell 提供)
|
||||
* [2019-12-17] 加入大陸版 2019 卡羅拉汽油版指紋。 (感謝 Shell 提供)
|
||||
* [2019-12-17] 加入美版 2017 Civic Hatchback 指紋。(感謝 CFranHonda 提供)
|
||||
* [2019-12-10] 加入位智車機模式。 (Waze Mode)
|
||||
* [2019-11-21] 修正 offroad 翻譯。(感謝 鄧育林 回報)
|
||||
* [2019-11-21] 調整前車靜止移動偵測參數。
|
||||
* [2019-11-21] 前車靜止移動偵測可在未啟用 dp 時運作。
|
||||
* [2019-11-18] 修正 offroad 翻譯。(感謝 Cody、鄧育林 回報)
|
||||
* [2019-11-18] 修正 frame 翻譯。
|
||||
|
||||
dragonpilot 0.6.6
|
||||
========================
|
||||
* [2019-11-15] 修正不會充電的錯誤。 (感謝 袁昊 反應)
|
||||
* [2019-11-15] 修正充電控制。 (感謝 KT 反應)
|
||||
* [2019-11-15] 更新 frame 翻譯,改為多語言版。 (感謝 深鲸希西、shaoching885、鄧育林 反應)
|
||||
* [2019-11-12] 只顯示電量文字 (注意:有時不會更新,需要拔插 USB 線)
|
||||
* [2019-11-12] 自動偵測並鎖定硬體 (EON / UNO)。
|
||||
* [2019-11-12] 加入鎖定硬體 (EON / UNO) 的程式碼。
|
||||
* [2019-11-11] 更新高德地圖至 v4.3.0.600310 R2098NSLAE
|
||||
* [2019-11-11] 更新 MiXplorer 至 v6.40.3
|
||||
* [2019-11-11] 前車靜止移動偵測加入偵測警示。
|
||||
* [2019-11-07] 讓 Bosch 系統顯示三角。 (感謝 ching885 回報)
|
||||
* [2019-11-07] 更新 offroad 多語言版簡體中文翻譯 (感謝 Rming 提供)
|
||||
* [2019-11-06] 修正 0.6.6 appd 和 dashcamd 錯誤。 (感謝 鄧育林 回報)
|
||||
|
||||
dragonpilot 0.6.5
|
||||
========================
|
||||
* [2019-11-05] 加入台灣 Lexus 2017 GS450h 支援。 (感謝 簡銘佑 提供指紋)
|
||||
* [2019-11-01] 新增神盾測速照相。 (感謝 Sky Chang 和 Wei Yi Chen)
|
||||
* [2019-11-01] 修正 offroad 翻譯。 (感謝 Leo Hsieh)
|
||||
* [2019-11-01] 移除 Miui 字型,縮小 dp 使用空間。
|
||||
* [2019-11-01] 更新 offroad 為多語言版
|
||||
* [2019-10-29] 加入 SnG 補丁。(感謝 楊雅智)
|
||||
* [2019-10-28] 調整 dragon_allow_gas 邏輯 (請回報任何問題,需更新 Panda 韌體)
|
||||
* [2019-10-22] 移除強迫網路連線提示。(感謝 Shell)
|
||||
* [2019-10-18] 加入前車靜止移動偵測。(測試版,感謝 ucolchen)
|
||||
* [2019-10-18] 移除強迫網路連線提示。(感謝 Shell)
|
||||
* [2019-10-18] 修正 allow_gas 功能。
|
||||
* [2019-10-18] 加入彎道減速功能開關。
|
||||
* [2019-10-18] 強迫使用 dp 版 Panda 韌體。
|
||||
* [2019-10-17] 加入「車型」顯示於 dp 設定畫面。
|
||||
* [2019-10-17] 修正充電控制讀取預設值的錯誤。
|
||||
* [2019-10-17] 修正無法顯示更新記錄的錯誤。
|
||||
* [2019-10-17] 刷新 Panda 韌體按鈕將會自動重啟 EON。(感謝 鄧育林 建議)
|
||||
* [2019-10-17] 下載更新記錄時使用 "no-cache" 標頭。
|
||||
* [2019-10-17] 更新高德地圖至 v4.3.0
|
||||
* [2019-10-14] 啟用自動更新功能。(感謝 鄧育林 提供)
|
||||
* [2019-10-14] 清除不再使用的 dp params。
|
||||
* [2019-10-14] 加入數字電量指示。(感謝 鄧育林 建議)
|
||||
* [2019-10-14] 加入刷新 Panda 韌體按鈕。
|
||||
* [2019-10-11] 加入台灣 2019 RAV4 汽油版指紋。 (感謝 Max Duan / CloudJ 提供)
|
||||
* [2019-10-11] 加入當 LatCtrl 關閉時,畫面顯示提示訊息。
|
||||
|
||||
dragonpilot 0.6.4
|
||||
========================
|
||||
* [2019-10-11] 加入台灣版 2019 RAV4H 油電版指紋。
|
||||
* [2019-10-08] 加回駕駛監控開關。
|
||||
* [2019-10-07] 加入台灣版 2019 RAV4H 油電版指紋。(感謝 Max Duan 提供)
|
||||
* [2019-10-05] 移除 curvature learner: 轉角明顯比原廠小。
|
||||
* [2019-09-30] 更新 curvature learner 版本至 v4。
|
||||
* [2019-09-30] Lexus ISH 使用更精確的 EPS Steering Angle Sensor
|
||||
* [2019-09-27] 加入 Zorrobyte 的 curvature learner (https://github.com/zorrobyte/openpilot)
|
||||
* [2019-09-27] 加入可開關駕駛監控的程式碼。
|
||||
* [2019-09-27] 取消當 steering 出現錯誤時,自動切斷方向控制 2 秒的機制。
|
||||
* [2019-09-27] 讓行車介面的「方向盤」/「轉彎」圖示半透明化。
|
||||
* [2019-09-26] 修正當「啟用記錄服務」關閉時,make 會有問題的錯誤。 (感謝 shaoching885 和 afa 回報)
|
||||
* [2019-09-24] 行車介面加入可開關的「前車」、「路線」、「車道」設定。
|
||||
* [2019-09-24] 行車介面加入可開關的「方向燈號」提示。 (感謝 CloudJ 建議,程式碼來源: https://github.com/kegman/openpilot)
|
||||
* [2019-09-23] 優化讀取 params 的次數。
|
||||
* [2019-09-23] 加入可開關的車道偏移警示。
|
||||
* [2019-09-23] 修正充電控制邏輯。
|
||||
* [2019-09-23] 加入台灣 Prius 4.5 指紋。 (感謝 Lin Hsin Hung 提供)
|
||||
* [2019-09-20] 加入充電控制功能。 (感謝 loveloveses 和 KT 建議)
|
||||
* [2019-09-16] 加入台灣 CT200h 指紋。 (感謝 CloudJ 提供)
|
||||
* [2019-09-16] 加入美版 CT200h 移植。 (感謝 thomaspich 提供)
|
||||
* [2019-09-13] 行車介面加入可開關的「速度顯示」設定。
|
||||
* [2019-09-09] 加入 GreyPanda 模式。
|
||||
* [2019-08-28] 加入可調警示音量。
|
||||
* [2019-08-27] 自動關機改為可調時長。
|
||||
|
||||
dragonpilot 0.6.3
|
||||
========================
|
||||
* [2019-10-11] 加入台灣版 2019 RAV4H 油電版指紋。
|
||||
+243
@@ -0,0 +1,243 @@
|
||||
2020-08-11 (0.7.7.0)
|
||||
========================
|
||||
* 加入 d_poly offset。 (感謝 @ShaneSmiskol)
|
||||
* Added d_poly offset. (Thanks to @ShaneSmiskol)
|
||||
|
||||
2020-08-05 (0.7.7.0)
|
||||
========================
|
||||
* 修正 Dev UI 顯示。
|
||||
* Fixed Dev UI display.
|
||||
* 加入 LQR 控制器開關進設定畫面。
|
||||
* Added LQR Controller toggle to settings.
|
||||
|
||||
2020-08-04 (0.7.7.0)
|
||||
========================
|
||||
* 嘗試修正非 Toyota 使用 lqr 產生的錯誤。
|
||||
* Attempted to fix lqr issue on non-Toyota Cars.
|
||||
* 加入錯誤記錄至 /sdcard/crash_logs/ (感謝 @ShaneSmiskol 提供代碼)
|
||||
* Added error logs to /sdcard/crash_logs/ (Special Thanks to @ShaneSmiskol)
|
||||
|
||||
2020-08-02 (0.7.7.0)
|
||||
========================
|
||||
* 加入 ZSS 支援。(感謝 @bobbydough, @WilliamPrius 建議, @bobbydough 測試)
|
||||
* Added ZSS support. (Thanks to @bobbydough, @WilliamPrius for recommendation, @bobbydough for testing)
|
||||
|
||||
2020-07-28 (0.7.7.0)
|
||||
========================
|
||||
* 修正 steer ratio learner 關閉。(感謝 @Mojo 回報, @ShaneSmiskol 提供代碼)
|
||||
* Fixed steer ratio learner toggle. (Thanks to @Mojo, @ShaneSmiskol)
|
||||
* 加入 "dp_lqr" 設定來強制使用 RAV4 的 lqr 調校。(感謝 @eisenheim)
|
||||
* Added "dp_lqr" setting to force enable lqr tuning from RAV4. (Thanks to eisenheim)
|
||||
|
||||
2020-07-28 (0.7.7.0)
|
||||
========================
|
||||
* 修正無法上傳記錄的問題。(感謝 @Mojo)
|
||||
* Fixed unable to upload log issue. (Thanks to @Mojo)
|
||||
* 修正無法關閉警示音的問題。(感謝 @Mojo)
|
||||
* Fixed unable to disable audio alert (-100%) issue. ($Thanks to @Mojo)
|
||||
|
||||
2020-07-27 (0.7.7.0)
|
||||
========================
|
||||
* 加入回調校介面。(感謝 @Kent)
|
||||
* Re-added Dev UI. (Thanks to @Kent)
|
||||
|
||||
2020-07-27 (0.7.7.0)
|
||||
========================
|
||||
* 加入 C2 風扇靜音模式。(感謝 @dingliangxue)
|
||||
* Added C2 quiet fan mode. (Thanks to @dingliangxue)
|
||||
* 加入「輔助換道最低啟動速度」、「自動換道最低啟動速度」設定。
|
||||
* Added "Assisted Lane Change Min Engage Speed" and "Auto Lane Change Min Engage Speed" settings.
|
||||
|
||||
2020-07-23 (0.7.7.0)
|
||||
========================
|
||||
* 修正 appd。(感謝 @cgw1968)
|
||||
* Fixed appd. (Thanks to @cgw1968)
|
||||
|
||||
2020-07-22 (0.7.7.0)
|
||||
========================
|
||||
* 修正 waze 顯示。(感謝 @Mojo)
|
||||
* Fixed waze display. (Thanks to @Mojo)
|
||||
* 加回彎道減速功能。(感謝 @Mojo)
|
||||
* re-added Slow On Curve functionality. (Thanks to @Mojo)
|
||||
* 加入日文支援。(特別感謝 @ponzu07 提供)
|
||||
* Added Japanese support. (Special thanks to @ponzu07)
|
||||
* 刪除部分設定對 dp_steering_on_signal 的依賴。
|
||||
* Removed dp_steering_on_signal dependencies.
|
||||
* 介面加入盲點偵測顯示。(感謝 @wabes)
|
||||
* Added BSM indicator to UI. (Thanks to @wabes)
|
||||
|
||||
2020-07-21 (0.7.7.0)
|
||||
========================
|
||||
* Toyota 加入改寫最低巡航速度功能。(感謝 @Mojo)
|
||||
* Added Toyota to override lowest cruise speed. (Thanks to @Mojo)
|
||||
* 修正 gm 錯誤。
|
||||
* Fixed bugs in gm cars.
|
||||
|
||||
2020-07-20 (0.7.7.0)
|
||||
========================
|
||||
* 加回 加速模式 開關。
|
||||
* Re-added Accel Profile toggle.
|
||||
* 修正 gm 錯誤。
|
||||
* Fixed bugs in gm cars.
|
||||
|
||||
2020-07-19 (0.7.7.0)
|
||||
========================
|
||||
* 限制 dp_conf int / float 範圍。
|
||||
* Limited dp_conf int/float range.
|
||||
* 修復行車記錄文件夾不存在的錯誤。
|
||||
* Fixed dashcam folder not exist error.
|
||||
|
||||
2020-07-18 (0.7.7.0)
|
||||
========================
|
||||
* 優化 camera offset 讀取。
|
||||
* optomised loading camera offset value.
|
||||
* 更換模型延遲警示為一般警示。
|
||||
* Replaced model lagging loud alert to normal alert.
|
||||
|
||||
2020-07-17 (0.7.7.0)
|
||||
========================
|
||||
* 更新至最新 openpilot 0.7.7 devel。
|
||||
* Updated to latest openpilot 0.7.7 devel.
|
||||
|
||||
2020-07-17 (0.7.7.0)
|
||||
========================
|
||||
* 當 Manager 出現錯誤時,顯示 IP 位置。(感謝 @dingliangxue)
|
||||
* When Manager failed, display IP address. (Thanks to @dingliangxue)
|
||||
* 加回 sr learner 開關。
|
||||
* Re-added sr learner toggle.
|
||||
|
||||
2020-07-13 (0.7.7.0)
|
||||
========================
|
||||
* 基於最新 openpilot 0.7.7 devel.
|
||||
* Based on latest openpilot 0.7.7 devel.
|
||||
|
||||
2020-06-22 (0.7.6.1)
|
||||
========================
|
||||
* 更新至 openpilot 0.7.6.1。 (特別感謝 @rockindy 協助更新)
|
||||
* Updated to openpilot 0.7.6.1. (Special thanks to @rockindy for initial merge)
|
||||
* 優化並整合 dp 服務。 (所有的設定檔已改名,請重新設定所有的功能)
|
||||
* Optimized and integrated several dp services. (Settings have been renamed, please re-config all settings)
|
||||
* 完全關閉 steer ratio learner。
|
||||
* Completely disabled steer ratio learner.
|
||||
* 移除「加速模式」。
|
||||
* Removed Accel Profile.
|
||||
* 加入本田皓影混電版指紋v1。(感謝 @劉駿)
|
||||
* Added Honda Breeze Hybrid FPv1. (Thanks to @劉駿)
|
||||
* 加入台灣版 Toyota Prius 4.5 指紋v1。(感謝 @jeekid)
|
||||
* Added Taiwan Toyota Prius 4.5 FPv1. (Thanks to @jeekid)
|
||||
|
||||
2020-06-18 (0.7.5)
|
||||
========================
|
||||
* Dynamic Follow 更新模型。(感謝 @ShaneSmiskol 提供代碼、 @cgw1968 測試)
|
||||
* Updated Dynamic Follow model. (Special Thanks to @ShaneSmiskol for the feature and @cgw1968 for testing)
|
||||
|
||||
2020-05-30 (0.7.5)
|
||||
========================
|
||||
* Dynamic Follow 更新至 ShaneSmiskol:stock_additions 0.7.5 版。(感謝 @ShaneSmiskol 提供代碼、 @Wei 測試)
|
||||
* Updated Dynamic Follow to ShaneSmiskol:stock_additions 0.7.5. (Special Thanks to @ShaneSmiskol for the feature and @Wei for testing)
|
||||
|
||||
2020-05-28 (0.7.5)
|
||||
========================
|
||||
* 優化 Lexus GSH 轉向。(感謝 @簡銘佑 測試)
|
||||
* Optimize Lexus GSH steering. (Thanks to @簡銘佑)
|
||||
* C2 支援自動關機「DragonAutoShutdownAt」參數。(感謝 @cgw1968 建議)
|
||||
* C2 to support auto shutdown "DragonAutoShutDownAt" param. (Thanks to @cgw1968)
|
||||
* 修正出現「pedalPressed」的錯誤。(感謝 @Wei 回報)
|
||||
* Fixed issue showing "pedalPressed" error. (Thanks to @Wei)
|
||||
|
||||
2020-05-26 (0.7.5)
|
||||
========================
|
||||
* 將剎車狀熊顯示於 dp 資訊欄。
|
||||
* Added brake indicator to dp infobar.
|
||||
* 修正「溫度監控」燈示。
|
||||
* Fixed "Temp monitor" indicator.
|
||||
* 加入「方向燈取消控制」延遲控制設。(感謝 @wabes 建議)
|
||||
* Added delay config to "Disable Lat Control on Blinker". (Thanks to @wabes)
|
||||
* 加入巴西版 2020 Corolla Hybrid 指紋v2。(感謝 @berno22 提供)
|
||||
* Added Brazil 2020 Corolla Hybrid FPv2. (Thanks to @berno22)
|
||||
|
||||
2020-05-25 (0.7.5)
|
||||
========================
|
||||
* 加入對 VW MQB/PQ 的支援。(感謝 @dingliangxue 移植)
|
||||
* Added support to VW MQB/PQ platform. (Thanks to @dingliangxue)
|
||||
|
||||
2020-05-21 (0.7.5)
|
||||
========================
|
||||
* 修改成 3 小時後停止供電。(感謝 @Wei 建議)
|
||||
* Updated to stop charging after 3 hrs. (Thanks to @Wei)
|
||||
* 移除行車記錄下的「碰撞偵測」功能。
|
||||
* Removed Impact Detection in Dashcam.
|
||||
* 修正開啟「Noctua 風扇」模式導致的錯誤。(感謝 @阿濤 回報)
|
||||
* Fixed a bug caused by enabling "Noctua Mod". (Thanks to @阿濤)
|
||||
* 修正「位智模式」無法顯示警示的問題。(感謝 @axandres 回報)
|
||||
* Fixed alert issue in waze mode. (Thanks to @axandres)
|
||||
* 修正無法顯示更新中圖示的問題。
|
||||
* Fixed unable to display "UPDATING" icon issue.
|
||||
|
||||
2020-05-20 (0.7.5)
|
||||
========================
|
||||
* 加入「允許多次自動換道」功能。(感謝 @阿濤 建議)
|
||||
* Added "Allow Continuous Auto Lane Change" Toggle. (Thanks to @阿濤)
|
||||
* 修正開機後設定頁面有時會錯誤的問題。(感謝 @salmankhan、@Wei 回報)
|
||||
* Fixed setting page crash issue. (Thanks to @salmankhan, @Wei)
|
||||
* 修正熄火後一直出現更新訊息的錯誤。(感謝 @Sky Chang 回報)
|
||||
* Fixed issue that keep showing update prompt. (Thanks to @Sky Chang)
|
||||
|
||||
2020-05-19 (0.7.5)
|
||||
========================
|
||||
* 加入 DragonEnableAutoUpdate 預設值。
|
||||
* Added DragonEnableAutoUpdate default value.
|
||||
|
||||
2020-05-18 (0.7.5)
|
||||
========================
|
||||
* 修正因同時使用「社群功能」和「自定車型」造成的加減速問題。(特別感謝 @Wei、@Sky Chang、@Han9365、@鄧育林 的測試以及回報。)
|
||||
* Fixed acceleration issue caused by used of both "Community Maintain Feature" and "Custom Car Model"
|
||||
|
||||
2020-05-16 (0.7.5)
|
||||
========================
|
||||
* 新增 DragonMaxSpeedLimit 設定值 (mph),當如果車速高於此值 op 將會停止操控。(感謝 @Anthony 建議)
|
||||
* Added DragonMaxSpeedLimit parameter (mph), op will stop controlling when car speed is high than the value. (Thanks to @Anthony)
|
||||
* 更新 appd 使用 cnpmjs 來下載 APKs。
|
||||
* Updated appd to use cnpmjs to download APKs.
|
||||
* 修正更新服務。(感謝 @Wei)
|
||||
* Fixed Update Service. (Thanks to @Wei)
|
||||
* 新增加拿大版 2018 Toyota Sienna LTD 指紋(v2)。(感謝 明峰 提供)
|
||||
* Added Canada 2018 Toyota Sienna LTD fingerprint (v2). (Thanks to 明峰)
|
||||
|
||||
2020-05-15 (0.7.5)
|
||||
========================
|
||||
* 新增「通過移動網路上傳」開關
|
||||
* Added Upload Over Mobile Network toggle.
|
||||
* 新增「通過熱點上傳」開關
|
||||
* Added Upload Over Hotspot toggle.
|
||||
* 新增加拿大版 2018 Toyota Sienna LTD 指紋(v1)。(感謝 明峰 提供)
|
||||
* Added Canada 2018 Toyota Sienna LTD fingerprint (v1). (Thanks to 明峰)
|
||||
* 新增大陸版 Volkswagen Golf GTI 指紋 (v1)。(感謝 easyeiji 提供)
|
||||
* Added China Volkswagen Golf GTI fingerprint (v1). (Thanks to easyeiji)
|
||||
|
||||
2020-05-10
|
||||
========================
|
||||
* 基於最新 openpilot 0.7.5 devel-staging.
|
||||
* Based on latest openpilot 0.7.5 devel-staging.
|
||||
* 更新 dp 圖示 (特別感謝 @wabes 的設計與提供)。
|
||||
* Updated dp logo, special thanks to @wabes for the design.
|
||||
* 簡/繁中文版和 i18n 整合成為單一版本。
|
||||
* Merged zhs/zht/i18n versions into one.
|
||||
* 新增大陸版 CAMRY HYBRID 指紋v2。(感謝 @杜子腾)
|
||||
* Added China Camry Hybrid FPv2. (Thanks to @杜子腾)
|
||||
* 新增台灣版 Altis HYBRID 指紋v1。(感謝 @Fish)
|
||||
* Added Taiwan Altis Hybrid FPv1. (Thanks to @Fish)
|
||||
* 新增行駛時關閉畫面功能。
|
||||
* Added Screen off while driving feature.
|
||||
* 新增倒車時關閉畫面功能。
|
||||
* Added Screen off while reversing feature.
|
||||
* 新增駕駛介面加入「加速模式」切換鈕。
|
||||
* Added acceleration profile toggle onto driving UI.
|
||||
* 新增自定車型功能,取代指紋暫存功能。
|
||||
* Replaced fingerprint cache with custom car model selector.
|
||||
* 新增可調亮度。
|
||||
* Added Brightness changer.
|
||||
* 新增部分德語支持。(特別感謝 @arne182 提供)
|
||||
* Added partial de_DE language support (Thanks to @arne182)
|
||||
* 新增停車碰撞偵測記錄功能。
|
||||
* Added off road impact detection to dashcam.
|
||||
Binary file not shown.
@@ -112,6 +112,14 @@ struct CarEvent @0x9b1657f34caf3ad3 {
|
||||
wrongCruiseMode @87;
|
||||
neosUpdateRequired @88;
|
||||
modeldLagging @89;
|
||||
|
||||
#dp
|
||||
preLaneChangeLeftALC @90;
|
||||
preLaneChangeRightALC @91;
|
||||
laneChangeALC @92;
|
||||
manualSteeringRequired @93;
|
||||
manualSteeringRequiredBlinkersOn @94;
|
||||
leadCarMoving @95;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,6 +187,9 @@ struct CarState {
|
||||
leftBlindspot @33 :Bool; # Is there something blocking the left lane change
|
||||
rightBlindspot @34 :Bool; # Is there something blocking the right lane change
|
||||
|
||||
# dp
|
||||
lkMode @37 :Bool;
|
||||
|
||||
struct WheelSpeeds {
|
||||
# optional wheel speeds
|
||||
fl @0 :Float32;
|
||||
|
||||
@@ -803,6 +803,9 @@ struct PathPlan {
|
||||
laneChangeState @18 :LaneChangeState;
|
||||
laneChangeDirection @19 :LaneChangeDirection;
|
||||
|
||||
# dp
|
||||
dpALCAllowed @20 :Bool;
|
||||
|
||||
enum Desire {
|
||||
none @0;
|
||||
turnLeft @1;
|
||||
@@ -2057,5 +2060,82 @@ struct Event {
|
||||
dMonitoringState @71: DMonitoringState;
|
||||
liveLocationKalman @72 :LiveLocationKalman;
|
||||
sentinel @73 :Sentinel;
|
||||
dragonConf @74 :DragonConf;
|
||||
}
|
||||
}
|
||||
|
||||
# dp
|
||||
struct DragonConf {
|
||||
dpAtl @0 :Bool;
|
||||
dpAppWaze @1 :Bool;
|
||||
dpAppWazeManual @2 :Int8;
|
||||
dpDashcam @3 :Bool;
|
||||
dpDashcamHoursStored @4 :UInt8;
|
||||
dpAutoShutdown @5 :Bool;
|
||||
dpAutoShutdownIn @6 :UInt16;
|
||||
dpAthenad @7 :Bool;
|
||||
dpUploader @8 :Bool;
|
||||
dpUploadOnMobile @9 :Bool;
|
||||
dpUploadOnHotspot @10 :Bool;
|
||||
dpLatCtrl @11 :Bool;
|
||||
dpSteeringLimitAlert @12 :Bool;
|
||||
dpSteeringOnSignal @13 :Bool;
|
||||
dpSignalOffDelay @14 :UInt8;
|
||||
dpAssistedLcMinMph @15 :UInt8;
|
||||
dpAutoLc @16 :Bool;
|
||||
dpAutoLcCont @17 :Bool;
|
||||
dpAutoLcMinMph @18 :UInt8;
|
||||
dpAutoLcDelay @19 :UInt8;
|
||||
dpSlowOnCurve @20 :Bool;
|
||||
dpAllowGas @21 :Bool;
|
||||
dpMaxCtrlSpeed @22 :Float32;
|
||||
dpLeadCarAlert @23 :Bool;
|
||||
dpDynamicFollow @24 :UInt8;
|
||||
dpAccelProfile @25 :UInt8;
|
||||
dpDriverMonitor @26 :Bool;
|
||||
dpSteeringMonitor @27 :Bool;
|
||||
dpSteeringMonitorTimer @28 :UInt8;
|
||||
dpGearCheck @29 :Bool;
|
||||
dpTempMonitor @30 :Bool;
|
||||
dpDrivingUi @31 :Bool;
|
||||
dpUiScreenOffReversing @32 :Bool;
|
||||
dpUiScreenOffDriving @33 :Bool;
|
||||
dpUiSpeed @34 :Bool;
|
||||
dpUiEvent @35 :Bool;
|
||||
dpUiMaxSpeed @36 :Bool;
|
||||
dpUiFace @37 :Bool;
|
||||
dpUiLane @38 :Bool;
|
||||
dpUiPath @39 :Bool;
|
||||
dpUiLead @40 :Bool;
|
||||
dpUiDev @41 :Bool;
|
||||
dpUiBlinker @42 :Bool;
|
||||
dpUiBrightness @43 :UInt8;
|
||||
dpUiVolumeBoost @44 :Int8;
|
||||
dpAppAutoUpdate @45 :Bool;
|
||||
dpAppExtGps @46 :Bool;
|
||||
dpAppTomtom @47 :Bool;
|
||||
dpAppTomtomAuto @48 :Bool;
|
||||
dpAppTomtomManual @49 :Int8;
|
||||
dpAppAutonavi @50 :Bool;
|
||||
dpAppAutonaviAuto @51 :Bool;
|
||||
dpAppAutonaviManual @52 :Int8;
|
||||
dpAppAegis @53 :Bool;
|
||||
dpAppAegisAuto @54 :Bool;
|
||||
dpAppAegisManual @55 :Int8;
|
||||
dpAppMixplorer @56 :Bool;
|
||||
dpAppMixplorerManual @57 :Int8;
|
||||
dpToyotaLdw @58 :Bool;
|
||||
dpToyotaSng @59 :Bool;
|
||||
dpToyotaLowestCruiseOverride @60 :Bool;
|
||||
dpToyotaLowestCruiseOverrideAt @61 :Float32;
|
||||
dpToyotaLowestCruiseOverrideSpeed @62 :Float32;
|
||||
dpIpAddr @63 :Text;
|
||||
dpCameraOffset @64 :Int8;
|
||||
dpLocale @65 :Text;
|
||||
dpChargingCtrl @66 :Bool;
|
||||
dpChargingAt @67 :UInt8;
|
||||
dpDischargingAt @68 :UInt8;
|
||||
dpIsUpdating @69 :Bool;
|
||||
dpThermalStarted @70 :Bool;
|
||||
dpThermalOverheat @71 :Bool;
|
||||
}
|
||||
|
||||
@@ -78,6 +78,8 @@ frontFrame: [8072, true, 10.]
|
||||
dMonitoringState: [8073, true, 5., 1]
|
||||
offroadLayout: [8074, false, 0.]
|
||||
|
||||
dragonConf: [8075, false, 2.]
|
||||
|
||||
testModel: [8040, false, 0.]
|
||||
testLiveLocation: [8045, false, 0.]
|
||||
testJoystick: [8056, false, 0.]
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
#!/usr/bin/env python3.7
|
||||
import subprocess
|
||||
from cereal import car
|
||||
from common.params import Params
|
||||
params = Params()
|
||||
|
||||
def is_online():
|
||||
try:
|
||||
return not subprocess.call(["ping", "-W", "4", "-c", "1", "117.28.245.92"])
|
||||
except ProcessLookupError:
|
||||
return False
|
||||
|
||||
def common_controller_ctrl(enabled, dragon_lat_ctrl, dragon_enable_steering_on_signal, blinker_on, steer_req):
|
||||
if enabled:
|
||||
if (dragon_enable_steering_on_signal and blinker_on) or not dragon_lat_ctrl:
|
||||
steer_req = 0 if isinstance(steer_req, int) else False
|
||||
return steer_req
|
||||
|
||||
def common_interface_atl(ret, atl):
|
||||
# dp
|
||||
enable_acc = ret.cruiseState.enabled
|
||||
if atl and ret.cruiseState.available:
|
||||
enable_acc = True
|
||||
if ret.gearShifter in [car.CarState.GearShifter.reverse, car.CarState.GearShifter.park]:
|
||||
enable_acc = False
|
||||
if ret.seatbeltUnlatched or ret.doorOpen:
|
||||
enable_acc = False
|
||||
return enable_acc
|
||||
|
||||
def common_interface_get_params_lqr(ret):
|
||||
if params.get('dp_lqr') == b'1':
|
||||
ret.lateralTuning.init('lqr')
|
||||
ret.lateralTuning.lqr.scale = 1500.0
|
||||
ret.lateralTuning.lqr.ki = 0.05
|
||||
|
||||
ret.lateralTuning.lqr.a = [0., 1., -0.22619643, 1.21822268]
|
||||
ret.lateralTuning.lqr.b = [-1.92006585e-04, 3.95603032e-05]
|
||||
ret.lateralTuning.lqr.c = [1., 0.]
|
||||
ret.lateralTuning.lqr.k = [-110.73572306, 451.22718255]
|
||||
ret.lateralTuning.lqr.l = [0.3233671, 0.3185757]
|
||||
ret.lateralTuning.lqr.dcGain = 0.002237852961363602
|
||||
return ret
|
||||
@@ -0,0 +1,234 @@
|
||||
#!/usr/bin/env python3.7
|
||||
import os
|
||||
import json
|
||||
import time
|
||||
from math import floor
|
||||
|
||||
confs = [
|
||||
{'name': 'dp_atl', 'default': False, 'type': 'Bool', 'conf_type': ['param', 'struct'], 'update_once': True},
|
||||
# waze
|
||||
{'name': 'dp_app_waze', 'default': False, 'type': 'Bool', 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_app_waze_manual', 'default': 0, 'type': 'Int8', 'min': -1, 'max': 1, 'depends': [{'name': 'dp_app_waze', 'vals': [True]}], 'conf_type': ['param', 'struct']},
|
||||
# dashcam related
|
||||
{'name': 'dp_dashcam', 'default': 0, 'type': 'Bool', 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_dashcam_hours_stored', 'default': 24, 'type': 'UInt8', 'min': 1, 'max': 255, 'depends': [{'name': 'dp_dashcam', 'vals': [True]}], 'conf_type': ['param', 'struct']},
|
||||
# auto shutdown related
|
||||
{'name': 'dp_auto_shutdown', 'default': False, 'type': 'Bool', 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_auto_shutdown_in', 'default': 90, 'type': 'UInt16', 'min': 1, 'max': 65535, 'depends': [{'name': 'dp_auto_shutdown', 'vals': [True]}], 'conf_type': ['param', 'struct']},
|
||||
# service
|
||||
{'name': 'dp_logger', 'default': True, 'type': 'Bool', 'conf_type': ['param']},
|
||||
{'name': 'dp_athenad', 'default': True, 'type': 'Bool', 'depends': [{'name': 'dp_atl', 'vals': [False]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_uploader', 'default': True, 'type': 'Bool', 'depends': [{'name': 'dp_atl', 'vals': [False]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_upload_on_mobile', 'default': False, 'type': 'Bool', 'depends': [{'name': 'dp_uploader', 'vals': [True]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_upload_on_hotspot', 'default': False, 'type': 'Bool', 'depends': [{'name': 'dp_uploader', 'vals': [True]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_updated', 'default': True, 'type': 'Bool', 'conf_type': ['param']},
|
||||
{'name': 'dp_hotspot_on_boot', 'default': False, 'type': 'Bool', 'conf_type': ['param']},
|
||||
# lat ctrl
|
||||
{'name': 'dp_lat_ctrl', 'default': True, 'type': 'Bool', 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_steering_limit_alert', 'default': True, 'type': 'Bool', 'depends': [{'name': 'dp_lat_ctrl', 'vals': [True]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_steering_on_signal', 'default': False, 'type': 'Bool', 'depends': [{'name': 'dp_lat_ctrl', 'vals': [True]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_signal_off_delay', 'default': 0, 'type': 'UInt8', 'min': 0, 'max': 10, 'conf_type': ['param', 'struct']},
|
||||
# assist/auto lane change
|
||||
{'name': 'dp_assisted_lc_min_mph', 'default': 45, 'type': 'UInt8', 'min': 0, 'max': 255, 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_auto_lc', 'default': False, 'type': 'Bool', 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_auto_lc_cont', 'default': False, 'type': 'Bool', 'depends': [{'name': 'dp_auto_lc', 'vals': [True]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_auto_lc_min_mph', 'default': 60, 'type': 'UInt8', 'min': 0, 'max': 255, 'depends': [{'name': 'dp_auto_lc', 'vals': [True]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_auto_lc_delay', 'default': 3, 'type': 'UInt8', 'min': 0, 'max': 10, 'depends': [{'name': 'dp_auto_lc', 'vals': [True]}], 'conf_type': ['param', 'struct']},
|
||||
# long ctrl
|
||||
{'name': 'dp_slow_on_curve', 'default': False, 'type': 'Bool', 'depends': [{'name': 'dp_atl', 'vals': [False]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_allow_gas', 'default': False, 'type': 'Bool', 'depends': [{'name': 'dp_atl', 'vals': [False]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_max_ctrl_speed', 'default': 92, 'type': 'Float32', 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_lead_car_alert', 'default': False, 'type': 'Bool', 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_dynamic_follow', 'default': 0, 'type': 'UInt8', 'min': 0, 'max': 4, 'depends': [{'name': 'dp_atl', 'vals': [False]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_accel_profile', 'default': 0, 'type': 'UInt8', 'min': 0, 'max': 3, 'depends': [{'name': 'dp_atl', 'vals': [False]}], 'conf_type': ['param', 'struct']},
|
||||
# safety
|
||||
{'name': 'dp_driver_monitor', 'default': True, 'type': 'Bool', 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_steering_monitor', 'default': True, 'type': 'Bool', 'depends': [{'name': 'dp_driver_monitor', 'vals': [False]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_steering_monitor_timer', 'default': 70, 'type': 'UInt8', 'min': 70, 'max': 360, 'depends': [{'name': 'dp_driver_monitor', 'vals': [False]}, {'name': 'dp_steering_monitor', 'vals': [True]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_gear_check', 'default': True, 'type': 'Bool', 'depends': [{'name': 'dp_atl', 'vals': [False]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_temp_monitor', 'default': True, 'type': 'Bool', 'conf_type': ['param', 'struct']},
|
||||
# UIs
|
||||
{'name': 'dp_driving_ui', 'default': True, 'type': 'Bool', 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_ui_screen_off_reversing', 'default': False, 'type': 'Bool', 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_ui_screen_off_driving', 'default': False, 'type': 'Bool', 'depends': [{'name': 'dp_app_waze', 'vals': [False]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_ui_speed', 'default': True, 'type': 'Bool', 'depends': [{'name': 'dp_driving_ui', 'vals': [True]}, {'name': 'dp_ui_screen_off_driving', 'vals': [False]}, {'name': 'dp_app_waze', 'vals': [False]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_ui_event', 'default': True, 'type': 'Bool', 'depends': [{'name': 'dp_driving_ui', 'vals': [True]}, {'name': 'dp_ui_screen_off_driving', 'vals': [False]}, {'name': 'dp_app_waze', 'vals': [False]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_ui_max_speed', 'default': True, 'type': 'Bool', 'depends': [{'name': 'dp_driving_ui', 'vals': [True]}, {'name': 'dp_ui_screen_off_driving', 'vals': [False]}, {'name': 'dp_app_waze', 'vals': [False]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_ui_face', 'default': True, 'type': 'Bool', 'depends': [{'name': 'dp_driving_ui', 'vals': [True]}, {'name': 'dp_driver_monitor', 'vals': [True]}, {'name': 'dp_ui_screen_off_driving', 'vals': [False]}, {'name': 'dp_app_waze', 'vals': [False]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_ui_lane', 'default': True, 'type': 'Bool', 'depends': [{'name': 'dp_driving_ui', 'vals': [True]}, {'name': 'dp_ui_screen_off_driving', 'vals': [False]}, {'name': 'dp_app_waze', 'vals': [False]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_ui_path', 'default': True, 'type': 'Bool', 'depends': [{'name': 'dp_driving_ui', 'vals': [True]}, {'name': 'dp_ui_screen_off_driving', 'vals': [False]}, {'name': 'dp_app_waze', 'vals': [False]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_ui_lead', 'default': True, 'type': 'Bool', 'depends': [{'name': 'dp_driving_ui', 'vals': [True]}, {'name': 'dp_ui_screen_off_driving', 'vals': [False]}, {'name': 'dp_app_waze', 'vals': [False]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_ui_dev', 'default': False, 'type': 'Bool', 'depends': [{'name': 'dp_driving_ui', 'vals': [True]}, {'name': 'dp_ui_screen_off_driving', 'vals': [False]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_ui_blinker', 'default': False, 'type': 'Bool', 'depends': [{'name': 'dp_driving_ui', 'vals': [True]}, {'name': 'dp_ui_screen_off_driving', 'vals': [False]}, {'name': 'dp_app_waze', 'vals': [False]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_ui_brightness', 'default': 0, 'type': 'UInt8', 'min': 0, 'max': 100, 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_ui_volume_boost', 'default': 0, 'type': 'Int8', 'min': -100, 'max': 100, 'conf_type': ['param', 'struct']},
|
||||
# Apps
|
||||
{'name': 'dp_app_auto_update', 'default': True, 'type': 'Bool', 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_app_ext_gps', 'default': False, 'type': 'Bool', 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_app_tomtom', 'default': False, 'type': 'Bool', 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_app_tomtom_auto', 'default': False, 'type': 'Bool', 'depends': [{'name': 'dp_app_tomtom', 'vals': [True]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_app_tomtom_manual', 'default': 0, 'type': 'Int8', 'min': -1, 'max': 1, 'depends': [{'name': 'dp_app_tomtom', 'vals': [True]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_app_autonavi', 'default': False, 'type': 'Bool', 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_app_autonavi_auto', 'default': False, 'type': 'Bool', 'depends': [{'name': 'dp_app_autonavi', 'vals': [True]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_app_autonavi_manual', 'default': 0, 'type': 'Int8', 'min': -1, 'max': 1, 'depends': [{'name': 'dp_app_autonavi', 'vals': [True]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_app_aegis', 'default': False, 'type': 'Bool', 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_app_aegis_auto', 'default': False, 'type': 'Bool', 'depends': [{'name': 'dp_app_aegis', 'vals': [True]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_app_aegis_manual', 'default': 0, 'type': 'Int8', 'min': -1, 'max': 1, 'depends': [{'name': 'dp_app_aegis', 'vals': [True]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_app_mixplorer', 'default': False, 'type': 'Bool', 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_app_mixplorer_manual', 'default': 0, 'type': 'Int8', 'min': -1, 'max': 1, 'depends': [{'name': 'dp_app_mixplorer', 'vals': [True]}], 'conf_type': ['param', 'struct']},
|
||||
# toyota
|
||||
{'name': 'dp_toyota_ldw', 'default': True, 'type': 'Bool', 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_toyota_sng', 'default': False, 'type': 'Bool', 'depends': [{'name': 'dp_atl', 'vals': [False]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_toyota_zss', 'default': False, 'type': 'Bool', 'conf_type': ['param']},
|
||||
{'name': 'dp_toyota_lowest_cruise_override', 'default': False, 'type': 'Bool', 'depends': [{'name': 'dp_atl', 'vals': [False]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_toyota_lowest_cruise_override_at', 'default': 44, 'type': 'Float32', 'depends': [{'name': 'dp_toyota_lowest_cruise_override', 'vals': [True]}], 'min': 44, 'max': 46, 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_toyota_lowest_cruise_override_speed', 'default': 32, 'type': 'Float32', 'depends': [{'name': 'dp_toyota_lowest_cruise_override_speed', 'vals': [True]}], 'min': 27, 'max': 44, 'conf_type': ['param', 'struct']},
|
||||
# custom car
|
||||
{'name': 'dp_car_selected', 'default': '', 'type': 'Text', 'conf_type': ['param']},
|
||||
{'name': 'dp_car_list', 'default': '', 'type': 'Text', 'conf_type': ['param']},
|
||||
{'name': 'dp_car_detected', 'default': '', 'type': 'Text', 'conf_type': ['param']},
|
||||
#misc
|
||||
{'name': 'dp_ip_addr', 'default': '', 'type': 'Text', 'conf_type': ['struct']},
|
||||
{'name': 'dp_full_speed_fan', 'default': False, 'type': 'Bool', 'conf_type': ['param']},
|
||||
{'name': 'dp_uno_fan_mode', 'default': False, 'type': 'Bool', 'conf_type': ['param']},
|
||||
{'name': 'dp_last_modified', 'default': str(floor(time.time())), 'type': 'Text', 'conf_type': ['param']},
|
||||
{'name': 'dp_camera_offset', 'default': 6, 'type': 'Int8', 'min': -255, 'max': 255, 'conf_type': ['param', 'struct']},
|
||||
|
||||
{'name': 'dp_locale', 'default': '', 'type': 'Text', 'conf_type': ['param', 'struct'], 'update_once': True},
|
||||
{'name': 'dp_disable_relay', 'default': False, 'type': 'Bool', 'conf_type': ['param']},
|
||||
{'name': 'dp_charging_ctrl', 'default': False, 'type': 'Bool', 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_charging_at', 'default': 60, 'type': 'UInt8', 'min': 0, 'max': 100, 'depends': [{'name': 'dp_charging_ctrl', 'vals': [True]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_discharging_at', 'default': 70, 'type': 'UInt8', 'min': 0, 'max': 100, 'depends': [{'name': 'dp_charging_ctrl', 'vals': [True]}], 'conf_type': ['param', 'struct']},
|
||||
{'name': 'dp_reg', 'default': True, 'type': 'Bool', 'conf_type': ['param']},
|
||||
{'name': 'dp_is_updating', 'default': False, 'type': 'Bool', 'set_param_only': True, 'conf_type': ['param', 'struct']},
|
||||
|
||||
{'name': 'dp_sr_learner', 'default': True, 'type': 'Bool', 'conf_type': ['param']},
|
||||
{'name': 'dp_lqr', 'default': False, 'type': 'Bool', 'conf_type': ['param']},
|
||||
|
||||
# including thermal data
|
||||
{'name': 'dp_thermal_started', 'default': False, 'type': 'Bool', 'conf_type': ['struct']},
|
||||
{'name': 'dp_thermal_overheat', 'default': False, 'type': 'Bool', 'conf_type': ['struct']},
|
||||
]
|
||||
|
||||
def get_definition(name):
|
||||
for conf in confs:
|
||||
if conf['name'] == name:
|
||||
return conf
|
||||
return None
|
||||
|
||||
def to_param_val(name, val):
|
||||
conf = get_definition(name)
|
||||
if conf is not None:
|
||||
type = conf['type'].lower()
|
||||
try:
|
||||
if 'bool' in type:
|
||||
val = '1' if val else '0'
|
||||
elif 'int' in type:
|
||||
val = int(val)
|
||||
elif 'float' in type:
|
||||
val = float(val)
|
||||
return str(val)
|
||||
except (ValueError, TypeError):
|
||||
return ''
|
||||
return ''
|
||||
|
||||
def to_struct_val(name, val):
|
||||
conf = get_definition(name)
|
||||
if conf is not None:
|
||||
try:
|
||||
type = conf['type'].lower()
|
||||
if 'bool' in type:
|
||||
val = True if val == '1' else False
|
||||
elif 'int' in type:
|
||||
val = int(val)
|
||||
elif 'float' in type:
|
||||
val = float(val)
|
||||
return val
|
||||
except (ValueError, TypeError):
|
||||
return None
|
||||
return None
|
||||
|
||||
'''
|
||||
function to convert param name into struct name.
|
||||
'''
|
||||
def get_struct_name(snake_str):
|
||||
components = snake_str.split('_')
|
||||
# We capitalize the first letter of each component except the first one
|
||||
# with the 'title' method and join them together.
|
||||
return components[0] + ''.join(x.title() for x in components[1:])
|
||||
|
||||
'''
|
||||
function to generate struct for log.capnp
|
||||
'''
|
||||
def gen_log_struct():
|
||||
count = 0
|
||||
str = "# dp\n"
|
||||
str += "struct DragonConf {\n"
|
||||
for conf in confs:
|
||||
name = get_struct_name(conf['name'])
|
||||
if 'struct' in conf['conf_type']:
|
||||
str += f" {name} @{count} :{conf['type']};\n"
|
||||
count += 1
|
||||
str += "}"
|
||||
print(str)
|
||||
|
||||
'''
|
||||
function to append new keys to params.py
|
||||
'''
|
||||
def init_params_keys(keys, type):
|
||||
for conf in confs:
|
||||
if 'param' in conf['conf_type']:
|
||||
keys[conf['name']] = type
|
||||
return keys
|
||||
|
||||
'''
|
||||
function to generate support car list
|
||||
'''
|
||||
def get_support_car_list():
|
||||
attrs = ['FINGERPRINTS', 'FW_VERSIONS']
|
||||
cars = dict()
|
||||
for car_folder in [x[0] for x in os.walk('/data/openpilot/selfdrive/car')]:
|
||||
try:
|
||||
car_name = car_folder.split('/')[-1]
|
||||
if car_name != "mock":
|
||||
names = []
|
||||
for attr in attrs:
|
||||
values = __import__('selfdrive.car.%s.values' % car_name, fromlist=[attr])
|
||||
if hasattr(values, attr):
|
||||
attr_values = getattr(values, attr)
|
||||
else:
|
||||
continue
|
||||
|
||||
if isinstance(attr_values, dict):
|
||||
for f, v in attr_values.items():
|
||||
if f not in names:
|
||||
names.append(f)
|
||||
names.sort()
|
||||
cars[car_name] = names
|
||||
except (ImportError, IOError, ValueError):
|
||||
pass
|
||||
return json.dumps(cars)
|
||||
|
||||
'''
|
||||
function to init param value.
|
||||
should add this into manager.py
|
||||
'''
|
||||
def init_params_vals(params, put_nonblocking):
|
||||
for conf in confs:
|
||||
if 'param' in conf['conf_type']:
|
||||
if conf['name'] == 'dp_car_list':
|
||||
params.put(conf['name'], get_support_car_list())
|
||||
elif params.get(conf['name']) is None:
|
||||
print('name: %s' % conf['name'])
|
||||
print('to_param_val: %s' % to_param_val(conf['name'], conf['default']))
|
||||
params.put(conf['name'], to_param_val(conf['name'], conf['default']))
|
||||
|
||||
'''
|
||||
function to conditionally update params
|
||||
should add this after init_params_vals
|
||||
'''
|
||||
def update_params_vals(params):
|
||||
pass
|
||||
|
||||
if __name__ == "__main__":
|
||||
gen_log_struct()
|
||||
@@ -0,0 +1,12 @@
|
||||
import gettext
|
||||
from common import android
|
||||
|
||||
is_android = android.ANDROID
|
||||
locale_dir = '/data/openpilot/selfdrive/assets/locales'
|
||||
supported_language = ['en-US', 'zh-TW', 'zh-CN']
|
||||
locale = android.getprop("persist.sys.locale") if is_android else 'en-US'
|
||||
|
||||
def events():
|
||||
i18n = gettext.translation('events', localedir=locale_dir, fallback=True, languages=[locale])
|
||||
i18n.install()
|
||||
return i18n.gettext
|
||||
@@ -29,6 +29,7 @@ import tempfile
|
||||
import threading
|
||||
from enum import Enum
|
||||
from common.basedir import PARAMS
|
||||
from common.dp_conf import init_params_keys
|
||||
|
||||
|
||||
def mkdirs_exists_ok(path):
|
||||
@@ -110,6 +111,7 @@ keys = {
|
||||
"Offroad_NeosUpdate": [TxType.CLEAR_ON_MANAGER_START],
|
||||
}
|
||||
|
||||
keys = init_params_keys(keys, [TxType.PERSISTENT])
|
||||
|
||||
def fsync_dir(path):
|
||||
fd = os.open(path, os.O_RDONLY)
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
Make a python script translatable
|
||||
--
|
||||
1. add following codes to the top
|
||||
```python
|
||||
# This Python file uses the following encoding: utf-8
|
||||
# -*- coding: utf-8 -*-
|
||||
from common.i18n import events
|
||||
_ = events()
|
||||
```
|
||||
2. wrap ```_()``` function around the string.
|
||||
|
||||
3. generate pot file (template file)
|
||||
```bash
|
||||
# e.g. xgettext -d base -o /data/openpilot/selfdrive/assets/locales/events.pot /data/openpilot/selfdrive/controls/lib/events.py
|
||||
xgettext -d base -o <openpilot_path>/selfdrive/assets/locales/<template_file>.pot <file_to_translate>.py
|
||||
```
|
||||
|
||||
4. add po file to languages
|
||||
```bash
|
||||
# e.g. cp /data/openpilot/selfdrive/assets/locales/events.pot /data/openpilot/selfdrive/assets/locales/zh-TW/LC_MESSAGES/events.po
|
||||
cp <openpilot_path>/selfdrive/assets/locales/<template_file>.pot <openpilot_path>/selfdrive/assets/locales/<language>/LC_MESSAGES/<template_file>.po
|
||||
```
|
||||
|
||||
5. translate po file with your favorite editor.
|
||||
|
||||
6. generate mo file.
|
||||
```bash
|
||||
# e.g. msgfmt -o /data/openpilot/selfdrive/assets/locales/zh-TW/LC_MESSAGES/events.mo /data/openpilot/selfdrive/assets/locales/zh-TW/LC_MESSAGES/events
|
||||
msgfmt -o <openpilot_path>/selfdrive/assets/locales/<language>/LC_MESSAGES/<template_file>.mo <openpilot_path>/selfdrive/assets/locales/<language>/LC_MESSAGES/<template_file>
|
||||
```
|
||||
|
||||
Update translations
|
||||
---
|
||||
1. add ```_()``` around the new strings
|
||||
|
||||
2. generate pot file again (template file)
|
||||
```bash
|
||||
# e.g. xgettext -d base -o /data/openpilot/selfdrive/assets/locales/events.pot /data/openpilot/selfdrive/controls/lib/events.py
|
||||
xgettext -d base -o <openpilot_path>/selfdrive/assets/locales/<template_file>.pot <file_to_translate>.py
|
||||
```
|
||||
|
||||
3. update already translated file (merge)
|
||||
```bash
|
||||
# e.g. msgmerge --update /data/openpilot/selfdrive/assets/locales/zh-TW/LC_MESSAGES/events.po /data/openpilot/selfdrive/assets/locales/events.pot
|
||||
msgmerge --update <openpilot_path>/selfdrive/assets/locales/<language>/LC_MESSAGES/<file_to_translate>.po <openpilot_path>/selfdrive/assets/locales/<template_file>.pot
|
||||
```
|
||||
|
||||
4. generate mo file again.
|
||||
```bash
|
||||
# e.g. msgfmt -o /data/openpilot/selfdrive/assets/locales/zh-TW/LC_MESSAGES/events.mo /data/openpilot/selfdrive/assets/locales/zh-TW/LC_MESSAGES/events
|
||||
msgfmt -o <openpilot_path>/selfdrive/assets/locales/<language>/LC_MESSAGES/<template_file>.mo <openpilot_path>/selfdrive/assets/locales/<language>/LC_MESSAGES/<template_file>
|
||||
```
|
||||
|
||||
Reference
|
||||
---
|
||||
https://simpleit.rocks/python/how-to-translate-a-python-project-with-gettext-the-easy-way/
|
||||
@@ -0,0 +1,21 @@
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2019-, Rick Lan, dragonpilot community, and a number of other of contributors.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
@@ -0,0 +1,92 @@
|
||||
This Font Software is licensed under the SIL Open Font License,
|
||||
Version 1.1.
|
||||
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font
|
||||
creation efforts of academic and linguistic communities, and to
|
||||
provide a free and open framework in which fonts may be shared and
|
||||
improved in partnership with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply to
|
||||
any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software
|
||||
components as distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to,
|
||||
deleting, or substituting -- in part or in whole -- any of the
|
||||
components of the Original Version, by changing formats or by porting
|
||||
the Font Software to a new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed,
|
||||
modify, redistribute, and sell modified and unmodified copies of the
|
||||
Font Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components, in
|
||||
Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the
|
||||
corresponding Copyright Holder. This restriction only applies to the
|
||||
primary font name as presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created using
|
||||
the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,372 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
NOTE: this is the newer (L) version of the system font configuration,
|
||||
supporting richer weight selection. Some apps will expect the older
|
||||
version, so please keep system_fonts.xml and fallback_fonts.xml in sync
|
||||
with any changes, even though framework will only read this file.
|
||||
|
||||
All fonts withohut names are added to the default list. Fonts are chosen
|
||||
based on a match: full BCP-47 language tag including script, then just
|
||||
language, and finally order (the first font containing the glyph).
|
||||
|
||||
Order of appearance is also the tiebreaker for weight matching. This is
|
||||
the reason why the 900 weights of Roboto precede the 700 weights - we
|
||||
prefer the former when an 800 weight is requested. Since bold spans
|
||||
effectively add 300 to the weight, this ensures that 900 is the bold
|
||||
paired with the 500 weight, ensuring adequate contrast.
|
||||
-->
|
||||
<familyset version="22">
|
||||
<!-- first font is default -->
|
||||
<family name="sans-serif">
|
||||
<font weight="100" style="normal">Roboto-Thin.ttf</font>
|
||||
<font weight="100" style="italic">Roboto-ThinItalic.ttf</font>
|
||||
<font weight="300" style="normal">Roboto-Light.ttf</font>
|
||||
<font weight="300" style="italic">Roboto-LightItalic.ttf</font>
|
||||
<font weight="400" style="normal">Roboto-Regular.ttf</font>
|
||||
<font weight="400" style="italic">Roboto-Italic.ttf</font>
|
||||
<font weight="500" style="normal">Roboto-Medium.ttf</font>
|
||||
<font weight="500" style="italic">Roboto-MediumItalic.ttf</font>
|
||||
<font weight="900" style="normal">Roboto-Black.ttf</font>
|
||||
<font weight="900" style="italic">Roboto-BlackItalic.ttf</font>
|
||||
<font weight="700" style="normal">Roboto-Bold.ttf</font>
|
||||
<font weight="700" style="italic">Roboto-BoldItalic.ttf</font>
|
||||
</family>
|
||||
|
||||
<!-- Note that aliases must come after the fonts they reference. -->
|
||||
<alias name="sans-serif-thin" to="sans-serif" weight="100" />
|
||||
<alias name="sans-serif-light" to="sans-serif" weight="300" />
|
||||
<alias name="sans-serif-medium" to="sans-serif" weight="500" />
|
||||
<alias name="sans-serif-black" to="sans-serif" weight="900" />
|
||||
<alias name="arial" to="sans-serif" />
|
||||
<alias name="helvetica" to="sans-serif" />
|
||||
<alias name="tahoma" to="sans-serif" />
|
||||
<alias name="verdana" to="sans-serif" />
|
||||
|
||||
<family name="sans-serif-condensed">
|
||||
<font weight="300" style="normal">RobotoCondensed-Light.ttf</font>
|
||||
<font weight="300" style="italic">RobotoCondensed-LightItalic.ttf</font>
|
||||
<font weight="400" style="normal">RobotoCondensed-Regular.ttf</font>
|
||||
<font weight="400" style="italic">RobotoCondensed-Italic.ttf</font>
|
||||
<font weight="700" style="normal">RobotoCondensed-Bold.ttf</font>
|
||||
<font weight="700" style="italic">RobotoCondensed-BoldItalic.ttf</font>
|
||||
</family>
|
||||
<alias name="sans-serif-condensed-light" to="sans-serif-condensed" weight="300" />
|
||||
|
||||
<family name="serif">
|
||||
<font weight="400" style="normal">NotoSerif-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSerif-Bold.ttf</font>
|
||||
<font weight="400" style="italic">NotoSerif-Italic.ttf</font>
|
||||
<font weight="700" style="italic">NotoSerif-BoldItalic.ttf</font>
|
||||
</family>
|
||||
<alias name="times" to="serif" />
|
||||
<alias name="times new roman" to="serif" />
|
||||
<alias name="palatino" to="serif" />
|
||||
<alias name="georgia" to="serif" />
|
||||
<alias name="baskerville" to="serif" />
|
||||
<alias name="goudy" to="serif" />
|
||||
<alias name="fantasy" to="serif" />
|
||||
<alias name="ITC Stone Serif" to="serif" />
|
||||
|
||||
<family name="monospace">
|
||||
<font weight="400" style="normal">DroidSansMono.ttf</font>
|
||||
</family>
|
||||
<alias name="sans-serif-monospace" to="monospace" />
|
||||
<alias name="monaco" to="monospace" />
|
||||
|
||||
<family name="serif-monospace">
|
||||
<font weight="400" style="normal">CutiveMono.ttf</font>
|
||||
</family>
|
||||
<alias name="courier" to="serif-monospace" />
|
||||
<alias name="courier new" to="serif-monospace" />
|
||||
|
||||
<family name="casual">
|
||||
<font weight="400" style="normal">ComingSoon.ttf</font>
|
||||
</family>
|
||||
|
||||
<family name="cursive">
|
||||
<font weight="400" style="normal">DancingScript-Regular.ttf</font>
|
||||
<font weight="700" style="normal">DancingScript-Bold.ttf</font>
|
||||
</family>
|
||||
|
||||
<family name="sans-serif-smallcaps">
|
||||
<font weight="400" style="normal">CarroisGothicSC-Regular.ttf</font>
|
||||
</family>
|
||||
|
||||
<!-- fallback fonts -->
|
||||
<family variant="elegant">
|
||||
<font weight="400" style="normal">NotoNaskhArabic-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoNaskhArabic-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="compact">
|
||||
<font weight="400" style="normal">NotoNaskhArabicUI-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoNaskhArabicUI-Bold.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansEthiopic-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansEthiopic-Bold.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansHebrew-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansHebrew-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="elegant">
|
||||
<font weight="400" style="normal">NotoSansThai-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansThai-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="compact">
|
||||
<font weight="400" style="normal">NotoSansThaiUI-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansThaiUI-Bold.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansArmenian-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansArmenian-Bold.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansGeorgian-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansGeorgian-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="elegant">
|
||||
<font weight="400" style="normal">NotoSansDevanagari-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansDevanagari-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="compact">
|
||||
<font weight="400" style="normal">NotoSansDevanagariUI-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansDevanagariUI-Bold.ttf</font>
|
||||
</family>
|
||||
<!-- Gujarati should come after Devanagari -->
|
||||
<family variant="elegant">
|
||||
<font weight="400" style="normal">NotoSansGujarati-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansGujarati-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="compact">
|
||||
<font weight="400" style="normal">NotoSansGujaratiUI-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansGujaratiUI-Bold.ttf</font>
|
||||
</family>
|
||||
<!-- Gurmukhi should come after Devanagari -->
|
||||
<family variant="elegant">
|
||||
<font weight="400" style="normal">NotoSansGurmukhi-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansGurmukhi-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="compact">
|
||||
<font weight="400" style="normal">NotoSansGurmukhiUI-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansGurmukhiUI-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="elegant">
|
||||
<font weight="400" style="normal">NotoSansTamil-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansTamil-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="compact">
|
||||
<font weight="400" style="normal">NotoSansTamilUI-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansTamilUI-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="elegant">
|
||||
<font weight="400" style="normal">NotoSansMalayalam-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansMalayalam-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="compact">
|
||||
<font weight="400" style="normal">NotoSansMalayalamUI-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansMalayalamUI-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="elegant">
|
||||
<font weight="400" style="normal">NotoSansBengali-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansBengali-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="compact">
|
||||
<font weight="400" style="normal">NotoSansBengaliUI-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansBengaliUI-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="elegant">
|
||||
<font weight="400" style="normal">NotoSansTelugu-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansTelugu-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="compact">
|
||||
<font weight="400" style="normal">NotoSansTeluguUI-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansTeluguUI-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="elegant">
|
||||
<font weight="400" style="normal">NotoSansKannada-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansKannada-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="compact">
|
||||
<font weight="400" style="normal">NotoSansKannadaUI-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansKannadaUI-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="elegant">
|
||||
<font weight="400" style="normal">NotoSansOriya-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansOriya-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="compact">
|
||||
<font weight="400" style="normal">NotoSansOriyaUI-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansOriyaUI-Bold.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansSinhala-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansSinhala-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="elegant">
|
||||
<font weight="400" style="normal">NotoSansKhmer-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansKhmer-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="compact">
|
||||
<font weight="400" style="normal">NotoSansKhmerUI-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansKhmerUI-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="elegant">
|
||||
<font weight="400" style="normal">NotoSansLao-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansLao-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="compact">
|
||||
<font weight="400" style="normal">NotoSansLaoUI-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansLaoUI-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="elegant">
|
||||
<font weight="400" style="normal">NotoSansMyanmar-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansMyanmar-Bold.ttf</font>
|
||||
</family>
|
||||
<family variant="compact">
|
||||
<font weight="400" style="normal">NotoSansMyanmarUI-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansMyanmarUI-Bold.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansThaana-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansThaana-Bold.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansCham-Regular.ttf</font>
|
||||
<font weight="700" style="normal">NotoSansCham-Bold.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansBalinese-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansBamum-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansBatak-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansBuginese-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansBuhid-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansCanadianAboriginal-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansCherokee-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansCoptic-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansGlagolitic-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansHanunoo-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansJavanese-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansKayahLi-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansLepcha-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansLimbu-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansLisu-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansMandaic-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansMeeteiMayek-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansNewTaiLue-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansNKo-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansOlChiki-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansRejang-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansSaurashtra-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansSundanese-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansSylotiNagri-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansSyriacEstrangela-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansTagbanwa-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansTaiTham-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansTaiViet-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansTibetan-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansTifinagh-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansVai-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansYi-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansSymbols-Regular-Subsetted.ttf</font>
|
||||
</family>
|
||||
<family lang="ja">
|
||||
<font weight="400" style="normal">NotoSansJP-Regular.otf</font>
|
||||
</family>
|
||||
<family lang="ko">
|
||||
<font weight="400" style="normal">NotoSansKR-Regular.otf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NanumGothic.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoColorEmoji.ttf</font>
|
||||
</family>
|
||||
<family lang="zh-Hans">
|
||||
<font weight="400" style="normal">NotoSansCJKtc-Regular.otf</font>
|
||||
<font weight="500" style="normal">NotoSansCJKtc-Medium.otf</font>
|
||||
<font weight="700" style="normal">NotoSansCJKtc-Bold.otf</font>
|
||||
</family>
|
||||
<family lang="zh-Hant">
|
||||
<font weight="400" style="normal">NotoSansCJKtc-Regular.otf</font>
|
||||
<font weight="500" style="normal">NotoSansCJKtc-Medium.otf</font>
|
||||
<font weight="700" style="normal">NotoSansCJKtc-Bold.otf</font>
|
||||
</family>
|
||||
<family lang="ja">
|
||||
<font weight="400" style="normal">MTLmr3m.ttf</font>
|
||||
</family>
|
||||
<!--
|
||||
Tai Le and Mongolian are intentionally kept last, to make sure they don't override
|
||||
the East Asian punctuation for Chinese.
|
||||
-->
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansTaiLe-Regular.ttf</font>
|
||||
</family>
|
||||
<family>
|
||||
<font weight="400" style="normal">NotoSansMongolian-Regular.ttf</font>
|
||||
</family>
|
||||
</familyset>
|
||||
@@ -0,0 +1,62 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
###############################################################################
|
||||
# The MIT License
|
||||
#
|
||||
# Copyright (c) 2019-, Rick Lan, dragonpilot community, and a number of other of contributors.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
#
|
||||
# Noto is a trademark of Google Inc. Noto fonts are open source.
|
||||
# All Noto fonts are published under the SIL Open Font License,
|
||||
# Version 1.1. Language data and some sample texts are from the Unicode CLDR project.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
|
||||
# Android system locale, zh-TW = Traditional Chinese, zh-CN = Simplified Chinese
|
||||
#lang=en
|
||||
|
||||
update_font=0
|
||||
remove_old_font=0
|
||||
|
||||
# check regular font
|
||||
if [ ! -f "/system/fonts/NotoSansCJKtc-Regular.otf" ]; then
|
||||
update_font=1
|
||||
fi
|
||||
|
||||
if [ $update_font -eq "1" ] || [ $remove_old_font -eq "1" ]; then
|
||||
# sleep 3 secs in case, make sure the /system is re-mountable
|
||||
sleep 3
|
||||
mount -o remount,rw /system
|
||||
if [ $update_font -eq "1" ]; then
|
||||
# install font
|
||||
cp -rf /data/openpilot/dragonpilot/cjk-fonts/NotoSansCJKtc-* /system/fonts/
|
||||
# install font mapping
|
||||
cp -rf /data/openpilot/dragonpilot/cjk-fonts/fonts.xml /system/etc/fonts.xml
|
||||
# change permissions
|
||||
chmod 644 /system/etc/fonts.xml
|
||||
chmod 644 /system/fonts/NotoSansCJKtc-*
|
||||
fi
|
||||
mount -o remount,r /system
|
||||
# change system locale
|
||||
fi
|
||||
|
||||
#setprop persist.sys.locale $lang
|
||||
#setprop persist.sys.local $lang
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"ota_url": "https://commadist.azureedge.net/neosupdate/ota-signed-efdf7de63b1aef63d68301e6175930991bf9a5927d16ec6fcc69287e2ee7ca4a.zip",
|
||||
"ota_hash": "efdf7de63b1aef63d68301e6175930991bf9a5927d16ec6fcc69287e2ee7ca4a",
|
||||
"recovery_url": "https://commadist.azureedge.net/neosupdate/recovery-97c27e6ed04ed6bb0608b845a2d4100912093f9380c3f2ba6b56bccd608e5f6e.img",
|
||||
"recovery_len": 15861036,
|
||||
"recovery_hash": "97c27e6ed04ed6bb0608b845a2d4100912093f9380c3f2ba6b56bccd608e5f6e"
|
||||
"ota_url": "http://dpp.cool/neosupdate/ota-signed-5c366df88020863525f80f6803afaca9f852854b4b1aef9184189844b7979f0b.zip",
|
||||
"ota_hash": "5c366df88020863525f80f6803afaca9f852854b4b1aef9184189844b7979f0b",
|
||||
"recovery_url": "http://dpp.cool/neosupdate/recovery-4772f9348e04b560b9df87d6dea6c740fa8d62ea41a8db3842eec216f04e3110.img",
|
||||
"recovery_len": 15922476,
|
||||
"recovery_hash": "4772f9348e04b560b9df87d6dea6c740fa8d62ea41a8db3842eec216f04e3110"
|
||||
}
|
||||
|
||||
+9
-5
@@ -30,10 +30,10 @@ function launch {
|
||||
# that completed successfully and synced to disk.
|
||||
|
||||
if [ -f "${BASEDIR}/.overlay_init" ]; then
|
||||
find ${BASEDIR}/.git -newer ${BASEDIR}/.overlay_init | grep -q '.' 2> /dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "${BASEDIR} has been modified, skipping overlay update installation"
|
||||
else
|
||||
# find ${BASEDIR}/.git -newer ${BASEDIR}/.overlay_init | grep -q '.' 2> /dev/null
|
||||
# if [ $? -eq 0 ]; then
|
||||
# echo "${BASEDIR} has been modified, skipping overlay update installation"
|
||||
# else
|
||||
if [ -f "${STAGING_ROOT}/finalized/.overlay_consistent" ]; then
|
||||
if [ ! -d /data/safe_staging/old_openpilot ]; then
|
||||
echo "Valid overlay update found, installing"
|
||||
@@ -55,7 +55,7 @@ function launch {
|
||||
# TODO: restore backup? This means the updater didn't start after swapping
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
# fi
|
||||
fi
|
||||
|
||||
# Android and other system processes are not permitted to run on CPU 3
|
||||
@@ -119,6 +119,10 @@ function launch {
|
||||
ln -sfn $(pwd) /data/pythonpath
|
||||
export PYTHONPATH="$PWD"
|
||||
|
||||
if [ -f "/sdcard/dp_patcher.py" ]; then
|
||||
/data/data/com.termux/files/usr/bin/python /sdcard/dp_patcher.py
|
||||
fi
|
||||
|
||||
# start manager
|
||||
cd selfdrive
|
||||
./manager.py
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
/usr/bin/sh /data/openpilot/dragonpilot/cjk-fonts/installer.sh &
|
||||
export PASSIVE="0"
|
||||
exec ./launch_chffrplus.sh
|
||||
|
||||
|
||||
@@ -0,0 +1,411 @@
|
||||
CM_ "AUTOGENERATED FILE, DO NOT EDIT"
|
||||
|
||||
|
||||
CM_ "Imported file _comma.dbc starts here"
|
||||
BO_ 359 STEERING_IPAS_COMMA: 8 IPAS
|
||||
SG_ STATE : 7|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ ANGLE : 3|12@0- (1.5,0) [-510|510] "deg" XXX
|
||||
SG_ SET_ME_X10 : 23|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ DIRECTION_CMD : 38|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X40 : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
CM BO_ STEERING_IPAS_COMMA "Copy of msg 614 so we can do angle control while the Park Assist ECU is connected (Panda spoofs 614 with 359 on connector J70). Note that addresses 0x266 and 0x167 are checksum-invariant";
|
||||
|
||||
BO_ 512 GAS_COMMAND: 6 EON
|
||||
SG_ GAS_COMMAND : 7|16@0+ (0.159375,-75.555) [0|1] "" INTERCEPTOR
|
||||
SG_ GAS_COMMAND2 : 23|16@0+ (0.159375,-151.111) [0|1] "" INTERCEPTOR
|
||||
SG_ ENABLE : 39|1@0+ (1,0) [0|1] "" INTERCEPTOR
|
||||
SG_ COUNTER_PEDAL : 35|4@0+ (1,0) [0|15] "" INTERCEPTOR
|
||||
SG_ CHECKSUM_PEDAL : 47|8@0+ (1,0) [0|255] "" INTERCEPTOR
|
||||
|
||||
BO_ 513 GAS_SENSOR: 6 INTERCEPTOR
|
||||
SG_ INTERCEPTOR_GAS : 7|16@0+ (0.159375,-75.555) [0|1] "" EON
|
||||
SG_ INTERCEPTOR_GAS2 : 23|16@0+ (0.159375,-151.111) [0|1] "" EON
|
||||
SG_ STATE : 39|4@0+ (1,0) [0|15] "" EON
|
||||
SG_ COUNTER_PEDAL : 35|4@0+ (1,0) [0|15] "" EON
|
||||
SG_ CHECKSUM_PEDAL : 47|8@0+ (1,0) [0|255] "" EON
|
||||
|
||||
VAL_ 513 STATE 5 "FAULT_TIMEOUT" 4 "FAULT_STARTUP" 3 "FAULT_SCE" 2 "FAULT_SEND" 1 "FAULT_BAD_CHECKSUM" 0 "NO_FAULT" ;
|
||||
|
||||
|
||||
CM_ "Imported file _toyota_2017.dbc starts here"
|
||||
VERSION ""
|
||||
|
||||
|
||||
NS_ :
|
||||
NS_DESC_
|
||||
CM_
|
||||
BA_DEF_
|
||||
BA_
|
||||
VAL_
|
||||
CAT_DEF_
|
||||
CAT_
|
||||
FILTER
|
||||
BA_DEF_DEF_
|
||||
EV_DATA_
|
||||
ENVVAR_DATA_
|
||||
SGTYPE_
|
||||
SGTYPE_VAL_
|
||||
BA_DEF_SGTYPE_
|
||||
BA_SGTYPE_
|
||||
SIG_TYPE_REF_
|
||||
VAL_TABLE_
|
||||
SIG_GROUP_
|
||||
SIG_VALTYPE_
|
||||
SIGTYPE_VALTYPE_
|
||||
BO_TX_BU_
|
||||
BA_DEF_REL_
|
||||
BA_REL_
|
||||
BA_DEF_DEF_REL_
|
||||
BU_SG_REL_
|
||||
BU_EV_REL_
|
||||
BU_BO_REL_
|
||||
SG_MUL_VAL_
|
||||
|
||||
BS_:
|
||||
|
||||
BU_: XXX DSU HCU EPS IPAS CGW
|
||||
|
||||
BO_ 36 KINEMATICS: 8 XXX
|
||||
SG_ ACCEL_Y : 33|10@0+ (0.03589,-18.375) [0|65535] "m/s^2" XXX
|
||||
SG_ YAW_RATE : 1|10@0+ (0.244,-125) [0|65535] "deg/sec" XXX
|
||||
SG_ STEERING_TORQUE : 17|10@0+ (1,-512) [0|65535] "" XXX
|
||||
|
||||
BO_ 37 STEER_ANGLE_SENSOR: 8 XXX
|
||||
SG_ STEER_ANGLE : 3|12@0- (1.5,0) [-500|500] "deg" XXX
|
||||
SG_ STEER_FRACTION : 39|4@0- (0.1,0) [-0.7|0.7] "deg" XXX
|
||||
SG_ STEER_RATE : 35|12@0- (1,0) [-2000|2000] "deg/s" XXX
|
||||
|
||||
BO_ 166 BRAKE: 8 XXX
|
||||
SG_ BRAKE_AMOUNT : 7|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ BRAKE_PEDAL : 23|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 170 WHEEL_SPEEDS: 8 XXX
|
||||
SG_ WHEEL_SPEED_FR : 7|16@0+ (0.01,-67.67) [0|250] "kph" XXX
|
||||
SG_ WHEEL_SPEED_FL : 23|16@0+ (0.01,-67.67) [0|250] "kph" XXX
|
||||
SG_ WHEEL_SPEED_RR : 39|16@0+ (0.01,-67.67) [0|250] "kph" XXX
|
||||
SG_ WHEEL_SPEED_RL : 55|16@0+ (0.01,-67.67) [0|250] "kph" XXX
|
||||
|
||||
BO_ 180 SPEED: 8 XXX
|
||||
SG_ ENCODER : 39|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SPEED : 47|16@0+ (0.01,0) [0|250] "kph" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 353 DSU_SPEED: 7 XXX
|
||||
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX
|
||||
|
||||
BO_ 452 ENGINE_RPM: 8 CGW
|
||||
SG_ RPM : 7|16@0- (0.78125,0) [0|0] "rpm" SCS
|
||||
|
||||
BO_ 466 PCM_CRUISE: 8 XXX
|
||||
SG_ GAS_RELEASED : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CRUISE_ACTIVE : 5|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ STANDSTILL_ON : 12|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ ACCEL_NET : 23|16@0- (0.001,0) [-20|20] "m/s2" XXX
|
||||
SG_ CRUISE_STATE : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CANCEL_REQ : 49|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 467 PCM_CRUISE_2: 8 XXX
|
||||
SG_ MAIN_ON : 15|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ LOW_SPEED_LOCKOUT : 14|2@0+ (1,0) [0|3] "kph" XXX
|
||||
SG_ SET_SPEED : 23|8@0+ (1,0) [0|255] "kph" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 552 ACCELEROMETER: 8 XXX
|
||||
SG_ ACCEL_Z : 22|15@0- (1,0) [0|32767] "" XXX
|
||||
SG_ ACCEL_X : 6|15@0- (0.001,0) [-20|20] "m/s2" XXX
|
||||
|
||||
BO_ 560 BRAKE_MODULE2: 7 XXX
|
||||
SG_ BRAKE_PRESSED : 26|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 614 STEERING_IPAS: 8 IPAS
|
||||
SG_ STATE : 7|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ ANGLE : 3|12@0- (1.5,0) [-510|510] "deg" XXX
|
||||
SG_ SET_ME_X10 : 23|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ DIRECTION_CMD : 38|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X40 : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00_1 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 643 PRE_COLLISION: 7 DSU
|
||||
SG_ COUNTER : 7|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 15|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ FORCE : 23|16@0- (2,0) [0|255] "N" XXX
|
||||
SG_ SET_ME_X002 : 33|8@0+ (1,0) [0|3] "" XXX
|
||||
SG_ BRAKE_STATUS : 39|3@0+ (1,0) [0|255] "" XXX
|
||||
SG_ STATE : 36|3@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X003 : 40|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ PRECOLLISION_ACTIVE : 41|1@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 740 STEERING_LKA: 5 XXX
|
||||
SG_ LKA_STATE : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ STEER_REQUEST : 0|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ COUNTER : 6|6@0+ (1,0) [0|63] "" XXX
|
||||
SG_ SET_ME_1 : 7|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ STEER_TORQUE_CMD : 15|16@0- (1,0) [0|65535] "" XXX
|
||||
SG_ CHECKSUM : 39|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 742 LEAD_INFO: 8 DSU
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" HCU
|
||||
SG_ LEAD_REL_SPEED : 23|12@0- (0.025,0) [-100|100] "m/s" HCU
|
||||
SG_ LEAD_LONG_DIST : 7|13@0+ (0.05,0) [0|300] "m" HCU
|
||||
|
||||
BO_ 835 ACC_CONTROL: 8 DSU
|
||||
SG_ ACCEL_CMD : 7|16@0- (0.001,0) [-20|20] "m/s2" HCU
|
||||
SG_ SET_ME_X01 : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ DISTANCE : 20|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ MINI_CAR : 21|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X3 : 19|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ PERMIT_BRAKING : 30|1@0+ (1,0) [0|1] "" HCU
|
||||
SG_ RELEASE_STANDSTILL : 31|1@0+ (1,0) [0|1] "" HCU
|
||||
SG_ CANCEL_REQ : 24|1@0+ (1,0) [0|1] "" HCU
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ ACCEL_CMD_ALT : 47|8@0- (0.05,0) [0|0] "m/s^2" XXX
|
||||
|
||||
BO_ 836 PRE_COLLISION_2: 8 DSU
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 869 DSU_CRUISE : 7 DSU
|
||||
SG_ RES_BTN : 3|1@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SET_BTN : 2|1@0+ (1,0) [0|0] "" XXX
|
||||
SG_ CANCEL_BTN : 1|1@0+ (1,0) [0|0] "" XXX
|
||||
SG_ MAIN_ON : 0|1@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SET_SPEED : 15|8@0+ (1,0) [0|0] "km/h" XXX
|
||||
SG_ CRUISE_REQUEST : 31|8@0+ (100,-12800) [0|0] "N" XXX
|
||||
SG_ LEAD_DISTANCE : 39|8@0+ (1,0) [0|0] "m" XXX
|
||||
|
||||
BO_ 921 PCM_CRUISE_SM: 8 XXX
|
||||
SG_ MAIN_ON : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CRUISE_CONTROL_STATE : 11|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ DISTANCE_LINES : 14|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ UI_SET_SPEED : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 951 ESP_CONTROL: 8 ESP
|
||||
SG_ TC_DISABLED : 13|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1041 ACC_HUD: 8 DSU
|
||||
SG_ FCW : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X20 : 15|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X10 : 39|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X80 : 55|8@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1042 LKAS_HUD: 8 XXX
|
||||
SG_ BARRIERS : 1|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ RIGHT_LINE : 3|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ LEFT_LINE : 5|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X01 : 7|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X01_2 : 11|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ LDA_ALERT : 9|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ TWO_BEEPS : 12|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ ADJUSTING_CAMERA : 13|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ LDA_MALFUNCTION : 15|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REPEATED_BEEPS : 32|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X0C : 23|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X2C : 47|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X38 : 55|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X02 : 63|8@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1043 TIME : 8 CGW
|
||||
SG_ YEAR : 7|8@0+ (1,0) [0|0] "year" XXX
|
||||
SG_ MONTH : 15|8@0+ (1,0) [0|0] "month" XXX
|
||||
SG_ DAY : 23|8@0+ (1,0) [0|0] "day" XXX
|
||||
SG_ HOUR : 31|8@0+ (1,0) [0|0] "hour" XXX
|
||||
SG_ MINUTE : 39|8@0+ (1,0) [0|0] "minute" XXX
|
||||
SG_ GMT_DIFF : 55|1@0+ (1,0) [0|0] "" XXX
|
||||
SG_ GMTDIFF_HOURS : 54|4@0+ (1,0) [0|0] "hours" XXX
|
||||
SG_ GMTDIFF_MINUTES : 50|6@0+ (1,0) [0|0] "minutes" XXX
|
||||
SG_ SUMMER : 60|1@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1408 VIN_PART_1: 8 CGW
|
||||
SG_ VIN_1 : 7|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ VIN_2 : 15|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ VIN_3 : 23|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ VIN_4 : 31|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ VIN_5 : 39|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ VIN_6 : 47|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ VIN_7 : 55|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ VIN_8 : 63|8@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1409 VIN_PART_2: 8 CGW
|
||||
SG_ VIN_9 : 7|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ VIN_10 : 15|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ VIN_11 : 23|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ VIN_12 : 31|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ VIN_13 : 39|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ VIN_14 : 47|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ VIN_15 : 55|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ VIN_16 : 63|8@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1410 VIN_PART_3: 8 CGW
|
||||
SG_ VIN_17 : 7|8@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1553 UI_SETTING: 8 XXX
|
||||
SG_ UNITS : 26|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 1556 STEERING_LEVERS: 8 XXX
|
||||
SG_ TURN_SIGNALS : 29|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 1568 SEATS_DOORS: 8 XXX
|
||||
SG_ SEATBELT_DRIVER_UNLATCHED : 62|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_FL : 45|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_RL : 42|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_RR : 43|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_FR : 44|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1570 LIGHT_STALK: 8 SCM
|
||||
SG_ AUTO_HIGH_BEAM : 37|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1161 RSA1: 8 FCM
|
||||
SG_ TSGN1 : 7|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNGRY1 : 12|3@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNHLT1 : 9|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SPDVAL1 : 23|8@0+ (1,0) [0|0] "kph" XXX
|
||||
SG_ SPLSGN1 : 31|4@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SPLSGN2 : 27|4@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGN2 : 39|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNGRY2 : 44|3@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNHLT2 : 41|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SPDVAL2 : 55|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ BZRRQ_P : 63|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ BZRRQ_A : 61|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SYNCID1 : 59|4@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1162 RSA2: 8 FCM
|
||||
SG_ TSGN3 : 7|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNGRY3 : 12|3@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNHLT3 : 9|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SPLSGN3 : 31|4@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SPLSGN4 : 27|4@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGN4 : 39|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNGRY4 : 44|3@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNHLT4 : 41|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ DPSGNREQ : 54|1@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SGNNUMP : 53|3@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SGNNUMA : 50|3@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SPDUNT : 63|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSRWMSG : 61|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SYNCID2 : 59|4@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1163 RSA3: 8 FCM
|
||||
SG_ TSREQPD : 7|1@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSRMSW : 6|1@0+ (1,0) [0|0] "" XXX
|
||||
SG_ OTSGNNTM : 5|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ NTLVLSPD : 3|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ OVSPNTM : 1|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ OVSPVALL : 11|4@0+ (1,-5) [0|0] "" XXX
|
||||
SG_ OVSPVALM : 19|4@0+ (1,-5) [0|0] "" XXX
|
||||
SG_ OVSPVALH : 27|4@0+ (1,-5) [0|0] "" XXX
|
||||
SG_ TSRSPU : 33|2@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
CM_ SG_ 36 ACCEL_Y "unit is tbd";
|
||||
CM_ SG_ 36 YAW_RATE "verify";
|
||||
CM_ SG_ 36 STEERING_TORQUE "does not seem the steer torque, tbd";
|
||||
CM_ SG_ 37 STEER_FRACTION "1/15th of the signal STEER_ANGLE, which is 1.5 deg; note that 0x8 is never set";
|
||||
CM_ SG_ 37 STEER_RATE "factor is tbd";
|
||||
CM_ SG_ 466 ACCEL_NET "net acceleration produced by the system, given ACCEL_CMD, road grade and other factors";
|
||||
CM_ SG_ 467 SET_SPEED "43 kph are shown as 28mph, so conversion isnt perfect";
|
||||
CM_ SG_ 467 LOW_SPEED_LOCKOUT "in low speed lockout, system would always disengage below 28mph";
|
||||
CM_ SG_ 560 BRAKE_PRESSED "another brake pressed?";
|
||||
CM_ SG_ 608 STEER_TORQUE_DRIVER "driver torque";
|
||||
CM_ SG_ 608 STEER_OVERRIDE "set when driver torque exceeds a certain value";
|
||||
CM_ SG_ 614 ANGLE "set to measured angle when ipas control isn't active";
|
||||
CM_ SG_ 643 COUNTER "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 BRAKE_STATUS "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 PRECOLLISION_ACTIVE "set 0.5s before any braking";
|
||||
CM_ SG_ 835 PERMIT_BRAKING "Original ACC has this going high when a car in front is detected. In openpilot and before the PERMIT_BRAKING name, this was "SET_ME_1" and is hardcoded to be high. Unsure if only informational or has an effect though existing usage in openpilot is to always set it to 1. Originally 'PMTBRKG' in the leaked toyota_2017_ref_pt.dbc file and name expansion speculated to be PerMiT BRaKinG.";
|
||||
CM_ SG_ 835 ACCEL_CMD_ALT "Copy of main ACCEL_CMD, but across 8 bits instead of 16 bits like ACCEL_CMD. Unsure if only informational or has an effect. Likely informational as existing openpilot sets this to 0 and no loss of functionality observed. Originally 'AT_RAW' in leaked toyota_2017_ref_pt.dbc file.";
|
||||
CM_ SG_ 921 UI_SET_SPEED "set speed shown in UI with user set unit";
|
||||
CM_ SG_ 951 BRAKE_LIGHTS_ACC "brake lights when ACC commands decel";
|
||||
CM_ SG_ 1042 SET_ME_1 "unclear what this is, but it's always 1 in drive traces";
|
||||
CM_ SG_ 1042 REPEATED_BEEPS "recommended for fcw and other important alerts";
|
||||
CM_ SG_ 1161 SPDVAL1 "Numbers 0-199 is displayed, 200-254 displays circle without number and 255 is for no limit.";
|
||||
CM_ SG_ 1161 SYNCID1 "counter from 1 to f at 1 Hz";
|
||||
CM_ SG_ 1161 SPDVAL2 "conditional speed value 70"
|
||||
CM_ SG_ 1162 SGNNUMP "1 if SPDVAL1 is set, otherwise 0";
|
||||
CM_ SG_ 1162 SYNCID2 "counter from 1 to f at 1 Hz";
|
||||
CM_ SG_ 1163 TSREQPD "always 1";
|
||||
CM_ SG_ 1163 TSRMSW "always 1";
|
||||
CM_ SG_ 1163 OTSGNNTM "always 3";
|
||||
CM_ SG_ 1163 NTLVLSPD "always 3";
|
||||
CM_ SG_ 1163 OVSPNTM "always 3";
|
||||
CM_ SG_ 1163 OVSPVALL "-5 at start then 2 after 2 seconds";
|
||||
CM_ SG_ 1163 OVSPVALM "-5 at start then 5 after 2 seconds";
|
||||
CM_ SG_ 1163 OVSPVALH "-5 at start then 10 after 2 seconds";
|
||||
CM_ SG_ 1163 TSRSPU "always 1";
|
||||
|
||||
VAL_ 466 CRUISE_STATE 8 "active" 7 "standstill" 1 "off";
|
||||
VAL_ 467 LOW_SPEED_LOCKOUT 2 "low speed locked" 1 "ok";
|
||||
VAL_ 614 STATE 3 "enabled" 1 "disabled";
|
||||
VAL_ 614 DIRECTION_CMD 3 "right" 2 "center" 1 "left";
|
||||
VAL_ 643 STATE 0 "normal" 1 "adaptive_cruise_control" 3 "emergency_braking";
|
||||
VAL_ 921 CRUISE_CONTROL_STATE 2 "disabled" 11 "hold" 10 "hold_waiting_user_cmd" 6 "enabled" 5 "faulted";
|
||||
VAL_ 1042 LDA_ALERT 3 "hold with continuous beep" 2 "LDA unavailable" 1 "hold" 0 "none";
|
||||
VAL_ 1042 BARRIERS 3 "both" 2 "right" 1 "left" 0 "none";
|
||||
VAL_ 1042 RIGHT_LINE 3 "orange" 2 "faded" 1 "solid" 0 "none";
|
||||
VAL_ 1042 LEFT_LINE 3 "orange" 2 "faded" 1 "solid" 0 "none";
|
||||
VAL_ 1553 UNITS 1 "km" 2 "miles";
|
||||
VAL_ 1556 TURN_SIGNALS 3 "none" 2 "right" 1 "left";
|
||||
VAL_ 1161 TSGN1 1 "speed sign" 0 "none";
|
||||
VAL_ 1161 TSGN2 1 "speed sign" 0 "none";
|
||||
VAL_ 1161 SPLSGN2 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none";
|
||||
VAL_ 1162 TSGN3 0 "none" 1 "speed sign" 2 "0 unlimited" 7 "unlimited" 16 "highway" 17 "no highway" 18 "motorway" 19 "no motorway" 20 "in city" 21 "outside city" 22 "pedestrian area" 23 "no pedestrian area" 65 "no overtaking left" 66 "no overtaking right" 67 "overtaking allowed again" 129 "no entry";
|
||||
VAL_ 1162 SPLSGN3 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none";
|
||||
|
||||
|
||||
CM_ "CHFFR_METRIC 37 STEER_ANGLE STEER_ANGLE 0.36 180";
|
||||
|
||||
CM_ "lexus_is_2018_pt.dbc starts here"
|
||||
|
||||
|
||||
|
||||
BO_ 550 BRAKE_MODULE: 8 XXX
|
||||
SG_ BRAKE_PRESSURE : 0|9@0+ (1,0) [0|511] "" XXX
|
||||
SG_ BRAKE_POSITION : 16|9@0+ (1,0) [0|511] "" XXX
|
||||
SG_ BRAKE_PRESSED : 37|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 581 GAS_PEDAL_ALT: 5 XXX
|
||||
SG_ GAS_PEDAL : 23|8@0+ (0.005,0) [0|1] "" XXX
|
||||
|
||||
BO_ 705 GAS_PEDAL: 8 XXX
|
||||
SG_ GAS_RELEASED : 3|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ GAS_PEDAL : 55|8@0+ (0.005,0) [0|1] "" XXX
|
||||
|
||||
BO_ 608 STEER_TORQUE_SENSOR: 8 XXX
|
||||
SG_ STEER_TORQUE_EPS : 47|16@0- (1.30,0) [-20000|20000] "" XXX
|
||||
SG_ STEER_TORQUE_DRIVER : 15|16@0- (1,0) [-32768|32767] "" XXX
|
||||
SG_ STEER_OVERRIDE : 0|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ STEER_ANGLE : 31|16@0- (0.0573,0) [-500|500] "" XXX
|
||||
|
||||
BO_ 610 EPS_STATUS: 5 EPS
|
||||
SG_ IPAS_STATE : 3|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ LKA_STATE : 31|7@0+ (1,0) [0|127] "" XXX
|
||||
SG_ TYPE : 24|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CHECKSUM : 39|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 956 GEAR_PACKET: 8 XXX
|
||||
SG_ GEAR : 13|6@0+ (1,0) [0|63] "" XXX
|
||||
|
||||
BO_ 1009 PCM_CRUISE_ALT: 8 XXX
|
||||
SG_ MAIN_ON : 13|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ CRUISE_STATE : 10|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_SPEED : 23|8@0+ (1,0) [0|255] "mph" XXX
|
||||
|
||||
BO_ 1599 LIGHT_STALK_ISH: 8 SCM
|
||||
SG_ AUTO_HIGH_BEAM : 19|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
CM_ SG_ 550 BRAKE_PRESSURE "seems prop to pedal force";
|
||||
CM_ SG_ 550 BRAKE_POSITION "seems proportional to pedal displacement, unclear the max value of 0x1c8";
|
||||
CM_ SG_ 610 TYPE "seems 1 on Corolla, 0 on all others";
|
||||
CM_ SG_ 1009 SET_SPEED "units seem to be whatever the car is set to";
|
||||
VAL_ 956 GEAR 0 "D" 1 "S" 8 "N" 16 "R" 32 "P";
|
||||
VAL_ 610 IPAS_STATE 5 "override" 3 "enabled" 1 "disabled";
|
||||
VAL_ 610 LKA_STATE 25 "temporary_fault" 9 "temporary_fault2" 5 "active" 1 "standby";
|
||||
@@ -0,0 +1,408 @@
|
||||
CM_ "AUTOGENERATED FILE, DO NOT EDIT"
|
||||
|
||||
|
||||
CM_ "Imported file _comma.dbc starts here"
|
||||
BO_ 359 STEERING_IPAS_COMMA: 8 IPAS
|
||||
SG_ STATE : 7|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ ANGLE : 3|12@0- (1.5,0) [-510|510] "deg" XXX
|
||||
SG_ SET_ME_X10 : 23|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ DIRECTION_CMD : 38|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X40 : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
CM BO_ STEERING_IPAS_COMMA "Copy of msg 614 so we can do angle control while the Park Assist ECU is connected (Panda spoofs 614 with 359 on connector J70). Note that addresses 0x266 and 0x167 are checksum-invariant";
|
||||
|
||||
BO_ 512 GAS_COMMAND: 6 EON
|
||||
SG_ GAS_COMMAND : 7|16@0+ (0.159375,-75.555) [0|1] "" INTERCEPTOR
|
||||
SG_ GAS_COMMAND2 : 23|16@0+ (0.159375,-151.111) [0|1] "" INTERCEPTOR
|
||||
SG_ ENABLE : 39|1@0+ (1,0) [0|1] "" INTERCEPTOR
|
||||
SG_ COUNTER_PEDAL : 35|4@0+ (1,0) [0|15] "" INTERCEPTOR
|
||||
SG_ CHECKSUM_PEDAL : 47|8@0+ (1,0) [0|255] "" INTERCEPTOR
|
||||
|
||||
BO_ 513 GAS_SENSOR: 6 INTERCEPTOR
|
||||
SG_ INTERCEPTOR_GAS : 7|16@0+ (0.159375,-75.555) [0|1] "" EON
|
||||
SG_ INTERCEPTOR_GAS2 : 23|16@0+ (0.159375,-151.111) [0|1] "" EON
|
||||
SG_ STATE : 39|4@0+ (1,0) [0|15] "" EON
|
||||
SG_ COUNTER_PEDAL : 35|4@0+ (1,0) [0|15] "" EON
|
||||
SG_ CHECKSUM_PEDAL : 47|8@0+ (1,0) [0|255] "" EON
|
||||
|
||||
VAL_ 513 STATE 5 "FAULT_TIMEOUT" 4 "FAULT_STARTUP" 3 "FAULT_SCE" 2 "FAULT_SEND" 1 "FAULT_BAD_CHECKSUM" 0 "NO_FAULT" ;
|
||||
|
||||
|
||||
CM_ "Imported file _toyota_2017.dbc starts here"
|
||||
VERSION ""
|
||||
|
||||
|
||||
NS_ :
|
||||
NS_DESC_
|
||||
CM_
|
||||
BA_DEF_
|
||||
BA_
|
||||
VAL_
|
||||
CAT_DEF_
|
||||
CAT_
|
||||
FILTER
|
||||
BA_DEF_DEF_
|
||||
EV_DATA_
|
||||
ENVVAR_DATA_
|
||||
SGTYPE_
|
||||
SGTYPE_VAL_
|
||||
BA_DEF_SGTYPE_
|
||||
BA_SGTYPE_
|
||||
SIG_TYPE_REF_
|
||||
VAL_TABLE_
|
||||
SIG_GROUP_
|
||||
SIG_VALTYPE_
|
||||
SIGTYPE_VALTYPE_
|
||||
BO_TX_BU_
|
||||
BA_DEF_REL_
|
||||
BA_REL_
|
||||
BA_DEF_DEF_REL_
|
||||
BU_SG_REL_
|
||||
BU_EV_REL_
|
||||
BU_BO_REL_
|
||||
SG_MUL_VAL_
|
||||
|
||||
BS_:
|
||||
|
||||
BU_: XXX DSU HCU EPS IPAS CGW
|
||||
|
||||
BO_ 36 KINEMATICS: 8 XXX
|
||||
SG_ ACCEL_Y : 33|10@0+ (0.03589,-18.375) [0|65535] "m/s^2" XXX
|
||||
SG_ YAW_RATE : 1|10@0+ (0.244,-125) [0|65535] "deg/sec" XXX
|
||||
SG_ STEERING_TORQUE : 17|10@0+ (1,-512) [0|65535] "" XXX
|
||||
|
||||
BO_ 37 STEER_ANGLE_SENSOR: 8 XXX
|
||||
SG_ STEER_ANGLE : 3|12@0- (1.5,0) [-500|500] "deg" XXX
|
||||
SG_ STEER_FRACTION : 39|4@0- (0.1,0) [-0.7|0.7] "deg" XXX
|
||||
SG_ STEER_RATE : 35|12@0- (1,0) [-2000|2000] "deg/s" XXX
|
||||
|
||||
BO_ 166 BRAKE: 8 XXX
|
||||
SG_ BRAKE_AMOUNT : 7|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ BRAKE_PEDAL : 23|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 170 WHEEL_SPEEDS: 8 XXX
|
||||
SG_ WHEEL_SPEED_FR : 7|16@0+ (0.01,-67.67) [0|250] "kph" XXX
|
||||
SG_ WHEEL_SPEED_FL : 23|16@0+ (0.01,-67.67) [0|250] "kph" XXX
|
||||
SG_ WHEEL_SPEED_RR : 39|16@0+ (0.01,-67.67) [0|250] "kph" XXX
|
||||
SG_ WHEEL_SPEED_RL : 55|16@0+ (0.01,-67.67) [0|250] "kph" XXX
|
||||
|
||||
BO_ 180 SPEED: 8 XXX
|
||||
SG_ ENCODER : 39|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SPEED : 47|16@0+ (0.01,0) [0|250] "kph" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 353 DSU_SPEED: 8 XXX
|
||||
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX
|
||||
|
||||
BO_ 452 ENGINE_RPM: 8 CGW
|
||||
SG_ RPM : 7|16@0- (0.78125,0) [0|0] "rpm" SCS
|
||||
|
||||
BO_ 466 PCM_CRUISE: 8 XXX
|
||||
SG_ GAS_RELEASED : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CRUISE_ACTIVE : 5|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ STANDSTILL_ON : 12|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ ACCEL_NET : 23|16@0- (0.001,0) [-20|20] "m/s2" XXX
|
||||
SG_ CRUISE_STATE : 55|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ CANCEL_REQ : 49|1@1+ (1,0) [0|1] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 467 PCM_CRUISE_2: 8 XXX
|
||||
SG_ MAIN_ON : 15|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ LOW_SPEED_LOCKOUT : 14|2@0+ (1,0) [0|3] "kph" XXX
|
||||
SG_ SET_SPEED : 23|8@0+ (1,0) [0|255] "kph" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 552 ACCELEROMETER: 8 XXX
|
||||
SG_ ACCEL_Z : 22|15@0- (1,0) [0|32767] "" XXX
|
||||
SG_ ACCEL_X : 6|15@0- (0.001,0) [-20|20] "m/s2" XXX
|
||||
|
||||
BO_ 560 BRAKE_MODULE2: 7 XXX
|
||||
SG_ BRAKE_PRESSED : 26|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 614 STEERING_IPAS: 8 IPAS
|
||||
SG_ STATE : 7|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ ANGLE : 3|12@0- (1.5,0) [-510|510] "deg" XXX
|
||||
SG_ SET_ME_X10 : 23|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ DIRECTION_CMD : 38|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X40 : 47|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00_1 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 643 PRE_COLLISION: 7 DSU
|
||||
SG_ COUNTER : 7|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 15|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ FORCE : 23|16@0- (2,0) [0|255] "N" XXX
|
||||
SG_ SET_ME_X002 : 33|8@0+ (1,0) [0|3] "" XXX
|
||||
SG_ BRAKE_STATUS : 39|3@0+ (1,0) [0|255] "" XXX
|
||||
SG_ STATE : 36|3@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X003 : 40|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ PRECOLLISION_ACTIVE : 41|1@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 740 STEERING_LKA: 5 XXX
|
||||
SG_ LKA_STATE : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ STEER_REQUEST : 0|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ COUNTER : 6|6@0+ (1,0) [0|63] "" XXX
|
||||
SG_ SET_ME_1 : 7|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ STEER_TORQUE_CMD : 15|16@0- (1,0) [0|65535] "" XXX
|
||||
SG_ CHECKSUM : 39|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 742 LEAD_INFO: 8 DSU
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" HCU
|
||||
SG_ LEAD_REL_SPEED : 23|12@0- (0.025,0) [-100|100] "m/s" HCU
|
||||
SG_ LEAD_LONG_DIST : 7|13@0+ (0.05,0) [0|300] "m" HCU
|
||||
|
||||
BO_ 835 ACC_CONTROL: 8 DSU
|
||||
SG_ ACCEL_CMD : 7|16@0- (0.001,0) [-20|20] "m/s2" HCU
|
||||
SG_ SET_ME_X01 : 23|2@0+ (1,0) [0|3] "" HCU
|
||||
SG_ DISTANCE : 20|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ MINI_CAR : 21|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X3 : 19|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ SET_ME_1 : 30|1@0+ (1,0) [0|1] "" HCU
|
||||
SG_ RELEASE_STANDSTILL : 31|1@0+ (1,0) [0|1] "" HCU
|
||||
SG_ CANCEL_REQ : 24|1@0+ (1,0) [0|1] "" HCU
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 836 PRE_COLLISION_2: 8 DSU
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 869 DSU_CRUISE : 7 DSU
|
||||
SG_ RES_BTN : 3|1@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SET_BTN : 2|1@0+ (1,0) [0|0] "" XXX
|
||||
SG_ CANCEL_BTN : 1|1@0+ (1,0) [0|0] "" XXX
|
||||
SG_ MAIN_ON : 0|1@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SET_SPEED : 15|8@0+ (1,0) [0|0] "km/h" XXX
|
||||
SG_ CRUISE_REQUEST : 31|8@0+ (100,-12800) [0|0] "N" XXX
|
||||
SG_ LEAD_DISTANCE : 39|8@0+ (1,0) [0|0] "m" XXX
|
||||
|
||||
BO_ 921 PCM_CRUISE_SM: 8 XXX
|
||||
SG_ MAIN_ON : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CRUISE_CONTROL_STATE : 11|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ DISTANCE_LINES : 14|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ UI_SET_SPEED : 31|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 951 ESP_CONTROL: 8 ESP
|
||||
SG_ TC_DISABLED : 13|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
|
||||
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1041 ACC_HUD: 8 DSU
|
||||
SG_ FCW : 4|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X20 : 15|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X10 : 39|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X80 : 55|8@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1042 LKAS_HUD: 8 XXX
|
||||
SG_ BARRIERS : 1|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ RIGHT_LINE : 3|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ LEFT_LINE : 5|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X01 : 7|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ SET_ME_X01_2 : 11|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ LDA_ALERT : 9|2@0+ (1,0) [0|3] "" XXX
|
||||
SG_ TWO_BEEPS : 12|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ ADJUSTING_CAMERA : 13|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ LDA_MALFUNCTION : 15|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ REPEATED_BEEPS : 32|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X0C : 23|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X2C : 47|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X38 : 55|8@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_ME_X02 : 63|8@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1043 TIME : 8 CGW
|
||||
SG_ YEAR : 7|8@0+ (1,0) [0|0] "year" XXX
|
||||
SG_ MONTH : 15|8@0+ (1,0) [0|0] "month" XXX
|
||||
SG_ DAY : 23|8@0+ (1,0) [0|0] "day" XXX
|
||||
SG_ HOUR : 31|8@0+ (1,0) [0|0] "hour" XXX
|
||||
SG_ MINUTE : 39|8@0+ (1,0) [0|0] "minute" XXX
|
||||
SG_ GMT_DIFF : 55|1@0+ (1,0) [0|0] "" XXX
|
||||
SG_ GMTDIFF_HOURS : 54|4@0+ (1,0) [0|0] "hours" XXX
|
||||
SG_ GMTDIFF_MINUTES : 50|6@0+ (1,0) [0|0] "minutes" XXX
|
||||
SG_ SUMMER : 60|1@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1408 VIN_PART_1: 8 CGW
|
||||
SG_ VIN_1 : 7|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ VIN_2 : 15|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ VIN_3 : 23|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ VIN_4 : 31|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ VIN_5 : 39|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ VIN_6 : 47|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ VIN_7 : 55|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ VIN_8 : 63|8@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1409 VIN_PART_2: 8 CGW
|
||||
SG_ VIN_9 : 7|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ VIN_10 : 15|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ VIN_11 : 23|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ VIN_12 : 31|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ VIN_13 : 39|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ VIN_14 : 47|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ VIN_15 : 55|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ VIN_16 : 63|8@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1410 VIN_PART_3: 8 CGW
|
||||
SG_ VIN_17 : 7|8@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1553 UI_SETTING: 8 XXX
|
||||
SG_ UNITS : 26|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 1556 STEERING_LEVERS: 8 XXX
|
||||
SG_ TURN_SIGNALS : 29|2@0+ (1,0) [0|3] "" XXX
|
||||
|
||||
BO_ 1568 SEATS_DOORS: 8 XXX
|
||||
SG_ SEATBELT_DRIVER_UNLATCHED : 62|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_FL : 45|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_RL : 42|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_RR : 43|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ DOOR_OPEN_FR : 44|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1570 LIGHT_STALK: 8 SCM
|
||||
SG_ AUTO_HIGH_BEAM : 37|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 1161 RSA1: 8 FCM
|
||||
SG_ TSGN1 : 7|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNGRY1 : 12|3@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNHLT1 : 9|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SPDVAL1 : 23|8@0+ (1,0) [0|0] "kph" XXX
|
||||
SG_ SPLSGN1 : 31|4@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SPLSGN2 : 27|4@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGN2 : 39|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNGRY2 : 44|3@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNHLT2 : 41|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SPDVAL2 : 55|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ BZRRQ_P : 63|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ BZRRQ_A : 61|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SYNCID1 : 59|4@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1162 RSA2: 8 FCM
|
||||
SG_ TSGN3 : 7|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNGRY3 : 12|3@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNHLT3 : 9|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SPLSGN3 : 31|4@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SPLSGN4 : 27|4@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGN4 : 39|8@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNGRY4 : 44|3@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSGNHLT4 : 41|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ DPSGNREQ : 54|1@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SGNNUMP : 53|3@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SGNNUMA : 50|3@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SPDUNT : 63|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSRWMSG : 61|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ SYNCID2 : 59|4@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
BO_ 1163 RSA3: 8 FCM
|
||||
SG_ TSREQPD : 7|1@0+ (1,0) [0|0] "" XXX
|
||||
SG_ TSRMSW : 6|1@0+ (1,0) [0|0] "" XXX
|
||||
SG_ OTSGNNTM : 5|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ NTLVLSPD : 3|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ OVSPNTM : 1|2@0+ (1,0) [0|0] "" XXX
|
||||
SG_ OVSPVALL : 11|4@0+ (1,-5) [0|0] "" XXX
|
||||
SG_ OVSPVALM : 19|4@0+ (1,-5) [0|0] "" XXX
|
||||
SG_ OVSPVALH : 27|4@0+ (1,-5) [0|0] "" XXX
|
||||
SG_ TSRSPU : 33|2@0+ (1,0) [0|0] "" XXX
|
||||
|
||||
CM_ SG_ 36 ACCEL_Y "unit is tbd";
|
||||
CM_ SG_ 36 YAW_RATE "verify";
|
||||
CM_ SG_ 36 STEERING_TORQUE "does not seem the steer torque, tbd";
|
||||
CM_ SG_ 37 STEER_FRACTION "1/15th of the signal STEER_ANGLE, which is 1.5 deg; note that 0x8 is never set";
|
||||
CM_ SG_ 37 STEER_RATE "factor is tbd";
|
||||
CM_ SG_ 466 ACCEL_NET "net acceleration produced by the system, given ACCEL_CMD, road grade and other factors";
|
||||
CM_ SG_ 467 SET_SPEED "43 kph are shown as 28mph, so conversion isnt perfect";
|
||||
CM_ SG_ 467 LOW_SPEED_LOCKOUT "in low speed lockout, system would always disengage below 28mph";
|
||||
CM_ SG_ 560 BRAKE_PRESSED "another brake pressed?";
|
||||
CM_ SG_ 608 STEER_TORQUE_DRIVER "driver torque";
|
||||
CM_ SG_ 608 STEER_OVERRIDE "set when driver torque exceeds a certain value";
|
||||
CM_ SG_ 614 ANGLE "set to measured angle when ipas control isn't active";
|
||||
CM_ SG_ 643 COUNTER "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 BRAKE_STATUS "only used on cars that use this msg for cruise control";
|
||||
CM_ SG_ 643 PRECOLLISION_ACTIVE "set 0.5s before any braking";
|
||||
CM_ SG_ 921 UI_SET_SPEED "set speed shown in UI with user set unit";
|
||||
CM_ SG_ 951 BRAKE_LIGHTS_ACC "brake lights when ACC commands decel";
|
||||
CM_ SG_ 1042 SET_ME_1 "unclear what this is, but it's always 1 in drive traces";
|
||||
CM_ SG_ 1042 REPEATED_BEEPS "recommended for fcw and other important alerts";
|
||||
CM_ SG_ 1161 SPDVAL1 "Numbers 0-199 is displayed, 200-254 displays circle without number and 255 is for no limit.";
|
||||
CM_ SG_ 1161 SYNCID1 "counter from 1 to f at 1 Hz";
|
||||
CM_ SG_ 1161 SPDVAL2 "conditional speed value 70"
|
||||
CM_ SG_ 1162 SGNNUMP "1 if SPDVAL1 is set, otherwise 0";
|
||||
CM_ SG_ 1162 SYNCID2 "counter from 1 to f at 1 Hz";
|
||||
CM_ SG_ 1163 TSREQPD "always 1";
|
||||
CM_ SG_ 1163 TSRMSW "always 1";
|
||||
CM_ SG_ 1163 OTSGNNTM "always 3";
|
||||
CM_ SG_ 1163 NTLVLSPD "always 3";
|
||||
CM_ SG_ 1163 OVSPNTM "always 3";
|
||||
CM_ SG_ 1163 OVSPVALL "-5 at start then 2 after 2 seconds";
|
||||
CM_ SG_ 1163 OVSPVALM "-5 at start then 5 after 2 seconds";
|
||||
CM_ SG_ 1163 OVSPVALH "-5 at start then 10 after 2 seconds";
|
||||
CM_ SG_ 1163 TSRSPU "always 1";
|
||||
|
||||
VAL_ 466 CRUISE_STATE 8 "active" 7 "standstill" 1 "off";
|
||||
VAL_ 467 LOW_SPEED_LOCKOUT 2 "low speed locked" 1 "ok";
|
||||
VAL_ 614 STATE 3 "enabled" 1 "disabled";
|
||||
VAL_ 614 DIRECTION_CMD 3 "right" 2 "center" 1 "left";
|
||||
VAL_ 643 STATE 0 "normal" 1 "adaptive_cruise_control" 3 "emergency_braking";
|
||||
VAL_ 921 CRUISE_CONTROL_STATE 2 "disabled" 11 "hold" 10 "hold_waiting_user_cmd" 6 "enabled" 5 "faulted";
|
||||
VAL_ 1042 LDA_ALERT 3 "hold with continuous beep" 2 "LDA unavailable" 1 "hold" 0 "none";
|
||||
VAL_ 1042 BARRIERS 3 "both" 2 "right" 1 "left" 0 "none";
|
||||
VAL_ 1042 RIGHT_LINE 3 "orange" 2 "faded" 1 "solid" 0 "none";
|
||||
VAL_ 1042 LEFT_LINE 3 "orange" 2 "faded" 1 "solid" 0 "none";
|
||||
VAL_ 1553 UNITS 1 "km" 2 "miles";
|
||||
VAL_ 1556 TURN_SIGNALS 3 "none" 2 "right" 1 "left";
|
||||
VAL_ 1161 TSGN1 1 "speed sign" 0 "none";
|
||||
VAL_ 1161 TSGN2 1 "speed sign" 0 "none";
|
||||
VAL_ 1161 SPLSGN2 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none";
|
||||
VAL_ 1162 TSGN3 0 "none" 1 "speed sign" 2 "0 unlimited" 7 "unlimited" 16 "highway" 17 "no highway" 18 "motorway" 19 "no motorway" 20 "in city" 21 "outside city" 22 "pedestrian area" 23 "no pedestrian area" 65 "no overtaking left" 66 "no overtaking right" 67 "overtaking allowed again" 129 "no entry";
|
||||
VAL_ 1162 SPLSGN3 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none";
|
||||
|
||||
|
||||
CM_ "CHFFR_METRIC 37 STEER_ANGLE STEER_ANGLE 0.36 180";
|
||||
|
||||
CM_ "lexus_nxt_2015_pt.dbc starts here"
|
||||
|
||||
|
||||
|
||||
BO_ 550 BRAKE_MODULE: 8 XXX
|
||||
SG_ BRAKE_PRESSURE : 0|9@0+ (1,0) [0|511] "" XXX
|
||||
SG_ BRAKE_POSITION : 16|9@0+ (1,0) [0|511] "" XXX
|
||||
SG_ BRAKE_PRESSED : 37|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
BO_ 581 GAS_PEDAL_ALT: 5 XXX
|
||||
SG_ GAS_PEDAL : 23|8@0+ (0.005,0) [0|1] "" XXX
|
||||
|
||||
BO_ 705 GAS_PEDAL: 8 XXX
|
||||
SG_ GAS_RELEASED : 3|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ GAS_PEDAL : 55|8@0+ (0.005,0) [0|1] "" XXX
|
||||
|
||||
BO_ 608 STEER_TORQUE_SENSOR: 8 XXX
|
||||
SG_ STEER_TORQUE_EPS : 47|16@0- (1.0,0) [-20000|20000] "" XXX
|
||||
SG_ STEER_TORQUE_DRIVER : 15|16@0- (1,0) [-32768|32767] "" XXX
|
||||
SG_ STEER_OVERRIDE : 0|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ STEER_ANGLE : 31|16@0- (0.0573,0) [-500|500] "" XXX
|
||||
|
||||
BO_ 610 EPS_STATUS: 5 EPS
|
||||
SG_ IPAS_STATE : 3|4@0+ (1,0) [0|15] "" XXX
|
||||
SG_ LKA_STATE : 31|7@0+ (1,0) [0|127] "" XXX
|
||||
SG_ TYPE : 24|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ CHECKSUM : 39|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 956 GEAR_PACKET: 8 XXX
|
||||
SG_ GEAR : 13|6@0+ (1,0) [0|63] "" XXX
|
||||
|
||||
BO_ 1009 PCM_CRUISE_ALT: 8 XXX
|
||||
SG_ MAIN_ON : 13|1@0+ (1,0) [0|3] "" XXX
|
||||
SG_ CRUISE_STATE : 10|1@0+ (1,0) [0|1] "" XXX
|
||||
SG_ SET_SPEED : 23|8@0+ (1,0) [0|255] "mph" XXX
|
||||
|
||||
BO_ 1599 LIGHT_STALK_ISH: 8 SCM
|
||||
SG_ AUTO_HIGH_BEAM : 19|1@0+ (1,0) [0|1] "" XXX
|
||||
|
||||
CM_ SG_ 550 BRAKE_PRESSURE "seems prop to pedal force";
|
||||
CM_ SG_ 550 BRAKE_POSITION "seems proportional to pedal displacement, unclear the max value of 0x1c8";
|
||||
CM_ SG_ 610 TYPE "seems 1 on Corolla, 0 on all others";
|
||||
CM_ SG_ 1009 SET_SPEED "units seem to be whatever the car is set to";
|
||||
VAL_ 956 GEAR 0 "D" 1 "S" 8 "N" 16 "R" 32 "P";
|
||||
VAL_ 610 IPAS_STATE 5 "override" 3 "enabled" 1 "disabled";
|
||||
VAL_ 610 LKA_STATE 25 "temporary_fault" 9 "temporary_fault2" 5 "active" 1 "standby";
|
||||
@@ -132,6 +132,9 @@ BO_ 614 STEERING_IPAS: 8 IPAS
|
||||
SG_ SET_ME_X00_1 : 55|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
BO_ 35 SECONDARY_STEER_ANGLE: 8 XXX
|
||||
SG_ ZORRO_STEER : 7|24@0- (0.004901594652,0) [-500|500] "" XXX
|
||||
|
||||
BO_ 643 PRE_COLLISION: 7 DSU
|
||||
SG_ COUNTER : 7|8@0+ (1,0) [0|255] "" XXX
|
||||
SG_ SET_ME_X00 : 15|8@0+ (1,0) [0|255] "" XXX
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -23,7 +23,7 @@ void detect_board_type(void) {
|
||||
// SPI lines floating: white (TODO: is this reliable? Not really, we have to enable ESP/GPS to be able to detect this on the UART)
|
||||
set_gpio_output(GPIOC, 14, 1);
|
||||
set_gpio_output(GPIOC, 5, 1);
|
||||
if(!detect_with_pull(GPIOB, 1, PULL_UP)){
|
||||
if(!detect_with_pull(GPIOB, 1, PULL_UP) && detect_with_pull(GPIOB, 15, PULL_UP)){
|
||||
hw_type = HW_TYPE_DOS;
|
||||
current_board = &board_dos;
|
||||
} else if((detect_with_pull(GPIOA, 4, PULL_DOWN)) || (detect_with_pull(GPIOA, 5, PULL_DOWN)) || (detect_with_pull(GPIOA, 6, PULL_DOWN)) || (detect_with_pull(GPIOA, 7, PULL_DOWN))){
|
||||
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
export LD_LIBRARY_PATH=/data/data/com.termux/files/usr/lib
|
||||
export HOME=/data/data/com.termux/files/home
|
||||
export PATH=/usr/local/bin:/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/sbin:/data/data/com.termux/files/usr/bin/applets:/bin:/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin:/data/data/com.termux/files/usr/bin/git
|
||||
export PYTHONPATH=/data/openpilot
|
||||
echo -n 1 > /data/params/d/dp_is_updating
|
||||
if [ $1 -eq 1 ]; then
|
||||
printf %s "1" > /data/params/d/dp_atl
|
||||
printf %s "0" > /data/params/d/dp_uploader
|
||||
fi
|
||||
if [ $1 -eq 0 ]; then
|
||||
printf %s "0" > /data/params/d/dp_atl
|
||||
cd /data/openpilot || exit
|
||||
git reset --hard @{u}
|
||||
git clean -xdf
|
||||
fi
|
||||
reboot
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
if [ $1 -eq 1 ]; then
|
||||
printf %s "1" > /data/params/d/dp_disable_relay
|
||||
fi
|
||||
if [ $1 -eq 0 ]; then
|
||||
printf %s "0" > /data/params/d/dp_disable_relay
|
||||
fi
|
||||
|
||||
rm -rf /data/openpilot/selfdrive/boardd/boardd && reboot
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
export LD_LIBRARY_PATH=/data/data/com.termux/files/usr/lib
|
||||
export HOME=/data/data/com.termux/files/home
|
||||
export PATH=/usr/local/bin:/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/sbin:/data/data/com.termux/files/usr/bin/applets:/bin:/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin:/data/data/com.termux/files/usr/bin/git
|
||||
printf %s "1" > /data/params/d/DragonUpdating
|
||||
cd /data/openpilot || exit
|
||||
#git reset --hard @{u}
|
||||
git clean -xdf
|
||||
rm -fr /tmp/scons_cache/
|
||||
find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete
|
||||
scons --clean
|
||||
reboot
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
export LD_LIBRARY_PATH=/data/data/com.termux/files/usr/lib
|
||||
export HOME=/data/data/com.termux/files/home
|
||||
export PATH=/usr/local/bin:/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/sbin:/data/data/com.termux/files/usr/bin/applets:/bin:/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin:/data/data/com.termux/files/usr/bin/git
|
||||
export PYTHONPATH=/data/openpilot
|
||||
echo -n 1 > /data/params/d/dp_is_updating
|
||||
rm /data/openpilot/panda/board/obj/panda.bin
|
||||
cd /data/openpilot && git fetch --all && git reset --hard @{u} && git clean -xdf && scons --clean && reboot
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
export LD_LIBRARY_PATH=/data/data/com.termux/files/usr/lib
|
||||
export HOME=/data/data/com.termux/files/home
|
||||
export PATH=/usr/local/bin:/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/sbin:/data/data/com.termux/files/usr/bin/applets:/bin:/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin:/data/data/com.termux/files/usr/bin/python
|
||||
export PYTHONPATH=/data/openpilot
|
||||
printf %s "1" > /data/params/d/DragonUpdating
|
||||
rm /data/openpilot/panda/board/obj/panda.bin
|
||||
cd /data/openpilot/panda || exit ; pkill -f boardd ; python -c "from panda import Panda; Panda().flash()" && reboot
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 86 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 86 KiB |
@@ -0,0 +1,504 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-07-14 16:46+1000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:146
|
||||
msgid "openpilot Unavailable"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:153 selfdrive/controls/lib/events.py:160
|
||||
msgid "TAKE CONTROL IMMEDIATELY"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:180 selfdrive/controls/lib/events.py:330
|
||||
#: selfdrive/controls/lib/events.py:356 selfdrive/controls/lib/events.py:420
|
||||
#: selfdrive/controls/lib/events.py:472 selfdrive/controls/lib/events.py:524
|
||||
#: selfdrive/controls/lib/events.py:534 selfdrive/controls/lib/events.py:543
|
||||
msgid "TAKE CONTROL"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:181
|
||||
msgid "Steer Unavailable Below"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:190
|
||||
msgid "Drive Above"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:189
|
||||
msgid "Calibration in Progress:"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:197
|
||||
msgid "Poor GPS reception"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:198
|
||||
msgid "If sky is visible, contact support"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:198
|
||||
msgid "Check GPS antenna placement"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:203
|
||||
msgid "Cruise Mode Disabled"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:205
|
||||
msgid "Main Switch Off"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:215
|
||||
msgid "DEBUG ALERT"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:223
|
||||
msgid "Be ready to take over at any time"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:224 selfdrive/controls/lib/events.py:240
|
||||
#: selfdrive/controls/lib/events.py:248 selfdrive/controls/lib/events.py:256
|
||||
msgid "Always keep hands on wheel and eyes on road"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:231
|
||||
msgid "WARNING: White panda is deprecated"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:232 selfdrive/controls/lib/events.py:272
|
||||
msgid "Upgrade to comma two or black panda"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:239
|
||||
msgid "WARNING: This branch is not tested"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:247
|
||||
msgid "Dashcam mode"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:255
|
||||
msgid "Dashcam mode for unsupported car"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:263
|
||||
msgid "Unsupported Giraffe Configuration"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:264
|
||||
msgid "Visit comma.ai/tg"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:271
|
||||
msgid "White Panda Is No Longer Supported"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:275
|
||||
msgid "White panda is no longer supported"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:280
|
||||
msgid "Stock LKAS is turned on"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:281
|
||||
msgid "Turn off stock LKAS to engage"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:290
|
||||
msgid "Community Feature Detected"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:291
|
||||
msgid "Enable Community Features in Developer Settings"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:298
|
||||
msgid "Dashcam Mode"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:299
|
||||
msgid "Car Unrecognized"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:306 selfdrive/controls/lib/events.py:314
|
||||
#: selfdrive/controls/lib/events.py:322
|
||||
msgid "BRAKE!"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:307
|
||||
msgid "Stock AEB: Risk of Collision"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:315
|
||||
msgid "Stock FCW: Risk of Collision"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:323
|
||||
msgid "Risk of Collision"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:331
|
||||
msgid "Lane Departure Detected"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:340
|
||||
msgid "openpilot will not brake while gas pressed"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:348
|
||||
msgid "Vehicle Parameter Identification Failed"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:357 selfdrive/controls/lib/events.py:525
|
||||
#: selfdrive/controls/lib/events.py:528
|
||||
msgid "Steering Temporarily Unavailable"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:364
|
||||
msgid "KEEP EYES ON ROAD: Driver Distracted"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:372
|
||||
msgid "KEEP EYES ON ROAD"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:373
|
||||
msgid "Driver Appears Distracted"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:380 selfdrive/controls/lib/events.py:404
|
||||
msgid "DISENGAGE IMMEDIATELY"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:381
|
||||
msgid "Driver Was Distracted"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:388
|
||||
msgid "TOUCH STEERING WHEEL: No Face Detected"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:396
|
||||
msgid "TOUCH STEERING WHEEL"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:397
|
||||
msgid "Driver Is Unresponsive"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:405
|
||||
msgid "Driver Was Unresponsive"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:412
|
||||
msgid "CHECK DRIVER FACE VISIBILITY"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:413
|
||||
msgid "Driver Monitor Model Output Uncertain"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:421
|
||||
msgid "Resume Driving Manually"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:428
|
||||
msgid "STOPPED"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:429
|
||||
msgid "Press Resume to Move"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:440
|
||||
msgid "Steer Left to Start Lane Change"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:441 selfdrive/controls/lib/events.py:449
|
||||
#: selfdrive/controls/lib/events.py:457 selfdrive/controls/lib/events.py:465
|
||||
#: selfdrive/controls/lib/events.py:793 selfdrive/controls/lib/events.py:801
|
||||
#: selfdrive/controls/lib/events.py:809
|
||||
msgid "Monitor Other Vehicles"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:448
|
||||
msgid "Steer Right to Start Lane Change"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:456
|
||||
msgid "Car Detected in Blindspot"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:464 selfdrive/controls/lib/events.py:808
|
||||
msgid "Changing Lane"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:473
|
||||
msgid "Turn Exceeds Steering Limit"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:498
|
||||
msgid "Brake Hold Active"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:503
|
||||
msgid "Park Brake Engaged"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:508
|
||||
msgid "Pedal Pressed During Attempt"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:519
|
||||
msgid "Enable Adaptive Cruise"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:535 selfdrive/controls/lib/events.py:538
|
||||
msgid "Vision Model Output Uncertain"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:544
|
||||
msgid "Attempting Refocus: Camera Focus Invalid"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:550
|
||||
msgid "Out of Storage Space"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:555
|
||||
msgid "Speed Too Low"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:560 selfdrive/controls/lib/events.py:564
|
||||
msgid "NEOS Update Required"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:561
|
||||
msgid "Please Wait for Update"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:569 selfdrive/controls/lib/events.py:573
|
||||
msgid "No Data from Device Sensors"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:570 selfdrive/controls/lib/events.py:583
|
||||
#: selfdrive/controls/lib/events.py:665
|
||||
msgid "Reboot your Device"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:582 selfdrive/controls/lib/events.py:586
|
||||
msgid "Speaker not found"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:590
|
||||
msgid "Distraction Level Too High"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:594
|
||||
msgid "System Overheated"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:595
|
||||
msgid "System overheated"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:599 selfdrive/controls/lib/events.py:600
|
||||
msgid "Gear not D"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:604
|
||||
msgid "Calibration Invalid: Reposition Device and Recalibrate"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:605
|
||||
msgid "Calibration Invalid: Reposition Device & Recalibrate"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:609 selfdrive/controls/lib/events.py:611
|
||||
msgid "Calibration in Progress"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:615
|
||||
msgid "Door Open"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:616
|
||||
msgid "Door open"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:620
|
||||
msgid "Seatbelt Unlatched"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:621
|
||||
msgid "Seatbelt unlatched"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:625 selfdrive/controls/lib/events.py:626
|
||||
msgid "ESP Off"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:630 selfdrive/controls/lib/events.py:631
|
||||
msgid "Low Battery"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:635 selfdrive/controls/lib/events.py:636
|
||||
msgid "Communication Issue between Processes"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:641 selfdrive/controls/lib/events.py:642
|
||||
msgid "Radar Communication Issue"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:647 selfdrive/controls/lib/events.py:648
|
||||
#: selfdrive/controls/lib/events.py:652 selfdrive/controls/lib/events.py:653
|
||||
msgid "Radar Error: Restart the Car"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:657 selfdrive/controls/lib/events.py:658
|
||||
msgid "Driving model lagging"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:662 selfdrive/controls/lib/events.py:668
|
||||
msgid "Low Memory: Reboot Your Device"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:664
|
||||
msgid "RAM Critically Low"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:673 selfdrive/controls/lib/events.py:674
|
||||
msgid "Controls Failed"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:678
|
||||
msgid "Controls Mismatch"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:682 selfdrive/controls/lib/events.py:684
|
||||
#: selfdrive/controls/lib/events.py:688
|
||||
msgid "CAN Error: Check Connections"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:692 selfdrive/controls/lib/events.py:698
|
||||
msgid "LKAS Fault: Restart the Car"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:694
|
||||
msgid "LKAS Fault: Restart the car to engage"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:702 selfdrive/controls/lib/events.py:708
|
||||
#: selfdrive/controls/lib/events.py:786
|
||||
msgid "Cruise Fault: Restart the Car"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:704 selfdrive/controls/lib/events.py:782
|
||||
msgid "Cruise Fault: Restart the car to engage"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:712
|
||||
msgid "Gas Fault: Restart the Car"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:713
|
||||
msgid "Gas Error: Restart the Car"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:717 selfdrive/controls/lib/events.py:718
|
||||
msgid "Reverse Gear"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:722
|
||||
msgid "Cruise Is Off"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:726 selfdrive/controls/lib/events.py:727
|
||||
msgid "Planner Solution Error"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:731 selfdrive/controls/lib/events.py:733
|
||||
#: selfdrive/controls/lib/events.py:737
|
||||
msgid "Harness Malfunction"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:734
|
||||
msgid "Please Check Hardware"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:742 selfdrive/controls/lib/events.py:751
|
||||
msgid "openpilot Canceled"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:743
|
||||
msgid "No close lead car"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:746
|
||||
msgid "No Close Lead Car"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:752
|
||||
msgid "Speed too low"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:759 selfdrive/controls/lib/events.py:764
|
||||
msgid "Speed Too High"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:760
|
||||
msgid "Slow down to resume operation"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:765
|
||||
msgid "Slow down to engage"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:772
|
||||
msgid "Please connect to Internet"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:773
|
||||
msgid "An Update Check Is Required to Engage"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:776
|
||||
msgid "Please Connect to Internet"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:792
|
||||
msgid "Left ALC will start in 3s"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:800
|
||||
msgid "Right ALC will start in 3s"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:816
|
||||
msgid "STEERING REQUIRED: Lane Keeping OFF"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:824
|
||||
msgid "STEERING REQUIRED: Blinkers ON"
|
||||
msgstr ""
|
||||
|
||||
#: selfdrive/controls/lib/events.py:832 selfdrive/controls/lib/events.py:837
|
||||
msgid "Lead Car Is Moving"
|
||||
msgstr ""
|
||||
Binary file not shown.
@@ -0,0 +1,503 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-07-14 16:46+1000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: nikkurie <@nikkurie>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: ja-JP\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:146
|
||||
msgid "openpilot Unavailable"
|
||||
msgstr "オープンパイロットは利用できません"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:153 selfdrive/controls/lib/events.py:160
|
||||
msgid "TAKE CONTROL IMMEDIATELY"
|
||||
msgstr "すぐにハンドルを持って"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:180 selfdrive/controls/lib/events.py:330
|
||||
#: selfdrive/controls/lib/events.py:356 selfdrive/controls/lib/events.py:420
|
||||
#: selfdrive/controls/lib/events.py:472 selfdrive/controls/lib/events.py:524
|
||||
#: selfdrive/controls/lib/events.py:534 selfdrive/controls/lib/events.py:543
|
||||
msgid "TAKE CONTROL"
|
||||
msgstr "ハンドルを持って"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:181
|
||||
msgid "Steer Unavailable Below"
|
||||
msgstr "横の制御が無効になり速度が以下になります"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:190
|
||||
msgid "Drive Above"
|
||||
msgstr "制限速度以上の運転をしてください"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:189
|
||||
msgid "Calibration in Progress:"
|
||||
msgstr "キャリブレーション中:"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:197
|
||||
msgid "Poor GPS reception"
|
||||
msgstr "GPS受信不良"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:198
|
||||
msgid "If sky is visible, contact support"
|
||||
msgstr "地下・トンネルでない場合は、カスタマーサービスに連絡ください"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:198
|
||||
msgid "Check GPS antenna placement"
|
||||
msgstr "GPSアンテナの位置を確認してください。"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:203
|
||||
msgid "Cruise Mode Disabled"
|
||||
msgstr "クルーズモードをオフ"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:205
|
||||
msgid "Main Switch Off"
|
||||
msgstr "メインスイッチをオフ"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:215
|
||||
msgid "DEBUG ALERT"
|
||||
msgstr "テストメッセージを削除"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:223
|
||||
msgid "Be ready to take over at any time"
|
||||
msgstr "いつでも引き継げるよう準備しておいてください。"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:224 selfdrive/controls/lib/events.py:240
|
||||
#: selfdrive/controls/lib/events.py:248 selfdrive/controls/lib/events.py:256
|
||||
msgid "Always keep hands on wheel and eyes on road"
|
||||
msgstr "常にハンドルに触れ、道路から目を離さない"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:231
|
||||
msgid "WARNING: White panda is deprecated"
|
||||
msgstr "警告: ホワイトパンダは推奨されていません。"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:232 selfdrive/controls/lib/events.py:272
|
||||
msgid "Upgrade to comma two or black panda"
|
||||
msgstr "コンマ2やブラックパンダにアップグレード"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:239
|
||||
msgid "WARNING: This branch is not tested"
|
||||
msgstr "警告: このブランチはテストされていません"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:247
|
||||
msgid "Dashcam mode"
|
||||
msgstr "ダッシュカムモード"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:255
|
||||
msgid "Dashcam mode for unsupported car"
|
||||
msgstr "未対応車のためダッシュカムモードのみ"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:263
|
||||
msgid "Unsupported Giraffe Configuration"
|
||||
msgstr "サポートされていないGiraffeの設定"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:264
|
||||
msgid "Visit comma.ai/tg"
|
||||
msgstr "comma.ai/tg を参照"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:271
|
||||
msgid "White Panda Is No Longer Supported"
|
||||
msgstr "ホワイトパンダはサポート終了しました"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:275
|
||||
msgid "White panda is no longer supported"
|
||||
msgstr "ホワイトパンダはサポート終了しました"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:280
|
||||
msgid "Stock LKAS is turned on"
|
||||
msgstr "純正LKASがオン"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:281
|
||||
msgid "Turn off stock LKAS to engage"
|
||||
msgstr "純正LKASをオフにしてエンゲージ"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:290
|
||||
msgid "Community Feature Detected"
|
||||
msgstr "コミュニティ開発の機能を検出"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:291
|
||||
msgid "Enable Community Features in Developer Settings"
|
||||
msgstr "開発者設定でコミュニティ機能を有効にする"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:298
|
||||
msgid "Dashcam Mode"
|
||||
msgstr "ダッシュカムモード"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:299
|
||||
msgid "Car Unrecognized"
|
||||
msgstr "認識できない車"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:306 selfdrive/controls/lib/events.py:314
|
||||
#: selfdrive/controls/lib/events.py:322
|
||||
msgid "BRAKE!"
|
||||
msgstr "ブレーキ!"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:307
|
||||
msgid "Stock AEB: Risk of Collision"
|
||||
msgstr "衝突の危険"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:315
|
||||
msgid "Stock FCW: Risk of Collision"
|
||||
msgstr "衝突の危険"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:323
|
||||
msgid "Risk of Collision"
|
||||
msgstr "衝突の危険"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:331
|
||||
msgid "Lane Departure Detected"
|
||||
msgstr "車線逸脱を検知"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:340
|
||||
msgid "openpilot will not brake while gas pressed"
|
||||
msgstr "アクセル中、オープンパイロットはブレーキをかけません"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:348
|
||||
msgid "Vehicle Parameter Identification Failed"
|
||||
msgstr "車両パラメータの識別に失敗しました。"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:357 selfdrive/controls/lib/events.py:525
|
||||
#: selfdrive/controls/lib/events.py:528
|
||||
msgid "Steering Temporarily Unavailable"
|
||||
msgstr "ステアリングは一時的に利用不可"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:364
|
||||
msgid "KEEP EYES ON ROAD: Driver Distracted"
|
||||
msgstr "道路から目を離さないで:注意散漫です"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:372
|
||||
msgid "KEEP EYES ON ROAD"
|
||||
msgstr "道路から目を離さないで"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:373
|
||||
msgid "Driver Appears Distracted"
|
||||
msgstr "ドライバーは注意散漫に見えます"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:380 selfdrive/controls/lib/events.py:404
|
||||
msgid "DISENGAGE IMMEDIATELY"
|
||||
msgstr "すぐに解除してください"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:381
|
||||
msgid "Driver Was Distracted"
|
||||
msgstr "ドライバーは注意力散漫"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:388
|
||||
msgid "TOUCH STEERING WHEEL: No Face Detected"
|
||||
msgstr "ハンドルに触れて:顔が検出できない"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:396
|
||||
msgid "TOUCH STEERING WHEEL"
|
||||
msgstr "ハンドルに触れて"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:397
|
||||
msgid "Driver Is Unresponsive"
|
||||
msgstr "ドライバーが無反応"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:405
|
||||
msgid "Driver Was Unresponsive"
|
||||
msgstr "ドライバーが無反応でした"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:412
|
||||
msgid "CHECK DRIVER FACE VISIBILITY"
|
||||
msgstr "ドライバーの顔の視認性を確認"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:413
|
||||
msgid "Driver Monitor Model Output Uncertain"
|
||||
msgstr "ドライバー監視モデルが不完全"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:421
|
||||
msgid "Resume Driving Manually"
|
||||
msgstr "手動で運転を再開"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:428
|
||||
msgid "STOPPED"
|
||||
msgstr "停止"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:429
|
||||
msgid "Press Resume to Move"
|
||||
msgstr "Resumeを押して移動します。"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:440
|
||||
msgid "Steer Left to Start Lane Change"
|
||||
msgstr "左ハンドルで車線変更を開始"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:441 selfdrive/controls/lib/events.py:449
|
||||
#: selfdrive/controls/lib/events.py:457 selfdrive/controls/lib/events.py:465
|
||||
#: selfdrive/controls/lib/events.py:793 selfdrive/controls/lib/events.py:801
|
||||
#: selfdrive/controls/lib/events.py:809
|
||||
msgid "Monitor Other Vehicles"
|
||||
msgstr "他の車両を監視"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:448
|
||||
msgid "Steer Right to Start Lane Change"
|
||||
msgstr "右ハンドルで車線変更を開始"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:456
|
||||
msgid "Car Detected in Blindspot"
|
||||
msgstr "ブラインドスポットで車両を発見"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:464 selfdrive/controls/lib/events.py:808
|
||||
msgid "Changing Lane"
|
||||
msgstr "レーンチェンジ中"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:473
|
||||
msgid "Turn Exceeds Steering Limit"
|
||||
msgstr "ステアリングリミットを超えています"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:498
|
||||
msgid "Brake Hold Active"
|
||||
msgstr "サイドブレーキが作動"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:503
|
||||
msgid "Park Brake Engaged"
|
||||
msgstr "サイドブレーキ作動中"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:508
|
||||
msgid "Pedal Pressed During Attempt"
|
||||
msgstr "ペダル/ブレーキを検出"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:519
|
||||
msgid "Enable Adaptive Cruise"
|
||||
msgstr "ACCを有効化"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:535 selfdrive/controls/lib/events.py:538
|
||||
msgid "Vision Model Output Uncertain"
|
||||
msgstr "映像が不明瞭です"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:544
|
||||
msgid "Attempting Refocus: Camera Focus Invalid"
|
||||
msgstr "再フォーカス中です"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:550
|
||||
msgid "Out of Storage Space"
|
||||
msgstr "空き容量不足"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:555
|
||||
msgid "Speed Too Low"
|
||||
msgstr "速度が遅すぎます"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:560 selfdrive/controls/lib/events.py:564
|
||||
msgid "NEOS Update Required"
|
||||
msgstr "NEOSの更新が必要"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:561
|
||||
msgid "Please Wait for Update"
|
||||
msgstr "更新をお待ちください"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:569 selfdrive/controls/lib/events.py:573
|
||||
msgid "No Data from Device Sensors"
|
||||
msgstr "デバイスセンサからのデータがありません"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:570 selfdrive/controls/lib/events.py:583
|
||||
#: selfdrive/controls/lib/events.py:665
|
||||
msgid "Reboot your Device"
|
||||
msgstr "デバイスを再起動"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:582 selfdrive/controls/lib/events.py:586
|
||||
msgid "Speaker not found"
|
||||
msgstr "スピーカーが見つかりません"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:590
|
||||
msgid "Distraction Level Too High"
|
||||
msgstr "注意力散漫すぎます"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:594
|
||||
msgid "System Overheated"
|
||||
msgstr "オーバーヒート"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:595
|
||||
msgid "System overheated"
|
||||
msgstr "オーバーヒート"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:599 selfdrive/controls/lib/events.py:600
|
||||
msgid "Gear not D"
|
||||
msgstr "Dではない"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:604
|
||||
msgid "Calibration Invalid: Reposition Device and Recalibrate"
|
||||
msgstr "キャリブレーションが無効です。再実行してください。"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:605
|
||||
msgid "Calibration Invalid: Reposition Device & Recalibrate"
|
||||
msgstr "キャリブレーションが無効です。再実行してください。"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:609 selfdrive/controls/lib/events.py:611
|
||||
msgid "Calibration in Progress"
|
||||
msgstr "キャリブレーション"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:615
|
||||
msgid "Door Open"
|
||||
msgstr "ドアが開いています"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:616
|
||||
msgid "Door open"
|
||||
msgstr "ドアが開いています"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:620
|
||||
msgid "Seatbelt Unlatched"
|
||||
msgstr "シートベルト未着用"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:621
|
||||
msgid "Seatbelt unlatched"
|
||||
msgstr "シートベルト未着用"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:625 selfdrive/controls/lib/events.py:626
|
||||
msgid "ESP Off"
|
||||
msgstr "ESPオフ"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:630 selfdrive/controls/lib/events.py:631
|
||||
msgid "Low Battery"
|
||||
msgstr "低バッテリー"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:635 selfdrive/controls/lib/events.py:636
|
||||
msgid "Communication Issue between Processes"
|
||||
msgstr "プロセス間の通信の問題"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:641 selfdrive/controls/lib/events.py:642
|
||||
msgid "Radar Communication Issue"
|
||||
msgstr "レーダー通信問題"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:647 selfdrive/controls/lib/events.py:648
|
||||
#: selfdrive/controls/lib/events.py:652 selfdrive/controls/lib/events.py:653
|
||||
msgid "Radar Error: Restart the Car"
|
||||
msgstr "レーダーエラー:車を再起動"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:657 selfdrive/controls/lib/events.py:658
|
||||
msgid "Driving model lagging"
|
||||
msgstr "制御モデルに遅延がある"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:662 selfdrive/controls/lib/events.py:668
|
||||
msgid "Low Memory: Reboot Your Device"
|
||||
msgstr "ローメモリ:デバイスを再起動"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:664
|
||||
msgid "RAM Critically Low"
|
||||
msgstr "RAMが致命的に低い"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:673 selfdrive/controls/lib/events.py:674
|
||||
msgid "Controls Failed"
|
||||
msgstr "制御失敗"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:678
|
||||
msgid "Controls Mismatch"
|
||||
msgstr "制御不一致"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:682 selfdrive/controls/lib/events.py:684
|
||||
#: selfdrive/controls/lib/events.py:688
|
||||
msgid "CAN Error: Check Connections"
|
||||
msgstr "CANエラー:接続を確認"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:692 selfdrive/controls/lib/events.py:698
|
||||
msgid "LKAS Fault: Restart the Car"
|
||||
msgstr "LKASの故障:車を再起動"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:694
|
||||
msgid "LKAS Fault: Restart the car to engage"
|
||||
msgstr "LKASの故障:車を再起動後発進"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:702 selfdrive/controls/lib/events.py:708
|
||||
#: selfdrive/controls/lib/events.py:786
|
||||
msgid "Cruise Fault: Restart the Car"
|
||||
msgstr "クルーズ失敗:車を再起動"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:704 selfdrive/controls/lib/events.py:782
|
||||
msgid "Cruise Fault: Restart the car to engage"
|
||||
msgstr "クルーズ失敗:車を再起動後発進"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:712
|
||||
msgid "Gas Fault: Restart the Car"
|
||||
msgstr "アクセル故障:車を再起動"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:713
|
||||
msgid "Gas Error: Restart the Car"
|
||||
msgstr "アクセルエラー:車を再起動"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:717 selfdrive/controls/lib/events.py:718
|
||||
msgid "Reverse Gear"
|
||||
msgstr "Rに切り替え"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:722
|
||||
msgid "Cruise Is Off"
|
||||
msgstr "クルーズコントロールオフ"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:726 selfdrive/controls/lib/events.py:727
|
||||
msgid "Planner Solution Error"
|
||||
msgstr "Planner Solution エラー"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:731 selfdrive/controls/lib/events.py:733
|
||||
#: selfdrive/controls/lib/events.py:737
|
||||
msgid "Harness Malfunction"
|
||||
msgstr "ハーネスが故障"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:734
|
||||
msgid "Please Check Hardware"
|
||||
msgstr "ハードウェアを確認して"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:742 selfdrive/controls/lib/events.py:751
|
||||
msgid "openpilot Canceled"
|
||||
msgstr "オープンパイロットはキャンセルされました"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:743
|
||||
msgid "No close lead car"
|
||||
msgstr "リードカー不在"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:746
|
||||
msgid "No Close Lead Car"
|
||||
msgstr "リードカー不在"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:752
|
||||
msgid "Speed too low"
|
||||
msgstr "速度が遅すぎる"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:759 selfdrive/controls/lib/events.py:764
|
||||
msgid "Speed Too High"
|
||||
msgstr "速度が速すぎる"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:760
|
||||
msgid "Slow down to resume operation"
|
||||
msgstr "速度を下げてオープンパイロットを再開"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:765
|
||||
msgid "Slow down to engage"
|
||||
msgstr "速度を落として発進"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:772
|
||||
msgid "Please connect to Internet"
|
||||
msgstr "インターネット接続を確認"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:773
|
||||
msgid "An Update Check Is Required to Engage"
|
||||
msgstr "発進するには更新が必要です"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:776
|
||||
msgid "Please Connect to Internet"
|
||||
msgstr "インターネット接続を確認"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:792
|
||||
msgid "Left ALC will start in 3s"
|
||||
msgstr "左車線に移動します"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:800
|
||||
msgid "Right ALC will start in 3s"
|
||||
msgstr "右車線に移動します"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:816
|
||||
msgid "STEERING REQUIRED: Lane Keeping OFF"
|
||||
msgstr "操作が必要:レーンキープオフ"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:824
|
||||
msgid "STEERING REQUIRED: Blinkers ON"
|
||||
msgstr "操作が必要:ウインカーオン"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:832 selfdrive/controls/lib/events.py:837
|
||||
msgid "Lead Car Is Moving"
|
||||
msgstr "リードカーが移動しました"
|
||||
Binary file not shown.
@@ -0,0 +1,503 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-07-14 16:46+1000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: Rick Lan <ricklan@gmail.com>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: zh-CN\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:146
|
||||
msgid "openpilot Unavailable"
|
||||
msgstr "无法使用 openpilot"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:153 selfdrive/controls/lib/events.py:160
|
||||
msgid "TAKE CONTROL IMMEDIATELY"
|
||||
msgstr "即刻接管控制"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:180 selfdrive/controls/lib/events.py:330
|
||||
#: selfdrive/controls/lib/events.py:356 selfdrive/controls/lib/events.py:420
|
||||
#: selfdrive/controls/lib/events.py:472 selfdrive/controls/lib/events.py:524
|
||||
#: selfdrive/controls/lib/events.py:534 selfdrive/controls/lib/events.py:543
|
||||
msgid "TAKE CONTROL"
|
||||
msgstr "接管控制"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:181
|
||||
msgid "Steer Unavailable Below"
|
||||
msgstr "横向控制暂时失效,车速低于 "
|
||||
|
||||
#: selfdrive/controls/lib/events.py:190
|
||||
msgid "Drive Above"
|
||||
msgstr "车速请高于"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:189
|
||||
msgid "Calibration in Progress:"
|
||||
msgstr "正在校准中:"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:197
|
||||
msgid "Poor GPS reception"
|
||||
msgstr "GPS 讯号不良"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:198
|
||||
msgid "If sky is visible, contact support"
|
||||
msgstr "如果您不在地下室/隧道,请联系客服"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:198
|
||||
msgid "Check GPS antenna placement"
|
||||
msgstr "请检查 GPS 天线位置"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:203
|
||||
msgid "Cruise Mode Disabled"
|
||||
msgstr "巡航模式关闭"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:205
|
||||
msgid "Main Switch Off"
|
||||
msgstr "主开关已关闭"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:215
|
||||
msgid "DEBUG ALERT"
|
||||
msgstr "除错用警示讯息"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:223
|
||||
msgid "Be ready to take over at any time"
|
||||
msgstr "请准备好随时接管"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:224 selfdrive/controls/lib/events.py:240
|
||||
#: selfdrive/controls/lib/events.py:248 selfdrive/controls/lib/events.py:256
|
||||
msgid "Always keep hands on wheel and eyes on road"
|
||||
msgstr "将手放在方向盘上并持续监视路况"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:231
|
||||
msgid "WARNING: White panda is deprecated"
|
||||
msgstr "注意:这个分支未经过测试"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:232 selfdrive/controls/lib/events.py:272
|
||||
msgid "Upgrade to comma two or black panda"
|
||||
msgstr "请升级至 comma two 或是使用 black panda"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:239
|
||||
msgid "WARNING: This branch is not tested"
|
||||
msgstr "注意:这个分支未经过测试"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:247
|
||||
msgid "Dashcam mode"
|
||||
msgstr "行车记录模式"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:255
|
||||
msgid "Dashcam mode for unsupported car"
|
||||
msgstr "行车记录模式 (尚未支援车种)"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:263
|
||||
msgid "Unsupported Giraffe Configuration"
|
||||
msgstr "未支援的 Giraffe 设置"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:264
|
||||
msgid "Visit comma.ai/tg"
|
||||
msgstr "请查阅 comma.ai/tg"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:271
|
||||
msgid "White Panda Is No Longer Supported"
|
||||
msgstr "不再支持 White Panda"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:275
|
||||
msgid "White panda is no longer supported"
|
||||
msgstr "不再支持 White panda"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:280
|
||||
msgid "Stock LKAS is turned on"
|
||||
msgstr "原厂 LKAS 已开启"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:281
|
||||
msgid "Turn off stock LKAS to engage"
|
||||
msgstr "需关闭原厂 LKAS 才能启用"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:290
|
||||
msgid "Community Feature Detected"
|
||||
msgstr "检测到社群开发功能"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:291
|
||||
msgid "Enable Community Features in Developer Settings"
|
||||
msgstr "请至开发人员设定裡启用社群开发功能"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:298
|
||||
msgid "Dashcam Mode"
|
||||
msgstr "行车记录模式"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:299
|
||||
msgid "Car Unrecognized"
|
||||
msgstr "无法辨识车款"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:306 selfdrive/controls/lib/events.py:314
|
||||
#: selfdrive/controls/lib/events.py:322
|
||||
msgid "BRAKE!"
|
||||
msgstr "刹车!"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:307
|
||||
msgid "Stock AEB: Risk of Collision"
|
||||
msgstr "有碰撞的风险"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:315
|
||||
msgid "Stock FCW: Risk of Collision"
|
||||
msgstr "有碰撞的风险"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:323
|
||||
msgid "Risk of Collision"
|
||||
msgstr "有碰撞的风险"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:331
|
||||
msgid "Lane Departure Detected"
|
||||
msgstr "偏离车道"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:340
|
||||
msgid "openpilot will not brake while gas pressed"
|
||||
msgstr "在您踩着油门的时候 openpilot 将不会刹车"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:348
|
||||
msgid "Vehicle Parameter Identification Failed"
|
||||
msgstr "车子参数识别失败"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:357 selfdrive/controls/lib/events.py:525
|
||||
#: selfdrive/controls/lib/events.py:528
|
||||
msgid "Steering Temporarily Unavailable"
|
||||
msgstr "横向控制暂时失效"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:364
|
||||
msgid "KEEP EYES ON ROAD: Driver Distracted"
|
||||
msgstr "注意路况:驾驶分心"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:372
|
||||
msgid "KEEP EYES ON ROAD"
|
||||
msgstr "注意路况"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:373
|
||||
msgid "Driver Appears Distracted"
|
||||
msgstr "驾驶分心"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:380 selfdrive/controls/lib/events.py:404
|
||||
msgid "DISENGAGE IMMEDIATELY"
|
||||
msgstr "立即解除"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:381
|
||||
msgid "Driver Was Distracted"
|
||||
msgstr "驾驶分心"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:388
|
||||
msgid "TOUCH STEERING WHEEL: No Face Detected"
|
||||
msgstr "请触碰方向盘:未侦测到驾驶面容"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:396
|
||||
msgid "TOUCH STEERING WHEEL"
|
||||
msgstr "请触碰方向盘"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:397
|
||||
msgid "Driver Is Unresponsive"
|
||||
msgstr "驾驶没有反应"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:405
|
||||
msgid "Driver Was Unresponsive"
|
||||
msgstr "驾驶没有反应"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:412
|
||||
msgid "CHECK DRIVER FACE VISIBILITY"
|
||||
msgstr "请检查驾驶面部的可见度"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:413
|
||||
msgid "Driver Monitor Model Output Uncertain"
|
||||
msgstr "驾驶监控模型判断不明确"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:421
|
||||
msgid "Resume Driving Manually"
|
||||
msgstr "请自行恢復驾驶"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:428
|
||||
msgid "STOPPED"
|
||||
msgstr "已停止"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:429
|
||||
msgid "Press Resume to Move"
|
||||
msgstr "请按 RES 继续"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:440
|
||||
msgid "Steer Left to Start Lane Change"
|
||||
msgstr "请往左打方向盘切换至左车道"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:441 selfdrive/controls/lib/events.py:449
|
||||
#: selfdrive/controls/lib/events.py:457 selfdrive/controls/lib/events.py:465
|
||||
#: selfdrive/controls/lib/events.py:793 selfdrive/controls/lib/events.py:801
|
||||
#: selfdrive/controls/lib/events.py:809
|
||||
msgid "Monitor Other Vehicles"
|
||||
msgstr "请注意其它车辆"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:448
|
||||
msgid "Steer Right to Start Lane Change"
|
||||
msgstr "请往右打方向盘切换至右车道"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:456
|
||||
msgid "Car Detected in Blindspot"
|
||||
msgstr "盲点侦测到车辆"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:464 selfdrive/controls/lib/events.py:808
|
||||
msgid "Changing Lane"
|
||||
msgstr "切换车道中"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:473
|
||||
msgid "Turn Exceeds Steering Limit"
|
||||
msgstr "弯道超过横向操控限制"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:498
|
||||
msgid "Brake Hold Active"
|
||||
msgstr "驻车煞车已启用"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:503
|
||||
msgid "Park Brake Engaged"
|
||||
msgstr "电子驻车已启动"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:508
|
||||
msgid "Pedal Pressed During Attempt"
|
||||
msgstr "启用时侦测到驾驶踩踏油门/刹车"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:519
|
||||
msgid "Enable Adaptive Cruise"
|
||||
msgstr "启用自适应巡航"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:535 selfdrive/controls/lib/events.py:538
|
||||
msgid "Vision Model Output Uncertain"
|
||||
msgstr "视觉模型判断不明确"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:544
|
||||
msgid "Attempting Refocus: Camera Focus Invalid"
|
||||
msgstr "尝试对焦:相机已失焦"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:550
|
||||
msgid "Out of Storage Space"
|
||||
msgstr "存储空间不足"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:555
|
||||
msgid "Speed Too Low"
|
||||
msgstr "车速过慢"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:560 selfdrive/controls/lib/events.py:564
|
||||
msgid "NEOS Update Required"
|
||||
msgstr "NEOS 需要更新"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:561
|
||||
msgid "Please Wait for Update"
|
||||
msgstr "更新中请稍候"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:569 selfdrive/controls/lib/events.py:573
|
||||
msgid "No Data from Device Sensors"
|
||||
msgstr "未收到装置传感器数据"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:570 selfdrive/controls/lib/events.py:583
|
||||
#: selfdrive/controls/lib/events.py:665
|
||||
msgid "Reboot your Device"
|
||||
msgstr "请重启装置"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:582 selfdrive/controls/lib/events.py:586
|
||||
msgid "Speaker not found"
|
||||
msgstr "找不到音效装置"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:590
|
||||
msgid "Distraction Level Too High"
|
||||
msgstr "驾驶分心太多次"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:594
|
||||
msgid "System Overheated"
|
||||
msgstr "系统过热"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:595
|
||||
msgid "System overheated"
|
||||
msgstr "系统过热"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:599 selfdrive/controls/lib/events.py:600
|
||||
msgid "Gear not D"
|
||||
msgstr "不在 D 档位"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:604
|
||||
msgid "Calibration Invalid: Reposition Device and Recalibrate"
|
||||
msgstr "校准无效:请将装置放于新的位置并重新校准"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:605
|
||||
msgid "Calibration Invalid: Reposition Device & Recalibrate"
|
||||
msgstr "校准无效:请将装置放于新的位置并重新校准"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:609 selfdrive/controls/lib/events.py:611
|
||||
msgid "Calibration in Progress"
|
||||
msgstr "正在校准中"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:615
|
||||
msgid "Door Open"
|
||||
msgstr "车门开启"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:616
|
||||
msgid "Door open"
|
||||
msgstr "车门未关"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:620
|
||||
msgid "Seatbelt Unlatched"
|
||||
msgstr "安全带未繫"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:621
|
||||
msgid "Seatbelt unlatched"
|
||||
msgstr "安全带未繫"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:625 selfdrive/controls/lib/events.py:626
|
||||
msgid "ESP Off"
|
||||
msgstr "ESP 关闭"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:630 selfdrive/controls/lib/events.py:631
|
||||
msgid "Low Battery"
|
||||
msgstr "电量过低"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:635 selfdrive/controls/lib/events.py:636
|
||||
msgid "Communication Issue between Processes"
|
||||
msgstr "行程间出现通讯问题"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:641 selfdrive/controls/lib/events.py:642
|
||||
msgid "Radar Communication Issue"
|
||||
msgstr "雷达通讯出现问题"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:647 selfdrive/controls/lib/events.py:648
|
||||
#: selfdrive/controls/lib/events.py:652 selfdrive/controls/lib/events.py:653
|
||||
msgid "Radar Error: Restart the Car"
|
||||
msgstr "雷达讯号错误:请重新发动车辆"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:657 selfdrive/controls/lib/events.py:658
|
||||
msgid "Driving model lagging"
|
||||
msgstr "操控模型有延迟"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:662 selfdrive/controls/lib/events.py:668
|
||||
msgid "Low Memory: Reboot Your Device"
|
||||
msgstr "记忆体不足:请重启您的装置"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:664
|
||||
msgid "RAM Critically Low"
|
||||
msgstr "记忆体严重不足"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:673 selfdrive/controls/lib/events.py:674
|
||||
msgid "Controls Failed"
|
||||
msgstr "控制发生错误"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:678
|
||||
msgid "Controls Mismatch"
|
||||
msgstr "控制不匹配"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:682 selfdrive/controls/lib/events.py:684
|
||||
#: selfdrive/controls/lib/events.py:688
|
||||
msgid "CAN Error: Check Connections"
|
||||
msgstr "CAN 讯号错误:请检查线路"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:692 selfdrive/controls/lib/events.py:698
|
||||
msgid "LKAS Fault: Restart the Car"
|
||||
msgstr "LKAS 错误:请重新发动车辆"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:694
|
||||
msgid "LKAS Fault: Restart the car to engage"
|
||||
msgstr "LKAS 错误:请重新发动车辆"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:702 selfdrive/controls/lib/events.py:708
|
||||
#: selfdrive/controls/lib/events.py:786
|
||||
msgid "Cruise Fault: Restart the Car"
|
||||
msgstr "巡航系统错误:请重新发动车辆"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:704 selfdrive/controls/lib/events.py:782
|
||||
msgid "Cruise Fault: Restart the car to engage"
|
||||
msgstr "巡航系统错误:请重新发动车辆"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:712
|
||||
msgid "Gas Fault: Restart the Car"
|
||||
msgstr "油门错误:请重新发动车辆"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:713
|
||||
msgid "Gas Error: Restart the Car"
|
||||
msgstr "油门错误:请重新发动车辆"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:717 selfdrive/controls/lib/events.py:718
|
||||
msgid "Reverse Gear"
|
||||
msgstr "切换至倒车档"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:722
|
||||
msgid "Cruise Is Off"
|
||||
msgstr "巡航系统关闭"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:726 selfdrive/controls/lib/events.py:727
|
||||
msgid "Planner Solution Error"
|
||||
msgstr "Planner Solution 错误"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:731 selfdrive/controls/lib/events.py:733
|
||||
#: selfdrive/controls/lib/events.py:737
|
||||
msgid "Harness Malfunction"
|
||||
msgstr "Harness 故障"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:734
|
||||
msgid "Please Check Hardware"
|
||||
msgstr "请检查硬体"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:742 selfdrive/controls/lib/events.py:751
|
||||
msgid "openpilot Canceled"
|
||||
msgstr "openpilot 已取消"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:743
|
||||
msgid "No close lead car"
|
||||
msgstr "前方没有车辆"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:746
|
||||
msgid "No Close Lead Car"
|
||||
msgstr "前方没有车辆"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:752
|
||||
msgid "Speed too low"
|
||||
msgstr "车速过慢"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:759 selfdrive/controls/lib/events.py:764
|
||||
msgid "Speed Too High"
|
||||
msgstr "车速过快"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:760
|
||||
msgid "Slow down to resume operation"
|
||||
msgstr "请减速后再启用"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:765
|
||||
msgid "Slow down to engage"
|
||||
msgstr "请减速后再启用"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:772
|
||||
msgid "Please connect to Internet"
|
||||
msgstr "请连接网路"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:773
|
||||
msgid "An Update Check Is Required to Engage"
|
||||
msgstr "需检查更新后才能启用"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:776
|
||||
msgid "Please Connect to Internet"
|
||||
msgstr "请连接网路"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:792
|
||||
msgid "Left ALC will start in 3s"
|
||||
msgstr "准备自动切至左车道"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:800
|
||||
msgid "Right ALC will start in 3s"
|
||||
msgstr "准备自动切至右车道"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:816
|
||||
msgid "STEERING REQUIRED: Lane Keeping OFF"
|
||||
msgstr "请接管方向盘:车道维持关闭"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:824
|
||||
msgid "STEERING REQUIRED: Blinkers ON"
|
||||
msgstr "请接管方向盘:方向灯开启"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:832 selfdrive/controls/lib/events.py:837
|
||||
msgid "Lead Car Is Moving"
|
||||
msgstr "前方车辆车移动中"
|
||||
Binary file not shown.
@@ -0,0 +1,503 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-07-14 16:46+1000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: Rick Lan <ricklan@gmail.com>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: zh-TW\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:146
|
||||
msgid "openpilot Unavailable"
|
||||
msgstr "無法使用 openpilot"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:153 selfdrive/controls/lib/events.py:160
|
||||
msgid "TAKE CONTROL IMMEDIATELY"
|
||||
msgstr "即刻接管控制"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:180 selfdrive/controls/lib/events.py:330
|
||||
#: selfdrive/controls/lib/events.py:356 selfdrive/controls/lib/events.py:420
|
||||
#: selfdrive/controls/lib/events.py:472 selfdrive/controls/lib/events.py:524
|
||||
#: selfdrive/controls/lib/events.py:534 selfdrive/controls/lib/events.py:543
|
||||
msgid "TAKE CONTROL"
|
||||
msgstr "接管控制"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:181
|
||||
msgid "Steer Unavailable Below"
|
||||
msgstr "橫向控制暫時失效,車速低於 "
|
||||
|
||||
#: selfdrive/controls/lib/events.py:190
|
||||
msgid "Drive Above"
|
||||
msgstr "車速請高於"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:189
|
||||
msgid "Calibration in Progress:"
|
||||
msgstr "正在校準中:"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:197
|
||||
msgid "Poor GPS reception"
|
||||
msgstr "GPS 訊號不良"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:198
|
||||
msgid "If sky is visible, contact support"
|
||||
msgstr "如果您不在地下室/隧道,請聯系客服"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:198
|
||||
msgid "Check GPS antenna placement"
|
||||
msgstr "請檢查 GPS 天線位置"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:203
|
||||
msgid "Cruise Mode Disabled"
|
||||
msgstr "巡航模式關閉"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:205
|
||||
msgid "Main Switch Off"
|
||||
msgstr "主開關已關閉"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:215
|
||||
msgid "DEBUG ALERT"
|
||||
msgstr "除錯用警示訊息"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:223
|
||||
msgid "Be ready to take over at any time"
|
||||
msgstr "請準備好隨時接管"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:224 selfdrive/controls/lib/events.py:240
|
||||
#: selfdrive/controls/lib/events.py:248 selfdrive/controls/lib/events.py:256
|
||||
msgid "Always keep hands on wheel and eyes on road"
|
||||
msgstr "將手放在方向盤上並持續監視路況"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:231
|
||||
msgid "WARNING: White panda is deprecated"
|
||||
msgstr "注意:這個分支未經過測試"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:232 selfdrive/controls/lib/events.py:272
|
||||
msgid "Upgrade to comma two or black panda"
|
||||
msgstr "請升級至 comma two 或是使用 black panda"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:239
|
||||
msgid "WARNING: This branch is not tested"
|
||||
msgstr "注意:這個分支未經過測試"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:247
|
||||
msgid "Dashcam mode"
|
||||
msgstr "行車記錄模式"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:255
|
||||
msgid "Dashcam mode for unsupported car"
|
||||
msgstr "行車記錄模式 (尚未支援車種)"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:263
|
||||
msgid "Unsupported Giraffe Configuration"
|
||||
msgstr "未支援的 Giraffe 設置"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:264
|
||||
msgid "Visit comma.ai/tg"
|
||||
msgstr "請查閱 comma.ai/tg"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:271
|
||||
msgid "White Panda Is No Longer Supported"
|
||||
msgstr "不再支援 White Panda"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:275
|
||||
msgid "White panda is no longer supported"
|
||||
msgstr "不再支援 White panda"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:280
|
||||
msgid "Stock LKAS is turned on"
|
||||
msgstr "原廠 LKAS 已開啟"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:281
|
||||
msgid "Turn off stock LKAS to engage"
|
||||
msgstr "需關閉原廠 LKAS 才能啟用"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:290
|
||||
msgid "Community Feature Detected"
|
||||
msgstr "檢測到社群開發功能"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:291
|
||||
msgid "Enable Community Features in Developer Settings"
|
||||
msgstr "請至開發人員設定裡啟用社群開發功能"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:298
|
||||
msgid "Dashcam Mode"
|
||||
msgstr "行車記錄模式"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:299
|
||||
msgid "Car Unrecognized"
|
||||
msgstr "無法辨識車款"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:306 selfdrive/controls/lib/events.py:314
|
||||
#: selfdrive/controls/lib/events.py:322
|
||||
msgid "BRAKE!"
|
||||
msgstr "剎車!"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:307
|
||||
msgid "Stock AEB: Risk of Collision"
|
||||
msgstr "有碰撞的風險"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:315
|
||||
msgid "Stock FCW: Risk of Collision"
|
||||
msgstr "有碰撞的風險"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:323
|
||||
msgid "Risk of Collision"
|
||||
msgstr "有碰撞的風險"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:331
|
||||
msgid "Lane Departure Detected"
|
||||
msgstr "偏離車道"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:340
|
||||
msgid "openpilot will not brake while gas pressed"
|
||||
msgstr "在您踩著油門的時候 openpilot 將不會剎車"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:348
|
||||
msgid "Vehicle Parameter Identification Failed"
|
||||
msgstr "車子參數識別失敗"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:357 selfdrive/controls/lib/events.py:525
|
||||
#: selfdrive/controls/lib/events.py:528
|
||||
msgid "Steering Temporarily Unavailable"
|
||||
msgstr "橫向控制暫時失效"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:364
|
||||
msgid "KEEP EYES ON ROAD: Driver Distracted"
|
||||
msgstr "注意路況:駕駛分心"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:372
|
||||
msgid "KEEP EYES ON ROAD"
|
||||
msgstr "注意路況"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:373
|
||||
msgid "Driver Appears Distracted"
|
||||
msgstr "駕駛分心"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:380 selfdrive/controls/lib/events.py:404
|
||||
msgid "DISENGAGE IMMEDIATELY"
|
||||
msgstr "立即解除"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:381
|
||||
msgid "Driver Was Distracted"
|
||||
msgstr "駕駛分心"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:388
|
||||
msgid "TOUCH STEERING WHEEL: No Face Detected"
|
||||
msgstr "請觸碰方向盤:未偵測到駕駛面容"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:396
|
||||
msgid "TOUCH STEERING WHEEL"
|
||||
msgstr "請觸碰方向盤"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:397
|
||||
msgid "Driver Is Unresponsive"
|
||||
msgstr "駕駛沒有反應"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:405
|
||||
msgid "Driver Was Unresponsive"
|
||||
msgstr "駕駛沒有反應"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:412
|
||||
msgid "CHECK DRIVER FACE VISIBILITY"
|
||||
msgstr "請檢查駕駛面部的可見度"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:413
|
||||
msgid "Driver Monitor Model Output Uncertain"
|
||||
msgstr "駕駛監控模型判斷不明確"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:421
|
||||
msgid "Resume Driving Manually"
|
||||
msgstr "請自行恢復駕駛"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:428
|
||||
msgid "STOPPED"
|
||||
msgstr "已停止"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:429
|
||||
msgid "Press Resume to Move"
|
||||
msgstr "請按 RES 繼續"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:440
|
||||
msgid "Steer Left to Start Lane Change"
|
||||
msgstr "請往左打方向盤切換至左車道"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:441 selfdrive/controls/lib/events.py:449
|
||||
#: selfdrive/controls/lib/events.py:457 selfdrive/controls/lib/events.py:465
|
||||
#: selfdrive/controls/lib/events.py:793 selfdrive/controls/lib/events.py:801
|
||||
#: selfdrive/controls/lib/events.py:809
|
||||
msgid "Monitor Other Vehicles"
|
||||
msgstr "請注意其它車輛"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:448
|
||||
msgid "Steer Right to Start Lane Change"
|
||||
msgstr "請往右打方向盤切換至右車道"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:456
|
||||
msgid "Car Detected in Blindspot"
|
||||
msgstr "盲點偵測到車輛"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:464 selfdrive/controls/lib/events.py:808
|
||||
msgid "Changing Lane"
|
||||
msgstr "切換車道中"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:473
|
||||
msgid "Turn Exceeds Steering Limit"
|
||||
msgstr "彎道超過橫向操控限制"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:498
|
||||
msgid "Brake Hold Active"
|
||||
msgstr "駐車煞車已啟用"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:503
|
||||
msgid "Park Brake Engaged"
|
||||
msgstr "電子駐車已啟動"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:508
|
||||
msgid "Pedal Pressed During Attempt"
|
||||
msgstr "啟用時偵測到駕駛踩踏油門/剎車"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:519
|
||||
msgid "Enable Adaptive Cruise"
|
||||
msgstr "啟用主動定速巡航"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:535 selfdrive/controls/lib/events.py:538
|
||||
msgid "Vision Model Output Uncertain"
|
||||
msgstr "視覺模型判斷不明確"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:544
|
||||
msgid "Attempting Refocus: Camera Focus Invalid"
|
||||
msgstr "嘗試對焦:相機已失焦"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:550
|
||||
msgid "Out of Storage Space"
|
||||
msgstr "儲存空間不足"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:555
|
||||
msgid "Speed Too Low"
|
||||
msgstr "車速過慢"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:560 selfdrive/controls/lib/events.py:564
|
||||
msgid "NEOS Update Required"
|
||||
msgstr "NEOS 需要更新"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:561
|
||||
msgid "Please Wait for Update"
|
||||
msgstr "更新中請稍候"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:569 selfdrive/controls/lib/events.py:573
|
||||
msgid "No Data from Device Sensors"
|
||||
msgstr "未收到裝置傳感器數據"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:570 selfdrive/controls/lib/events.py:583
|
||||
#: selfdrive/controls/lib/events.py:665
|
||||
msgid "Reboot your Device"
|
||||
msgstr "請重啟裝置"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:582 selfdrive/controls/lib/events.py:586
|
||||
msgid "Speaker not found"
|
||||
msgstr "找不到音效裝置"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:590
|
||||
msgid "Distraction Level Too High"
|
||||
msgstr "駕駛分心太多次"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:594
|
||||
msgid "System Overheated"
|
||||
msgstr "系統過熱"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:595
|
||||
msgid "System overheated"
|
||||
msgstr "系統過熱"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:599 selfdrive/controls/lib/events.py:600
|
||||
msgid "Gear not D"
|
||||
msgstr "不在 D 檔位"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:604
|
||||
msgid "Calibration Invalid: Reposition Device and Recalibrate"
|
||||
msgstr "校準無效:請將裝置放於新的位置並重新校準"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:605
|
||||
msgid "Calibration Invalid: Reposition Device & Recalibrate"
|
||||
msgstr "校準無效:請將裝置放於新的位置並重新校準"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:609 selfdrive/controls/lib/events.py:611
|
||||
msgid "Calibration in Progress"
|
||||
msgstr "正在校準中"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:615
|
||||
msgid "Door Open"
|
||||
msgstr "車門開啟"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:616
|
||||
msgid "Door open"
|
||||
msgstr "車門未關"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:620
|
||||
msgid "Seatbelt Unlatched"
|
||||
msgstr "安全帶未繫"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:621
|
||||
msgid "Seatbelt unlatched"
|
||||
msgstr "安全帶未繫"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:625 selfdrive/controls/lib/events.py:626
|
||||
msgid "ESP Off"
|
||||
msgstr "ESP 關閉"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:630 selfdrive/controls/lib/events.py:631
|
||||
msgid "Low Battery"
|
||||
msgstr "電量過低"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:635 selfdrive/controls/lib/events.py:636
|
||||
msgid "Communication Issue between Processes"
|
||||
msgstr "行程間出現通訊問題"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:641 selfdrive/controls/lib/events.py:642
|
||||
msgid "Radar Communication Issue"
|
||||
msgstr "雷達通訊出現問題"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:647 selfdrive/controls/lib/events.py:648
|
||||
#: selfdrive/controls/lib/events.py:652 selfdrive/controls/lib/events.py:653
|
||||
msgid "Radar Error: Restart the Car"
|
||||
msgstr "雷達訊號錯誤:請重新發動車輛"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:657 selfdrive/controls/lib/events.py:658
|
||||
msgid "Driving model lagging"
|
||||
msgstr "操控模型有延遲"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:662 selfdrive/controls/lib/events.py:668
|
||||
msgid "Low Memory: Reboot Your Device"
|
||||
msgstr "記憶體不足:請重啟您的裝置"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:664
|
||||
msgid "RAM Critically Low"
|
||||
msgstr "記憶體嚴重不足"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:673 selfdrive/controls/lib/events.py:674
|
||||
msgid "Controls Failed"
|
||||
msgstr "控制發生錯誤"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:678
|
||||
msgid "Controls Mismatch"
|
||||
msgstr "控制不匹配"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:682 selfdrive/controls/lib/events.py:684
|
||||
#: selfdrive/controls/lib/events.py:688
|
||||
msgid "CAN Error: Check Connections"
|
||||
msgstr "CAN 訊號錯誤:請檢查線路"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:692 selfdrive/controls/lib/events.py:698
|
||||
msgid "LKAS Fault: Restart the Car"
|
||||
msgstr "LKAS 錯誤:請重新發動車輛"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:694
|
||||
msgid "LKAS Fault: Restart the car to engage"
|
||||
msgstr "LKAS 錯誤:請重新發動車輛"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:702 selfdrive/controls/lib/events.py:708
|
||||
#: selfdrive/controls/lib/events.py:786
|
||||
msgid "Cruise Fault: Restart the Car"
|
||||
msgstr "巡航系統錯誤:請重新發動車輛"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:704 selfdrive/controls/lib/events.py:782
|
||||
msgid "Cruise Fault: Restart the car to engage"
|
||||
msgstr "巡航系統錯誤:請重新發動車輛"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:712
|
||||
msgid "Gas Fault: Restart the Car"
|
||||
msgstr "油門錯誤:請重新發動車輛"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:713
|
||||
msgid "Gas Error: Restart the Car"
|
||||
msgstr "油門錯誤:請重新發動車輛"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:717 selfdrive/controls/lib/events.py:718
|
||||
msgid "Reverse Gear"
|
||||
msgstr "切換至倒車檔"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:722
|
||||
msgid "Cruise Is Off"
|
||||
msgstr "巡航系統關閉"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:726 selfdrive/controls/lib/events.py:727
|
||||
msgid "Planner Solution Error"
|
||||
msgstr "Planner Solution 錯誤"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:731 selfdrive/controls/lib/events.py:733
|
||||
#: selfdrive/controls/lib/events.py:737
|
||||
msgid "Harness Malfunction"
|
||||
msgstr "Harness 故障"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:734
|
||||
msgid "Please Check Hardware"
|
||||
msgstr "請檢查硬體"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:742 selfdrive/controls/lib/events.py:751
|
||||
msgid "openpilot Canceled"
|
||||
msgstr "openpilot 已取消"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:743
|
||||
msgid "No close lead car"
|
||||
msgstr "前方沒有車輛"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:746
|
||||
msgid "No Close Lead Car"
|
||||
msgstr "前方沒有車輛"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:752
|
||||
msgid "Speed too low"
|
||||
msgstr "車速過慢"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:759 selfdrive/controls/lib/events.py:764
|
||||
msgid "Speed Too High"
|
||||
msgstr "車速過快"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:760
|
||||
msgid "Slow down to resume operation"
|
||||
msgstr "請減速後再啟用"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:765
|
||||
msgid "Slow down to engage"
|
||||
msgstr "請減速後再啟用"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:772
|
||||
msgid "Please connect to Internet"
|
||||
msgstr "請連接網路"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:773
|
||||
msgid "An Update Check Is Required to Engage"
|
||||
msgstr "需檢查更新後才能啟用"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:776
|
||||
msgid "Please Connect to Internet"
|
||||
msgstr "請連接網路"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:792
|
||||
msgid "Left ALC will start in 3s"
|
||||
msgstr "準備自動切至左車道"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:800
|
||||
msgid "Right ALC will start in 3s"
|
||||
msgstr "準備自動切至右車道"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:816
|
||||
msgid "STEERING REQUIRED: Lane Keeping OFF"
|
||||
msgstr "請接管方向盤:車道維持關閉"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:824
|
||||
msgid "STEERING REQUIRED: Blinkers ON"
|
||||
msgstr "請接管方向盤:方向燈開啟"
|
||||
|
||||
#: selfdrive/controls/lib/events.py:832 selfdrive/controls/lib/events.py:837
|
||||
msgid "Lead Car Is Moving"
|
||||
msgstr "前方車輛車移動中"
|
||||
@@ -1,5 +1,11 @@
|
||||
Import('env', 'common', 'cereal', 'messaging')
|
||||
|
||||
# dp - Add read dp_disable_relay value
|
||||
if FindFile('dp_disable_relay', '/data/params/d') != None:
|
||||
with open('/data/params/d/dp_disable_relay') as f:
|
||||
if (int(f.read())) == 1:
|
||||
env.Append(CCFLAGS='-DDisableRelay')
|
||||
|
||||
env.Program('boardd.cc', LIBS=['usb-1.0', common, cereal, messaging, 'pthread', 'zmq', 'capnp', 'kj'])
|
||||
env.Library('libcan_list_to_can_capnp', ['can_list_to_can_capnp.cc'])
|
||||
|
||||
|
||||
@@ -84,6 +84,7 @@ void pigeon_init();
|
||||
void *pigeon_thread(void *crap);
|
||||
|
||||
void *safety_setter_thread(void *s) {
|
||||
#ifndef DisableRelay
|
||||
// diagnostic only is the default, needed for VIN query
|
||||
pthread_mutex_lock(&usb_lock);
|
||||
libusb_control_transfer(dev_handle, 0x40, 0xdc, (uint16_t)(cereal::CarParams::SafetyModel::ELM327), 0, NULL, 0, TIMEOUT);
|
||||
@@ -107,7 +108,7 @@ void *safety_setter_thread(void *s) {
|
||||
pthread_mutex_lock(&usb_lock);
|
||||
libusb_control_transfer(dev_handle, 0x40, 0xdc, (uint16_t)(cereal::CarParams::SafetyModel::NO_OUTPUT), 0, NULL, 0, TIMEOUT);
|
||||
pthread_mutex_unlock(&usb_lock);
|
||||
|
||||
#endif
|
||||
std::vector<char> params;
|
||||
LOGW("waiting for params to set safety model");
|
||||
while (1) {
|
||||
@@ -126,6 +127,9 @@ void *safety_setter_thread(void *s) {
|
||||
capnp::FlatArrayMessageReader cmsg(amsg);
|
||||
cereal::CarParams::Reader car_params = cmsg.getRoot<cereal::CarParams>();
|
||||
|
||||
LOGW("setting unsafety mode");
|
||||
libusb_control_transfer(dev_handle, 0x40, 0xdf, 9, 0, NULL, 0, TIMEOUT);
|
||||
|
||||
int safety_model = int(car_params.getSafetyModel());
|
||||
auto safety_param = car_params.getSafetyParam();
|
||||
LOGW("setting safety model: %d with param %d", safety_model, safety_param);
|
||||
@@ -330,7 +334,7 @@ void can_recv(PubMaster &pm) {
|
||||
pm.send("can", msg);
|
||||
}
|
||||
|
||||
void can_health(PubMaster &pm) {
|
||||
void can_health(PubMaster &pm, int no_ign_cnt_max) {
|
||||
int cnt;
|
||||
int err;
|
||||
|
||||
@@ -384,14 +388,14 @@ void can_health(PubMaster &pm) {
|
||||
}
|
||||
|
||||
voltage_f = VOLTAGE_K * (health.voltage / 1000.0) + (1.0 - VOLTAGE_K) * voltage_f; // LPF
|
||||
|
||||
#ifndef DisableRelay
|
||||
// Make sure CAN buses are live: safety_setter_thread does not work if Panda CAN are silent and there is only one other CAN node
|
||||
if (health.safety_model == (uint8_t)(cereal::CarParams::SafetyModel::SILENT)) {
|
||||
pthread_mutex_lock(&usb_lock);
|
||||
libusb_control_transfer(dev_handle, 0x40, 0xdc, (uint16_t)(cereal::CarParams::SafetyModel::NO_OUTPUT), 0, NULL, 0, TIMEOUT);
|
||||
pthread_mutex_unlock(&usb_lock);
|
||||
}
|
||||
|
||||
#endif
|
||||
bool ignition = ((health.ignition_line != 0) || (health.ignition_can != 0));
|
||||
|
||||
if (ignition) {
|
||||
@@ -402,7 +406,7 @@ void can_health(PubMaster &pm) {
|
||||
|
||||
#ifndef __x86_64__
|
||||
bool cdp_mode = health.usb_power_mode == (uint8_t)(cereal::HealthData::UsbPowerMode::CDP);
|
||||
bool no_ignition_exp = no_ignition_cnt > NO_IGNITION_CNT_MAX;
|
||||
bool no_ignition_exp = no_ignition_cnt > no_ign_cnt_max;
|
||||
if ((no_ignition_exp || (voltage_f < VBATT_PAUSE_CHARGING)) && cdp_mode && !ignition) {
|
||||
std::vector<char> disable_power_down = read_db_bytes("DisablePowerDown");
|
||||
if (disable_power_down.size() != 1 || disable_power_down[0] != '1') {
|
||||
@@ -431,12 +435,14 @@ void can_health(PubMaster &pm) {
|
||||
libusb_control_transfer(dev_handle, 0xc0, 0xe7, 1, 0, NULL, 0, TIMEOUT);
|
||||
pthread_mutex_unlock(&usb_lock);
|
||||
}
|
||||
#ifndef DisableRelay
|
||||
// set safety mode to NO_OUTPUT when car is off. ELM327 is an alternative if we want to leverage athenad/connect
|
||||
if (!ignition && (health.safety_model != (uint8_t)(cereal::CarParams::SafetyModel::NO_OUTPUT))) {
|
||||
pthread_mutex_lock(&usb_lock);
|
||||
libusb_control_transfer(dev_handle, 0x40, 0xdc, (uint16_t)(cereal::CarParams::SafetyModel::NO_OUTPUT), 0, NULL, 0, TIMEOUT);
|
||||
pthread_mutex_unlock(&usb_lock);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// clear VIN, CarParams, and set new safety on car start
|
||||
@@ -650,9 +656,23 @@ void *can_health_thread(void *crap) {
|
||||
// health = 8011
|
||||
PubMaster pm({"health"});
|
||||
|
||||
SubMaster sm({"dragonConf"});
|
||||
int no_ign_cnt_max = NO_IGNITION_CNT_MAX;
|
||||
int check_cnt = 0;
|
||||
// run at 2hz
|
||||
while (!do_exit) {
|
||||
can_health(pm);
|
||||
// dp - check value every 30 secs
|
||||
if (check_cnt % 60 == 0) {
|
||||
sm.update(1000);
|
||||
if (sm.updated("dragonConf") && sm["dragonConf"].getDragonConf().getDpAutoShutdown()) {
|
||||
no_ign_cnt_max = sm["dragonConf"].getDragonConf().getDpAutoShutdownIn() * 60 * 2 - 10; // -5 seconds, turn off earlier than EON
|
||||
} else {
|
||||
no_ign_cnt_max = NO_IGNITION_CNT_MAX; // use stock value
|
||||
}
|
||||
check_cnt = 0;
|
||||
}
|
||||
check_cnt++;
|
||||
can_health(pm, no_ign_cnt_max);
|
||||
usleep(500*1000);
|
||||
}
|
||||
|
||||
@@ -838,6 +858,11 @@ void *pigeon_thread(void *crap) {
|
||||
if (pigeon_needs_init) {
|
||||
pigeon_needs_init = false;
|
||||
pigeon_init();
|
||||
#ifdef DisableRelay
|
||||
pthread_mutex_lock(&usb_lock);
|
||||
libusb_control_transfer(dev_handle, 0x40, 0xdc, 2, 100, NULL, 0, TIMEOUT);
|
||||
pthread_mutex_unlock(&usb_lock);
|
||||
#endif
|
||||
}
|
||||
int alen = 0;
|
||||
while (alen < 0xfc0) {
|
||||
@@ -871,6 +896,9 @@ void *pigeon_thread(void *crap) {
|
||||
int main() {
|
||||
int err;
|
||||
LOGW("starting boardd");
|
||||
#ifdef DisableRelay
|
||||
LOGW("boardd is running with relay disabled.");
|
||||
#endif
|
||||
|
||||
// set process priority and affinity
|
||||
err = set_realtime_priority(54);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import os
|
||||
from common.params import Params
|
||||
from common.params import Params, put_nonblocking
|
||||
from common.basedir import BASEDIR
|
||||
from selfdrive.version import comma_remote, tested_branch
|
||||
from selfdrive.car.fingerprints import eliminate_incompatible_cars, all_known_cars
|
||||
@@ -8,6 +8,9 @@ from selfdrive.car.fw_versions import get_fw_versions, match_fw_to_car
|
||||
from selfdrive.swaglog import cloudlog
|
||||
import cereal.messaging as messaging
|
||||
from selfdrive.car import gen_empty_fingerprint
|
||||
from common.dp_common import is_online
|
||||
import threading
|
||||
import selfdrive.crash as crash
|
||||
|
||||
from cereal import car, log
|
||||
EventName = car.CarEvent.EventName
|
||||
@@ -15,10 +18,10 @@ HwType = log.HealthData.HwType
|
||||
|
||||
|
||||
def get_startup_event(car_recognized, controller_available):
|
||||
if comma_remote and tested_branch:
|
||||
event = EventName.startup
|
||||
else:
|
||||
event = EventName.startupMaster
|
||||
# if comma_remote and tested_branch:
|
||||
event = EventName.startup
|
||||
# else:
|
||||
# event = EventName.startupMaster
|
||||
|
||||
if not car_recognized:
|
||||
event = EventName.startupNoCar
|
||||
@@ -76,7 +79,7 @@ def only_toyota_left(candidate_cars):
|
||||
|
||||
# **** for use live only ****
|
||||
def fingerprint(logcan, sendcan, has_relay):
|
||||
fixed_fingerprint = os.environ.get('FINGERPRINT', "")
|
||||
fixed_fingerprint = os.environ.get('FINGERPRINT', "") or Params().get('dp_car_selected', encoding='utf8')
|
||||
skip_fw_query = os.environ.get('SKIP_FW_QUERY', False)
|
||||
|
||||
if has_relay and not fixed_fingerprint and not skip_fw_query:
|
||||
@@ -159,6 +162,7 @@ def fingerprint(logcan, sendcan, has_relay):
|
||||
source = car.CarParams.FingerprintSource.fixed
|
||||
|
||||
cloudlog.warning("fingerprinted %s", car_fingerprint)
|
||||
put_nonblocking('dp_car_detected', car_fingerprint)
|
||||
return car_fingerprint, finger, vin, car_fw, source
|
||||
|
||||
|
||||
@@ -169,6 +173,10 @@ def get_car(logcan, sendcan, has_relay=False):
|
||||
cloudlog.warning("car doesn't match any fingerprints: %r", fingerprints)
|
||||
candidate = "mock"
|
||||
|
||||
if is_online():
|
||||
x = threading.Thread(target=log_fingerprinted, args=(candidate,))
|
||||
x.start()
|
||||
|
||||
CarInterface, CarController, CarState = interfaces[candidate]
|
||||
car_params = CarInterface.get_params(candidate, fingerprints, has_relay, car_fw)
|
||||
car_params.carVin = vin
|
||||
@@ -176,3 +184,8 @@ def get_car(logcan, sendcan, has_relay=False):
|
||||
car_params.fingerprintSource = source
|
||||
|
||||
return CarInterface(car_params, CarController, CarState), car_params
|
||||
|
||||
def log_fingerprinted(candidate):
|
||||
while True:
|
||||
crash.capture_warning("fingerprinted %s" % candidate)
|
||||
break
|
||||
|
||||
@@ -3,6 +3,7 @@ from selfdrive.car.chrysler.chryslercan import create_lkas_hud, create_lkas_comm
|
||||
create_wheel_buttons
|
||||
from selfdrive.car.chrysler.values import CAR, SteerLimitParams
|
||||
from opendbc.can.packer import CANPacker
|
||||
from common.dp_common import common_controller_ctrl
|
||||
|
||||
class CarController():
|
||||
def __init__(self, dbc_name, CP, VM):
|
||||
@@ -17,7 +18,11 @@ class CarController():
|
||||
|
||||
self.packer = CANPacker(dbc_name)
|
||||
|
||||
def update(self, enabled, CS, actuators, pcm_cancel_cmd, hud_alert):
|
||||
# dp
|
||||
self.last_blinker_on = False
|
||||
self.blinker_end_frame = 0.
|
||||
|
||||
def update(self, enabled, CS, actuators, pcm_cancel_cmd, hud_alert, dragonconf):
|
||||
# this seems needed to avoid steering faults and to force the sync with the EPS counter
|
||||
frame = CS.lkas_counter
|
||||
if self.prev_frame == frame:
|
||||
@@ -41,6 +46,20 @@ class CarController():
|
||||
if not lkas_active:
|
||||
apply_steer = 0
|
||||
|
||||
# dp
|
||||
blinker_on = CS.out.leftBlinker or CS.out.rightBlinker
|
||||
if not enabled:
|
||||
self.blinker_end_frame = 0
|
||||
if self.last_blinker_on and not blinker_on:
|
||||
self.blinker_end_frame = frame + dragonconf.dpSignalOffDelay
|
||||
apply_steer = common_controller_ctrl(enabled,
|
||||
dragonconf.dpLatCtrl,
|
||||
dragonconf.dpSteeringOnSignal,
|
||||
blinker_on or frame < self.blinker_end_frame,
|
||||
apply_steer)
|
||||
self.last_blinker_on = blinker_on
|
||||
|
||||
|
||||
self.apply_steer_last = apply_steer
|
||||
|
||||
can_sends = []
|
||||
|
||||
@@ -3,7 +3,7 @@ from cereal import car
|
||||
from selfdrive.car.chrysler.values import Ecu, ECU_FINGERPRINT, CAR, FINGERPRINTS
|
||||
from selfdrive.car import STD_CARGO_KG, scale_rot_inertia, scale_tire_stiffness, is_ecu_disconnected, gen_empty_fingerprint
|
||||
from selfdrive.car.interfaces import CarInterfaceBase
|
||||
|
||||
from common.dp_common import common_interface_atl, common_interface_get_params_lqr
|
||||
|
||||
class CarInterface(CarInterfaceBase):
|
||||
@staticmethod
|
||||
@@ -20,6 +20,7 @@ class CarInterface(CarInterfaceBase):
|
||||
ret = CarInterfaceBase.get_std_params(candidate, fingerprint, has_relay)
|
||||
ret.carName = "chrysler"
|
||||
ret.safetyModel = car.CarParams.SafetyModel.chrysler
|
||||
ret.lateralTuning.init('pid')
|
||||
|
||||
# Chrysler port is a community feature, since we don't own one to test
|
||||
ret.communityFeature = True
|
||||
@@ -40,6 +41,9 @@ class CarInterface(CarInterfaceBase):
|
||||
ret.steerRatio = 12.7
|
||||
ret.steerActuatorDelay = 0.2 # in seconds
|
||||
|
||||
# dp
|
||||
ret = common_interface_get_params_lqr(ret)
|
||||
|
||||
ret.centerToFront = ret.wheelbase * 0.44
|
||||
|
||||
ret.minSteerSpeed = 3.8 # m/s
|
||||
@@ -60,13 +64,15 @@ class CarInterface(CarInterfaceBase):
|
||||
return ret
|
||||
|
||||
# returns a car.CarState
|
||||
def update(self, c, can_strings):
|
||||
def update(self, c, can_strings, dragonconf):
|
||||
# ******************* do can recv *******************
|
||||
self.cp.update_strings(can_strings)
|
||||
self.cp_cam.update_strings(can_strings)
|
||||
|
||||
ret = self.CS.update(self.cp, self.cp_cam)
|
||||
|
||||
# dp
|
||||
self.dragonconf = dragonconf
|
||||
ret.cruiseState.enabled = common_interface_atl(ret, dragonconf.dpAtl)
|
||||
ret.canValid = self.cp.can_valid and self.cp_cam.can_valid
|
||||
|
||||
# speeds
|
||||
@@ -95,6 +101,6 @@ class CarInterface(CarInterfaceBase):
|
||||
if (self.CS.frame == -1):
|
||||
return [] # if we haven't seen a frame 220, then do not update.
|
||||
|
||||
can_sends = self.CC.update(c.enabled, self.CS, c.actuators, c.cruiseControl.cancel, c.hudControl.visualAlert)
|
||||
can_sends = self.CC.update(c.enabled, self.CS, c.actuators, c.cruiseControl.cancel, c.hudControl.visualAlert, self.dragonconf)
|
||||
|
||||
return can_sends
|
||||
|
||||
@@ -2,7 +2,7 @@ from cereal import car
|
||||
from selfdrive.car import make_can_msg
|
||||
from selfdrive.car.ford.fordcan import create_steer_command, create_lkas_ui, spam_cancel_button
|
||||
from opendbc.can.packer import CANPacker
|
||||
|
||||
from common.dp_common import common_controller_ctrl
|
||||
|
||||
MAX_STEER_DELTA = 1
|
||||
TOGGLE_DEBUG = False
|
||||
@@ -18,13 +18,30 @@ class CarController():
|
||||
self.steer_alert_last = False
|
||||
self.lkas_action = 0
|
||||
|
||||
def update(self, enabled, CS, frame, actuators, visual_alert, pcm_cancel):
|
||||
# dp
|
||||
self.last_blinker_on = False
|
||||
self.blinker_end_frame = 0.
|
||||
|
||||
def update(self, enabled, CS, frame, actuators, visual_alert, pcm_cancel, dragonconf):
|
||||
|
||||
can_sends = []
|
||||
steer_alert = visual_alert == car.CarControl.HUDControl.VisualAlert.steerRequired
|
||||
|
||||
apply_steer = actuators.steer
|
||||
|
||||
# dp
|
||||
blinker_on = CS.out.leftBlinker or CS.out.rightBlinker
|
||||
if not enabled:
|
||||
self.blinker_end_frame = 0
|
||||
if self.last_blinker_on and not blinker_on:
|
||||
self.blinker_end_frame = frame + dragonconf.dpSignalOffDelay
|
||||
apply_steer = common_controller_ctrl(enabled,
|
||||
dragonconf.dpLatCtrl,
|
||||
dragonconf.dpSteeringOnSignal,
|
||||
blinker_on or frame < self.blinker_end_frame,
|
||||
apply_steer)
|
||||
self.last_blinker_on = blinker_on
|
||||
|
||||
if self.enable_camera:
|
||||
|
||||
if pcm_cancel:
|
||||
|
||||
@@ -8,6 +8,9 @@ from selfdrive.car.ford.values import DBC
|
||||
WHEEL_RADIUS = 0.33
|
||||
|
||||
class CarState(CarStateBase):
|
||||
def __init__(self, CP):
|
||||
super().__init__(CP)
|
||||
|
||||
def update(self, cp):
|
||||
ret = car.CarState.new_message()
|
||||
ret.wheelSpeeds.rr = cp.vl["WheelSpeed_CG1"]['WhlRr_W_Meas'] * WHEEL_RADIUS
|
||||
|
||||
@@ -5,7 +5,7 @@ from selfdrive.config import Conversions as CV
|
||||
from selfdrive.car.ford.values import MAX_ANGLE, Ecu, ECU_FINGERPRINT, FINGERPRINTS
|
||||
from selfdrive.car import STD_CARGO_KG, scale_rot_inertia, scale_tire_stiffness, is_ecu_disconnected, gen_empty_fingerprint
|
||||
from selfdrive.car.interfaces import CarInterfaceBase
|
||||
|
||||
from common.dp_common import common_interface_atl, common_interface_get_params_lqr
|
||||
|
||||
class CarInterface(CarInterfaceBase):
|
||||
|
||||
@@ -19,6 +19,7 @@ class CarInterface(CarInterfaceBase):
|
||||
ret.carName = "ford"
|
||||
ret.safetyModel = car.CarParams.SafetyModel.ford
|
||||
ret.dashcamOnly = True
|
||||
ret.lateralTuning.init('pid')
|
||||
|
||||
ret.wheelbase = 2.85
|
||||
ret.steerRatio = 14.8
|
||||
@@ -32,6 +33,9 @@ class CarInterface(CarInterfaceBase):
|
||||
ret.centerToFront = ret.wheelbase * 0.44
|
||||
tire_stiffness_factor = 0.5328
|
||||
|
||||
# dp
|
||||
ret = common_interface_get_params_lqr(ret)
|
||||
|
||||
# TODO: get actual value, for now starting with reasonable value for
|
||||
# civic and scaling by mass and wheelbase
|
||||
ret.rotationalInertia = scale_rot_inertia(ret.mass, ret.wheelbase)
|
||||
@@ -49,12 +53,14 @@ class CarInterface(CarInterfaceBase):
|
||||
return ret
|
||||
|
||||
# returns a car.CarState
|
||||
def update(self, c, can_strings):
|
||||
def update(self, c, can_strings, dragonconf):
|
||||
# ******************* do can recv *******************
|
||||
self.cp.update_strings(can_strings)
|
||||
|
||||
ret = self.CS.update(self.cp)
|
||||
|
||||
# dp
|
||||
self.dragonconf = dragonconf
|
||||
ret.cruiseState.enabled = common_interface_atl(ret, dragonconf.dpAtl)
|
||||
ret.canValid = self.cp.can_valid
|
||||
|
||||
# events
|
||||
@@ -73,7 +79,7 @@ class CarInterface(CarInterfaceBase):
|
||||
def apply(self, c):
|
||||
|
||||
can_sends = self.CC.update(c.enabled, self.CS, self.frame, c.actuators,
|
||||
c.hudControl.visualAlert, c.cruiseControl.cancel)
|
||||
c.hudControl.visualAlert, c.cruiseControl.cancel, self.dragonconf)
|
||||
|
||||
self.frame += 1
|
||||
return can_sends
|
||||
|
||||
@@ -6,6 +6,7 @@ from selfdrive.car import apply_std_steer_torque_limits
|
||||
from selfdrive.car.gm import gmcan
|
||||
from selfdrive.car.gm.values import DBC, CanBus
|
||||
from opendbc.can.packer import CANPacker
|
||||
from common.dp_common import common_controller_ctrl
|
||||
|
||||
VisualAlert = car.CarControl.HUDControl.VisualAlert
|
||||
|
||||
@@ -51,8 +52,12 @@ class CarController():
|
||||
self.packer_obj = CANPacker(DBC[CP.carFingerprint]['radar'])
|
||||
self.packer_ch = CANPacker(DBC[CP.carFingerprint]['chassis'])
|
||||
|
||||
# dp
|
||||
self.last_blinker_on = False
|
||||
self.blinker_end_frame = 0.
|
||||
|
||||
def update(self, enabled, CS, frame, actuators,
|
||||
hud_v_cruise, hud_show_lanes, hud_show_car, hud_alert):
|
||||
hud_v_cruise, hud_show_lanes, hud_show_car, hud_alert, dragonconf):
|
||||
|
||||
P = self.params
|
||||
|
||||
@@ -69,6 +74,19 @@ class CarController():
|
||||
else:
|
||||
apply_steer = 0
|
||||
|
||||
# dp
|
||||
blinker_on = CS.out.leftBlinker or CS.out.rightBlinker
|
||||
if not enabled:
|
||||
self.blinker_end_frame = 0
|
||||
if self.last_blinker_on and not blinker_on:
|
||||
self.blinker_end_frame = frame + dragonconf.dpSignalOffDelay
|
||||
apply_steer = common_controller_ctrl(enabled,
|
||||
dragonconf.dpLatCtrl,
|
||||
dragonconf.dpSteeringOnSignal,
|
||||
blinker_on or frame < self.blinker_end_frame,
|
||||
apply_steer)
|
||||
self.last_blinker_on = blinker_on
|
||||
|
||||
self.apply_steer_last = apply_steer
|
||||
idx = (frame // P.STEER_STEP) % 4
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ from selfdrive.car.gm.values import CAR, Ecu, ECU_FINGERPRINT, CruiseButtons, \
|
||||
AccState, FINGERPRINTS
|
||||
from selfdrive.car import STD_CARGO_KG, scale_rot_inertia, scale_tire_stiffness, is_ecu_disconnected, gen_empty_fingerprint
|
||||
from selfdrive.car.interfaces import CarInterfaceBase
|
||||
from common.dp_common import common_interface_atl, common_interface_get_params_lqr
|
||||
|
||||
ButtonType = car.CarState.ButtonEvent.Type
|
||||
EventName = car.CarEvent.EventName
|
||||
@@ -21,6 +22,7 @@ class CarInterface(CarInterfaceBase):
|
||||
ret.carName = "gm"
|
||||
ret.safetyModel = car.CarParams.SafetyModel.gm # default to gm
|
||||
ret.enableCruise = False # stock cruise control is kept off
|
||||
ret.lateralTuning.init('pid')
|
||||
|
||||
# GM port is considered a community feature, since it disables AEB;
|
||||
# TODO: make a port that uses a car harness and it only intercepts the camera
|
||||
@@ -92,6 +94,9 @@ class CarInterface(CarInterfaceBase):
|
||||
ret.steerRatioRear = 0.
|
||||
ret.centerToFront = ret.wheelbase * 0.49
|
||||
|
||||
# dp
|
||||
ret = common_interface_get_params_lqr(ret)
|
||||
|
||||
# TODO: get actual value, for now starting with reasonable value for
|
||||
# civic and scaling by mass and wheelbase
|
||||
ret.rotationalInertia = scale_rot_inertia(ret.mass, ret.wheelbase)
|
||||
@@ -115,11 +120,13 @@ class CarInterface(CarInterfaceBase):
|
||||
return ret
|
||||
|
||||
# returns a car.CarState
|
||||
def update(self, c, can_strings):
|
||||
def update(self, c, can_strings, dragonconf):
|
||||
self.cp.update_strings(can_strings)
|
||||
|
||||
ret = self.CS.update(self.cp)
|
||||
|
||||
# dp
|
||||
self.dragonconf = dragonconf
|
||||
ret.cruiseState.enabled = common_interface_atl(ret, dragonconf.dpAtl)
|
||||
ret.canValid = self.cp.can_valid
|
||||
ret.steeringRateLimited = self.CC.steer_rate_limited if self.CC is not None else False
|
||||
|
||||
@@ -188,7 +195,7 @@ class CarInterface(CarInterfaceBase):
|
||||
can_sends = self.CC.update(enabled, self.CS, self.frame,
|
||||
c.actuators,
|
||||
hud_v_cruise, c.hudControl.lanesVisible,
|
||||
c.hudControl.leadVisible, c.hudControl.visualAlert)
|
||||
c.hudControl.leadVisible, c.hudControl.visualAlert, self.dragonconf)
|
||||
|
||||
self.frame += 1
|
||||
return can_sends
|
||||
|
||||
@@ -7,6 +7,7 @@ from selfdrive.car import create_gas_command
|
||||
from selfdrive.car.honda import hondacan
|
||||
from selfdrive.car.honda.values import CruiseButtons, CAR, VISUAL_HUD
|
||||
from opendbc.can.packer import CANPacker
|
||||
from common.dp_common import common_controller_ctrl
|
||||
|
||||
VisualAlert = car.CarControl.HUDControl.VisualAlert
|
||||
|
||||
@@ -72,7 +73,7 @@ def process_hud_alert(hud_alert):
|
||||
|
||||
HUDData = namedtuple("HUDData",
|
||||
["pcm_accel", "v_cruise", "car",
|
||||
"lanes", "fcw", "acc_alert", "steer_required"])
|
||||
"lanes", "fcw", "acc_alert", "steer_required", "dashed_lanes"])
|
||||
|
||||
class CarControllerParams():
|
||||
def __init__(self, CP):
|
||||
@@ -96,9 +97,13 @@ class CarController():
|
||||
|
||||
self.params = CarControllerParams(CP)
|
||||
|
||||
def update(self, enabled, CS, frame, actuators,
|
||||
pcm_speed, pcm_override, pcm_cancel_cmd, pcm_accel,
|
||||
hud_v_cruise, hud_show_lanes, hud_show_car, hud_alert):
|
||||
# dp
|
||||
self.last_blinker_on = False
|
||||
self.blinker_end_frame = 0.
|
||||
|
||||
def update(self, enabled, CS, frame, actuators, \
|
||||
pcm_speed, pcm_override, pcm_cancel_cmd, pcm_accel, \
|
||||
hud_v_cruise, hud_show_lanes, dragonconf, hud_show_car, hud_alert):
|
||||
|
||||
P = self.params
|
||||
|
||||
@@ -114,7 +119,7 @@ class CarController():
|
||||
self.brake_last = rate_limit(brake, self.brake_last, -2., DT_CTRL)
|
||||
|
||||
# vehicle hud display, wait for one update from 10Hz 0x304 msg
|
||||
if hud_show_lanes:
|
||||
if hud_show_lanes and CS.lkMode:
|
||||
hud_lanes = 1
|
||||
else:
|
||||
hud_lanes = 0
|
||||
@@ -130,7 +135,7 @@ class CarController():
|
||||
fcw_display, steer_required, acc_alert = process_hud_alert(hud_alert)
|
||||
|
||||
hud = HUDData(int(pcm_accel), int(round(hud_v_cruise)), hud_car,
|
||||
hud_lanes, fcw_display, acc_alert, steer_required)
|
||||
hud_lanes, fcw_display, acc_alert, steer_required, CS.lkMode)
|
||||
|
||||
# **** process the car messages ****
|
||||
|
||||
@@ -139,11 +144,24 @@ class CarController():
|
||||
apply_brake = int(clip(self.brake_last * P.BRAKE_MAX, 0, P.BRAKE_MAX - 1))
|
||||
apply_steer = int(interp(-actuators.steer * P.STEER_MAX, P.STEER_LOOKUP_BP, P.STEER_LOOKUP_V))
|
||||
|
||||
lkas_active = enabled and not CS.steer_not_allowed
|
||||
lkas_active = enabled and not CS.steer_not_allowed and CS.lkMode
|
||||
|
||||
# Send CAN commands.
|
||||
can_sends = []
|
||||
|
||||
# dp
|
||||
blinker_on = CS.out.leftBlinker or CS.out.rightBlinker
|
||||
if not enabled:
|
||||
self.blinker_end_frame = 0
|
||||
if self.last_blinker_on and not blinker_on:
|
||||
self.blinker_end_frame = frame + dragonconf.dpSignalOffDelay
|
||||
apply_steer = common_controller_ctrl(enabled,
|
||||
dragonconf.dpLatCtrl,
|
||||
dragonconf.dpSteeringOnSignal,
|
||||
blinker_on or frame < self.blinker_end_frame,
|
||||
apply_steer)
|
||||
self.last_blinker_on = blinker_on
|
||||
|
||||
# Send steering command.
|
||||
idx = frame % 4
|
||||
can_sends.append(hondacan.create_steering_control(self.packer, apply_steer,
|
||||
@@ -158,8 +176,10 @@ class CarController():
|
||||
if (frame % 2) == 0:
|
||||
idx = frame // 2
|
||||
can_sends.append(hondacan.create_bosch_supplemental_1(self.packer, CS.CP.carFingerprint, idx, CS.CP.isPandaBlack))
|
||||
if dragonconf.dpAtl:
|
||||
pass
|
||||
# If using stock ACC, spam cancel command to kill gas when OP disengages.
|
||||
if pcm_cancel_cmd:
|
||||
elif not dragonconf.dpAllowGas and pcm_cancel_cmd:
|
||||
can_sends.append(hondacan.spam_buttons_command(self.packer, CruiseButtons.CANCEL, idx, CS.CP.carFingerprint, CS.CP.isPandaBlack))
|
||||
elif CS.out.cruiseState.standstill:
|
||||
can_sends.append(hondacan.spam_buttons_command(self.packer, CruiseButtons.RES_ACCEL, idx, CS.CP.carFingerprint, CS.CP.isPandaBlack))
|
||||
|
||||
@@ -172,6 +172,9 @@ class CarState(CarStateBase):
|
||||
self.v_cruise_pcm_prev = 0
|
||||
self.cruise_mode = 0
|
||||
|
||||
#dp
|
||||
self.lkMode = True
|
||||
|
||||
def update(self, cp, cp_cam):
|
||||
ret = car.CarState.new_message()
|
||||
|
||||
@@ -227,6 +230,14 @@ class CarState(CarStateBase):
|
||||
ret.steeringAngle = cp.vl["STEERING_SENSORS"]['STEER_ANGLE']
|
||||
ret.steeringRate = cp.vl["STEERING_SENSORS"]['STEER_ANGLE_RATE']
|
||||
|
||||
# dp - when user presses LKAS button on steering wheel
|
||||
if self.cruise_setting == 1:
|
||||
if cp.vl["SCM_BUTTONS"]["CRUISE_SETTING"] == 0:
|
||||
if self.lkMode:
|
||||
self.lkMode = False
|
||||
else:
|
||||
self.lkMode = True
|
||||
|
||||
self.cruise_setting = cp.vl["SCM_BUTTONS"]['CRUISE_SETTING']
|
||||
self.cruise_buttons = cp.vl["SCM_BUTTONS"]['CRUISE_BUTTONS']
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ from selfdrive.car.honda.values import CruiseButtons, CAR, HONDA_BOSCH, Ecu, ECU
|
||||
from selfdrive.car import STD_CARGO_KG, CivicParams, scale_rot_inertia, scale_tire_stiffness, is_ecu_disconnected, gen_empty_fingerprint
|
||||
from selfdrive.controls.lib.planner import _A_CRUISE_MAX_V_FOLLOWING
|
||||
from selfdrive.car.interfaces import CarInterfaceBase
|
||||
from common.dp_common import common_interface_atl, common_interface_get_params_lqr
|
||||
|
||||
A_ACC_MAX = max(_A_CRUISE_MAX_V_FOLLOWING)
|
||||
|
||||
@@ -122,6 +123,7 @@ class CarInterface(CarInterfaceBase):
|
||||
def get_params(candidate, fingerprint=gen_empty_fingerprint(), has_relay=False, car_fw=[]): # pylint: disable=dangerous-default-value
|
||||
ret = CarInterfaceBase.get_std_params(candidate, fingerprint, has_relay)
|
||||
ret.carName = "honda"
|
||||
ret.lateralTuning.init('pid')
|
||||
|
||||
if candidate in HONDA_BOSCH:
|
||||
ret.safetyModel = car.CarParams.SafetyModel.hondaBoschHarness if has_relay else car.CarParams.SafetyModel.hondaBoschGiraffe
|
||||
@@ -270,9 +272,9 @@ class CarInterface(CarInterfaceBase):
|
||||
ret.wheelbase = 2.66
|
||||
ret.centerToFront = ret.wheelbase * 0.41
|
||||
ret.steerRatio = 16.0 # 12.3 is spec end-to-end
|
||||
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 4096], [0, 4096]] # TODO: determine if there is a dead zone at the top end
|
||||
ret.lateralParams.torqueBP, ret.lateralParams.torqueV = [[0, 3840], [0, 3840]] # TODO: determine if there is a dead zone at the top end
|
||||
tire_stiffness_factor = 0.677
|
||||
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.6], [0.18]]
|
||||
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.68], [0.26]]
|
||||
ret.longitudinalTuning.kpBP = [0., 5., 35.]
|
||||
ret.longitudinalTuning.kpV = [1.2, 0.8, 0.5]
|
||||
ret.longitudinalTuning.kiBP = [0., 35.]
|
||||
@@ -393,6 +395,9 @@ class CarInterface(CarInterfaceBase):
|
||||
else:
|
||||
raise ValueError("unsupported car %s" % candidate)
|
||||
|
||||
# dp
|
||||
ret = common_interface_get_params_lqr(ret)
|
||||
|
||||
# min speed to enable ACC. if car can do stop and go, then set enabling speed
|
||||
# to a negative value, so it won't matter. Otherwise, add 0.5 mph margin to not
|
||||
# conflict with PCM acc
|
||||
@@ -422,13 +427,15 @@ class CarInterface(CarInterfaceBase):
|
||||
return ret
|
||||
|
||||
# returns a car.CarState
|
||||
def update(self, c, can_strings):
|
||||
def update(self, c, can_strings, dragonconf):
|
||||
# ******************* do can recv *******************
|
||||
self.cp.update_strings(can_strings)
|
||||
self.cp_cam.update_strings(can_strings)
|
||||
|
||||
ret = self.CS.update(self.cp, self.cp_cam)
|
||||
|
||||
# dp
|
||||
self.dragonconf = dragonconf
|
||||
ret.cruiseState.enabled = common_interface_atl(ret, dragonconf.dpAtl)
|
||||
ret.canValid = self.cp.can_valid and self.cp_cam.can_valid
|
||||
ret.yawRate = self.VM.yaw_rate(ret.steeringAngle * CV.DEG_TO_RAD, ret.vEgo)
|
||||
# FIXME: read sendcan for brakelights
|
||||
@@ -436,6 +443,9 @@ class CarInterface(CarInterfaceBase):
|
||||
ret.brakeLights = bool(self.CS.brake_switch or
|
||||
c.actuators.brake > brakelights_threshold)
|
||||
|
||||
# dp
|
||||
ret.lkMode = self.CS.lkMode
|
||||
|
||||
buttonEvents = []
|
||||
|
||||
if self.CS.cruise_buttons != self.CS.prev_cruise_buttons:
|
||||
@@ -474,6 +484,8 @@ class CarInterface(CarInterfaceBase):
|
||||
|
||||
# events
|
||||
events = self.create_common_events(ret, pcm_enable=False)
|
||||
if not self.CS.lkMode or (dragonconf.dpAtl and ret.vEgo <= self.CP.minEnableSpeed):
|
||||
events.add(EventName.manualSteeringRequired)
|
||||
if self.CS.brake_error:
|
||||
events.add(EventName.brakeUnavailable)
|
||||
if self.CS.brake_hold and self.CS.CP.carFingerprint not in HONDA_BOSCH:
|
||||
@@ -490,8 +502,8 @@ class CarInterface(CarInterfaceBase):
|
||||
and (c.actuators.brake <= 0. or not self.CP.openpilotLongitudinalControl):
|
||||
# non loud alert if cruise disables below 25mph as expected (+ a little margin)
|
||||
if ret.vEgo < self.CP.minEnableSpeed + 2.:
|
||||
events.add(EventName.speedTooLow)
|
||||
else:
|
||||
# events.add(EventName.speedTooLow)
|
||||
# else:
|
||||
events.add(EventName.cruiseDisabled)
|
||||
if self.CS.CP.minEnableSpeed > 0 and ret.vEgo < 0.001:
|
||||
events.add(EventName.manualRestart)
|
||||
@@ -547,6 +559,7 @@ class CarInterface(CarInterfaceBase):
|
||||
pcm_accel,
|
||||
hud_v_cruise,
|
||||
c.hudControl.lanesVisible,
|
||||
self.dragonconf,
|
||||
hud_show_car=c.hudControl.leadVisible,
|
||||
hud_alert=c.hudControl.visualAlert)
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ FINGERPRINTS = {
|
||||
148: 8, 228: 5, 304: 8, 330: 8, 344: 8, 380: 8, 399: 7, 401: 8, 420: 8, 427: 3, 432: 7, 441: 5, 446: 3, 450: 8, 464: 8, 477: 8, 479: 8, 495: 8, 545: 6, 662: 4, 773: 7, 777: 8, 780: 8, 804: 8, 806: 8, 808: 8, 829: 5, 862: 8, 884: 8, 891: 8, 927: 8, 929: 8, 1302: 8, 1600: 5, 1601: 8, 1652: 8
|
||||
}],
|
||||
CAR.ACCORDH: [{
|
||||
148: 8, 228: 5, 304: 8, 330: 8, 344: 8, 380: 8, 387: 8, 388: 8, 399: 7, 419: 8, 420: 8, 427: 3, 432: 7, 441: 5, 450: 8, 464: 8, 477: 8, 479: 8, 495: 8, 525: 8, 545: 6, 662: 4, 773: 7, 777: 8, 780: 8, 804: 8, 806: 8, 808: 8, 829: 5, 862: 8, 884: 8, 891: 8, 927: 8, 929: 8, 1302: 8, 1600: 5, 1601: 8, 1652: 8
|
||||
148: 8, 228: 5, 304: 8, 330: 8, 344: 8, 380: 8, 387: 8, 388: 8, 399: 7, 408: 6, 419: 8, 420: 8, 427: 3, 432: 7, 441: 5, 450: 8, 464: 8, 475: 8, 477: 8, 479: 8, 481: 8, 495: 8, 525: 8, 545: 6, 662: 4, 773: 7, 777: 8, 780: 8, 804: 8, 806: 8, 808: 8, 829: 5, 862: 8, 884: 8, 891: 8, 927: 8, 929: 8, 1302: 8, 1416: 5, 1600: 5, 1601: 8, 1652: 8
|
||||
}],
|
||||
CAR.ACURA_ILX: [{
|
||||
57: 3, 145: 8, 228: 5, 304: 8, 316: 8, 342: 6, 344: 8, 380: 8, 398: 3, 399: 7, 419: 8, 420: 8, 422: 8, 428: 8, 432: 7, 464: 8, 476: 4, 490: 8, 506: 8, 512: 6, 513: 6, 542: 7, 545: 4, 597: 8, 660: 8, 773: 7, 777: 8, 780: 8, 800: 8, 804: 8, 808: 8, 819: 7, 821: 5, 829: 5, 882: 2, 884: 7, 887: 8, 888: 8, 892: 8, 923: 2, 929: 4, 983: 8, 985: 3, 1024: 5, 1027: 5, 1029: 8, 1030: 5, 1034: 5, 1036: 8, 1039: 8, 1057: 5, 1064: 7, 1108: 8, 1365: 5,
|
||||
@@ -83,8 +83,12 @@ FINGERPRINTS = {
|
||||
CAR.CRV: [{
|
||||
57: 3, 145: 8, 316: 8, 340: 8, 342: 6, 344: 8, 380: 8, 398: 3, 399: 6, 401: 8, 404: 4, 420: 8, 422: 8, 426: 8, 432: 7, 464: 8, 474: 5, 476: 4, 487: 4, 490: 8, 493: 3, 506: 8, 507: 1, 512: 6, 513: 6, 542: 7, 545: 4, 597: 8, 660: 8, 661: 4, 773: 7, 777: 8, 780: 8, 800: 8, 804: 8, 808: 8, 829: 5, 882: 2, 884: 7, 888: 8, 891: 8, 892: 8, 923: 2, 929: 8, 983: 8, 985: 3, 1024: 5, 1027: 5, 1029: 8, 1033: 5, 1036: 8, 1039: 8, 1057: 5, 1064: 7, 1108: 8, 1125: 8, 1296: 8, 1365: 5, 1424: 5, 1600: 5, 1601: 8,
|
||||
}],
|
||||
CAR.CRV_5G: [{
|
||||
57: 3, 148: 8, 199: 4, 228: 5, 231: 5, 232: 7, 304: 8, 330: 8, 340: 8, 344: 8, 380: 8, 399: 7, 401: 8, 420: 8, 423: 2, 427: 3, 428: 8, 432: 7, 441: 5, 446: 3, 450: 8, 464: 8, 467: 2, 469: 3, 470: 2, 474: 8, 476: 7, 477: 8, 479: 8, 490: 8, 493: 5, 495: 8, 507: 1, 545: 6, 597: 8, 661: 4, 662: 4, 773: 7, 777: 8, 780: 8, 795: 8, 800: 8, 804: 8, 806: 8, 808: 8, 814: 4, 815: 8, 817: 4, 825: 4, 829: 5, 862: 8, 881: 8, 882: 4, 884: 8, 888: 8, 891: 8, 927: 8, 918: 7, 929: 8, 983: 8, 985: 3, 1024: 5, 1027: 5, 1029: 8, 1036: 8, 1039: 8, 1064: 7, 1108: 8, 1092: 1, 1115: 2, 1125: 8, 1127: 2, 1296: 8, 1302: 8, 1322: 5, 1361: 5, 1365: 5, 1424: 5, 1600: 5, 1601: 8, 1618: 5, 1633: 8, 1670: 5
|
||||
CAR.CRV_5G: [
|
||||
{
|
||||
57: 3, 148: 8, 199: 4, 228: 5, 231: 5, 232: 7, 304: 8, 330: 8, 340: 8, 344: 8, 380: 8, 399: 7, 401: 8, 420: 8, 423: 2, 427: 3, 428: 8, 432: 7, 441: 5, 446: 3, 450: 8, 464: 8, 467: 2, 469: 3, 470: 2, 474: 8, 476: 7, 477: 8, 479: 8, 490: 8, 493: 5, 495: 8, 507: 1, 545: 6, 597: 8, 661: 4, 662: 4, 773: 7, 777: 8, 780: 8, 795: 8, 800: 8, 804: 8, 806: 8, 808: 8, 814: 4, 815: 8, 817: 4, 825: 4, 829: 5, 862: 8, 881: 8, 882: 4, 884: 8, 888: 8, 891: 8, 927: 8, 918: 7, 929: 8, 983: 8, 985: 3, 1024: 5, 1027: 5, 1029: 8, 1036: 8, 1039: 8, 1040: 6, 1056: 8, 1064: 7, 1088: 3, 1108: 8, 1092: 1, 1115: 2, 1125: 8, 1127: 2, 1296: 8, 1302: 8, 1322: 5, 1361: 5, 1365: 5, 1424: 5, 1600: 5, 1601: 8, 1618: 5, 1626: 5, 1627: 5, 1633: 8, 1670: 5
|
||||
},
|
||||
{
|
||||
57: 3, 148: 8, 199: 4, 228: 5, 231: 5, 232: 7, 304: 8, 330: 8, 340: 8, 344: 8, 380: 8, 399: 7, 401: 8, 420: 8, 423: 2, 427: 3, 428: 8, 432: 7, 441: 5, 446: 3, 450: 8, 464: 8, 467: 2, 469: 3, 470: 2, 474: 8, 476: 7, 477: 8, 479: 8, 490: 8, 493: 5, 495: 8, 507: 1, 545: 6, 597: 8, 661: 4, 662: 4, 773: 7, 777: 8, 780: 8, 795: 8, 800: 8, 804: 8, 806: 8, 808: 8, 814: 4, 815: 8, 817: 4, 825: 4, 829: 5, 862: 8, 881: 8, 882: 4, 884: 8, 888: 8, 891: 8, 927: 8, 918: 7, 929: 8, 983: 8, 985: 3, 1024: 4, 1027: 5, 1029: 8, 1036: 8, 1039: 8, 1040: 6, 1056: 8, 1064: 7, 1088: 3, 1108: 8, 1092: 1, 1115: 2, 1125: 8, 1127: 2, 1296: 8, 1302: 8, 1322: 5, 1361: 5, 1365: 5, 1424: 5, 1600: 5, 1601: 8, 1618: 5, 1626: 5, 1627: 5, 1633: 8, 1670: 5
|
||||
}],
|
||||
# 1057: 5 1024: 5 are also on the OBD2 bus. their lengths differ from the camera's f-can bus. re-fingerprint after obd2 connection is split in panda firmware from bus 1.
|
||||
CAR.CRV_EU: [{
|
||||
@@ -92,6 +96,10 @@ FINGERPRINTS = {
|
||||
}],
|
||||
CAR.CRV_HYBRID: [{
|
||||
57: 3, 148: 8, 228: 5, 304: 8, 330: 8, 344: 8, 380: 8, 387: 8, 388: 8, 399: 7, 408: 6, 415: 6, 419: 8, 420: 8, 427: 3, 428: 8, 432: 7, 441: 5, 450: 8, 464: 8, 477: 8, 479: 8, 490: 8, 495: 8, 525: 8, 531: 8, 545: 6, 662: 4, 773: 7, 777: 8, 780: 8, 804: 8, 806: 8, 808: 8, 814: 4, 829: 5, 833: 6, 862: 8, 884: 8, 891: 8, 927: 8, 929: 8, 930: 8, 931: 8, 1302: 8, 1361: 5, 1365: 5, 1600: 5, 1601: 8, 1626: 5, 1627: 5
|
||||
},
|
||||
{
|
||||
# honda breeze hybrid
|
||||
57: 3, 148: 8, 228: 5, 229: 8, 304: 8, 330: 8, 344: 8, 380: 8, 387: 8, 388: 8, 399: 7, 419: 8, 420: 8, 427: 3, 432: 7, 441: 5, 450: 8, 464: 8, 477: 8, 479: 8, 490: 8, 495: 8, 513: 8, 525: 8, 531: 8, 545: 6, 560: 8, 576: 8, 577: 8, 579: 8, 580: 8, 582: 8, 583: 8, 585: 8, 586: 8, 640: 8, 641: 8, 642: 8, 643: 8, 644: 8, 645: 8, 646: 8, 647: 8, 648: 8, 649: 8, 650: 8, 651: 8, 652: 8, 653: 8, 654: 8, 655: 8, 656: 8, 657: 8, 658: 8, 659: 8, 660: 8, 661: 8, 662: 4, 663: 8, 712: 8, 713: 8, 714: 8, 715: 8, 716: 8, 717: 8, 718: 8, 719: 8, 720: 8, 721: 8, 722: 8, 723: 8, 724: 8, 725: 8, 726: 8, 727: 8, 728: 8, 729: 8, 730: 8, 731: 8, 732: 8, 733: 8, 734: 8, 735: 8, 736: 8, 737: 8, 738: 8, 739: 8, 740: 8, 741: 8, 742: 8, 743: 8, 744: 8, 745: 8, 746: 8, 747: 8, 748: 8, 749: 8, 750: 8, 751: 8, 752: 8, 753: 8, 754: 8, 755: 8, 756: 8, 757: 8, 758: 8, 759: 8, 760: 8, 761: 8, 762: 8, 763: 8, 764: 8, 765: 8, 766: 8, 767: 8, 773: 7, 777: 8, 780: 8, 804: 8, 806: 8, 808: 8, 814: 4, 829: 5, 833: 6, 862: 8, 884: 8, 891: 8, 927: 8, 929: 8, 985: 3, 1024: 4, 1040: 6, 1056: 8, 1302: 8, 1361: 5, 1365: 5, 1600: 5, 1601: 8, 1641: 8, 1872: 8
|
||||
}],
|
||||
CAR.FIT: [{
|
||||
57: 3, 145: 8, 228: 5, 304: 8, 342: 6, 344: 8, 380: 8, 399: 7, 401: 8, 420: 8, 422: 8, 427: 3, 428: 8, 432: 7, 464: 8, 487: 4, 490: 8, 506: 8, 597: 8, 660: 8, 661: 4, 773: 7, 777: 8, 780: 8, 800: 8, 804: 8, 808: 8, 829: 5, 862: 8, 884: 7, 892: 8, 929: 8, 985: 3, 1024: 5, 1027: 5, 1029: 8, 1036: 8, 1039: 8, 1108: 8, 1322: 5, 1361: 5, 1365: 5, 1424: 5, 1600: 5, 1601: 8
|
||||
@@ -109,6 +117,10 @@ FINGERPRINTS = {
|
||||
}],
|
||||
CAR.ODYSSEY_CHN: [{
|
||||
57: 3, 145: 8, 316: 8, 342: 6, 344: 8, 380: 8, 398: 3, 399: 7, 401: 8, 404: 4, 411: 5, 420: 8, 422: 8, 423: 2, 426: 8, 432: 7, 450: 8, 464: 8, 490: 8, 506: 8, 507: 1, 512: 6, 513: 6, 597: 8, 610: 8, 611: 8, 612: 8, 617: 8, 660: 8, 661: 4, 773: 7, 780: 8, 804: 8, 808: 8, 829: 5, 862: 8, 884: 7, 892: 8, 923: 2, 929: 8, 1030: 5, 1137: 8, 1302: 8, 1348: 5, 1361: 5, 1365: 5, 1600: 5, 1601: 8, 1639: 8
|
||||
},
|
||||
# Odyssey from Shell
|
||||
{
|
||||
57: 3, 145: 8, 316: 8, 342: 6, 344: 8, 380: 8, 398: 3, 399: 7, 401: 8, 408: 6, 411: 5, 415: 6, 420: 8, 422: 8, 423: 2, 426: 8, 432: 7, 450: 8, 464: 8, 490: 8, 507: 1, 597: 8, 610: 8, 611: 8, 612: 8, 617: 8, 660: 8, 661: 4, 773: 7, 804: 8, 808: 8, 884: 7, 892: 8, 923: 2, 929: 8, 1030: 5, 1137: 8, 1302: 8, 1348: 5, 1361: 5, 1365: 5, 1639: 8
|
||||
}],
|
||||
# 2017 Pilot Touring AND 2016 Pilot EX-L w/ Added Comma Pedal Support (512L & 513L)
|
||||
CAR.PILOT: [{
|
||||
@@ -421,6 +433,7 @@ FW_VERSIONS = {
|
||||
b'37805-5AN-AJ30\x00\x00',
|
||||
b'37805-5AN-AK20\x00\x00',
|
||||
b'37805-5AN-AR20\x00\x00',
|
||||
b'37805-5AN-E410\x00\x00', # AlexNoop's Manual CIVIC_BOSCH
|
||||
b'37805-5AN-L940\x00\x00',
|
||||
b'37805-5AN-LF20\x00\x00',
|
||||
b'37805-5AN-LH20\x00\x00',
|
||||
@@ -459,8 +472,8 @@ FW_VERSIONS = {
|
||||
b'57114-TGG-C320\x00\x00',
|
||||
b'57114-TGG-L320\x00\x00',
|
||||
b'57114-TGG-L330\x00\x00',
|
||||
b'57114-TGL-G130\x00\x00', # AlexNoop's Manual CIVIC_BOSCH
|
||||
b'57114-TGL-G330\x00\x00',
|
||||
|
||||
],
|
||||
(Ecu.eps, 0x18da30f1, None): [
|
||||
b'39990-TBA-C020\x00\x00',
|
||||
@@ -468,6 +481,7 @@ FW_VERSIONS = {
|
||||
b'39990-TEZ-T020\x00\x00',
|
||||
b'39990-TGG-A020\x00\x00',
|
||||
b'39990-TGG-A120\x00\x00',
|
||||
b'39990-TGN-E120\x00\x00', # AlexNoop's Manual CIVIC_BOSCH
|
||||
b'39990-TGL-E130\x00\x00',
|
||||
],
|
||||
(Ecu.srs, 0x18da53f1, None): [
|
||||
@@ -476,6 +490,7 @@ FW_VERSIONS = {
|
||||
b'77959-TGG-A020\x00\x00',
|
||||
b'77959-TGG-A030\x00\x00',
|
||||
b'77959-TGG-G010\x00\x00',
|
||||
b'77959-TGG-A020\x00\x00',
|
||||
],
|
||||
(Ecu.combinationMeter, 0x18da60f1, None): [
|
||||
b'78109-TBA-A110\x00\x00',
|
||||
@@ -493,10 +508,12 @@ FW_VERSIONS = {
|
||||
b'78109-TGG-A620\x00\x00',
|
||||
b'78109-TGG-A810\x00\x00',
|
||||
b'78109-TGG-A820\x00\x00',
|
||||
b'78109-TGG-BA10\x00\x00', # AlexNoop's Manual CIVIC_BOSCH
|
||||
b'78109-TGL-G120\x00\x00',
|
||||
],
|
||||
(Ecu.fwdRadar, 0x18dab0f1, None): [
|
||||
b'36802-TBA-A150\x00\x00',
|
||||
b'36802-TGG-G040\x00\x00', # AlexNoop's Manual CIVIC_BOSCH
|
||||
b'36802-TFJ-G060\x00\x00',
|
||||
b'36802-TGG-A050\x00\x00',
|
||||
b'36802-TGG-A060\x00\x00',
|
||||
@@ -511,6 +528,7 @@ FW_VERSIONS = {
|
||||
b'36161-TGG-A080\x00\x00',
|
||||
b'36161-TGG-A120\x00\x00',
|
||||
b'36161-TGL-G050\x00\x00',
|
||||
b'36161-TGG-G070\x00\x00', # AlexNoop's Manual CIVIC_BOSCH
|
||||
],
|
||||
(Ecu.gateway, 0x18daeff1, None): [
|
||||
b'38897-TBA-A110\x00\x00',
|
||||
@@ -705,6 +723,7 @@ FW_VERSIONS = {
|
||||
(Ecu.gateway, 0x18daeff1, None): [
|
||||
b'38897-THR-A010\x00\x00',
|
||||
b'38897-THR-A020\x00\x00',
|
||||
b'38897-TKN-H030\x00\x00',
|
||||
],
|
||||
(Ecu.programmedFuelInjection, 0x18da10f1, None): [
|
||||
b'37805-5MR-A250\x00\x00',
|
||||
@@ -716,6 +735,7 @@ FW_VERSIONS = {
|
||||
(Ecu.eps, 0x18da30f1, None): [
|
||||
b'39990-THR-A020\x00\x00',
|
||||
b'39990-THR-A030\x00\x00',
|
||||
b'77959-T6A-H140\x00\x00',
|
||||
],
|
||||
(Ecu.srs, 0x18da53f1, None): [
|
||||
b'77959-THR-A010\x00\x00',
|
||||
@@ -761,6 +781,7 @@ FW_VERSIONS = {
|
||||
b'78109-THR-AN10\x00\x00',
|
||||
b'78109-THR-C330\x00\x00',
|
||||
b'78109-THR-CE20\x00\x00',
|
||||
b'78109-TKN-H110\x00\x00'
|
||||
],
|
||||
(Ecu.shiftByWire, 0x18da0bf1, None): [
|
||||
b'54008-THR-A020\x00\x00',
|
||||
|
||||
@@ -4,6 +4,7 @@ from selfdrive.car import apply_std_steer_torque_limits
|
||||
from selfdrive.car.hyundai.hyundaican import create_lkas11, create_clu11, create_lfa_mfa
|
||||
from selfdrive.car.hyundai.values import Buttons, SteerLimitParams, CAR
|
||||
from opendbc.can.packer import CANPacker
|
||||
from common.dp_common import common_controller_ctrl
|
||||
|
||||
VisualAlert = car.CarControl.HUDControl.VisualAlert
|
||||
|
||||
@@ -43,8 +44,12 @@ class CarController():
|
||||
self.steer_rate_limited = False
|
||||
self.last_resume_frame = 0
|
||||
|
||||
# dp
|
||||
self.last_blinker_on = False
|
||||
self.blinker_end_frame = 0.
|
||||
|
||||
def update(self, enabled, CS, frame, actuators, pcm_cancel_cmd, visual_alert,
|
||||
left_lane, right_lane, left_lane_depart, right_lane_depart):
|
||||
left_lane, right_lane, left_lane_depart, right_lane_depart, dragonconf):
|
||||
# Steering Torque
|
||||
new_steer = actuators.steer * SteerLimitParams.STEER_MAX
|
||||
apply_steer = apply_std_steer_torque_limits(new_steer, self.apply_steer_last, CS.out.steeringTorque, SteerLimitParams)
|
||||
@@ -66,6 +71,19 @@ class CarController():
|
||||
process_hud_alert(enabled, self.car_fingerprint, visual_alert,
|
||||
left_lane, right_lane, left_lane_depart, right_lane_depart)
|
||||
|
||||
# dp
|
||||
blinker_on = CS.out.leftBlinker or CS.out.rightBlinker
|
||||
if not enabled:
|
||||
self.blinker_end_frame = 0
|
||||
if self.last_blinker_on and not blinker_on:
|
||||
self.blinker_end_frame = frame + dragonconf.dpSignalOffDelay
|
||||
apply_steer = common_controller_ctrl(enabled,
|
||||
dragonconf.dpLatCtrl,
|
||||
dragonconf.dpSteeringOnSignal,
|
||||
blinker_on or frame < self.blinker_end_frame,
|
||||
apply_steer)
|
||||
self.last_blinker_on = blinker_on
|
||||
|
||||
can_sends = []
|
||||
can_sends.append(create_lkas11(self.packer, frame, self.car_fingerprint, apply_steer, lkas_active,
|
||||
CS.lkas11, sys_warning, sys_state, enabled,
|
||||
|
||||
@@ -8,6 +8,9 @@ GearShifter = car.CarState.GearShifter
|
||||
|
||||
|
||||
class CarState(CarStateBase):
|
||||
def __init__(self, CP):
|
||||
super().__init__(CP)
|
||||
|
||||
def update(self, cp, cp_cam):
|
||||
ret = car.CarState.new_message()
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ from selfdrive.config import Conversions as CV
|
||||
from selfdrive.car.hyundai.values import Ecu, ECU_FINGERPRINT, CAR, FINGERPRINTS
|
||||
from selfdrive.car import STD_CARGO_KG, scale_rot_inertia, scale_tire_stiffness, is_ecu_disconnected, gen_empty_fingerprint
|
||||
from selfdrive.car.interfaces import CarInterfaceBase
|
||||
from common.dp_common import common_interface_atl, common_interface_get_params_lqr
|
||||
|
||||
class CarInterface(CarInterfaceBase):
|
||||
|
||||
@@ -18,6 +19,7 @@ class CarInterface(CarInterfaceBase):
|
||||
ret.carName = "hyundai"
|
||||
ret.safetyModel = car.CarParams.SafetyModel.hyundai
|
||||
ret.radarOffCan = True
|
||||
ret.lateralTuning.init('pid')
|
||||
|
||||
# Most Hyundai car ports are community features for now
|
||||
ret.communityFeature = candidate not in [CAR.SONATA]
|
||||
@@ -144,6 +146,9 @@ class CarInterface(CarInterfaceBase):
|
||||
ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]]
|
||||
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.25], [0.05]]
|
||||
|
||||
# dp
|
||||
ret = common_interface_get_params_lqr(ret)
|
||||
|
||||
# these cars require a special panda safety mode due to missing counters and checksums in the messages
|
||||
if candidate in [CAR.HYUNDAI_GENESIS, CAR.IONIQ_EV_LTD, CAR.IONIQ, CAR.KONA_EV]:
|
||||
ret.safetyModel = car.CarParams.SafetyModel.hyundaiLegacy
|
||||
@@ -163,11 +168,14 @@ class CarInterface(CarInterfaceBase):
|
||||
|
||||
return ret
|
||||
|
||||
def update(self, c, can_strings):
|
||||
def update(self, c, can_strings, dragonconf):
|
||||
self.cp.update_strings(can_strings)
|
||||
self.cp_cam.update_strings(can_strings)
|
||||
|
||||
ret = self.CS.update(self.cp, self.cp_cam)
|
||||
# dp
|
||||
self.dragonconf = dragonconf
|
||||
ret.cruiseState.enabled = common_interface_atl(ret, dragonconf.dpAtl)
|
||||
ret.canValid = self.cp.can_valid and self.cp_cam.can_valid
|
||||
|
||||
# TODO: button presses
|
||||
@@ -192,6 +200,6 @@ class CarInterface(CarInterfaceBase):
|
||||
def apply(self, c):
|
||||
can_sends = self.CC.update(c.enabled, self.CS, self.frame, c.actuators,
|
||||
c.cruiseControl.cancel, c.hudControl.visualAlert, c.hudControl.leftLaneVisible,
|
||||
c.hudControl.rightLaneVisible, c.hudControl.leftLaneDepart, c.hudControl.rightLaneDepart)
|
||||
c.hudControl.rightLaneVisible, c.hudControl.leftLaneDepart, c.hudControl.rightLaneDepart, self.dragonconf)
|
||||
self.frame += 1
|
||||
return can_sends
|
||||
|
||||
+25
-12
@@ -32,6 +32,8 @@ class CarInterfaceBase():
|
||||
if CarController is not None:
|
||||
self.CC = CarController(self.cp.dbc_name, CP, self.VM)
|
||||
|
||||
self.dragonconf = None
|
||||
|
||||
@staticmethod
|
||||
def calc_accel_override(a_ego, a_target, v_ego, v_target):
|
||||
return 1.
|
||||
@@ -77,7 +79,7 @@ class CarInterfaceBase():
|
||||
return ret
|
||||
|
||||
# returns a car.CarState, pass in car.CarControl
|
||||
def update(self, c, can_strings):
|
||||
def update(self, c, can_strings, dragonconf):
|
||||
raise NotImplementedError
|
||||
|
||||
# return sendcan, pass in a car.CarControl
|
||||
@@ -91,26 +93,31 @@ class CarInterfaceBase():
|
||||
events.add(EventName.doorOpen)
|
||||
if cs_out.seatbeltUnlatched:
|
||||
events.add(EventName.seatbeltNotLatched)
|
||||
if cs_out.gearShifter != GearShifter.drive and cs_out.gearShifter not in extra_gears:
|
||||
events.add(EventName.wrongGear)
|
||||
if cs_out.gearShifter == GearShifter.reverse:
|
||||
events.add(EventName.reverseGear)
|
||||
if not cs_out.cruiseState.available:
|
||||
if self.dragonconf.dpGearCheck:
|
||||
if cs_out.gearShifter != GearShifter.drive and cs_out.gearShifter not in extra_gears:
|
||||
events.add(EventName.wrongGear)
|
||||
if cs_out.gearShifter == GearShifter.reverse:
|
||||
events.add(EventName.reverseGear)
|
||||
if not cs_out.cruiseState.available and not self.dragonconf.dpAtl:
|
||||
events.add(EventName.wrongCarMode)
|
||||
if cs_out.espDisabled:
|
||||
events.add(EventName.espDisabled)
|
||||
if cs_out.gasPressed:
|
||||
if cs_out.gasPressed and not self.dragonconf.dpAllowGas and not self.dragonconf.dpAtl:
|
||||
events.add(EventName.gasPressed)
|
||||
if cs_out.stockFcw:
|
||||
events.add(EventName.stockFcw)
|
||||
if cs_out.stockAeb:
|
||||
events.add(EventName.stockAeb)
|
||||
if cs_out.vEgo > MAX_CTRL_SPEED:
|
||||
if cs_out.vEgo > self.dragonconf.dpMaxCtrlSpeed:
|
||||
events.add(EventName.speedTooHigh)
|
||||
if cs_out.cruiseState.nonAdaptive:
|
||||
events.add(EventName.wrongCruiseMode)
|
||||
|
||||
if cs_out.steerError:
|
||||
if not self.dragonconf.dpLatCtrl:
|
||||
events.add(EventName.manualSteeringRequired)
|
||||
elif self.dragonconf.dpSteeringOnSignal and (cs_out.leftBlinker or cs_out.rightBlinker):
|
||||
events.add(EventName.manualSteeringRequiredBlinkersOn)
|
||||
elif cs_out.steerError:
|
||||
events.add(EventName.steerUnavailable)
|
||||
elif cs_out.steerWarning:
|
||||
events.add(EventName.steerTempUnavailable)
|
||||
@@ -118,9 +125,15 @@ class CarInterfaceBase():
|
||||
# Disable on rising edge of gas or brake. Also disable on brake when speed > 0.
|
||||
# Optionally allow to press gas at zero speed to resume.
|
||||
# e.g. Chrysler does not spam the resume button yet, so resuming with gas is handy. FIXME!
|
||||
if (cs_out.gasPressed and (not self.CS.out.gasPressed) and cs_out.vEgo > gas_resume_speed) or \
|
||||
(cs_out.brakePressed and (not self.CS.out.brakePressed or not cs_out.standstill)):
|
||||
events.add(EventName.pedalPressed)
|
||||
if self.dragonconf.dpAtl:
|
||||
pass
|
||||
elif self.dragonconf.dpAllowGas:
|
||||
if cs_out.brakePressed and (not self.CS.out.brakePressed or not cs_out.standstill):
|
||||
events.add(EventName.pedalPressed)
|
||||
else:
|
||||
if (cs_out.gasPressed and (not self.CS.out.gasPressed) and cs_out.vEgo > gas_resume_speed) or \
|
||||
(cs_out.brakePressed and (not self.CS.out.brakePressed or not cs_out.standstill)):
|
||||
events.add(EventName.pedalPressed)
|
||||
|
||||
# we engage when pcm is active (rising edge)
|
||||
if pcm_enable:
|
||||
|
||||
@@ -2,6 +2,7 @@ from selfdrive.car.mazda import mazdacan
|
||||
from selfdrive.car.mazda.values import SteerLimitParams, Buttons
|
||||
from opendbc.can.packer import CANPacker
|
||||
from selfdrive.car import apply_std_steer_torque_limits
|
||||
from common.dp_common import common_controller_ctrl
|
||||
|
||||
class CarController():
|
||||
def __init__(self, dbc_name, CP, VM):
|
||||
@@ -9,7 +10,11 @@ class CarController():
|
||||
self.packer = CANPacker(dbc_name)
|
||||
self.steer_rate_limited = False
|
||||
|
||||
def update(self, enabled, CS, frame, actuators):
|
||||
# dp
|
||||
self.last_blinker_on = False
|
||||
self.blinker_end_frame = 0.
|
||||
|
||||
def update(self, enabled, CS, frame, actuators, dragonconf):
|
||||
""" Controls thread """
|
||||
|
||||
can_sends = []
|
||||
@@ -36,6 +41,19 @@ class CarController():
|
||||
# Send at a rate of 5hz until we sync with stock ACC state
|
||||
can_sends.append(mazdacan.create_button_cmd(self.packer, CS.CP.carFingerprint, Buttons.CANCEL))
|
||||
|
||||
# dp
|
||||
blinker_on = CS.out.leftBlinker or CS.out.rightBlinker
|
||||
if not enabled:
|
||||
self.blinker_end_frame = 0
|
||||
if self.last_blinker_on and not blinker_on:
|
||||
self.blinker_end_frame = frame + dragonconf.dpSignalOffDelay
|
||||
apply_steer = common_controller_ctrl(enabled,
|
||||
dragonconf.dpLatCtrl,
|
||||
dragonconf.dpSteeringOnSignal,
|
||||
blinker_on or frame < self.blinker_end_frame,
|
||||
apply_steer)
|
||||
self.last_blinker_on = blinker_on
|
||||
|
||||
self.apply_steer_last = apply_steer
|
||||
|
||||
can_sends.append(mazdacan.create_steering_control(self.packer, CS.CP.carFingerprint,
|
||||
|
||||
@@ -4,6 +4,7 @@ from selfdrive.config import Conversions as CV
|
||||
from selfdrive.car.mazda.values import CAR, LKAS_LIMITS, FINGERPRINTS, ECU_FINGERPRINT, Ecu
|
||||
from selfdrive.car import STD_CARGO_KG, scale_rot_inertia, scale_tire_stiffness, gen_empty_fingerprint, is_ecu_disconnected
|
||||
from selfdrive.car.interfaces import CarInterfaceBase
|
||||
from common.dp_common import common_interface_atl, common_interface_get_params_lqr
|
||||
|
||||
ButtonType = car.CarState.ButtonEvent.Type
|
||||
EventName = car.CarEvent.EventName
|
||||
@@ -20,6 +21,7 @@ class CarInterface(CarInterfaceBase):
|
||||
|
||||
ret.carName = "mazda"
|
||||
ret.safetyModel = car.CarParams.SafetyModel.mazda
|
||||
ret.lateralTuning.init('pid')
|
||||
|
||||
ret.dashcamOnly = True
|
||||
|
||||
@@ -46,6 +48,9 @@ class CarInterface(CarInterfaceBase):
|
||||
# No steer below disable speed
|
||||
ret.minSteerSpeed = LKAS_LIMITS.DISABLE_SPEED * CV.KPH_TO_MS
|
||||
|
||||
# dp
|
||||
ret = common_interface_get_params_lqr(ret)
|
||||
|
||||
ret.centerToFront = ret.wheelbase * 0.41
|
||||
|
||||
# TODO: get actual value, for now starting with reasonable value for
|
||||
@@ -62,12 +67,15 @@ class CarInterface(CarInterfaceBase):
|
||||
return ret
|
||||
|
||||
# returns a car.CarState
|
||||
def update(self, c, can_strings):
|
||||
def update(self, c, can_strings, dragonconf):
|
||||
|
||||
self.cp.update_strings(can_strings)
|
||||
self.cp_cam.update_strings(can_strings)
|
||||
|
||||
ret = self.CS.update(self.cp, self.cp_cam)
|
||||
# dp
|
||||
self.dragonconf = dragonconf
|
||||
ret.cruiseState.enabled = common_interface_atl(ret, dragonconf.dpAtl)
|
||||
ret.canValid = self.cp.can_valid and self.cp_cam.can_valid
|
||||
|
||||
# TODO: button presses
|
||||
@@ -88,6 +96,6 @@ class CarInterface(CarInterfaceBase):
|
||||
return self.CS.out
|
||||
|
||||
def apply(self, c):
|
||||
can_sends = self.CC.update(c.enabled, self.CS, self.frame, c.actuators)
|
||||
can_sends = self.CC.update(c.enabled, self.CS, self.frame, c.actuators, self.dragonconf)
|
||||
self.frame += 1
|
||||
return can_sends
|
||||
|
||||
@@ -48,7 +48,7 @@ class CarInterface(CarInterfaceBase):
|
||||
return ret
|
||||
|
||||
# returns a car.CarState
|
||||
def update(self, c, can_strings):
|
||||
def update(self, c, can_strings, dragonconf):
|
||||
# get basic data from phone and gps since CAN isn't connected
|
||||
sensors = messaging.recv_sock(self.sensor)
|
||||
if sensors is not None:
|
||||
|
||||
@@ -3,6 +3,7 @@ from common.numpy_fast import clip, interp
|
||||
from selfdrive.car.nissan import nissancan
|
||||
from opendbc.can.packer import CANPacker
|
||||
from selfdrive.car.nissan.values import CAR
|
||||
from common.dp_common import common_controller_ctrl
|
||||
|
||||
# Steer angle limits
|
||||
ANGLE_DELTA_BP = [0., 5., 15.]
|
||||
@@ -23,8 +24,12 @@ class CarController():
|
||||
|
||||
self.packer = CANPacker(dbc_name)
|
||||
|
||||
# dp
|
||||
self.last_blinker_on = False
|
||||
self.blinker_end_frame = 0.
|
||||
|
||||
def update(self, enabled, CS, frame, actuators, cruise_cancel, hud_alert,
|
||||
left_line, right_line, left_lane_depart, right_lane_depart):
|
||||
left_line, right_line, left_lane_depart, right_lane_depart, dragonconf):
|
||||
""" Controls thread """
|
||||
|
||||
# Send CAN commands.
|
||||
@@ -59,6 +64,19 @@ class CarController():
|
||||
apply_angle = CS.out.steeringAngle
|
||||
self.lkas_max_torque = 0
|
||||
|
||||
# dp
|
||||
blinker_on = CS.out.leftBlinker or CS.out.rightBlinker
|
||||
if not enabled:
|
||||
self.blinker_end_frame = 0
|
||||
if self.last_blinker_on and not blinker_on:
|
||||
self.blinker_end_frame = frame + dragonconf.dpSignalOffDelay
|
||||
apply_angle = common_controller_ctrl(enabled,
|
||||
dragonconf.dpLatCtrl,
|
||||
dragonconf.dpSteeringOnSignal,
|
||||
blinker_on or frame < self.blinker_end_frame,
|
||||
apply_angle)
|
||||
self.last_blinker_on = blinker_on
|
||||
|
||||
self.last_angle = apply_angle
|
||||
|
||||
if not enabled and acc_active:
|
||||
|
||||
@@ -3,6 +3,7 @@ from cereal import car
|
||||
from selfdrive.car.nissan.values import CAR
|
||||
from selfdrive.car import STD_CARGO_KG, scale_rot_inertia, scale_tire_stiffness, gen_empty_fingerprint
|
||||
from selfdrive.car.interfaces import CarInterfaceBase
|
||||
from common.dp_common import common_interface_atl, common_interface_get_params_lqr
|
||||
|
||||
class CarInterface(CarInterfaceBase):
|
||||
def __init__(self, CP, CarController, CarState):
|
||||
@@ -19,6 +20,7 @@ class CarInterface(CarInterfaceBase):
|
||||
ret = CarInterfaceBase.get_std_params(candidate, fingerprint, has_relay)
|
||||
ret.carName = "nissan"
|
||||
ret.safetyModel = car.CarParams.SafetyModel.nissan
|
||||
ret.lateralTuning.init('pid')
|
||||
|
||||
# Nissan port is a community feature, since we don't own one to test
|
||||
ret.communityFeature = True
|
||||
@@ -45,6 +47,9 @@ class CarInterface(CarInterfaceBase):
|
||||
ret.centerToFront = ret.wheelbase * 0.44
|
||||
ret.steerRatio = 17
|
||||
|
||||
# dp
|
||||
ret = common_interface_get_params_lqr(ret)
|
||||
|
||||
ret.steerControlType = car.CarParams.SteerControlType.angle
|
||||
ret.radarOffCan = True
|
||||
|
||||
@@ -59,13 +64,15 @@ class CarInterface(CarInterfaceBase):
|
||||
return ret
|
||||
|
||||
# returns a car.CarState
|
||||
def update(self, c, can_strings):
|
||||
def update(self, c, can_strings, dragonconf):
|
||||
self.cp.update_strings(can_strings)
|
||||
self.cp_cam.update_strings(can_strings)
|
||||
self.cp_adas.update_strings(can_strings)
|
||||
|
||||
ret = self.CS.update(self.cp, self.cp_adas, self.cp_cam)
|
||||
|
||||
# dp
|
||||
self.dragonconf = dragonconf
|
||||
ret.cruiseState.enabled = common_interface_atl(ret, dragonconf.dpAtl)
|
||||
ret.canValid = self.cp.can_valid and self.cp_adas.can_valid and self.cp_cam.can_valid
|
||||
|
||||
buttonEvents = []
|
||||
@@ -87,6 +94,6 @@ class CarInterface(CarInterfaceBase):
|
||||
can_sends = self.CC.update(c.enabled, self.CS, self.frame, c.actuators,
|
||||
c.cruiseControl.cancel, c.hudControl.visualAlert,
|
||||
c.hudControl.leftLaneVisible, c.hudControl.rightLaneVisible,
|
||||
c.hudControl.leftLaneDepart, c.hudControl.rightLaneDepart)
|
||||
c.hudControl.leftLaneDepart, c.hudControl.rightLaneDepart, self.dragonconf)
|
||||
self.frame += 1
|
||||
return can_sends
|
||||
|
||||
@@ -3,6 +3,7 @@ from selfdrive.car import apply_std_steer_torque_limits
|
||||
from selfdrive.car.subaru import subarucan
|
||||
from selfdrive.car.subaru.values import DBC
|
||||
from opendbc.can.packer import CANPacker
|
||||
from common.dp_common import common_controller_ctrl
|
||||
|
||||
|
||||
class CarControllerParams():
|
||||
@@ -27,7 +28,11 @@ class CarController():
|
||||
self.params = CarControllerParams()
|
||||
self.packer = CANPacker(DBC[CP.carFingerprint]['pt'])
|
||||
|
||||
def update(self, enabled, CS, frame, actuators, pcm_cancel_cmd, visual_alert, left_line, right_line):
|
||||
# dp
|
||||
self.last_blinker_on = False
|
||||
self.blinker_end_frame = 0.
|
||||
|
||||
def update(self, enabled, CS, frame, actuators, pcm_cancel_cmd, visual_alert, left_line, right_line, dragonconf):
|
||||
""" Controls thread """
|
||||
|
||||
P = self.params
|
||||
@@ -51,6 +56,19 @@ class CarController():
|
||||
if not enabled:
|
||||
apply_steer = 0
|
||||
|
||||
# dp
|
||||
blinker_on = CS.out.leftBlinker or CS.out.rightBlinker
|
||||
if not enabled:
|
||||
self.blinker_end_frame = 0
|
||||
if self.last_blinker_on and not blinker_on:
|
||||
self.blinker_end_frame = frame + dragonconf.dpSignalOffDelay
|
||||
apply_steer = common_controller_ctrl(enabled,
|
||||
dragonconf.dpLatCtrl,
|
||||
dragonconf.dpSteeringOnSignal,
|
||||
blinker_on or frame < self.blinker_end_frame,
|
||||
apply_steer)
|
||||
self.last_blinker_on = blinker_on
|
||||
|
||||
can_sends.append(subarucan.create_steering_control(self.packer, apply_steer, frame, P.STEER_STEP))
|
||||
|
||||
self.apply_steer_last = apply_steer
|
||||
|
||||
@@ -3,6 +3,7 @@ from cereal import car
|
||||
from selfdrive.car.subaru.values import CAR
|
||||
from selfdrive.car import STD_CARGO_KG, scale_rot_inertia, scale_tire_stiffness, gen_empty_fingerprint
|
||||
from selfdrive.car.interfaces import CarInterfaceBase
|
||||
from common.dp_common import common_interface_atl, common_interface_get_params_lqr
|
||||
|
||||
class CarInterface(CarInterfaceBase):
|
||||
|
||||
@@ -17,6 +18,7 @@ class CarInterface(CarInterfaceBase):
|
||||
ret.carName = "subaru"
|
||||
ret.radarOffCan = True
|
||||
ret.safetyModel = car.CarParams.SafetyModel.subaru
|
||||
ret.lateralTuning.init('pid')
|
||||
|
||||
# Subaru port is a community feature, since we don't own one to test
|
||||
ret.communityFeature = True
|
||||
@@ -58,6 +60,9 @@ class CarInterface(CarInterfaceBase):
|
||||
ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0., 14., 23.], [0., 14., 23.]]
|
||||
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.01, 0.065, 0.2], [0.001, 0.015, 0.025]]
|
||||
|
||||
# dp
|
||||
ret = common_interface_get_params_lqr(ret)
|
||||
|
||||
# TODO: get actual value, for now starting with reasonable value for
|
||||
# civic and scaling by mass and wheelbase
|
||||
ret.rotationalInertia = scale_rot_inertia(ret.mass, ret.wheelbase)
|
||||
@@ -69,12 +74,14 @@ class CarInterface(CarInterfaceBase):
|
||||
return ret
|
||||
|
||||
# returns a car.CarState
|
||||
def update(self, c, can_strings):
|
||||
def update(self, c, can_strings, dragonconf):
|
||||
self.cp.update_strings(can_strings)
|
||||
self.cp_cam.update_strings(can_strings)
|
||||
|
||||
ret = self.CS.update(self.cp, self.cp_cam)
|
||||
|
||||
# dp
|
||||
self.dragonconf = dragonconf
|
||||
ret.cruiseState.enabled = common_interface_atl(ret, dragonconf.dpAtl)
|
||||
ret.canValid = self.cp.can_valid and self.cp_cam.can_valid
|
||||
ret.steeringRateLimited = self.CC.steer_rate_limited if self.CC is not None else False
|
||||
|
||||
@@ -86,6 +93,6 @@ class CarInterface(CarInterfaceBase):
|
||||
def apply(self, c):
|
||||
can_sends = self.CC.update(c.enabled, self.CS, self.frame, c.actuators,
|
||||
c.cruiseControl.cancel, c.hudControl.visualAlert,
|
||||
c.hudControl.leftLaneVisible, c.hudControl.rightLaneVisible)
|
||||
c.hudControl.leftLaneVisible, c.hudControl.rightLaneVisible, self.dragonconf)
|
||||
self.frame += 1
|
||||
return can_sends
|
||||
|
||||
@@ -6,13 +6,14 @@ from selfdrive.car.toyota.toyotacan import create_steer_command, create_ui_comma
|
||||
create_fcw_command
|
||||
from selfdrive.car.toyota.values import Ecu, CAR, STATIC_MSGS, SteerLimitParams
|
||||
from opendbc.can.packer import CANPacker
|
||||
from common.dp_common import common_controller_ctrl
|
||||
|
||||
VisualAlert = car.CarControl.HUDControl.VisualAlert
|
||||
|
||||
# Accel limits
|
||||
ACCEL_HYST_GAP = 0.02 # don't change accel command for small oscilalitons within this value
|
||||
ACCEL_MAX = 1.5 # 1.5 m/s2
|
||||
ACCEL_MIN = -3.0 # 3 m/s2
|
||||
ACCEL_MAX = 2.0 # 1.5 m/s2
|
||||
ACCEL_MIN = -3.5 # 3 m/s2
|
||||
ACCEL_SCALE = max(ACCEL_MAX, -ACCEL_MIN)
|
||||
|
||||
def accel_hysteresis(accel, accel_steady, enabled):
|
||||
@@ -49,8 +50,12 @@ class CarController():
|
||||
|
||||
self.packer = CANPacker(dbc_name)
|
||||
|
||||
# dp
|
||||
self.last_blinker_on = False
|
||||
self.blinker_end_frame = 0.
|
||||
|
||||
def update(self, enabled, CS, frame, actuators, pcm_cancel_cmd, hud_alert,
|
||||
left_line, right_line, lead, left_lane_depart, right_lane_depart):
|
||||
left_line, right_line, lead, left_lane_depart, right_lane_depart, dragonconf):
|
||||
|
||||
# *** compute control surfaces ***
|
||||
|
||||
@@ -78,7 +83,7 @@ class CarController():
|
||||
self.last_fault_frame = frame
|
||||
|
||||
# Cut steering for 2s after fault
|
||||
if not enabled or (frame - self.last_fault_frame < 200):
|
||||
if not enabled or (frame - self.last_fault_frame < 200) or (abs(CS.out.steeringRate) > 100):
|
||||
apply_steer = 0
|
||||
apply_steer_req = 0
|
||||
else:
|
||||
@@ -89,12 +94,25 @@ class CarController():
|
||||
pcm_cancel_cmd = 1
|
||||
|
||||
# on entering standstill, send standstill request
|
||||
if CS.out.standstill and not self.last_standstill:
|
||||
if not dragonconf.dpToyotaSng and CS.out.standstill and not self.last_standstill:
|
||||
self.standstill_req = True
|
||||
if CS.pcm_acc_status != 8:
|
||||
# pcm entered standstill or it's disabled
|
||||
self.standstill_req = False
|
||||
|
||||
# dp
|
||||
blinker_on = CS.out.leftBlinker or CS.out.rightBlinker
|
||||
if not enabled:
|
||||
self.blinker_end_frame = 0
|
||||
if self.last_blinker_on and not blinker_on:
|
||||
self.blinker_end_frame = frame + dragonconf.dpSignalOffDelay
|
||||
apply_steer = common_controller_ctrl(enabled,
|
||||
dragonconf.dpLatCtrl,
|
||||
dragonconf.dpSteeringOnSignal,
|
||||
blinker_on or frame < self.blinker_end_frame,
|
||||
apply_steer)
|
||||
self.last_blinker_on = blinker_on
|
||||
|
||||
self.last_steer = apply_steer
|
||||
self.last_accel = apply_accel
|
||||
self.last_standstill = CS.out.standstill
|
||||
@@ -120,12 +138,13 @@ class CarController():
|
||||
lead = lead or CS.out.vEgo < 12. # at low speed we always assume the lead is present do ACC can be engaged
|
||||
|
||||
# Lexus IS uses a different cancellation message
|
||||
if pcm_cancel_cmd and CS.CP.carFingerprint == CAR.LEXUS_IS:
|
||||
can_sends.append(create_acc_cancel_command(self.packer))
|
||||
elif CS.CP.openpilotLongitudinalControl:
|
||||
can_sends.append(create_accel_command(self.packer, apply_accel, pcm_cancel_cmd, self.standstill_req, lead))
|
||||
else:
|
||||
can_sends.append(create_accel_command(self.packer, 0, pcm_cancel_cmd, False, lead))
|
||||
if not dragonconf.dpAtl:
|
||||
if pcm_cancel_cmd and CS.CP.carFingerprint == CAR.LEXUS_IS:
|
||||
can_sends.append(create_acc_cancel_command(self.packer))
|
||||
elif CS.CP.openpilotLongitudinalControl:
|
||||
can_sends.append(create_accel_command(self.packer, apply_accel, pcm_cancel_cmd, self.standstill_req, lead))
|
||||
else:
|
||||
can_sends.append(create_accel_command(self.packer, 0, pcm_cancel_cmd, False, lead))
|
||||
|
||||
if (frame % 2 == 0) and (CS.CP.enableGasInterceptor):
|
||||
# send exactly zero if apply_gas is zero. Interceptor will send the max between read value and apply_gas.
|
||||
@@ -147,8 +166,17 @@ class CarController():
|
||||
# forcing the pcm to disengage causes a bad fault sound so play a good sound instead
|
||||
send_ui = True
|
||||
|
||||
# dp
|
||||
if dragonconf.dpToyotaLdw:
|
||||
dragon_left_lane_depart = left_lane_depart
|
||||
dragon_right_lane_depart = right_lane_depart
|
||||
else:
|
||||
dragon_left_lane_depart = False
|
||||
dragon_right_lane_depart = False
|
||||
|
||||
|
||||
if (frame % 100 == 0 or send_ui) and Ecu.fwdCamera in self.fake_ecus:
|
||||
can_sends.append(create_ui_command(self.packer, steer_alert, pcm_cancel_cmd, left_line, right_line, left_lane_depart, right_lane_depart))
|
||||
can_sends.append(create_ui_command(self.packer, steer_alert, pcm_cancel_cmd, left_line, right_line, dragon_left_lane_depart, dragon_right_lane_depart))
|
||||
|
||||
if frame % 100 == 0 and Ecu.dsu in self.fake_ecus:
|
||||
can_sends.append(create_fcw_command(self.packer, fcw_alert))
|
||||
|
||||
@@ -5,6 +5,7 @@ from selfdrive.car.interfaces import CarStateBase
|
||||
from opendbc.can.parser import CANParser
|
||||
from selfdrive.config import Conversions as CV
|
||||
from selfdrive.car.toyota.values import CAR, DBC, STEER_THRESHOLD, TSS2_CAR, NO_STOP_TIMER_CAR
|
||||
from common.params import Params
|
||||
|
||||
|
||||
class CarState(CarStateBase):
|
||||
@@ -13,13 +14,16 @@ class CarState(CarStateBase):
|
||||
can_define = CANDefine(DBC[CP.carFingerprint]['pt'])
|
||||
self.shifter_values = can_define.dv["GEAR_PACKET"]['GEAR']
|
||||
|
||||
# dp
|
||||
self.dp_toyota_zss = Params().get('dp_toyota_zss') == b'1'
|
||||
|
||||
# All TSS2 car have the accurate sensor
|
||||
self.accurate_steer_angle_seen = CP.carFingerprint in TSS2_CAR
|
||||
self.accurate_steer_angle_seen = CP.carFingerprint in TSS2_CAR or CP.carFingerprint in [CAR.LEXUS_ISH] or self.dp_toyota_zss
|
||||
|
||||
# On NO_DSU cars but not TSS2 cars the cp.vl["STEER_TORQUE_SENSOR"]['STEER_ANGLE']
|
||||
# is zeroed to where the steering angle is at start.
|
||||
# Need to apply an offset as soon as the steering angle measurements are both received
|
||||
self.needs_angle_offset = CP.carFingerprint not in TSS2_CAR
|
||||
self.needs_angle_offset = CP.carFingerprint not in TSS2_CAR or CP.carFingerprint in [CAR.LEXUS_ISH] or self.dp_toyota_zss
|
||||
self.angle_offset = 0.
|
||||
|
||||
def update(self, cp, cp_cam):
|
||||
@@ -34,6 +38,9 @@ class CarState(CarStateBase):
|
||||
if self.CP.enableGasInterceptor:
|
||||
ret.gas = (cp.vl["GAS_SENSOR"]['INTERCEPTOR_GAS'] + cp.vl["GAS_SENSOR"]['INTERCEPTOR_GAS2']) / 2.
|
||||
ret.gasPressed = ret.gas > 15
|
||||
elif self.CP.carFingerprint in [CAR.LEXUS_ISH, CAR.LEXUS_GSH]:
|
||||
ret.gas = cp.vl["GAS_PEDAL_ALT"]['GAS_PEDAL']
|
||||
ret.gasPressed = ret.gas > 1e-5
|
||||
else:
|
||||
ret.gas = cp.vl["GAS_PEDAL"]['GAS_PEDAL']
|
||||
ret.gasPressed = cp.vl["PCM_CRUISE"]['GAS_RELEASED'] == 0
|
||||
@@ -52,11 +59,14 @@ class CarState(CarStateBase):
|
||||
self.accurate_steer_angle_seen = True
|
||||
|
||||
if self.accurate_steer_angle_seen:
|
||||
ret.steeringAngle = cp.vl["STEER_TORQUE_SENSOR"]['STEER_ANGLE'] - self.angle_offset
|
||||
if self.dp_toyota_zss:
|
||||
ret.steeringAngle = cp.vl["SECONDARY_STEER_ANGLE"]['ZORRO_STEER'] - self.angle_offset
|
||||
else:
|
||||
ret.steeringAngle = cp.vl["STEER_TORQUE_SENSOR"]['STEER_ANGLE'] - self.angle_offset
|
||||
|
||||
if self.needs_angle_offset:
|
||||
angle_wheel = cp.vl["STEER_ANGLE_SENSOR"]['STEER_ANGLE'] + cp.vl["STEER_ANGLE_SENSOR"]['STEER_FRACTION']
|
||||
if abs(angle_wheel) > 1e-3 and abs(ret.steeringAngle) > 1e-3:
|
||||
if (abs(angle_wheel) > 1e-3 and abs(ret.steeringAngle) > 1e-3) or self.dp_toyota_zss:
|
||||
self.needs_angle_offset = False
|
||||
self.angle_offset = ret.steeringAngle - angle_wheel
|
||||
else:
|
||||
@@ -74,15 +84,23 @@ class CarState(CarStateBase):
|
||||
ret.steeringPressed = abs(ret.steeringTorque) > STEER_THRESHOLD
|
||||
ret.steerWarning = cp.vl["EPS_STATUS"]['LKA_STATE'] not in [1, 5]
|
||||
|
||||
if self.CP.carFingerprint == CAR.LEXUS_IS:
|
||||
if self.CP.carFingerprint in [CAR.LEXUS_IS, CAR.LEXUS_NXT]:
|
||||
ret.cruiseState.available = cp.vl["DSU_CRUISE"]['MAIN_ON'] != 0
|
||||
ret.cruiseState.speed = cp.vl["DSU_CRUISE"]['SET_SPEED'] * CV.KPH_TO_MS
|
||||
self.low_speed_lockout = False
|
||||
elif self.CP.carFingerprint in [CAR.LEXUS_ISH, CAR.LEXUS_GSH]:
|
||||
ret.cruiseState.available = cp.vl["PCM_CRUISE_ALT"]['MAIN_ON'] != 0
|
||||
ret.cruiseState.speed = cp.vl["PCM_CRUISE_ALT"]['SET_SPEED'] * CV.KPH_TO_MS
|
||||
self.low_speed_lockout = False
|
||||
else:
|
||||
ret.cruiseState.available = cp.vl["PCM_CRUISE_2"]['MAIN_ON'] != 0
|
||||
ret.cruiseState.speed = cp.vl["PCM_CRUISE_2"]['SET_SPEED'] * CV.KPH_TO_MS
|
||||
self.low_speed_lockout = cp.vl["PCM_CRUISE_2"]['LOW_SPEED_LOCKOUT'] == 2
|
||||
self.pcm_acc_status = cp.vl["PCM_CRUISE"]['CRUISE_STATE']
|
||||
if self.CP.carFingerprint in [CAR.LEXUS_ISH, CAR.LEXUS_GSH]:
|
||||
# Lexus ISH does not have CRUISE_STATUS value (always 0), so we use CRUISE_ACTIVE value instead
|
||||
self.pcm_acc_status = cp.vl["PCM_CRUISE"]['CRUISE_ACTIVE']
|
||||
else:
|
||||
self.pcm_acc_status = cp.vl["PCM_CRUISE"]['CRUISE_STATE']
|
||||
if self.CP.carFingerprint in NO_STOP_TIMER_CAR or self.CP.enableGasInterceptor:
|
||||
# ignore standstill in hybrid vehicles, since pcm allows to restart without
|
||||
# receiving any special command. Also if interceptor is detected
|
||||
@@ -143,8 +161,8 @@ class CarState(CarStateBase):
|
||||
]
|
||||
|
||||
checks = [
|
||||
("BRAKE_MODULE", 40),
|
||||
("GAS_PEDAL", 33),
|
||||
#("BRAKE_MODULE", 40),
|
||||
#("GAS_PEDAL", 33),
|
||||
("WHEEL_SPEEDS", 80),
|
||||
("STEER_ANGLE_SENSOR", 80),
|
||||
("PCM_CRUISE", 33),
|
||||
@@ -152,7 +170,27 @@ class CarState(CarStateBase):
|
||||
("EPS_STATUS", 25),
|
||||
]
|
||||
|
||||
if CP.carFingerprint == CAR.LEXUS_IS:
|
||||
if CP.carFingerprint in [CAR.LEXUS_ISH, CAR.LEXUS_GSH]:
|
||||
signals.append(("GAS_PEDAL", "GAS_PEDAL_ALT", 0))
|
||||
signals.append(("MAIN_ON", "PCM_CRUISE_ALT", 0))
|
||||
signals.append(("SET_SPEED", "PCM_CRUISE_ALT", 0))
|
||||
signals.append(("AUTO_HIGH_BEAM", "LIGHT_STALK_ISH", 0))
|
||||
checks += [
|
||||
("BRAKE_MODULE", 50),
|
||||
("GAS_PEDAL_ALT", 50),
|
||||
("PCM_CRUISE_ALT", 1),
|
||||
]
|
||||
else:
|
||||
signals += [
|
||||
("AUTO_HIGH_BEAM", "LIGHT_STALK", 0),
|
||||
("GAS_PEDAL", "GAS_PEDAL", 0),
|
||||
]
|
||||
checks += [
|
||||
("BRAKE_MODULE", 40),
|
||||
("GAS_PEDAL", 33),
|
||||
]
|
||||
|
||||
if CP.carFingerprint in [CAR.LEXUS_IS, CAR.LEXUS_NXT]:
|
||||
signals.append(("MAIN_ON", "DSU_CRUISE", 0))
|
||||
signals.append(("SET_SPEED", "DSU_CRUISE", 0))
|
||||
checks.append(("DSU_CRUISE", 5))
|
||||
@@ -177,6 +215,11 @@ class CarState(CarStateBase):
|
||||
signals += [("R_ADJACENT", "BSM", 0)]
|
||||
signals += [("R_APPROACHING", "BSM", 0)]
|
||||
|
||||
if Params().get('dp_toyota_zss') == b'1':
|
||||
signals += [("ZORRO_STEER", "SECONDARY_STEER_ANGLE", 0)]
|
||||
|
||||
checks = []
|
||||
|
||||
return CANParser(DBC[CP.carFingerprint]['pt'], signals, checks, 0)
|
||||
|
||||
@staticmethod
|
||||
|
||||
@@ -5,6 +5,8 @@ from selfdrive.car.toyota.values import Ecu, ECU_FINGERPRINT, CAR, TSS2_CAR, FIN
|
||||
from selfdrive.car import STD_CARGO_KG, scale_rot_inertia, scale_tire_stiffness, is_ecu_disconnected, gen_empty_fingerprint
|
||||
from selfdrive.swaglog import cloudlog
|
||||
from selfdrive.car.interfaces import CarInterfaceBase
|
||||
from common.dp_common import common_interface_atl, common_interface_get_params_lqr
|
||||
from common.params import Params
|
||||
|
||||
EventName = car.CarEvent.EventName
|
||||
|
||||
@@ -49,6 +51,9 @@ class CarInterface(CarInterfaceBase):
|
||||
ret.steerRatio = 16.88 # 14.5 is spec end-to-end
|
||||
tire_stiffness_factor = 0.5533
|
||||
ret.mass = 3650. * CV.LB_TO_KG + STD_CARGO_KG # mean between normal and hybrid
|
||||
if ret.enableGasInterceptor:
|
||||
ret.longitudinalTuning.kpV = [0.4, 0.36, 0.325] # arne's tune.
|
||||
ret.longitudinalTuning.kiV = [0.195, 0.10]
|
||||
ret.lateralTuning.init('lqr')
|
||||
|
||||
ret.lateralTuning.lqr.scale = 1500.0
|
||||
@@ -253,9 +258,47 @@ class CarInterface(CarInterfaceBase):
|
||||
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.6], [0.1]]
|
||||
ret.lateralTuning.pid.kf = 0.00006
|
||||
|
||||
elif candidate == CAR.LEXUS_ISH:
|
||||
stop_and_go = True # set to true because it's a hybrid
|
||||
ret.safetyParam = 130
|
||||
ret.wheelbase = 2.79908
|
||||
ret.steerRatio = 13.3
|
||||
tire_stiffness_factor = 0.444
|
||||
ret.mass = 3736.8 * CV.LB_TO_KG + STD_CARGO_KG
|
||||
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.3], [0.05]]
|
||||
ret.lateralTuning.pid.kf = 0.00006
|
||||
|
||||
elif candidate == CAR.LEXUS_GSH:
|
||||
stop_and_go = True # set to true because it's a hybrid
|
||||
ret.safetyParam = 130
|
||||
ret.wheelbase = 2.84988
|
||||
ret.steerRatio = 14.35 # range from 11.5 - 17.2, lets try 14.35
|
||||
tire_stiffness_factor = 0.444
|
||||
ret.mass = 4112 * CV.LB_TO_KG + STD_CARGO_KG
|
||||
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.3], [0.05]]
|
||||
ret.lateralTuning.pid.kf = 0.00006
|
||||
|
||||
elif candidate == CAR.LEXUS_NXT:
|
||||
stop_and_go = True
|
||||
ret.safetyParam = 100
|
||||
ret.wheelbase = 2.66
|
||||
ret.steerRatio = 14.7
|
||||
tire_stiffness_factor = 0.444 # not optimized yet
|
||||
ret.mass = 4070 * CV.LB_TO_KG + STD_CARGO_KG
|
||||
ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.3], [0.05]]
|
||||
ret.lateralTuning.pid.kf = 0.00006
|
||||
|
||||
ret.steerRateCost = 1.
|
||||
ret.centerToFront = ret.wheelbase * 0.44
|
||||
|
||||
# dp
|
||||
ret = common_interface_get_params_lqr(ret)
|
||||
|
||||
if candidate == CAR.PRIUS and Params().get('dp_toyota_zss') == b'1':
|
||||
ret.mass = 3370. * CV.LB_TO_KG + STD_CARGO_KG
|
||||
ret.lateralTuning.indi.timeConstant = 0.1
|
||||
ret.steerRateCost = 0.5
|
||||
|
||||
# TODO: get actual value, for now starting with reasonable value for
|
||||
# civic and scaling by mass and wheelbase
|
||||
ret.rotationalInertia = scale_rot_inertia(ret.mass, ret.wheelbase)
|
||||
@@ -304,12 +347,17 @@ class CarInterface(CarInterfaceBase):
|
||||
return ret
|
||||
|
||||
# returns a car.CarState
|
||||
def update(self, c, can_strings):
|
||||
def update(self, c, can_strings, dragonconf):
|
||||
# ******************* do can recv *******************
|
||||
self.cp.update_strings(can_strings)
|
||||
self.cp_cam.update_strings(can_strings)
|
||||
|
||||
ret = self.CS.update(self.cp, self.cp_cam)
|
||||
# dp
|
||||
self.dragonconf = dragonconf
|
||||
ret.cruiseState.enabled = common_interface_atl(ret, dragonconf.dpAtl)
|
||||
if dragonconf.dpToyotaLowestCruiseOverride and ret.cruiseState.speed < dragonconf.dpToyotaLowestCruiseOverrideAt * CV.KPH_TO_MS:
|
||||
ret.cruiseState.speed = dragonconf.dpToyotaLowestCruiseOverrideSpeed * CV.KPH_TO_MS
|
||||
|
||||
ret.canValid = self.cp.can_valid and self.cp_cam.can_valid
|
||||
ret.steeringRateLimited = self.CC.steer_rate_limited if self.CC is not None else False
|
||||
@@ -344,7 +392,7 @@ class CarInterface(CarInterfaceBase):
|
||||
c.actuators, c.cruiseControl.cancel,
|
||||
c.hudControl.visualAlert, c.hudControl.leftLaneVisible,
|
||||
c.hudControl.rightLaneVisible, c.hudControl.leadVisible,
|
||||
c.hudControl.leftLaneDepart, c.hudControl.rightLaneDepart)
|
||||
c.hudControl.leftLaneDepart, c.hudControl.rightLaneDepart, self.dragonconf)
|
||||
|
||||
self.frame += 1
|
||||
return can_sends
|
||||
|
||||
@@ -39,6 +39,9 @@ class CAR:
|
||||
LEXUS_CTH = "LEXUS CT 200H 2018"
|
||||
RAV4H_TSS2 = "TOYOTA RAV4 HYBRID 2019"
|
||||
LEXUS_NXH = "LEXUS NX300H 2018"
|
||||
LEXUS_ISH = "LEXUS IS300h 2017"
|
||||
LEXUS_GSH = "LEXUS GS450h 2017"
|
||||
LEXUS_NXT = "LEXUS NX200T 2015"
|
||||
|
||||
|
||||
# addr: (ecu, cars, bus, 1/freq*100, vl)
|
||||
@@ -81,27 +84,35 @@ FINGERPRINTS = {
|
||||
36: 8, 37: 8, 170: 8, 180: 8, 186: 4, 355: 5, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 512: 6, 513: 6, 547: 8, 548: 8, 552: 4, 562: 4, 608: 8, 610: 5, 643: 7, 705: 8, 725: 2, 740: 5, 742: 8, 743: 8, 767: 4, 800: 8, 830: 7, 835: 8, 836: 8, 849: 4, 869: 7, 870: 7, 871: 2, 896: 8, 897: 8, 900: 6, 902: 6, 905: 8, 911: 8, 916: 3, 921: 8, 922: 8, 933: 8, 944: 8, 945: 8, 951: 8, 955: 8, 956: 8, 979: 2, 998: 5, 999: 7, 1000: 8, 1001: 8, 1008: 2, 1017: 8, 1041: 8, 1042: 8, 1043: 8, 1044: 8, 1056: 8, 1059: 1, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1176: 8, 1177: 8, 1178: 8, 1179: 8, 1180: 8, 1181: 8, 1190: 8, 1191: 8, 1192: 8, 1196: 8, 1207: 8, 1227: 8, 1235: 8, 1263: 8, 1279: 8, 1552: 8, 1553: 8, 1554: 8, 1555: 8, 1556: 8, 1557: 8, 1561: 8, 1562: 8, 1568: 8, 1569: 8, 1570: 8, 1571: 8, 1572: 8, 1584: 8, 1589: 8, 1592: 8, 1593: 8, 1595: 8, 1596: 8, 1597: 8, 1600: 8, 1664: 8, 1728: 8, 1745: 8, 1779: 8
|
||||
}],
|
||||
CAR.PRIUS: [{
|
||||
36: 8, 37: 8, 166: 8, 170: 8, 180: 8, 295: 8, 296: 8, 426: 6, 452: 8, 466: 8, 467: 8, 512: 6, 513: 6, 550: 8, 552: 4, 560: 7, 562: 6, 581: 5, 608: 8, 610: 8, 614: 8, 643: 7, 658: 8, 713: 8, 740: 5, 742: 8, 743: 8, 767: 4, 800: 8, 810: 2, 814: 8, 824: 2, 829: 2, 830: 7, 835: 8, 836: 8, 845: 5, 863: 8, 869: 7, 870: 7, 871: 2, 898: 8, 900: 6, 902: 6, 905: 8, 913: 8, 918: 8, 921: 8, 933: 8, 944: 8, 945: 8, 950: 8, 951: 8, 953: 8, 955: 8, 956: 8, 971: 7, 974: 8, 975: 5, 993: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1005: 2, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1057: 8, 1059: 1, 1071: 8, 1076: 8, 1077: 8, 1082: 8, 1083: 8, 1084: 8, 1085: 8, 1086: 8, 1114: 8, 1132: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1175: 8, 1227: 8, 1228: 8, 1235: 8, 1237: 8, 1264: 8, 1279: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1595: 8, 1777: 8, 1779: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8
|
||||
35: 8, 36: 8, 37: 8, 166: 8, 170: 8, 180: 8, 295: 8, 296: 8, 426: 6, 452: 8, 466: 8, 467: 8, 512: 6, 513: 6, 550: 8, 552: 4, 560: 7, 562: 6, 581: 5, 608: 8, 610: 8, 614: 8, 643: 7, 658: 8, 713: 8, 740: 5, 742: 8, 743: 8, 767: 4, 800: 8, 810: 2, 814: 8, 824: 2, 829: 2, 830: 7, 835: 8, 836: 8, 845: 5, 863: 8, 869: 7, 870: 7, 871: 2, 898: 8, 900: 6, 902: 6, 905: 8, 913: 8, 918: 8, 921: 8, 933: 8, 944: 8, 945: 8, 950: 8, 951: 8, 953: 8, 955: 8, 956: 8, 971: 7, 974: 8, 975: 5, 993: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1005: 2, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1057: 8, 1059: 1, 1071: 8, 1076: 8, 1077: 8, 1082: 8, 1083: 8, 1084: 8, 1085: 8, 1086: 8, 1114: 8, 1132: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1175: 8, 1227: 8, 1228: 8, 1235: 8, 1237: 8, 1264: 8, 1279: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1595: 8, 1777: 8, 1779: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8
|
||||
},
|
||||
#2019 LE
|
||||
{
|
||||
36: 8, 37: 8, 166: 8, 170: 8, 180: 8, 295: 8, 296: 8, 426: 6, 452: 8, 466: 8, 467: 8, 550: 8, 552: 4, 560: 7, 562: 6, 581: 5, 608: 8, 610: 8, 614: 8, 643: 7, 658: 8, 713: 8, 740: 5, 742: 8, 743: 8, 767: 4, 800: 8, 810: 2, 814: 8, 829: 2, 830: 7, 835: 8, 836: 8, 863: 8, 865: 8, 869: 7, 870: 7, 871: 2, 896: 8, 898: 8, 900: 6, 902: 6, 905: 8, 918: 8, 921: 8, 933: 8, 944: 8, 945: 8, 950: 8, 951: 8, 953: 8, 955: 8, 956: 8, 971: 7, 975: 5, 993: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1002: 8, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1057: 8, 1059: 1, 1071: 8, 1076: 8, 1077: 8, 1082: 8, 1083: 8, 1084: 8, 1085: 8, 1086: 8, 1114: 8, 1132: 8, 1161: 8, 1162: 8, 1163: 8, 1175: 8, 1227: 8, 1228: 8, 1235: 8, 1237: 8, 1279: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1592: 8, 1595: 8, 1777: 8, 1779: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8
|
||||
35: 8, 36: 8, 37: 8, 166: 8, 170: 8, 180: 8, 295: 8, 296: 8, 426: 6, 452: 8, 466: 8, 467: 8, 550: 8, 552: 4, 560: 7, 562: 6, 581: 5, 608: 8, 610: 8, 614: 8, 643: 7, 658: 8, 713: 8, 740: 5, 742: 8, 743: 8, 767: 4, 800: 8, 810: 2, 814: 8, 829: 2, 830: 7, 835: 8, 836: 8, 863: 8, 865: 8, 869: 7, 870: 7, 871: 2, 896: 8, 898: 8, 900: 6, 902: 6, 905: 8, 918: 8, 921: 8, 933: 8, 944: 8, 945: 8, 950: 8, 951: 8, 953: 8, 955: 8, 956: 8, 971: 7, 975: 5, 993: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1002: 8, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1057: 8, 1059: 1, 1071: 8, 1076: 8, 1077: 8, 1082: 8, 1083: 8, 1084: 8, 1085: 8, 1086: 8, 1114: 8, 1132: 8, 1161: 8, 1162: 8, 1163: 8, 1175: 8, 1227: 8, 1228: 8, 1235: 8, 1237: 8, 1279: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1592: 8, 1595: 8, 1777: 8, 1779: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8
|
||||
},
|
||||
# 2020 Prius Prime LE
|
||||
{
|
||||
36: 8, 37: 8, 166: 8, 170: 8, 180: 8, 295: 8, 296: 8, 426: 6, 452: 8, 466: 8, 467: 8, 550: 8, 552: 4, 560: 7, 562: 6, 581: 5, 608: 8, 610: 8, 643: 7, 713: 8, 740: 5, 742: 8, 743: 8, 764: 8, 767: 4, 800: 8, 810: 2, 824: 8, 829: 2, 830: 7, 835: 8, 836: 8, 863: 8, 865: 8, 869: 7, 870: 7, 871: 2, 896: 8, 898: 8, 900: 6, 902: 6, 905: 8, 913: 8, 921: 8, 933: 8, 934: 8, 935: 8, 944: 8, 945: 8, 950: 8, 951: 8, 953: 8, 955: 8, 956: 8, 971: 7, 974: 8, 975: 5, 993: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1057: 8, 1059: 1, 1071: 8, 1076: 8, 1077: 8, 1084: 8, 1085: 8, 1086: 8, 1114: 8, 1132: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1227: 8, 1235: 8, 1279: 8, 1541: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1592: 8, 1595: 8, 1649: 8, 1777: 8, 1779: 8, 1786: 8, 1787: 8, 1788: 8, 1789: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8
|
||||
35: 8, 36: 8, 37: 8, 166: 8, 170: 8, 180: 8, 295: 8, 296: 8, 426: 6, 452: 8, 466: 8, 467: 8, 550: 8, 552: 4, 560: 7, 562: 6, 581: 5, 608: 8, 610: 8, 643: 7, 713: 8, 740: 5, 742: 8, 743: 8, 764: 8, 767: 4, 800: 8, 810: 2, 824: 8, 829: 2, 830: 7, 835: 8, 836: 8, 863: 8, 865: 8, 869: 7, 870: 7, 871: 2, 896: 8, 898: 8, 900: 6, 902: 6, 905: 8, 913: 8, 921: 8, 933: 8, 934: 8, 935: 8, 944: 8, 945: 8, 950: 8, 951: 8, 953: 8, 955: 8, 956: 8, 971: 7, 974: 8, 975: 5, 993: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1057: 8, 1059: 1, 1071: 8, 1076: 8, 1077: 8, 1084: 8, 1085: 8, 1086: 8, 1114: 8, 1132: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1227: 8, 1235: 8, 1279: 8, 1541: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1592: 8, 1595: 8, 1649: 8, 1777: 8, 1779: 8, 1786: 8, 1787: 8, 1788: 8, 1789: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8
|
||||
},
|
||||
#2020 Prius Prime Limited
|
||||
{
|
||||
36: 8, 37: 8, 166: 8, 170: 8, 180: 8, 295: 8, 296: 8, 426: 6, 452: 8, 466: 8, 467: 8, 550: 8, 552: 4, 560: 7, 562: 6, 581: 5, 608: 8, 610: 8, 614: 8, 643: 7, 658: 8, 713: 8, 740: 5, 742: 8, 743: 8, 767: 4, 800: 8, 810: 2, 814: 8, 824: 2, 829: 2, 830: 7, 835: 8, 836: 8, 863: 8, 865: 8, 869: 7, 870: 7, 871: 2, 896: 8, 898: 8, 900: 6, 902: 6, 905: 8, 913: 8, 918: 8, 921: 8, 933: 8, 944: 8, 945: 8, 950: 8, 951: 8, 953: 8, 955: 8, 956: 8, 971: 7, 974: 8, 975: 5, 993: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1057: 8, 1059: 1, 1071: 8, 1076: 8, 1077: 8, 1082: 8, 1083: 8, 1084: 8, 1085: 8, 1086: 8, 1114: 8, 1132: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1175: 8, 1227: 8, 1228: 8, 1235: 8, 1237: 8, 1279: 8, 1541: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1592: 8, 1595: 8, 1649: 8, 1777: 8, 1779: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8, 2015: 8, 2024: 8, 2026: 8, 2027: 8, 2029: 8, 2030: 8, 2031: 8
|
||||
35: 8, 36: 8, 37: 8, 166: 8, 170: 8, 180: 8, 295: 8, 296: 8, 426: 6, 452: 8, 466: 8, 467: 8, 550: 8, 552: 4, 560: 7, 562: 6, 581: 5, 608: 8, 610: 8, 614: 8, 643: 7, 658: 8, 713: 8, 740: 5, 742: 8, 743: 8, 767: 4, 800: 8, 810: 2, 814: 8, 824: 2, 829: 2, 830: 7, 835: 8, 836: 8, 863: 8, 865: 8, 869: 7, 870: 7, 871: 2, 896: 8, 898: 8, 900: 6, 902: 6, 905: 8, 913: 8, 918: 8, 921: 8, 933: 8, 944: 8, 945: 8, 950: 8, 951: 8, 953: 8, 955: 8, 956: 8, 971: 7, 974: 8, 975: 5, 993: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1057: 8, 1059: 1, 1071: 8, 1076: 8, 1077: 8, 1082: 8, 1083: 8, 1084: 8, 1085: 8, 1086: 8, 1114: 8, 1132: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1175: 8, 1227: 8, 1228: 8, 1235: 8, 1237: 8, 1279: 8, 1541: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1592: 8, 1595: 8, 1649: 8, 1777: 8, 1779: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8, 2015: 8, 2024: 8, 2026: 8, 2027: 8, 2029: 8, 2030: 8, 2031: 8
|
||||
},
|
||||
#2020 Central Europe Prime
|
||||
{
|
||||
36: 8, 37: 8, 166: 8, 170: 8, 180: 8, 295: 8, 296: 8, 426: 6, 452: 8, 466: 8, 467: 8, 550: 8, 552: 4, 560: 7, 562: 6, 581: 5, 608: 8, 610: 8, 643: 7, 713: 8, 740: 5, 742: 8, 743: 8, 764: 8, 767: 4, 800: 8, 810: 2, 818: 8, 824: 8, 829: 2, 830: 7, 835: 8, 836: 8, 845: 5, 863: 8, 865: 8, 869: 7, 870: 7, 871: 2, 889: 8, 896: 8, 898: 8, 900: 6, 902: 6, 905: 8, 913: 8, 921: 8, 933: 8, 934: 8, 935: 8, 944: 8, 945: 8, 950: 8, 951: 8, 953: 8, 955: 8, 956: 8, 971: 8, 974: 8, 975: 5, 993: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1056: 8, 1057: 8, 1059: 1, 1071: 8, 1076: 8, 1077: 8, 1084: 8, 1085: 8, 1086: 8, 1114: 8, 1132: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1227: 8, 1235: 8, 1237: 8, 1264: 8, 1279: 8, 1541: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1592: 8, 1595: 8, 1777: 8, 1779: 8, 1786: 8, 1787: 8, 1788: 8, 1789: 8
|
||||
35: 8, 36: 8, 37: 8, 166: 8, 170: 8, 180: 8, 295: 8, 296: 8, 426: 6, 452: 8, 466: 8, 467: 8, 550: 8, 552: 4, 560: 7, 562: 6, 581: 5, 608: 8, 610: 8, 643: 7, 713: 8, 740: 5, 742: 8, 743: 8, 764: 8, 767: 4, 800: 8, 810: 2, 818: 8, 824: 8, 829: 2, 830: 7, 835: 8, 836: 8, 845: 5, 863: 8, 865: 8, 869: 7, 870: 7, 871: 2, 889: 8, 896: 8, 898: 8, 900: 6, 902: 6, 905: 8, 913: 8, 921: 8, 933: 8, 934: 8, 935: 8, 944: 8, 945: 8, 950: 8, 951: 8, 953: 8, 955: 8, 956: 8, 971: 8, 974: 8, 975: 5, 993: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1056: 8, 1057: 8, 1059: 1, 1071: 8, 1076: 8, 1077: 8, 1084: 8, 1085: 8, 1086: 8, 1114: 8, 1132: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1227: 8, 1235: 8, 1237: 8, 1264: 8, 1279: 8, 1541: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1592: 8, 1595: 8, 1777: 8, 1779: 8, 1786: 8, 1787: 8, 1788: 8, 1789: 8
|
||||
},
|
||||
#2017 German Prius
|
||||
{
|
||||
36: 8, 37: 8, 166: 8, 170: 8, 180: 8, 295: 8, 296: 8, 426: 6, 452: 8, 466: 8, 467: 8, 550: 8, 552: 4, 560: 7, 562: 6, 581: 5, 608: 8, 610: 8, 614: 8, 643: 7, 658: 8, 713: 8, 740: 5, 742: 8, 743: 8, 767: 4, 800: 8, 810: 2, 814: 8, 829: 2, 830: 7, 835: 8, 836: 8, 845: 5, 863: 8, 869: 7, 870: 7, 871: 2, 898: 8, 900: 6, 902: 6, 905: 8, 913: 8, 918: 8, 921: 8, 933: 8, 944: 8, 945: 8, 950: 8, 951: 8, 953: 8, 955: 8, 956: 8, 971: 7, 975: 5, 993: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1005: 2, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1057: 8, 1059: 1, 1071: 8, 1077: 8, 1082: 8, 1083: 8, 1084: 8, 1085: 8, 1086: 8, 1114: 8, 1132: 8, 1161: 8, 1162: 8, 1163: 8, 1175: 8, 1227: 8, 1228: 8, 1235: 8, 1237: 8, 1264: 8, 1279: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1595: 8, 1777: 8, 1779: 8, 1792: 8, 1767: 4, 1863: 8, 1904: 8, 1912: 8, 1984: 8, 1988: 8, 1990: 8, 1992: 8, 1996: 8, 1998: 8, 2002: 8, 2010: 8, 2015: 8, 2016: 8, 2018: 8, 2024: 8, 2026: 8, 2030: 8
|
||||
35: 8, 36: 8, 37: 8, 166: 8, 170: 8, 180: 8, 295: 8, 296: 8, 426: 6, 452: 8, 466: 8, 467: 8, 550: 8, 552: 4, 560: 7, 562: 6, 581: 5, 608: 8, 610: 8, 614: 8, 643: 7, 658: 8, 713: 8, 740: 5, 742: 8, 743: 8, 767: 4, 800: 8, 810: 2, 814: 8, 829: 2, 830: 7, 835: 8, 836: 8, 845: 5, 863: 8, 869: 7, 870: 7, 871: 2, 898: 8, 900: 6, 902: 6, 905: 8, 913: 8, 918: 8, 921: 8, 933: 8, 944: 8, 945: 8, 950: 8, 951: 8, 953: 8, 955: 8, 956: 8, 971: 7, 975: 5, 993: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1005: 2, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1057: 8, 1059: 1, 1071: 8, 1077: 8, 1082: 8, 1083: 8, 1084: 8, 1085: 8, 1086: 8, 1114: 8, 1132: 8, 1161: 8, 1162: 8, 1163: 8, 1175: 8, 1227: 8, 1228: 8, 1235: 8, 1237: 8, 1264: 8, 1279: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1595: 8, 1777: 8, 1779: 8, 1792: 8, 1767: 4, 1863: 8, 1904: 8, 1912: 8, 1984: 8, 1988: 8, 1990: 8, 1992: 8, 1996: 8, 1998: 8, 2002: 8, 2010: 8, 2015: 8, 2016: 8, 2018: 8, 2024: 8, 2026: 8, 2030: 8
|
||||
},
|
||||
# Taiwan 2020 Prius 4.5
|
||||
{
|
||||
35: 8, 36: 8, 37: 8, 166: 8, 170: 8, 180: 8, 295: 8, 296: 8, 426: 6, 452: 8, 466: 8, 467: 8, 550: 8, 552: 4, 560: 7, 562: 6, 581: 5, 608: 8, 610: 8, 643: 7, 713: 8, 740: 5, 742: 8, 743: 8, 764: 8, 800: 8, 810: 2, 818: 8, 824: 8, 829: 2, 830: 7, 835: 8, 836: 8, 845: 5, 863: 8, 865: 8, 869: 7, 870: 7, 871: 2, 889: 8, 896: 8, 898: 8, 900: 6, 902: 6, 905: 8, 913: 8, 921: 8, 933: 8, 934: 8, 935: 8, 944: 8, 945: 8, 950: 8, 951: 8, 953: 8, 955: 8, 956: 8, 971: 7, 975: 5, 993: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1002: 8, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1057: 8, 1059: 1, 1071: 8, 1076: 8, 1077: 8, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1227: 8, 1235: 8, 1237: 8, 1264: 8, 1279: 8, 1541: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1592: 8, 1593: 8, 1595: 8, 1777: 8, 1779: 8, 1786: 8, 1787: 8, 1788: 8, 1789: 8
|
||||
},
|
||||
# Taiwan Prius 4.5
|
||||
{
|
||||
35: 8, 36: 8, 37: 8, 166: 8, 170: 8, 180: 8, 295: 8, 296: 8, 426: 6, 452: 8, 466: 8, 467: 8, 512: 6, 513: 6, 550: 8, 552: 4, 560: 7, 562: 6, 581: 5, 608: 8, 610: 8, 643: 7, 713: 8, 740: 5, 742: 8, 743: 8, 764: 8, 800: 8, 810: 2, 818: 8, 824: 8, 829: 2, 830: 7, 835: 8, 836: 8, 845: 5, 863: 8, 865: 8, 869: 7, 870: 7, 871: 2, 889: 8, 896: 8, 898: 8, 900: 6, 902: 6, 905: 8, 913: 8, 921: 8, 933: 8, 934: 8, 935: 8, 944: 8, 945: 8, 950: 8, 951: 8, 953: 8, 955: 8, 956: 8, 971: 7, 975: 5, 993: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1002: 8, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1057: 8, 1059: 1, 1071: 8, 1076: 8, 1077: 8, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1227: 8, 1235: 8, 1237: 8, 1264: 8, 1279: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1592: 8, 1595: 8, 1777: 8, 1779: 8, 1786: 8, 1787: 8, 1788: 8, 1789: 8, 1872: 8, 1880: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8
|
||||
}],
|
||||
#Corolla w/ added Pedal Support (512L and 513L)
|
||||
CAR.COROLLA: [{
|
||||
@@ -111,6 +122,10 @@ FINGERPRINTS = {
|
||||
# 2016 Lexus RX 350
|
||||
36: 8, 37: 8, 114: 5, 119: 6, 120: 4, 170: 8, 180: 8, 186: 4, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 544: 4, 550: 8, 552: 4, 562: 6, 608: 8, 610: 5, 643: 7, 705: 8, 740: 5, 742: 8, 743: 8, 767: 4, 800: 8, 810: 2, 812: 3, 818: 8, 819: 8, 820: 8, 821: 8, 822: 8, 830: 7, 835: 8, 836: 8, 845: 5, 869: 7, 870: 7, 871: 2, 898: 8, 900: 6, 902: 6, 905: 8, 913: 8, 918: 8, 921: 8, 933: 8, 944: 8, 945: 8, 951: 8, 955: 8, 956: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1059: 1, 1063: 8, 1077: 8, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1227: 8, 1228: 8, 1235: 8, 1237: 8, 1263: 8, 1264: 8, 1279: 8, 1349: 8, 1350: 8, 1351: 8, 1413: 8, 1414: 8, 1415: 8, 1416: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1575: 8, 1595: 8, 1777: 8, 1779: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8, 2015: 8, 2016: 8, 2024: 8
|
||||
},
|
||||
{
|
||||
# RX300 China
|
||||
36: 8, 37: 8, 114: 5, 119: 6, 120: 4, 170: 8, 180: 8, 186: 4, 355: 5, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 544: 4, 550: 8, 552: 4, 562: 6, 608: 8, 610: 5, 643: 7, 705: 8, 740: 5, 742: 8, 743: 8, 744: 8, 800: 8, 810: 2, 812: 3, 830: 7, 835: 8, 836: 8, 845: 5, 869: 7, 870: 7, 871: 2, 898: 8, 900: 6, 902: 6, 905: 8, 913: 8, 918: 8, 921: 8, 933: 8, 944: 8, 945: 8, 951: 8, 955: 8, 956: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1059: 1, 1063: 8, 1077: 8, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1227: 8, 1228: 8, 1235: 8, 1237: 8, 1279: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1575: 8, 1595: 8, 1777: 8, 1779: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8
|
||||
},
|
||||
# 2017 Lexus RX 350
|
||||
{
|
||||
36: 8, 37: 8, 114: 5, 119: 6, 120: 4, 170: 8, 180: 8, 186: 4, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 544: 4, 550: 8, 552: 4, 562: 6, 608: 8, 610: 5, 643: 7, 658: 8, 705: 8, 740: 5, 742: 8, 743: 8, 767: 4, 800: 8, 810: 2, 812: 3, 814: 8, 818: 8, 819: 8, 820: 8, 821: 8, 822: 8, 830: 7, 835: 8, 836: 8, 869: 7, 870: 7, 871: 2, 898: 8, 900: 6, 902: 6, 905: 8, 918: 8, 921: 8, 933: 8, 944: 8, 945: 8, 951: 8, 955: 8, 956: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1059: 1, 1063: 8, 1077: 8, 1082: 8, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1227: 8, 1228: 8, 1235: 8, 1237: 8, 1263: 8, 1264: 8, 1279: 8, 1349: 8, 1350: 8, 1351: 8, 1413: 8, 1414: 8, 1415: 8, 1416: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1575: 8, 1595: 8, 1777: 8, 1779: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8
|
||||
@@ -160,6 +175,10 @@ FINGERPRINTS = {
|
||||
{
|
||||
# 2019 XSE
|
||||
36: 8, 37: 8, 170: 8, 180: 8, 186: 4, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 544: 4, 550: 8, 552: 4, 562: 6, 608: 8, 610: 8, 643: 7, 658: 8, 705: 8, 728: 8, 740: 5, 761: 8, 764: 8, 767: 4, 800: 8, 810: 2, 812: 8, 814: 8, 818: 8, 822: 8, 824: 8, 830: 7, 835: 8, 836: 8, 865: 8, 869: 7, 870: 7, 871: 2, 888: 8, 889: 8, 891: 8, 896: 8, 898: 8, 900: 6, 902: 6, 905: 8, 918: 8, 921: 8, 933: 8, 934: 8, 935: 8, 942: 8, 944: 8, 945: 8, 951: 8, 955: 8, 956: 8, 976: 1, 983: 8, 984: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1002: 8, 1011: 8, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1059: 1, 1076: 8, 1077: 8, 1082: 8, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1228: 8, 1235: 8, 1237: 8, 1263: 8, 1264: 8, 1279: 8, 1412: 8, 1541: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1592: 8, 1594: 8, 1595: 8, 1649: 8, 1745: 8, 1779: 8, 1786: 8, 1787: 8, 1788: 8, 1789: 8, 1792: 8, 1767: 4, 1808: 8, 1816: 8, 1872: 8, 1880: 8, 1904: 8, 1912: 8, 1937: 8, 1945: 8, 1953: 8, 1961: 8, 1968: 8, 1976: 8, 1990: 8, 1998: 8, 2015: 8, 2016: 8, 2024: 8
|
||||
},
|
||||
# China 2018 Camry 2.5 from superdongle
|
||||
{
|
||||
36: 8, 37: 8, 119: 6, 170: 8, 180: 8, 186: 4, 355: 5, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 544: 4, 550: 8, 552: 4, 562: 6, 608: 8, 610: 8, 643: 7, 705: 8, 728: 8, 740: 5, 761: 8, 764: 8, 800: 8, 810: 2, 812: 8, 818: 8, 824: 8, 830: 7, 835: 8, 836: 8, 869: 7, 870: 7, 871: 2, 888: 8, 889: 8, 898: 8, 900: 6, 902: 6, 905: 8, 913: 8, 918: 8, 921: 8, 933: 8, 934: 8, 935: 8, 944: 8, 945: 8, 951: 8, 955: 8, 956: 8, 976: 1, 998: 5, 999: 7, 1000: 8, 1001: 8, 1002: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1059: 1, 1076: 8, 1077: 8, 1112: 8, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1235: 8, 1264: 8, 1279: 8, 1541: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1595: 8, 1745: 8, 1779: 8, 1786: 8, 1787: 8, 1788: 8, 1789: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8
|
||||
}],
|
||||
CAR.CAMRYH: [
|
||||
#SE, LE and LE with Blindspot Monitor
|
||||
@@ -188,6 +207,10 @@ FINGERPRINTS = {
|
||||
# 2018 Highlander Limited Platinum
|
||||
{
|
||||
36: 8, 37: 8, 114: 5, 119: 6, 120: 4, 170: 8, 180: 8, 186: 4, 238: 4, 355: 5, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 544: 4, 545: 5, 550: 8, 552: 4, 608: 8, 610: 5, 643: 7, 705: 8, 725: 2, 740: 5, 767: 4, 800: 8, 835: 8, 836: 8, 849: 4, 869: 7, 870: 7, 871: 2, 896: 8, 900: 6, 902: 6, 905: 8, 911: 8, 916: 3, 918: 7, 921: 8, 922: 8, 933: 8, 944: 8, 945: 8, 951: 8, 955: 8, 956: 8, 979: 2, 998: 5, 999: 7, 1000: 8, 1001: 8, 1008: 2, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1043: 8, 1044: 8, 1056: 8, 1059: 1, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1176: 8, 1177: 8, 1178: 8, 1179: 8, 1180: 8, 1181: 8, 1182: 8, 1183: 8, 1189: 8, 1190: 8, 1191: 8, 1192: 8, 1196: 8, 1197: 8, 1198: 8, 1199: 8, 1206: 8, 1207: 8, 1212: 8, 1227: 8, 1235: 8, 1237: 8, 1263: 8, 1279: 8, 1408: 8, 1409: 8, 1410: 8, 1552: 8, 1553: 8, 1554: 8, 1556: 8, 1557: 8, 1561: 8, 1562: 8, 1568: 8, 1569: 8, 1570: 8, 1571: 8, 1572: 8, 1584: 8, 1585: 8, 1589: 8, 1592: 8, 1593: 8, 1595: 8, 1599: 8, 1656: 8, 1728: 8, 1745: 8, 1779: 8, 1872: 8, 1880: 8, 1904: 8, 1912: 8, 1988: 8, 1990: 8, 1996: 8, 1998: 8, 2015: 8, 2016: 8, 2024: 8
|
||||
},
|
||||
# 2018 China Highlander from toyboxZ
|
||||
{
|
||||
36: 8, 37: 8, 114: 5, 119: 6, 120: 4, 170: 8, 180: 8, 186: 4, 238: 4, 355: 5, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 544: 4, 550: 8, 552: 4, 562: 6, 608: 8, 610: 5, 643: 7, 705: 8, 725: 2, 740: 5, 800: 8, 835: 8, 836: 8, 845: 5, 849: 4, 869: 7, 870: 7, 871: 2, 896: 8, 900: 6, 902: 6, 905: 8, 911: 8, 913: 8, 916: 3, 918: 7, 921: 8, 922: 8, 933: 8, 944: 8, 945: 8, 951: 8, 955: 8, 956: 8, 979: 2, 998: 5, 999: 7, 1000: 8, 1001: 8, 1008: 2, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1043: 8, 1044: 8, 1056: 8, 1059: 1, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1176: 8, 1177: 8, 1178: 8, 1179: 8, 1180: 8, 1181: 8, 1182: 8, 1183: 8, 1189: 8, 1190: 8, 1191: 8, 1192: 8, 1196: 8, 1197: 8, 1198: 8, 1199: 8, 1200: 8, 1201: 8, 1202: 8, 1203: 8, 1206: 8, 1207: 8, 1212: 8, 1227: 8, 1235: 8, 1279: 8, 1408: 8, 1409: 8, 1410: 8, 1552: 8, 1553: 8, 1554: 8, 1556: 8, 1557: 8, 1561: 8, 1568: 8, 1569: 8, 1570: 8, 1571: 8, 1572: 8, 1584: 8, 1589: 8, 1592: 8, 1593: 8, 1595: 8, 1599: 8, 1728: 8, 1745: 8, 1779: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8, 2015: 8, 2016: 8, 2024: 8
|
||||
}],
|
||||
CAR.HIGHLANDER_TSS2: [{
|
||||
# 2020 highlander limited
|
||||
@@ -214,11 +237,27 @@ FINGERPRINTS = {
|
||||
# XLE, Limited, and AWD
|
||||
{
|
||||
36: 8, 37: 8, 170: 8, 180: 8, 186: 4, 401: 8, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 544: 4, 550: 8, 552: 4, 562: 6, 565: 8, 608: 8, 610: 8, 643: 7, 658: 8, 705: 8, 728: 8, 740: 5, 742: 8, 743: 8, 761: 8, 764: 8, 765: 8, 767: 4, 800: 8, 810: 2, 812: 8, 814: 8, 818: 8, 822: 8, 824: 8, 829: 2, 830: 7, 835: 8, 836: 8, 865: 8, 869: 7, 870: 7, 871: 2, 877: 8, 881: 8, 882: 8, 885: 8, 889: 8, 891: 8, 896: 8, 898: 8, 900: 6, 902: 6, 905: 8, 918: 8, 921: 8, 933: 8, 934: 8, 935: 8, 944: 8, 945: 8, 951: 8, 955: 8, 956: 8, 976: 1, 987: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1002: 8, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1059: 1, 1063: 8, 1076: 8, 1077: 8, 1082: 8, 1084: 8, 1085: 8, 1086: 8, 1114: 8, 1132: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1172: 8, 1228: 8, 1235: 8, 1237: 8, 1263: 8, 1264: 8, 1279: 8, 1541: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1592: 8, 1594: 8, 1595: 8, 1649: 8, 1696: 8, 1745: 8, 1775: 8, 1779: 8, 1786: 8, 1787: 8, 1788: 8, 1789: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8, 2015: 8, 2016: 8, 2024: 8
|
||||
},
|
||||
# China 2020 RAV4 from superdongle
|
||||
{
|
||||
36: 8, 37: 8, 166: 8, 170: 8, 180: 8, 295: 8, 296: 8, 401: 8, 426: 6, 452: 8, 466: 8, 467: 8, 550: 8, 552: 4, 560: 7, 562: 6, 581: 5, 608: 8, 610: 8, 643: 7, 713: 8, 728: 8, 740: 5, 742: 8, 743: 8, 761: 8, 765: 8, 800: 8, 810: 2, 812: 8, 829: 2, 830: 7, 835: 8, 836: 8, 863: 8, 865: 8, 869: 7, 870: 7, 871: 2, 877: 8, 881: 8, 882: 8, 885: 8, 896: 8, 898: 8, 918: 7, 921: 8, 944: 8, 945: 8, 950: 8, 951: 8, 953: 8, 955: 8, 956: 8, 971: 7, 975: 5, 987: 8, 993: 8, 1002: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1057: 8, 1059: 1, 1063: 8, 1071: 8, 1082: 8, 1084: 8, 1085: 8, 1086: 8, 1112: 8, 1114: 8, 1132: 8, 1161: 8, 1162: 8, 1163: 8, 1172: 8, 1235: 8, 1263: 8, 1279: 8, 1541: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1592: 8, 1594: 8, 1595: 8, 1649: 8, 1745: 8, 1775: 8, 1779: 8
|
||||
}],
|
||||
CAR.COROLLA_TSS2: [
|
||||
# hatch 2019+ and sedan 2020+
|
||||
{
|
||||
36: 8, 37: 8, 114: 5, 170: 8, 180: 8, 186: 4, 401: 8, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 544: 4, 550: 8, 552: 4, 562: 6, 608: 8, 610: 8, 643: 7, 705: 8, 728: 8, 740: 5, 742: 8, 743: 8, 761: 8, 764: 8, 765: 8, 767: 4, 800: 8, 810: 2, 812: 8, 824: 8, 829: 2, 830: 7, 835: 8, 836: 8, 865: 8, 869: 7, 870: 7, 871: 2, 877: 8, 881: 8, 896: 8, 898: 8, 900: 6, 902: 6, 905: 8, 913: 8, 921: 8, 933: 8, 934: 8, 935: 8, 944: 8, 945: 8, 951: 8, 955: 8, 956: 8, 976: 1, 998: 5, 999: 7, 1000: 8, 1001: 8, 1002: 8, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1059: 1, 1076: 8, 1077: 8, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1172: 8, 1235: 8, 1237: 8, 1279: 8, 1541: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1592: 8, 1595: 8, 1649: 8, 1745: 8, 1775: 8, 1779: 8, 1786: 8, 1787: 8, 1788: 8, 1789: 8, 1808: 8, 1809: 8, 1816: 8, 1817: 8, 1840: 8, 1848: 8, 1904: 8, 1912: 8, 1940: 8, 1941: 8, 1948: 8, 1949: 8, 1952: 8, 1960: 8, 1981: 8, 1986: 8, 1990: 8, 1994: 8, 1998: 8, 2004: 8
|
||||
},
|
||||
#2020 AURIS with LTA, number of messages:
|
||||
{
|
||||
36: 8, 37: 8, 114: 5, 170: 8, 180: 8, 186: 4, 401: 8, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 544: 4, 550: 8, 552: 4, 562: 6, 608: 8, 610: 8, 643: 7, 705: 8, 728: 8, 740: 5, 742: 8, 743: 8, 761: 8, 765: 8, 800: 8, 810: 2, 812: 8, 829: 2, 830: 7, 835: 8, 836: 8, 865: 8, 869: 7, 870: 7, 871: 2, 877: 8, 881: 8, 896: 8, 898: 8, 921: 8, 942: 8, 944: 8, 945: 8, 951: 8, 955: 8, 956: 8, 976: 1, 1002: 8, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1059: 1, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1172: 8, 1235: 8, 1237: 8, 1279: 8, 1541: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1592: 8, 1595: 8, 1745: 8, 1775: 8, 1779: 8
|
||||
},
|
||||
{
|
||||
# 2019 Taiwan Altis
|
||||
36: 8, 37: 8, 170: 8, 180: 8, 186: 4, 401: 8, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 544: 4, 550: 8, 552: 4, 562: 6, 608: 8, 610: 8, 643: 7, 705: 8, 728: 8, 740: 5, 742: 8, 743: 8, 761: 8, 765: 8, 800: 8, 830: 7, 835: 8, 836: 8, 865: 8, 869: 7, 870: 7, 871: 2, 877: 8, 881: 8, 885: 8, 896: 8, 898: 8, 918: 7, 921: 8, 944: 8, 945: 8, 951: 8, 955: 8, 956: 8, 976: 1, 987: 8, 1002: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1059: 1, 1082: 8, 1112: 8, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1172: 8, 1235: 8, 1279: 8, 1541: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1592: 8, 1594: 8, 1595: 8, 1745: 8, 1775: 8, 1779: 8
|
||||
},
|
||||
{
|
||||
# 2019 Chinese Levin (Petrol) from Shell
|
||||
36: 8, 37: 8, 170: 8, 180: 8, 186: 4, 355: 5, 401: 8, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 544: 4, 550: 8, 552: 4, 562: 6, 608: 8, 610: 8, 643: 7, 705: 8, 728: 8, 740: 5, 742: 8, 743: 8, 761: 8, 765: 8, 800: 8, 810: 2, 812: 8, 829: 2, 830: 7, 835: 8, 836: 8, 865: 8, 869: 7, 870: 7, 871: 2, 877: 8, 881: 8, 885: 8, 896: 8, 898: 8, 921: 8, 944: 8, 945: 8, 951: 8, 955: 8, 956: 8, 976: 1, 1002: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1059: 1, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1172: 8, 1235: 8, 1279: 8, 1541: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1592: 8, 1594: 8, 1595: 8, 1600: 8, 1649: 8, 1745: 8, 1775: 8, 1779: 8, 1808: 8, 1816: 8, 1904: 8, 1912: 8, 1984: 8, 1992: 8, 2002: 8
|
||||
}],
|
||||
CAR.COROLLAH_TSS2: [
|
||||
# 2019 Taiwan Altis Hybrid
|
||||
@@ -228,10 +267,18 @@ FINGERPRINTS = {
|
||||
# 2019 Chinese Levin Hybrid
|
||||
{
|
||||
36: 8, 37: 8, 166: 8, 170: 8, 180: 8, 295: 8, 296: 8, 401: 8, 426: 6, 452: 8, 466: 8, 467: 8, 550: 8, 552: 4, 560: 7, 562: 6, 581: 5, 608: 8, 610: 8, 643: 7, 713: 8, 728: 8, 740: 5, 742: 8, 743: 8, 761: 8, 765: 8, 767: 4, 800: 8, 810: 2, 812: 8, 829: 2, 830: 7, 835: 8, 836: 8, 865: 8, 869: 7, 870: 7, 871: 2, 877: 8, 881: 8, 885: 8, 896: 8, 898: 8, 921: 8, 944: 8, 945: 8, 950: 8, 951: 8, 953: 8, 955: 8, 956: 8, 971: 7, 975: 5, 993: 8, 1002: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1057: 8, 1059: 1, 1071: 8, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1172: 8, 1235: 8, 1279: 8, 1541: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1592: 8, 1594: 8, 1595: 8, 1600: 8, 1649: 8, 1745: 8, 1775: 8, 1779: 8
|
||||
},
|
||||
# Taiwan Altis Hybrid by Fish
|
||||
{
|
||||
36: 8, 37: 8, 166: 8, 170: 8, 180: 8, 295: 8, 296: 8, 401: 8, 426: 6, 452: 8, 466: 8, 467: 8, 550: 8, 552: 4, 560: 7, 562: 6, 581: 5, 608: 8, 610: 8, 643: 7, 713: 8, 728: 8, 740: 5, 742: 8, 743: 8, 761: 8, 765: 8, 800: 8, 810: 2, 829: 2, 830: 7, 835: 8, 836: 8, 865: 8, 869: 7, 870: 7, 871: 2, 877: 8, 881: 8, 885: 8, 896: 8, 898: 8, 918: 7, 921: 8, 942: 8, 944: 8, 945: 8, 950: 8, 951: 8, 953: 8, 955: 8, 956: 8, 971: 7, 975: 5, 987: 8, 993: 8, 1002: 8, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1057: 8, 1059: 1, 1071: 8, 1082: 8, 1112: 8, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1172: 8, 1235: 8, 1237: 8, 1279: 8, 1541: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1592: 8, 1594: 8, 1595: 8, 1745: 8, 1775: 8, 1779: 8
|
||||
}
|
||||
],
|
||||
CAR.LEXUS_ES_TSS2: [{
|
||||
36: 8, 37: 8, 114: 5, 119: 6, 120: 4, 170: 8, 180: 8, 186: 4, 401: 8, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 544: 4, 550: 8, 552: 4, 562: 6, 608: 8, 610: 8, 643: 7, 658: 8, 705: 8, 728: 8, 740: 5, 761: 8, 764: 8, 765: 8, 767: 4, 800: 8, 810: 2, 812: 8, 814: 8, 818: 8, 824: 8, 830: 7, 835: 8, 836: 8, 865: 8, 869: 7, 870: 7, 871: 2, 877: 8, 881: 8, 882: 8, 885: 8, 889: 8, 896: 8, 898: 8, 900: 6, 902: 6, 905: 8, 913: 8, 918: 8, 921: 8, 933: 8, 934: 8, 935: 8, 944: 8, 945: 8, 951: 8, 955: 8, 956: 8, 976: 1, 987: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1002: 8, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1059: 1, 1076: 8, 1077: 8, 1082: 8, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1172: 8, 1228: 8, 1235: 8, 1237: 8, 1264: 8, 1279: 8, 1541: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1575: 8, 1592: 8, 1594: 8, 1595: 8, 1649: 8, 1696: 8, 1775: 8, 1777: 8, 1779: 8, 1786: 8, 1787: 8, 1788: 8, 1789: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8,
|
||||
},
|
||||
# 2019 Lexus ES200 from Shell
|
||||
{
|
||||
36: 8, 37: 8, 119: 6, 120: 4, 170: 8, 180: 8, 186: 4, 355: 5, 401: 8, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 544: 4, 550: 8, 552: 4, 562: 6, 608: 8, 610: 8, 643: 7, 705: 8, 728: 8, 740: 5, 761: 8, 764: 8, 765: 8, 800: 8, 810: 2, 812: 8, 818: 8, 824: 8, 829: 2, 830: 7, 835: 8, 836: 8, 865: 8, 869: 7, 870: 7, 871: 2, 877: 8, 881: 8, 882: 8, 885: 8, 889: 8, 896: 8, 898: 8, 900: 6, 902: 6, 905: 8, 913: 8, 918: 8, 921: 8, 933: 8, 934: 8, 935: 8, 944: 8, 945: 8, 951: 8, 955: 8, 956: 8, 976: 1, 987: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1002: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1059: 1, 1076: 8, 1077: 8, 1082: 8, 1084: 8, 1085: 8, 1086: 8, 1114: 8, 1132: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1172: 8, 1228: 8, 1235: 8, 1264: 8, 1279: 8, 1541: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1575: 8, 1592: 8, 1594: 8, 1595: 8, 1775: 8, 1777: 8, 1779: 8, 1786: 8, 1787: 8, 1788: 8, 1789: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8
|
||||
}],
|
||||
CAR.LEXUS_ESH_TSS2: [
|
||||
{
|
||||
@@ -244,15 +291,19 @@ FINGERPRINTS = {
|
||||
# XLE AWD 2018
|
||||
{
|
||||
36: 8, 37: 8, 114: 5, 119: 6, 120: 4, 170: 8, 180: 8, 186: 4, 238: 4, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 544: 4, 545: 5, 548: 8, 550: 8, 552: 4, 562: 4, 608: 8, 610: 5, 643: 7, 705: 8, 725: 2, 740: 5, 764: 8, 767: 4, 800: 8, 824: 8, 835: 8, 836: 8, 849: 4, 869: 7, 870: 7, 871: 2, 896: 8, 900: 6, 902: 6, 905: 8, 911: 8, 916: 1, 921: 8, 933: 8, 944: 6, 945: 8, 951: 8, 955: 8, 956: 8, 979: 2, 992: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1002: 8, 1008: 2, 1014: 8, 1017: 8, 1041: 8, 1042: 8, 1043: 8, 1056: 8, 1059: 1, 1076: 8, 1077: 8, 1114: 8, 1160: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1176: 8, 1177: 8, 1178: 8, 1179: 8, 1180: 8, 1181: 8, 1182: 8, 1183: 8, 1191: 8, 1192: 8, 1196: 8, 1197: 8, 1198: 8, 1199: 8, 1200: 8, 1201: 8, 1202: 8, 1203: 8, 1212: 8, 1227: 8, 1235: 8, 1237: 8, 1279: 8, 1552: 8, 1553: 8, 1555: 8, 1556: 8, 1557: 8, 1561: 8, 1562: 8, 1568: 8, 1569: 8, 1570: 8, 1571: 8, 1572: 8, 1584: 8, 1589: 8, 1592: 8, 1593: 8, 1595: 8, 1656: 8, 1664: 8, 1666: 8, 1667: 8, 1728: 8, 1745: 8, 1779: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8
|
||||
},
|
||||
{
|
||||
# Canada 2018 Sienna LTD
|
||||
36: 8, 37: 8, 114: 5, 119: 6, 120: 4, 170: 8, 180: 8, 186: 4, 238: 4, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 544: 4, 545: 5, 548: 8, 550: 8, 552: 4, 562: 4, 608: 8, 610: 5, 643: 7, 705: 8, 725: 2, 740: 5, 764: 8, 800: 8, 818: 8, 822: 8, 824: 8, 835: 8, 836: 8, 849: 4, 869: 7, 870: 7, 871: 2, 888: 8, 889: 8, 891: 8, 896: 8, 900: 6, 902: 6, 905: 8, 911: 8, 916: 1, 918: 7, 921: 8, 933: 8, 944: 6, 945: 8, 951: 8, 955: 8, 956: 8, 979: 2, 992: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1002: 8, 1008: 2, 1014: 8, 1017: 8, 1041: 8, 1042: 8, 1043: 8, 1056: 8, 1059: 1, 1076: 8, 1077: 8, 1114: 8, 1160: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1176: 8, 1177: 8, 1178: 8, 1179: 8, 1180: 8, 1181: 8, 1182: 8, 1183: 8, 1191: 8, 1192: 8, 1196: 8, 1197: 8, 1198: 8, 1199: 8, 1200: 8, 1201: 8, 1202: 8, 1203: 8, 1212: 8, 1227: 8, 1228: 8, 1235: 8, 1237: 8, 1263: 8, 1264: 8, 1279: 8, 1552: 8, 1553: 8, 1555: 8, 1556: 8, 1557: 8, 1561: 8, 1562: 8, 1568: 8, 1569: 8, 1570: 8, 1571: 8, 1572: 8, 1584: 8, 1589: 8, 1592: 8, 1593: 8, 1595: 8, 1656: 8, 1664: 8, 1728: 8, 1745: 8, 1779: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8
|
||||
}],
|
||||
CAR.LEXUS_IS: [
|
||||
# IS200T 2017 TW
|
||||
{
|
||||
36: 8, 37: 8, 114: 5, 119: 6, 120: 4, 170: 8, 180: 8, 186: 4, 355: 5, 400: 6, 426: 6, 452: 8, 464: 8, 466: 8, 467: 5, 544: 4, 550: 8, 552: 4, 608: 8, 610: 5, 643: 7, 705: 8, 740: 5, 800: 8, 836: 8, 845: 5, 849: 4, 869: 7, 870: 7, 871: 2, 896: 8, 897: 8, 900: 6, 902: 6, 905: 8, 911: 8, 913: 8, 916: 3, 918: 7, 921: 8, 922: 8, 933: 8, 944: 8, 945: 8, 951: 8, 955: 8, 956: 8, 979: 2, 992: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1005: 2, 1008: 2, 1009: 8, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1043: 8, 1044: 8, 1056: 8, 1059: 1, 1112: 8, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1168: 1, 1176: 8, 1177: 8, 1178: 8, 1179: 8, 1180: 8, 1181: 8, 1182: 8, 1183: 8, 1184: 8, 1185: 8, 1186: 8, 1187: 8, 1189: 8, 1190: 8, 1191: 8, 1192: 8, 1196: 8, 1197: 8, 1198: 8, 1199: 8, 1206: 8, 1207: 8, 1208: 8, 1212: 8, 1227: 8, 1235: 8, 1237: 8, 1279: 8, 1408: 8, 1409: 8, 1410: 8, 1552: 8, 1553: 8, 1554: 8, 1555: 8, 1556: 8, 1557: 8, 1561: 8, 1568: 8, 1569: 8, 1570: 8, 1571: 8, 1572: 8, 1575: 8, 1584: 8, 1589: 8, 1592: 8, 1593: 8, 1595: 8, 1599: 8, 1728: 8, 1745: 8, 1779: 8
|
||||
},
|
||||
# IS300 2018
|
||||
{
|
||||
36: 8, 37: 8, 114: 5, 119: 6, 120: 4, 170: 8, 180: 8, 186: 4, 238: 4, 400: 6, 426: 6, 452: 8, 464: 8, 466: 8, 467: 5, 544: 4, 550: 8, 552: 4, 608: 8, 610: 5, 643: 7, 705: 8, 740: 5, 767: 4, 800: 8, 836: 8, 845: 5, 849: 4, 869: 7, 870: 7, 871: 2, 896: 8, 897: 8, 900: 6, 902: 6, 905: 8, 911: 8, 913: 8, 916: 3, 918: 7, 921: 8, 933: 8, 944: 8, 945: 8, 951: 8, 955: 8, 956: 8, 979: 2, 992: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1005: 2, 1008: 2, 1009: 8, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1043: 8, 1044: 8, 1056: 8, 1059: 1, 1112: 8, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1168: 1, 1176: 8, 1177: 8, 1178: 8, 1179: 8, 1180: 8, 1181: 8, 1182: 8, 1183: 8, 1184: 8, 1185: 8, 1186: 8, 1187: 8, 1189: 8, 1190: 8, 1191: 8, 1192: 8, 1196: 8, 1197: 8, 1198: 8, 1199: 8, 1206: 8, 1208: 8, 1212: 8, 1227: 8, 1235: 8, 1237: 8, 1279: 8, 1408: 8, 1409: 8, 1410: 8, 1552: 8, 1553: 8, 1554: 8, 1555: 8, 1556: 8, 1557: 8, 1561: 8, 1568: 8, 1569: 8, 1570: 8, 1571: 8, 1572: 8, 1575: 8, 1584: 8, 1589: 8, 1590: 8, 1592: 8, 1593: 8, 1595: 8, 1599: 8, 1648: 8, 1666: 8, 1667: 8, 1728: 8, 1745: 8, 1779: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8
|
||||
},
|
||||
# IS300H 2017
|
||||
{
|
||||
36: 8, 37: 8, 170: 8, 180: 8, 295: 8, 296: 8, 400: 6, 426: 6, 452: 8, 466: 8, 467: 8, 550: 8, 552: 4, 560: 7, 581: 5, 608: 8, 610: 5, 643: 7, 713: 8, 740: 5, 767: 4, 800: 8, 836: 8, 845: 5, 849: 4, 869: 7, 870: 7, 871: 2, 896: 8, 897: 8, 900: 6, 902: 6, 905: 8, 911: 8, 913: 8, 916: 3, 918: 7, 921: 7, 933: 8, 944: 8, 945: 8, 950: 8, 951: 8, 953: 3, 955: 8, 956: 8, 979: 2, 992: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1009: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1043: 8, 1044: 8, 1056: 8, 1057: 8, 1059: 1, 1112: 8, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1168: 1, 1176: 8, 1177: 8, 1178: 8, 1179: 8, 1180: 8, 1181: 8, 1184: 8, 1185: 8, 1186: 8, 1187: 8, 1189: 8, 1190: 8, 1191: 8, 1192: 8, 1196: 8, 1197: 8, 1198: 8, 1199: 8, 1206: 8, 1208: 8, 1212: 8, 1227: 8, 1232: 8, 1235: 8, 1279: 8, 1408: 8, 1409: 8, 1410: 8, 1552: 8, 1553: 8, 1554: 8, 1555: 8, 1556: 8, 1557: 8, 1561: 8, 1568: 8, 1569: 8, 1570: 8, 1571: 8, 1572: 8, 1575: 8, 1584: 8, 1589: 8, 1592: 8, 1593: 8, 1595: 8, 1599: 8, 1728: 8, 1779: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8
|
||||
36: 8, 37: 8, 114: 5, 119: 6, 120: 4, 170: 8, 180: 8, 186: 4, 238: 4, 400: 6, 426: 6, 452: 8, 464: 8, 466: 8, 467: 5, 544: 4, 550: 8, 552: 4, 608: 8, 610: 5, 643: 7, 705: 8, 740: 5, 767:4, 800: 8, 836: 8, 845: 5, 849: 4, 869: 7, 870: 7, 871: 2, 896: 8, 897: 8, 900: 6, 902: 6, 905: 8, 911: 8, 913: 8, 916: 3, 918: 7, 921: 8, 933: 8, 944: 8, 945: 8, 951: 8, 955: 8, 956: 8, 979: 2, 992: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1005: 2, 1008: 2, 1009: 8, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1043: 8, 1044: 8, 1056: 8, 1059: 1, 1112: 8, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1168: 1, 1176: 8, 1177: 8, 1178: 8, 1179: 8, 1180: 8, 1181: 8, 1182: 8, 1183: 8, 1184: 8, 1185: 8, 1186: 8, 1187: 8, 1189: 8, 1190: 8, 1191: 8, 1192: 8, 1196: 8, 1197: 8, 1198: 8, 1199: 8, 1206: 8, 1208: 8, 1212: 8, 1227: 8, 1235: 8, 1237: 8, 1279: 8, 1408: 8, 1409: 8, 1410: 8, 1552: 8, 1553: 8, 1554: 8, 1555: 8, 1556: 8, 1557: 8, 1561: 8, 1568: 8, 1569: 8, 1570: 8, 1571: 8, 1572: 8, 1575: 8, 1584: 8, 1589: 8, 1590: 8, 1592: 8, 1593: 8, 1595: 8, 1599: 8, 1648: 8, 1666: 8, 1667: 8, 1728: 8, 1745: 8, 1779: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8
|
||||
}],
|
||||
CAR.RAV4H_TSS2: [
|
||||
#Hybrid Limited
|
||||
@@ -262,14 +313,29 @@ FINGERPRINTS = {
|
||||
],
|
||||
CAR.LEXUS_CTH: [{
|
||||
36: 8, 37: 8, 170: 8, 180: 8, 288: 8, 426: 6, 452: 8, 466: 8, 467: 8, 548: 8, 552: 4, 560: 7, 581: 5, 608: 8, 610: 5, 643: 7, 713: 8, 740: 5, 800: 8, 810: 2, 832: 8, 835: 8, 836: 8, 849: 4, 869: 7, 870: 7, 871: 2, 897: 8, 900: 6, 902: 6, 905: 8, 911: 8, 916: 1, 921: 8, 933: 8, 944: 6, 945: 8, 950: 8, 951: 8, 953: 3, 955: 4, 956: 8, 979: 2, 992: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1017: 8, 1041: 8, 1042: 8, 1043: 8, 1056: 8, 1057: 8, 1059: 1, 1076: 8, 1077: 8, 1114: 8, 1116: 8, 1160: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1176: 8, 1177: 8, 1178: 8, 1179: 8, 1180: 8, 1181: 8, 1184: 8, 1185: 8, 1186: 8, 1190: 8, 1191: 8, 1192: 8, 1227: 8, 1235: 8, 1279: 8, 1552: 8, 1553: 8, 1554: 8, 1555: 8, 1556: 8, 1557: 8, 1558: 8, 1561: 8, 1562: 8, 1568: 8, 1569: 8, 1570: 8, 1571: 8, 1572: 8, 1575: 8, 1584: 8, 1589: 8, 1592: 8, 1593: 8, 1595: 8, 1664: 8, 1728: 8, 1779: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8
|
||||
},
|
||||
# Taiwan CT200h FP from CloudJ
|
||||
{
|
||||
36: 8, 37: 8, 170: 8, 180: 8, 288: 8, 426: 6, 452: 8, 466: 8, 467: 8, 548: 8, 552: 4, 560: 7, 581: 5, 608: 8, 610: 5, 643: 7, 713: 8, 740: 5, 800: 8, 810: 2, 832: 8, 835: 8, 836: 8, 849: 4, 869: 7, 870: 7, 871: 2, 900: 6, 902: 6, 905: 8, 911: 8, 916: 1, 918: 7, 921: 8, 933: 8, 944: 6, 945: 8, 950: 8, 951: 8, 953: 3, 955: 4, 956: 8, 979: 2, 992: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1017: 8, 1041: 8, 1042: 8, 1043: 8, 1056: 8, 1057: 8, 1059: 1, 1076: 8, 1077: 8, 1112: 8, 1114: 8, 1116: 8, 1160: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1176: 8, 1177: 8, 1178: 8, 1179: 8, 1180: 8, 1181: 8, 1184: 8, 1185: 8, 1186: 8, 1190: 8, 1191: 8, 1192: 8, 1227: 8, 1235: 8, 1279: 8, 1552: 8, 1553: 8, 1554: 8, 1555: 8, 1556: 8, 1557: 8, 1558: 8, 1561: 8, 1562: 8, 1568: 8, 1569: 8, 1570: 8, 1571: 8, 1572: 8, 1575: 8, 1584: 8, 1589: 8, 1592: 8, 1593: 8, 1595: 8, 1664: 8, 1728: 8, 1779: 8
|
||||
}],
|
||||
CAR.LEXUS_NXH: [{
|
||||
36: 8, 37: 8, 170: 8, 180: 8, 295: 8, 296: 8, 426: 6, 452: 8, 466: 8, 467: 8, 550: 8, 552: 4, 560: 7, 562: 6, 581: 5, 608: 8, 610: 5, 643: 7, 713: 8, 740: 5, 742: 8, 743: 8, 764: 8, 800: 8, 810: 2, 812: 3, 818: 8, 822: 8, 824: 8, 835: 8, 836: 8, 845: 5, 849: 4, 869: 7, 870: 7, 871: 2, 889: 8, 891: 8, 896: 8, 897: 8, 900: 6, 902: 6, 905: 8, 911: 8, 913: 8, 916: 3, 918: 8, 921: 8, 933: 8, 944: 8, 945: 8, 950: 8, 951: 8, 953: 3, 955: 8, 956: 8, 979: 2, 987: 8, 992: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1002: 8, 1006: 8, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1043: 8, 1056: 8, 1057: 8, 1059: 1, 1076: 8, 1077: 8, 1082: 8, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1168: 1, 1176: 8, 1177: 8, 1178: 8, 1179: 8, 1180: 8, 1181: 8, 1184: 8, 1185: 8, 1186: 8, 1189: 8, 1190: 8, 1191: 8, 1192: 8, 1195: 8, 1196: 8, 1197: 8, 1198: 8, 1199: 8, 1206: 8, 1208: 8, 1212: 8, 1227: 8, 1228: 8, 1232: 8, 1235: 8, 1237: 8, 1263: 8, 1264: 8, 1279: 8, 1408: 8, 1409: 8, 1410: 8, 1552: 8, 1553: 8, 1554: 8, 1555: 8, 1556: 8, 1557: 8, 1561: 8, 1568: 8, 1569: 8, 1570: 8, 1571: 8, 1572: 8, 1575: 8, 1584: 8, 1589: 8, 1592: 8, 1593: 8, 1595: 8, 1599: 8, 1656: 8, 1728: 8, 1745: 8, 1777: 8, 1779: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8
|
||||
}]
|
||||
}],
|
||||
CAR.LEXUS_ISH: [{
|
||||
# IS300H 2017
|
||||
36: 8, 37: 8, 170: 8, 180: 8, 295: 8, 296: 8, 400: 6, 426: 6, 452: 8, 466: 8, 467: 8, 550: 8, 552: 4, 560: 7, 581: 5, 608: 8, 610: 5, 643: 7, 713: 8, 740: 5, 767: 4, 800: 8, 836: 8, 845: 5, 849: 4, 869: 7, 870: 7, 871: 2, 896: 8, 897: 8, 900: 6, 902: 6, 905: 8, 911: 8, 913: 8, 916: 3, 918: 7, 921: 7, 933: 8, 944: 8, 945: 8, 950: 8, 951: 8, 953: 3, 955: 8, 956: 8, 979: 2, 992: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1009: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1043: 8, 1044: 8, 1056: 8, 1057: 8, 1059: 1, 1112: 8, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1168: 1, 1176: 8, 1177: 8, 1178: 8, 1179: 8, 1180: 8, 1181: 8, 1184: 8, 1185: 8, 1186: 8, 1187: 8, 1189: 8, 1190: 8, 1191: 8, 1192: 8, 1196: 8, 1197: 8, 1198: 8, 1199: 8, 1206: 8, 1208: 8, 1212: 8, 1227: 8, 1232: 8, 1235: 8, 1279: 8, 1408: 8, 1409: 8, 1410: 8, 1552: 8, 1553: 8, 1554: 8, 1555: 8, 1556: 8, 1557: 8, 1561: 8, 1568: 8, 1569: 8, 1570: 8, 1571: 8, 1572: 8, 1575: 8, 1584: 8, 1589: 8, 1592: 8, 1593: 8, 1595: 8, 1599: 8, 1728: 8, 1779: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8
|
||||
}],
|
||||
CAR.LEXUS_GSH: [{
|
||||
# GS450H 2017
|
||||
36: 8, 37: 8, 38: 8, 42: 8, 44: 8, 170: 8, 180: 8, 295: 8, 296: 8, 426: 6, 452: 8, 466: 8, 548: 8, 550: 2, 552: 4, 560: 7, 581: 5, 608: 8, 610: 5, 643: 7, 713: 8, 740: 5, 744: 8, 800: 8, 810: 2, 812: 3, 832: 8, 836: 8, 845: 5, 849: 4, 864: 1, 869: 7, 870: 7, 871: 2, 896: 8, 897: 8, 900: 6, 902: 6, 905: 8, 911: 8, 913: 8, 916: 2, 917: 4, 918: 7, 919: 1, 921: 7, 933: 8, 944: 8, 945: 8, 950: 8, 951: 8, 953: 3, 955: 8, 956: 8, 979: 2, 992: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1009: 8, 1014: 8, 1017: 8, 1041: 8, 1042: 8, 1043: 8, 1056: 8, 1057: 8, 1059: 1, 1112: 8, 1114: 8, 1116: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1168: 1, 1176: 8, 1177: 8, 1178: 8, 1179: 8, 1180: 8, 1181: 8, 1182: 8, 1183: 8, 1184: 8, 1185: 8, 1186: 8, 1187: 8, 1188: 8, 1189: 8, 1190: 8, 1191: 8, 1192: 8, 1193: 8, 1195: 8, 1196: 8, 1197: 8, 1198: 8, 1199: 8, 1200: 8, 1201: 8, 1206: 8, 1208: 8, 1226: 8, 1227: 8, 1235: 8, 1237: 8, 1250: 8, 1279: 8, 1408: 8, 1409: 8, 1410: 8, 1552: 8, 1553: 8, 1554: 8, 1555: 8, 1556: 8, 1557: 8, 1561: 8, 1568: 8, 1569: 8, 1570: 8, 1571: 8, 1572: 8, 1575: 8, 1584: 8, 1589: 8, 1592: 8, 1593: 8, 1595: 8, 1596: 8, 1597: 8, 1599: 8, 1664: 8, 1728: 8, 1779: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8
|
||||
}],
|
||||
CAR.LEXUS_NXT: [{
|
||||
36: 8, 37: 8, 114: 5, 119: 6, 120: 4, 170: 8, 180: 8, 186: 4, 238: 4, 426: 6, 452: 8, 464: 8, 466: 7, 544: 4, 550: 8, 562: 4, 608: 8, 610: 5, 643: 7, 705: 8, 725: 2, 740: 5, 800: 8, 810: 2, 812: 3, 836: 8, 845: 5, 869: 7, 870: 7, 871: 2, 896: 8, 897: 8, 900: 6, 902: 6, 905: 8, 911: 8, 913: 8, 916: 3, 918: 7, 921: 8, 933: 8, 944: 8, 945: 8, 951: 8, 955: 8, 956: 8, 979: 2, 998: 5, 999: 7, 1000: 8, 1001: 8, 1008: 2, 1009: 8, 1014: 8, 1017: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1059: 1, 1112: 8, 1114: 8, 1176: 8, 1177: 8, 1178: 8, 1179: 8, 1180: 8, 1181: 8, 1182: 8, 1183: 8, 1184: 8, 1185: 8, 1186: 8, 1189: 8, 1190: 8, 1191: 8, 1192: 8, 1195: 8, 1196: 8, 1197: 8, 1198: 8, 1199: 8, 1200: 8, 1201: 8, 1202: 8, 1203: 8, 1206: 8, 1208: 8, 1212: 8, 1227: 8, 1235: 8, 1237: 8, 1263: 8, 1552: 8, 1553: 8, 1555: 8, 1556: 8, 1557: 8, 1561: 8, 1568: 8, 1569: 8, 1570: 8, 1571: 8, 1572: 8, 1575: 8, 1584: 8, 1592: 8, 1593: 8, 1595: 8, 1599: 8, 1656: 8, 1728: 8, 1745: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8
|
||||
}],
|
||||
}
|
||||
|
||||
# Don't use theses fingerprints for fingerprinting, they are still needed for ECU detection
|
||||
IGNORED_FINGERPRINTS = [CAR.RAV4H_TSS2, CAR.HIGHLANDERH_TSS2, CAR.LEXUS_RXH_TSS2]
|
||||
IGNORED_FINGERPRINTS = [CAR.HIGHLANDERH_TSS2, CAR.LEXUS_RXH_TSS2]
|
||||
|
||||
FW_VERSIONS = {
|
||||
CAR.AVALON: {
|
||||
@@ -345,6 +411,7 @@ FW_VERSIONS = {
|
||||
},
|
||||
CAR.CAMRYH: {
|
||||
(Ecu.engine, 0x700, None): [
|
||||
b'\x018966306N9000\x00\x00\x00\x00', # from a358063504 @wechat
|
||||
b'\x018966333N4300\x00\x00\x00\x00',
|
||||
b'\x018966333X0000\x00\x00\x00\x00',
|
||||
b'\x028966306B2100\x00\x00\x00\x00897CF3302002\x00\x00\x00\x00',
|
||||
@@ -373,6 +440,7 @@ FW_VERSIONS = {
|
||||
b'8821F0601200 ',
|
||||
b'8821F0601300 ',
|
||||
b'8821F0603400 ',
|
||||
b'8821F0603600 ', # from a358063504 @wechat
|
||||
b'8821F0604200 ',
|
||||
b'8821F0606200 ',
|
||||
b'8821F0607200 ',
|
||||
@@ -394,6 +462,7 @@ FW_VERSIONS = {
|
||||
b'8821F0601200 ',
|
||||
b'8821F0601300 ',
|
||||
b'8821F0603400 ',
|
||||
b'8821F0603600 ', # from a358063504 @wechat
|
||||
b'8821F0604200 ',
|
||||
b'8821F0606200 ',
|
||||
b'8821F0607200 ',
|
||||
@@ -585,6 +654,7 @@ FW_VERSIONS = {
|
||||
b'\x028966312Q4000\x00\x00\x00\x008966A4703000\x00\x00\x00\x00',
|
||||
b'\x038966312L7000\x00\x00\x00\x008966A4703000\x00\x00\x00\x00897CF1205001\x00\x00\x00\x00',
|
||||
b'\x038966312N1000\x00\x00\x00\x008966A4703000\x00\x00\x00\x00897CF1203001\x00\x00\x00\x00',
|
||||
b'\x02896630ZN8000\x00\x00\x00\x008966A4703000\x00\x00\x00\x00', # Brazil 2020 Corolla Hybrid FPv2 from berno22
|
||||
],
|
||||
(Ecu.eps, 0x7a1, None): [
|
||||
b'8965B12361\x00\x00\x00\x00\x00\x00',
|
||||
@@ -593,6 +663,7 @@ FW_VERSIONS = {
|
||||
b'\x018965B12470\x00\x00\x00\x00\x00\x00',
|
||||
b'\x018965B12500\x00\x00\x00\x00\x00\x00',
|
||||
b'\x018965B12530\x00\x00\x00\x00\x00\x00',
|
||||
b'\x018965B12490\x00\x00\x00\x00\x00\x00', # Brazil 2020 Corolla Hybrid FPv2 from berno22
|
||||
],
|
||||
(Ecu.esp, 0x7b0, None): [
|
||||
b'F152612590\x00\x00\x00\x00\x00\x00',
|
||||
@@ -603,6 +674,7 @@ FW_VERSIONS = {
|
||||
b'F152612840\x00\x00\x00\x00\x00\x00',
|
||||
b'F152612A10\x00\x00\x00\x00\x00\x00',
|
||||
b'F152642540\x00\x00\x00\x00\x00\x00',
|
||||
b'F152612820\x00\x00\x00\x00\x00\x00', # Brazil 2020 Corolla Hybrid FPv2 from berno22
|
||||
],
|
||||
(Ecu.fwdRadar, 0x750, 0xf): [
|
||||
b'\x018821F3301100\x00\x00\x00\x00',
|
||||
@@ -989,6 +1061,7 @@ FW_VERSIONS = {
|
||||
b'\x01896630852100\x00\x00\x00\x00',
|
||||
b'\x01896630859000\x00\x00\x00\x00',
|
||||
b'\x01896630860000\x00\x00\x00\x00',
|
||||
b'\x01896630852000\x00\x00\x00\x00', # 2018 Toyota Sienna LTD fingerprint (v2) by ming-feng
|
||||
],
|
||||
(Ecu.eps, 0x7a1, None): [
|
||||
b'8965B45070\x00\x00\x00\x00\x00\x00',
|
||||
@@ -1196,8 +1269,11 @@ DBC = {
|
||||
CAR.LEXUS_CTH: dbc_dict('lexus_ct200h_2018_pt_generated', 'toyota_adas'),
|
||||
CAR.RAV4H_TSS2: dbc_dict('toyota_nodsu_hybrid_pt_generated', 'toyota_tss2_adas'),
|
||||
CAR.LEXUS_NXH: dbc_dict('lexus_nx300h_2018_pt_generated', 'toyota_adas'),
|
||||
CAR.LEXUS_ISH: dbc_dict('lexus_is300h_2017_pt_generated', 'toyota_adas'),
|
||||
CAR.LEXUS_GSH: dbc_dict('lexus_is300h_2017_pt_generated', 'toyota_adas'),
|
||||
CAR.LEXUS_NXT: dbc_dict('lexus_nxt_2015_pt_generated', 'toyota_adas'),
|
||||
}
|
||||
|
||||
NO_DSU_CAR = [CAR.CHR, CAR.CHRH, CAR.CAMRY, CAR.CAMRYH, CAR.RAV4_TSS2, CAR.COROLLA_TSS2, CAR.COROLLAH_TSS2, CAR.LEXUS_ES_TSS2, CAR.LEXUS_ESH_TSS2, CAR.RAV4H_TSS2, CAR.LEXUS_RX_TSS2, CAR.LEXUS_RXH_TSS2, CAR.HIGHLANDER_TSS2, CAR.HIGHLANDERH_TSS2]
|
||||
NO_DSU_CAR = [CAR.CHR, CAR.CHRH, CAR.CAMRY, CAR.CAMRYH, CAR.RAV4_TSS2, CAR.COROLLA_TSS2, CAR.COROLLAH_TSS2, CAR.LEXUS_ES_TSS2, CAR.LEXUS_ESH_TSS2, CAR.RAV4H_TSS2, CAR.LEXUS_RX_TSS2, CAR.LEXUS_RXH_TSS2, CAR.HIGHLANDER_TSS2, CAR.HIGHLANDERH_TSS2, CAR.LEXUS_NXT]
|
||||
TSS2_CAR = [CAR.RAV4_TSS2, CAR.COROLLA_TSS2, CAR.COROLLAH_TSS2, CAR.LEXUS_ES_TSS2, CAR.LEXUS_ESH_TSS2, CAR.RAV4H_TSS2, CAR.LEXUS_RX_TSS2, CAR.LEXUS_RXH_TSS2, CAR.HIGHLANDER_TSS2, CAR.HIGHLANDERH_TSS2]
|
||||
NO_STOP_TIMER_CAR = [CAR.RAV4H, CAR.HIGHLANDERH, CAR.HIGHLANDER, CAR.RAV4_TSS2, CAR.COROLLA_TSS2, CAR.COROLLAH_TSS2, CAR.LEXUS_ES_TSS2, CAR.LEXUS_ESH_TSS2, CAR.SIENNA, CAR.RAV4H_TSS2, CAR.LEXUS_RX_TSS2, CAR.LEXUS_RXH_TSS2, CAR.HIGHLANDER_TSS2, CAR.HIGHLANDERH_TSS2] # no resume button press required
|
||||
NO_STOP_TIMER_CAR = [CAR.RAV4H, CAR.HIGHLANDERH, CAR.HIGHLANDER, CAR.RAV4_TSS2, CAR.COROLLA_TSS2, CAR.COROLLAH_TSS2, CAR.LEXUS_ES_TSS2, CAR.LEXUS_ESH_TSS2, CAR.SIENNA, CAR.RAV4H_TSS2, CAR.LEXUS_RX_TSS2, CAR.LEXUS_RXH_TSS2, CAR.HIGHLANDER_TSS2, CAR.HIGHLANDERH_TSS2, CAR.LEXUS_NXT] # no resume button press required
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
from cereal import car
|
||||
from selfdrive.car import apply_std_steer_torque_limits
|
||||
from selfdrive.car.volkswagen import volkswagencan
|
||||
from selfdrive.car.volkswagen.values import DBC, CANBUS, MQB_LDW_MESSAGES, BUTTON_STATES, CarControllerParams
|
||||
from selfdrive.car.volkswagen.values import DBC, CANBUS, NWL, MQB_LDW_MESSAGES, BUTTON_STATES, CarControllerParams
|
||||
from opendbc.can.packer import CANPacker
|
||||
from common.dp_common import common_controller_ctrl
|
||||
|
||||
VisualAlert = car.CarControl.HUDControl.VisualAlert
|
||||
|
||||
@@ -12,6 +13,16 @@ class CarController():
|
||||
self.apply_steer_last = 0
|
||||
|
||||
self.packer_pt = CANPacker(DBC[CP.carFingerprint]['pt'])
|
||||
self.acc_bus = CANBUS.pt if CP.networkLocation == NWL.fwdCamera else CANBUS.cam
|
||||
|
||||
if CP.safetyModel == car.CarParams.SafetyModel.volkswagen:
|
||||
self.create_steering_control = volkswagencan.create_mqb_steering_control
|
||||
self.create_acc_buttons_control = volkswagencan.create_mqb_acc_buttons_control
|
||||
self.create_hud_control = volkswagencan.create_mqb_hud_control
|
||||
elif CP.safetyModel == car.CarParams.SafetyModel.volkswagenPq:
|
||||
self.create_steering_control = volkswagencan.create_pq_steering_control
|
||||
self.create_acc_buttons_control = volkswagencan.create_pq_acc_buttons_control
|
||||
self.create_hud_control = volkswagencan.create_pq_hud_control
|
||||
|
||||
self.hcaSameTorqueCount = 0
|
||||
self.hcaEnabledFrameCount = 0
|
||||
@@ -22,7 +33,11 @@ class CarController():
|
||||
|
||||
self.steer_rate_limited = False
|
||||
|
||||
def update(self, enabled, CS, frame, actuators, visual_alert, audible_alert, leftLaneVisible, rightLaneVisible):
|
||||
# dp
|
||||
self.last_blinker_on = False
|
||||
self.blinker_end_frame = 0.
|
||||
|
||||
def update(self, enabled, CS, frame, actuators, visual_alert, audible_alert, leftLaneVisible, rightLaneVisible, dragonconf):
|
||||
""" Controls thread """
|
||||
|
||||
P = CarControllerParams
|
||||
@@ -96,9 +111,22 @@ class CarController():
|
||||
hcaEnabled = False
|
||||
apply_steer = 0
|
||||
|
||||
# dp
|
||||
blinker_on = CS.out.leftBlinker or CS.out.rightBlinker
|
||||
if not enabled:
|
||||
self.blinker_end_frame = 0
|
||||
if self.last_blinker_on and not blinker_on:
|
||||
self.blinker_end_frame = frame + dragonconf.dpSignalOffDelay
|
||||
apply_steer = common_controller_ctrl(enabled,
|
||||
dragonconf.dpLatCtrl,
|
||||
dragonconf.dpSteeringOnSignal,
|
||||
blinker_on or frame < self.blinker_end_frame,
|
||||
apply_steer)
|
||||
self.last_blinker_on = blinker_on
|
||||
|
||||
self.apply_steer_last = apply_steer
|
||||
idx = (frame / P.HCA_STEP) % 16
|
||||
can_sends.append(volkswagencan.create_mqb_steering_control(self.packer_pt, CANBUS.pt, apply_steer,
|
||||
can_sends.append(self.create_steering_control(self.packer_pt, CANBUS.pt, apply_steer,
|
||||
idx, hcaEnabled))
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
@@ -119,7 +147,7 @@ class CarController():
|
||||
else:
|
||||
hud_alert = MQB_LDW_MESSAGES["none"]
|
||||
|
||||
can_sends.append(volkswagencan.create_mqb_hud_control(self.packer_pt, CANBUS.pt, hcaEnabled,
|
||||
can_sends.append(self.create_hud_control(self.packer_pt, CANBUS.pt, hcaEnabled,
|
||||
CS.out.steeringPressed, hud_alert, leftLaneVisible,
|
||||
rightLaneVisible))
|
||||
|
||||
@@ -178,7 +206,7 @@ class CarController():
|
||||
if self.graMsgSentCount == 0:
|
||||
self.graMsgStartFramePrev = frame
|
||||
idx = (CS.graMsgBusCounter + 1) % 16
|
||||
can_sends.append(volkswagencan.create_mqb_acc_buttons_control(self.packer_pt, CANBUS.pt, self.graButtonStatesToSend, CS, idx))
|
||||
can_sends.append(self.create_acc_buttons_control(self.packer_pt, self.acc_bus, self.graButtonStatesToSend, CS, idx))
|
||||
self.graMsgSentCount += 1
|
||||
if self.graMsgSentCount >= P.GRA_VBP_COUNT:
|
||||
self.graButtonStatesToSend = None
|
||||
|
||||
@@ -4,16 +4,33 @@ from selfdrive.config import Conversions as CV
|
||||
from selfdrive.car.interfaces import CarStateBase
|
||||
from opendbc.can.parser import CANParser
|
||||
from opendbc.can.can_define import CANDefine
|
||||
from selfdrive.car.volkswagen.values import DBC, CANBUS, BUTTON_STATES, CarControllerParams
|
||||
from selfdrive.car.volkswagen.values import DBC, CANBUS, NWL, TRANS, GEAR, BUTTON_STATES, CarControllerParams
|
||||
|
||||
class CarState(CarStateBase):
|
||||
def __init__(self, CP):
|
||||
super().__init__(CP)
|
||||
can_define = CANDefine(DBC[CP.carFingerprint]['pt'])
|
||||
self.shifter_values = can_define.dv["Getriebe_11"]['GE_Fahrstufe']
|
||||
|
||||
if CP.safetyModel == car.CarParams.SafetyModel.volkswagenPq:
|
||||
# Configure for PQ35/PQ46/NMS network messaging
|
||||
self.get_can_parser = self.get_pq_can_parser
|
||||
self.get_cam_can_parser = self.get_pq_cam_can_parser
|
||||
self.update = self.update_pq
|
||||
if CP.transmissionType == TRANS.automatic:
|
||||
self.shifter_values = can_define.dv["Getriebe_1"]['Waehlhebelposition__Getriebe_1_']
|
||||
else:
|
||||
# Configure for MQB network messaging (default)
|
||||
self.get_can_parser = self.get_mqb_can_parser
|
||||
self.get_cam_can_parser = self.get_mqb_cam_can_parser
|
||||
self.update = self.update_mqb
|
||||
if CP.transmissionType == TRANS.automatic:
|
||||
self.shifter_values = can_define.dv["Getriebe_11"]['GE_Fahrstufe']
|
||||
elif CP.transmissionType == TRANS.direct:
|
||||
self.shifter_values = can_define.dv["EV_Gearshift"]['GearPosition']
|
||||
|
||||
self.buttonStates = BUTTON_STATES.copy()
|
||||
|
||||
def update(self, pt_cp):
|
||||
def update_mqb(self, pt_cp, cam_cp, acc_cp, trans_type):
|
||||
ret = car.CarState.new_message()
|
||||
# Update vehicle speed and acceleration from ABS wheel speeds.
|
||||
ret.wheelSpeeds.fl = pt_cp.vl["ESP_19"]['ESP_VL_Radgeschw_02'] * CV.KPH_TO_MS
|
||||
@@ -41,9 +58,30 @@ class CarState(CarStateBase):
|
||||
ret.brakePressed = bool(pt_cp.vl["ESP_05"]['ESP_Fahrer_bremst'])
|
||||
ret.brakeLights = bool(pt_cp.vl["ESP_05"]['ESP_Status_Bremsdruck'])
|
||||
|
||||
# Additional safety checks performed in CarInterface.
|
||||
self.parkingBrakeSet = bool(pt_cp.vl["Kombi_01"]['KBI_Handbremse']) # FIXME: need to include an EPB check as well
|
||||
ret.espDisabled = pt_cp.vl["ESP_21"]['ESP_Tastung_passiv'] != 0
|
||||
|
||||
# Update gear and/or clutch position data.
|
||||
can_gear_shifter = int(pt_cp.vl["Getriebe_11"]['GE_Fahrstufe'])
|
||||
ret.gearShifter = self.parse_gear_shifter(self.shifter_values.get(can_gear_shifter, None))
|
||||
if trans_type == TRANS.automatic:
|
||||
ret.gearShifter = self.parse_gear_shifter(self.shifter_values.get(pt_cp.vl["Getriebe_11"]['GE_Fahrstufe'], None))
|
||||
elif trans_type == TRANS.direct:
|
||||
ret.gearShifter = self.parse_gear_shifter(self.shifter_values.get(pt_cp.vl["EV_Gearshift"]['GearPosition'], None))
|
||||
elif trans_type == TRANS.manual:
|
||||
ret.clutchPressed = not pt_cp.vl["Motor_14"]['MO_Kuppl_schalter']
|
||||
reverse_light = bool(pt_cp.vl["Gateway_72"]['BCM1_Rueckfahrlicht_Schalter'])
|
||||
# TODO: verify this synthesis has the desired behavior.
|
||||
# In particular, should we neutral disengage during normal gear changes?
|
||||
# Also, what happens if we're rolling backwards with the clutch pressed
|
||||
# in a gear other than reverse?
|
||||
if reverse_light:
|
||||
ret.gearShifter = GEAR.reverse
|
||||
elif ret.standstill and self.parkingBrakeSet:
|
||||
ret.gearShifter = GEAR.park
|
||||
elif ret.clutchPressed:
|
||||
ret.gearShifter = GEAR.neutral
|
||||
else:
|
||||
ret.gearShifter = GEAR.drive
|
||||
|
||||
# Update door and trunk/hatch lid open status.
|
||||
ret.doorOpen = any([pt_cp.vl["Gateway_72"]['ZV_FT_offen'],
|
||||
@@ -77,7 +115,7 @@ class CarState(CarStateBase):
|
||||
|
||||
# Update ACC setpoint. When the setpoint is zero or there's an error, the
|
||||
# radar sends a set-speed of ~90.69 m/s / 203mph.
|
||||
ret.cruiseState.speed = pt_cp.vl["ACC_02"]['SetSpeed']
|
||||
ret.cruiseState.speed = acc_cp.vl["ACC_02"]['SetSpeed']
|
||||
if ret.cruiseState.speed > 90:
|
||||
ret.cruiseState.speed = 0
|
||||
|
||||
@@ -98,6 +136,7 @@ class CarState(CarStateBase):
|
||||
self.graTypHauptschalter = pt_cp.vl["GRA_ACC_01"]['GRA_Typ_Hauptschalter']
|
||||
self.graButtonTypeInfo = pt_cp.vl["GRA_ACC_01"]['GRA_ButtonTypeInfo']
|
||||
self.graTipStufe2 = pt_cp.vl["GRA_ACC_01"]['GRA_Tip_Stufe_2']
|
||||
self.graTyp468 = pt_cp.vl["GRA_ACC_01"]['GRA_Typ468']
|
||||
# Pick up the GRA_ACC_01 CAN message counter so we can sync to it for
|
||||
# later cruise-control button spamming.
|
||||
self.graMsgBusCounter = pt_cp.vl["GRA_ACC_01"]['COUNTER']
|
||||
@@ -106,15 +145,113 @@ class CarState(CarStateBase):
|
||||
# accept and respond to HCA_01 messages and has not encountered a fault.
|
||||
self.steeringFault = not pt_cp.vl["EPS_01"]["HCA_Ready"]
|
||||
|
||||
return ret
|
||||
|
||||
def update_pq(self, pt_cp, cam_cp, acc_cp, trans_type):
|
||||
ret = car.CarState.new_message()
|
||||
# Update vehicle speed and acceleration from ABS wheel speeds.
|
||||
ret.wheelSpeeds.fl = pt_cp.vl["Bremse_3"]['Radgeschw__VL_4_1'] * CV.KPH_TO_MS
|
||||
ret.wheelSpeeds.fr = pt_cp.vl["Bremse_3"]['Radgeschw__VR_4_1'] * CV.KPH_TO_MS
|
||||
ret.wheelSpeeds.rl = pt_cp.vl["Bremse_3"]['Radgeschw__HL_4_1'] * CV.KPH_TO_MS
|
||||
ret.wheelSpeeds.rr = pt_cp.vl["Bremse_3"]['Radgeschw__HR_4_1'] * CV.KPH_TO_MS
|
||||
|
||||
ret.vEgoRaw = float(np.mean([ret.wheelSpeeds.fl, ret.wheelSpeeds.fr, ret.wheelSpeeds.rl, ret.wheelSpeeds.rr]))
|
||||
ret.vEgo, ret.aEgo = self.update_speed_kf(ret.vEgoRaw)
|
||||
|
||||
ret.standstill = ret.vEgoRaw < 0.1
|
||||
|
||||
# Update steering angle, rate, yaw rate, and driver input torque. VW send
|
||||
# the sign/direction in a separate signal so they must be recombined.
|
||||
ret.steeringAngle = pt_cp.vl["Lenkhilfe_3"]['LH3_BLW'] * (1, -1)[int(pt_cp.vl["Lenkhilfe_3"]['LH3_BLWSign'])]
|
||||
ret.steeringRate = pt_cp.vl["Lenkwinkel_1"]['Lenkradwinkel_Geschwindigkeit'] * (1, -1)[int(pt_cp.vl["Lenkwinkel_1"]['Lenkradwinkel_Geschwindigkeit_S'])]
|
||||
ret.steeringTorque = pt_cp.vl["Lenkhilfe_3"]['LH3_LM'] * (1, -1)[int(pt_cp.vl["Lenkhilfe_3"]['LH3_LMSign'])]
|
||||
ret.steeringPressed = abs(ret.steeringTorque) > CarControllerParams.STEER_DRIVER_ALLOWANCE
|
||||
ret.yawRate = pt_cp.vl["Bremse_5"]['Giergeschwindigkeit'] * (1, -1)[int(pt_cp.vl["Bremse_5"]['Vorzeichen_der_Giergeschwindigk'])] * CV.DEG_TO_RAD
|
||||
|
||||
# Update gas, brakes, and gearshift.
|
||||
ret.gas = pt_cp.vl["Motor_3"]['Fahrpedal_Rohsignal'] / 100.0
|
||||
ret.gasPressed = ret.gas > 0
|
||||
ret.brake = pt_cp.vl["Bremse_5"]['Bremsdruck'] / 250.0 # FIXME: this is pressure in Bar, not sure what OP expects
|
||||
ret.brakePressed = bool(pt_cp.vl["Motor_2"]['Bremstestschalter'])
|
||||
ret.brakeLights = bool(pt_cp.vl["Motor_2"]['Bremslichtschalter'])
|
||||
|
||||
# Additional safety checks performed in CarInterface.
|
||||
self.parkingBrakeSet = bool(pt_cp.vl["Kombi_01"]['KBI_Handbremse']) # FIXME: need to include an EPB check as well
|
||||
ret.espDisabled = pt_cp.vl["ESP_21"]['ESP_Tastung_passiv'] != 0
|
||||
self.parkingBrakeSet = bool(pt_cp.vl["Kombi_1"]['Bremsinfo']) # FIXME: need to include an EPB check as well
|
||||
ret.espDisabled = bool(pt_cp.vl["Bremse_1"]['ESP_Passiv_getastet'])
|
||||
|
||||
# Update gear and/or clutch position data.
|
||||
if trans_type == TRANS.automatic:
|
||||
ret.gearShifter = self.parse_gear_shifter(self.shifter_values.get(pt_cp.vl["Getriebe_1"]['Waehlhebelposition__Getriebe_1_'], None))
|
||||
elif trans_type == TRANS.manual:
|
||||
ret.clutchPressed = not pt_cp.vl["Motor_1"]['Kupplungsschalter']
|
||||
reverse_light = bool(pt_cp.vl["Gate_Komf_1"]['GK1_Rueckfahr'])
|
||||
# TODO: verify this synthesis has the desired behavior.
|
||||
# In particular, should we neutral disengage during normal gear changes?
|
||||
# Also, what happens if we're rolling backwards with the clutch pressed
|
||||
# in a gear other than reverse?
|
||||
if reverse_light:
|
||||
ret.gearShifter = GEAR.reverse
|
||||
elif ret.standstill and self.parkingBrakeSet:
|
||||
ret.gearShifter = GEAR.park
|
||||
elif ret.clutchPressed:
|
||||
ret.gearShifter = GEAR.neutral
|
||||
else:
|
||||
ret.gearShifter = GEAR.drive
|
||||
|
||||
# Update door and trunk/hatch lid open status.
|
||||
# TODO: need to locate signals for other three doors if possible
|
||||
ret.doorOpen = bool(pt_cp.vl["Gate_Komf_1"]['GK1_Fa_Tuerkont'])
|
||||
|
||||
# Update seatbelt fastened status.
|
||||
ret.seatbeltUnlatched = not bool(pt_cp.vl["Airbag_1"]["Gurtschalter_Fahrer"])
|
||||
|
||||
# Update driver preference for metric. VW stores many different unit
|
||||
# preferences, including separate units for for distance vs. speed.
|
||||
# We use the speed preference for OP.
|
||||
self.displayMetricUnits = not pt_cp.vl["Einheiten_1"]["MFA_v_Einheit_02"]
|
||||
|
||||
# Update ACC radar status.
|
||||
# FIXME: This is unfinished and not fully correct, need to improve further
|
||||
ret.cruiseState.available = bool(pt_cp.vl["GRA_neu"]['Hauptschalter'])
|
||||
ret.cruiseState.enabled = True if pt_cp.vl["Motor_2"]['GRA_Status'] in [1, 2] else False
|
||||
|
||||
# Update ACC setpoint. When the setpoint reads as 255, the driver has not
|
||||
# yet established an ACC setpoint, so treat it as zero.
|
||||
ret.cruiseState.speed = acc_cp.vl["ACC_GRA_Anziege"]['ACA_V_Wunsch'] * CV.KPH_TO_MS
|
||||
if ret.cruiseState.speed > 70: # 255 kph in m/s == no current setpoint
|
||||
ret.cruiseState.speed = 0
|
||||
|
||||
# Update control button states for turn signals and ACC controls.
|
||||
self.buttonStates["accelCruise"] = bool(pt_cp.vl["GRA_neu"]['Kurz_Tip_up']) or bool(pt_cp.vl["GRA_neu"]['Lang_Tip_up'])
|
||||
self.buttonStates["decelCruise"] = bool(pt_cp.vl["GRA_neu"]['Kurz_Tip_down']) or bool(pt_cp.vl["GRA_neu"]['Lang_Tip_down'])
|
||||
self.buttonStates["cancel"] = bool(pt_cp.vl["GRA_neu"]['Abbrechen'])
|
||||
self.buttonStates["setCruise"] = bool(pt_cp.vl["GRA_neu"]['Setzen'])
|
||||
self.buttonStates["resumeCruise"] = bool(pt_cp.vl["GRA_neu"]['Wiederaufnahme'])
|
||||
self.buttonStates["gapAdjustCruise"] = bool(pt_cp.vl["GRA_neu"]['Zeitlueckenverstellung'])
|
||||
ret.leftBlinker = bool(pt_cp.vl["Gate_Komf_1"]['GK1_Blinker_li'])
|
||||
ret.rightBlinker = bool(pt_cp.vl["Gate_Komf_1"]['GK1_Blinker_re'])
|
||||
|
||||
# Read ACC hardware button type configuration info that has to pass thru
|
||||
# to the radar. Ends up being different for steering wheel buttons vs
|
||||
# third stalk type controls.
|
||||
# TODO: Check to see what info we need to passthru and spoof on PQ
|
||||
self.graHauptschalter = pt_cp.vl["GRA_neu"]['Hauptschalter']
|
||||
self.graTypHauptschalter = False
|
||||
self.graButtonTypeInfo = False
|
||||
self.graTipStufe2 = False
|
||||
# Pick up the GRA_ACC_01 CAN message counter so we can sync to it for
|
||||
# later cruise-control button spamming.
|
||||
# FIXME: will need msg counter and checksum algo to spoof GRA_neu
|
||||
self.graMsgBusCounter = 0
|
||||
|
||||
# Check to make sure the electric power steering rack is configured to
|
||||
# accept and respond to HCA_01 messages and has not encountered a fault.
|
||||
self.steeringFault = pt_cp.vl["Lenkhilfe_2"]['LH2_Sta_HCA'] not in [3, 5]
|
||||
|
||||
return ret
|
||||
|
||||
@staticmethod
|
||||
def get_can_parser(CP):
|
||||
# this function generates lists for signal, messages and initial values
|
||||
def get_mqb_can_parser(CP):
|
||||
signals = [
|
||||
# sig_name, sig_address, default
|
||||
("LWI_Lenkradwinkel", "LWI_01", 0), # Absolute steering angle
|
||||
@@ -134,14 +271,12 @@ class CarState(CarStateBase):
|
||||
("ZV_HD_offen", "Gateway_72", 0), # Trunk or hatch open
|
||||
("BH_Blinker_li", "Gateway_72", 0), # Left turn signal on
|
||||
("BH_Blinker_re", "Gateway_72", 0), # Right turn signal on
|
||||
("GE_Fahrstufe", "Getriebe_11", 0), # Auto trans gear selector position
|
||||
("AB_Gurtschloss_FA", "Airbag_02", 0), # Seatbelt status, driver
|
||||
("AB_Gurtschloss_BF", "Airbag_02", 0), # Seatbelt status, passenger
|
||||
("ESP_Fahrer_bremst", "ESP_05", 0), # Brake pedal pressed
|
||||
("ESP_Status_Bremsdruck", "ESP_05", 0), # Brakes applied
|
||||
("ESP_Bremsdruck", "ESP_05", 0), # Brake pressure applied
|
||||
("MO_Fahrpedalrohwert_01", "Motor_20", 0), # Accelerator pedal value
|
||||
("MO_Kuppl_schalter", "Motor_14", 0), # Clutch switch
|
||||
("Driver_Strain", "EPS_01", 0), # Absolute driver torque input
|
||||
("Driver_Strain_VZ", "EPS_01", 0), # Driver torque input sign
|
||||
("HCA_Ready", "EPS_01", 0), # Steering rack HCA support configured
|
||||
@@ -149,10 +284,6 @@ class CarState(CarStateBase):
|
||||
("KBI_MFA_v_Einheit_02", "Einheiten_01", 0), # MPH vs KMH speed display
|
||||
("KBI_Handbremse", "Kombi_01", 0), # Manual handbrake applied
|
||||
("TSK_Status", "TSK_06", 0), # ACC engagement status from drivetrain coordinator
|
||||
("TSK_Fahrzeugmasse_02", "Motor_16", 0), # Estimated vehicle mass from drivetrain coordinator
|
||||
("ACC_Status_ACC", "ACC_06", 0), # ACC engagement status
|
||||
("ACC_Typ", "ACC_06", 0), # ACC type (follow to stop, stop&go)
|
||||
("SetSpeed", "ACC_02", 0), # ACC set speed
|
||||
("GRA_Hauptschalter", "GRA_ACC_01", 0), # ACC button, on/off
|
||||
("GRA_Abbrechen", "GRA_ACC_01", 0), # ACC button, cancel
|
||||
("GRA_Tip_Setzen", "GRA_ACC_01", 0), # ACC button, set
|
||||
@@ -162,47 +293,144 @@ class CarState(CarStateBase):
|
||||
("GRA_Verstellung_Zeitluecke", "GRA_ACC_01", 0), # ACC button, time gap adj
|
||||
("GRA_Typ_Hauptschalter", "GRA_ACC_01", 0), # ACC main button type
|
||||
("GRA_Tip_Stufe_2", "GRA_ACC_01", 0), # unknown related to stalk type
|
||||
("GRA_Typ468", "GRA_ACC_01", 0), # Set/Resume button behavior as overloaded coast/accel??
|
||||
("GRA_ButtonTypeInfo", "GRA_ACC_01", 0), # unknown related to stalk type
|
||||
("COUNTER", "GRA_ACC_01", 0), # GRA_ACC_01 CAN message counter
|
||||
]
|
||||
|
||||
checks = [
|
||||
# sig_address, frequency
|
||||
("LWI_01", 100), # From J500 Steering Assist with integrated sensors
|
||||
("EPS_01", 100), # From J500 Steering Assist with integrated sensors
|
||||
("ESP_19", 100), # From J104 ABS/ESP controller
|
||||
("ESP_05", 50), # From J104 ABS/ESP controller
|
||||
("ESP_21", 50), # From J104 ABS/ESP controller
|
||||
("ACC_06", 50), # From J428 ACC radar control module
|
||||
("Motor_20", 50), # From J623 Engine control module
|
||||
("TSK_06", 50), # From J623 Engine control module
|
||||
("GRA_ACC_01", 33), # From J??? steering wheel control buttons
|
||||
("ACC_02", 17), # From J428 ACC radar control module
|
||||
("Getriebe_11", 20), # From J743 Auto transmission control module
|
||||
("Gateway_72", 10), # From J533 CAN gateway (aggregated data)
|
||||
("Motor_14", 10), # From J623 Engine control module
|
||||
("Airbag_02", 5), # From J234 Airbag control module
|
||||
("Kombi_01", 2), # From J285 Instrument cluster
|
||||
("Motor_16", 2), # From J623 Engine control module
|
||||
("Einheiten_01", 1), # From J??? not known if gateway, cluster, or BCM
|
||||
("LWI_01", 100), # From J500 Steering Assist with integrated sensors
|
||||
("EPS_01", 100), # From J500 Steering Assist with integrated sensors
|
||||
("ESP_19", 100), # From J104 ABS/ESP controller
|
||||
("ESP_05", 50), # From J104 ABS/ESP controller
|
||||
("ESP_21", 50), # From J104 ABS/ESP controller
|
||||
("Motor_20", 50), # From J623 Engine control module
|
||||
("TSK_06", 50), # From J623 Engine control module
|
||||
("GRA_ACC_01", 33), # From J??? steering wheel control buttons
|
||||
("Gateway_72", 10), # From J533 CAN gateway (aggregated data)
|
||||
("Airbag_02", 5), # From J234 Airbag control module
|
||||
("Kombi_01", 2), # From J285 Instrument cluster
|
||||
("Einheiten_01", 1), # From J??? not known if gateway, cluster, or BCM
|
||||
]
|
||||
|
||||
if CP.transmissionType == TRANS.automatic:
|
||||
signals += [("GE_Fahrstufe", "Getriebe_11", 0)] # Auto trans gear selector position
|
||||
checks += [("Getriebe_11", 20)] # From J743 Auto transmission control module
|
||||
elif CP.transmissionType == TRANS.direct:
|
||||
signals += [("GearPosition", "EV_Gearshift", 0)] # EV gear selector position
|
||||
checks += [("EV_Gearshift", 10)] # From J??? unknown EV control module
|
||||
elif CP.transmissionType == TRANS.manual:
|
||||
signals += [("MO_Kuppl_schalter", "Motor_14", 0), # Clutch switch
|
||||
("BCM1_Rueckfahrlicht_Schalter", "Gateway_72", 0)] # Reverse light from BCM
|
||||
checks += [("Motor_14", 10)] # From J623 Engine control module
|
||||
|
||||
if CP.networkLocation == NWL.fwdCamera:
|
||||
# The ACC radar is here on CANBUS.pt
|
||||
signals += [("SetSpeed", "ACC_02", 0)] # ACC set speed
|
||||
checks += [("ACC_02", 17)] # From J428 ACC radar control module
|
||||
|
||||
return CANParser(DBC[CP.carFingerprint]['pt'], signals, checks, CANBUS.pt)
|
||||
|
||||
# A single signal is monitored from the camera CAN bus, and then ignored,
|
||||
# so the presence of CAN traffic can be verified with cam_cp.valid.
|
||||
|
||||
@staticmethod
|
||||
def get_cam_can_parser(CP):
|
||||
|
||||
def get_pq_can_parser(CP):
|
||||
signals = [
|
||||
# sig_name, sig_address, default
|
||||
("Kombi_Lamp_Green", "LDW_02", 0), # Lane Assist status LED
|
||||
("LH3_BLW", "Lenkhilfe_3", 0), # Absolute steering angle
|
||||
("LH3_BLWSign", "Lenkhilfe_3", 0), # Steering angle sign
|
||||
("LH3_LM", "Lenkhilfe_3", 0), # Absolute driver torque input
|
||||
("LH3_LMSign", "Lenkhilfe_3", 0), # Driver torque input sign
|
||||
("LH2_Sta_HCA", "Lenkhilfe_2", 0), # Steering rack HCA status
|
||||
("Lenkradwinkel_Geschwindigkeit", "Lenkwinkel_1", 0), # Absolute steering rate
|
||||
("Lenkradwinkel_Geschwindigkeit_S", "Lenkwinkel_1", 0), # Steering rate sign
|
||||
("Radgeschw__VL_4_1", "Bremse_3", 0), # ABS wheel speed, front left
|
||||
("Radgeschw__VR_4_1", "Bremse_3", 0), # ABS wheel speed, front right
|
||||
("Radgeschw__HL_4_1", "Bremse_3", 0), # ABS wheel speed, rear left
|
||||
("Radgeschw__HR_4_1", "Bremse_3", 0), # ABS wheel speed, rear right
|
||||
("Giergeschwindigkeit", "Bremse_5", 0), # Absolute yaw rate
|
||||
("Vorzeichen_der_Giergeschwindigk", "Bremse_5", 0), # Yaw rate sign
|
||||
("GK1_Fa_Tuerkont", "Gate_Komf_1", 0), # Door open, driver
|
||||
# TODO: locate passenger and rear door states
|
||||
("GK1_Blinker_li", "Gate_Komf_1", 0), # Left turn signal on
|
||||
("GK1_Blinker_re", "Gate_Komf_1", 0), # Right turn signal on
|
||||
("Gurtschalter_Fahrer", "Airbag_1", 0), # Seatbelt status, driver
|
||||
("Gurtschalter_Beifahrer", "Airbag_1", 0), # Seatbelt status, passenger
|
||||
("Bremstestschalter", "Motor_2", 0), # Brake pedal pressed (brake light test switch)
|
||||
("Bremslichtschalter", "Motor_2", 0), # Brakes applied (brake light switch)
|
||||
("Bremsdruck", "Bremse_5", 0), # Brake pressure applied
|
||||
("Vorzeichen_Bremsdruck", "Bremse_5", 0), # Brake pressure applied sign (???)
|
||||
("Fahrpedal_Rohsignal", "Motor_3", 0), # Accelerator pedal value
|
||||
("ESP_Passiv_getastet", "Bremse_1", 0), # Stability control disabled
|
||||
("MFA_v_Einheit_02", "Einheiten_1", 0), # MPH vs KMH speed display
|
||||
("Bremsinfo", "Kombi_1", 0), # Manual handbrake applied
|
||||
("GRA_Status", "Motor_2", 0), # ACC engagement status
|
||||
("Hauptschalter", "GRA_neu", 0), # ACC button, on/off
|
||||
("Abbrechen", "GRA_neu", 0), # ACC button, cancel
|
||||
("Setzen", "GRA_neu", 0), # ACC button, set
|
||||
("Lang_Tip_up", "GRA_neu", 0), # ACC button, increase or accel, long press
|
||||
("Lang_Tip_down", "GRA_neu", 0), # ACC button, decrease or decel, long press
|
||||
("Kurz_Tip_up", "GRA_neu", 0), # ACC button, increase or accel, short press
|
||||
("Kurz_Tip_down", "GRA_neu", 0), # ACC button, decrease or decel, short press
|
||||
("Wiederaufnahme", "GRA_neu", 0), # ACC button, resume
|
||||
("Zeitlueckenverstellung", "GRA_neu", 0), # ACC button, time gap adj
|
||||
]
|
||||
|
||||
checks = [
|
||||
# sig_address, frequency
|
||||
("LDW_02", 10) # From R242 Driver assistance camera
|
||||
("Bremse_3", 100), # From J104 ABS/ESP controller
|
||||
("Lenkhilfe_3", 100), # From J500 Steering Assist with integrated sensors
|
||||
("Lenkwinkel_1", 100), # From J500 Steering Assist with integrated sensors
|
||||
("Motor_3", 100), # From J623 Engine control module
|
||||
("Airbag_1", 50), # From J234 Airbag control module
|
||||
("Bremse_5", 50), # From J104 ABS/ESP controller
|
||||
("GRA_neu", 50), # From J??? steering wheel control buttons
|
||||
("Kombi_1", 50), # From J285 Instrument cluster
|
||||
("Motor_2", 50), # From J623 Engine control module
|
||||
("Lenkhilfe_2", 20), # From J500 Steering Assist with integrated sensors
|
||||
("Gate_Komf_1", 10), # From J533 CAN gateway
|
||||
("Einheiten_1", 1), # From J??? cluster or gateway
|
||||
]
|
||||
|
||||
if CP.transmissionType == TRANS.automatic:
|
||||
signals += [("Waehlhebelposition__Getriebe_1_", "Getriebe_1", 0)] # Auto trans gear selector position
|
||||
checks += [("Getriebe_1", 100)] # From J743 Auto transmission control module
|
||||
elif CP.transmissionType == TRANS.manual:
|
||||
signals += [("Kupplungsschalter", "Motor_1", 0), # Clutch switch
|
||||
("GK1_Rueckfahr", "Gate_Komf_1", 0)] # Reverse light from BCM
|
||||
checks += [("Motor_1", 100)] # From J623 Engine control module
|
||||
|
||||
if CP.networkLocation == NWL.fwdCamera:
|
||||
# The ACC radar is here on CANBUS.pt
|
||||
signals += [("ACA_V_Wunsch", "ACC_GRA_Anziege", 0)] # ACC set speed
|
||||
checks += [("ACC_GRA_Anziege", 25)] # From J428 ACC radar control module
|
||||
|
||||
return CANParser(DBC[CP.carFingerprint]['pt'], signals, checks, CANBUS.pt)
|
||||
|
||||
@staticmethod
|
||||
def get_mqb_cam_can_parser(CP):
|
||||
# TODO: Need to monitor LKAS camera, if present, for TLC/DLC/warning signals for passthru to SWA
|
||||
signals = []
|
||||
checks = []
|
||||
|
||||
if CP.networkLocation == NWL.gateway:
|
||||
# The ACC radar is here on CANBUS.cam
|
||||
signals += [("SetSpeed", "ACC_02", 0)] # ACC set speed
|
||||
checks += [("ACC_02", 17)] # From J428 ACC radar control module
|
||||
|
||||
return CANParser(DBC[CP.carFingerprint]['pt'], signals, checks, CANBUS.cam)
|
||||
|
||||
@staticmethod
|
||||
def get_pq_cam_can_parser(CP):
|
||||
# TODO: Need to monitor LKAS camera, if present, for TLC/DLC/warning signals for passthru to SWA
|
||||
signals = []
|
||||
checks = []
|
||||
|
||||
if CP.networkLocation == NWL.gateway:
|
||||
# The ACC radar is here on CANBUS.cam
|
||||
signals += [("ACA_V_Wunsch", "ACC_GRA_Anziege", 0)] # ACC set speed
|
||||
checks += [("ACC_GRA_Anziege", 25)] # From J428 ACC radar control module
|
||||
|
||||
return CANParser(DBC[CP.carFingerprint]['pt'], signals, checks, CANBUS.cam)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
from cereal import car
|
||||
from selfdrive.car.volkswagen.values import CAR, BUTTON_STATES
|
||||
from selfdrive.car.volkswagen.values import CAR, BUTTON_STATES, NWL, TRANS, GEAR, MQB_CARS, PQ_CARS
|
||||
from common.params import put_nonblocking
|
||||
from selfdrive.car import STD_CARGO_KG, scale_rot_inertia, scale_tire_stiffness, gen_empty_fingerprint
|
||||
from selfdrive.car.interfaces import CarInterfaceBase
|
||||
from common.dp_common import common_interface_atl, common_interface_get_params_lqr
|
||||
|
||||
GEAR = car.CarState.GearShifter
|
||||
EventName = car.CarEvent.EventName
|
||||
|
||||
class CarInterface(CarInterfaceBase):
|
||||
@@ -12,8 +12,15 @@ class CarInterface(CarInterfaceBase):
|
||||
super().__init__(CP, CarController, CarState)
|
||||
|
||||
self.displayMetricUnitsPrev = None
|
||||
self.gas_pressed_prev = False
|
||||
self.brake_pressed_prev = False
|
||||
self.cruise_enabled_prev = False
|
||||
self.low_speed_alert = False
|
||||
self.buttonStatesPrev = BUTTON_STATES.copy()
|
||||
|
||||
# Set up an alias to PT/CAM parser for ACC depending on its detected network location
|
||||
self.cp_acc = self.cp if CP.networkLocation == NWL.fwdCamera else self.cp_cam
|
||||
|
||||
@staticmethod
|
||||
def compute_gb(accel, speed):
|
||||
return float(accel) / 4.0
|
||||
@@ -21,35 +28,69 @@ class CarInterface(CarInterfaceBase):
|
||||
@staticmethod
|
||||
def get_params(candidate, fingerprint=gen_empty_fingerprint(), has_relay=False, car_fw=[]): # pylint: disable=dangerous-default-value
|
||||
ret = CarInterfaceBase.get_std_params(candidate, fingerprint, has_relay)
|
||||
ret.lateralTuning.init('pid')
|
||||
|
||||
# VW port is a community feature, since we don't own one to test
|
||||
ret.communityFeature = True
|
||||
# Set global default parameters
|
||||
ret.radarOffCan = True
|
||||
ret.enableCamera = True # Stock camera detection doesn't apply to VW
|
||||
ret.steerRateCost = 1.0
|
||||
ret.steerActuatorDelay = 0.05 # Hopefully all racks are similar here
|
||||
ret.steerLimitTimer = 0.4
|
||||
|
||||
if candidate == CAR.GOLF:
|
||||
# Set common MQB parameters that will apply globally
|
||||
# Override these per-car as necessary
|
||||
ret.lateralTuning.pid.kpBP = [0.]
|
||||
ret.lateralTuning.pid.kiBP = [0.]
|
||||
ret.lateralTuning.pid.kpV = [0.6]
|
||||
ret.lateralTuning.pid.kiV = [0.2]
|
||||
ret.lateralTuning.pid.kf = 0.00006
|
||||
|
||||
# PER-PLATFORM PARAMETERS - DO NOT EDIT HERE TO TUNE INDIVIDUAL VEHICLES
|
||||
|
||||
if candidate in MQB_CARS:
|
||||
# Configurations shared between all MQB vehicles
|
||||
ret.carName = "volkswagen"
|
||||
ret.radarOffCan = True
|
||||
ret.safetyModel = car.CarParams.SafetyModel.volkswagen
|
||||
|
||||
# Additional common MQB parameters that may be overridden per-vehicle
|
||||
ret.steerRateCost = 1.0
|
||||
ret.steerActuatorDelay = 0.05 # Hopefully all MQB racks are similar here
|
||||
ret.steerLimitTimer = 0.4
|
||||
# Determine installed network location and trans type from fingerprint
|
||||
ret.networkLocation = NWL.fwdCamera if 0x122 in fingerprint[0] else NWL.gateway
|
||||
if 0xAD in fingerprint[0]: # Getriebe_11
|
||||
ret.transmissionType = TRANS.automatic
|
||||
elif 0x187 in fingerprint[0]: # EV_Gearshift
|
||||
ret.transmissionType = TRANS.direct
|
||||
else: # No trans at all
|
||||
ret.transmissionType = TRANS.manual
|
||||
|
||||
ret.lateralTuning.pid.kpBP = [0.]
|
||||
ret.lateralTuning.pid.kiBP = [0.]
|
||||
elif candidate in PQ_CARS:
|
||||
# Configurations shared between all PQ35/PQ46/NMS vehicles
|
||||
ret.carName = "volkswagen"
|
||||
ret.safetyModel = car.CarParams.SafetyModel.volkswagenPq
|
||||
|
||||
ret.mass = 1500 + STD_CARGO_KG
|
||||
# Determine installed network location and trans type from fingerprint
|
||||
ret.networkLocation = NWL.fwdCamera if 0x368 in fingerprint[0] else NWL.gateway
|
||||
if 0x440 in fingerprint[0]: # Getriebe_1
|
||||
ret.transmissionType = TRANS.automatic
|
||||
else: # No trans at all
|
||||
ret.transmissionType = TRANS.manual
|
||||
|
||||
# PER-VEHICLE PARAMETERS - EDIT HERE TO TUNE INDIVIDUAL VEHICLES
|
||||
|
||||
if candidate == CAR.GENERICMQB:
|
||||
# FIXME: Defaulting to VW Golf Mk7 as a baseline.
|
||||
ret.mass = 1500 + STD_CARGO_KG # Average, varies on trim/package
|
||||
ret.wheelbase = 2.64
|
||||
ret.centerToFront = ret.wheelbase * 0.45
|
||||
ret.centerToFront = ret.wheelbase * 0.45 # Estimated
|
||||
ret.steerRatio = 15.6
|
||||
ret.lateralTuning.pid.kf = 0.00006
|
||||
ret.lateralTuning.pid.kpV = [0.6]
|
||||
ret.lateralTuning.pid.kiV = [0.2]
|
||||
tire_stiffness_factor = 1.0
|
||||
|
||||
ret.enableCamera = True # Stock camera detection doesn't apply to VW
|
||||
ret.transmissionType = car.CarParams.TransmissionType.automatic
|
||||
elif candidate == CAR.GENERICPQ:
|
||||
ret.mass = 1375 + STD_CARGO_KG # Average, varies on trim/package
|
||||
ret.wheelbase = 2.58
|
||||
ret.centerToFront = ret.wheelbase * 0.45 # Estimated
|
||||
ret.steerRatio = 15.6
|
||||
tire_stiffness_factor = 1.0
|
||||
|
||||
# dp
|
||||
ret = common_interface_get_params_lqr(ret)
|
||||
|
||||
# TODO: get actual value, for now starting with reasonable value for
|
||||
# civic and scaling by mass and wheelbase
|
||||
@@ -63,7 +104,7 @@ class CarInterface(CarInterfaceBase):
|
||||
return ret
|
||||
|
||||
# returns a car.CarState
|
||||
def update(self, c, can_strings):
|
||||
def update(self, c, can_strings, dragonconf):
|
||||
canMonoTimes = []
|
||||
buttonEvents = []
|
||||
|
||||
@@ -73,7 +114,14 @@ class CarInterface(CarInterfaceBase):
|
||||
self.cp.update_strings(can_strings)
|
||||
self.cp_cam.update_strings(can_strings)
|
||||
|
||||
ret = self.CS.update(self.cp)
|
||||
ret = self.CS.update(self.cp, self.cp_cam, self.cp_acc, self.CP.transmissionType)
|
||||
ret.canValid = self.cp.can_valid # FIXME: Restore cp_cam valid check after proper LKAS camera detect
|
||||
ret.steeringRateLimited = self.CC.steer_rate_limited if self.CC is not None else False
|
||||
|
||||
# dp
|
||||
self.dragonconf = dragonconf
|
||||
ret.cruiseState.enabled = common_interface_atl(ret, dragonconf.dpAtl)
|
||||
|
||||
ret.canValid = self.cp.can_valid and self.cp_cam.can_valid
|
||||
ret.steeringRateLimited = self.CC.steer_rate_limited if self.CC is not None else False
|
||||
|
||||
@@ -99,11 +147,22 @@ class CarInterface(CarInterfaceBase):
|
||||
if self.CS.steeringFault:
|
||||
events.add(EventName.steerTempUnavailable)
|
||||
|
||||
# Engagement and longitudinal control using stock ACC. Make sure OP is
|
||||
# disengaged if stock ACC is disengaged.
|
||||
if not ret.cruiseState.enabled:
|
||||
events.add(EventName.pcmDisable)
|
||||
# Attempt OP engagement only on rising edge of stock ACC engagement.
|
||||
elif not self.cruise_enabled_prev:
|
||||
events.add(EventName.pcmEnable)
|
||||
|
||||
ret.events = events.to_msg()
|
||||
ret.buttonEvents = buttonEvents
|
||||
ret.canMonoTimes = canMonoTimes
|
||||
|
||||
# update previous car states
|
||||
self.gas_pressed_prev = ret.gasPressed
|
||||
self.brake_pressed_prev = ret.brakePressed
|
||||
self.cruise_enabled_prev = ret.cruiseState.enabled
|
||||
self.displayMetricUnitsPrev = self.CS.displayMetricUnits
|
||||
self.buttonStatesPrev = self.CS.buttonStates.copy()
|
||||
|
||||
@@ -115,6 +174,6 @@ class CarInterface(CarInterfaceBase):
|
||||
c.hudControl.visualAlert,
|
||||
c.hudControl.audibleAlert,
|
||||
c.hudControl.leftLaneVisible,
|
||||
c.hudControl.rightLaneVisible)
|
||||
c.hudControl.rightLaneVisible, self.dragonconf)
|
||||
self.frame += 1
|
||||
return can_sends
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
# flake8: noqa
|
||||
|
||||
from selfdrive.car import dbc_dict
|
||||
from cereal import car
|
||||
|
||||
class CarControllerParams:
|
||||
HCA_STEP = 2 # HCA_01 message frequency 50Hz
|
||||
LDW_STEP = 10 # LDW_02 message frequency 10Hz
|
||||
# FIXME: testing HCA at 100Hz on PQ to verify timebomb behavior
|
||||
# HCA_STEP = 2 # HCA_01 message frequency 50Hz
|
||||
HCA_STEP = 1 # HCA_01 message frequency 100Hz
|
||||
# FIXME: LDW is sent at 20Hz on PQ, need to make this conditional
|
||||
# LDW_STEP = 10 # LDW_02 message frequency 10Hz
|
||||
LDW_STEP = 5 # LDW_02 message frequency 20Hz
|
||||
GRA_ACC_STEP = 3 # GRA_ACC_01 message frequency 33Hz
|
||||
|
||||
GRA_VBP_STEP = 100 # Send ACC virtual button presses once a second
|
||||
@@ -14,8 +19,11 @@ class CarControllerParams:
|
||||
# Limiting rate-of-change based on real-world testing and Comma's safety
|
||||
# requirements for minimum time to lane departure.
|
||||
STEER_MAX = 300 # Max heading control assist torque 3.00 Nm
|
||||
STEER_DELTA_UP = 4 # Max HCA reached in 1.50s (STEER_MAX / (50Hz * 1.50))
|
||||
STEER_DELTA_DOWN = 10 # Min HCA reached in 0.60s (STEER_MAX / (50Hz * 0.60))
|
||||
# FIXME: testing steering rate hax for PQ
|
||||
# STEER_DELTA_UP = 4 # Max HCA reached in 1.50s (STEER_MAX / (50Hz * 1.50))
|
||||
# STEER_DELTA_DOWN = 10 # Min HCA reached in 0.60s (STEER_MAX / (50Hz * 0.60))
|
||||
STEER_DELTA_UP = 2 # Max HCA reached in 1.50s (STEER_MAX / (100Hz * 1.50))
|
||||
STEER_DELTA_DOWN = 5 # Min HCA reached in 0.60s (STEER_MAX / (100Hz * 0.60))
|
||||
STEER_DRIVER_ALLOWANCE = 80
|
||||
STEER_DRIVER_MULTIPLIER = 3 # weight driver torque heavily
|
||||
STEER_DRIVER_FACTOR = 1 # from dbc
|
||||
@@ -24,6 +32,10 @@ class CANBUS:
|
||||
pt = 0
|
||||
cam = 2
|
||||
|
||||
NWL = car.CarParams.NetworkLocation
|
||||
TRANS = car.CarParams.TransmissionType
|
||||
GEAR = car.CarState.GearShifter
|
||||
|
||||
BUTTON_STATES = {
|
||||
"accelCruise": False,
|
||||
"decelCruise": False,
|
||||
@@ -46,15 +58,35 @@ MQB_LDW_MESSAGES = {
|
||||
}
|
||||
|
||||
class CAR:
|
||||
GOLF = "Volkswagen Golf"
|
||||
GENERICMQB = "Generic Volkswagen MQB Platform Vehicle"
|
||||
GENERICPQ = "Generic Volkswagen PQ35/PQ46/NMS Platform Vehicle"
|
||||
|
||||
# Mega-fingerprint used to identify any and all MQB platform vehicles. Specific
|
||||
# make and model characteristics are looked up from the VIN later.
|
||||
# Note: 1471:8 observed as 1471:4 on a 2019 Jetta, and we can't carry both in one FP, effect TBD
|
||||
FINGERPRINTS = {
|
||||
CAR.GOLF: [
|
||||
# 76b83eb0245de90e|2019-10-21--17-40-42 - jyoung8607 car
|
||||
{64: 8, 134: 8, 159: 8, 173: 8, 178: 8, 253: 8, 257: 8, 260: 8, 262: 8, 264: 8, 278: 8, 279: 8, 283: 8, 286: 8, 288: 8, 289: 8, 290: 8, 294: 8, 299: 8, 302: 8, 346: 8, 385: 8, 418: 8, 427: 8, 668: 8, 679: 8, 681: 8, 695: 8, 779: 8, 780: 8, 783: 8, 792: 8, 795: 8, 804: 8, 806: 8, 807: 8, 808: 8, 809: 8, 870: 8, 896: 8, 897: 8, 898: 8, 901: 8, 917: 8, 919: 8, 949: 8, 958: 8, 960: 4, 981: 8, 987: 8, 988: 8, 991: 8, 997: 8, 1000: 8, 1019: 8, 1120: 8, 1122: 8, 1123: 8, 1124: 8, 1153: 8, 1162: 8, 1175: 8, 1312: 8, 1385: 8, 1413: 8, 1440: 5, 1514: 8, 1515: 8, 1520: 8, 1600: 8, 1601: 8, 1603: 8, 1605: 8, 1624: 8, 1626: 8, 1629: 8, 1631: 8, 1646: 8, 1648: 8, 1712: 6, 1714: 8, 1716: 8, 1717: 8, 1719: 8, 1720: 8, 1721: 8
|
||||
}],
|
||||
|
||||
CAR.GENERICMQB: [
|
||||
{178: 8, 1600: 8, 1601: 8, 1603: 8, 1605: 8, 695: 8, 1624: 8, 1626: 8, 1629: 8, 1631: 8, 1122: 8, 1123: 8, 1124: 8, 1646: 8, 1648: 8, 1153: 8, 134: 8, 1162: 8, 1175: 8, 159: 8, 795: 8, 679: 8, 681: 8, 173: 8, 1712: 6, 1714: 8, 1716: 8, 1717: 8, 1719: 8, 1720: 8, 1721: 8, 1312: 8, 806: 8, 253: 8, 1792: 8, 257: 8, 260: 8, 262: 8, 897: 8, 264: 8, 779: 8, 780: 8, 783: 8, 278: 8, 279: 8, 792: 8, 283: 8, 285: 8, 286: 8, 901: 8, 288: 8, 289: 8, 290: 8, 804: 8, 294: 8, 807: 8, 808: 8, 809: 8, 299: 8, 302: 8, 1351: 8, 346: 8, 870: 8, 1385: 8, 896: 8, 64: 8, 898: 8, 1413: 8, 917: 8, 919: 8, 927: 8, 1440: 5, 929: 8, 930: 8, 427: 8, 949: 8, 958: 8, 960: 4, 418: 8, 981: 8, 987: 8, 988: 8, 991: 8, 997: 8, 1000: 8, 1514: 8, 1515: 8, 1520: 8, 1019: 8, 385: 8, 668: 8, 1120: 8, 1438: 8, 1461: 8, 391: 8, 1511: 8, 1516: 8, 568: 8, 569: 8, 826: 8, 827: 8, 1156: 8, 1157: 8, 1158: 8, 1471: 8, 1635: 8, 376: 8},
|
||||
# 2018 skoda kodiaq from @Gold
|
||||
{64: 8, 134: 8, 159: 8, 173: 8, 178: 8, 253: 8, 257: 8, 260: 8, 262: 8, 278: 8, 279: 8, 283: 8, 286: 8, 288: 8, 289: 8, 290: 8, 294: 8, 299: 8, 302: 8, 346: 8, 385: 8, 418: 8, 427: 8, 573: 8, 668: 8, 679: 8, 681: 8, 684: 8, 695: 8, 779: 8, 780: 8, 783: 8, 792: 8, 795: 8, 804: 8, 806: 8, 807: 8, 808: 8, 809: 8, 828: 8, 870: 8, 896: 8, 897: 8, 898: 8, 901: 8, 917: 8, 919: 8, 949: 8, 958: 8, 960: 4, 981: 8, 987: 8, 988: 8, 991: 8, 997: 8, 1000: 8, 1019: 8, 1120: 8, 1153: 8, 1162: 8, 1175: 8, 1312: 8, 1385: 8, 1413: 8, 1440: 5, 1514: 8, 1515: 8, 1520: 8, 1529: 8, 1600: 8, 1601: 8, 1603: 8, 1605: 8, 1624: 8, 1626: 8, 1629: 8, 1631: 8, 1646: 8, 1648: 8, 1712: 6, 1714: 8, 1716: 8, 1717: 8, 1719: 8, 1720: 8, 1721: 8 }
|
||||
],
|
||||
|
||||
CAR.GENERICPQ: [
|
||||
# kamold, Edgy, austinc3030, Roy_001
|
||||
{80: 4, 194: 8, 208: 6, 210: 5, 294: 8, 416: 8, 428: 8, 640: 8, 648: 8, 800: 8, 835: 3, 870: 8, 872: 8, 878: 8, 896: 8, 906: 4, 912: 8, 914: 8, 919: 8, 928: 8, 978: 7, 1056: 8, 1088: 8, 1152: 8, 1175: 8, 1184: 8, 1192: 8, 1312: 8, 1386: 8, 1392: 5, 1394: 1, 1408: 8, 1440: 8, 1463: 8, 1470: 5, 1472: 8, 1488: 8, 1490: 8, 1500: 8, 1550: 2, 1651: 3, 1652: 8, 1654: 2, 1658: 4, 1691: 3, 1736: 2, 1757: 8, 1824: 7, 1845: 7, 2000: 8, 1420: 8},
|
||||
# cd (powertrain CAN direct)
|
||||
{16: 7, 17: 7, 80: 4, 174: 8, 194: 8, 208: 6, 416: 8, 428: 8, 640: 8, 648: 8, 672: 8, 800: 8, 896: 8, 906: 4, 912: 8, 914: 8, 915: 8, 919: 8, 928: 8, 946: 8, 976: 6, 978: 7, 1056: 8, 1152: 8, 1160: 8, 1162: 8, 1164: 8, 1175: 8, 1184: 8, 1192: 8, 1306: 8, 1312: 8, 1344: 8, 1360: 8, 1386: 8, 1392: 5, 1394: 1, 1408: 8, 1416: 8, 1420: 8, 1423: 8, 1440: 8, 1463: 8, 1488: 8, 1490: 8, 1494: 2, 1500: 8, 1504: 8, 1523: 8, 1527: 4, 1654: 2, 1658: 2, 1754: 8, 1824: 7, 1827: 7, 2000: 8},
|
||||
{80: 4, 194: 8, 208: 6, 210: 5, 416: 8, 428: 8, 640: 8, 648: 8, 695: 8, 800: 8, 835: 3, 870: 8, 872: 8, 878: 8, 896: 8, 906: 4, 912: 8, 914: 8, 928: 8, 954: 8, 978: 7, 1056: 8, 1088: 8, 1152: 8, 1175: 8, 1184: 8, 1192: 8, 1312: 8, 1386: 8, 1392: 5, 1394: 1, 1408: 8, 1440: 8, 1463: 8, 1470: 5, 1472: 8, 1488: 8, 1490: 8, 1500: 8, 1550: 2, 1650: 8, 1651: 4, 1652: 8, 1691: 4, 1757: 3, 1824: 7, 1845: 7, 2000: 8},
|
||||
{80: 4, 194: 8, 208: 6, 210: 5, 416: 8, 428: 8, 640: 8, 648: 8, 695: 8, 800: 8, 835: 3, 870: 8, 872: 8, 878: 8, 896: 8, 906: 4, 912: 8, 914: 8, 928: 8, 954: 8, 978: 7, 1056: 8, 1088: 8, 1152: 8, 1175: 8, 1184: 8, 1192: 8, 1312: 8, 1386: 8, 1392: 5, 1394: 1, 1408: 8, 1440: 8, 1463: 8, 1470: 5, 1472: 8, 1488: 8, 1490: 8, 1500: 8, 1550: 2, 1650: 5, 1651: 3, 1652: 8, 1691: 3, 1736: 2, 1757: 8, 1824: 7, 1845: 7, 2000: 8},
|
||||
{80: 4, 194: 8, 208: 6, 210: 5, 416: 8, 428: 8, 640: 8, 648: 8, 695: 8, 800: 8, 835: 3, 870: 8, 872: 8, 878: 8, 896: 8, 906: 4, 912: 8, 914: 8, 928: 8, 954: 8, 978: 7, 1056: 8, 1088: 8, 1152: 8, 1175: 8, 1184: 8, 1192: 8, 1312: 8, 1386: 8, 1392: 5, 1394: 1, 1408: 8, 1440: 8, 1463: 8, 1470: 5, 1472: 8, 1488: 8, 1490: 8, 1500: 8, 1550: 2, 1650: 4, 1651: 3, 1652: 8, 1691: 2, 1736: 2, 1757: 3, 1824: 7, 1845: 7, 2000: 8},
|
||||
],
|
||||
}
|
||||
|
||||
MQB_CARS = [CAR.GENERICMQB]
|
||||
PQ_CARS = [CAR.GENERICPQ]
|
||||
|
||||
DBC = {
|
||||
CAR.GOLF: dbc_dict('vw_mqb_2010', None),
|
||||
CAR.GENERICMQB: dbc_dict('vw_mqb_2010', None),
|
||||
CAR.GENERICPQ: dbc_dict('vw_golf_mk4', None),
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
# CAN controls for MQB platform Volkswagen, Audi, Skoda and SEAT.
|
||||
# PQ35/PQ46/NMS, and any future MLB, to come later.
|
||||
# ----------------------------------------------------------------------- #
|
||||
# #
|
||||
# CAN message packing for MQB vehicles #
|
||||
# #
|
||||
# ----------------------------------------------------------------------- #
|
||||
|
||||
def create_mqb_steering_control(packer, bus, apply_steer, idx, lkas_enabled):
|
||||
values = {
|
||||
@@ -46,7 +49,49 @@ def create_mqb_acc_buttons_control(packer, bus, buttonStatesToSend, CS, idx):
|
||||
"GRA_Typ_Hauptschalter": CS.graTypHauptschalter,
|
||||
"GRA_Codierung": 2,
|
||||
"GRA_Tip_Stufe_2": CS.graTipStufe2,
|
||||
"GRA_Typ468": CS.graTyp468,
|
||||
"GRA_ButtonTypeInfo": CS.graButtonTypeInfo
|
||||
}
|
||||
|
||||
return packer.make_can_msg("GRA_ACC_01", bus, values, idx)
|
||||
|
||||
# ----------------------------------------------------------------------- #
|
||||
# #
|
||||
# CAN message packing for PQ35/PQ46/NMS vehicles #
|
||||
# #
|
||||
# ----------------------------------------------------------------------- #
|
||||
|
||||
def create_pq_steering_control(packer, bus, apply_steer, idx, lkas_enabled):
|
||||
values = {
|
||||
"HCA_Zaehler": idx,
|
||||
"LM_Offset": abs(apply_steer),
|
||||
"LM_OffSign": 1 if apply_steer < 0 else 0,
|
||||
"HCA_Status": 5 if (lkas_enabled and apply_steer != 0) else 3,
|
||||
"Vib_Freq": 16,
|
||||
}
|
||||
|
||||
dat = packer.make_can_msg("HCA_1", bus, values)[2]
|
||||
values["HCA_Checksumme"] = dat[1] ^ dat[2] ^ dat[3] ^ dat[4]
|
||||
return packer.make_can_msg("HCA_1", bus, values)
|
||||
|
||||
def create_pq_hud_control(packer, bus, hca_enabled, steering_pressed, hud_alert, leftLaneVisible, rightLaneVisible):
|
||||
if hca_enabled:
|
||||
leftlanehud = 3 if leftLaneVisible else 1
|
||||
rightlanehud = 3 if rightLaneVisible else 1
|
||||
else:
|
||||
leftlanehud = 2 if leftLaneVisible else 1
|
||||
rightlanehud = 2 if rightLaneVisible else 1
|
||||
|
||||
values = {
|
||||
"Right_Lane_Status": rightlanehud,
|
||||
"Left_Lane_Status": leftlanehud,
|
||||
"SET_ME_X1": 1,
|
||||
"Kombi_Lamp_Orange": 1 if hca_enabled and steering_pressed else 0,
|
||||
"Kombi_Lamp_Green": 1 if hca_enabled and not steering_pressed else 0,
|
||||
}
|
||||
return packer.make_can_msg("LDW_1", bus, values)
|
||||
|
||||
pass
|
||||
|
||||
def create_pq_acc_buttons_control(packer, bus, buttonStatesToSend, CS, idx):
|
||||
pass
|
||||
|
||||
@@ -36,6 +36,17 @@ extern "C" void framebuffer_swap(FramebufferState *s) {
|
||||
assert(glGetError() == GL_NO_ERROR);
|
||||
}
|
||||
|
||||
extern "C" void framebuffer_swap_layer(FramebufferState *s, int32_t layer) {
|
||||
status_t status;
|
||||
SurfaceComposerClient::openGlobalTransaction();
|
||||
status = s->control->setLayer(layer);
|
||||
SurfaceComposerClient::closeGlobalTransaction();
|
||||
assert(status == 0);
|
||||
|
||||
s->s = s->control->getSurface();
|
||||
assert(s->s != NULL);
|
||||
}
|
||||
|
||||
extern "C" bool set_brightness(int brightness) {
|
||||
FILE *f = fopen("/sys/class/leds/lcd-backlight/brightness", "wb");
|
||||
if (f != NULL) {
|
||||
|
||||
@@ -12,6 +12,7 @@ FramebufferState* framebuffer_init(
|
||||
|
||||
void framebuffer_set_power(FramebufferState *s, int mode);
|
||||
void framebuffer_swap(FramebufferState *s);
|
||||
void framebuffer_swap_layer(FramebufferState *s, int32_t layer);
|
||||
bool set_brightness(int brightness);
|
||||
|
||||
/* Display power modes */
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
import gettext
|
||||
from common import android
|
||||
from common.params import put_nonblocking
|
||||
is_android = android.ANDROID
|
||||
locale_dir = '/data/openpilot/selfdrive/assets/locales'
|
||||
supported_language = ['en-US', 'zh-TW', 'zh-CN']
|
||||
locale = android.getprop("persist.sys.locale") if is_android else 'en-US'
|
||||
|
||||
def alerts():
|
||||
i18n = gettext.translation('alerts', localedir=locale_dir, fallback=True, languages=[locale])
|
||||
i18n.install()
|
||||
return i18n.gettext
|
||||
+11
-11
@@ -118,17 +118,17 @@ int spin(int argc, char** argv) {
|
||||
nvgFill(vg);
|
||||
|
||||
// spin track
|
||||
nvgSave(vg);
|
||||
nvgTranslate(vg, spinner_img_xc, spinner_img_yc);
|
||||
nvgRotate(vg, (3.75*M_PI * cnt/120.0));
|
||||
nvgTranslate(vg, -spinner_img_xc, -spinner_img_yc);
|
||||
NVGpaint spinner_imgPaint = nvgImagePattern(vg, spinner_img_x, spinner_img_y,
|
||||
spinner_img_s, spinner_img_s, 0, spinner_img, 0.6f);
|
||||
nvgBeginPath(vg);
|
||||
nvgFillPaint(vg, spinner_imgPaint);
|
||||
nvgRect(vg, spinner_img_x, spinner_img_y, spinner_img_s, spinner_img_s);
|
||||
nvgFill(vg);
|
||||
nvgRestore(vg);
|
||||
// nvgSave(vg);
|
||||
// nvgTranslate(vg, spinner_img_xc, spinner_img_yc);
|
||||
// nvgRotate(vg, (3.75*M_PI * cnt/120.0));
|
||||
// nvgTranslate(vg, -spinner_img_xc, -spinner_img_yc);
|
||||
// NVGpaint spinner_imgPaint = nvgImagePattern(vg, spinner_img_x, spinner_img_y,
|
||||
// spinner_img_s, spinner_img_s, 0, spinner_img, 0.6f);
|
||||
// nvgBeginPath(vg);
|
||||
// nvgFillPaint(vg, spinner_imgPaint);
|
||||
// nvgRect(vg, spinner_img_x, spinner_img_y, spinner_img_s, spinner_img_s);
|
||||
// nvgFill(vg);
|
||||
// nvgRestore(vg);
|
||||
|
||||
// comma
|
||||
NVGpaint comma_imgPaint = nvgImagePattern(vg, spinner_img_x, spinner_img_y,
|
||||
|
||||
@@ -52,7 +52,7 @@ class Controls:
|
||||
|
||||
self.sm = sm
|
||||
if self.sm is None:
|
||||
self.sm = messaging.SubMaster(['thermal', 'health', 'frame', 'model', 'liveCalibration',
|
||||
self.sm = messaging.SubMaster(['dragonConf', 'thermal', 'health', 'frame', 'model', 'liveCalibration',
|
||||
'dMonitoringState', 'plan', 'pathPlan', 'liveLocationKalman'])
|
||||
|
||||
self.can_sock = can_sock
|
||||
@@ -72,7 +72,7 @@ class Controls:
|
||||
params = Params()
|
||||
self.is_metric = params.get("IsMetric", encoding='utf8') == "1"
|
||||
self.is_ldw_enabled = params.get("IsLdwEnabled", encoding='utf8') == "1"
|
||||
internet_needed = (params.get("Offroad_ConnectivityNeeded", encoding='utf8') is not None) and (params.get("DisableUpdates") != b"1")
|
||||
internet_needed = False #(params.get("Offroad_ConnectivityNeeded", encoding='utf8') is not None) and (params.get("DisableUpdates") != b"1")
|
||||
community_feature_toggle = params.get("CommunityFeaturesToggle", encoding='utf8') == "1"
|
||||
openpilot_enabled_toggle = params.get("OpenpilotEnabledToggle", encoding='utf8') == "1"
|
||||
passive = params.get("Passive", encoding='utf8') == "1" or \
|
||||
@@ -103,7 +103,9 @@ class Controls:
|
||||
self.LoC = LongControl(self.CP, self.CI.compute_gb)
|
||||
self.VM = VehicleModel(self.CP)
|
||||
|
||||
if self.CP.lateralTuning.which() == 'pid':
|
||||
if params.get('dp_lqr') == b'1':
|
||||
self.LaC = LatControlLQR(self.CP)
|
||||
elif self.CP.lateralTuning.which() == 'pid':
|
||||
self.LaC = LatControlPID(self.CP)
|
||||
elif self.CP.lateralTuning.which() == 'indi':
|
||||
self.LaC = LatControlINDI(self.CP)
|
||||
@@ -141,13 +143,17 @@ class Controls:
|
||||
self.events.add(EventName.communityFeatureDisallowed, static=True)
|
||||
if self.read_only and not passive:
|
||||
self.events.add(EventName.carUnrecognized, static=True)
|
||||
if hw_type == HwType.whitePanda:
|
||||
self.events.add(EventName.whitePandaUnsupported, static=True)
|
||||
# if hw_type == HwType.whitePanda:
|
||||
# self.events.add(EventName.whitePandaUnsupported, static=True)
|
||||
|
||||
# controlsd is driven by can recv, expected at 100Hz
|
||||
self.rk = Ratekeeper(100, print_delay_threshold=None)
|
||||
self.prof = Profiler(False) # off by default
|
||||
|
||||
# dp
|
||||
self.dp_lead_count = 0
|
||||
self.dp_camera_offset = CAMERA_OFFSET
|
||||
|
||||
def update_events(self, CS):
|
||||
"""Compute carEvents from carState"""
|
||||
|
||||
@@ -188,15 +194,27 @@ class Controls:
|
||||
self.events.add(EventName.laneChangeBlocked)
|
||||
else:
|
||||
if direction == LaneChangeDirection.left:
|
||||
self.events.add(EventName.preLaneChangeLeft)
|
||||
if self.sm['pathPlan'].dpALCAllowed:
|
||||
self.events.add(EventName.preLaneChangeLeftALC)
|
||||
else:
|
||||
self.events.add(EventName.preLaneChangeLeft)
|
||||
else:
|
||||
self.events.add(EventName.preLaneChangeRight)
|
||||
if self.sm['pathPlan'].dpALCAllowed:
|
||||
self.events.add(EventName.preLaneChangeRightALC)
|
||||
else:
|
||||
self.events.add(EventName.preLaneChangeRight)
|
||||
elif self.sm['pathPlan'].laneChangeState in [LaneChangeState.laneChangeStarting,
|
||||
LaneChangeState.laneChangeFinishing]:
|
||||
self.events.add(EventName.laneChange)
|
||||
if self.sm['pathPlan'].dpALCAllowed:
|
||||
self.events.add(EventName.laneChange)
|
||||
else:
|
||||
self.events.add(EventName.laneChange)
|
||||
|
||||
if self.can_rcv_error or (not CS.canValid and self.sm.frame > 5 / DT_CTRL):
|
||||
self.events.add(EventName.canError)
|
||||
if self.sm['dragonConf'].dpAtl:
|
||||
self.events.add(EventName.pcmDisable)
|
||||
else:
|
||||
self.events.add(EventName.canError)
|
||||
if self.mismatch_counter >= 200:
|
||||
self.events.add(EventName.controlsMismatch)
|
||||
if not self.sm.alive['plan'] and self.sm.alive['pathPlan']:
|
||||
@@ -205,13 +223,16 @@ class Controls:
|
||||
elif not self.sm.all_alive_and_valid():
|
||||
self.events.add(EventName.commIssue)
|
||||
if not self.sm['pathPlan'].mpcSolutionValid:
|
||||
self.events.add(EventName.plannerError)
|
||||
if not self.sm['liveLocationKalman'].sensorsOK and os.getenv("NOSENSOR") is None:
|
||||
if self.sm['dragonConf'].dpAtl:
|
||||
self.events.add(EventName.steerTempUnavailable)
|
||||
else:
|
||||
self.events.add(EventName.plannerError)
|
||||
if not self.sm['liveLocationKalman'].inputsOK and os.getenv("NOSENSOR") is None:
|
||||
if self.sm.frame > 5 / DT_CTRL: # Give locationd some time to receive all the inputs
|
||||
self.events.add(EventName.sensorDataInvalid)
|
||||
if not self.sm['liveLocationKalman'].gpsOK and (self.distance_traveled > 1000) and os.getenv("NOSENSOR") is None:
|
||||
# Not show in first 1 km to allow for driving out of garage. This event shows after 5 minutes
|
||||
self.events.add(EventName.noGps)
|
||||
# if not self.sm['liveLocationKalman'].gpsOK and (self.distance_traveled > 1000) and os.getenv("NOSENSOR") is None:
|
||||
# # Not show in first 1 km to allow for driving out of garage. This event shows after 5 minutes
|
||||
# self.events.add(EventName.noGps)
|
||||
if not self.sm['pathPlan'].paramsValid:
|
||||
self.events.add(EventName.vehicleModelInvalid)
|
||||
if not self.sm['liveLocationKalman'].posenetOK:
|
||||
@@ -231,16 +252,29 @@ class Controls:
|
||||
self.events.add(EventName.modeldLagging)
|
||||
|
||||
# Only allow engagement with brake pressed when stopped behind another stopped car
|
||||
if CS.brakePressed and self.sm['plan'].vTargetFuture >= STARTING_TARGET_SPEED \
|
||||
if not self.sm['dragonConf'].dpAtl and CS.brakePressed and self.sm['plan'].vTargetFuture >= STARTING_TARGET_SPEED \
|
||||
and not self.CP.radarOffCan and CS.vEgo < 0.3:
|
||||
self.events.add(EventName.noTarget)
|
||||
|
||||
# dp lead car moving alert
|
||||
if self.sm['dragonConf'].dpLeadCarAlert:
|
||||
if not self.CP.radarOffCan and self.sm['plan'].hasLead and CS.vEgo <= 0.01 and 0.3 >= abs(self.sm['plan'].vTarget) >= 0:
|
||||
self.dp_lead_count += 1
|
||||
else:
|
||||
self.dp_lead_count = 0
|
||||
|
||||
if self.dp_lead_count >= 300 and abs(self.sm['plan'].vTargetFuture) >= 0.1:
|
||||
self.events.add(EventName.leadCarMoving)
|
||||
|
||||
if CS.vEgo > 0. or CS.gearShifter in [car.CarState.GearShifter.reverse, car.CarState.GearShifter.park]:
|
||||
self.dp_lead_count = 0
|
||||
|
||||
def data_sample(self):
|
||||
"""Receive data from sockets and update carState"""
|
||||
|
||||
# Update carState from CAN
|
||||
can_strs = messaging.drain_sock_raw(self.can_sock, wait_for_one=True)
|
||||
CS = self.CI.update(self.CC, can_strs)
|
||||
CS = self.CI.update(self.CC, can_strs, self.sm['dragonConf'])
|
||||
|
||||
self.sm.update(0)
|
||||
|
||||
@@ -258,7 +292,7 @@ class Controls:
|
||||
if not self.enabled:
|
||||
self.mismatch_counter = 0
|
||||
|
||||
if not self.sm['health'].controlsAllowed and self.enabled:
|
||||
if not self.sm['dragonConf'].dpAtl and not self.sm['health'].controlsAllowed and self.enabled:
|
||||
self.mismatch_counter += 1
|
||||
|
||||
self.distance_traveled += CS.vEgo * DT_CTRL
|
||||
@@ -357,7 +391,7 @@ class Controls:
|
||||
|
||||
if not self.active:
|
||||
self.LaC.reset()
|
||||
self.LoC.reset(v_pid=CS.vEgo)
|
||||
self.LoC.reset(v_pid=plan.vTargetFuture)
|
||||
|
||||
plan_age = DT_CTRL * (self.sm.frame - self.sm.rcv_frame['plan'])
|
||||
# no greater than dt mpc + dt, to prevent too high extraps
|
||||
@@ -381,14 +415,15 @@ class Controls:
|
||||
self.saturated_count = 0
|
||||
|
||||
# Send a "steering required alert" if saturation count has reached the limit
|
||||
if (lac_log.saturated and not CS.steeringPressed) or \
|
||||
(self.saturated_count > STEER_ANGLE_SATURATION_TIMEOUT):
|
||||
# Check if we deviated from the path
|
||||
left_deviation = actuators.steer > 0 and path_plan.dPoly[3] > 0.1
|
||||
right_deviation = actuators.steer < 0 and path_plan.dPoly[3] < -0.1
|
||||
if self.sm['dragonConf'].dpLatCtrl and self.sm['dragonConf'].dpSteeringLimitAlert:
|
||||
if (lac_log.saturated and not CS.steeringPressed) or \
|
||||
(self.saturated_count > STEER_ANGLE_SATURATION_TIMEOUT):
|
||||
# Check if we deviated from the path
|
||||
left_deviation = actuators.steer > 0 and path_plan.dPoly[3] > 0.1
|
||||
right_deviation = actuators.steer < 0 and path_plan.dPoly[3] < -0.1
|
||||
|
||||
if left_deviation or right_deviation:
|
||||
self.events.add(EventName.steerSaturated)
|
||||
if left_deviation or right_deviation:
|
||||
self.events.add(EventName.steerSaturated)
|
||||
|
||||
return actuators, v_acc_sol, a_acc_sol, lac_log
|
||||
|
||||
@@ -425,10 +460,12 @@ class Controls:
|
||||
|
||||
meta = self.sm['model'].meta
|
||||
if len(meta.desirePrediction) and ldw_allowed:
|
||||
if self.sm.updated['dragonConf']:
|
||||
self.dp_camera_offset = self.sm['dragonConf'].dpCameraOffset * 0.01
|
||||
l_lane_change_prob = meta.desirePrediction[Desire.laneChangeLeft - 1]
|
||||
r_lane_change_prob = meta.desirePrediction[Desire.laneChangeRight - 1]
|
||||
l_lane_close = left_lane_visible and (self.sm['pathPlan'].lPoly[3] < (1.08 - CAMERA_OFFSET))
|
||||
r_lane_close = right_lane_visible and (self.sm['pathPlan'].rPoly[3] > -(1.08 + CAMERA_OFFSET))
|
||||
l_lane_close = left_lane_visible and (self.sm['pathPlan'].lPoly[3] < (1.08 - self.dp_camera_offset))
|
||||
r_lane_close = right_lane_visible and (self.sm['pathPlan'].rPoly[3] > -(1.08 + self.dp_camera_offset))
|
||||
|
||||
CC.hudControl.leftLaneDepart = bool(l_lane_change_prob > LANE_DEPARTURE_THRESHOLD and l_lane_close)
|
||||
CC.hudControl.rightLaneDepart = bool(r_lane_change_prob > LANE_DEPARTURE_THRESHOLD and r_lane_close)
|
||||
|
||||
@@ -0,0 +1,341 @@
|
||||
import math
|
||||
import numpy as np
|
||||
from common.realtime import sec_since_boot
|
||||
from selfdrive.controls.lib.drive_helpers import MPC_COST_LONG
|
||||
from common.numpy_fast import interp, clip
|
||||
from selfdrive.config import Conversions as CV
|
||||
from common.params import Params
|
||||
|
||||
from selfdrive.controls.lib.dynamic_follow.auto_df import predict
|
||||
from selfdrive.controls.lib.dynamic_follow.support import LeadData, CarData, dfData, dfProfiles
|
||||
travis = False
|
||||
|
||||
# dp
|
||||
PROFILE_AUTO = 4
|
||||
PROFILE_LONG = 3
|
||||
PROFILE_NORMAL = 2
|
||||
PROFILE_SHORT = 1
|
||||
PROFILE_OFF = 0
|
||||
|
||||
class DynamicFollow:
|
||||
def __init__(self, mpc_id):
|
||||
self.mpc_id = mpc_id
|
||||
self.df_profiles = dfProfiles()
|
||||
|
||||
# Model variables
|
||||
mpc_rate = 1 / 20.
|
||||
self.model_scales = {'v_ego': [-0.06112159043550491, 37.96522521972656], 'a_lead': [-3.109330892562866, 3.3612186908721924], 'v_lead': [0.0, 35.27671432495117], 'x_lead': [2.4600000381469727, 141.44000244140625]}
|
||||
self.predict_rate = 1 / 4.
|
||||
self.skip_every = round(0.25 / mpc_rate)
|
||||
self.model_input_len = round(45 / mpc_rate)
|
||||
|
||||
# Dynamic follow variables
|
||||
self.default_TR = 1.8
|
||||
self.TR = 1.8
|
||||
# self.v_lead_retention = 2.0 # keep only last x seconds
|
||||
self.v_ego_retention = 2.5
|
||||
self.v_rel_retention = 1.5
|
||||
|
||||
self.sng_TR = 1.8 # reacceleration stop and go TR
|
||||
self.sng_speed = 18.0 * CV.MPH_TO_MS
|
||||
|
||||
self._setup_changing_variables()
|
||||
|
||||
# dp params
|
||||
self.last_ts = 0.
|
||||
self.dp_dynamic_follow = PROFILE_OFF
|
||||
self.dp_last_modified = None
|
||||
self.params = Params()
|
||||
|
||||
def _setup_changing_variables(self):
|
||||
self.TR = self.default_TR
|
||||
self.model_profile = None
|
||||
|
||||
self.sng = False
|
||||
self.car_data = CarData()
|
||||
self.lead_data = LeadData()
|
||||
self.df_data = dfData() # dynamic follow data
|
||||
|
||||
self.last_cost = 0.0
|
||||
self.last_predict_time = 0.0
|
||||
self.auto_df_model_data = []
|
||||
self._get_live_params() # so they're defined just in case
|
||||
|
||||
def update(self, CS, libmpc):
|
||||
self._get_live_params()
|
||||
self._update_car(CS)
|
||||
self._get_profiles()
|
||||
|
||||
if not self.lead_data.status or self.dp_dynamic_follow == PROFILE_OFF:
|
||||
self.TR = self.default_TR
|
||||
else:
|
||||
self._store_df_data()
|
||||
self.TR = self._get_TR()
|
||||
|
||||
if not travis:
|
||||
self._change_cost(libmpc)
|
||||
|
||||
return self.TR
|
||||
|
||||
def _get_profiles(self):
|
||||
"""This receives profile change updates from dfManager and runs the auto-df prediction if auto mode"""
|
||||
# dp
|
||||
# update() gets call every time so we can read profile from param here
|
||||
# as usual, we update every 3 secs
|
||||
ts = sec_since_boot()
|
||||
if self.last_ts is None or ts - self.last_ts >= 3.:
|
||||
modified = self.params.get("dp_last_modified", encoding='utf8')
|
||||
if self.dp_last_modified != modified:
|
||||
try:
|
||||
self.dp_dynamic_follow = int(self.params.get("dp_dynamic_follow", encoding='utf8'))
|
||||
if self.dp_dynamic_follow > 4 or self.dp_dynamic_follow < 0:
|
||||
self.dp_dynamic_follow = 0
|
||||
except (TypeError, ValueError):
|
||||
self.dp_dynamic_follow = PROFILE_OFF
|
||||
self.dp_last_modified = modified
|
||||
self.last_ts = ts
|
||||
|
||||
if self.dp_dynamic_follow == PROFILE_AUTO: # todo: find some way to share prediction between the two mpcs to reduce processing overhead
|
||||
self._get_pred() # sets self.model_profile, all other checks are inside function
|
||||
|
||||
def _norm(self, x, name):
|
||||
self.x = x
|
||||
return np.interp(x, self.model_scales[name], [0, 1])
|
||||
|
||||
def _change_cost(self, libmpc):
|
||||
TRs = [0.9, 1.8, 2.7]
|
||||
costs = [1.0, 0.115, 0.05]
|
||||
cost = interp(self.TR, TRs, costs)
|
||||
if self.last_cost != cost:
|
||||
libmpc.change_tr(MPC_COST_LONG.TTC, cost, MPC_COST_LONG.ACCELERATION, MPC_COST_LONG.JERK)
|
||||
self.last_cost = cost
|
||||
|
||||
def _store_df_data(self):
|
||||
cur_time = sec_since_boot()
|
||||
# Store custom relative accel over time
|
||||
if self.lead_data.status:
|
||||
if self.lead_data.new_lead:
|
||||
self.df_data.v_rels = [] # reset when new lead
|
||||
else:
|
||||
self.df_data.v_rels = self._remove_old_entries(self.df_data.v_rels, cur_time, self.v_rel_retention)
|
||||
self.df_data.v_rels.append({'v_ego': self.car_data.v_ego, 'v_lead': self.lead_data.v_lead, 'time': cur_time})
|
||||
|
||||
# Store our velocity for better sng
|
||||
self.df_data.v_egos = self._remove_old_entries(self.df_data.v_egos, cur_time, self.v_ego_retention)
|
||||
self.df_data.v_egos.append({'v_ego': self.car_data.v_ego, 'time': cur_time})
|
||||
|
||||
# Store data for auto-df model
|
||||
self.auto_df_model_data.append([self._norm(self.car_data.v_ego, 'v_ego'),
|
||||
self._norm(self.lead_data.v_lead, 'v_lead'),
|
||||
self._norm(self.lead_data.a_lead, 'a_lead'),
|
||||
self._norm(self.lead_data.x_lead, 'x_lead')])
|
||||
while len(self.auto_df_model_data) > self.model_input_len:
|
||||
del self.auto_df_model_data[0]
|
||||
|
||||
def _get_pred(self):
|
||||
cur_time = sec_since_boot()
|
||||
if self.car_data.cruise_enabled and self.lead_data.status:
|
||||
if cur_time - self.last_predict_time > self.predict_rate:
|
||||
if len(self.auto_df_model_data) == self.model_input_len:
|
||||
pred = predict(np.array(self.auto_df_model_data[::self.skip_every], dtype=np.float32).flatten())
|
||||
self.last_predict_time = cur_time
|
||||
self.model_profile = int(np.argmax(pred))
|
||||
|
||||
def _remove_old_entries(self, lst, cur_time, retention):
|
||||
return [sample for sample in lst if cur_time - sample['time'] <= retention]
|
||||
|
||||
def _calculate_relative_accel_new(self):
|
||||
# """
|
||||
# Moving window returning the following: (final relative velocity - initial relative velocity) / dT with a few extra mods
|
||||
# Output properties:
|
||||
# When the lead is starting to decelerate, and our car remains the same speed, the output decreases (and vice versa)
|
||||
# However when our car finally starts to decelerate at the same rate as the lead car, the output will move to near 0
|
||||
# >>> a = [(15 - 18), (14 - 17)]
|
||||
# >>> (a[-1] - a[0]) / 1
|
||||
# > 0.0
|
||||
# """
|
||||
min_consider_time = 0.5 # minimum amount of time required to consider calculation
|
||||
if len(self.df_data.v_rels) > 0: # if not empty
|
||||
elapsed_time = self.df_data.v_rels[-1]['time'] - self.df_data.v_rels[0]['time']
|
||||
if elapsed_time > min_consider_time:
|
||||
x = [-2.6822, -1.7882, -0.8941, -0.447, -0.2235, 0.0, 0.2235, 0.447, 0.8941, 1.7882, 2.6822]
|
||||
y = [0.3245, 0.277, 0.11075, 0.08106, 0.06325, 0.0, -0.09, -0.09375, -0.125, -0.3, -0.35]
|
||||
|
||||
v_lead_start = self.df_data.v_rels[0]['v_lead'] # setup common variables
|
||||
v_ego_start = self.df_data.v_rels[0]['v_ego']
|
||||
v_lead_end = self.df_data.v_rels[-1]['v_lead']
|
||||
v_ego_end = self.df_data.v_rels[-1]['v_ego']
|
||||
|
||||
v_ego_change = v_ego_end - v_ego_start
|
||||
v_lead_change = v_lead_end - v_lead_start
|
||||
|
||||
if v_lead_change - v_ego_change == 0 or v_lead_change + v_ego_change == 0:
|
||||
return None
|
||||
|
||||
initial_v_rel = v_lead_start - v_ego_start
|
||||
cur_v_rel = v_lead_end - v_ego_end
|
||||
delta_v_rel = (cur_v_rel - initial_v_rel) / elapsed_time
|
||||
|
||||
neg_pos = False
|
||||
if v_ego_change == 0 or v_lead_change == 0: # FIXME: this all is a mess, but works. need to simplify
|
||||
lead_factor = v_lead_change / (v_lead_change - v_ego_change)
|
||||
|
||||
elif (v_ego_change < 0) != (v_lead_change < 0): # one is negative and one is positive, or ^ = XOR
|
||||
lead_factor = v_lead_change / (v_lead_change - v_ego_change)
|
||||
if v_ego_change > 0 > v_lead_change:
|
||||
delta_v_rel = -delta_v_rel # switch when appropriate
|
||||
neg_pos = True
|
||||
|
||||
elif v_ego_change * v_lead_change > 0: # both are negative or both are positive
|
||||
lead_factor = v_lead_change / (v_lead_change + v_ego_change)
|
||||
if v_ego_change > 0 and v_lead_change > 0: # both are positive
|
||||
if v_ego_change < v_lead_change:
|
||||
delta_v_rel = -delta_v_rel # switch when appropriate
|
||||
elif v_ego_change > v_lead_change: # both are negative and v_ego_change > v_lead_change
|
||||
delta_v_rel = -delta_v_rel
|
||||
|
||||
else:
|
||||
raise Exception('Uncovered case! Should be impossible to be be here')
|
||||
|
||||
if not neg_pos: # negative and positive require different mod code to be correct
|
||||
rel_vel_mod = (-delta_v_rel * abs(lead_factor)) + (delta_v_rel * (1 - abs(lead_factor)))
|
||||
else:
|
||||
rel_vel_mod = math.copysign(delta_v_rel, v_lead_change - v_ego_change) * lead_factor
|
||||
|
||||
calc_mod = np.interp(rel_vel_mod, x, y)
|
||||
if v_lead_end > v_ego_end and calc_mod >= 0:
|
||||
# if we're accelerating quicker than lead but lead is still faster, reduce mod
|
||||
# todo: could remove this since we restrict this mod where called
|
||||
x = np.array([0, 2, 4, 8]) * CV.MPH_TO_MS
|
||||
y = [1.0, -0.25, -0.65, -0.95]
|
||||
v_rel_mod = np.interp(v_lead_end - v_ego_end, x, y)
|
||||
calc_mod *= v_rel_mod
|
||||
return calc_mod
|
||||
return None
|
||||
|
||||
def global_profile_mod(self, profile_mod_x, profile_mod_pos, profile_mod_neg, x_vel, y_dist):
|
||||
"""
|
||||
This function modifies the y_dist list used by dynamic follow in accordance with global_df_mod
|
||||
It also intelligently adjusts the profile mods at each breakpoint based on the change in TR
|
||||
"""
|
||||
if self.global_df_mod is None:
|
||||
return profile_mod_pos, profile_mod_neg, y_dist
|
||||
global_df_mod = 1 - self.global_df_mod
|
||||
|
||||
# Calculate new TRs
|
||||
speeds = [0, self.sng_speed, 18, x_vel[-1]] # [0, 18 mph, ~40 mph, highest profile mod speed (~78 mph)]
|
||||
mods = [0, 0.1, 0.7, 1] # how much to limit global_df_mod at each speed, 1 is full effect
|
||||
y_dist_new = [y - (y * global_df_mod * np.interp(x, speeds, mods)) for x, y in zip(x_vel, y_dist)]
|
||||
|
||||
# Calculate how to change profile mods based on change in TR
|
||||
# eg. if df mod is 0.7, then increase positive mod and decrease negative mod
|
||||
calc_profile_mods = [(np.interp(mod_x, x_vel, y_dist) - np.interp(mod_x, x_vel, y_dist_new) + 1) for mod_x in profile_mod_x]
|
||||
profile_mod_pos = [mod_pos * mod for mod_pos, mod in zip(profile_mod_pos, calc_profile_mods)]
|
||||
profile_mod_neg = [mod_neg * ((1 - mod) + 1) for mod_neg, mod in zip(profile_mod_neg, calc_profile_mods)]
|
||||
|
||||
return profile_mod_pos, profile_mod_neg, y_dist_new
|
||||
|
||||
def _get_TR(self):
|
||||
x_vel = [0.0, 1.8627, 3.7253, 5.588, 7.4507, 9.3133, 11.5598, 13.645, 22.352, 31.2928, 33.528, 35.7632, 40.2336] # velocities
|
||||
profile_mod_x = [2.2352, 13.4112, 24.5872, 35.7632] # profile mod speeds, mph: [5., 30., 55., 80.]
|
||||
|
||||
if self.dp_dynamic_follow == PROFILE_AUTO: # decide which profile to use, model profile will be updated before this
|
||||
# df is 0 = traffic, 1 = relaxed, 2 = roadtrip, 3 = auto
|
||||
# dp is 0 = off, 1 = short, 2 = normal, 3 = long, 4 = auto
|
||||
# if it's model profile, we need to convert it
|
||||
if self.model_profile is None:
|
||||
# when its none, we use normal instead
|
||||
df_profile = PROFILE_NORMAL
|
||||
else:
|
||||
df_profile = self.model_profile + 1
|
||||
else:
|
||||
df_profile = self.dp_dynamic_follow
|
||||
|
||||
if df_profile == PROFILE_LONG:
|
||||
y_dist = [1.3978, 1.4132, 1.4318, 1.4536, 1.485, 1.5229, 1.5819, 1.6203, 1.7238, 1.8231, 1.8379, 1.8495, 1.8535] # TRs
|
||||
profile_mod_pos = [0.92, 0.7, 0.25, 0.15]
|
||||
profile_mod_neg = [1.1, 1.3, 2.0, 2.3]
|
||||
elif df_profile == PROFILE_SHORT: # for in congested traffic
|
||||
x_vel = [0.0, 1.892, 3.7432, 5.8632, 8.0727, 10.7301, 14.343, 17.6275, 22.4049, 28.6752, 34.8858, 40.35]
|
||||
# y_dist = [1.3781, 1.3791, 1.3802, 1.3825, 1.3984, 1.4249, 1.4194, 1.3162, 1.1916, 1.0145, 0.9855, 0.9562] # original
|
||||
# y_dist = [1.3781, 1.3791, 1.3112, 1.2442, 1.2306, 1.2112, 1.2775, 1.1977, 1.0963, 0.9435, 0.9067, 0.8749] # avg. 7.3 ft closer from 18 to 90 mph
|
||||
y_dist = [1.3781, 1.3791, 1.3457, 1.3134, 1.3145, 1.318, 1.3485, 1.257, 1.144, 0.979, 0.9461, 0.9156]
|
||||
profile_mod_pos = [1.05, 1.55, 2.6, 3.75]
|
||||
profile_mod_neg = [0.84, .275, 0.1, 0.05]
|
||||
elif df_profile == PROFILE_NORMAL: # default to relaxed/stock
|
||||
y_dist = [1.385, 1.394, 1.406, 1.421, 1.444, 1.474, 1.516, 1.534, 1.546, 1.568, 1.579, 1.593, 1.614]
|
||||
profile_mod_pos = [1.0] * 4
|
||||
profile_mod_neg = [1.0] * 4
|
||||
else:
|
||||
raise Exception('Unknown profile type: {}'.format(df_profile))
|
||||
|
||||
# Global df mod
|
||||
profile_mod_pos, profile_mod_neg, y_dist = self.global_profile_mod(profile_mod_x, profile_mod_pos, profile_mod_neg, x_vel, y_dist)
|
||||
|
||||
# Profile modifications - Designed so that each profile reacts similarly to changing lead dynamics
|
||||
profile_mod_pos = interp(self.car_data.v_ego, profile_mod_x, profile_mod_pos)
|
||||
profile_mod_neg = interp(self.car_data.v_ego, profile_mod_x, profile_mod_neg)
|
||||
|
||||
if self.car_data.v_ego > self.sng_speed: # keep sng distance until we're above sng speed again
|
||||
self.sng = False
|
||||
|
||||
if (self.car_data.v_ego >= self.sng_speed or self.df_data.v_egos[0]['v_ego'] >= self.car_data.v_ego) and not self.sng:
|
||||
# if above 15 mph OR we're decelerating to a stop, keep shorter TR. when we reaccelerate, use sng_TR and slowly decrease
|
||||
TR = interp(self.car_data.v_ego, x_vel, y_dist)
|
||||
else: # this allows us to get closer to the lead car when stopping, while being able to have smooth stop and go when reaccelerating
|
||||
self.sng = True
|
||||
x = [self.sng_speed * 0.7, self.sng_speed] # decrease TR between 12.6 and 18 mph from 1.8s to defined TR above at 18mph while accelerating
|
||||
y = [self.sng_TR, interp(self.sng_speed, x_vel, y_dist)]
|
||||
TR = interp(self.car_data.v_ego, x, y)
|
||||
|
||||
TR_mods = []
|
||||
# Dynamic follow modifications (the secret sauce)
|
||||
x = [-26.8224, -20.0288, -15.6871, -11.1965, -7.8645, -4.9472, -3.0541, -2.2244, -1.5045, -0.7908, -0.3196, 0.0, 0.5588, 1.3682, 1.898, 2.7316, 4.4704] # relative velocity values
|
||||
y = [.76, 0.62323, 0.49488, 0.40656, 0.32227, 0.23914, 0.12269, 0.10483, 0.08074, 0.04886, 0.0072, 0.0, -0.05648, -0.0792, -0.15675, -0.23289, -0.315] # modification values
|
||||
TR_mods.append(interp(self.lead_data.v_lead - self.car_data.v_ego, x, y))
|
||||
|
||||
x = [-4.4795, -2.8122, -1.5727, -1.1129, -0.6611, -0.2692, 0.0, 0.1466, 0.5144, 0.6903, 0.9302] # lead acceleration values
|
||||
y = [0.24, 0.16, 0.092, 0.0515, 0.0305, 0.022, 0.0, -0.0153, -0.042, -0.053, -0.059] # modification values
|
||||
TR_mods.append(interp(self.lead_data.a_lead, x, y))
|
||||
|
||||
rel_accel_mod = self._calculate_relative_accel_new()
|
||||
if rel_accel_mod is not None: # if available
|
||||
deadzone = 2 * CV.MPH_TO_MS
|
||||
if self.lead_data.v_lead - deadzone > self.car_data.v_ego:
|
||||
TR_mods.append(rel_accel_mod)
|
||||
|
||||
x = [self.sng_speed / 5.0, self.sng_speed] # as we approach 0, apply x% more distance
|
||||
y = [1.05, 1.0]
|
||||
profile_mod_pos *= interp(self.car_data.v_ego, x, y) # but only for currently positive mods
|
||||
|
||||
TR_mod = sum([mod * profile_mod_neg if mod < 0 else mod * profile_mod_pos for mod in TR_mods]) # alter TR modification according to profile
|
||||
TR += TR_mod
|
||||
|
||||
if self.car_data.left_blinker or self.car_data.right_blinker and df_profile != self.df_profiles.traffic:
|
||||
x = [8.9408, 22.352, 31.2928] # 20, 50, 70 mph
|
||||
y = [1.0, .75, .65]
|
||||
TR *= interp(self.car_data.v_ego, x, y) # reduce TR when changing lanes
|
||||
|
||||
return float(clip(TR, self.min_TR, 2.7))
|
||||
|
||||
def update_lead(self, v_lead=None, a_lead=None, x_lead=None, status=False, new_lead=False):
|
||||
self.lead_data.v_lead = v_lead
|
||||
self.lead_data.a_lead = a_lead
|
||||
self.lead_data.x_lead = x_lead
|
||||
|
||||
self.lead_data.status = status
|
||||
self.lead_data.new_lead = new_lead
|
||||
|
||||
def _update_car(self, CS):
|
||||
self.car_data.v_ego = CS.vEgo
|
||||
self.car_data.a_ego = CS.aEgo
|
||||
|
||||
self.car_data.left_blinker = CS.leftBlinker
|
||||
self.car_data.right_blinker = CS.rightBlinker
|
||||
self.car_data.cruise_enabled = CS.cruiseState.enabled
|
||||
|
||||
def _get_live_params(self):
|
||||
self.global_df_mod = None #self.op_params.get('global_df_mod', None)
|
||||
if self.global_df_mod is not None:
|
||||
self.global_df_mod = clip(self.global_df_mod, 0.85, 1.2)
|
||||
self.min_TR = 0.9 # default
|
||||
@@ -0,0 +1,20 @@
|
||||
"""
|
||||
Generated using Konverter: https://github.com/ShaneSmiskol/Konverter
|
||||
"""
|
||||
|
||||
import numpy as np
|
||||
|
||||
wb = np.load('/data/openpilot/selfdrive/controls/lib/dynamic_follow/auto_df_weights.npz', allow_pickle=True)
|
||||
w, b = wb['wb']
|
||||
|
||||
def softmax(x):
|
||||
return np.exp(x) / np.sum(np.exp(x), axis=0)
|
||||
|
||||
def predict(x):
|
||||
l0 = np.dot(x, w[0]) + b[0]
|
||||
l0 = np.maximum(0, l0)
|
||||
l1 = np.dot(l0, w[1]) + b[1]
|
||||
l1 = np.maximum(0, l1)
|
||||
l2 = np.dot(l1, w[2]) + b[2]
|
||||
l2 = softmax(l2)
|
||||
return l2
|
||||
Binary file not shown.
@@ -0,0 +1,31 @@
|
||||
class LeadData:
|
||||
v_lead = None
|
||||
x_lead = None
|
||||
a_lead = None
|
||||
status = False
|
||||
new_lead = False
|
||||
|
||||
|
||||
class CarData:
|
||||
v_ego = 0.0
|
||||
a_ego = 0.0
|
||||
|
||||
left_blinker = False
|
||||
right_blinker = False
|
||||
cruise_enabled = True
|
||||
|
||||
|
||||
class dfData:
|
||||
v_egos = []
|
||||
v_rels = []
|
||||
|
||||
|
||||
class dfProfiles:
|
||||
traffic = 0
|
||||
relaxed = 1
|
||||
roadtrip = 2
|
||||
auto = 3
|
||||
to_profile = {0: 'traffic', 1: 'relaxed', 2: 'roadtrip', 3: 'auto'}
|
||||
to_idx = {v: k for k, v in to_profile.items()}
|
||||
|
||||
default = relaxed
|
||||
+224
-162
@@ -1,8 +1,12 @@
|
||||
# This Python file uses the following encoding: utf-8
|
||||
# -*- coding: utf-8 -*-
|
||||
from cereal import log, car
|
||||
|
||||
from common.realtime import DT_CTRL
|
||||
from selfdrive.config import Conversions as CV
|
||||
from selfdrive.locationd.calibration_helpers import Filter
|
||||
from common.i18n import events
|
||||
_ = events()
|
||||
|
||||
AlertSize = log.ControlsState.AlertSize
|
||||
AlertStatus = log.ControlsState.AlertStatus
|
||||
@@ -139,21 +143,21 @@ class Alert:
|
||||
class NoEntryAlert(Alert):
|
||||
def __init__(self, alert_text_2, audible_alert=AudibleAlert.chimeError,
|
||||
visual_alert=VisualAlert.none, duration_hud_alert=2.):
|
||||
super().__init__("openpilot Unavailable", alert_text_2, AlertStatus.normal,
|
||||
super().__init__(_("openpilot Unavailable"), alert_text_2, AlertStatus.normal,
|
||||
AlertSize.mid, Priority.LOW, visual_alert,
|
||||
audible_alert, .4, duration_hud_alert, 3.)
|
||||
|
||||
|
||||
class SoftDisableAlert(Alert):
|
||||
def __init__(self, alert_text_2):
|
||||
super().__init__("TAKE CONTROL IMMEDIATELY", alert_text_2,
|
||||
super().__init__(_("TAKE CONTROL IMMEDIATELY"), alert_text_2,
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.MID, VisualAlert.steerRequired,
|
||||
AudibleAlert.chimeWarningRepeat, .1, 2., 2.),
|
||||
|
||||
|
||||
class ImmediateDisableAlert(Alert):
|
||||
def __init__(self, alert_text_2, alert_text_1="TAKE CONTROL IMMEDIATELY"):
|
||||
def __init__(self, alert_text_2, alert_text_1=_("TAKE CONTROL IMMEDIATELY")):
|
||||
super().__init__(alert_text_1, alert_text_2,
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGHEST, VisualAlert.steerRequired,
|
||||
@@ -173,8 +177,8 @@ def below_steer_speed_alert(CP, sm, metric):
|
||||
speed = int(round(CP.minSteerSpeed * (CV.MS_TO_KPH if metric else CV.MS_TO_MPH)))
|
||||
unit = "kph" if metric else "mph"
|
||||
return Alert(
|
||||
"TAKE CONTROL",
|
||||
"Steer Unavailable Below %d %s" % (speed, unit),
|
||||
_("TAKE CONTROL"),
|
||||
_("Steer Unavailable Below") + (" %d %s" % (speed, unit)),
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.none, 0., 0.4, .3)
|
||||
|
||||
@@ -182,23 +186,23 @@ def calibration_incomplete_alert(CP, sm, metric):
|
||||
speed = int(Filter.MIN_SPEED * (CV.MS_TO_KPH if metric else CV.MS_TO_MPH))
|
||||
unit = "kph" if metric else "mph"
|
||||
return Alert(
|
||||
"Calibration in Progress: %d%%" % sm['liveCalibration'].calPerc,
|
||||
"Drive Above %d %s" % (speed, unit),
|
||||
_("Calibration in Progress:") + (" %d%%" % sm['liveCalibration'].calPerc),
|
||||
_("Drive Above") + (" %d %s" % (speed, unit)),
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOWEST, VisualAlert.none, AudibleAlert.none, 0., 0., .2)
|
||||
|
||||
def no_gps_alert(CP, sm, metric):
|
||||
gps_integrated = sm['health'].hwType in [log.HealthData.HwType.uno, log.HealthData.HwType.dos]
|
||||
return Alert(
|
||||
"Poor GPS reception",
|
||||
"If sky is visible, contact support" if gps_integrated else "Check GPS antenna placement",
|
||||
_("Poor GPS reception"),
|
||||
_("If sky is visible, contact support") if gps_integrated else _("Check GPS antenna placement"),
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2, creation_delay=300.)
|
||||
|
||||
def wrong_car_mode_alert(CP, sm, metric):
|
||||
text = "Cruise Mode Disabled"
|
||||
text = _("Cruise Mode Disabled")
|
||||
if CP.carName == "honda":
|
||||
text = "Main Switch Off"
|
||||
text = _("Main Switch Off")
|
||||
return NoEntryAlert(text, duration_hud_alert=0.)
|
||||
|
||||
EVENTS = {
|
||||
@@ -208,7 +212,7 @@ EVENTS = {
|
||||
|
||||
EventName.debugAlert: {
|
||||
ET.PERMANENT: Alert(
|
||||
"DEBUG ALERT",
|
||||
_("DEBUG ALERT"),
|
||||
"",
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, .1, .1, .1),
|
||||
@@ -216,65 +220,65 @@ EVENTS = {
|
||||
|
||||
EventName.startup: {
|
||||
ET.PERMANENT: Alert(
|
||||
"Be ready to take over at any time",
|
||||
"Always keep hands on wheel and eyes on road",
|
||||
_("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.),
|
||||
},
|
||||
|
||||
EventName.startupWhitePanda: {
|
||||
ET.PERMANENT: Alert(
|
||||
"WARNING: White panda is deprecated",
|
||||
"Upgrade to comma two or black panda",
|
||||
_("WARNING: White panda is deprecated"),
|
||||
_("Upgrade to comma two or black panda"),
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., 15.),
|
||||
},
|
||||
|
||||
EventName.startupMaster: {
|
||||
ET.PERMANENT: Alert(
|
||||
"WARNING: This branch is not tested",
|
||||
"Always keep hands on wheel and eyes on road",
|
||||
_("WARNING: This branch is not tested"),
|
||||
_("Always keep hands on wheel and eyes on road"),
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., 15.),
|
||||
},
|
||||
|
||||
EventName.startupNoControl: {
|
||||
ET.PERMANENT: Alert(
|
||||
"Dashcam mode",
|
||||
"Always keep hands on wheel and eyes on road",
|
||||
_("Dashcam mode"),
|
||||
_("Always keep hands on wheel and eyes on road"),
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., 15.),
|
||||
},
|
||||
|
||||
EventName.startupNoCar: {
|
||||
ET.PERMANENT: Alert(
|
||||
"Dashcam mode for unsupported car",
|
||||
"Always keep hands on wheel and eyes on road",
|
||||
_("Dashcam mode for unsupported car"),
|
||||
_("Always keep hands on wheel and eyes on road"),
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., 15.),
|
||||
},
|
||||
|
||||
EventName.invalidGiraffeToyota: {
|
||||
ET.PERMANENT: Alert(
|
||||
"Unsupported Giraffe Configuration",
|
||||
"Visit comma.ai/tg",
|
||||
_("Unsupported Giraffe Configuration"),
|
||||
_("Visit comma.ai/tg"),
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
},
|
||||
|
||||
EventName.whitePandaUnsupported: {
|
||||
ET.PERMANENT: Alert(
|
||||
"White Panda Is No Longer Supported",
|
||||
"Upgrade to comma two or black panda",
|
||||
_("White Panda Is No Longer Supported"),
|
||||
_("Upgrade to comma two or black panda"),
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
ET.NO_ENTRY: NoEntryAlert("White panda is no longer supported"),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("White panda is no longer supported")),
|
||||
},
|
||||
|
||||
EventName.invalidLkasSetting: {
|
||||
ET.PERMANENT: Alert(
|
||||
"Stock LKAS is turned on",
|
||||
"Turn off stock LKAS to engage",
|
||||
_("Stock LKAS is turned on"),
|
||||
_("Turn off stock LKAS to engage"),
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
},
|
||||
@@ -283,48 +287,48 @@ EVENTS = {
|
||||
# LOW priority to overcome Cruise Error
|
||||
ET.PERMANENT: Alert(
|
||||
"",
|
||||
"Community Feature Detected",
|
||||
"Enable Community Features in Developer Settings",
|
||||
_("Community Feature Detected"),
|
||||
_("Enable Community Features in Developer Settings"),
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
},
|
||||
|
||||
EventName.carUnrecognized: {
|
||||
ET.PERMANENT: Alert(
|
||||
"Dashcam Mode",
|
||||
"Car Unrecognized",
|
||||
_("Dashcam Mode"),
|
||||
_("Car Unrecognized"),
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOWEST, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
},
|
||||
|
||||
EventName.stockAeb: {
|
||||
ET.PERMANENT: Alert(
|
||||
"BRAKE!",
|
||||
"Stock AEB: Risk of Collision",
|
||||
_("BRAKE!"),
|
||||
_("Stock AEB: Risk of Collision"),
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGHEST, VisualAlert.fcw, AudibleAlert.none, 1., 2., 2.),
|
||||
},
|
||||
|
||||
EventName.stockFcw: {
|
||||
ET.PERMANENT: Alert(
|
||||
"BRAKE!",
|
||||
"Stock FCW: Risk of Collision",
|
||||
_("BRAKE!"),
|
||||
_("Stock FCW: Risk of Collision"),
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGHEST, VisualAlert.fcw, AudibleAlert.none, 1., 2., 2.),
|
||||
},
|
||||
|
||||
EventName.fcw: {
|
||||
ET.PERMANENT: Alert(
|
||||
"BRAKE!",
|
||||
"Risk of Collision",
|
||||
_("BRAKE!"),
|
||||
_("Risk of Collision"),
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGHEST, VisualAlert.fcw, AudibleAlert.chimeWarningRepeat, 1., 2., 2.),
|
||||
},
|
||||
|
||||
EventName.ldw: {
|
||||
ET.PERMANENT: Alert(
|
||||
"TAKE CONTROL",
|
||||
"Lane Departure Detected",
|
||||
_("TAKE CONTROL"),
|
||||
_("Lane Departure Detected"),
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimePrompt, 1., 2., 3.),
|
||||
},
|
||||
@@ -333,7 +337,7 @@ EVENTS = {
|
||||
|
||||
EventName.gasPressed: {
|
||||
ET.PRE_ENABLE: Alert(
|
||||
"openpilot will not brake while gas pressed",
|
||||
_("openpilot will not brake while gas pressed"),
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOWEST, VisualAlert.none, AudibleAlert.none, .0, .0, .1),
|
||||
@@ -341,7 +345,7 @@ EVENTS = {
|
||||
|
||||
EventName.vehicleModelInvalid: {
|
||||
ET.WARNING: Alert(
|
||||
"Vehicle Parameter Identification Failed",
|
||||
_("Vehicle Parameter Identification Failed"),
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOWEST, VisualAlert.steerRequired, AudibleAlert.none, .0, .0, .1),
|
||||
@@ -349,15 +353,15 @@ EVENTS = {
|
||||
|
||||
EventName.steerTempUnavailableMute: {
|
||||
ET.WARNING: Alert(
|
||||
"TAKE CONTROL",
|
||||
"Steering Temporarily Unavailable",
|
||||
_("TAKE CONTROL"),
|
||||
_("Steering Temporarily Unavailable"),
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, .2, .2, .2),
|
||||
},
|
||||
|
||||
EventName.preDriverDistracted: {
|
||||
ET.WARNING: Alert(
|
||||
"KEEP EYES ON ROAD: Driver Distracted",
|
||||
_("KEEP EYES ON ROAD: Driver Distracted"),
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, .0, .1, .1, alert_rate=0.75),
|
||||
@@ -365,23 +369,23 @@ EVENTS = {
|
||||
|
||||
EventName.promptDriverDistracted: {
|
||||
ET.WARNING: Alert(
|
||||
"KEEP EYES ON ROAD",
|
||||
"Driver Appears Distracted",
|
||||
_("KEEP EYES ON ROAD"),
|
||||
_("Driver Appears Distracted"),
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarning2Repeat, .1, .1, .1),
|
||||
},
|
||||
|
||||
EventName.driverDistracted: {
|
||||
ET.WARNING: Alert(
|
||||
"DISENGAGE IMMEDIATELY",
|
||||
"Driver Was Distracted",
|
||||
_("DISENGAGE IMMEDIATELY"),
|
||||
_("Driver Was Distracted"),
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGH, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, .1, .1),
|
||||
},
|
||||
|
||||
EventName.preDriverUnresponsive: {
|
||||
ET.WARNING: Alert(
|
||||
"TOUCH STEERING WHEEL: No Face Detected",
|
||||
_("TOUCH STEERING WHEEL: No Face Detected"),
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, .0, .1, .1, alert_rate=0.75),
|
||||
@@ -389,40 +393,40 @@ EVENTS = {
|
||||
|
||||
EventName.promptDriverUnresponsive: {
|
||||
ET.WARNING: Alert(
|
||||
"TOUCH STEERING WHEEL",
|
||||
"Driver Is Unresponsive",
|
||||
_("TOUCH STEERING WHEEL"),
|
||||
_("Driver Is Unresponsive"),
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarning2Repeat, .1, .1, .1),
|
||||
},
|
||||
|
||||
EventName.driverUnresponsive: {
|
||||
ET.WARNING: Alert(
|
||||
"DISENGAGE IMMEDIATELY",
|
||||
"Driver Was Unresponsive",
|
||||
_("DISENGAGE IMMEDIATELY"),
|
||||
_("Driver Was Unresponsive"),
|
||||
AlertStatus.critical, AlertSize.full,
|
||||
Priority.HIGH, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, .1, .1, .1),
|
||||
},
|
||||
|
||||
EventName.driverMonitorLowAcc: {
|
||||
ET.WARNING: Alert(
|
||||
"CHECK DRIVER FACE VISIBILITY",
|
||||
"Driver Monitor Model Output Uncertain",
|
||||
_("CHECK DRIVER FACE VISIBILITY"),
|
||||
_("Driver Monitor Model Output Uncertain"),
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, .4, 0., 1.),
|
||||
},
|
||||
|
||||
EventName.manualRestart: {
|
||||
ET.WARNING: Alert(
|
||||
"TAKE CONTROL",
|
||||
"Resume Driving Manually",
|
||||
_("TAKE CONTROL"),
|
||||
_("Resume Driving Manually"),
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
},
|
||||
|
||||
EventName.resumeRequired: {
|
||||
ET.WARNING: Alert(
|
||||
"STOPPED",
|
||||
"Press Resume to Move",
|
||||
_("STOPPED"),
|
||||
_("Press Resume to Move"),
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
},
|
||||
@@ -433,40 +437,40 @@ EVENTS = {
|
||||
|
||||
EventName.preLaneChangeLeft: {
|
||||
ET.WARNING: Alert(
|
||||
"Steer Left to Start Lane Change",
|
||||
"Monitor Other Vehicles",
|
||||
_("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),
|
||||
},
|
||||
|
||||
EventName.preLaneChangeRight: {
|
||||
ET.WARNING: Alert(
|
||||
"Steer Right to Start Lane Change",
|
||||
"Monitor Other Vehicles",
|
||||
_("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),
|
||||
},
|
||||
|
||||
EventName.laneChangeBlocked: {
|
||||
ET.WARNING: Alert(
|
||||
"Car Detected in Blindspot",
|
||||
"Monitor Other Vehicles",
|
||||
_("Car Detected in Blindspot"),
|
||||
_("Monitor Other Vehicles"),
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, .0, .1, .1),
|
||||
},
|
||||
|
||||
EventName.laneChange: {
|
||||
ET.WARNING: Alert(
|
||||
"Changing Lane",
|
||||
"Monitor Other Vehicles",
|
||||
_("Changing Lane"),
|
||||
_("Monitor Other Vehicles"),
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.none, .0, .1, .1),
|
||||
},
|
||||
|
||||
EventName.steerSaturated: {
|
||||
ET.WARNING: Alert(
|
||||
"TAKE CONTROL",
|
||||
"Turn Exceeds Steering Limit",
|
||||
_("TAKE CONTROL"),
|
||||
_("Turn Exceeds Steering Limit"),
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimePrompt, 1., 2., 3.),
|
||||
},
|
||||
@@ -491,17 +495,17 @@ EVENTS = {
|
||||
|
||||
EventName.brakeHold: {
|
||||
ET.USER_DISABLE: EngagementAlert(AudibleAlert.chimeDisengage),
|
||||
ET.NO_ENTRY: NoEntryAlert("Brake Hold Active"),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("Brake Hold Active")),
|
||||
},
|
||||
|
||||
EventName.parkBrake: {
|
||||
ET.USER_DISABLE: EngagementAlert(AudibleAlert.chimeDisengage),
|
||||
ET.NO_ENTRY: NoEntryAlert("Park Brake Engaged"),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("Park Brake Engaged")),
|
||||
},
|
||||
|
||||
EventName.pedalPressed: {
|
||||
ET.USER_DISABLE: EngagementAlert(AudibleAlert.chimeDisengage),
|
||||
ET.NO_ENTRY: NoEntryAlert("Pedal Pressed During Attempt",
|
||||
ET.NO_ENTRY: NoEntryAlert(_("Pedal Pressed During Attempt"),
|
||||
visual_alert=VisualAlert.brakePressed),
|
||||
},
|
||||
|
||||
@@ -512,61 +516,61 @@ EVENTS = {
|
||||
|
||||
EventName.wrongCruiseMode: {
|
||||
ET.USER_DISABLE: EngagementAlert(AudibleAlert.chimeDisengage),
|
||||
ET.NO_ENTRY: NoEntryAlert("Enable Adaptive Cruise"),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("Enable Adaptive Cruise")),
|
||||
},
|
||||
|
||||
EventName.steerTempUnavailable: {
|
||||
ET.WARNING: Alert(
|
||||
"TAKE CONTROL",
|
||||
"Steering Temporarily Unavailable",
|
||||
_("TAKE CONTROL"),
|
||||
_("Steering Temporarily Unavailable"),
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimeWarning1, .4, 2., 3.),
|
||||
ET.NO_ENTRY: NoEntryAlert("Steering Temporarily Unavailable",
|
||||
ET.NO_ENTRY: NoEntryAlert(_("Steering Temporarily Unavailable"),
|
||||
duration_hud_alert=0.),
|
||||
},
|
||||
|
||||
EventName.posenetInvalid: {
|
||||
ET.WARNING: Alert(
|
||||
"TAKE CONTROL",
|
||||
"Vision Model Output Uncertain",
|
||||
_("TAKE CONTROL"),
|
||||
_("Vision Model Output Uncertain"),
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimeWarning1, .4, 2., 3.),
|
||||
ET.NO_ENTRY: NoEntryAlert("Vision Model Output Uncertain"),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("Vision Model Output Uncertain")),
|
||||
},
|
||||
|
||||
EventName.focusRecoverActive: {
|
||||
ET.WARNING: Alert(
|
||||
"TAKE CONTROL",
|
||||
"Attempting Refocus: Camera Focus Invalid",
|
||||
_("TAKE CONTROL"),
|
||||
_("Attempting Refocus: Camera Focus Invalid"),
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimeWarning1, .4, 2., 3.),
|
||||
},
|
||||
|
||||
EventName.outOfSpace: {
|
||||
ET.NO_ENTRY: NoEntryAlert("Out of Storage Space",
|
||||
ET.NO_ENTRY: NoEntryAlert(_("Out of Storage Space"),
|
||||
duration_hud_alert=0.),
|
||||
},
|
||||
|
||||
EventName.belowEngageSpeed: {
|
||||
ET.NO_ENTRY: NoEntryAlert("Speed Too Low"),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("Speed Too Low")),
|
||||
},
|
||||
|
||||
EventName.neosUpdateRequired: {
|
||||
ET.PERMANENT: Alert(
|
||||
"NEOS Update Required",
|
||||
"Please Wait for Update",
|
||||
_("NEOS Update Required"),
|
||||
_("Please Wait for Update"),
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.HIGHEST, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
ET.NO_ENTRY: NoEntryAlert("NEOS Update Required"),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("NEOS Update Required")),
|
||||
},
|
||||
|
||||
EventName.sensorDataInvalid: {
|
||||
ET.PERMANENT: Alert(
|
||||
"No Data from Device Sensors",
|
||||
"Reboot your Device",
|
||||
_("No Data from Device Sensors"),
|
||||
_("Reboot your Device"),
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2, creation_delay=1.),
|
||||
ET.NO_ENTRY: NoEntryAlert("No Data from Device Sensors"),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("No Data from Device Sensors")),
|
||||
},
|
||||
|
||||
EventName.noGps: {
|
||||
@@ -575,211 +579,269 @@ EVENTS = {
|
||||
|
||||
EventName.soundsUnavailable: {
|
||||
ET.PERMANENT: Alert(
|
||||
"Speaker not found",
|
||||
"Reboot your Device",
|
||||
_("Speaker not found"),
|
||||
_("Reboot your Device"),
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
ET.NO_ENTRY: NoEntryAlert("Speaker not found"),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("Speaker not found")),
|
||||
},
|
||||
|
||||
EventName.tooDistracted: {
|
||||
ET.NO_ENTRY: NoEntryAlert("Distraction Level Too High"),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("Distraction Level Too High")),
|
||||
},
|
||||
|
||||
EventName.overheat: {
|
||||
ET.SOFT_DISABLE: SoftDisableAlert("System Overheated"),
|
||||
ET.NO_ENTRY: NoEntryAlert("System overheated"),
|
||||
ET.SOFT_DISABLE: SoftDisableAlert(_("System Overheated")),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("System overheated")),
|
||||
},
|
||||
|
||||
EventName.wrongGear: {
|
||||
ET.SOFT_DISABLE: SoftDisableAlert("Gear not D"),
|
||||
ET.NO_ENTRY: NoEntryAlert("Gear not D"),
|
||||
ET.SOFT_DISABLE: SoftDisableAlert(_("Gear not D")),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("Gear not D")),
|
||||
},
|
||||
|
||||
EventName.calibrationInvalid: {
|
||||
ET.SOFT_DISABLE: SoftDisableAlert("Calibration Invalid: Reposition Device and Recalibrate"),
|
||||
ET.NO_ENTRY: NoEntryAlert("Calibration Invalid: Reposition Device & Recalibrate"),
|
||||
ET.SOFT_DISABLE: SoftDisableAlert(_("Calibration Invalid: Reposition Device and Recalibrate")),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("Calibration Invalid: Reposition Device & Recalibrate")),
|
||||
},
|
||||
|
||||
EventName.calibrationIncomplete: {
|
||||
ET.SOFT_DISABLE: SoftDisableAlert("Calibration in Progress"),
|
||||
ET.SOFT_DISABLE: SoftDisableAlert(_("Calibration in Progress")),
|
||||
ET.PERMANENT: calibration_incomplete_alert,
|
||||
ET.NO_ENTRY: NoEntryAlert("Calibration in Progress"),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("Calibration in Progress")),
|
||||
},
|
||||
|
||||
EventName.doorOpen: {
|
||||
ET.SOFT_DISABLE: SoftDisableAlert("Door Open"),
|
||||
ET.NO_ENTRY: NoEntryAlert("Door open"),
|
||||
ET.SOFT_DISABLE: SoftDisableAlert(_("Door Open")),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("Door open")),
|
||||
},
|
||||
|
||||
EventName.seatbeltNotLatched: {
|
||||
ET.SOFT_DISABLE: SoftDisableAlert("Seatbelt Unlatched"),
|
||||
ET.NO_ENTRY: NoEntryAlert("Seatbelt unlatched"),
|
||||
ET.SOFT_DISABLE: SoftDisableAlert(_("Seatbelt Unlatched")),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("Seatbelt unlatched")),
|
||||
},
|
||||
|
||||
EventName.espDisabled: {
|
||||
ET.SOFT_DISABLE: SoftDisableAlert("ESP Off"),
|
||||
ET.NO_ENTRY: NoEntryAlert("ESP Off"),
|
||||
ET.SOFT_DISABLE: SoftDisableAlert(_("ESP Off")),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("ESP Off")),
|
||||
},
|
||||
|
||||
EventName.lowBattery: {
|
||||
ET.SOFT_DISABLE: SoftDisableAlert("Low Battery"),
|
||||
ET.NO_ENTRY: NoEntryAlert("Low Battery"),
|
||||
ET.SOFT_DISABLE: SoftDisableAlert(_("Low Battery")),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("Low Battery")),
|
||||
},
|
||||
|
||||
EventName.commIssue: {
|
||||
ET.SOFT_DISABLE: SoftDisableAlert("Communication Issue between Processes"),
|
||||
ET.NO_ENTRY: NoEntryAlert("Communication Issue between Processes",
|
||||
ET.SOFT_DISABLE: SoftDisableAlert(_("Communication Issue between Processes")),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("Communication Issue between Processes"),
|
||||
audible_alert=AudibleAlert.chimeDisengage),
|
||||
},
|
||||
|
||||
EventName.radarCommIssue: {
|
||||
ET.SOFT_DISABLE: SoftDisableAlert("Radar Communication Issue"),
|
||||
ET.NO_ENTRY: NoEntryAlert("Radar Communication Issue",
|
||||
ET.SOFT_DISABLE: SoftDisableAlert(_("Radar Communication Issue")),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("Radar Communication Issue"),
|
||||
audible_alert=AudibleAlert.chimeDisengage),
|
||||
},
|
||||
|
||||
EventName.radarCanError: {
|
||||
ET.SOFT_DISABLE: SoftDisableAlert("Radar Error: Restart the Car"),
|
||||
ET.NO_ENTRY: NoEntryAlert("Radar Error: Restart the Car"),
|
||||
ET.SOFT_DISABLE: SoftDisableAlert(_("Radar Error: Restart the Car")),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("Radar Error: Restart the Car")),
|
||||
},
|
||||
|
||||
EventName.radarFault: {
|
||||
ET.SOFT_DISABLE: SoftDisableAlert("Radar Error: Restart the Car"),
|
||||
ET.NO_ENTRY : NoEntryAlert("Radar Error: Restart the Car"),
|
||||
ET.SOFT_DISABLE: SoftDisableAlert(_("Radar Error: Restart the Car")),
|
||||
ET.NO_ENTRY : NoEntryAlert(_("Radar Error: Restart the Car")),
|
||||
},
|
||||
|
||||
EventName.modeldLagging: {
|
||||
ET.SOFT_DISABLE: SoftDisableAlert("Driving model lagging"),
|
||||
ET.NO_ENTRY : NoEntryAlert("Driving model lagging"),
|
||||
ET.WARNING: Alert(
|
||||
_("TAKE CONTROL"),
|
||||
_("Driving model lagging"),
|
||||
AlertStatus.userPrompt, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, .2, .2, .2),
|
||||
# ET.SOFT_DISABLE: SoftDisableAlert(_("Driving model lagging")),
|
||||
ET.NO_ENTRY : NoEntryAlert(_("Driving model lagging")),
|
||||
},
|
||||
|
||||
EventName.lowMemory: {
|
||||
ET.SOFT_DISABLE: SoftDisableAlert("Low Memory: Reboot Your Device"),
|
||||
ET.SOFT_DISABLE: SoftDisableAlert(_("Low Memory: Reboot Your Device")),
|
||||
ET.PERMANENT: Alert(
|
||||
"RAM Critically Low",
|
||||
"Reboot your Device",
|
||||
_("RAM Critically Low"),
|
||||
_("Reboot your Device"),
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
ET.NO_ENTRY : NoEntryAlert("Low Memory: Reboot Your Device",
|
||||
ET.NO_ENTRY : NoEntryAlert(_("Low Memory: Reboot Your Device"),
|
||||
audible_alert=AudibleAlert.chimeDisengage),
|
||||
},
|
||||
|
||||
EventName.controlsFailed: {
|
||||
ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("Controls Failed"),
|
||||
ET.NO_ENTRY: NoEntryAlert("Controls Failed"),
|
||||
ET.IMMEDIATE_DISABLE: ImmediateDisableAlert(_("Controls Failed")),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("Controls Failed")),
|
||||
},
|
||||
|
||||
EventName.controlsMismatch: {
|
||||
ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("Controls Mismatch"),
|
||||
ET.IMMEDIATE_DISABLE: ImmediateDisableAlert(_("Controls Mismatch")),
|
||||
},
|
||||
|
||||
EventName.canError: {
|
||||
ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("CAN Error: Check Connections"),
|
||||
ET.IMMEDIATE_DISABLE: ImmediateDisableAlert(_("CAN Error: Check Connections")),
|
||||
ET.PERMANENT: Alert(
|
||||
"CAN Error: Check Connections",
|
||||
_("CAN Error: Check Connections"),
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, 0., 0., .2, creation_delay=1.),
|
||||
ET.NO_ENTRY: NoEntryAlert("CAN Error: Check Connections"),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("CAN Error: Check Connections")),
|
||||
},
|
||||
|
||||
EventName.steerUnavailable: {
|
||||
ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("LKAS Fault: Restart the Car"),
|
||||
ET.IMMEDIATE_DISABLE: ImmediateDisableAlert(_("LKAS Fault: Restart the Car")),
|
||||
ET.PERMANENT: Alert(
|
||||
"LKAS Fault: Restart the car to engage",
|
||||
_("LKAS Fault: Restart the car to engage"),
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
ET.NO_ENTRY: NoEntryAlert("LKAS Fault: Restart the Car"),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("LKAS Fault: Restart the Car")),
|
||||
},
|
||||
|
||||
EventName.brakeUnavailable: {
|
||||
ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("Cruise Fault: Restart the Car"),
|
||||
ET.IMMEDIATE_DISABLE: ImmediateDisableAlert(_("Cruise Fault: Restart the Car")),
|
||||
ET.PERMANENT: Alert(
|
||||
"Cruise Fault: Restart the car to engage",
|
||||
_("Cruise Fault: Restart the car to engage"),
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
ET.NO_ENTRY: NoEntryAlert("Cruise Fault: Restart the Car"),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("Cruise Fault: Restart the Car")),
|
||||
},
|
||||
|
||||
EventName.gasUnavailable: {
|
||||
ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("Gas Fault: Restart the Car"),
|
||||
ET.NO_ENTRY: NoEntryAlert("Gas Error: Restart the Car"),
|
||||
ET.IMMEDIATE_DISABLE: ImmediateDisableAlert(_("Gas Fault: Restart the Car")),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("Gas Error: Restart the Car")),
|
||||
},
|
||||
|
||||
EventName.reverseGear: {
|
||||
ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("Reverse Gear"),
|
||||
ET.NO_ENTRY: NoEntryAlert("Reverse Gear"),
|
||||
ET.IMMEDIATE_DISABLE: ImmediateDisableAlert(_("Reverse Gear")),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("Reverse Gear")),
|
||||
},
|
||||
|
||||
EventName.cruiseDisabled: {
|
||||
ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("Cruise Is Off"),
|
||||
ET.IMMEDIATE_DISABLE: ImmediateDisableAlert(_("Cruise Is Off")),
|
||||
},
|
||||
|
||||
EventName.plannerError: {
|
||||
ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("Planner Solution Error"),
|
||||
ET.NO_ENTRY: NoEntryAlert("Planner Solution Error"),
|
||||
ET.IMMEDIATE_DISABLE: ImmediateDisableAlert(_("Planner Solution Error")),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("Planner Solution Error")),
|
||||
},
|
||||
|
||||
EventName.relayMalfunction: {
|
||||
ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("Harness Malfunction"),
|
||||
ET.IMMEDIATE_DISABLE: ImmediateDisableAlert(_("Harness Malfunction")),
|
||||
ET.PERMANENT: Alert(
|
||||
"Harness Malfunction",
|
||||
"Please Check Hardware",
|
||||
_("Harness Malfunction"),
|
||||
_("Please Check Hardware"),
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
ET.NO_ENTRY: NoEntryAlert("Harness Malfunction"),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("Harness Malfunction")),
|
||||
},
|
||||
|
||||
EventName.noTarget: {
|
||||
ET.IMMEDIATE_DISABLE: Alert(
|
||||
"openpilot Canceled",
|
||||
"No close lead car",
|
||||
_("openpilot Canceled"),
|
||||
_("No close lead car"),
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.HIGH, VisualAlert.none, AudibleAlert.chimeDisengage, .4, 2., 3.),
|
||||
ET.NO_ENTRY : NoEntryAlert("No Close Lead Car"),
|
||||
ET.NO_ENTRY : NoEntryAlert(_("No Close Lead Car")),
|
||||
},
|
||||
|
||||
EventName.speedTooLow: {
|
||||
ET.IMMEDIATE_DISABLE: Alert(
|
||||
"openpilot Canceled",
|
||||
"Speed too low",
|
||||
_("openpilot Canceled"),
|
||||
_("Speed too low"),
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.HIGH, VisualAlert.none, AudibleAlert.chimeDisengage, .4, 2., 3.),
|
||||
},
|
||||
|
||||
EventName.speedTooHigh: {
|
||||
ET.WARNING: Alert(
|
||||
"Speed Too High",
|
||||
"Slow down to resume operation",
|
||||
_("Speed Too High"),
|
||||
_("Slow down to resume operation"),
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.HIGH, VisualAlert.steerRequired, AudibleAlert.chimeWarning2Repeat, 2.2, 3., 4.),
|
||||
ET.NO_ENTRY: Alert(
|
||||
"Speed Too High",
|
||||
"Slow down to engage",
|
||||
_("Speed Too High"),
|
||||
_("Slow down to engage"),
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.),
|
||||
},
|
||||
|
||||
EventName.internetConnectivityNeeded: {
|
||||
ET.PERMANENT: Alert(
|
||||
"Please connect to Internet",
|
||||
"An Update Check Is Required to Engage",
|
||||
_("Please connect to Internet"),
|
||||
_("An Update Check Is Required to Engage"),
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
ET.NO_ENTRY: NoEntryAlert("Please Connect to Internet",
|
||||
ET.NO_ENTRY: NoEntryAlert(_("Please Connect to Internet"),
|
||||
audible_alert=AudibleAlert.chimeDisengage),
|
||||
},
|
||||
|
||||
EventName.lowSpeedLockout: {
|
||||
ET.PERMANENT: Alert(
|
||||
"Cruise Fault: Restart the car to engage",
|
||||
_("Cruise Fault: Restart the car to engage"),
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOWER, VisualAlert.none, AudibleAlert.none, 0., 0., .2),
|
||||
ET.NO_ENTRY: NoEntryAlert("Cruise Fault: Restart the Car"),
|
||||
ET.NO_ENTRY: NoEntryAlert(_("Cruise Fault: Restart the Car")),
|
||||
},
|
||||
|
||||
# dp
|
||||
EventName.preLaneChangeLeftALC: {
|
||||
ET.WARNING: Alert(
|
||||
_("Left ALC will start in 3s"),
|
||||
_("Monitor Other Vehicles"),
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimeWarning2, .1, .1, .1, alert_rate=0.75),
|
||||
},
|
||||
|
||||
EventName.preLaneChangeRightALC: {
|
||||
ET.WARNING: Alert(
|
||||
_("Right ALC will start in 3s"),
|
||||
_("Monitor Other Vehicles"),
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimeWarning2, .1, .1, .1, alert_rate=0.75),
|
||||
},
|
||||
|
||||
EventName.laneChangeALC: {
|
||||
ET.WARNING: Alert(
|
||||
_("Changing Lane"),
|
||||
_("Monitor Other Vehicles"),
|
||||
AlertStatus.normal, AlertSize.mid,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimeWarning2, .1, .1, .1),
|
||||
},
|
||||
|
||||
EventName.manualSteeringRequired: {
|
||||
ET.WARNING: Alert(
|
||||
_("STEERING REQUIRED: Lane Keeping OFF"),
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, .0, .1, .1, alert_rate=0.25),
|
||||
},
|
||||
|
||||
EventName.manualSteeringRequiredBlinkersOn: {
|
||||
ET.WARNING: Alert(
|
||||
_("STEERING REQUIRED: Blinkers ON"),
|
||||
"",
|
||||
AlertStatus.normal, AlertSize.small,
|
||||
Priority.LOW, VisualAlert.none, AudibleAlert.none, .0, .1, .1, alert_rate=0.25),
|
||||
},
|
||||
|
||||
EventName.leadCarMoving: {
|
||||
ET.PERMANENT: Alert(
|
||||
_("Lead Car Is Moving"),
|
||||
"",
|
||||
AlertStatus.userPrompt, AlertSize.small,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimePrompt, .1, .1, .1),
|
||||
ET.WARNING: Alert(
|
||||
_("Lead Car Is Moving"),
|
||||
"",
|
||||
AlertStatus.userPrompt, AlertSize.small,
|
||||
Priority.LOW, VisualAlert.steerRequired, AudibleAlert.chimePrompt, .1, .1, .1),
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
from common.numpy_fast import interp
|
||||
import numpy as np
|
||||
from cereal import log
|
||||
import cereal.messaging as messaging
|
||||
from common.realtime import sec_since_boot
|
||||
|
||||
CAMERA_OFFSET = 0.06 # m from center car to camera
|
||||
|
||||
@@ -65,6 +67,11 @@ class LanePlanner():
|
||||
self._path_pinv = compute_path_pinv()
|
||||
self.x_points = np.arange(50)
|
||||
|
||||
# dp
|
||||
self.sm = messaging.SubMaster(['dragonConf'])
|
||||
self.dp_camera_offset = CAMERA_OFFSET
|
||||
self.last_ts = 0
|
||||
|
||||
def parse_model(self, md):
|
||||
if len(md.leftLane.poly):
|
||||
self.l_poly = np.array(md.leftLane.poly)
|
||||
@@ -83,8 +90,14 @@ class LanePlanner():
|
||||
|
||||
def update_d_poly(self, v_ego):
|
||||
# only offset left and right lane lines; offsetting p_poly does not make sense
|
||||
self.l_poly[3] += CAMERA_OFFSET
|
||||
self.r_poly[3] += CAMERA_OFFSET
|
||||
if sec_since_boot() - self.last_ts >= 5.:
|
||||
self.sm.update(0)
|
||||
if self.sm.updated['dragonConf']:
|
||||
self.dp_camera_offset = self.sm['dragonConf'].dpCameraOffset * 0.01
|
||||
self.last_ts = sec_since_boot()
|
||||
self.l_poly[3] += self.dp_camera_offset
|
||||
self.r_poly[3] += self.dp_camera_offset
|
||||
self.p_poly[3] += self.dp_camera_offset
|
||||
|
||||
# Find current lanewidth
|
||||
self.lane_width_certainty += 0.05 * (self.l_prob * self.r_prob - self.lane_width_certainty)
|
||||
|
||||
@@ -7,6 +7,7 @@ from common.realtime import sec_since_boot
|
||||
from selfdrive.controls.lib.radar_helpers import _LEAD_ACCEL_TAU
|
||||
from selfdrive.controls.lib.longitudinal_mpc import libmpc_py
|
||||
from selfdrive.controls.lib.drive_helpers import MPC_COST_LONG
|
||||
from selfdrive.controls.lib.dynamic_follow import DynamicFollow
|
||||
|
||||
LOG_MPC = os.environ.get('LOG_MPC', False)
|
||||
|
||||
@@ -14,7 +15,7 @@ LOG_MPC = os.environ.get('LOG_MPC', False)
|
||||
class LongitudinalMpc():
|
||||
def __init__(self, mpc_id):
|
||||
self.mpc_id = mpc_id
|
||||
|
||||
self.dynamic_follow = DynamicFollow(mpc_id)
|
||||
self.setup_mpc()
|
||||
self.v_mpc = 0.0
|
||||
self.v_mpc_future = 0.0
|
||||
@@ -77,11 +78,13 @@ class LongitudinalMpc():
|
||||
self.libmpc.init_with_simulation(self.v_mpc, x_lead, v_lead, a_lead, self.a_lead_tau)
|
||||
self.new_lead = True
|
||||
|
||||
self.dynamic_follow.update_lead(v_lead, a_lead, x_lead, lead.status, self.new_lead)
|
||||
self.prev_lead_status = True
|
||||
self.prev_lead_x = x_lead
|
||||
self.cur_state[0].x_l = x_lead
|
||||
self.cur_state[0].v_l = v_lead
|
||||
else:
|
||||
self.dynamic_follow.update_lead(new_lead=self.new_lead)
|
||||
self.prev_lead_status = False
|
||||
# Fake a fast lead car, so mpc keeps running
|
||||
self.cur_state[0].x_l = 50.0
|
||||
@@ -91,7 +94,8 @@ class LongitudinalMpc():
|
||||
|
||||
# Calculate mpc
|
||||
t = sec_since_boot()
|
||||
n_its = self.libmpc.run_mpc(self.cur_state, self.mpc_solution, self.a_lead_tau, a_lead)
|
||||
TR = self.dynamic_follow.update(CS, self.libmpc) # update dynamic follow
|
||||
n_its = self.libmpc.run_mpc(self.cur_state, self.mpc_solution, self.a_lead_tau, a_lead, TR)
|
||||
duration = int((sec_since_boot() - t) * 1e9)
|
||||
|
||||
if LOG_MPC:
|
||||
|
||||
@@ -85,7 +85,7 @@ class LongControl():
|
||||
|
||||
v_ego_pid = max(CS.vEgo, MIN_CAN_SPEED) # Without this we get jumps, CAN bus reports 0 when speed < 0.3
|
||||
|
||||
if self.long_control_state == LongCtrlState.off:
|
||||
if self.long_control_state == LongCtrlState.off or CS.gasPressed or CS.brakePressed:
|
||||
self.v_pid = v_ego_pid
|
||||
self.pid.reset()
|
||||
output_gb = 0.
|
||||
|
||||
@@ -68,7 +68,7 @@ acadoWorkspace.evGu[lRun1 * 3 + 2] = acadoWorkspace.state[14];
|
||||
return ret;
|
||||
}
|
||||
|
||||
void acado_evaluateLSQ(const real_t* in, real_t* out)
|
||||
void acado_evaluateLSQ(const real_t* in, real_t* out, double TR)
|
||||
{
|
||||
const real_t* xd = in;
|
||||
const real_t* u = in + 3;
|
||||
@@ -78,29 +78,29 @@ real_t* a = acadoWorkspace.objAuxVar;
|
||||
|
||||
/* Compute intermediate quantities: */
|
||||
a[0] = (sqrt((xd[1]+(real_t)(5.0000000000000000e-01))));
|
||||
a[1] = (exp(((real_t)(2.9999999999999999e-01)*(((((((xd[1]*(real_t)(1.8000000000000000e+00))-((od[1]-xd[1])*(real_t)(1.8000000000000000e+00)))+((xd[1]*xd[1])/(real_t)(1.9620000000000001e+01)))-((od[1]*od[1])/(real_t)(1.9620000000000001e+01)))+(real_t)(4.0000000000000000e+00))-(od[0]-xd[0]))/(a[0]+(real_t)(1.0000000000000001e-01))))));
|
||||
a[1] = (exp(((real_t)(2.9999999999999999e-01)*(((((((xd[1]*(real_t)(TR))-((od[1]-xd[1])*(real_t)(TR)))+((xd[1]*xd[1])/(real_t)(1.9620000000000001e+01)))-((od[1]*od[1])/(real_t)(1.9620000000000001e+01)))+(real_t)(4.0000000000000000e+00))-(od[0]-xd[0]))/(a[0]+(real_t)(1.0000000000000001e-01))))));
|
||||
a[2] = ((real_t)(1.0000000000000000e+00)/(a[0]+(real_t)(1.0000000000000001e-01)));
|
||||
a[3] = (exp(((real_t)(2.9999999999999999e-01)*(((((((xd[1]*(real_t)(1.8000000000000000e+00))-((od[1]-xd[1])*(real_t)(1.8000000000000000e+00)))+((xd[1]*xd[1])/(real_t)(1.9620000000000001e+01)))-((od[1]*od[1])/(real_t)(1.9620000000000001e+01)))+(real_t)(4.0000000000000000e+00))-(od[0]-xd[0]))/(a[0]+(real_t)(1.0000000000000001e-01))))));
|
||||
a[3] = (exp(((real_t)(2.9999999999999999e-01)*(((((((xd[1]*(real_t)(TR))-((od[1]-xd[1])*(real_t)(TR)))+((xd[1]*xd[1])/(real_t)(1.9620000000000001e+01)))-((od[1]*od[1])/(real_t)(1.9620000000000001e+01)))+(real_t)(4.0000000000000000e+00))-(od[0]-xd[0]))/(a[0]+(real_t)(1.0000000000000001e-01))))));
|
||||
a[4] = (((real_t)(2.9999999999999999e-01)*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*a[2]))*a[3]);
|
||||
a[5] = ((real_t)(1.0000000000000000e+00)/(real_t)(1.9620000000000001e+01));
|
||||
a[6] = (1.0/sqrt((xd[1]+(real_t)(5.0000000000000000e-01))));
|
||||
a[7] = (a[6]*(real_t)(5.0000000000000000e-01));
|
||||
a[8] = (a[2]*a[2]);
|
||||
a[9] = (((real_t)(2.9999999999999999e-01)*(((((real_t)(1.8000000000000000e+00)-((real_t)(-1.8000000000000000e+00)))+((xd[1]+xd[1])*a[5]))*a[2])-((((((((xd[1]*(real_t)(1.8000000000000000e+00))-((od[1]-xd[1])*(real_t)(1.8000000000000000e+00)))+((xd[1]*xd[1])/(real_t)(1.9620000000000001e+01)))-((od[1]*od[1])/(real_t)(1.9620000000000001e+01)))+(real_t)(4.0000000000000000e+00))-(od[0]-xd[0]))*a[7])*a[8])))*a[3]);
|
||||
a[9] = (((real_t)(2.9999999999999999e-01)*(((((real_t)(TR)-((real_t)(-TR)))+((xd[1]+xd[1])*a[5]))*a[2])-((((((((xd[1]*(real_t)(TR))-((od[1]-xd[1])*(real_t)(TR)))+((xd[1]*xd[1])/(real_t)(1.9620000000000001e+01)))-((od[1]*od[1])/(real_t)(1.9620000000000001e+01)))+(real_t)(4.0000000000000000e+00))-(od[0]-xd[0]))*a[7])*a[8])))*a[3]);
|
||||
a[10] = ((real_t)(1.0000000000000000e+00)/(((real_t)(5.0000000000000003e-02)*xd[1])+(real_t)(5.0000000000000000e-01)));
|
||||
a[11] = ((real_t)(1.0000000000000000e+00)/(real_t)(1.9620000000000001e+01));
|
||||
a[12] = (a[10]*a[10]);
|
||||
|
||||
/* Compute outputs: */
|
||||
out[0] = (a[1]-(real_t)(1.0000000000000000e+00));
|
||||
out[1] = (((od[0]-xd[0])-((real_t)(4.0000000000000000e+00)+((((xd[1]*(real_t)(1.8000000000000000e+00))-((od[1]-xd[1])*(real_t)(1.8000000000000000e+00)))+((xd[1]*xd[1])/(real_t)(1.9620000000000001e+01)))-((od[1]*od[1])/(real_t)(1.9620000000000001e+01)))))/(((real_t)(5.0000000000000003e-02)*xd[1])+(real_t)(5.0000000000000000e-01)));
|
||||
out[1] = (((od[0]-xd[0])-((real_t)(4.0000000000000000e+00)+((((xd[1]*(real_t)(TR))-((od[1]-xd[1])*(real_t)(TR)))+((xd[1]*xd[1])/(real_t)(1.9620000000000001e+01)))-((od[1]*od[1])/(real_t)(1.9620000000000001e+01)))))/(((real_t)(5.0000000000000003e-02)*xd[1])+(real_t)(5.0000000000000000e-01)));
|
||||
out[2] = (xd[2]*(((real_t)(1.0000000000000001e-01)*xd[1])+(real_t)(1.0000000000000000e+00)));
|
||||
out[3] = (u[0]*(((real_t)(1.0000000000000001e-01)*xd[1])+(real_t)(1.0000000000000000e+00)));
|
||||
out[4] = a[4];
|
||||
out[5] = a[9];
|
||||
out[6] = (real_t)(0.0000000000000000e+00);
|
||||
out[7] = (((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*a[10]);
|
||||
out[8] = ((((real_t)(0.0000000000000000e+00)-(((real_t)(1.8000000000000000e+00)-((real_t)(-1.8000000000000000e+00)))+((xd[1]+xd[1])*a[11])))*a[10])-((((od[0]-xd[0])-((real_t)(4.0000000000000000e+00)+((((xd[1]*(real_t)(1.8000000000000000e+00))-((od[1]-xd[1])*(real_t)(1.8000000000000000e+00)))+((xd[1]*xd[1])/(real_t)(1.9620000000000001e+01)))-((od[1]*od[1])/(real_t)(1.9620000000000001e+01)))))*(real_t)(5.0000000000000003e-02))*a[12]));
|
||||
out[8] = ((((real_t)(0.0000000000000000e+00)-(((real_t)(TR)-((real_t)(-TR)))+((xd[1]+xd[1])*a[11])))*a[10])-((((od[0]-xd[0])-((real_t)(4.0000000000000000e+00)+((((xd[1]*(real_t)(TR))-((od[1]-xd[1])*(real_t)(TR)))+((xd[1]*xd[1])/(real_t)(1.9620000000000001e+01)))-((od[1]*od[1])/(real_t)(1.9620000000000001e+01)))))*(real_t)(5.0000000000000003e-02))*a[12]));
|
||||
out[9] = (real_t)(0.0000000000000000e+00);
|
||||
out[10] = (real_t)(0.0000000000000000e+00);
|
||||
out[11] = (xd[2]*(real_t)(1.0000000000000001e-01));
|
||||
@@ -114,7 +114,7 @@ out[18] = (real_t)(0.0000000000000000e+00);
|
||||
out[19] = (((real_t)(1.0000000000000001e-01)*xd[1])+(real_t)(1.0000000000000000e+00));
|
||||
}
|
||||
|
||||
void acado_evaluateLSQEndTerm(const real_t* in, real_t* out)
|
||||
void acado_evaluateLSQEndTerm(const real_t* in, real_t* out, double TR)
|
||||
{
|
||||
const real_t* xd = in;
|
||||
const real_t* od = in + 3;
|
||||
@@ -123,28 +123,28 @@ real_t* a = acadoWorkspace.objAuxVar;
|
||||
|
||||
/* Compute intermediate quantities: */
|
||||
a[0] = (sqrt((xd[1]+(real_t)(5.0000000000000000e-01))));
|
||||
a[1] = (exp(((real_t)(2.9999999999999999e-01)*(((((((xd[1]*(real_t)(1.8000000000000000e+00))-((od[1]-xd[1])*(real_t)(1.8000000000000000e+00)))+((xd[1]*xd[1])/(real_t)(1.9620000000000001e+01)))-((od[1]*od[1])/(real_t)(1.9620000000000001e+01)))+(real_t)(4.0000000000000000e+00))-(od[0]-xd[0]))/(a[0]+(real_t)(1.0000000000000001e-01))))));
|
||||
a[1] = (exp(((real_t)(2.9999999999999999e-01)*(((((((xd[1]*(real_t)(TR))-((od[1]-xd[1])*(real_t)(TR)))+((xd[1]*xd[1])/(real_t)(1.9620000000000001e+01)))-((od[1]*od[1])/(real_t)(1.9620000000000001e+01)))+(real_t)(4.0000000000000000e+00))-(od[0]-xd[0]))/(a[0]+(real_t)(1.0000000000000001e-01))))));
|
||||
a[2] = ((real_t)(1.0000000000000000e+00)/(a[0]+(real_t)(1.0000000000000001e-01)));
|
||||
a[3] = (exp(((real_t)(2.9999999999999999e-01)*(((((((xd[1]*(real_t)(1.8000000000000000e+00))-((od[1]-xd[1])*(real_t)(1.8000000000000000e+00)))+((xd[1]*xd[1])/(real_t)(1.9620000000000001e+01)))-((od[1]*od[1])/(real_t)(1.9620000000000001e+01)))+(real_t)(4.0000000000000000e+00))-(od[0]-xd[0]))/(a[0]+(real_t)(1.0000000000000001e-01))))));
|
||||
a[3] = (exp(((real_t)(2.9999999999999999e-01)*(((((((xd[1]*(real_t)(TR))-((od[1]-xd[1])*(real_t)(TR)))+((xd[1]*xd[1])/(real_t)(1.9620000000000001e+01)))-((od[1]*od[1])/(real_t)(1.9620000000000001e+01)))+(real_t)(4.0000000000000000e+00))-(od[0]-xd[0]))/(a[0]+(real_t)(1.0000000000000001e-01))))));
|
||||
a[4] = (((real_t)(2.9999999999999999e-01)*(((real_t)(0.0000000000000000e+00)-((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00)))*a[2]))*a[3]);
|
||||
a[5] = ((real_t)(1.0000000000000000e+00)/(real_t)(1.9620000000000001e+01));
|
||||
a[6] = (1.0/sqrt((xd[1]+(real_t)(5.0000000000000000e-01))));
|
||||
a[7] = (a[6]*(real_t)(5.0000000000000000e-01));
|
||||
a[8] = (a[2]*a[2]);
|
||||
a[9] = (((real_t)(2.9999999999999999e-01)*(((((real_t)(1.8000000000000000e+00)-((real_t)(-1.8000000000000000e+00)))+((xd[1]+xd[1])*a[5]))*a[2])-((((((((xd[1]*(real_t)(1.8000000000000000e+00))-((od[1]-xd[1])*(real_t)(1.8000000000000000e+00)))+((xd[1]*xd[1])/(real_t)(1.9620000000000001e+01)))-((od[1]*od[1])/(real_t)(1.9620000000000001e+01)))+(real_t)(4.0000000000000000e+00))-(od[0]-xd[0]))*a[7])*a[8])))*a[3]);
|
||||
a[9] = (((real_t)(2.9999999999999999e-01)*(((((real_t)(TR)-((real_t)(-TR)))+((xd[1]+xd[1])*a[5]))*a[2])-((((((((xd[1]*(real_t)(TR))-((od[1]-xd[1])*(real_t)(TR)))+((xd[1]*xd[1])/(real_t)(1.9620000000000001e+01)))-((od[1]*od[1])/(real_t)(1.9620000000000001e+01)))+(real_t)(4.0000000000000000e+00))-(od[0]-xd[0]))*a[7])*a[8])))*a[3]);
|
||||
a[10] = ((real_t)(1.0000000000000000e+00)/(((real_t)(5.0000000000000003e-02)*xd[1])+(real_t)(5.0000000000000000e-01)));
|
||||
a[11] = ((real_t)(1.0000000000000000e+00)/(real_t)(1.9620000000000001e+01));
|
||||
a[12] = (a[10]*a[10]);
|
||||
|
||||
/* Compute outputs: */
|
||||
out[0] = (a[1]-(real_t)(1.0000000000000000e+00));
|
||||
out[1] = (((od[0]-xd[0])-((real_t)(4.0000000000000000e+00)+((((xd[1]*(real_t)(1.8000000000000000e+00))-((od[1]-xd[1])*(real_t)(1.8000000000000000e+00)))+((xd[1]*xd[1])/(real_t)(1.9620000000000001e+01)))-((od[1]*od[1])/(real_t)(1.9620000000000001e+01)))))/(((real_t)(5.0000000000000003e-02)*xd[1])+(real_t)(5.0000000000000000e-01)));
|
||||
out[1] = (((od[0]-xd[0])-((real_t)(4.0000000000000000e+00)+((((xd[1]*(real_t)(TR))-((od[1]-xd[1])*(real_t)(TR)))+((xd[1]*xd[1])/(real_t)(1.9620000000000001e+01)))-((od[1]*od[1])/(real_t)(1.9620000000000001e+01)))))/(((real_t)(5.0000000000000003e-02)*xd[1])+(real_t)(5.0000000000000000e-01)));
|
||||
out[2] = (xd[2]*(((real_t)(1.0000000000000001e-01)*xd[1])+(real_t)(1.0000000000000000e+00)));
|
||||
out[3] = a[4];
|
||||
out[4] = a[9];
|
||||
out[5] = (real_t)(0.0000000000000000e+00);
|
||||
out[6] = (((real_t)(0.0000000000000000e+00)-(real_t)(1.0000000000000000e+00))*a[10]);
|
||||
out[7] = ((((real_t)(0.0000000000000000e+00)-(((real_t)(1.8000000000000000e+00)-((real_t)(-1.8000000000000000e+00)))+((xd[1]+xd[1])*a[11])))*a[10])-((((od[0]-xd[0])-((real_t)(4.0000000000000000e+00)+((((xd[1]*(real_t)(1.8000000000000000e+00))-((od[1]-xd[1])*(real_t)(1.8000000000000000e+00)))+((xd[1]*xd[1])/(real_t)(1.9620000000000001e+01)))-((od[1]*od[1])/(real_t)(1.9620000000000001e+01)))))*(real_t)(5.0000000000000003e-02))*a[12]));
|
||||
out[7] = ((((real_t)(0.0000000000000000e+00)-(((real_t)(TR)-((real_t)(-TR)))+((xd[1]+xd[1])*a[11])))*a[10])-((((od[0]-xd[0])-((real_t)(4.0000000000000000e+00)+((((xd[1]*(real_t)(TR))-((od[1]-xd[1])*(real_t)(TR)))+((xd[1]*xd[1])/(real_t)(1.9620000000000001e+01)))-((od[1]*od[1])/(real_t)(1.9620000000000001e+01)))))*(real_t)(5.0000000000000003e-02))*a[12]));
|
||||
out[8] = (real_t)(0.0000000000000000e+00);
|
||||
out[9] = (real_t)(0.0000000000000000e+00);
|
||||
out[10] = (xd[2]*(real_t)(1.0000000000000001e-01));
|
||||
@@ -207,7 +207,7 @@ tmpQN1[7] = + tmpQN2[6]*tmpFx[1] + tmpQN2[7]*tmpFx[4] + tmpQN2[8]*tmpFx[7];
|
||||
tmpQN1[8] = + tmpQN2[6]*tmpFx[2] + tmpQN2[7]*tmpFx[5] + tmpQN2[8]*tmpFx[8];
|
||||
}
|
||||
|
||||
void acado_evaluateObjective( )
|
||||
void acado_evaluateObjective( double TR )
|
||||
{
|
||||
int runObj;
|
||||
for (runObj = 0; runObj < 20; ++runObj)
|
||||
@@ -219,7 +219,7 @@ acadoWorkspace.objValueIn[3] = acadoVariables.u[runObj];
|
||||
acadoWorkspace.objValueIn[4] = acadoVariables.od[runObj * 2];
|
||||
acadoWorkspace.objValueIn[5] = acadoVariables.od[runObj * 2 + 1];
|
||||
|
||||
acado_evaluateLSQ( acadoWorkspace.objValueIn, acadoWorkspace.objValueOut );
|
||||
acado_evaluateLSQ( acadoWorkspace.objValueIn, acadoWorkspace.objValueOut, TR );
|
||||
acadoWorkspace.Dy[runObj * 4] = acadoWorkspace.objValueOut[0];
|
||||
acadoWorkspace.Dy[runObj * 4 + 1] = acadoWorkspace.objValueOut[1];
|
||||
acadoWorkspace.Dy[runObj * 4 + 2] = acadoWorkspace.objValueOut[2];
|
||||
@@ -235,7 +235,7 @@ acadoWorkspace.objValueIn[1] = acadoVariables.x[61];
|
||||
acadoWorkspace.objValueIn[2] = acadoVariables.x[62];
|
||||
acadoWorkspace.objValueIn[3] = acadoVariables.od[40];
|
||||
acadoWorkspace.objValueIn[4] = acadoVariables.od[41];
|
||||
acado_evaluateLSQEndTerm( acadoWorkspace.objValueIn, acadoWorkspace.objValueOut );
|
||||
acado_evaluateLSQEndTerm( acadoWorkspace.objValueIn, acadoWorkspace.objValueOut, TR );
|
||||
|
||||
acadoWorkspace.DyN[0] = acadoWorkspace.objValueOut[0];
|
||||
acadoWorkspace.DyN[1] = acadoWorkspace.objValueOut[1];
|
||||
@@ -4589,12 +4589,12 @@ acado_multEDu( &(acadoWorkspace.E[ 624 ]), &(acadoWorkspace.x[ 21 ]), &(acadoVar
|
||||
acado_multEDu( &(acadoWorkspace.E[ 627 ]), &(acadoWorkspace.x[ 22 ]), &(acadoVariables.x[ 60 ]) );
|
||||
}
|
||||
|
||||
int acado_preparationStep( )
|
||||
int acado_preparationStep( double TR )
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = acado_modelSimulation();
|
||||
acado_evaluateObjective( );
|
||||
acado_evaluateObjective( TR );
|
||||
acado_condensePrep( );
|
||||
return ret;
|
||||
}
|
||||
@@ -4726,7 +4726,7 @@ kkt += fabs(acadoWorkspace.ubA[index] * prd);
|
||||
return kkt;
|
||||
}
|
||||
|
||||
real_t acado_getObjective( )
|
||||
real_t acado_getObjective( TR )
|
||||
{
|
||||
real_t objVal;
|
||||
|
||||
@@ -4746,7 +4746,7 @@ acadoWorkspace.objValueIn[3] = acadoVariables.u[lRun1];
|
||||
acadoWorkspace.objValueIn[4] = acadoVariables.od[lRun1 * 2];
|
||||
acadoWorkspace.objValueIn[5] = acadoVariables.od[lRun1 * 2 + 1];
|
||||
|
||||
acado_evaluateLSQ( acadoWorkspace.objValueIn, acadoWorkspace.objValueOut );
|
||||
acado_evaluateLSQ( acadoWorkspace.objValueIn, acadoWorkspace.objValueOut, TR );
|
||||
acadoWorkspace.Dy[lRun1 * 4] = acadoWorkspace.objValueOut[0] - acadoVariables.y[lRun1 * 4];
|
||||
acadoWorkspace.Dy[lRun1 * 4 + 1] = acadoWorkspace.objValueOut[1] - acadoVariables.y[lRun1 * 4 + 1];
|
||||
acadoWorkspace.Dy[lRun1 * 4 + 2] = acadoWorkspace.objValueOut[2] - acadoVariables.y[lRun1 * 4 + 2];
|
||||
@@ -4757,7 +4757,7 @@ acadoWorkspace.objValueIn[1] = acadoVariables.x[61];
|
||||
acadoWorkspace.objValueIn[2] = acadoVariables.x[62];
|
||||
acadoWorkspace.objValueIn[3] = acadoVariables.od[40];
|
||||
acadoWorkspace.objValueIn[4] = acadoVariables.od[41];
|
||||
acado_evaluateLSQEndTerm( acadoWorkspace.objValueIn, acadoWorkspace.objValueOut );
|
||||
acado_evaluateLSQEndTerm( acadoWorkspace.objValueIn, acadoWorkspace.objValueOut, TR );
|
||||
acadoWorkspace.DyN[0] = acadoWorkspace.objValueOut[0] - acadoVariables.yN[0];
|
||||
acadoWorkspace.DyN[1] = acadoWorkspace.objValueOut[1] - acadoVariables.yN[1];
|
||||
acadoWorkspace.DyN[2] = acadoWorkspace.objValueOut[2] - acadoVariables.yN[2];
|
||||
|
||||
@@ -29,8 +29,9 @@ def _get_libmpc(mpc_id):
|
||||
|
||||
void init(double ttcCost, double distanceCost, double accelerationCost, double jerkCost);
|
||||
void init_with_simulation(double v_ego, double x_l, double v_l, double a_l, double l);
|
||||
void change_tr(double ttcCost, double distanceCost, double accelerationCost, double jerkCost);
|
||||
int run_mpc(state_t * x0, log_t * solution,
|
||||
double l, double a_l_0);
|
||||
double l, double a_l_0, double TR);
|
||||
""")
|
||||
|
||||
return (ffi, ffi.dlopen(libmpc_fn))
|
||||
|
||||
@@ -68,6 +68,25 @@ void init(double ttcCost, double distanceCost, double accelerationCost, double j
|
||||
|
||||
}
|
||||
|
||||
void change_tr(double ttcCost, double distanceCost, double accelerationCost, double jerkCost){
|
||||
int i;
|
||||
const int STEP_MULTIPLIER = 3;
|
||||
|
||||
for (i = 0; i < N; i++) {
|
||||
int f = 1;
|
||||
if (i > 4){
|
||||
f = STEP_MULTIPLIER;
|
||||
}
|
||||
acadoVariables.W[16 * i + 0] = ttcCost * f; // exponential cost for time-to-collision (ttc)
|
||||
acadoVariables.W[16 * i + 5] = distanceCost * f; // desired distance
|
||||
acadoVariables.W[16 * i + 10] = accelerationCost * f; // acceleration
|
||||
acadoVariables.W[16 * i + 15] = jerkCost * f; // jerk
|
||||
}
|
||||
acadoVariables.WN[0] = ttcCost * STEP_MULTIPLIER; // exponential cost for danger zone
|
||||
acadoVariables.WN[4] = distanceCost * STEP_MULTIPLIER; // desired distance
|
||||
acadoVariables.WN[8] = accelerationCost * STEP_MULTIPLIER; // acceleration
|
||||
}
|
||||
|
||||
void init_with_simulation(double v_ego, double x_l_0, double v_l_0, double a_l_0, double l){
|
||||
int i;
|
||||
|
||||
@@ -112,7 +131,7 @@ void init_with_simulation(double v_ego, double x_l_0, double v_l_0, double a_l_0
|
||||
for (i = 0; i < NYN; ++i) acadoVariables.yN[ i ] = 0.0;
|
||||
}
|
||||
|
||||
int run_mpc(state_t * x0, log_t * solution, double l, double a_l_0){
|
||||
int run_mpc(state_t * x0, log_t * solution, double l, double a_l_0, double TR){
|
||||
// Calculate lead vehicle predictions
|
||||
int i;
|
||||
double t = 0.;
|
||||
@@ -152,7 +171,7 @@ int run_mpc(state_t * x0, log_t * solution, double l, double a_l_0){
|
||||
acadoVariables.x[1] = acadoVariables.x0[1] = x0->v_ego;
|
||||
acadoVariables.x[2] = acadoVariables.x0[2] = x0->a_ego;
|
||||
|
||||
acado_preparationStep();
|
||||
acado_preparationStep(TR);
|
||||
acado_feedbackStep();
|
||||
|
||||
for (i = 0; i <= N; i++){
|
||||
@@ -164,7 +183,7 @@ int run_mpc(state_t * x0, log_t * solution, double l, double a_l_0){
|
||||
solution->j_ego[i] = acadoVariables.u[i];
|
||||
}
|
||||
}
|
||||
solution->cost = acado_getObjective();
|
||||
solution->cost = acado_getObjective(TR);
|
||||
|
||||
// Dont shift states here. Current solution is closer to next timestep than if
|
||||
// we shift by 0.2 seconds.
|
||||
|
||||
@@ -62,6 +62,13 @@ class PathPlanner():
|
||||
self.lane_change_ll_prob = 1.0
|
||||
self.prev_one_blinker = False
|
||||
|
||||
# dp
|
||||
self.dragon_auto_lc_allowed = False
|
||||
self.dragon_auto_lc_timer = None
|
||||
self.dragon_auto_lc_delay = 2.
|
||||
self.dp_continuous_auto_lc = False
|
||||
self.dp_did_auto_lc = False
|
||||
|
||||
def setup_mpc(self):
|
||||
self.libmpc = libmpc_py.libmpc
|
||||
self.libmpc.init(MPC_COST_LAT.PATH, MPC_COST_LAT.LANE, MPC_COST_LAT.HEADING, self.steer_rate_cost)
|
||||
@@ -99,7 +106,7 @@ class PathPlanner():
|
||||
|
||||
# Lane change logic
|
||||
one_blinker = sm['carState'].leftBlinker != sm['carState'].rightBlinker
|
||||
below_lane_change_speed = v_ego < LANE_CHANGE_SPEED_MIN
|
||||
below_lane_change_speed = v_ego < (sm['dragonConf'].dpAssistedLcMinMph * CV.MPH_TO_MS)
|
||||
|
||||
if sm['carState'].leftBlinker:
|
||||
self.lane_change_direction = LaneChangeDirection.left
|
||||
@@ -119,6 +126,34 @@ class PathPlanner():
|
||||
|
||||
lane_change_prob = self.LP.l_lane_change_prob + self.LP.r_lane_change_prob
|
||||
|
||||
# dp alc
|
||||
cur_time = sec_since_boot()
|
||||
if not below_lane_change_speed and sm['dragonConf'].dpAutoLc and v_ego >= (sm['dragonConf'].dpAutoLcMinMph * CV.MPH_TO_MS):
|
||||
# we allow auto lc when speed reached dragon_auto_lc_min_mph
|
||||
self.dragon_auto_lc_allowed = True
|
||||
else:
|
||||
# if too slow, we reset all the variables
|
||||
self.dragon_auto_lc_allowed = False
|
||||
self.dragon_auto_lc_timer = None
|
||||
|
||||
# disable auto lc when continuous is off and already did auto lc once
|
||||
if self.dragon_auto_lc_allowed and not sm['dragonConf'].dpAutoLcCont and self.dp_did_auto_lc:
|
||||
self.dragon_auto_lc_allowed = False
|
||||
|
||||
if self.dragon_auto_lc_allowed:
|
||||
if self.dragon_auto_lc_timer is None:
|
||||
# we only set timer when in preLaneChange state, dragon_auto_lc_delay delay
|
||||
if self.lane_change_state == LaneChangeState.preLaneChange:
|
||||
self.dragon_auto_lc_timer = cur_time + sm['dragonConf'].dpAutoLcDelay
|
||||
elif cur_time >= self.dragon_auto_lc_timer:
|
||||
# if timer is up, we set torque_applied to True to fake user input
|
||||
torque_applied = True
|
||||
self.dp_did_auto_lc = True
|
||||
|
||||
# we reset the timers when torque is applied regardless
|
||||
if torque_applied:
|
||||
self.dragon_auto_lc_timer = None
|
||||
|
||||
# State transitions
|
||||
# off
|
||||
if self.lane_change_state == LaneChangeState.off and one_blinker and not self.prev_one_blinker and not below_lane_change_speed:
|
||||
@@ -149,11 +184,17 @@ class PathPlanner():
|
||||
elif self.lane_change_ll_prob > 0.99:
|
||||
self.lane_change_state = LaneChangeState.off
|
||||
|
||||
# dp when finishing, we reset timer to none.
|
||||
self.dragon_auto_lc_timer = None
|
||||
|
||||
if self.lane_change_state in [LaneChangeState.off, LaneChangeState.preLaneChange]:
|
||||
self.lane_change_timer = 0.0
|
||||
else:
|
||||
self.lane_change_timer += DT_MDL
|
||||
|
||||
if self.prev_one_blinker and not one_blinker:
|
||||
self.dp_did_auto_lc = False
|
||||
|
||||
self.prev_one_blinker = one_blinker
|
||||
|
||||
desire = DESIRES[self.lane_change_direction][self.lane_change_state]
|
||||
@@ -202,7 +243,7 @@ class PathPlanner():
|
||||
plan_solution_valid = self.solution_invalid_cnt < 2
|
||||
|
||||
plan_send = messaging.new_message('pathPlan')
|
||||
plan_send.valid = sm.all_alive_and_valid(service_list=['carState', 'controlsState', 'liveParameters', 'model'])
|
||||
plan_send.valid = sm.all_alive_and_valid(service_list=['carState', 'controlsState', 'liveParameters', 'model', 'dragonConf'])
|
||||
plan_send.pathPlan.laneWidth = float(self.LP.lane_width)
|
||||
plan_send.pathPlan.dPoly = [float(x) for x in self.LP.d_poly]
|
||||
plan_send.pathPlan.lPoly = [float(x) for x in self.LP.l_poly]
|
||||
@@ -219,6 +260,7 @@ class PathPlanner():
|
||||
plan_send.pathPlan.desire = desire
|
||||
plan_send.pathPlan.laneChangeState = self.lane_change_state
|
||||
plan_send.pathPlan.laneChangeDirection = self.lane_change_direction
|
||||
plan_send.pathPlan.dpALCAllowed = self.dragon_auto_lc_allowed
|
||||
|
||||
pm.send('pathPlan', plan_send)
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ def apply_deadzone(error, deadzone):
|
||||
error = 0.
|
||||
return error
|
||||
|
||||
class PIController():
|
||||
class PIController:
|
||||
def __init__(self, k_p, k_i, k_f=1., pos_limit=None, neg_limit=None, rate=100, sat_limit=0.8, convert=None):
|
||||
self._k_p = k_p # proportional gain
|
||||
self._k_i = k_i # integral gain
|
||||
@@ -86,3 +86,101 @@ class PIController():
|
||||
|
||||
self.control = clip(control, self.neg_limit, self.pos_limit)
|
||||
return self.control
|
||||
|
||||
|
||||
class PIDController:
|
||||
def __init__(self, k_p, k_i, k_d, k_f=1., pos_limit=None, neg_limit=None, rate=100, sat_limit=0.8, convert=None):
|
||||
self.enable_long_derivative = False
|
||||
self._k_p = k_p # proportional gain
|
||||
self._k_i = k_i # integral gain
|
||||
self._k_d = k_d # derivative gain
|
||||
self.k_f = k_f # feedforward gain
|
||||
|
||||
self.max_accel_d = 0.22352 # 0.5 mph/s
|
||||
|
||||
self.pos_limit = pos_limit
|
||||
self.neg_limit = neg_limit
|
||||
|
||||
self.sat_count_rate = 1.0 / rate
|
||||
self.i_unwind_rate = 0.3 / rate
|
||||
self.rate = 1.0 / rate
|
||||
self.sat_limit = sat_limit
|
||||
self.convert = convert
|
||||
|
||||
self.reset()
|
||||
|
||||
@property
|
||||
def k_p(self):
|
||||
return interp(self.speed, self._k_p[0], self._k_p[1])
|
||||
|
||||
@property
|
||||
def k_i(self):
|
||||
return interp(self.speed, self._k_i[0], self._k_i[1])
|
||||
|
||||
@property
|
||||
def k_d(self):
|
||||
return interp(self.speed, self._k_d[0], self._k_d[1])
|
||||
|
||||
def _check_saturation(self, control, check_saturation, error):
|
||||
saturated = (control < self.neg_limit) or (control > self.pos_limit)
|
||||
|
||||
if saturated and check_saturation and abs(error) > 0.1:
|
||||
self.sat_count += self.sat_count_rate
|
||||
else:
|
||||
self.sat_count -= self.sat_count_rate
|
||||
|
||||
self.sat_count = clip(self.sat_count, 0.0, 1.0)
|
||||
|
||||
return self.sat_count > self.sat_limit
|
||||
|
||||
def reset(self):
|
||||
self.p = 0.0
|
||||
self.id = 0.0
|
||||
self.f = 0.0
|
||||
self.sat_count = 0.0
|
||||
self.saturated = False
|
||||
self.control = 0
|
||||
self.last_setpoint = 0.0
|
||||
self.last_error = 0.0
|
||||
|
||||
def update(self, setpoint, measurement, speed=0.0, check_saturation=True, override=False, feedforward=0., deadzone=0., freeze_integrator=False):
|
||||
self.speed = speed
|
||||
|
||||
error = float(apply_deadzone(setpoint - measurement, deadzone))
|
||||
|
||||
self.p = error * self.k_p
|
||||
self.f = feedforward * self.k_f
|
||||
|
||||
if override:
|
||||
self.id -= self.i_unwind_rate * float(np.sign(self.id))
|
||||
else:
|
||||
i = self.id + error * self.k_i * self.rate
|
||||
control = self.p + self.f + i
|
||||
|
||||
if self.convert is not None:
|
||||
control = self.convert(control, speed=self.speed)
|
||||
|
||||
# Update when changing i will move the control away from the limits
|
||||
# or when i will move towards the sign of the error
|
||||
if ((error >= 0 and (control <= self.pos_limit or i < 0.0)) or \
|
||||
(error <= 0 and (control >= self.neg_limit or i > 0.0))) and \
|
||||
not freeze_integrator:
|
||||
self.id = i
|
||||
|
||||
if self.enable_long_derivative:
|
||||
if abs(setpoint - self.last_setpoint) / self.rate < self.max_accel_d: # if setpoint isn't changing much
|
||||
d = self.k_d * (error - self.last_error)
|
||||
if (self.id > 0 and self.id + d >= 0) or (self.id < 0 and self.id + d <= 0): # if changing integral doesn't make it cross zero
|
||||
self.id += d
|
||||
|
||||
control = self.p + self.f + self.id
|
||||
if self.convert is not None:
|
||||
control = self.convert(control, speed=self.speed)
|
||||
|
||||
self.saturated = self._check_saturation(control, check_saturation, error)
|
||||
|
||||
self.last_setpoint = float(setpoint)
|
||||
self.last_error = float(error)
|
||||
|
||||
self.control = clip(control, self.neg_limit, self.pos_limit)
|
||||
return self.control
|
||||
@@ -39,6 +39,43 @@ _A_TOTAL_MAX_BP = [20., 40.]
|
||||
# 75th percentile
|
||||
SPEED_PERCENTILE_IDX = 7
|
||||
|
||||
# dp
|
||||
DP_OFF = 0
|
||||
DP_ECO = 1
|
||||
DP_NORMAL = 2
|
||||
DP_SPORT = 3
|
||||
# accel profile by @arne182
|
||||
_DP_CRUISE_MIN_V = [-2.0, -1.5, -1.0, -0.7, -0.5]
|
||||
_DP_CRUISE_MIN_V_ECO = [-1.0, -0.7, -0.6, -0.5, -0.3]
|
||||
_DP_CRUISE_MIN_V_SPORT = [-3.0, -2.6, -2.3, -2.0, -1.0]
|
||||
_DP_CRUISE_MIN_V_FOLLOWING = [-4.0, -4.0, -3.5, -2.5, -2.0]
|
||||
_DP_CRUISE_MIN_BP = [0.0, 5.0, 10.0, 20.0, 55.0]
|
||||
|
||||
_DP_CRUISE_MAX_V = [2.0, 2.0, 1.5, .5, .3]
|
||||
_DP_CRUISE_MAX_V_ECO = [0.8, 0.9, 1.0, 0.4, 0.2]
|
||||
_DP_CRUISE_MAX_V_SPORT = [3.0, 3.5, 3.0, 2.0, 2.0]
|
||||
_DP_CRUISE_MAX_V_FOLLOWING = [1.6, 1.4, 1.4, .7, .3]
|
||||
_DP_CRUISE_MAX_BP = [0., 5., 10., 20., 55.]
|
||||
|
||||
# Lookup table for turns
|
||||
_DP_TOTAL_MAX_V = [3.3, 3.0, 3.9]
|
||||
_DP_TOTAL_MAX_BP = [0., 25., 55.]
|
||||
|
||||
def dp_calc_cruise_accel_limits(v_ego, following, dp_profile):
|
||||
if following:
|
||||
a_cruise_min = interp(v_ego, _DP_CRUISE_MIN_BP, _DP_CRUISE_MIN_V_FOLLOWING)
|
||||
a_cruise_max = interp(v_ego, _DP_CRUISE_MAX_BP, _DP_CRUISE_MAX_V_FOLLOWING)
|
||||
else:
|
||||
if dp_profile == DP_ECO:
|
||||
a_cruise_min = interp(v_ego, _DP_CRUISE_MIN_BP, _DP_CRUISE_MIN_V_ECO)
|
||||
a_cruise_max = interp(v_ego, _DP_CRUISE_MAX_BP, _DP_CRUISE_MAX_V_ECO)
|
||||
elif dp_profile == DP_SPORT:
|
||||
a_cruise_min = interp(v_ego, _DP_CRUISE_MIN_BP, _DP_CRUISE_MIN_V_SPORT)
|
||||
a_cruise_max = interp(v_ego, _DP_CRUISE_MAX_BP, _DP_CRUISE_MAX_V_SPORT)
|
||||
else:
|
||||
a_cruise_min = interp(v_ego, _DP_CRUISE_MIN_BP, _DP_CRUISE_MIN_V)
|
||||
a_cruise_max = interp(v_ego, _DP_CRUISE_MAX_BP, _DP_CRUISE_MAX_V)
|
||||
return np.vstack([a_cruise_min, a_cruise_max])
|
||||
|
||||
def calc_cruise_accel_limits(v_ego, following):
|
||||
a_cruise_min = interp(v_ego, _A_CRUISE_MIN_BP, _A_CRUISE_MIN_V)
|
||||
@@ -86,9 +123,20 @@ class Planner():
|
||||
self.params = Params()
|
||||
self.first_loop = True
|
||||
|
||||
# dp
|
||||
self.dp_profile = DP_OFF
|
||||
# dp - slow on curve from 0.7.6.1
|
||||
self.dp_slow_on_curve = False
|
||||
self.v_model = 0.0
|
||||
self.a_model = 0.0
|
||||
|
||||
def choose_solution(self, v_cruise_setpoint, enabled):
|
||||
if enabled:
|
||||
solutions = {'cruise': self.v_cruise}
|
||||
# dp - slow on curve from 0.7.6.1
|
||||
if self.dp_slow_on_curve:
|
||||
solutions = {'model': self.v_model, 'cruise': self.v_cruise}
|
||||
else:
|
||||
solutions = {'cruise': self.v_cruise}
|
||||
if self.mpc1.prev_lead_status:
|
||||
solutions['mpc1'] = self.mpc1.v_mpc
|
||||
if self.mpc2.prev_lead_status:
|
||||
@@ -107,6 +155,10 @@ class Planner():
|
||||
elif slowest == 'cruise':
|
||||
self.v_acc = self.v_cruise
|
||||
self.a_acc = self.a_cruise
|
||||
# dp - slow on curve from 0.7.6.1
|
||||
elif self.dp_slow_on_curve and slowest == 'model':
|
||||
self.v_acc = self.v_model
|
||||
self.a_acc = self.a_model
|
||||
|
||||
self.v_acc_future = min([self.mpc1.v_mpc_future, self.mpc2.v_mpc_future, v_cruise_setpoint])
|
||||
|
||||
@@ -128,9 +180,36 @@ class Planner():
|
||||
enabled = (long_control_state == LongCtrlState.pid) or (long_control_state == LongCtrlState.stopping)
|
||||
following = lead_1.status and lead_1.dRel < 45.0 and lead_1.vLeadK > v_ego and lead_1.aLeadK > 0.0
|
||||
|
||||
# dp
|
||||
self.dp_profile = sm['dragonConf'].dpAccelProfile
|
||||
self.dp_slow_on_curve = sm['dragonConf'].dpSlowOnCurve
|
||||
|
||||
# dp - slow on curve from 0.7.6.1
|
||||
if self.dp_slow_on_curve and len(sm['model'].path.poly):
|
||||
path = list(sm['model'].path.poly)
|
||||
|
||||
# Curvature of polynomial https://en.wikipedia.org/wiki/Curvature#Curvature_of_the_graph_of_a_function
|
||||
# y = a x^3 + b x^2 + c x + d, y' = 3 a x^2 + 2 b x + c, y'' = 6 a x + 2 b
|
||||
# k = y'' / (1 + y'^2)^1.5
|
||||
# TODO: compute max speed without using a list of points and without numpy
|
||||
y_p = 3 * path[0] * self.path_x**2 + 2 * path[1] * self.path_x + path[2]
|
||||
y_pp = 6 * path[0] * self.path_x + 2 * path[1]
|
||||
curv = y_pp / (1. + y_p**2)**1.5
|
||||
|
||||
a_y_max = 2.975 - v_ego * 0.0375 # ~1.85 @ 75mph, ~2.6 @ 25mph
|
||||
v_curvature = np.sqrt(a_y_max / np.clip(np.abs(curv), 1e-4, None))
|
||||
model_speed = np.min(v_curvature)
|
||||
model_speed = max(20.0 * CV.MPH_TO_MS, model_speed) # Don't slow down below 20mph
|
||||
else:
|
||||
model_speed = MAX_SPEED
|
||||
|
||||
# Calculate speed for normal cruise control
|
||||
if enabled and not self.first_loop:
|
||||
accel_limits = [float(x) for x in calc_cruise_accel_limits(v_ego, following)]
|
||||
pedal_pressed = sm['carState'].gasPressed or sm['carState'].brakePressed
|
||||
if enabled and not self.first_loop and not pedal_pressed:
|
||||
if self.dp_profile == DP_OFF:
|
||||
accel_limits = [float(x) for x in calc_cruise_accel_limits(v_ego, following)]
|
||||
else:
|
||||
accel_limits = [float(x) for x in dp_calc_cruise_accel_limits(v_ego, following, self.dp_profile)]
|
||||
jerk_limits = [min(-0.1, accel_limits[0]), max(0.1, accel_limits[1])] # TODO: make a separate lookup for jerk tuning
|
||||
accel_limits_turns = limit_accel_in_turns(v_ego, sm['carState'].steeringAngle, accel_limits, self.CP)
|
||||
|
||||
@@ -144,6 +223,12 @@ class Planner():
|
||||
accel_limits_turns[1], accel_limits_turns[0],
|
||||
jerk_limits[1], jerk_limits[0],
|
||||
LON_MPC_STEP)
|
||||
# dp - slow on curve from 0.7.6.1
|
||||
if self.dp_slow_on_curve:
|
||||
self.v_model, self.a_model = speed_smoother(self.v_acc_start, self.a_acc_start,
|
||||
model_speed, 2*accel_limits[1],
|
||||
accel_limits[0], 2*jerk_limits[1], jerk_limits[0],
|
||||
LON_MPC_STEP)
|
||||
|
||||
# cruise speed can't be negative even is user is distracted
|
||||
self.v_cruise = max(self.v_cruise, 0.)
|
||||
|
||||
@@ -16,6 +16,7 @@ import numpy as np
|
||||
from numpy.linalg import solve
|
||||
from typing import Tuple
|
||||
from cereal import car
|
||||
from common.params import Params
|
||||
|
||||
|
||||
class VehicleModel:
|
||||
@@ -34,13 +35,17 @@ class VehicleModel:
|
||||
|
||||
self.cF_orig = CP.tireStiffnessFront
|
||||
self.cR_orig = CP.tireStiffnessRear
|
||||
# dp
|
||||
self.sR_orig = CP.steerRatio
|
||||
self.dp_sr_learner = Params().get('dp_sr_learner') == b'1'
|
||||
|
||||
self.update_params(1.0, CP.steerRatio)
|
||||
|
||||
def update_params(self, stiffness_factor: float, steer_ratio: float) -> None:
|
||||
"""Update the vehicle model with a new stiffness factor and steer ratio"""
|
||||
self.cF = stiffness_factor * self.cF_orig
|
||||
self.cR = stiffness_factor * self.cR_orig
|
||||
self.sR = steer_ratio
|
||||
self.sR = steer_ratio if self.dp_sr_learner else self.sR_orig
|
||||
|
||||
def steady_state_sol(self, sa: float, u: float) -> np.ndarray:
|
||||
"""Returns the steady state solution.
|
||||
|
||||
@@ -27,7 +27,7 @@ def plannerd_thread(sm=None, pm=None):
|
||||
VM = VehicleModel(CP)
|
||||
|
||||
if sm is None:
|
||||
sm = messaging.SubMaster(['carState', 'controlsState', 'radarState', 'model', 'liveParameters'])
|
||||
sm = messaging.SubMaster(['carState', 'controlsState', 'radarState', 'model', 'liveParameters', 'dragonConf'])
|
||||
|
||||
if pm is None:
|
||||
pm = messaging.PubMaster(['plan', 'liveLongitudinalMpc', 'pathPlan', 'liveMpc'])
|
||||
@@ -37,6 +37,9 @@ def plannerd_thread(sm=None, pm=None):
|
||||
sm['liveParameters'].steerRatio = CP.steerRatio
|
||||
sm['liveParameters'].stiffnessFactor = 1.0
|
||||
|
||||
sm['dragonConf'].dpSlowOnCurve = False
|
||||
sm['dragonConf'].dpAccelProfile = 0
|
||||
|
||||
while True:
|
||||
sm.update()
|
||||
|
||||
|
||||
+38
-3
@@ -3,7 +3,13 @@ import os
|
||||
import sys
|
||||
import threading
|
||||
import capnp
|
||||
from selfdrive.version import version, dirty
|
||||
from datetime import datetime
|
||||
import traceback
|
||||
from selfdrive.version import version, dirty, origin, branch
|
||||
from common.params import Params
|
||||
import requests
|
||||
from common.dp_common import is_online
|
||||
CRASHES_DIR = '/sdcard/crash_logs/'
|
||||
|
||||
from selfdrive.swaglog import cloudlog
|
||||
from common.android import ANDROID
|
||||
@@ -23,18 +29,47 @@ if os.getenv("NOLOG") or os.getenv("NOCRASH") or not ANDROID:
|
||||
else:
|
||||
from raven import Client
|
||||
from raven.transport.http import HTTPTransport
|
||||
client = Client('https://1994756b5e6f41cf939a4c65de45f4f2:cefebaf3a8aa40d182609785f7189bd7@app.getsentry.com/77924',
|
||||
install_sys_hook=False, transport=HTTPTransport, release=version, tags={'dirty': dirty})
|
||||
params = Params()
|
||||
try:
|
||||
dongle_id = params.get("DongleId").decode('utf8')
|
||||
except AttributeError:
|
||||
dongle_id = "None"
|
||||
try:
|
||||
ip = requests.get('https://checkip.amazonaws.com/', timeout=3).text.strip() if is_online() else '255.255.255.255'
|
||||
except:
|
||||
ip = "255.255.255.255"
|
||||
error_tags = {'dirty': dirty, 'username': dongle_id, 'dongle_id': dongle_id, 'branch': branch, 'remote': origin}
|
||||
|
||||
client = Client('http://7107f046f45b4b4f9b277d0684bc9281@sentry.dragonpilot.cn:9000/2',
|
||||
install_sys_hook=False, transport=HTTPTransport, release=version, tags=error_tags)
|
||||
|
||||
def capture_exception(*args, **kwargs):
|
||||
save_exception(traceback.format_exc())
|
||||
exc_info = sys.exc_info()
|
||||
if not exc_info[0] is capnp.lib.capnp.KjException:
|
||||
client.captureException(*args, **kwargs)
|
||||
cloudlog.error("crash", exc_info=kwargs.get('exc_info', 1))
|
||||
|
||||
# dp - from @ShaneSmiskol, save log into local directory
|
||||
def save_exception(exc_text):
|
||||
if not os.path.exists(CRASHES_DIR):
|
||||
os.mkdir(CRASHES_DIR)
|
||||
log_file = '{}/{}'.format(CRASHES_DIR, datetime.now().strftime('%Y-%m-%d--%H-%M-%S.%f.log')[:-3])
|
||||
with open(log_file, 'w') as f:
|
||||
f.write(exc_text)
|
||||
print('Logged current crash to {}'.format(log_file))
|
||||
|
||||
def bind_user(**kwargs):
|
||||
client.user_context(kwargs)
|
||||
|
||||
def capture_warning(warning_string):
|
||||
bind_user(id=dongle_id, ip_address=ip)
|
||||
client.captureMessage(warning_string, level='warning')
|
||||
|
||||
def capture_info(info_string):
|
||||
bind_user(id=dongle_id, ip_address=ip)
|
||||
client.captureMessage(info_string, level='info')
|
||||
|
||||
def bind_extra(**kwargs):
|
||||
client.extra_context(kwargs)
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2019-, Rick Lan, dragonpilot community, and a number of other of contributors.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
@@ -0,0 +1,451 @@
|
||||
#!/usr/bin/env python3.7
|
||||
import time
|
||||
import subprocess
|
||||
import cereal
|
||||
import cereal.messaging as messaging
|
||||
ThermalStatus = cereal.log.ThermalData.ThermalStatus
|
||||
from selfdrive.swaglog import cloudlog
|
||||
from common.params import Params, put_nonblocking
|
||||
params = Params()
|
||||
from math import floor
|
||||
import re
|
||||
import os
|
||||
from common.dp_common import is_online
|
||||
from common.dp_conf import get_struct_name
|
||||
from common.realtime import sec_since_boot
|
||||
|
||||
is_online = is_online()
|
||||
auto_update = params.get("dp_app_auto_update", encoding='utf8') == "1"
|
||||
|
||||
class App():
|
||||
|
||||
# app type
|
||||
TYPE_GPS = 0
|
||||
TYPE_SERVICE = 1
|
||||
TYPE_FULLSCREEN = 2
|
||||
TYPE_UTIL = 3
|
||||
|
||||
# manual switch stats
|
||||
MANUAL_OFF = -1
|
||||
MANUAL_IDLE = 0
|
||||
MANUAL_ON = 1
|
||||
|
||||
def appops_set(self, package, op, mode):
|
||||
self.system(f"LD_LIBRARY_PATH= appops set {package} {op} {mode}")
|
||||
|
||||
def pm_grant(self, package, permission):
|
||||
self.system(f"pm grant {package} {permission}")
|
||||
|
||||
def set_package_permissions(self):
|
||||
if self.permissions is not None:
|
||||
for permission in self.permissions:
|
||||
self.pm_grant(self.app, permission)
|
||||
if self.opts is not None:
|
||||
for opt in self.opts:
|
||||
self.appops_set(self.app, opt, "allow")
|
||||
|
||||
def __init__(self, app, activity, enable_param, auto_run_param, manual_ctrl_param, app_type, permissions, opts):
|
||||
self.app = app
|
||||
# main activity
|
||||
self.activity = activity
|
||||
# read enable param
|
||||
self.enable_struct = get_struct_name(enable_param) if enable_param is not None else None
|
||||
# read auto run param
|
||||
self.auto_run_struct = get_struct_name(auto_run_param) if auto_run_param is not None else None
|
||||
# read manual run param
|
||||
self.manual_ctrl_param = manual_ctrl_param if manual_ctrl_param is not None else None
|
||||
self.manual_ctrl_struct = get_struct_name(manual_ctrl_param) if manual_ctrl_param is not None else None
|
||||
# if it's a service app, we do not kill if device is too hot
|
||||
self.app_type = app_type
|
||||
# app permissions
|
||||
self.permissions = permissions
|
||||
# app options
|
||||
self.opts = opts
|
||||
|
||||
self.own_apk = "/sdcard/apks/" + self.app + ".apk"
|
||||
self.has_own_apk = os.path.exists(self.own_apk)
|
||||
self.is_installed = False
|
||||
self.is_enabled = False
|
||||
self.last_is_enabled = False
|
||||
self.is_auto_runnable = False
|
||||
self.is_running = False
|
||||
self.manual_ctrl_status = self.MANUAL_IDLE
|
||||
self.manually_ctrled = False
|
||||
self.init = False
|
||||
|
||||
def get_remote_version(self):
|
||||
apk = self.app + ".apk"
|
||||
try:
|
||||
url = "https://raw.githubusercontent.com/dragonpilot-community/apps/%s/VERSION" % apk
|
||||
return subprocess.check_output(["curl", "-H", "'Cache-Control: no-cache'", "-s", url]).decode('utf8').rstrip()
|
||||
except subprocess.CalledProcessError as e:
|
||||
pass
|
||||
return None
|
||||
|
||||
def uninstall_app(self):
|
||||
try:
|
||||
local_version = self.get_local_version()
|
||||
if local_version is not None:
|
||||
subprocess.check_output(["pm","uninstall", self.app])
|
||||
self.is_installed = False
|
||||
except subprocess.CalledProcessError as e:
|
||||
pass
|
||||
|
||||
def update_app(self):
|
||||
put_nonblocking('dp_is_updating', '1')
|
||||
if self.has_own_apk:
|
||||
try:
|
||||
subprocess.check_output(["pm","install","-r",self.own_apk])
|
||||
self.is_installed = True
|
||||
except subprocess.CalledProcessError as e:
|
||||
self.is_installed = False
|
||||
else:
|
||||
apk = self.app + ".apk"
|
||||
apk_path = "/sdcard/" + apk
|
||||
try:
|
||||
os.remove(apk_path)
|
||||
except (OSError, FileNotFoundError) as e:
|
||||
pass
|
||||
|
||||
self.uninstall_app()
|
||||
# if local_version is not None:
|
||||
# try:
|
||||
# subprocess.check_output(["pm","uninstall", self.app], stderr=subprocess.STDOUT, shell=True)
|
||||
# except subprocess.CalledProcessError as e:
|
||||
# pass
|
||||
try:
|
||||
url = "https://raw.githubusercontent.com/dragonpilot-community/apps/%s/%s" % (apk, apk)
|
||||
subprocess.check_output(["curl","-o", apk_path,"-LJO", url])
|
||||
subprocess.check_output(["pm","install","-r",apk_path])
|
||||
self.is_installed = True
|
||||
except subprocess.CalledProcessError as e:
|
||||
self.is_installed = False
|
||||
try:
|
||||
os.remove(apk_path)
|
||||
except (OSError, FileNotFoundError) as e:
|
||||
pass
|
||||
put_nonblocking('dp_is_updating', '0')
|
||||
|
||||
def get_local_version(self):
|
||||
try:
|
||||
result = subprocess.check_output(["dumpsys", "package", self.app, "|", "grep", "versionName"], encoding='utf8')
|
||||
if len(result) > 12:
|
||||
return re.findall(r"versionName=(.*)", result)[0]
|
||||
except (subprocess.CalledProcessError, IndexError) as e:
|
||||
pass
|
||||
return None
|
||||
|
||||
def init_vars(self, dragonconf):
|
||||
self.is_enabled = getattr(dragonconf, self.enable_struct)
|
||||
|
||||
if self.is_enabled:
|
||||
local_version = self.get_local_version()
|
||||
if local_version is not None:
|
||||
self.is_installed = True
|
||||
|
||||
if self.has_own_apk and not self.is_installed:
|
||||
self.update_app()
|
||||
|
||||
elif is_online:
|
||||
if local_version is None:
|
||||
self.update_app()
|
||||
else:
|
||||
remote_version = self.get_remote_version() if auto_update else local_version
|
||||
if remote_version is not None and local_version != remote_version:
|
||||
self.update_app()
|
||||
if self.is_installed:
|
||||
self.set_package_permissions()
|
||||
else:
|
||||
self.uninstall_app()
|
||||
|
||||
if self.manual_ctrl_param is not None and getattr(dragonconf, self.manual_ctrl_struct) != self.MANUAL_IDLE:
|
||||
put_nonblocking(self.manual_ctrl_param, str(self.MANUAL_IDLE))
|
||||
self.init = True
|
||||
|
||||
def read_params(self, dragonconf):
|
||||
if not self.init:
|
||||
self.init_vars(dragonconf)
|
||||
|
||||
self.last_is_enabled = self.is_enabled
|
||||
self.is_enabled = False if self.enable_struct is None else getattr(dragonconf, self.enable_struct)
|
||||
|
||||
if self.is_installed:
|
||||
if self.is_enabled:
|
||||
# a service app should run automatically and not manual controllable.
|
||||
if self.app_type in [App.TYPE_SERVICE]:
|
||||
self.is_auto_runnable = True
|
||||
self.manual_ctrl_status = self.MANUAL_IDLE
|
||||
else:
|
||||
self.manual_ctrl_status = self.MANUAL_IDLE if self.manual_ctrl_param is None else getattr(dragonconf, self.manual_ctrl_struct)
|
||||
if self.manual_ctrl_status == self.MANUAL_IDLE:
|
||||
self.is_auto_runnable = False if self.auto_run_struct is None else getattr(dragonconf, self.auto_run_struct)
|
||||
else:
|
||||
if self.last_is_enabled:
|
||||
self.uninstall_app()
|
||||
self.is_auto_runnable = False
|
||||
self.manual_ctrl_status = self.MANUAL_IDLE
|
||||
self.manually_ctrled = False
|
||||
else:
|
||||
if not self.last_is_enabled and self.is_enabled:
|
||||
self.update_app()
|
||||
|
||||
def run(self, force = False):
|
||||
if self.is_installed and (force or self.is_enabled):
|
||||
# app is manually ctrl, we record that
|
||||
if self.manual_ctrl_param is not None and self.manual_ctrl_status == self.MANUAL_ON:
|
||||
put_nonblocking(self.manual_ctrl_param, '0')
|
||||
put_nonblocking('dp_last_modified', str(floor(time.time())))
|
||||
self.manually_ctrled = True
|
||||
self.is_running = False
|
||||
|
||||
# only run app if it's not running
|
||||
if force or not self.is_running:
|
||||
self.system("pm enable %s" % self.app)
|
||||
|
||||
if self.app_type == self.TYPE_SERVICE:
|
||||
self.appops_set(self.app, "android:mock_location", "allow")
|
||||
|
||||
if self.app_type in [self.TYPE_SERVICE]:
|
||||
self.system("am startservice %s/%s" % (self.app, self.activity))
|
||||
else:
|
||||
self.system("am start -n %s/%s" % (self.app, self.activity))
|
||||
self.is_running = True
|
||||
|
||||
def kill(self, force = False):
|
||||
if self.is_installed and (force or self.is_enabled):
|
||||
# app is manually ctrl, we record that
|
||||
if self.manual_ctrl_param is not None and self.manual_ctrl_status == self.MANUAL_OFF:
|
||||
put_nonblocking(self.manual_ctrl_param, '0')
|
||||
self.manually_ctrled = True
|
||||
self.is_running = True
|
||||
|
||||
# only kill app if it's running
|
||||
if force or self.is_running:
|
||||
if self.app_type == self.TYPE_SERVICE:
|
||||
self.appops_set(self.app, "android:mock_location", "deny")
|
||||
|
||||
self.system("pkill %s" % self.app)
|
||||
self.is_running = False
|
||||
|
||||
def system(self, cmd):
|
||||
try:
|
||||
subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
cloudlog.event("running failed",
|
||||
cmd=e.cmd,
|
||||
output=e.output[-1024:],
|
||||
returncode=e.returncode)
|
||||
|
||||
def init_apps(apps):
|
||||
apps.append(App(
|
||||
"cn.dragonpilot.gpsservice",
|
||||
"cn.dragonpilot.gpsservice.MainService",
|
||||
"dp_app_ext_gps",
|
||||
None,
|
||||
None,
|
||||
App.TYPE_SERVICE,
|
||||
[],
|
||||
[],
|
||||
))
|
||||
apps.append(App(
|
||||
"com.mixplorer",
|
||||
"com.mixplorer.activities.BrowseActivity",
|
||||
"dp_app_mixplorer",
|
||||
None,
|
||||
"dp_app_mixplorer_manual",
|
||||
App.TYPE_UTIL,
|
||||
[
|
||||
"android.permission.READ_EXTERNAL_STORAGE",
|
||||
"android.permission.WRITE_EXTERNAL_STORAGE",
|
||||
],
|
||||
[],
|
||||
))
|
||||
apps.append(App(
|
||||
"com.tomtom.speedcams.android.map",
|
||||
"com.tomtom.speedcams.android.activities.SpeedCamActivity",
|
||||
"dp_app_tomtom",
|
||||
"dp_app_tomtom_auto",
|
||||
"dp_app_tomtom_manual",
|
||||
App.TYPE_GPS,
|
||||
[
|
||||
"android.permission.ACCESS_FINE_LOCATION",
|
||||
"android.permission.ACCESS_COARSE_LOCATION",
|
||||
"android.permission.READ_EXTERNAL_STORAGE",
|
||||
"android.permission.WRITE_EXTERNAL_STORAGE",
|
||||
],
|
||||
[
|
||||
"SYSTEM_ALERT_WINDOW",
|
||||
]
|
||||
))
|
||||
apps.append(App(
|
||||
"tw.com.ainvest.outpack",
|
||||
"tw.com.ainvest.outpack.ui.MainActivity",
|
||||
"dp_app_aegis",
|
||||
"dp_app_aegis_auto",
|
||||
"dp_app_aegis_manual",
|
||||
App.TYPE_GPS,
|
||||
[
|
||||
"android.permission.ACCESS_FINE_LOCATION",
|
||||
"android.permission.READ_EXTERNAL_STORAGE",
|
||||
"android.permission.WRITE_EXTERNAL_STORAGE",
|
||||
],
|
||||
[
|
||||
"SYSTEM_ALERT_WINDOW",
|
||||
]
|
||||
))
|
||||
apps.append(App(
|
||||
"com.autonavi.amapauto",
|
||||
"com.autonavi.amapauto.MainMapActivity",
|
||||
"dp_app_autonavi",
|
||||
"dp_app_autonavi_auto",
|
||||
"dp_app_autonavi_manual",
|
||||
App.TYPE_GPS,
|
||||
[
|
||||
"android.permission.ACCESS_FINE_LOCATION",
|
||||
"android.permission.ACCESS_COARSE_LOCATION",
|
||||
"android.permission.READ_EXTERNAL_STORAGE",
|
||||
"android.permission.WRITE_EXTERNAL_STORAGE",
|
||||
],
|
||||
[
|
||||
"SYSTEM_ALERT_WINDOW",
|
||||
]
|
||||
))
|
||||
apps.append(App(
|
||||
"com.waze",
|
||||
"com.waze.MainActivity",
|
||||
"dp_app_waze",
|
||||
None,
|
||||
"dp_app_waze_manual",
|
||||
App.TYPE_FULLSCREEN,
|
||||
[
|
||||
"android.permission.ACCESS_FINE_LOCATION",
|
||||
"android.permission.ACCESS_COARSE_LOCATION",
|
||||
"android.permission.READ_EXTERNAL_STORAGE",
|
||||
"android.permission.WRITE_EXTERNAL_STORAGE",
|
||||
"android.permission.RECORD_AUDIO",
|
||||
],
|
||||
[],
|
||||
))
|
||||
|
||||
def main():
|
||||
apps = []
|
||||
|
||||
last_started = False
|
||||
sm = messaging.SubMaster(['dragonConf'])
|
||||
|
||||
frame = 0
|
||||
start_delay = None
|
||||
stop_delay = None
|
||||
allow_auto_run = True
|
||||
|
||||
last_overheat = False
|
||||
init_done = False
|
||||
dragon_conf_msg = None
|
||||
|
||||
while 1: #has_enabled_apps:
|
||||
start_sec = sec_since_boot()
|
||||
if not init_done:
|
||||
if frame >= 10:
|
||||
init_apps(apps)
|
||||
sm.update()
|
||||
dragon_conf_msg = sm['dragonConf']
|
||||
init_done = True
|
||||
else:
|
||||
sm.update(1000)
|
||||
if sm.updated['dragonConf']:
|
||||
dragon_conf_msg = sm['dragonConf']
|
||||
else:
|
||||
continue
|
||||
enabled_apps = []
|
||||
has_fullscreen_apps = False
|
||||
for app in apps:
|
||||
# read params loop
|
||||
app.read_params(dragon_conf_msg)
|
||||
if app.last_is_enabled and not app.is_enabled and app.is_running:
|
||||
app.kill(True)
|
||||
|
||||
if app.is_enabled:
|
||||
if not has_fullscreen_apps and app.app_type == App.TYPE_FULLSCREEN:
|
||||
has_fullscreen_apps = True
|
||||
|
||||
# process manual ctrl apps
|
||||
if app.manual_ctrl_status != App.MANUAL_IDLE:
|
||||
app.run(True) if app.manual_ctrl_status == App.MANUAL_ON else app.kill(True)
|
||||
|
||||
enabled_apps.append(app)
|
||||
|
||||
started = dragon_conf_msg.dpThermalStarted
|
||||
# when car is running
|
||||
if started:
|
||||
# we run service apps and kill all util apps
|
||||
# only run once
|
||||
if last_started != started:
|
||||
for app in enabled_apps:
|
||||
if app.app_type in [App.TYPE_SERVICE]:
|
||||
app.run()
|
||||
elif app.app_type == App.TYPE_UTIL:
|
||||
app.kill()
|
||||
|
||||
stop_delay = None
|
||||
# apps start 5 secs later
|
||||
if start_delay is None:
|
||||
start_delay = frame + 5
|
||||
|
||||
if not dragon_conf_msg.dpThermalOverheat:
|
||||
allow_auto_run = True
|
||||
# when temp reduce from red to yellow, we add start up delay as well
|
||||
# so apps will not start up immediately
|
||||
if last_overheat:
|
||||
start_delay = frame + 60
|
||||
else:
|
||||
allow_auto_run = False
|
||||
last_overheat = dragon_conf_msg.dpThermalOverheat
|
||||
|
||||
# only run apps that's not manually ctrled
|
||||
for app in enabled_apps:
|
||||
if not app.manually_ctrled:
|
||||
if has_fullscreen_apps:
|
||||
if app.app_type == App.TYPE_FULLSCREEN:
|
||||
app.run()
|
||||
elif app.app_type in [App.TYPE_GPS, App.TYPE_UTIL]:
|
||||
app.kill()
|
||||
else:
|
||||
if not allow_auto_run:
|
||||
app.kill()
|
||||
else:
|
||||
if frame >= start_delay and app.is_auto_runnable and app.app_type == App.TYPE_GPS:
|
||||
app.run()
|
||||
# when car is stopped
|
||||
else:
|
||||
start_delay = None
|
||||
# set delay to 30 seconds
|
||||
if stop_delay is None:
|
||||
stop_delay = frame + 30
|
||||
|
||||
for app in enabled_apps:
|
||||
if app.is_running and not app.manually_ctrled:
|
||||
if has_fullscreen_apps or frame >= stop_delay:
|
||||
app.kill()
|
||||
|
||||
if last_started != started:
|
||||
for app in enabled_apps:
|
||||
app.manually_ctrled = False
|
||||
|
||||
last_started = started
|
||||
frame += 1
|
||||
sleep = 1 - (sec_since_boot() - start_sec)
|
||||
if sleep > 0:
|
||||
time.sleep(sleep)
|
||||
|
||||
def system(cmd):
|
||||
try:
|
||||
cloudlog.info("running %s" % cmd)
|
||||
subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
cloudlog.event("running failed",
|
||||
cmd=e.cmd,
|
||||
output=e.output[-1024:],
|
||||
returncode=e.returncode)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,271 @@
|
||||
#!/usr/bin/env python3
|
||||
'''
|
||||
This is a service that broadcast dp config values to openpilot's messaging queues
|
||||
'''
|
||||
import cereal.messaging as messaging
|
||||
import time
|
||||
import datetime
|
||||
from common.dp_conf import confs, get_struct_name, to_param_val, to_struct_val
|
||||
from common.params import Params, put_nonblocking
|
||||
import subprocess
|
||||
import re
|
||||
import os
|
||||
from common.android import getprop
|
||||
from selfdrive.thermald.power_monitoring import set_battery_charging, get_battery_charging
|
||||
from math import floor
|
||||
params = Params()
|
||||
from common.realtime import sec_since_boot
|
||||
|
||||
DASHCAM_VIDEOS_PATH = '/sdcard/dashcam/'
|
||||
DASHCAM_DURATION = 180 # max is 180
|
||||
DASHCAM_BIT_RATES = 4000000 # max is 4000000
|
||||
DASHCAM_MAX_SIZE_PER_FILE = DASHCAM_BIT_RATES/8*DASHCAM_DURATION # 4Mbps / 8 * 180 = 90MB per 180 seconds
|
||||
DASHCAM_FREESPACE_LIMIT = 0.15 # we start cleaning up footage when freespace is below 15%
|
||||
DASHCAM_KEPT = DASHCAM_MAX_SIZE_PER_FILE * 240 # 12 hrs of video = 21GB
|
||||
|
||||
def confd_thread():
|
||||
sm = messaging.SubMaster(['thermal'])
|
||||
pm = messaging.PubMaster(['dragonConf'])
|
||||
last_dp_msg = None
|
||||
last_modified = None
|
||||
update_params = False
|
||||
frame = 0
|
||||
locale = getprop("persist.sys.locale").rstrip('\n')
|
||||
|
||||
last_autoshutdown = False
|
||||
last_sec = None
|
||||
autoshutdown_frame = 0
|
||||
|
||||
last_charging_ctrl = False
|
||||
last_started = False
|
||||
|
||||
dashcam_next_frame = 0
|
||||
dashcam_folder_exists = False
|
||||
dashcam_mkdir_retry = 0
|
||||
|
||||
# thermal
|
||||
started = False
|
||||
free_space = 0.
|
||||
online = False
|
||||
battery_percent = 0.
|
||||
overheat = False
|
||||
|
||||
while True:
|
||||
start_sec = sec_since_boot()
|
||||
if frame % 6 == 0:
|
||||
sm.update()
|
||||
if sm.updated['thermal']:
|
||||
started = sm['thermal'].started
|
||||
free_space = sm['thermal'].freeSpace
|
||||
online = sm['thermal'].usbOnline
|
||||
battery_percent = sm['thermal'].batteryPercent
|
||||
overheat = sm['thermal'].thermalStatus >= 2
|
||||
|
||||
msg = messaging.new_message('dragonConf')
|
||||
if last_dp_msg is not None:
|
||||
msg.dragonConf = last_dp_msg
|
||||
|
||||
'''
|
||||
===================================================
|
||||
force update when start status changed
|
||||
===================================================
|
||||
'''
|
||||
if last_started != started:
|
||||
update_params = True
|
||||
'''
|
||||
===================================================
|
||||
we only need to check last_modified every 3 seconds
|
||||
if val is modified, we then proceed to read params
|
||||
===================================================
|
||||
'''
|
||||
if not update_params and frame % 6 == 0:
|
||||
try:
|
||||
modified = params.get('dp_last_modified', encoding='utf8').rstrip('\x00')
|
||||
except AttributeError:
|
||||
modified = str(floor(time.time()))
|
||||
if last_modified != modified:
|
||||
update_params = True
|
||||
last_modified = modified
|
||||
'''
|
||||
===================================================
|
||||
push param vals to message
|
||||
===================================================
|
||||
'''
|
||||
if update_params:
|
||||
for conf in confs:
|
||||
conf_type = conf.get('conf_type')
|
||||
if 'param' in conf_type and 'struct' in conf_type:
|
||||
update_this_conf = True
|
||||
|
||||
update_once = conf.get('update_once')
|
||||
if update_once is not None and update_once is True and frame > 0:
|
||||
update_this_conf = False
|
||||
|
||||
if frame > 0 and update_this_conf:
|
||||
dependencies = conf.get('depends')
|
||||
# if has dependency and the depend param val is not in depend_vals, we dont update that conf val
|
||||
# this should reduce chance of reading all params
|
||||
if dependencies is not None:
|
||||
for dependency in dependencies:
|
||||
if getattr(msg.dragonConf, get_struct_name(dependency['name'])) not in dependency['vals']:
|
||||
update_this_conf = False
|
||||
|
||||
if update_this_conf:
|
||||
val = params.get(conf['name'], encoding='utf8')
|
||||
if val is not None:
|
||||
val = val.rstrip('\x00')
|
||||
struct_val = to_struct_val(conf['name'], val)
|
||||
orig_val = struct_val
|
||||
if conf.get('min') is not None:
|
||||
struct_val = max(struct_val, conf.get('min'))
|
||||
if conf.get('max') is not None:
|
||||
struct_val = min(struct_val, conf.get('max'))
|
||||
if orig_val != struct_val:
|
||||
params.put(conf['name'], str(struct_val))
|
||||
setattr(msg.dragonConf, get_struct_name(conf['name']), struct_val)
|
||||
'''
|
||||
===================================================
|
||||
push ip addr every 10 secs to message
|
||||
===================================================
|
||||
'''
|
||||
if frame % 20 == 0:
|
||||
val = 'N/A'
|
||||
try:
|
||||
result = subprocess.check_output(["ifconfig", "wlan0"], encoding='utf8')
|
||||
val = re.findall(r"inet addr:((\d+\.){3}\d+)", result)[0][0]
|
||||
except:
|
||||
pass
|
||||
msg.dragonConf.dpIpAddr = val
|
||||
'''
|
||||
===================================================
|
||||
push is_updating status every 5 secs to message
|
||||
===================================================
|
||||
'''
|
||||
if frame % 10 == 0:
|
||||
val = params.get('dp_is_updating', encoding='utf8').rstrip('\x00')
|
||||
setattr(msg.dragonConf, get_struct_name('dp_is_updating'), to_struct_val('dp_is_updating', val))
|
||||
'''
|
||||
===================================================
|
||||
push once
|
||||
===================================================
|
||||
'''
|
||||
if frame == 0:
|
||||
setattr(msg.dragonConf, get_struct_name('dp_locale'), locale)
|
||||
put_nonblocking('dp_is_updating', '0')
|
||||
'''
|
||||
===================================================
|
||||
we can have some logic here
|
||||
===================================================
|
||||
'''
|
||||
if msg.dragonConf.dpAssistedLcMinMph > msg.dragonConf.dpAutoLcMinMph:
|
||||
put_nonblocking('dp_auto_lc_min_mph', str(msg.dragonConf.dpAssistedLcMinMph))
|
||||
msg.dragonConf.dpAutoLcMinMph = msg.dragonConf.dpAssistedLcMinMph
|
||||
if msg.dragonConf.dpAtl:
|
||||
msg.dragonConf.dpAllowGas = True
|
||||
msg.dragonConf.dpDynamicFollow = 0
|
||||
msg.dragonConf.dpAccelProfile = 0
|
||||
msg.dragonConf.dpGearCheck = False
|
||||
if msg.dragonConf.dpAppWaze:
|
||||
msg.dragonConf.dpDrivingUi = False
|
||||
if not msg.dragonConf.dpDriverMonitor:
|
||||
msg.dragonConf.dpUiFace = False
|
||||
|
||||
msg.dragonConf.dpThermalStarted = started
|
||||
msg.dragonConf.dpThermalOverheat = overheat
|
||||
'''
|
||||
===================================================
|
||||
publish msg
|
||||
===================================================
|
||||
'''
|
||||
last_dp_msg = msg.dragonConf
|
||||
update_params = False
|
||||
pm.send('dragonConf', msg)
|
||||
'''
|
||||
===================================================
|
||||
hotspot on boot
|
||||
we do it after 30 secs just in case
|
||||
===================================================
|
||||
'''
|
||||
if frame == 60 and params.get("dp_hotspot_on_boot") == b'1':
|
||||
os.system("service call wifi 37 i32 0 i32 1 &")
|
||||
'''
|
||||
===================================================
|
||||
dashcam
|
||||
===================================================
|
||||
'''
|
||||
dashcam = msg.dragonConf.dpDashcam
|
||||
if frame % 2 == 0 and dashcam:
|
||||
while not dashcam_folder_exists and dashcam_mkdir_retry <= 5:
|
||||
try:
|
||||
if not os.path.exists(DASHCAM_VIDEOS_PATH):
|
||||
os.makedirs(DASHCAM_VIDEOS_PATH)
|
||||
else:
|
||||
dashcam_folder_exists = True
|
||||
except OSError:
|
||||
pass
|
||||
dashcam_mkdir_retry += 1
|
||||
if dashcam_folder_exists:
|
||||
if started:
|
||||
if frame >= dashcam_next_frame - 2:
|
||||
now = datetime.datetime.now()
|
||||
file_name = now.strftime("%Y-%m-%d_%H-%M-%S")
|
||||
os.system("screenrecord --bit-rate %s --time-limit %s %s%s.mp4 &" % (DASHCAM_BIT_RATES, DASHCAM_DURATION, DASHCAM_VIDEOS_PATH, file_name))
|
||||
dashcam_next_frame = frame + DASHCAM_DURATION*2
|
||||
else:
|
||||
dashcam_next_frame = 0
|
||||
|
||||
if frame % 120 == 0 and ((free_space < DASHCAM_FREESPACE_LIMIT) or (get_used_spaces() > DASHCAM_KEPT)):
|
||||
try:
|
||||
files = [f for f in sorted(os.listdir(DASHCAM_VIDEOS_PATH)) if os.path.isfile(DASHCAM_VIDEOS_PATH + f)]
|
||||
os.system("rm -fr %s &" % (DASHCAM_VIDEOS_PATH + files[0]))
|
||||
except (IndexError, FileNotFoundError, OSError):
|
||||
pass
|
||||
'''
|
||||
===================================================
|
||||
auto shutdown
|
||||
===================================================
|
||||
'''
|
||||
autoshutdown = msg.dragonConf.dpAutoShutdown
|
||||
if frame % 20 == 0 and autoshutdown:
|
||||
sec = msg.dragonConf.dpAutoShutdownIn * 60 * 2
|
||||
if last_autoshutdown != autoshutdown or last_sec != sec or started or online:
|
||||
autoshutdown_frame = frame + sec
|
||||
if not started and not online and sec > 0 and frame >= autoshutdown_frame:
|
||||
os.system('LD_LIBRARY_PATH="" svc power shutdown')
|
||||
last_sec = sec
|
||||
last_autoshutdown = autoshutdown
|
||||
'''
|
||||
===================================================
|
||||
battery ctrl every 30 secs
|
||||
PowerMonitor in thermald turns back on every mins
|
||||
so lets turn it off more frequent
|
||||
===================================================
|
||||
'''
|
||||
charging_ctrl = msg.dragonConf.dpChargingCtrl
|
||||
if last_charging_ctrl != charging_ctrl:
|
||||
set_battery_charging(True)
|
||||
if charging_ctrl and frame % 60 == 0:
|
||||
if battery_percent >= msg.dragonConf.dpDischargingAt and get_battery_charging():
|
||||
set_battery_charging(False)
|
||||
elif battery_percent <= msg.dragonConf.dpChargingAt and not get_battery_charging():
|
||||
set_battery_charging(True)
|
||||
last_charging_ctrl = charging_ctrl
|
||||
'''
|
||||
===================================================
|
||||
make it 2 hz
|
||||
===================================================
|
||||
'''
|
||||
last_started = started
|
||||
frame += 1
|
||||
sleep = 0.5-(sec_since_boot() - start_sec)
|
||||
if sleep > 0:
|
||||
time.sleep(sleep)
|
||||
|
||||
def get_used_spaces():
|
||||
return sum(os.path.getsize(DASHCAM_VIDEOS_PATH + f) for f in os.listdir(DASHCAM_VIDEOS_PATH) if os.path.isfile(DASHCAM_VIDEOS_PATH + f))
|
||||
|
||||
def main():
|
||||
confd_thread()
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user