Compare commits

...

9 Commits

Author SHA1 Message Date
Rick Lan ee55f21e68 fix hash 2020-11-10 16:40:47 +10:00
Rick Lan 8e6d33b2f8 update ota/recovery url 2020-11-10 12:38:24 +10:00
Rick Lan 704843bda9 update sentry 2020-09-23 15:07:23 +10:00
Rick Lan 50ea09ae59 add 2018 skoda kodiaq fp 2020-07-03 11:35:47 +10:00
Rick Lan c991f68bd7 dragonpilot 0.7.5.4
========================
* Removed Steering monitor timer adjustment in code (timer in settings will no longer work.)
* Updated Dynamic Follow model. (Special Thanks to @ShaneSmiskol for the feature and @cgw1968 for testing)
2020-06-22 11:50:30 +10:00
Rick Lan 0286285ec9 dragonpilot 0.7.5.3
========================
* Updated Dynamic Follow to ShaneSmiskol:stock_additions 0.7.5. (Special Thanks to @ShaneSmiskol for the feature and @Wei for testing)
* Optimize Lexus GSH steering. (Thanks to @簡銘佑)
* C2 to support auto shutdown "DragonAutoShutDownAt" param. (Thanks to @cgw1968)
* Fixed issue showing "pedalPressed" error. (Thanks to @Wei)
* Added brake indicator to dp infobar.
* Fixed "Temp monitor" indicator.
* Added delay config to "Disable Lat Control on Blinker". (Thanks to @wabes)
* Added Brazil 2020 Corolla Hybrid FPv2. (Thanks to @berno22)
2020-05-31 16:36:15 +10:00
Rick Lan 4b13bc6850 dragonpilot 0.7.5.2
========================
* Added support to VW MQB/PQ platform. (Thanks to @dingliangxue)
* Updated to stop charging after 3 hrs. (Thanks to @Wei)
* Removed Impact Detection in Dashcam.
* Fixed a bug caused by enabling "Noctua Mod". (Thanks to @阿濤)
* 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 @阿濤)
* Fixed setting page crash issue. (Thanks to @salmankhan, @Wei)
* Fixed issue that keep showing update prompt. (Thanks to @Sky Chang)
2020-05-25 22:29:03 +10:00
Rick Lan 8502b57831 * Added Upload Over Mobile Network toggle.
* Added Upload Over Hotspot toggle.
* Added Canada 2018 Toyota Sienna LTD fingerprint (v1). (Thanks to 明峰)
* Added China Volkswagen Golf GTI fingerprint (v1). (Thanks to easyeiji)
* Added DragonMaxSpeedLimit parameter (mph), op will stop controlling when car speed is high than the value. (Thanks to @Anthony)
* Updated appd to use cnpmjs to download APKs.
* Fixed Update Service. (Thanks to @Wei)
* Added Canada 2018 Toyota Sienna LTD fingerprint (v2). (Thanks to 明峰)
* Fixed acceleration issue
* Added missing param init value
2020-05-19 23:00:20 +10:00
Rick Lan e81e6393e6 dragonpilot v0.7.5 2020-05-13 23:45:27 +10:00
100 changed files with 8911 additions and 643 deletions
+436
View File
@@ -0,0 +1,436 @@
dragonpilot 0.7.5.4
========================
* 加入 2018 skoda kodiaq 指紋v1。(感謝 @Gold 提供)
* Added 2018 skoda kodiaq FPv1. (Thanks to @Gold)
* 移除方向盤監控設定。(無法取消/關閉方向盤監控)
* Removed Steering monitor timer adjustment in code (timer in settings will no longer work.)
* 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] 自動關機改為可調時長。
+195
View File
@@ -0,0 +1,195 @@
dragonpilot 0.7.5
========================
* 移除方向盤監控設定。(無法取消/關閉方向盤監控)
* Removed Steering monitor timer adjustment in code (timer in settings will no longer work.)
* 優化 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 油電版指紋。
+120
View File
@@ -0,0 +1,120 @@
2020-06-22 (0.7.5)
========================
* 移除方向盤監控設定。(無法取消/關閉方向盤監控)
* Removed Steering monitor timer adjustment in code (timer in settings will no longer work.)
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.
+11
View File
@@ -97,6 +97,14 @@ struct CarEvent @0x9b1657f34caf3ad3 {
relayMalfunction @72;
gasPressed @73;
stockFcw @74;
# dp
preLaneChangeLeftALC @75;
preLaneChangeRightALC @76;
laneChangeALC @77;
manualSteeringRequired @78;
manualSteeringRequiredBlinkersOn @79;
leadCarMoving @80;
leadCarDetected @81;
}
}
@@ -157,6 +165,9 @@ struct CarState {
# clutch (manual transmission only)
clutchPressed @28 :Bool;
# dp
lkMode @37 :Bool;
# which packets this state came from
canMonoTimes @12: List(UInt64);
+5
View File
@@ -297,6 +297,8 @@ struct ThermalData {
memUsedPercent @19 :Int8;
cpuPerc @20 :Int8;
ipAddr @25 :Text; # dp
enum ThermalStatus {
green @0; # all processes run
yellow @1; # critical processes run (kill uploader), engage still allowed
@@ -799,6 +801,9 @@ struct PathPlan {
laneChangeState @18 :LaneChangeState;
laneChangeDirection @19 :LaneChangeDirection;
# dragonpilot
alcAllowed @20 :Bool;
enum Desire {
none @0;
turnLeft @1;
+33
View File
@@ -0,0 +1,33 @@
#!/usr/bin/env python3.7
import subprocess
from common.params import Params
params = Params()
def get_last_modified():
return Params().get('DragonLastModified', encoding='utf-8')
def is_online():
return not subprocess.call(["ping", "-W", "4", "-c", "1", "117.28.245.92"])
def common_controller_update():
dragon_lat_ctrl = False if params.get("DragonLatCtrl", encoding='utf8') == "0" else True
if dragon_lat_ctrl:
dragon_enable_steering_on_signal = True if (params.get("DragonEnableSteeringOnSignal", encoding='utf8') == "1" and params.get("LaneChangeEnabled", encoding='utf8') == "0") else False
if dragon_enable_steering_on_signal:
try:
dragon_blinker_off_timer = float(params.get("DragonBlinkerOffTimer", encoding='utf8')) * 100
except (TypeError, ValueError):
dragon_blinker_off_timer = 0
else:
dragon_blinker_off_timer = 0
else:
dragon_enable_steering_on_signal = False
dragon_blinker_off_timer = 0
return dragon_lat_ctrl, dragon_enable_steering_on_signal, dragon_blinker_off_timer
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
+91
View File
@@ -108,6 +108,97 @@ keys = {
"Offroad_PandaFirmwareMismatch": [TxType.CLEAR_ON_MANAGER_START, TxType.CLEAR_ON_PANDA_DISCONNECT],
"Offroad_InvalidTime": [TxType.CLEAR_ON_MANAGER_START],
"Offroad_IsTakingSnapshot": [TxType.CLEAR_ON_MANAGER_START],
#dragonpilot config
"DragonEnableDashcam": [TxType.PERSISTENT],
"DragonEnableAutoShutdown": [TxType.PERSISTENT],
"DragonAutoShutdownAt": [TxType.PERSISTENT],
"DragonEnableSteeringOnSignal": [TxType.PERSISTENT],
"DragonEnableLogger": [TxType.PERSISTENT],
"DragonEnableUploader": [TxType.PERSISTENT],
"DragonNoctuaMode": [TxType.PERSISTENT],
"DragonCacheCar": [TxType.PERSISTENT],
"DragonCachedModel": [TxType.CLEAR_ON_MANAGER_START], # deprecated
"DragonCachedFP": [TxType.CLEAR_ON_MANAGER_START], # deprecated
"DragonCachedVIN": [TxType.CLEAR_ON_MANAGER_START], # deprecated
"DragonCachedCarFW": [TxType.CLEAR_ON_MANAGER_START], # deprecated
"DragonCachedSource": [TxType.CLEAR_ON_MANAGER_START], # deprecated
"DragonAllowGas": [TxType.PERSISTENT],
"DragonToyotaStockDSU": [TxType.PERSISTENT],
"DragonLatCtrl": [TxType.PERSISTENT],
"DragonUISpeed": [TxType.PERSISTENT],
"DragonUIEvent": [TxType.PERSISTENT],
"DragonUIMaxSpeed": [TxType.PERSISTENT],
"DragonUIFace": [TxType.PERSISTENT],
"DragonUIDev": [TxType.PERSISTENT],
"DragonUIDevMini": [TxType.PERSISTENT],
"DragonEnableTomTom": [TxType.PERSISTENT],
"DragonBootTomTom": [TxType.PERSISTENT],
"DragonRunTomTom": [TxType.PERSISTENT],
"DragonEnableAutonavi": [TxType.PERSISTENT],
"DragonBootAutonavi": [TxType.PERSISTENT],
"DragonRunAutonavi": [TxType.PERSISTENT],
"DragonEnableAegis": [TxType.PERSISTENT],
"DragonBootAegis": [TxType.PERSISTENT],
"DragonRunAegis": [TxType.PERSISTENT],
"DragonEnableMixplorer": [TxType.PERSISTENT],
"DragonRunMixplorer": [TxType.PERSISTENT],
"DragonSteeringMonitorTimer": [TxType.PERSISTENT],
"DragonCameraOffset": [TxType.PERSISTENT],
"DragonUIVolumeBoost": [TxType.PERSISTENT],
"DragonGreyPandaMode": [TxType.PERSISTENT],
"DragonDrivingUI": [TxType.PERSISTENT],
"DragonDisplaySteeringLimitAlert": [TxType.PERSISTENT],
"DragonChargingCtrl": [TxType.PERSISTENT],
"DragonCharging": [TxType.PERSISTENT],
"DragonDisCharging": [TxType.PERSISTENT],
"DragonToyotaLaneDepartureWarning": [TxType.PERSISTENT],
"DragonUILane": [TxType.PERSISTENT],
"DragonUILead": [TxType.PERSISTENT],
"DragonUIPath": [TxType.PERSISTENT],
"DragonUIBlinker": [TxType.PERSISTENT],
"DragonUIDMView": [TxType.PERSISTENT],
"DragonEnableDriverMonitoring": [TxType.PERSISTENT],
"DragonCarModel": [TxType.CLEAR_ON_MANAGER_START],
"DragonEnableSlowOnCurve": [TxType.PERSISTENT],
"DragonEnableLeadCarMovingAlert": [TxType.PERSISTENT],
"DragonToyotaSnGMod": [TxType.PERSISTENT],
"DragonWazeMode": [TxType.PERSISTENT],
"DragonRunWaze": [TxType.PERSISTENT],
"DragonEnableAutoLC": [TxType.PERSISTENT],
"DragonAssistedLCMinMPH": [TxType.PERSISTENT],
"DragonAutoLCMinMPH": [TxType.PERSISTENT],
"DragonAutoLCDelay": [TxType.PERSISTENT],
"DragonBTG": [TxType.PERSISTENT],
"DragonBootHotspot": [TxType.PERSISTENT],
"DragonAccelProfile": [TxType.PERSISTENT],
"DragonLastModified": [TxType.CLEAR_ON_MANAGER_START],
"DragonEnableRegistration": [TxType.PERSISTENT],
"DragonDynamicFollow": [TxType.PERSISTENT],
"DragonToyotaSngResponse": [TxType.PERSISTENT],
"DragonEnableGearCheck": [TxType.PERSISTENT],
"DragonEnableTempMonitor": [TxType.PERSISTENT],
"DragonAppAutoUpdate": [TxType.PERSISTENT],
"DragonUpdating": [TxType.CLEAR_ON_MANAGER_START],
"DragonCustomModel": [TxType.PERSISTENT],
"DragonSupportedCars": [TxType.PERSISTENT],
"DragonLocale": [TxType.PERSISTENT],
"DragonUIScreenOffReversing": [TxType.PERSISTENT],
"DragonEnableSRLearner": [TxType.PERSISTENT],
"DragonEnableSteerBoost": [TxType.PERSISTENT],
"DragonSteerBoostMin": [TxType.PERSISTENT],
"DragonSteerBoostMax": [TxType.PERSISTENT],
"DragonSteerBoostMinAt": [TxType.PERSISTENT],
"DragonSteerBoostMaxAt": [TxType.PERSISTENT],
"DragonDashcamHours": [TxType.PERSISTENT],
"DragonUIScreenOffDriving": [TxType.PERSISTENT],
"DragonEnableAutoUpdate": [TxType.PERSISTENT],
"DragonUIBrightness": [TxType.PERSISTENT],
"DragonEnableUploadOnMobile": [TxType.PERSISTENT],
"DragonEnableUploadOnHotspot": [TxType.PERSISTENT],
"DragonMaxSpeedLimit": [TxType.PERSISTENT],
"DragonEnableRating": [TxType.PERSISTENT],
"DragonEnableContALC": [TxType.PERSISTENT],
"DragonBlinkerOffTimer": [TxType.PERSISTENT],
}
+21
View File
@@ -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.
+92
View File
@@ -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.
+372
View File
@@ -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>
+62
View File
@@ -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
+5 -5
View File
@@ -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-7bf9c7c55f0a5dff4aca834d32642cbe1a1a6bf2056f38d64f7aa3575390c9de.zip",
"ota_hash": "7bf9c7c55f0a5dff4aca834d32642cbe1a1a6bf2056f38d64f7aa3575390c9de",
"recovery_url": "http://dpp.cool/neosupdate/recovery-4772f9348e04b560b9df87d6dea6c740fa8d62ea41a8db3842eec216f04e3110.img",
"recovery_len": 15922476,
"recovery_hash": "4772f9348e04b560b9df87d6dea6c740fa8d62ea41a8db3842eec216f04e3110"
}
+1
View File
@@ -66,6 +66,7 @@ function launch {
echo 3 > /proc/irq/6/smp_affinity_list # MDSS
echo 1 > /proc/irq/78/smp_affinity_list # Modem, can potentially lock up
echo 2 > /proc/irq/733/smp_affinity_list # USB
echo 2 > /proc/irq/736/smp_affinity_list # USB
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
+7 -1
View File
@@ -1,5 +1,11 @@
#!/usr/bin/bash
/usr/bin/sh /data/openpilot/scripts/toyota_dsu_mode.sh
if [ -f "/sdcard/dp_patcher.py" ]; then
/data/data/com.termux/files/usr/bin/python /sdcard/dp_patcher.py
fi
getprop persist.sys.locale | tr -d '\n' > /data/params/d/DragonLocale
chmod +x scripts/*.sh
/usr/bin/sh /data/openpilot/dragonpilot/cjk-fonts/installer.sh &
export PASSIVE="0"
exec ./launch_chffrplus.sh
@@ -0,0 +1,46 @@
CM_ "IMPORT _toyota_2017.dbc"
CM_ "IMPORT _comma.dbc"
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,46 @@
CM_ "IMPORT _toyota_2017.dbc"
CM_ "IMPORT _comma.dbc"
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";
+408
View File
@@ -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_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";
+408
View File
@@ -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";
+386 -37
View File
@@ -702,36 +702,58 @@ BO_ 1088 Getriebe_1: 8 XXX
SG_ Status_Getriebe_und_Wandlerschu : 1|1@1+ (1,0) [0|0] "" XXX
SG_ Schaltung_aktiv__Getriebe_1_ : 0|1@1+ (1,0) [0|0] "" XXX
BO_ 912 Gateway_Komfort_1: 6 XXX
SG_ Bremslicht_Anhaenger : 47|1@1+ (1,0) [0|0] "" XXX
SG_ Anhaenger_erkannt_Gateway : 46|1@1+ (1,0) [0|0] "" XXX
SG_ ECD_AAG_unplausibel : 45|1@1+ (1,0) [0|0] "" XXX
SG_ BLS_AAG_unplausibel : 44|1@1+ (1,0) [0|0] "" XXX
SG_ Zaehler_Anhaenger : 40|4@1+ (1,0) [0|15] "" XXX
SG_ Frei_Gateway_Komfort_1_4 : 34|6@1+ (1,0) [0|0] "" XXX
SG_ ECD_ILM_unplausibel : 33|1@1+ (1,0) [0|0] "" XXX
SG_ BLS_ILM_unplausibel : 32|1@1+ (1,0) [0|0] "" XXX
SG_ Bremslicht_mitte_defekt : 31|1@1+ (1,0) [0|0] "" XXX
SG_ Bremslicht_rechts_defekt : 30|1@1+ (1,0) [0|0] "" XXX
SG_ Bremslicht_links_defekt : 29|1@1+ (1,0) [0|0] "" XXX
SG_ Rueckfahrlicht_Gateway : 28|1@1+ (1,0) [0|0] "" XXX
SG_ Zaehler_Bremslicht : 24|4@1+ (1,0) [0|15] "" XXX
SG_ Frei_Gateway_Komfort_1_3 : 17|7@1+ (1,0) [0|0] "" XXX
SG_ Fahrertuerkontakt : 16|1@1+ (1,0) [0|0] "" XXX
SG_ RDK_Systemfehler : 15|1@1+ (1,0) [0|0] "" XXX
SG_ RDK_Warnstufe_1 : 14|1@1+ (1,0) [0|0] "" XXX
SG_ RDK_Warnstufe_2 : 13|1@1+ (1,0) [0|0] "" XXX
SG_ Reifendruckwarnung_Reserverad : 12|1@1+ (1,0) [0|0] "" XXX
SG_ Reifendruckwarnung_hinten_recht : 11|1@1+ (1,0) [0|0] "" XXX
SG_ Reifendruckwarnung_hinten_links : 10|1@1+ (1,0) [0|0] "" XXX
SG_ Reifendruckwarnung_vorn_rechts : 9|1@1+ (1,0) [0|0] "" XXX
SG_ Reifendruckwarnung_vorn_links : 8|1@1+ (1,0) [0|0] "" XXX
SG_ Frei_Gateway_Komfort_1_2 : 5|3@1+ (1,0) [0|0] "" XXX
SG_ Fahrertuerkontakt_veraltet : 4|1@1+ (1,0) [0|0] "" XXX
SG_ Frei_Gateway_Komfort_1_1 : 3|1@1+ (1,0) [0|0] "" XXX
SG_ Licht_1_Botschaft_veraltet : 2|1@1+ (1,0) [0|0] "" XXX
SG_ Anhaenger_Botschaft_veraltet : 1|1@1+ (1,0) [0|0] "" XXX
SG_ Reifendruckwarnung_veraltet : 0|1@1+ (1,0) [0|0] "" XXX
BO_ 912 Gate_Komf_1: 8 XXX
SG_ GK1_Sta_RDK_Warn : 0|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_Sta_Anhaen : 1|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_Sta_Licht1 : 2|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_Sta_Licht3 : 3|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_Sta_Tuerkont : 4|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_Sta_Li_vorn : 5|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_SleepAckn : 7|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_CharismaModus m1 : 8|4@1+ (1,0) [0|15] "" XXX
SG_ GK1_SamFktNr M : 12|4@1+ (1,0) [0|15] "" XXX
SG_ GK1_Fa_Tuerkont : 16|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_RueckfahrSch : 17|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_ELV_verrieg : 18|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_Sta_Kessy_2 : 19|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_Sta_Stdhzg : 20|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_SH_Verbau : 21|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_ParkFrontWi : 22|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_KW_Warm : 23|1@1+ (1,0) [0|1] "" XXX
SG_ BCM_Remotestart_Betrieb : 24|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_Rueckfahr : 28|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_BrLi_links : 29|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_BrLi_rechts : 30|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_BrLi_mitte : 31|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_BLS_ILM : 32|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_EDC_ILM : 33|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_Blinker_li : 34|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_Blinker_re : 35|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_def_P_verr : 36|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_LS1_Fernlicht : 37|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_Sta_Licht2 : 38|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_Sta_LSM : 39|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_Count_Anhaen : 40|4@1+ (1,0) [0|15] "" XXX
SG_ GK1_BLS_AAG : 44|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_EDC_AAG : 45|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_Anhaenger : 46|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_BrLi_Anhaen : 47|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_Abblendlicht : 48|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_Fernlicht : 49|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_Wischer_vorn : 50|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_Sta_ILM_F_1 : 51|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_Abbl_VL_def : 52|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_Abbl_VR_def : 53|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_Blink_Autob : 54|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_Warnblk_Status : 55|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_SH_laeuft : 56|1@1+ (1,0) [0|1] "" XXX
SG_ SH1_ein_Wasserpumpe : 57|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_Nebel_ein : 58|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_Bremslicht : 59|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_Anh_abgesteckt : 60|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_AnhKonLamp : 61|1@1+ (1,0) [0|1] "" XXX
SG_ LDS_Stellung_AFL : 62|1@1+ (1,0) [0|1] "" XXX
SG_ GK1_SH_Zusatzfkt : 63|1@1+ (1,0) [0|1] "" XXX
BO_ 1340 Fahrwerk_1: 1 XXX
SG_ Frei_Fahrwerk_1_2 : 7|1@1+ (1,0) [0|0] "" XXX
@@ -1040,11 +1062,338 @@ BO_ 1324 ADR_1: 8 XXX
SG_ Zaehler_ADR_1 : 8|4@1+ (1,0) [0|15] "" XXX
SG_ Momentenanforderung_ADR : 0|8@1+ (0.39,0) [0|99] "MDI" XXX
BO_ 210 PQ_HCA: 8 XXX
SG_ HCA_Torque : 16|15@1+ (1,0) [0|32767] "" XXX
SG_ UNK_Bit : 34|1@0+ (1,0) [0|1] "" XXX
SG_ HCA_Torque_VZ : 31|1@0+ (1,0) [0|1] "" XXX
SG_ PQ_HCA_BZ : 8|4@1+ (1,0) [0|15] "" XXX
SG_ PQ_HCA_Checksum : 0|4@1+ (1,0) [0|15] "" XXX
BO_ 1550 Einheiten_1: 2 XXX
SG_ MFA_v_Einheit_02 : 0|1@1+ (1,0) [0|1] "" XXX
BO_ 1490 VIN_1: 8 XXX
BO_ 872 ACC_System: 8 XXX
SG_ ACS_Checksum : 0|8@1+ (1,0) [0|255] "" XXX
SG_ ACS_Zaehler : 8|4@1+ (1,0) [0|15] "" XXX
SG_ ACS_Sta_ADR : 12|2@1+ (1,0) [0|3] "" XXX
SG_ ACS_ADR_Schub : 14|1@1+ (1,0) [0|1] "" XXX
SG_ ACS_Schubabsch : 15|1@1+ (1,0) [0|1] "" XXX
SG_ ACS_StSt_Info : 16|2@1+ (1,0) [0|3] "" XXX
SG_ ACS_MomEingriff : 18|1@1+ (1,0) [0|1] "" XXX
SG_ ACS_Typ_ACC : 19|2@1+ (1,0) [0|3] "" XXX
SG_ ACS_FreigSollB : 23|1@1+ (1,0) [0|1] "" XXX
SG_ ACS_Sollbeschl : 24|11@1+ (0.005,-7.22) [-7.22|3.005] "Unit_MeterPerSeconSquar" XXX
SG_ ACS_Anhaltewunsch : 38|1@1+ (1,0) [0|1] "" XXX
SG_ ACS_Fehler : 39|1@1+ (1,0) [0|1] "" XXX
SG_ ACS_zul_Regelabw : 40|8@1+ (1,0.005) [0|1.265] "Unit_MeterPerSeconSquar" XXX
SG_ ACS_max_AendGrad : 48|8@1+ (1,0.02) [0.02|5.06] "Unit_MeterPerSeconSquar" XXX
BO_ 1386 ACC_GRA_Anziege: 8 XXX
SG_ ACA_Checksum : 0|8@1+ (1,0) [0|255] "" XXX
SG_ ACA_StaACC : 8|3@1+ (1,0) [0|7] "" XXX
SG_ ACA_ID_StaACC : 11|5@1+ (1,0) [0|31] "" XXX
SG_ ACA_Fahrerhinw : 16|1@1+ (1,0) [0|1] "" XXX
SG_ ACA_AnzDisplay : 17|1@1+ (1,0) [0|1] "" XXX
SG_ ACA_Zeitluecke : 18|4@1+ (1,0) [0|15] "" XXX
SG_ ACA_V_Wunsch : 24|8@1+ (1,0) [0|255] "Unit_KiloMeterPerHour" XXX
SG_ ACA_kmh_mph : 32|1@1+ (1,0) [0|1] "" XXX
SG_ ACA_Akustik1 : 33|1@1+ (1,0) [0|1] "" XXX
SG_ ACA_Akustik2 : 34|1@1+ (1,0) [0|1] "" XXX
SG_ ACA_PrioDisp : 35|1@1+ (1,0) [0|1] "" XXX
SG_ ACA_gemZeitl : 40|4@1+ (1,0) [0|15] "" XXX
SG_ ACA_ACC_Verz : 44|1@1+ (1,0) [0|1] "" XXX
SG_ ACA_StaGRA : 48|3@1+ (1,0) [0|7] "" XXX
SG_ ACA_ID_StaGRA : 51|5@1+ (1,0) [0|31] "" XXX
SG_ ACA_Codierung : 56|1@1+ (1,0) [0|1] "" XXX
SG_ ACA_Tachokranz : 57|1@1+ (1,0) [0|1] "" XXX
SG_ ACA_Aend_Zeitluecke : 58|1@1+ (1,0) [0|1] "" XXX
SG_ ACA_Zaehler : 60|4@1+ (1,0) [0|15] "" XXX
BO_ 208 Lenkhilfe_3: 8 XXX
SG_ LH3_Checksumme : 0|8@1+ (1,0) [0|255] "" XXX
SG_ LH3_BS_Spiegel : 8|4@1+ (1,0) [0|15] "" XXX
SG_ LH3_Zaehler : 12|4@4+ (1,0) [0|15] "" XXX
SG_ LH3_LM : 16|10@1+ (1,0) [0|1023] "" XXX
SG_ LH3_LMSign : 26|1@1+ (1,0) [0|1] "" XXX
SG_ LH3_LMValid : 27|1@1+ (1,0) [0|1] "" XXX
SG_ LH3_Sta_DSR : 28|4@1+ (1,0) [0|15] "" XXX
SG_ LH3_BLW : 32|12@1+ (0.15,0) [0|615] "" XXX
SG_ LH3_BLWSign : 44|1@1+ (1,0) [0|1] "" XXX
SG_ LH3_BLWValid : 45|1@1+ (1,0) [0|1] "" XXX
SG_ LH3_Lenkungstyp : 46|2@1+ (1,0) [0|3] "" XXX
BO_ 978 Lenkhilfe_2: 8 XXX
SG_ LH2_Checksumme : 0|8@1+ (1,0) [0|255] "" XXX
SG_ LH2_Zaehler : 8|4@1+ (1,0) [0|15] "" XXX
SG_ LH2_Geradeaus : 12|1@1+ (1,0) [0|1] "" XXX
SG_ LH2_Sta_Charisma : 13|3@1+ (1,0) [0|7] "" XXX
SG_ LH2_Sta_HCA : 16|4@1+ (1,0) [0|15] "" XXX
SG_ LH2_Ausg_LW1 : 20|1@1+ (1,0) [0|1] "" XXX
SG_ LH2_Ausg_LW1_gue : 21|1@1+ (1,0) [0|1] "" XXX
SG_ LH2_StatEPS_PLA : 24|4@1+ (1,0) [0|15] "" XXX
SG_ LH2_aktLenkeingriff : 32|8@1+ (1,0) [0|255] "" XXX
SG_ LH2_PLA_Err : 48|4@1+ (1,0) [0|15] "" XXX
SG_ LH2_PLA_Abbr : 52|4@1+ (1,0) [0|15] "" XXX
BO_ 210 HCA_1: 5 XXX
SG_ HCA_Checksumme : 0|8@1+ (1,0) [0|15] "" XXX
SG_ HCA_Zaehler : 8|4@1+ (1,0) [0|15] "" XXX
SG_ HCA_Status : 12|4@1+ (1,0) [0|15] "" XXX
SG_ LM_Offset : 16|15@1+ (0.03125,0) [0|300] "cNm" XXX
SG_ LM_OffSign : 31|1@1+ (1,0) [0|1] "" XXX
SG_ Vib_Freq : 32|4@1+ (4,0) [0|60] "Hz" XXX
SG_ Vib_Amp : 36|4@1+ (0.5,0) [0|7.5] "Nm" XXX
BO_ 1470 LDW_1: 8 XXX
SG_ Right_Lane_Status : 0|2@1+ (1,0) [0|3] "" XXX
SG_ Left_Lane_Status : 2|2@1+ (1,0) [0|3] "" XXX
SG_ LDW_Direction : 14|1@0+ (1,0) [0|1] "" XXX
SG_ SET_ME_X1 : 18|1@0+ (1,0) [0|1] "" XXX
SG_ Kombi_Lamp_Orange : 19|1@0+ (1,0) [0|1] "" XXX
SG_ Kombi_Lamp_Green : 20|1@0+ (1,0) [0|1] "" XXX
SG_ XX_LDW_Maybe_Warning : 16|1@0+ (1,0) [0|1] "" XXX
SG_ XX_DLCORTLC1 : 24|8@1+ (1,0) [0|255] "" XXX
SG_ XX_DLCORTLC2 : 32|8@1+ (1,0) [0|255] "" XXX
BO_ 428 Bremse_8: 8 XXX
SG_ BR8_Checksumme : 0|8@1+ (1,0) [0|255] "" XXX
SG_ BR8_Zaehler : 8|4@1+ (1,0) [0|15] "" XXX
SG_ BR8_Sta_ACC_Anf : 12|1@1+ (1,0) [0|1] "" XXX
SG_ BR8_Verz_EPB_akt : 13|1@1+ (1,0) [0|1] "" XXX
SG_ BR8_Sta_Br_temp : 14|1@1+ (1,0) [0|1] "" XXX
SG_ BR8_Sta_Br_Druck : 15|1@1+ (1,0) [0|1] "" XXX
SG_ BR8_TolAbgl_HL : 16|8@1+ (0.048828125,-6.201171875) [-6.201171875|6.15234375] "Unit_PerCent" XXX
SG_ BR8_TolAbgl_HR : 24|8@1+ (0.048828125,-6.201171875) [-6.201171875|6.15234375] "Unit_PerCent" XXX
SG_ BR8_Istbeschl : 32|9@1+ (0.02,-7.22) [-7.22|2.98] "Unit_MeterPerSeconSquar" XXX
SG_ BR8_Sta_HW_BLS : 41|1@1+ (1,0) [0|1] "" XXX
SG_ BR8_QB_LBeschl : 42|1@1+ (1,0) [0|1] "" XXX
SG_ BR8_ESC_Mode : 43|2@1+ (1,0) [0|3] "" XXX
SG_ BR8_aktBrSyst : 45|1@1+ (1,0) [0|1] "" XXX
SG_ BR8_Fa_bremst : 46|1@1+ (1,0) [0|1] "" XXX
SG_ BR8_StaBrSyst : 47|1@1+ (1,0) [0|1] "" XXX
SG_ BR8_Laengsbeschl : 48|10@1+ (0.03125,-16) [-15.96875|15.9375] "Unit_MeterPerSeconSquar" XXX
SG_ BR8_Sta_ADR_BR : 58|1@1+ (1,0) [0|1] "" XXX
SG_ BR8_Quattro : 59|1@1+ (1,0) [0|1] "" XXX
SG_ BR8_Sta_VerzReg : 60|1@1+ (1,0) [0|1] "" XXX
SG_ BR8_Sta_BLS : 61|1@1+ (1,0) [0|1] "" XXX
SG_ BR8_Verz_EPB : 62|1@1+ (1,0) [0|1] "" XXX
SG_ BR8_Check_EPB : 63|1@1+ (1,0) [0|1] "" XXX
BO_ 928 Bremse_10: 8 XXX
SG_ B10_Checksumme : 0|8@1+ (1,0) [0|255] "" XXX
SG_ B10_Zaehler : 8|4@1+ (1,0) [0|15] "" XXX
SG_ B10_QB_Wegimp_VL : 12|1@1+ (1,0) [0|1] "" XXX
SG_ B10_QB_Wegimp_VR : 13|1@1+ (1,0) [0|1] "" XXX
SG_ B10_QB_Wegimp_HL : 14|1@1+ (1,0) [0|1] "" XXX
SG_ B10_QB_Wegimp_HR : 15|1@1+ (1,0) [0|1] "" XXX
SG_ B10_Wegimp_VL : 16|10@1+ (1,0) [0|1000] "" XXX
SG_ B10_Wegimp_VR : 26|10@1+ (1,0) [0|1000] "" XXX
SG_ B10_Wegimp_HL : 36|10@1+ (1,0) [0|1000] "" XXX
SG_ B10_Wegimp_HR : 46|10@1+ (1,0) [0|1000] "" XXX
SG_ B10_QB_Fahrtr_VL : 56|1@1+ (1,0) [0|1] "" XXX
SG_ B10_QB_Fahrtr_VR : 57|1@1+ (1,0) [0|1] "" XXX
SG_ B10_QB_Fahrtr_HL : 58|1@1+ (1,0) [0|1] "" XXX
SG_ B10_QB_Fahrtr_HR : 59|1@1+ (1,0) [0|1] "" XXX
SG_ B10_Fahrtr_VL : 60|1@1+ (1,0) [0|1] "" XXX
SG_ B10_Fahrtr_VR : 61|1@1+ (1,0) [0|1] "" XXX
SG_ B10_Fahrtr_HL : 62|1@1+ (1,0) [0|1] "" XXX
SG_ B10_Fahrtr_HR : 63|1@1+ (1,0) [0|1] "" XXX
BO_ 835 RDK_Status: 3 XXX
SG_ RKS_Reifen_VL : 0|1@1+ (1,0) [0|1] "" XXX
SG_ RKS_Reifen_VR : 1|1@1+ (1,0) [0|1] "" XXX
SG_ RKS_Reifen_HL : 2|1@1+ (1,0) [0|1] "" XXX
SG_ RKS_Reifen_HR : 3|1@1+ (1,0) [0|1] "" XXX
SG_ RKS_Reifen_RR : 4|1@1+ (1,0) [0|1] "" XXX
SG_ RKS_Warnung_2 : 5|1@1+ (1,0) [0|1] "" XXX
SG_ RKS_Warnung_1 : 6|1@1+ (1,0) [0|1] "" XXX
SG_ RKS_Systemfehler : 7|1@1+ (1,0) [0|1] "" XXX
SG_ RKS_Kalibrier_abgew : 8|1@1+ (1,0) [0|1] "" XXX
SG_ RKS_Druckdiff_Vorn : 9|1@1+ (1,0) [0|1] "" XXX
SG_ RKS_Druckdiff_Hinten : 10|1@1+ (1,0) [0|1] "" XXX
SG_ RKS_Befuellung_RR_low : 11|1@1+ (1,0) [0|1] "" XXX
SG_ RKS_Funkstoerung : 12|1@1+ (1,0) [0|1] "" XXX
SG_ RKS_System_Aus : 13|1@1+ (1,0) [0|1] "" XXX
SG_ RKS_KD_Fehler : 15|1@1+ (1,0) [0|1] "" XXX
SG_ RKS_Lampe : 16|1@1+ (1,0) [0|1] "" XXX
SG_ RKS_Ton : 17|1@1+ (1,0) [0|1] "" XXX
SG_ RKS_Gong : 18|1@1+ (1,0) [0|1] "" XXX
SG_ RKS_RDK_Blinkbit : 19|1@1+ (1,0) [0|1] "" XXX
SG_ RKS_Teillast : 20|1@1+ (1,0) [0|1] "" XXX
BO_ 914 Gate_Komf_2: 8 XXX
SG_ GK2_Sta_LSM : 0|1@1+ (1,0) [0|1] "" XXX
SG_ GK2_Sta_Lichtsensor : 1|1@1+ (1,0) [0|1] "" XXX
SG_ GK2_Sta_Licht1 : 2|1@1+ (1,0) [0|1] "" XXX
SG_ GK2_Sta_VSG : 3|1@1+ (1,0) [0|1] "" XXX
SG_ GK2_Sta_Schluessel : 4|1@1+ (1,0) [0|1] "" XXX
SG_ GK2_Sta_Profil : 5|1@1+ (1,0) [0|1] "" XXX
SG_ GK2_Sta_Clima2 : 6|1@1+ (1,0) [0|1] "" XXX
SG_ GK2_Sta_BSG4 : 7|1@1+ (1,0) [0|1] "" XXX
SG_ GK2_Sta_Kessy_4 : 8|1@1+ (1,0) [0|1] "" XXX
SG_ BS4_Gleitende_Leuchtw_Anf : 9|1@1+ (1,0) [0|1] "" XXX
SG_ BS4_GLW_Fernlicht_Anf : 10|1@1+ (1,0) [0|1] "" XXX
SG_ GK2_Blk_L_Kontrolle : 11|1@1+ (1,0) [0|1] "" XXX
SG_ GK2_Blk_R_Kontrolle : 12|1@1+ (1,0) [0|1] "" XXX
SG_ GK2_LS_KomFehler : 14|1@1+ (1,0) [0|1] "" XXX
SG_ GK2_LS_def : 15|1@1+ (1,0) [0|1] "" XXX
SG_ GK2_Helligkeit : 16|3@1+ (714.286,0) [0|5000.002] "Unit_Lux" XXX
SG_ GK2_VD_zu_ver : 19|1@1+ (1,0) [0|1] "" XXX
SG_ GK2_VD_entriegelt : 20|1@1+ (1,0) [0|1] "" XXX
SG_ GK2_VD_offen_ver : 21|1@1+ (1,0) [0|1] "" XXX
SG_ GK2_Verdeck_Anf : 22|1@1+ (1,0) [0|1] "" XXX
SG_ GK2_VDKD_auf : 23|1@1+ (1,0) [0|1] "" XXX
SG_ GK2_Schluessel : 24|4@1+ (1,0) [0|15] "" XXX
SG_ GK2_Hardtop : 28|1@1+ (1,0) [0|1] "" XXX
SG_ GK2_AFL_Schalter : 29|1@1+ (1,0) [0|1] "" XXX
SG_ GK2_Nebelschluss : 30|1@1+ (1,0) [0|1] "" XXX
SG_ GK2_EM_LIN_ungueltig : 31|1@1+ (1,0) [0|1] "" XXX
SG_ GK2_Profil : 32|4@1+ (1,0) [0|15] "" XXX
SG_ GK2_Kl_StSt_Info : 36|2@1+ (1,0) [0|3] "" XXX
SG_ GK2_BSG_StSt_Info : 38|2@1+ (1,0) [0|3] "" XXX
SG_ GK2_BEM_P_Generator : 40|8@1+ (50,0) [0|12700] "Unit_Watt" XXX
SG_ GK2_BEM_Abschaltstufen : 48|3@1+ (1,0) [0|7] "" XXX
SG_ GK2_BEM_DFM : 51|5@1+ (3.225,0.025) [0.025|100] "Unit_PerCent" XXX
SG_ GK2_Kessy_StSt_Info : 56|2@1+ (1,0) [0|3] "" XXX
SG_ GK2_BEM_StSt_Info : 58|2@1+ (1,0) [0|3] "" XXX
BO_ 1175 Parkhilfe_01: 8 XXX
SG_ PH_Abschaltursache : 13|3@1+ (1,0) [0|7] "" XXX
SG_ PH_Opt_Anzeige_V_ein : 16|1@1+ (1,0) [0|1] "" XXX
SG_ PH_Opt_Anzeige_H_ein : 17|1@1+ (1,0) [0|1] "" XXX
SG_ PH_Opt_Anz_V_Hindernis : 18|1@1+ (1,0) [0|1] "" XXX
SG_ PH_Opt_Anz_H_Hindernis : 19|1@1+ (1,0) [0|1] "" XXX
SG_ PH_Tongeber_V_aktiv : 20|1@1+ (1,0) [0|1] "" XXX
SG_ PH_Tongeber_H_aktiv : 21|1@1+ (1,0) [0|1] "" XXX
SG_ PH_Tongeber_mute : 22|1@1+ (1,0) [0|1] "" XXX
SG_ PH_Anf_Audioabsenkung : 23|1@1+ (1,0) [0|1] "" XXX
SG_ PH_Frequenz_hinten : 32|4@1+ (1,0) [0|15] "" XXX
SG_ PH_Lautstaerke_hinten : 36|4@1+ (1,0) [0|15] "" XXX
SG_ PH_Frequenz_vorn : 40|4@1+ (1,0) [0|15] "" XXX
SG_ PH_Lautstaerke_vorn : 44|4@1+ (1,0) [0|15] "" XXX
SG_ PH_Trigger_Bildaufschaltung : 48|1@1+ (1,0) [0|1] "" XXX
SG_ PH_StartStopp_Info : 49|2@1+ (1,0) [0|3] "" XXX
SG_ PH_Aufbauten_erk : 51|1@1+ (1,0) [0|1] "" XXX
SG_ PH_BerErk_vorn : 52|2@1+ (1,0) [0|3] "" XXX
SG_ PH_BerErk_hinten : 54|2@1+ (1,0) [0|3] "" XXX
SG_ PH_defekt : 56|1@1+ (1,0) [0|1] "" XXX
SG_ PH_gestoert : 57|1@1+ (1,0) [0|1] "" XXX
SG_ PH_Systemzustand : 58|3@1+ (1,0) [0|7] "" XXX
SG_ PH_Display_Kundenwunsch : 61|2@1+ (1,0) [0|3] "" XXX
SG_ PH_KD_Fehler : 63|1@1+ (1,0) [0|1] "" XXX
BO_ 1463 Bremse_11: 8 XXX
SG_ B11_HydHalten : 13|1@1+ (1,0) [0|1] "" XXX
SG_ B11_Br_StSt_Info : 14|2@1+ (1,0) [0|3] "" XXX
SG_ B11_OBD_Nib_VL : 16|4@1+ (1,0) [0|15] "" XXX
SG_ B11_OBD_Nib_VR : 20|4@1+ (1,0) [0|15] "" XXX
SG_ B11_OBD_Nib_HL : 24|4@1+ (1,0) [0|15] "" XXX
SG_ B11_OBD_Nib_HR : 28|4@1+ (1,0) [0|15] "" XXX
SG_ B11_EPB_Steller_akt : 32|1@1+ (1,0) [0|1] "" XXX
SG_ B11_EPB_Steller_gue : 33|1@1+ (1,0) [0|1] "" XXX
BO_ 1500 Soll_Verbauliste_neu: 8 XXX
SG_ VL1_Motor_SG : 0|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Getr_SG : 1|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_ABS : 2|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Kombi : 3|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_LSM : 4|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Airbag : 5|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Lenkhilfe : 6|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_dyn_LWR : 7|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_res_08 : 8|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Allrad : 9|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_ADR : 10|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_ADR_getrennt : 11|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_EPB : 12|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_res_13 : 13|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Daempfer : 14|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Quersperre : 15|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_MotorSlave : 16|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_SWA : 17|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_HCA : 18|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_RKA_Plus : 19|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_PLA : 20|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_WFS_KBI : 21|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Kombi_KBI : 22|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Soll_eq_Ist : 23|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_BSG_Komf : 24|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_ZKE : 25|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_TSG_FT : 26|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_TSG_BT : 27|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_TSG_HL : 28|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_TSG_HR : 29|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Memory : 30|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Dachmodul_K : 31|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Zentralelektrik_II : 32|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_RDK : 33|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Lenksaeule : 34|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Gateway : 35|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Clima_Komf : 36|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Einparkhilfe : 37|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_PTC_Heizung : 38|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Standheiz : 39|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Verdeck : 40|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_RSE_I : 41|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_res_42 : 42|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_MDI_I : 43|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Anhaenger : 44|1@1+ (1,0) [0|1] "" SWA
SG_ VL1_Memory_BF : 45|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Easy_Entry_VF : 46|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Easy_Entry_VB : 47|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Heckdeckel : 48|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Rearview : 49|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Sonderfzg_SG : 50|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Tastenmodul : 51|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Kompass : 52|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_WFS_K : 53|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_GSM_Pager : 54|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_InfoElektronik : 55|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_DSP : 56|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_DAB : 57|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Telematik : 58|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Navigation : 59|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_TV_Tuner : 60|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Neigungsmodul_I : 61|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Radio : 62|1@1+ (1,0) [0|1] "" XXX
SG_ VL1_Telefon : 63|1@1+ (1,0) [0|1] "" XXX
BO_ 1490 Ident: 8 XXX
SG_ IDT_Mux M : 0|2@1+ (1,0) [0|2] "" XXX
SG_ IDT_Geheimnis_1 m0 : 8|8@1+ (1,0) [0|255] "" XXX
SG_ IDT_VIN_4 m1 : 8|8@1+ (1,0) [0|255] "" XXX
SG_ IDT_VIN_11 m2 : 8|8@1+ (1,0) [0|255] "" XXX
SG_ IDT_Geheimnis_2 m0 : 16|8@1+ (1,0) [0|255] "" XXX
SG_ IDT_VIN_5 m1 : 16|8@1+ (1,0) [0|255] "" XXX
SG_ IDT_VIN_12 m2 : 16|8@1+ (1,0) [0|255] "" XXX
SG_ IDT_Geheimnis_3 m0 : 24|8@1+ (1,0) [0|255] "" XXX
SG_ IDT_VIN_6 m1 : 24|8@1+ (1,0) [0|255] "" XXX
SG_ IDT_VIN_13 m2 : 24|8@1+ (1,0) [0|255] "" XXX
SG_ IDT_Geheimnis_4 m0 : 32|8@1+ (1,0) [0|255] "" XXX
SG_ IDT_VIN_7 m1 : 32|8@1+ (1,0) [0|255] "" XXX
SG_ IDT_VIN_14 m2 : 32|8@1+ (1,0) [0|255] "" XXX
SG_ IDT_VIN_1 m0 : 40|8@1+ (1,0) [0|255] "" XXX
SG_ IDT_VIN_8 m1 : 40|8@1+ (1,0) [0|255] "" XXX
SG_ IDT_VIN_15 m2 : 40|8@1+ (1,0) [0|255] "" XXX
SG_ IDT_VIN_2 m0 : 48|8@1+ (1,0) [0|255] "" XXX
SG_ IDT_VIN_9 m1 : 48|8@1+ (1,0) [0|255] "" XXX
SG_ IDT_VIN_16 m2 : 48|8@1+ (1,0) [0|255] "" XXX
SG_ IDT_VIN_3 m0 : 56|8@1+ (1,0) [0|255] "" XXX
SG_ IDT_VIN_10 m1 : 56|8@1+ (1,0) [0|255] "" XXX
SG_ IDT_VIN_17 m2 : 56|8@1+ (1,0) [0|255] "" XXX
BO_ 2000 Diagnose_1: 8 XXX
SG_ DI1_VerlernZaehl : 0|8@1+ (1,0) [0|254] "" XXX
SG_ DI1_km_Stand : 8|20@1+ (1,0) [0|1048575] "Unit_KiloMeter" XXX
SG_ DI1_Jahr : 28|7@1+ (1,2000) [2000|2127] "Unit_Year" XXX
SG_ DI1_Monat : 35|4@1+ (1,0) [1|12] "Unit_Month" XXX
SG_ DI1_Tag : 39|5@1+ (1,0) [0|31] "Unit_Day" XXX
SG_ DI1_Stunde : 44|5@1+ (1,0) [0|23] "Unit_Hours" XXX
SG_ DI1_Minute : 49|6@1+ (1,0) [0|59] "Unit_Minut" XXX
SG_ DI1_Sekunde : 55|6@1+ (1,0) [0|59] "Unit_Secon" XXX
SG_ DI1_KM_Stand_alt : 62|1@1+ (1,0) [0|1] "" XXX
SG_ DI1_Zeit_alt : 63|1@1+ (1,0) [0|1] "" XXX
CM_ SG_ 210 LM_Offset "centiNewton-meters for ease of calculation without FP math in Panda";
CM_ SG_ 210 Vib_Amp "Steering wheel haptic, amplitude";
CM_ SG_ 210 Vib_Freq "Steering wheel haptic, frequency";
CM_ SG_ 1386 ACA_V_Wunsch "255=unset";
CM_ SG_ 1470 LDW_Direction "0=right,1=left";
CM_ SG_ 1470 XX_DLCORTLC1 "Might be DLC or TLC";
CM_ SG_ 1470 XX_DLCORTLC2 "Might be DLC or TLC, might have wrong size";
CM_ SG_ 1550 MFA_v_Signal_02 "0=km/h, 1=mph";
VAL_ 1088 Waehlhebelposition__Getriebe_1_ 8 "P" 7 "R" 6 "N" 5 "D" 9 "U";
+10
View File
@@ -0,0 +1,10 @@
#!/usr/bin/bash
if [ $1 -eq 1 ]; then
printf %s "1" > /data/params/d/DragonBTG
fi
if [ $1 -eq 0 ]; then
printf %s "0" > /data/params/d/DragonBTG
fi
rm -rf /data/openpilot/selfdrive/boardd/boardd && reboot
+13
View File
@@ -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
+9
View File
@@ -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
printf %s "1" > /data/params/d/DragonUpdating
rm /data/openpilot/panda/board/obj/panda.bin
cd /data/openpilot && git fetch --all && git reset --hard @{u} && git clean -xdf && scons --clean && reboot
+11
View File
@@ -0,0 +1,11 @@
#!/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
value=`cat /data/params/d/DragonToyotaStockDSU`
if [ $value -eq "1" ]; then
printf %s "0" > /data/params/d/DragonEnableLogger
printf %s "0" > /data/params/d/DragonEnableUploader
fi
+9
View File
@@ -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 ; 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

+486
View File
@@ -0,0 +1,486 @@
# 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-04-23 17:17+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"
#: controls/lib/alerts.py:82 controls/lib/alerts.py:89
msgid "BRAKE!"
msgstr ""
#: controls/lib/alerts.py:83 controls/lib/alerts.py:90
msgid "Risk of Collision"
msgstr ""
#: controls/lib/alerts.py:96 controls/lib/alerts.py:103
#: controls/lib/alerts.py:110 controls/lib/alerts.py:215
#: controls/lib/alerts.py:229 controls/lib/alerts.py:263
#: controls/lib/alerts.py:824
msgid "TAKE CONTROL"
msgstr ""
#: controls/lib/alerts.py:97
msgid "Turn Exceeds Steering Limit"
msgstr ""
#: controls/lib/alerts.py:104 controls/lib/alerts.py:111
#: controls/lib/alerts.py:209
msgid "Steering Temporarily Unavailable"
msgstr ""
#: controls/lib/alerts.py:117
msgid "KEEP EYES ON ROAD: Driver Distracted"
msgstr ""
#: controls/lib/alerts.py:124
msgid "KEEP EYES ON ROAD"
msgstr ""
#: controls/lib/alerts.py:125
msgid "Driver Appears Distracted"
msgstr ""
#: controls/lib/alerts.py:131 controls/lib/alerts.py:152
msgid "DISENGAGE IMMEDIATELY"
msgstr ""
#: controls/lib/alerts.py:132
msgid "Driver Was Distracted"
msgstr ""
#: controls/lib/alerts.py:138
msgid "TOUCH STEERING WHEEL: No Face Detected"
msgstr ""
#: controls/lib/alerts.py:145
msgid "TOUCH STEERING WHEEL"
msgstr ""
#: controls/lib/alerts.py:146
msgid "Driver Is Unresponsive"
msgstr ""
#: controls/lib/alerts.py:153
msgid "Driver Was Unresponsive"
msgstr ""
#: controls/lib/alerts.py:159
msgid "CHECK DRIVER FACE VISIBILITY"
msgstr ""
#: controls/lib/alerts.py:160
msgid "Driver Monitor Model Output Uncertain"
msgstr ""
#: controls/lib/alerts.py:166
msgid "DISENGAGEMENT REQUIRED"
msgstr ""
#: controls/lib/alerts.py:167 controls/lib/alerts.py:593
msgid "Not in Geofenced Area"
msgstr ""
#: controls/lib/alerts.py:173
msgid "Be ready to take over at any time"
msgstr ""
#: controls/lib/alerts.py:174 controls/lib/alerts.py:181
#: controls/lib/alerts.py:188 controls/lib/alerts.py:195
msgid "Always keep hands on wheel and eyes on road"
msgstr ""
#: controls/lib/alerts.py:180
msgid "WARNING: This branch is not tested"
msgstr ""
#: controls/lib/alerts.py:187
msgid "Dashcam mode"
msgstr ""
#: controls/lib/alerts.py:194
msgid "Dashcam mode for unsupported car"
msgstr ""
#: controls/lib/alerts.py:201 controls/lib/alerts.py:356
#: controls/lib/alerts.py:363 controls/lib/alerts.py:370
#: controls/lib/alerts.py:377 controls/lib/alerts.py:384
#: controls/lib/alerts.py:391 controls/lib/alerts.py:398
#: controls/lib/alerts.py:405 controls/lib/alerts.py:412
#: controls/lib/alerts.py:419 controls/lib/alerts.py:426
#: controls/lib/alerts.py:433 controls/lib/alerts.py:441
#: controls/lib/alerts.py:449 controls/lib/alerts.py:456
#: controls/lib/alerts.py:463 controls/lib/alerts.py:470
#: controls/lib/alerts.py:477 controls/lib/alerts.py:484
#: controls/lib/alerts.py:491 controls/lib/alerts.py:498
#: controls/lib/alerts.py:505 controls/lib/alerts.py:512
msgid "TAKE CONTROL IMMEDIATELY"
msgstr ""
#: controls/lib/alerts.py:202
msgid "Ethical Dilemma Detected"
msgstr ""
#: controls/lib/alerts.py:208 controls/lib/alerts.py:271
#: controls/lib/alerts.py:278 controls/lib/alerts.py:285
#: controls/lib/alerts.py:292 controls/lib/alerts.py:299
#: controls/lib/alerts.py:306 controls/lib/alerts.py:313
#: controls/lib/alerts.py:320 controls/lib/alerts.py:327
#: controls/lib/alerts.py:334 controls/lib/alerts.py:341
#: controls/lib/alerts.py:348 controls/lib/alerts.py:543
#: controls/lib/alerts.py:550 controls/lib/alerts.py:557
#: controls/lib/alerts.py:564 controls/lib/alerts.py:571
#: controls/lib/alerts.py:578 controls/lib/alerts.py:585
#: controls/lib/alerts.py:592 controls/lib/alerts.py:599
#: controls/lib/alerts.py:606 controls/lib/alerts.py:613
#: controls/lib/alerts.py:620 controls/lib/alerts.py:627
#: controls/lib/alerts.py:634 controls/lib/alerts.py:641
#: controls/lib/alerts.py:648 controls/lib/alerts.py:655
#: controls/lib/alerts.py:662 controls/lib/alerts.py:669
#: controls/lib/alerts.py:676 controls/lib/alerts.py:683
#: controls/lib/alerts.py:690 controls/lib/alerts.py:697
#: controls/lib/alerts.py:704 controls/lib/alerts.py:718
msgid "openpilot Unavailable"
msgstr ""
#: controls/lib/alerts.py:216
msgid "Resume Driving Manually"
msgstr ""
#: controls/lib/alerts.py:222
msgid "STOPPED"
msgstr ""
#: controls/lib/alerts.py:223
msgid "Press Resume to Move"
msgstr ""
#: controls/lib/alerts.py:230
msgid "Steer Unavailable Below "
msgstr ""
#: controls/lib/alerts.py:236
msgid "DEBUG ALERT"
msgstr ""
#: controls/lib/alerts.py:242
msgid "Steer Left to Start Lane Change"
msgstr ""
#: controls/lib/alerts.py:243 controls/lib/alerts.py:250
#: controls/lib/alerts.py:257 controls/lib/alerts.py:833
#: controls/lib/alerts.py:840 controls/lib/alerts.py:847
msgid "Monitor Other Vehicles"
msgstr ""
#: controls/lib/alerts.py:249
msgid "Steer Right to Start Lane Change"
msgstr ""
#: controls/lib/alerts.py:256 controls/lib/alerts.py:846
msgid "Changing Lane"
msgstr ""
#: controls/lib/alerts.py:264 controls/lib/alerts.py:614
msgid "Vision Model Output Uncertain"
msgstr ""
#: controls/lib/alerts.py:272
msgid "Main Switch Off"
msgstr ""
#: controls/lib/alerts.py:279
msgid "Calibration Needs Data. Upload Drive, Try Again"
msgstr ""
#: controls/lib/alerts.py:286
msgid "Out of Storage Space"
msgstr ""
#: controls/lib/alerts.py:293
msgid "Pedal Pressed During Attempt"
msgstr ""
#: controls/lib/alerts.py:300
msgid "Speed Too Low"
msgstr ""
#: controls/lib/alerts.py:307
msgid "Brake Hold Active"
msgstr ""
#: controls/lib/alerts.py:314
msgid "Park Brake Engaged"
msgstr ""
#: controls/lib/alerts.py:321 controls/lib/alerts.py:478
#: controls/lib/alerts.py:642
msgid "Cruise Fault: Restart the Car"
msgstr ""
#: controls/lib/alerts.py:328 controls/lib/alerts.py:406
msgid "Low Battery"
msgstr ""
#: controls/lib/alerts.py:335 controls/lib/alerts.py:782
msgid "No Data from Device Sensors"
msgstr ""
#: controls/lib/alerts.py:342 controls/lib/alerts.py:789
msgid "Speaker not found"
msgstr ""
#: controls/lib/alerts.py:349
msgid "Distraction Level Too High"
msgstr ""
#: controls/lib/alerts.py:357
msgid "System Overheated"
msgstr ""
#: controls/lib/alerts.py:364 controls/lib/alerts.py:551
msgid "Gear not D"
msgstr ""
#: controls/lib/alerts.py:371
msgid "Calibration Invalid: Reposition Device and Recalibrate"
msgstr ""
#: controls/lib/alerts.py:378 controls/lib/alerts.py:565
msgid "Calibration in Progress"
msgstr ""
#: controls/lib/alerts.py:385
msgid "Door Open"
msgstr ""
#: controls/lib/alerts.py:392
msgid "Seatbelt Unlatched"
msgstr ""
#: controls/lib/alerts.py:399 controls/lib/alerts.py:586
msgid "ESP Off"
msgstr ""
#: controls/lib/alerts.py:413 controls/lib/alerts.py:684
msgid "Communication Issue between Processes"
msgstr ""
#: controls/lib/alerts.py:420 controls/lib/alerts.py:691
msgid "Radar Communication Issue"
msgstr ""
#: controls/lib/alerts.py:427 controls/lib/alerts.py:434
#: controls/lib/alerts.py:600 controls/lib/alerts.py:607
msgid "Radar Error: Restart the Car"
msgstr ""
#: controls/lib/alerts.py:442 controls/lib/alerts.py:705
msgid "Low Memory: Reboot Your Device"
msgstr ""
#: controls/lib/alerts.py:450 controls/lib/alerts.py:621
msgid "Controls Failed"
msgstr ""
#: controls/lib/alerts.py:457
msgid "Controls Mismatch"
msgstr ""
#: controls/lib/alerts.py:464 controls/lib/alerts.py:628
msgid "CAN Error: Check Connections"
msgstr ""
#: controls/lib/alerts.py:471 controls/lib/alerts.py:635
msgid "LKAS Fault: Restart the Car"
msgstr ""
#: controls/lib/alerts.py:485
msgid "Gas Fault: Restart the Car"
msgstr ""
#: controls/lib/alerts.py:492 controls/lib/alerts.py:656
msgid "Reverse Gear"
msgstr ""
#: controls/lib/alerts.py:499
msgid "Cruise Is Off"
msgstr ""
#: controls/lib/alerts.py:506 controls/lib/alerts.py:677
msgid "Planner Solution Error"
msgstr ""
#: controls/lib/alerts.py:513 controls/lib/alerts.py:719
#: controls/lib/alerts.py:810
msgid "Harness Malfunction"
msgstr ""
#: controls/lib/alerts.py:521 controls/lib/alerts.py:528
msgid "openpilot Canceled"
msgstr ""
#: controls/lib/alerts.py:522
msgid "No close lead car"
msgstr ""
#: controls/lib/alerts.py:529
msgid "Speed too low"
msgstr ""
#: controls/lib/alerts.py:535 controls/lib/alerts.py:711
msgid "Speed Too High"
msgstr ""
#: controls/lib/alerts.py:536
msgid "Slow down to resume operation"
msgstr ""
#: controls/lib/alerts.py:544
msgid "System overheated"
msgstr ""
#: controls/lib/alerts.py:558
msgid "Calibration Invalid: Reposition Device & Recalibrate"
msgstr ""
#: controls/lib/alerts.py:572
msgid "Door open"
msgstr ""
#: controls/lib/alerts.py:579
msgid "Seatbelt unlatched"
msgstr ""
#: controls/lib/alerts.py:649
msgid "Gas Error: Restart the Car"
msgstr ""
#: controls/lib/alerts.py:663
msgid "Cruise is Off"
msgstr ""
#: controls/lib/alerts.py:670
msgid "No Close Lead Car"
msgstr ""
#: controls/lib/alerts.py:698
msgid "Please Connect to Internet"
msgstr ""
#: controls/lib/alerts.py:712
msgid "Slow down to engage"
msgstr ""
#: controls/lib/alerts.py:726
msgid "LKAS Fault: Restart the car to engage"
msgstr ""
#: controls/lib/alerts.py:733 controls/lib/alerts.py:740
msgid "Cruise Fault: Restart the car to engage"
msgstr ""
#: controls/lib/alerts.py:747
msgid "Calibration in Progress: "
msgstr ""
#: controls/lib/alerts.py:748
msgid "Drive Above "
msgstr ""
#: controls/lib/alerts.py:754
msgid "Unsupported Giraffe Configuration"
msgstr ""
#: controls/lib/alerts.py:755
msgid "Visit comma.ai/tg"
msgstr ""
#: controls/lib/alerts.py:761
msgid "Stock LKAS is turned on"
msgstr ""
#: controls/lib/alerts.py:762
msgid "Turn off stock LKAS to engage"
msgstr ""
#: controls/lib/alerts.py:768
msgid "Please connect to Internet"
msgstr ""
#: controls/lib/alerts.py:769
msgid "An Update Check Is Required to Engage"
msgstr ""
#: controls/lib/alerts.py:775
msgid "Community Feature Detected"
msgstr ""
#: controls/lib/alerts.py:776
msgid "Enable Community Features in Developer Settings"
msgstr ""
#: controls/lib/alerts.py:783 controls/lib/alerts.py:790
#: controls/lib/alerts.py:797
msgid "Reboot your Device"
msgstr ""
#: controls/lib/alerts.py:796
msgid "RAM Critically Low"
msgstr ""
#: controls/lib/alerts.py:803
msgid "Dashcam Mode"
msgstr ""
#: controls/lib/alerts.py:804
msgid "Car Unrecognized"
msgstr ""
#: controls/lib/alerts.py:811
msgid "Please Check Hardware"
msgstr ""
#: controls/lib/alerts.py:817
msgid "Vehicle Parameter Identification Failed"
msgstr ""
#: controls/lib/alerts.py:825
msgid "Lane Departure Detected"
msgstr ""
#: controls/lib/alerts.py:832
msgid "Left ALC will engage in 3 seconds"
msgstr ""
#: controls/lib/alerts.py:839
msgid "Right ALC will engage in 3 seconds"
msgstr ""
#: controls/lib/alerts.py:853
msgid "STEERING REQUIRED: Lane Keeping OFF"
msgstr ""
#: controls/lib/alerts.py:860
msgid "STEERING REQUIRED: Blinkers ON"
msgstr ""
#: controls/lib/alerts.py:866
msgid "Lead Car Is Moving"
msgstr ""
#: controls/lib/alerts.py:872
msgid "Lead Car Detected"
msgstr ""
Binary file not shown.
@@ -0,0 +1,486 @@
# 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-04-23 17:17+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=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: controls/lib/alerts.py:82 controls/lib/alerts.py:89
msgid "BRAKE!"
msgstr ""
#: controls/lib/alerts.py:83 controls/lib/alerts.py:90
msgid "Risk of Collision"
msgstr ""
#: controls/lib/alerts.py:96 controls/lib/alerts.py:103
#: controls/lib/alerts.py:110 controls/lib/alerts.py:215
#: controls/lib/alerts.py:229 controls/lib/alerts.py:263
#: controls/lib/alerts.py:824
msgid "TAKE CONTROL"
msgstr ""
#: controls/lib/alerts.py:97
msgid "Turn Exceeds Steering Limit"
msgstr ""
#: controls/lib/alerts.py:104 controls/lib/alerts.py:111
#: controls/lib/alerts.py:209
msgid "Steering Temporarily Unavailable"
msgstr ""
#: controls/lib/alerts.py:117
msgid "KEEP EYES ON ROAD: Driver Distracted"
msgstr ""
#: controls/lib/alerts.py:124
msgid "KEEP EYES ON ROAD"
msgstr ""
#: controls/lib/alerts.py:125
msgid "Driver Appears Distracted"
msgstr ""
#: controls/lib/alerts.py:131 controls/lib/alerts.py:152
msgid "DISENGAGE IMMEDIATELY"
msgstr ""
#: controls/lib/alerts.py:132
msgid "Driver Was Distracted"
msgstr ""
#: controls/lib/alerts.py:138
msgid "TOUCH STEERING WHEEL: No Face Detected"
msgstr ""
#: controls/lib/alerts.py:145
msgid "TOUCH STEERING WHEEL"
msgstr ""
#: controls/lib/alerts.py:146
msgid "Driver Is Unresponsive"
msgstr ""
#: controls/lib/alerts.py:153
msgid "Driver Was Unresponsive"
msgstr ""
#: controls/lib/alerts.py:159
msgid "CHECK DRIVER FACE VISIBILITY"
msgstr ""
#: controls/lib/alerts.py:160
msgid "Driver Monitor Model Output Uncertain"
msgstr ""
#: controls/lib/alerts.py:166
msgid "DISENGAGEMENT REQUIRED"
msgstr ""
#: controls/lib/alerts.py:167 controls/lib/alerts.py:593
msgid "Not in Geofenced Area"
msgstr ""
#: controls/lib/alerts.py:173
msgid "Be ready to take over at any time"
msgstr ""
#: controls/lib/alerts.py:174 controls/lib/alerts.py:181
#: controls/lib/alerts.py:188 controls/lib/alerts.py:195
msgid "Always keep hands on wheel and eyes on road"
msgstr ""
#: controls/lib/alerts.py:180
msgid "WARNING: This branch is not tested"
msgstr ""
#: controls/lib/alerts.py:187
msgid "Dashcam mode"
msgstr ""
#: controls/lib/alerts.py:194
msgid "Dashcam mode for unsupported car"
msgstr ""
#: controls/lib/alerts.py:201 controls/lib/alerts.py:356
#: controls/lib/alerts.py:363 controls/lib/alerts.py:370
#: controls/lib/alerts.py:377 controls/lib/alerts.py:384
#: controls/lib/alerts.py:391 controls/lib/alerts.py:398
#: controls/lib/alerts.py:405 controls/lib/alerts.py:412
#: controls/lib/alerts.py:419 controls/lib/alerts.py:426
#: controls/lib/alerts.py:433 controls/lib/alerts.py:441
#: controls/lib/alerts.py:449 controls/lib/alerts.py:456
#: controls/lib/alerts.py:463 controls/lib/alerts.py:470
#: controls/lib/alerts.py:477 controls/lib/alerts.py:484
#: controls/lib/alerts.py:491 controls/lib/alerts.py:498
#: controls/lib/alerts.py:505 controls/lib/alerts.py:512
msgid "TAKE CONTROL IMMEDIATELY"
msgstr ""
#: controls/lib/alerts.py:202
msgid "Ethical Dilemma Detected"
msgstr ""
#: controls/lib/alerts.py:208 controls/lib/alerts.py:271
#: controls/lib/alerts.py:278 controls/lib/alerts.py:285
#: controls/lib/alerts.py:292 controls/lib/alerts.py:299
#: controls/lib/alerts.py:306 controls/lib/alerts.py:313
#: controls/lib/alerts.py:320 controls/lib/alerts.py:327
#: controls/lib/alerts.py:334 controls/lib/alerts.py:341
#: controls/lib/alerts.py:348 controls/lib/alerts.py:543
#: controls/lib/alerts.py:550 controls/lib/alerts.py:557
#: controls/lib/alerts.py:564 controls/lib/alerts.py:571
#: controls/lib/alerts.py:578 controls/lib/alerts.py:585
#: controls/lib/alerts.py:592 controls/lib/alerts.py:599
#: controls/lib/alerts.py:606 controls/lib/alerts.py:613
#: controls/lib/alerts.py:620 controls/lib/alerts.py:627
#: controls/lib/alerts.py:634 controls/lib/alerts.py:641
#: controls/lib/alerts.py:648 controls/lib/alerts.py:655
#: controls/lib/alerts.py:662 controls/lib/alerts.py:669
#: controls/lib/alerts.py:676 controls/lib/alerts.py:683
#: controls/lib/alerts.py:690 controls/lib/alerts.py:697
#: controls/lib/alerts.py:704 controls/lib/alerts.py:718
msgid "openpilot Unavailable"
msgstr ""
#: controls/lib/alerts.py:216
msgid "Resume Driving Manually"
msgstr ""
#: controls/lib/alerts.py:222
msgid "STOPPED"
msgstr ""
#: controls/lib/alerts.py:223
msgid "Press Resume to Move"
msgstr ""
#: controls/lib/alerts.py:230
msgid "Steer Unavailable Below "
msgstr ""
#: controls/lib/alerts.py:236
msgid "DEBUG ALERT"
msgstr ""
#: controls/lib/alerts.py:242
msgid "Steer Left to Start Lane Change"
msgstr ""
#: controls/lib/alerts.py:243 controls/lib/alerts.py:250
#: controls/lib/alerts.py:257 controls/lib/alerts.py:833
#: controls/lib/alerts.py:840 controls/lib/alerts.py:847
msgid "Monitor Other Vehicles"
msgstr ""
#: controls/lib/alerts.py:249
msgid "Steer Right to Start Lane Change"
msgstr ""
#: controls/lib/alerts.py:256 controls/lib/alerts.py:846
msgid "Changing Lane"
msgstr ""
#: controls/lib/alerts.py:264 controls/lib/alerts.py:614
msgid "Vision Model Output Uncertain"
msgstr ""
#: controls/lib/alerts.py:272
msgid "Main Switch Off"
msgstr ""
#: controls/lib/alerts.py:279
msgid "Calibration Needs Data. Upload Drive, Try Again"
msgstr ""
#: controls/lib/alerts.py:286
msgid "Out of Storage Space"
msgstr ""
#: controls/lib/alerts.py:293
msgid "Pedal Pressed During Attempt"
msgstr ""
#: controls/lib/alerts.py:300
msgid "Speed Too Low"
msgstr ""
#: controls/lib/alerts.py:307
msgid "Brake Hold Active"
msgstr ""
#: controls/lib/alerts.py:314
msgid "Park Brake Engaged"
msgstr ""
#: controls/lib/alerts.py:321 controls/lib/alerts.py:478
#: controls/lib/alerts.py:642
msgid "Cruise Fault: Restart the Car"
msgstr ""
#: controls/lib/alerts.py:328 controls/lib/alerts.py:406
msgid "Low Battery"
msgstr ""
#: controls/lib/alerts.py:335 controls/lib/alerts.py:782
msgid "No Data from Device Sensors"
msgstr ""
#: controls/lib/alerts.py:342 controls/lib/alerts.py:789
msgid "Speaker not found"
msgstr ""
#: controls/lib/alerts.py:349
msgid "Distraction Level Too High"
msgstr ""
#: controls/lib/alerts.py:357
msgid "System Overheated"
msgstr ""
#: controls/lib/alerts.py:364 controls/lib/alerts.py:551
msgid "Gear not D"
msgstr ""
#: controls/lib/alerts.py:371
msgid "Calibration Invalid: Reposition Device and Recalibrate"
msgstr ""
#: controls/lib/alerts.py:378 controls/lib/alerts.py:565
msgid "Calibration in Progress"
msgstr ""
#: controls/lib/alerts.py:385
msgid "Door Open"
msgstr ""
#: controls/lib/alerts.py:392
msgid "Seatbelt Unlatched"
msgstr ""
#: controls/lib/alerts.py:399 controls/lib/alerts.py:586
msgid "ESP Off"
msgstr ""
#: controls/lib/alerts.py:413 controls/lib/alerts.py:684
msgid "Communication Issue between Processes"
msgstr ""
#: controls/lib/alerts.py:420 controls/lib/alerts.py:691
msgid "Radar Communication Issue"
msgstr ""
#: controls/lib/alerts.py:427 controls/lib/alerts.py:434
#: controls/lib/alerts.py:600 controls/lib/alerts.py:607
msgid "Radar Error: Restart the Car"
msgstr ""
#: controls/lib/alerts.py:442 controls/lib/alerts.py:705
msgid "Low Memory: Reboot Your Device"
msgstr ""
#: controls/lib/alerts.py:450 controls/lib/alerts.py:621
msgid "Controls Failed"
msgstr ""
#: controls/lib/alerts.py:457
msgid "Controls Mismatch"
msgstr ""
#: controls/lib/alerts.py:464 controls/lib/alerts.py:628
msgid "CAN Error: Check Connections"
msgstr ""
#: controls/lib/alerts.py:471 controls/lib/alerts.py:635
msgid "LKAS Fault: Restart the Car"
msgstr ""
#: controls/lib/alerts.py:485
msgid "Gas Fault: Restart the Car"
msgstr ""
#: controls/lib/alerts.py:492 controls/lib/alerts.py:656
msgid "Reverse Gear"
msgstr ""
#: controls/lib/alerts.py:499
msgid "Cruise Is Off"
msgstr ""
#: controls/lib/alerts.py:506 controls/lib/alerts.py:677
msgid "Planner Solution Error"
msgstr ""
#: controls/lib/alerts.py:513 controls/lib/alerts.py:719
#: controls/lib/alerts.py:810
msgid "Harness Malfunction"
msgstr ""
#: controls/lib/alerts.py:521 controls/lib/alerts.py:528
msgid "openpilot Canceled"
msgstr ""
#: controls/lib/alerts.py:522
msgid "No close lead car"
msgstr ""
#: controls/lib/alerts.py:529
msgid "Speed too low"
msgstr ""
#: controls/lib/alerts.py:535 controls/lib/alerts.py:711
msgid "Speed Too High"
msgstr ""
#: controls/lib/alerts.py:536
msgid "Slow down to resume operation"
msgstr ""
#: controls/lib/alerts.py:544
msgid "System overheated"
msgstr ""
#: controls/lib/alerts.py:558
msgid "Calibration Invalid: Reposition Device & Recalibrate"
msgstr ""
#: controls/lib/alerts.py:572
msgid "Door open"
msgstr ""
#: controls/lib/alerts.py:579
msgid "Seatbelt unlatched"
msgstr ""
#: controls/lib/alerts.py:649
msgid "Gas Error: Restart the Car"
msgstr ""
#: controls/lib/alerts.py:663
msgid "Cruise is Off"
msgstr ""
#: controls/lib/alerts.py:670
msgid "No Close Lead Car"
msgstr ""
#: controls/lib/alerts.py:698
msgid "Please Connect to Internet"
msgstr ""
#: controls/lib/alerts.py:712
msgid "Slow down to engage"
msgstr ""
#: controls/lib/alerts.py:726
msgid "LKAS Fault: Restart the car to engage"
msgstr ""
#: controls/lib/alerts.py:733 controls/lib/alerts.py:740
msgid "Cruise Fault: Restart the car to engage"
msgstr ""
#: controls/lib/alerts.py:747
msgid "Calibration in Progress: "
msgstr ""
#: controls/lib/alerts.py:748
msgid "Drive Above "
msgstr ""
#: controls/lib/alerts.py:754
msgid "Unsupported Giraffe Configuration"
msgstr ""
#: controls/lib/alerts.py:755
msgid "Visit comma.ai/tg"
msgstr ""
#: controls/lib/alerts.py:761
msgid "Stock LKAS is turned on"
msgstr ""
#: controls/lib/alerts.py:762
msgid "Turn off stock LKAS to engage"
msgstr ""
#: controls/lib/alerts.py:768
msgid "Please connect to Internet"
msgstr ""
#: controls/lib/alerts.py:769
msgid "An Update Check Is Required to Engage"
msgstr ""
#: controls/lib/alerts.py:775
msgid "Community Feature Detected"
msgstr ""
#: controls/lib/alerts.py:776
msgid "Enable Community Features in Developer Settings"
msgstr ""
#: controls/lib/alerts.py:783 controls/lib/alerts.py:790
#: controls/lib/alerts.py:797
msgid "Reboot your Device"
msgstr ""
#: controls/lib/alerts.py:796
msgid "RAM Critically Low"
msgstr ""
#: controls/lib/alerts.py:803
msgid "Dashcam Mode"
msgstr ""
#: controls/lib/alerts.py:804
msgid "Car Unrecognized"
msgstr ""
#: controls/lib/alerts.py:811
msgid "Please Check Hardware"
msgstr ""
#: controls/lib/alerts.py:817
msgid "Vehicle Parameter Identification Failed"
msgstr ""
#: controls/lib/alerts.py:825
msgid "Lane Departure Detected"
msgstr ""
#: controls/lib/alerts.py:832
msgid "Left ALC will engage in 3 seconds"
msgstr ""
#: controls/lib/alerts.py:839
msgid "Right ALC will engage in 3 seconds"
msgstr ""
#: controls/lib/alerts.py:853
msgid "STEERING REQUIRED: Lane Keeping OFF"
msgstr ""
#: controls/lib/alerts.py:860
msgid "STEERING REQUIRED: Blinkers ON"
msgstr ""
#: controls/lib/alerts.py:866
msgid "Lead Car Is Moving"
msgstr ""
#: controls/lib/alerts.py:872
msgid "Lead Car Detected"
msgstr ""
Binary file not shown.
@@ -0,0 +1,486 @@
# 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-04-23 17:17+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"
#: controls/lib/alerts.py:82 controls/lib/alerts.py:89
msgid "BRAKE!"
msgstr "刹车!"
#: controls/lib/alerts.py:83 controls/lib/alerts.py:90
msgid "Risk of Collision"
msgstr "有碰撞的风险"
#: controls/lib/alerts.py:96 controls/lib/alerts.py:103
#: controls/lib/alerts.py:110 controls/lib/alerts.py:215
#: controls/lib/alerts.py:229 controls/lib/alerts.py:263
#: controls/lib/alerts.py:824
msgid "TAKE CONTROL"
msgstr "接管控制"
#: controls/lib/alerts.py:97
msgid "Turn Exceeds Steering Limit"
msgstr "弯道超过横向操控限制"
#: controls/lib/alerts.py:104 controls/lib/alerts.py:111
#: controls/lib/alerts.py:209
msgid "Steering Temporarily Unavailable"
msgstr "横向控制暂时失效"
#: controls/lib/alerts.py:117
msgid "KEEP EYES ON ROAD: Driver Distracted"
msgstr "注意路况:驾驶分心"
#: controls/lib/alerts.py:124
msgid "KEEP EYES ON ROAD"
msgstr "注意路况"
#: controls/lib/alerts.py:125
msgid "Driver Appears Distracted"
msgstr "驾驶分心"
#: controls/lib/alerts.py:131 controls/lib/alerts.py:152
msgid "DISENGAGE IMMEDIATELY"
msgstr "立即解除"
#: controls/lib/alerts.py:132
msgid "Driver Was Distracted"
msgstr "驾驶分心"
#: controls/lib/alerts.py:138
msgid "TOUCH STEERING WHEEL: No Face Detected"
msgstr "请触碰方向盘:未侦测到驾驶面容"
#: controls/lib/alerts.py:145
msgid "TOUCH STEERING WHEEL"
msgstr "请触碰方向盘"
#: controls/lib/alerts.py:146
msgid "Driver Is Unresponsive"
msgstr "驾驶没有反应"
#: controls/lib/alerts.py:153
msgid "Driver Was Unresponsive"
msgstr "驾驶没有反应"
#: controls/lib/alerts.py:159
msgid "CHECK DRIVER FACE VISIBILITY"
msgstr "请检查驾驶面部的可见度"
#: controls/lib/alerts.py:160
msgid "Driver Monitor Model Output Uncertain"
msgstr "驾驶监控模型判断不明确"
#: controls/lib/alerts.py:166
msgid "DISENGAGEMENT REQUIRED"
msgstr "请马上解除"
#: controls/lib/alerts.py:167 controls/lib/alerts.py:593
msgid "Not in Geofenced Area"
msgstr "不在地理围栏区域之内"
#: controls/lib/alerts.py:173
msgid "Be ready to take over at any time"
msgstr "请准备好随时接管"
#: controls/lib/alerts.py:174 controls/lib/alerts.py:181
#: controls/lib/alerts.py:188 controls/lib/alerts.py:195
msgid "Always keep hands on wheel and eyes on road"
msgstr "将手放在方向盘上并持续监视路况"
#: controls/lib/alerts.py:180
msgid "WARNING: This branch is not tested"
msgstr "注意:这个分支未经过测试"
#: controls/lib/alerts.py:187
msgid "Dashcam mode"
msgstr "行车记录模式"
#: controls/lib/alerts.py:194
msgid "Dashcam mode for unsupported car"
msgstr "行车记录模式 (尚未支援车种)"
#: controls/lib/alerts.py:201 controls/lib/alerts.py:356
#: controls/lib/alerts.py:363 controls/lib/alerts.py:370
#: controls/lib/alerts.py:377 controls/lib/alerts.py:384
#: controls/lib/alerts.py:391 controls/lib/alerts.py:398
#: controls/lib/alerts.py:405 controls/lib/alerts.py:412
#: controls/lib/alerts.py:419 controls/lib/alerts.py:426
#: controls/lib/alerts.py:433 controls/lib/alerts.py:441
#: controls/lib/alerts.py:449 controls/lib/alerts.py:456
#: controls/lib/alerts.py:463 controls/lib/alerts.py:470
#: controls/lib/alerts.py:477 controls/lib/alerts.py:484
#: controls/lib/alerts.py:491 controls/lib/alerts.py:498
#: controls/lib/alerts.py:505 controls/lib/alerts.py:512
msgid "TAKE CONTROL IMMEDIATELY"
msgstr "即刻接管控制"
#: controls/lib/alerts.py:202
msgid "Ethical Dilemma Detected"
msgstr ""
#: controls/lib/alerts.py:208 controls/lib/alerts.py:271
#: controls/lib/alerts.py:278 controls/lib/alerts.py:285
#: controls/lib/alerts.py:292 controls/lib/alerts.py:299
#: controls/lib/alerts.py:306 controls/lib/alerts.py:313
#: controls/lib/alerts.py:320 controls/lib/alerts.py:327
#: controls/lib/alerts.py:334 controls/lib/alerts.py:341
#: controls/lib/alerts.py:348 controls/lib/alerts.py:543
#: controls/lib/alerts.py:550 controls/lib/alerts.py:557
#: controls/lib/alerts.py:564 controls/lib/alerts.py:571
#: controls/lib/alerts.py:578 controls/lib/alerts.py:585
#: controls/lib/alerts.py:592 controls/lib/alerts.py:599
#: controls/lib/alerts.py:606 controls/lib/alerts.py:613
#: controls/lib/alerts.py:620 controls/lib/alerts.py:627
#: controls/lib/alerts.py:634 controls/lib/alerts.py:641
#: controls/lib/alerts.py:648 controls/lib/alerts.py:655
#: controls/lib/alerts.py:662 controls/lib/alerts.py:669
#: controls/lib/alerts.py:676 controls/lib/alerts.py:683
#: controls/lib/alerts.py:690 controls/lib/alerts.py:697
#: controls/lib/alerts.py:704 controls/lib/alerts.py:718
msgid "openpilot Unavailable"
msgstr "无法使用 openpilot"
#: controls/lib/alerts.py:216
msgid "Resume Driving Manually"
msgstr "请自行恢復驾驶"
#: controls/lib/alerts.py:222
msgid "STOPPED"
msgstr "已停止"
#: controls/lib/alerts.py:223
msgid "Press Resume to Move"
msgstr "请按 RES 继续"
#: controls/lib/alerts.py:230
msgid "Steer Unavailable Below "
msgstr "横向控制暂时失效,车速低于 "
#: controls/lib/alerts.py:236
msgid "DEBUG ALERT"
msgstr "除错用警示讯息"
#: controls/lib/alerts.py:242
msgid "Steer Left to Start Lane Change"
msgstr "请往左打方向盘切换至左车道"
#: controls/lib/alerts.py:243 controls/lib/alerts.py:250
#: controls/lib/alerts.py:257 controls/lib/alerts.py:833
#: controls/lib/alerts.py:840 controls/lib/alerts.py:847
msgid "Monitor Other Vehicles"
msgstr "请注意其它车辆"
#: controls/lib/alerts.py:249
msgid "Steer Right to Start Lane Change"
msgstr "请往右打方向盘切换至右车道"
#: controls/lib/alerts.py:256 controls/lib/alerts.py:846
msgid "Changing Lane"
msgstr "切换车道中"
#: controls/lib/alerts.py:264 controls/lib/alerts.py:614
msgid "Vision Model Output Uncertain"
msgstr "视觉模型判断不明确"
#: controls/lib/alerts.py:272
msgid "Main Switch Off"
msgstr "主开关已关闭"
#: controls/lib/alerts.py:279
msgid "Calibration Needs Data. Upload Drive, Try Again"
msgstr "校正需要数据,请上传您的行车数据后再重试一次"
#: controls/lib/alerts.py:286
msgid "Out of Storage Space"
msgstr "存储空间不足"
#: controls/lib/alerts.py:293
msgid "Pedal Pressed During Attempt"
msgstr "启用时侦测到驾驶踩踏油门/刹车"
#: controls/lib/alerts.py:300
msgid "Speed Too Low"
msgstr "车速过慢"
#: controls/lib/alerts.py:307
msgid "Brake Hold Active"
msgstr "驻车煞车已启用"
#: controls/lib/alerts.py:314
msgid "Park Brake Engaged"
msgstr "电子驻车已启动"
#: controls/lib/alerts.py:321 controls/lib/alerts.py:478
#: controls/lib/alerts.py:642
msgid "Cruise Fault: Restart the Car"
msgstr "巡航系统错误:请重新发动车辆"
#: controls/lib/alerts.py:328 controls/lib/alerts.py:406
msgid "Low Battery"
msgstr "电量过低"
#: controls/lib/alerts.py:335 controls/lib/alerts.py:782
msgid "No Data from Device Sensors"
msgstr "未收到装置传感器数据"
#: controls/lib/alerts.py:342 controls/lib/alerts.py:789
msgid "Speaker not found"
msgstr "找不到音效装置"
#: controls/lib/alerts.py:349
msgid "Distraction Level Too High"
msgstr "驾驶分心太多次"
#: controls/lib/alerts.py:357
msgid "System Overheated"
msgstr "系统过热"
#: controls/lib/alerts.py:364 controls/lib/alerts.py:551
msgid "Gear not D"
msgstr "不在 D 档位"
#: controls/lib/alerts.py:371
msgid "Calibration Invalid: Reposition Device and Recalibrate"
msgstr "校准无效:请将装置放于新的位置并重新校准"
#: controls/lib/alerts.py:378 controls/lib/alerts.py:565
msgid "Calibration in Progress"
msgstr "正在校准中"
#: controls/lib/alerts.py:385
msgid "Door Open"
msgstr "车门开启"
#: controls/lib/alerts.py:392
msgid "Seatbelt Unlatched"
msgstr "安全带未繫"
#: controls/lib/alerts.py:399 controls/lib/alerts.py:586
msgid "ESP Off"
msgstr "ESP 关闭"
#: controls/lib/alerts.py:413 controls/lib/alerts.py:684
msgid "Communication Issue between Processes"
msgstr "行程间出现通讯问题"
#: controls/lib/alerts.py:420 controls/lib/alerts.py:691
msgid "Radar Communication Issue"
msgstr "雷达通讯出现问题"
#: controls/lib/alerts.py:427 controls/lib/alerts.py:434
#: controls/lib/alerts.py:600 controls/lib/alerts.py:607
msgid "Radar Error: Restart the Car"
msgstr "雷达讯号错误:请重新发动车辆"
#: controls/lib/alerts.py:442 controls/lib/alerts.py:705
msgid "Low Memory: Reboot Your Device"
msgstr "记忆体不足:请重启您的装置"
#: controls/lib/alerts.py:450 controls/lib/alerts.py:621
msgid "Controls Failed"
msgstr "控制发生错误"
#: controls/lib/alerts.py:457
msgid "Controls Mismatch"
msgstr "控制不匹配"
#: controls/lib/alerts.py:464 controls/lib/alerts.py:628
msgid "CAN Error: Check Connections"
msgstr "CAN 讯号错误:请检查线路"
#: controls/lib/alerts.py:471 controls/lib/alerts.py:635
msgid "LKAS Fault: Restart the Car"
msgstr "LKAS 错误:请重新发动车辆"
#: controls/lib/alerts.py:485
msgid "Gas Fault: Restart the Car"
msgstr "油门错误:请重新发动车辆"
#: controls/lib/alerts.py:492 controls/lib/alerts.py:656
msgid "Reverse Gear"
msgstr "切换至倒车档"
#: controls/lib/alerts.py:499
msgid "Cruise Is Off"
msgstr "巡航系统关闭"
#: controls/lib/alerts.py:506 controls/lib/alerts.py:677
msgid "Planner Solution Error"
msgstr "Planner Solution 错误"
#: controls/lib/alerts.py:513 controls/lib/alerts.py:719
#: controls/lib/alerts.py:810
msgid "Harness Malfunction"
msgstr "Harness 故障"
#: controls/lib/alerts.py:521 controls/lib/alerts.py:528
msgid "openpilot Canceled"
msgstr "openpilot 已取消"
#: controls/lib/alerts.py:522
msgid "No close lead car"
msgstr "前方没有车辆"
#: controls/lib/alerts.py:529
msgid "Speed too low"
msgstr "车速过慢"
#: controls/lib/alerts.py:535 controls/lib/alerts.py:711
msgid "Speed Too High"
msgstr "车速过快"
#: controls/lib/alerts.py:536
msgid "Slow down to resume operation"
msgstr "请减速后再启用"
#: controls/lib/alerts.py:544
msgid "System overheated"
msgstr "系统过热"
#: controls/lib/alerts.py:558
msgid "Calibration Invalid: Reposition Device & Recalibrate"
msgstr "校准无效:请将装置放于新的位置并重新校准"
#: controls/lib/alerts.py:572
msgid "Door open"
msgstr "车门未关"
#: controls/lib/alerts.py:579
msgid "Seatbelt unlatched"
msgstr "安全带未繫"
#: controls/lib/alerts.py:649
msgid "Gas Error: Restart the Car"
msgstr "油门错误:请重新发动车辆"
#: controls/lib/alerts.py:663
msgid "Cruise is Off"
msgstr "巡航系统关闭"
#: controls/lib/alerts.py:670
msgid "No Close Lead Car"
msgstr "前方没有车辆"
#: controls/lib/alerts.py:698
msgid "Please Connect to Internet"
msgstr "请连接网路"
#: controls/lib/alerts.py:712
msgid "Slow down to engage"
msgstr "请减速后再启用"
#: controls/lib/alerts.py:726
msgid "LKAS Fault: Restart the car to engage"
msgstr "LKAS 错误:请重新发动车辆"
#: controls/lib/alerts.py:733 controls/lib/alerts.py:740
msgid "Cruise Fault: Restart the car to engage"
msgstr "巡航系统错误:请重新发动车辆"
#: controls/lib/alerts.py:747
msgid "Calibration in Progress: "
msgstr "正在校准相机中:"
#: controls/lib/alerts.py:748
msgid "Drive Above "
msgstr "车速请高于"
#: controls/lib/alerts.py:754
msgid "Unsupported Giraffe Configuration"
msgstr "未支援的 Giraffe 设置"
#: controls/lib/alerts.py:755
msgid "Visit comma.ai/tg"
msgstr "请查阅 comma.ai/tg"
#: controls/lib/alerts.py:761
msgid "Stock LKAS is turned on"
msgstr "原厂 LKAS 已开启"
#: controls/lib/alerts.py:762
msgid "Turn off stock LKAS to engage"
msgstr "需关闭原厂 LKAS 才能启用"
#: controls/lib/alerts.py:768
msgid "Please connect to Internet"
msgstr "请连接网路"
#: controls/lib/alerts.py:769
msgid "An Update Check Is Required to Engage"
msgstr "需检查更新后才能启用"
#: controls/lib/alerts.py:775
msgid "Community Feature Detected"
msgstr "检测到社群开发功能"
#: controls/lib/alerts.py:776
msgid "Enable Community Features in Developer Settings"
msgstr "请至开发人员设定裡启用社群开发功能"
#: controls/lib/alerts.py:783 controls/lib/alerts.py:790
#: controls/lib/alerts.py:797
msgid "Reboot your Device"
msgstr "请重启装置"
#: controls/lib/alerts.py:796
msgid "RAM Critically Low"
msgstr "记忆体严重不足"
#: controls/lib/alerts.py:803
msgid "Dashcam Mode"
msgstr "行车记录模式"
#: controls/lib/alerts.py:804
msgid "Car Unrecognized"
msgstr "无法辨识车款"
#: controls/lib/alerts.py:811
msgid "Please Check Hardware"
msgstr "请检查硬体"
#: controls/lib/alerts.py:817
msgid "Vehicle Parameter Identification Failed"
msgstr "车子参数识别失败"
#: controls/lib/alerts.py:825
msgid "Lane Departure Detected"
msgstr "偏离车道"
#: controls/lib/alerts.py:832
msgid "Left ALC will engage in 3 seconds"
msgstr "准备自动切至左车道"
#: controls/lib/alerts.py:839
msgid "Right ALC will engage in 3 seconds"
msgstr "准备自动切至右车道"
#: controls/lib/alerts.py:853
msgid "STEERING REQUIRED: Lane Keeping OFF"
msgstr "请接管方向盘:车道维持关闭"
#: controls/lib/alerts.py:860
msgid "STEERING REQUIRED: Blinkers ON"
msgstr "请接管方向盘:方向灯开启"
#: controls/lib/alerts.py:866
msgid "Lead Car Is Moving"
msgstr "前方车辆车移动中"
#: controls/lib/alerts.py:872
msgid "Lead Car Detected"
msgstr "侦测到前方车辆"
Binary file not shown.
@@ -0,0 +1,486 @@
# 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-04-23 17:17+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"
#: controls/lib/alerts.py:82 controls/lib/alerts.py:89
msgid "BRAKE!"
msgstr "剎車!"
#: controls/lib/alerts.py:83 controls/lib/alerts.py:90
msgid "Risk of Collision"
msgstr "有碰撞的風險"
#: controls/lib/alerts.py:96 controls/lib/alerts.py:103
#: controls/lib/alerts.py:110 controls/lib/alerts.py:215
#: controls/lib/alerts.py:229 controls/lib/alerts.py:263
#: controls/lib/alerts.py:824
msgid "TAKE CONTROL"
msgstr "接管控制"
#: controls/lib/alerts.py:97
msgid "Turn Exceeds Steering Limit"
msgstr "彎道超過橫向操控限制"
#: controls/lib/alerts.py:104 controls/lib/alerts.py:111
#: controls/lib/alerts.py:209
msgid "Steering Temporarily Unavailable"
msgstr "橫向控制暫時失效"
#: controls/lib/alerts.py:117
msgid "KEEP EYES ON ROAD: Driver Distracted"
msgstr "注意路況:駕駛分心"
#: controls/lib/alerts.py:124
msgid "KEEP EYES ON ROAD"
msgstr "注意路況"
#: controls/lib/alerts.py:125
msgid "Driver Appears Distracted"
msgstr "駕駛分心"
#: controls/lib/alerts.py:131 controls/lib/alerts.py:152
msgid "DISENGAGE IMMEDIATELY"
msgstr "立即解除"
#: controls/lib/alerts.py:132
msgid "Driver Was Distracted"
msgstr "駕駛分心"
#: controls/lib/alerts.py:138
msgid "TOUCH STEERING WHEEL: No Face Detected"
msgstr "請觸碰方向盤:未偵測到駕駛面容"
#: controls/lib/alerts.py:145
msgid "TOUCH STEERING WHEEL"
msgstr "請觸碰方向盤"
#: controls/lib/alerts.py:146
msgid "Driver Is Unresponsive"
msgstr "駕駛沒有反應"
#: controls/lib/alerts.py:153
msgid "Driver Was Unresponsive"
msgstr "駕駛沒有反應"
#: controls/lib/alerts.py:159
msgid "CHECK DRIVER FACE VISIBILITY"
msgstr "請檢查駕駛面部的可見度"
#: controls/lib/alerts.py:160
msgid "Driver Monitor Model Output Uncertain"
msgstr "駕駛監控模型判斷不明確"
#: controls/lib/alerts.py:166
msgid "DISENGAGEMENT REQUIRED"
msgstr "請馬上解除"
#: controls/lib/alerts.py:167 controls/lib/alerts.py:593
msgid "Not in Geofenced Area"
msgstr "不在地理圍欄區域之內"
#: controls/lib/alerts.py:173
msgid "Be ready to take over at any time"
msgstr "請準備好隨時接管"
#: controls/lib/alerts.py:174 controls/lib/alerts.py:181
#: controls/lib/alerts.py:188 controls/lib/alerts.py:195
msgid "Always keep hands on wheel and eyes on road"
msgstr "將手放在方向盤上並持續監視路況"
#: controls/lib/alerts.py:180
msgid "WARNING: This branch is not tested"
msgstr "注意:這個分支未經過測試"
#: controls/lib/alerts.py:187
msgid "Dashcam mode"
msgstr "行車記錄模式"
#: controls/lib/alerts.py:194
msgid "Dashcam mode for unsupported car"
msgstr "行車記錄模式 (尚未支援車種)"
#: controls/lib/alerts.py:201 controls/lib/alerts.py:356
#: controls/lib/alerts.py:363 controls/lib/alerts.py:370
#: controls/lib/alerts.py:377 controls/lib/alerts.py:384
#: controls/lib/alerts.py:391 controls/lib/alerts.py:398
#: controls/lib/alerts.py:405 controls/lib/alerts.py:412
#: controls/lib/alerts.py:419 controls/lib/alerts.py:426
#: controls/lib/alerts.py:433 controls/lib/alerts.py:441
#: controls/lib/alerts.py:449 controls/lib/alerts.py:456
#: controls/lib/alerts.py:463 controls/lib/alerts.py:470
#: controls/lib/alerts.py:477 controls/lib/alerts.py:484
#: controls/lib/alerts.py:491 controls/lib/alerts.py:498
#: controls/lib/alerts.py:505 controls/lib/alerts.py:512
msgid "TAKE CONTROL IMMEDIATELY"
msgstr "即刻接管控制"
#: controls/lib/alerts.py:202
msgid "Ethical Dilemma Detected"
msgstr ""
#: controls/lib/alerts.py:208 controls/lib/alerts.py:271
#: controls/lib/alerts.py:278 controls/lib/alerts.py:285
#: controls/lib/alerts.py:292 controls/lib/alerts.py:299
#: controls/lib/alerts.py:306 controls/lib/alerts.py:313
#: controls/lib/alerts.py:320 controls/lib/alerts.py:327
#: controls/lib/alerts.py:334 controls/lib/alerts.py:341
#: controls/lib/alerts.py:348 controls/lib/alerts.py:543
#: controls/lib/alerts.py:550 controls/lib/alerts.py:557
#: controls/lib/alerts.py:564 controls/lib/alerts.py:571
#: controls/lib/alerts.py:578 controls/lib/alerts.py:585
#: controls/lib/alerts.py:592 controls/lib/alerts.py:599
#: controls/lib/alerts.py:606 controls/lib/alerts.py:613
#: controls/lib/alerts.py:620 controls/lib/alerts.py:627
#: controls/lib/alerts.py:634 controls/lib/alerts.py:641
#: controls/lib/alerts.py:648 controls/lib/alerts.py:655
#: controls/lib/alerts.py:662 controls/lib/alerts.py:669
#: controls/lib/alerts.py:676 controls/lib/alerts.py:683
#: controls/lib/alerts.py:690 controls/lib/alerts.py:697
#: controls/lib/alerts.py:704 controls/lib/alerts.py:718
msgid "openpilot Unavailable"
msgstr "無法使用 openpilot"
#: controls/lib/alerts.py:216
msgid "Resume Driving Manually"
msgstr "請自行恢復駕駛"
#: controls/lib/alerts.py:222
msgid "STOPPED"
msgstr "已停止"
#: controls/lib/alerts.py:223
msgid "Press Resume to Move"
msgstr "請按 RES 繼續"
#: controls/lib/alerts.py:230
msgid "Steer Unavailable Below "
msgstr "橫向控制暫時失效,車速低於 "
#: controls/lib/alerts.py:236
msgid "DEBUG ALERT"
msgstr "除錯用警示訊息"
#: controls/lib/alerts.py:242
msgid "Steer Left to Start Lane Change"
msgstr "請往左打方向盤切換至左車道"
#: controls/lib/alerts.py:243 controls/lib/alerts.py:250
#: controls/lib/alerts.py:257 controls/lib/alerts.py:833
#: controls/lib/alerts.py:840 controls/lib/alerts.py:847
msgid "Monitor Other Vehicles"
msgstr "請注意其它車輛"
#: controls/lib/alerts.py:249
msgid "Steer Right to Start Lane Change"
msgstr "請往右打方向盤切換至右車道"
#: controls/lib/alerts.py:256 controls/lib/alerts.py:846
msgid "Changing Lane"
msgstr "切換車道中"
#: controls/lib/alerts.py:264 controls/lib/alerts.py:614
msgid "Vision Model Output Uncertain"
msgstr "視覺模型判斷不明確"
#: controls/lib/alerts.py:272
msgid "Main Switch Off"
msgstr "主開關已關閉"
#: controls/lib/alerts.py:279
msgid "Calibration Needs Data. Upload Drive, Try Again"
msgstr "校正需要數據,請上傳您的行車數據後再重試一次"
#: controls/lib/alerts.py:286
msgid "Out of Storage Space"
msgstr "儲存空間不足"
#: controls/lib/alerts.py:293
msgid "Pedal Pressed During Attempt"
msgstr "啟用時偵測到駕駛踩踏油門/剎車"
#: controls/lib/alerts.py:300
msgid "Speed Too Low"
msgstr "車速過慢"
#: controls/lib/alerts.py:307
msgid "Brake Hold Active"
msgstr "駐車煞車已啟用"
#: controls/lib/alerts.py:314
msgid "Park Brake Engaged"
msgstr "電子駐車已啟動"
#: controls/lib/alerts.py:321 controls/lib/alerts.py:478
#: controls/lib/alerts.py:642
msgid "Cruise Fault: Restart the Car"
msgstr "巡航系統錯誤:請重新發動車輛"
#: controls/lib/alerts.py:328 controls/lib/alerts.py:406
msgid "Low Battery"
msgstr "電量過低"
#: controls/lib/alerts.py:335 controls/lib/alerts.py:782
msgid "No Data from Device Sensors"
msgstr "未收到裝置傳感器數據"
#: controls/lib/alerts.py:342 controls/lib/alerts.py:789
msgid "Speaker not found"
msgstr "找不到音效裝置"
#: controls/lib/alerts.py:349
msgid "Distraction Level Too High"
msgstr "駕駛分心太多次"
#: controls/lib/alerts.py:357
msgid "System Overheated"
msgstr "系統過熱"
#: controls/lib/alerts.py:364 controls/lib/alerts.py:551
msgid "Gear not D"
msgstr "不在 D 檔位"
#: controls/lib/alerts.py:371
msgid "Calibration Invalid: Reposition Device and Recalibrate"
msgstr "校準無效:請將裝置放於新的位置並重新校準"
#: controls/lib/alerts.py:378 controls/lib/alerts.py:565
msgid "Calibration in Progress"
msgstr "正在校準中"
#: controls/lib/alerts.py:385
msgid "Door Open"
msgstr "車門開啟"
#: controls/lib/alerts.py:392
msgid "Seatbelt Unlatched"
msgstr "安全帶未繫"
#: controls/lib/alerts.py:399 controls/lib/alerts.py:586
msgid "ESP Off"
msgstr "ESP 關閉"
#: controls/lib/alerts.py:413 controls/lib/alerts.py:684
msgid "Communication Issue between Processes"
msgstr "行程間出現通訊問題"
#: controls/lib/alerts.py:420 controls/lib/alerts.py:691
msgid "Radar Communication Issue"
msgstr "雷達通訊出現問題"
#: controls/lib/alerts.py:427 controls/lib/alerts.py:434
#: controls/lib/alerts.py:600 controls/lib/alerts.py:607
msgid "Radar Error: Restart the Car"
msgstr "雷達訊號錯誤:請重新發動車輛"
#: controls/lib/alerts.py:442 controls/lib/alerts.py:705
msgid "Low Memory: Reboot Your Device"
msgstr "記憶體不足:請重啟您的裝置"
#: controls/lib/alerts.py:450 controls/lib/alerts.py:621
msgid "Controls Failed"
msgstr "控制發生錯誤"
#: controls/lib/alerts.py:457
msgid "Controls Mismatch"
msgstr "控制不匹配"
#: controls/lib/alerts.py:464 controls/lib/alerts.py:628
msgid "CAN Error: Check Connections"
msgstr "CAN 訊號錯誤:請檢查線路"
#: controls/lib/alerts.py:471 controls/lib/alerts.py:635
msgid "LKAS Fault: Restart the Car"
msgstr "LKAS 錯誤:請重新發動車輛"
#: controls/lib/alerts.py:485
msgid "Gas Fault: Restart the Car"
msgstr "油門錯誤:請重新發動車輛"
#: controls/lib/alerts.py:492 controls/lib/alerts.py:656
msgid "Reverse Gear"
msgstr "切換至倒車檔"
#: controls/lib/alerts.py:499
msgid "Cruise Is Off"
msgstr "巡航系統關閉"
#: controls/lib/alerts.py:506 controls/lib/alerts.py:677
msgid "Planner Solution Error"
msgstr "Planner Solution 錯誤"
#: controls/lib/alerts.py:513 controls/lib/alerts.py:719
#: controls/lib/alerts.py:810
msgid "Harness Malfunction"
msgstr "Harness 故障"
#: controls/lib/alerts.py:521 controls/lib/alerts.py:528
msgid "openpilot Canceled"
msgstr "openpilot 已取消"
#: controls/lib/alerts.py:522
msgid "No close lead car"
msgstr "前方沒有車輛"
#: controls/lib/alerts.py:529
msgid "Speed too low"
msgstr "車速過慢"
#: controls/lib/alerts.py:535 controls/lib/alerts.py:711
msgid "Speed Too High"
msgstr "車速過快"
#: controls/lib/alerts.py:536
msgid "Slow down to resume operation"
msgstr "請減速後再啟用"
#: controls/lib/alerts.py:544
msgid "System overheated"
msgstr "系統過熱"
#: controls/lib/alerts.py:558
msgid "Calibration Invalid: Reposition Device & Recalibrate"
msgstr "校準無效:請將裝置放於新的位置並重新校準"
#: controls/lib/alerts.py:572
msgid "Door open"
msgstr "車門未關"
#: controls/lib/alerts.py:579
msgid "Seatbelt unlatched"
msgstr "安全帶未繫"
#: controls/lib/alerts.py:649
msgid "Gas Error: Restart the Car"
msgstr "油門錯誤:請重新發動車輛"
#: controls/lib/alerts.py:663
msgid "Cruise is Off"
msgstr "巡航系統關閉"
#: controls/lib/alerts.py:670
msgid "No Close Lead Car"
msgstr "前方沒有車輛"
#: controls/lib/alerts.py:698
msgid "Please Connect to Internet"
msgstr "請連接網路"
#: controls/lib/alerts.py:712
msgid "Slow down to engage"
msgstr "請減速後再啟用"
#: controls/lib/alerts.py:726
msgid "LKAS Fault: Restart the car to engage"
msgstr "LKAS 錯誤:請重新發動車輛"
#: controls/lib/alerts.py:733 controls/lib/alerts.py:740
msgid "Cruise Fault: Restart the car to engage"
msgstr "巡航系統錯誤:請重新發動車輛"
#: controls/lib/alerts.py:747
msgid "Calibration in Progress: "
msgstr "正在校準相機中:"
#: controls/lib/alerts.py:748
msgid "Drive Above "
msgstr "車速請高於"
#: controls/lib/alerts.py:754
msgid "Unsupported Giraffe Configuration"
msgstr "未支援的 Giraffe 設置"
#: controls/lib/alerts.py:755
msgid "Visit comma.ai/tg"
msgstr "請查閱 comma.ai/tg"
#: controls/lib/alerts.py:761
msgid "Stock LKAS is turned on"
msgstr "原廠 LKAS 已開啟"
#: controls/lib/alerts.py:762
msgid "Turn off stock LKAS to engage"
msgstr "需關閉原廠 LKAS 才能啟用"
#: controls/lib/alerts.py:768
msgid "Please connect to Internet"
msgstr "請連接網路"
#: controls/lib/alerts.py:769
msgid "An Update Check Is Required to Engage"
msgstr "需檢查更新後才能啟用"
#: controls/lib/alerts.py:775
msgid "Community Feature Detected"
msgstr "檢測到社群開發功能"
#: controls/lib/alerts.py:776
msgid "Enable Community Features in Developer Settings"
msgstr "請至開發人員設定裡啟用社群開發功能"
#: controls/lib/alerts.py:783 controls/lib/alerts.py:790
#: controls/lib/alerts.py:797
msgid "Reboot your Device"
msgstr "請重啟裝置"
#: controls/lib/alerts.py:796
msgid "RAM Critically Low"
msgstr "記憶體嚴重不足"
#: controls/lib/alerts.py:803
msgid "Dashcam Mode"
msgstr "行車記錄模式"
#: controls/lib/alerts.py:804
msgid "Car Unrecognized"
msgstr "無法辨識車款"
#: controls/lib/alerts.py:811
msgid "Please Check Hardware"
msgstr "請檢查硬體"
#: controls/lib/alerts.py:817
msgid "Vehicle Parameter Identification Failed"
msgstr "車子參數識別失敗"
#: controls/lib/alerts.py:825
msgid "Lane Departure Detected"
msgstr "偏離車道"
#: controls/lib/alerts.py:832
msgid "Left ALC will engage in 3 seconds"
msgstr "準備自動切至左車道"
#: controls/lib/alerts.py:839
msgid "Right ALC will engage in 3 seconds"
msgstr "準備自動切至右車道"
#: controls/lib/alerts.py:853
msgid "STEERING REQUIRED: Lane Keeping OFF"
msgstr "請接管方向盤:車道維持關閉"
#: controls/lib/alerts.py:860
msgid "STEERING REQUIRED: Blinkers ON"
msgstr "請接管方向盤:方向燈開啟"
#: controls/lib/alerts.py:866
msgid "Lead Car Is Moving"
msgstr "前方車輛車移動中"
#: controls/lib/alerts.py:872
msgid "Lead Car Detected"
msgstr "偵測到前方車輛"
+6
View File
@@ -1,5 +1,11 @@
Import('env', 'common', 'messaging')
# dragonpilot - Add read DragonBTG value
if FindFile('DragonBTG', '/data/params/d') != None:
with open('/data/params/d/DragonBTG') as f:
if (int(f.read())) == 1:
env.Append(CCFLAGS='-DDragonBTG')
env.Program('boardd.cc', LIBS=['usb-1.0', common, messaging, 'pthread', 'zmq', 'capnp', 'kj'])
env.Library('libcan_list_to_can_capnp', ['can_list_to_can_capnp.cc'])
+38 -3
View File
@@ -64,7 +64,7 @@ bool fake_send = false;
bool loopback_can = false;
cereal::HealthData::HwType hw_type = cereal::HealthData::HwType::UNKNOWN;
bool is_pigeon = false;
const uint32_t NO_IGNITION_CNT_MAX = 2 * 60 * 60 * 30; // turn off charge after 30 hrs
const float VBATT_START_CHARGING = 11.5;
const float VBATT_PAUSE_CHARGING = 11.0;
float voltage_f = 12.5; // filtered voltage
@@ -84,6 +84,7 @@ void pigeon_init();
void *pigeon_thread(void *crap);
void *safety_setter_thread(void *s) {
#ifndef DragonBTG
// 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);
@@ -110,6 +111,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
char *value;
size_t value_sz = 0;
@@ -132,6 +134,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);
@@ -339,7 +344,7 @@ void can_recv(PubSocket *publisher) {
publisher->send((char*)bytes.begin(), bytes.size());
}
void can_health(PubSocket *publisher) {
void can_health(PubSocket *publisher, int shutdown_mins) {
int cnt;
int err;
@@ -397,12 +402,14 @@ void can_health(PubSocket *publisher) {
voltage_f = VOLTAGE_K * (health.voltage / 1000.0) + (1.0 - VOLTAGE_K) * voltage_f; // LPF
#ifndef DragonBTG
// 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));
@@ -414,6 +421,7 @@ void can_health(PubSocket *publisher) {
#ifndef __x86_64__
bool cdp_mode = health.usb_power_mode == (uint8_t)(cereal::HealthData::UsbPowerMode::CDP);
uint32_t NO_IGNITION_CNT_MAX = (2 * 60 * shutdown_mins) - 20; // turn off charge after 30 hrs or DragonShutdownAt Param (-10 seconds, turn off earlier than EON)
bool no_ignition_exp = no_ignition_cnt > NO_IGNITION_CNT_MAX;
if ((no_ignition_exp || (voltage_f < VBATT_PAUSE_CHARGING)) && cdp_mode && !ignition) {
char *disable_power_down = NULL;
@@ -446,12 +454,14 @@ void can_health(PubSocket *publisher) {
libusb_control_transfer(dev_handle, 0xc0, 0xe7, 1, 0, NULL, 0, TIMEOUT);
pthread_mutex_unlock(&usb_lock);
}
#ifndef DragonBTG
// 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
@@ -677,9 +687,26 @@ void *can_health_thread(void *crap) {
PubSocket * publisher = PubSocket::create(c, "health");
assert(publisher != NULL);
int shutdown_mins = 1800;
char *enable_auto_shutdown = NULL;
size_t enable_auto_shutdown_sz = 0;
const int r1 = read_db_value("DragonEnableAutoShutdown", &enable_auto_shutdown, &enable_auto_shutdown_sz);
if (r1 == 0 && enable_auto_shutdown[0] == '1') {
char *auto_shutdown_at = NULL;
size_t auto_shutdown_at_sz = 0;
const int r2 = read_db_value("DragonAutoShutdownAt", &auto_shutdown_at, &auto_shutdown_at_sz);
if (r2 == 0) {
shutdown_mins = atoi(auto_shutdown_at);
}
if (shutdown_mins <= 0) {
shutdown_mins = 1800;
}
free(auto_shutdown_at);
}
free(enable_auto_shutdown);
// run at 2hz
while (!do_exit) {
can_health(publisher);
can_health(publisher, shutdown_mins);
usleep(500*1000);
}
@@ -893,6 +920,11 @@ void *pigeon_thread(void *crap) {
if (pigeon_needs_init) {
pigeon_needs_init = false;
pigeon_init();
#ifdef DragonBTG
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) {
@@ -929,6 +961,9 @@ void *pigeon_thread(void *crap) {
int main() {
int err;
LOGW("starting boardd");
#ifdef DragonBTG
LOGW("boardd is running in DragonBTG mode");
#endif
// set process priority
err = set_realtime_priority(4);
+33 -8
View File
@@ -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.car.fingerprints import eliminate_incompatible_cars, all_known_cars
from selfdrive.car.vin import get_vin, VIN_UNKNOWN
@@ -7,6 +7,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 import is_online
import threading
import selfdrive.crash as crash
from cereal import car
@@ -72,6 +75,13 @@ def only_toyota_left(candidate_cars):
# **** for use live only ****
def fingerprint(logcan, sendcan, has_relay):
fixed_fingerprint = os.environ.get('FINGERPRINT', "")
# dp
dragon_car_model = Params().get("DragonCustomModel", encoding="utf8")
has_dragon_car_model = True if len(dragon_car_model) else False
# when dragon_car_model is set, we do not need to scan relay,
# however we still need to do FPv1 to collect available can msgs
# for other purposes.
has_relay = False if has_dragon_car_model else has_relay
if has_relay and not fixed_fingerprint:
# Vin query only reliably works thorugh OBDII
@@ -143,19 +153,30 @@ def fingerprint(logcan, sendcan, has_relay):
source = car.CarParams.FingerprintSource.can
# If FW query returns exactly 1 candidate, use it
if len(fw_candidates) == 1:
car_fingerprint = list(fw_candidates)[0]
source = car.CarParams.FingerprintSource.fw
if fixed_fingerprint:
car_fingerprint = fixed_fingerprint
if has_dragon_car_model:
car_fingerprint = dragon_car_model
source = car.CarParams.FingerprintSource.fixed
else:
# If FW query returns exactly 1 candidate, use it
if len(fw_candidates) == 1:
car_fingerprint = list(fw_candidates)[0]
source = car.CarParams.FingerprintSource.fw
if fixed_fingerprint:
car_fingerprint = fixed_fingerprint
source = car.CarParams.FingerprintSource.fixed
put_nonblocking("DragonCarModel", car_fingerprint)
cloudlog.warning("fingerprinted %s", car_fingerprint)
return car_fingerprint, finger, vin, car_fw, source
def log_fingerprinted(candidate):
while True:
crash.capture_warning("fingerprinted %s" % candidate)
break
def get_car(logcan, sendcan, has_relay=False):
candidate, fingerprints, vin, car_fw, source = fingerprint(logcan, sendcan, has_relay)
@@ -163,6 +184,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
+34
View File
@@ -3,6 +3,11 @@ 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
# dp
from common.params import Params
params = Params()
from common.dp import get_last_modified
from common.dp import common_controller_update, common_controller_ctrl
class CarController():
def __init__(self, dbc_name, CP, VM):
@@ -17,6 +22,13 @@ class CarController():
self.packer = CANPacker(dbc_name)
# dp
self.dragon_enable_steering_on_signal = False
self.dragon_lat_ctrl = True
self.dp_last_modified = None
self.last_blinker_on = False
self.blinker_end_frame = 0
self.dragon_blinker_off_timer = 0.
def update(self, enabled, CS, actuators, pcm_cancel_cmd, hud_alert):
# this seems needed to avoid steering faults and to force the sync with the EPS counter
@@ -24,6 +36,15 @@ class CarController():
if self.prev_frame == frame:
return []
# dp
if frame % 500 == 0:
modified = get_last_modified()
if self.dp_last_modified != modified:
self.dragon_lat_ctrl, \
self.dragon_enable_steering_on_signal, \
self.dragon_blinker_off_timer = common_controller_update()
self.dp_last_modified = modified
# *** compute control surfaces ***
# steer torque
new_steer = actuators.steer * SteerLimitParams.STEER_MAX
@@ -42,6 +63,19 @@ 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 + self.dragon_blinker_off_timer
apply_steer = common_controller_ctrl(enabled,
self.dragon_lat_ctrl,
self.dragon_enable_steering_on_signal,
blinker_on or frame < self.blinker_end_frame,
apply_steer)
self.last_blinker_on = blinker_on
self.apply_steer_last = apply_steer
can_sends = []
+1
View File
@@ -57,6 +57,7 @@ class CarInterface(CarInterfaceBase):
# returns a car.CarState
def update(self, c, can_strings):
self.dp_load_params('chrysler')
# ******************* do can recv *******************
self.cp.update_strings(can_strings)
self.cp_cam.update_strings(can_strings)
+1
View File
@@ -51,6 +51,7 @@ class CarInterface(CarInterfaceBase):
# returns a car.CarState
def update(self, c, can_strings):
self.dp_load_params('ford')
# ******************* do can recv *******************
self.cp.update_strings(can_strings)
+1
View File
@@ -115,6 +115,7 @@ class CarInterface(CarInterfaceBase):
# returns a car.CarState
def update(self, c, can_strings):
self.dp_load_params('gm')
self.cp.update_strings(can_strings)
ret = self.CS.update(self.cp)
+38 -4
View File
@@ -7,6 +7,10 @@ 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.params import Params
params = Params()
from common.dp import get_last_modified
from common.dp import common_controller_update, common_controller_ctrl
VisualAlert = car.CarControl.HUDControl.VisualAlert
@@ -72,7 +76,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,10 +100,27 @@ class CarController():
self.params = CarControllerParams(CP)
# dp
self.dragon_enable_steering_on_signal = False
self.dragon_lat_ctrl = True
self.dp_last_modified = None
self.last_blinker_on = False
self.blinker_end_frame = 0
self.dragon_blinker_off_timer = 0.
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
if frame % 500 == 0:
modified = get_last_modified()
if self.dp_last_modified != modified:
self.dragon_lat_ctrl, \
self.dragon_enable_steering_on_signal, \
self.dragon_blinker_off_timer = common_controller_update()
self.dp_last_modified = modified
P = self.params
# *** apply brake hysteresis ***
@@ -114,7 +135,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 +151,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 +160,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 + self.dragon_blinker_off_timer
lkas_active = common_controller_ctrl(enabled,
self.dragon_lat_ctrl,
self.dragon_enable_steering_on_signal,
blinker_on or frame < self.blinker_end_frame,
lkas_active)
self.last_blinker_on = blinker_on
# Send steering command.
idx = frame % 4
can_sends.append(hondacan.create_steering_control(self.packer, apply_steer,
+12
View File
@@ -167,6 +167,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()
@@ -221,6 +224,15 @@ 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']
+6 -2
View File
@@ -416,6 +416,7 @@ class CarInterface(CarInterfaceBase):
# returns a car.CarState
def update(self, c, can_strings):
self.dp_load_params('honda')
# ******************* do can recv *******************
self.cp.update_strings(can_strings)
self.cp_cam.update_strings(can_strings)
@@ -429,6 +430,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:
@@ -467,6 +471,8 @@ class CarInterface(CarInterfaceBase):
# events
events = self.create_common_events(ret, pcm_enable=False)
if not self.CS.lkMode:
events.append(create_event('manualSteeringRequired', [ET.WARNING]))
if self.CS.brake_error:
events.append(create_event('brakeUnavailable', [ET.NO_ENTRY, ET.IMMEDIATE_DISABLE, ET.PERMANENT]))
if self.CS.brake_hold and self.CS.CP.carFingerprint not in HONDA_BOSCH:
@@ -482,8 +488,6 @@ class CarInterface(CarInterfaceBase):
if self.CP.enableCruise and not ret.cruiseState.enabled and (c.actuators.brake <= 0. or not self.CP.openpilotLongitudinalControl):
# non loud alert if cruise disbales below 25mph as expected (+ a little margin)
if ret.vEgo < self.CP.minEnableSpeed + 2.:
events.append(create_event('speedTooLow', [ET.IMMEDIATE_DISABLE]))
else:
events.append(create_event("cruiseDisabled", [ET.IMMEDIATE_DISABLE]))
if self.CS.CP.minEnableSpeed > 0 and ret.vEgo < 0.001:
events.append(create_event('manualRestart', [ET.WARNING]))
+23 -3
View File
@@ -54,7 +54,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,
@@ -81,8 +81,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: [{
@@ -107,6 +111,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: [{
@@ -377,6 +385,7 @@ FW_VERSIONS = {
b'37805-5AW-G720\x00\x00',
b'37805-5AZ-E850\x00\x00',
b'37805-5BB-L640\x00\x00',
b'37805-5AN-E410\x00\x00', # AlexNoop's Manual CIVIC_BOSCH
],
(Ecu.transmission, 0x18da1ef1, None): [
b'28101-5CG-A920\x00\x00',
@@ -396,6 +405,7 @@ FW_VERSIONS = {
b'57114-TGG-A340\x00\x00',
b'57114-TGL-G330\x00\x00',
b'57114-TGG-C320\x00\x00',
b'57114-TGL-G130\x00\x00', # AlexNoop's Manual CIVIC_BOSCH
],
(Ecu.eps, 0x18da30f1, None): [
b'39990-TBA-C020\x00\x00',
@@ -405,12 +415,14 @@ FW_VERSIONS = {
b'39990-TGG-A120\x00\x00',
b'39990-TGL-E130\x00\x00',
b'39990-TGG-A020\x00\x00',
b'39990-TGN-E120\x00\x00', # AlexNoop's Manual CIVIC_BOSCH
],
(Ecu.srs, 0x18da53f1, None): [
b'77959-TBA-A060\x00\x00',
b'77959-TEA-G020\x00\x00',
b'77959-TGG-A020\x00\x00',
b'77959-TGG-G010\x00\x00',
b'77959-TGG-A020\x00\x00',
],
(Ecu.combinationMeter, 0x18da60f1, None): [
b'78109-TBA-A910\x00\x00',
@@ -423,6 +435,7 @@ FW_VERSIONS = {
b'78109-TGG-A810\x00\x00',
b'78109-TGG-A820\x00\x00',
b'78109-TGL-G120\x00\x00',
b'78109-TGG-BA10\x00\x00', # AlexNoop's Manual CIVIC_BOSCH
],
(Ecu.fwdRadar, 0x18dab0f1, None): [
b'36802-TBA-A150\x00\x00',
@@ -430,6 +443,7 @@ FW_VERSIONS = {
b'36802-TGG-A050\x00\x00',
b'36802-TGL-G040\x00\x00',
b'36802-TGG-A060\x00\x00',
b'36802-TGG-G040\x00\x00', # AlexNoop's Manual CIVIC_BOSCH
],
(Ecu.fwdCamera, 0x18dab5f1, None): [
b'36161-TBA-A130\x00\x00',
@@ -437,10 +451,12 @@ FW_VERSIONS = {
b'36161-TGG-A060\x00\x00',
b'36161-TGL-G050\x00\x00',
b'36161-TGG-A080\x00\x00',
b'36161-TGG-G070\x00\x00', # AlexNoop's Manual CIVIC_BOSCH
],
(Ecu.unknown, 0x18daeff1, None): [
b'38897-TBA-A110\x00\x00',
b'38897-TBA-A020\x00\x00',
b'38897-TBA-A020\x00\x00',
],
(Ecu.gateway, 0x18daeff1, None): [
b'38897-TBA-A110\x00\x00',
@@ -572,6 +588,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',
@@ -583,10 +600,12 @@ FW_VERSIONS = {
(Ecu.eps, 0x18da30f1, None): [
b'39990-THR-A020\x00\x00',
b'39990-THR-A030\x00\x00',
b'39990-T6D-H220\x00\x00'
],
(Ecu.srs, 0x18da53f1, None): [
b'77959-THR-A010\x00\x00',
b'77959-THR-A110\x00\x00',
b'77959-T6A-H140\x00\x00',
],
(Ecu.fwdCamera, 0x18dab0f1, None): [
b'36161-THR-A030\x00\x00',
@@ -622,6 +641,7 @@ FW_VERSIONS = {
b'78109-THR-AL10\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',
+35
View File
@@ -3,6 +3,10 @@ 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.params import Params
params = Params()
from common.dp import get_last_modified
from common.dp import common_controller_update, common_controller_ctrl
VisualAlert = car.CarControl.HUDControl.VisualAlert
@@ -44,8 +48,26 @@ class CarController():
self.last_resume_frame = 0
self.last_lead_distance = 0
# dp
self.dragon_enable_steering_on_signal = False
self.dragon_lat_ctrl = True
self.dp_last_modified = None
self.last_blinker_on = False
self.blinker_end_frame = 0
self.dragon_blinker_off_timer = 0.
def update(self, enabled, CS, frame, actuators, pcm_cancel_cmd, visual_alert,
left_lane, right_lane, left_lane_depart, right_lane_depart):
# dp
if frame % 500 == 0:
modified = get_last_modified()
if self.dp_last_modified != modified:
self.dragon_lat_ctrl, \
self.dragon_enable_steering_on_signal, \
self.dragon_blinker_off_timer = common_controller_update()
self.dp_last_modified = modified
# 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)
@@ -63,6 +85,19 @@ class CarController():
self.apply_steer_last = apply_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 + self.dragon_blinker_off_timer
lkas_active = common_controller_ctrl(enabled,
self.dragon_lat_ctrl,
self.dragon_enable_steering_on_signal,
blinker_on or frame < self.blinker_end_frame,
lkas_active)
self.last_blinker_on = blinker_on
sys_warning, sys_state, left_lane_warning, right_lane_warning =\
process_hud_alert(enabled, self.car_fingerprint, visual_alert,
left_lane, right_lane, left_lane_depart, right_lane_depart)
+1
View File
@@ -155,6 +155,7 @@ class CarInterface(CarInterfaceBase):
return ret
def update(self, c, can_strings):
self.dp_load_params('hyundai')
self.cp.update_strings(can_strings)
self.cp_cam.update_strings(can_strings)
+50 -9
View File
@@ -7,6 +7,12 @@ from selfdrive.car import gen_empty_fingerprint
from selfdrive.controls.lib.drive_helpers import EventTypes as ET, create_event
from selfdrive.controls.lib.vehicle_model import VehicleModel
# dp
from common.realtime import sec_since_boot
from common.params import Params, put_nonblocking
params = Params()
from common.dp import get_last_modified
GearShifter = car.CarState.GearShifter
# generic car and radar interfaces
@@ -27,6 +33,15 @@ class CarInterfaceBase():
if CarController is not None:
self.CC = CarController(self.cp.dbc_name, CP, self.VM)
# dp
self.dragon_toyota_stock_dsu = False
self.dragon_enable_steering_on_signal = False
self.dragon_allow_gas = False
self.ts_last_check = 0.
self.dragon_lat_ctrl = True
self.dp_last_modified = None
self.dp_gear_check = True
@staticmethod
def calc_accel_override(a_ego, a_target, v_ego, v_target):
return 1.
@@ -79,6 +94,22 @@ class CarInterfaceBase():
def apply(self, c):
raise NotImplementedError
def dp_load_params(self, car_name):
# dp
ts = sec_since_boot()
if ts - self.ts_last_check >= 5.:
modified = get_last_modified()
if self.dp_last_modified != modified:
self.dragon_lat_ctrl = False if params.get("DragonLatCtrl", encoding='utf8') == "0" else True
if self.dragon_lat_ctrl:
self.dragon_enable_steering_on_signal = True if (params.get("DragonEnableSteeringOnSignal", encoding='utf8') == "1" and params.get("LaneChangeEnabled", encoding='utf8') == "0") else False
self.dragon_toyota_stock_dsu = True if (car_name == 'toyota' and params.get("DragonToyotaStockDSU", encoding='utf8') == "1") else False
if not self.dragon_toyota_stock_dsu:
self.dragon_allow_gas = True if params.get("DragonAllowGas", encoding='utf8') == "1" else False
self.dp_gear_check = False if params.get("DragonEnableGearCheck", encoding='utf8') == "0" else True
self.dp_last_modified = modified
self.ts_last_check = ts
def create_common_events(self, cs_out, extra_gears=[], gas_resume_speed=-1, pcm_enable=True):
events = []
@@ -86,18 +117,23 @@ class CarInterfaceBase():
events.append(create_event('doorOpen', [ET.NO_ENTRY, ET.SOFT_DISABLE]))
if cs_out.seatbeltUnlatched:
events.append(create_event('seatbeltNotLatched', [ET.NO_ENTRY, ET.SOFT_DISABLE]))
if cs_out.gearShifter != GearShifter.drive and cs_out.gearShifter not in extra_gears:
events.append(create_event('wrongGear', [ET.NO_ENTRY, ET.SOFT_DISABLE]))
if cs_out.gearShifter == GearShifter.reverse:
events.append(create_event('reverseGear', [ET.NO_ENTRY, ET.IMMEDIATE_DISABLE]))
if not self.dragon_toyota_stock_dsu:
if cs_out.gearShifter != GearShifter.drive and cs_out.gearShifter not in extra_gears:
events.append(create_event('wrongGear', [ET.NO_ENTRY, ET.SOFT_DISABLE]))
if cs_out.gearShifter == GearShifter.reverse:
events.append(create_event('reverseGear', [ET.NO_ENTRY, ET.IMMEDIATE_DISABLE]))
if not cs_out.cruiseState.available:
events.append(create_event('wrongCarMode', [ET.NO_ENTRY, ET.USER_DISABLE]))
if cs_out.espDisabled:
events.append(create_event('espDisabled', [ET.NO_ENTRY, ET.SOFT_DISABLE]))
if cs_out.gasPressed:
if cs_out.gasPressed and not self.dragon_allow_gas and not self.dragon_toyota_stock_dsu:
events.append(create_event('pedalPressed', [ET.PRE_ENABLE]))
if cs_out.steerError:
if not self.dragon_lat_ctrl:
events.append(create_event('manualSteeringRequired', [ET.WARNING]))
elif self.dragon_enable_steering_on_signal and (cs_out.leftBlinker or cs_out.rightBlinker):
events.append(create_event('manualSteeringRequiredBlinkersOn', [ET.WARNING]))
elif cs_out.steerError:
events.append(create_event('steerUnavailable', [ET.NO_ENTRY, ET.IMMEDIATE_DISABLE, ET.PERMANENT]))
elif cs_out.steerWarning:
events.append(create_event('steerTempUnavailable', [ET.NO_ENTRY, ET.WARNING]))
@@ -105,9 +141,14 @@ 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.append(create_event('pedalPressed', [ET.NO_ENTRY, ET.USER_DISABLE]))
if not self.dragon_toyota_stock_dsu:
if not self.dragon_allow_gas:
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.append(create_event('pedalPressed', [ET.NO_ENTRY, ET.USER_DISABLE]))
else:
if cs_out.brakePressed and (not self.CS.out.brakePressed or not cs_out.standstill):
events.append(create_event('pedalPressed', [ET.NO_ENTRY, ET.USER_DISABLE]))
# we engage when pcm is active (rising edge)
if pcm_enable:
+11
View File
@@ -29,6 +29,16 @@ class CarInterface(CarInterfaceBase):
self.yaw_rate = 0.
self.yaw_rate_meas = 0.
# dp
# mock override constructor so we need to define here as well.
self.dragon_toyota_stock_dsu = False
self.dragon_enable_steering_on_signal = False
self.dragon_allow_gas = False
self.ts_last_check = 0.
self.dragon_lat_ctrl = True
self.dp_last_modified = None
self.dp_gear_check = True
@staticmethod
def compute_gb(accel, speed):
return accel
@@ -50,6 +60,7 @@ class CarInterface(CarInterfaceBase):
# returns a car.CarState
def update(self, c, can_strings):
self.dp_load_params('mock')
# get basic data from phone and gps since CAN isn't connected
sensors = messaging.recv_sock(self.sensor)
if sensors is not None:
+34
View File
@@ -3,6 +3,10 @@ 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.params import Params
params = Params()
from common.dp import get_last_modified
from common.dp import common_controller_update, common_controller_ctrl
class CarControllerParams():
@@ -30,9 +34,26 @@ class CarController():
self.params = CarControllerParams()
self.packer = CANPacker(DBC[CP.carFingerprint]['pt'])
# dp
self.dragon_enable_steering_on_signal = False
self.dragon_lat_ctrl = True
self.dp_last_modified = None
self.last_blinker_on = False
self.blinker_end_frame = 0
self.dragon_blinker_off_timer = 0.
def update(self, enabled, CS, frame, actuators, pcm_cancel_cmd, visual_alert, left_line, right_line):
""" Controls thread """
# dp
if frame % 500 == 0:
modified = get_last_modified()
if self.dp_last_modified != modified:
self.dragon_lat_ctrl, \
self.dragon_enable_steering_on_signal, \
self.dragon_blinker_off_timer = common_controller_update()
self.dp_last_modified = modified
P = self.params
# Send CAN commands.
@@ -56,6 +77,19 @@ class CarController():
if not lkas_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 + self.dragon_blinker_off_timer
apply_steer = common_controller_ctrl(enabled,
self.dragon_lat_ctrl,
self.dragon_enable_steering_on_signal,
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
+1
View File
@@ -50,6 +50,7 @@ class CarInterface(CarInterfaceBase):
# returns a car.CarState
def update(self, c, can_strings):
self.dp_load_params('subaru')
self.cp.update_strings(can_strings)
self.cp_cam.update_strings(can_strings)
+55 -7
View File
@@ -5,13 +5,17 @@ from selfdrive.car.toyota.toyotacan import create_steer_command, create_ui_comma
create_accel_command, create_acc_cancel_command, create_fcw_command
from selfdrive.car.toyota.values import Ecu, CAR, STATIC_MSGS, SteerLimitParams
from opendbc.can.packer import CANPacker
from common.params import Params
params = Params()
from common.dp import get_last_modified
from common.dp import common_controller_update, 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 # 2.0 m/s2
ACCEL_MIN = -3.5 # 3.5 m/s2
ACCEL_SCALE = max(ACCEL_MAX, -ACCEL_MIN)
def accel_hysteresis(accel, accel_steady, enabled):
@@ -46,9 +50,32 @@ class CarController():
self.packer = CANPacker(dbc_name)
# dp
self.dragon_enable_steering_on_signal = False
self.dragon_lat_ctrl = True
self.dragon_lane_departure_warning = True
self.dragon_toyota_sng_mod = False
self.dp_last_modified = None
self.last_blinker_on = False
self.blinker_end_frame = 0
self.dragon_blinker_off_timer = 0.
def update(self, enabled, CS, frame, actuators, pcm_cancel_cmd, hud_alert,
left_line, right_line, lead, left_lane_depart, right_lane_depart):
# dp
if frame % 500 == 0:
modified = get_last_modified()
if self.dp_last_modified != modified:
self.dragon_lane_departure_warning = False if params.get("DragonToyotaLaneDepartureWarning", encoding='utf8') == "0" else True
self.dragon_toyota_sng_mod = True if params.get("DragonToyotaSnGMod", encoding='utf8') == "1" else False
self.dragon_lat_ctrl, \
self.dragon_enable_steering_on_signal, \
self.dragon_blinker_off_timer = common_controller_update()
self.dp_last_modified = modified
# *** compute control surfaces ***
# gas and brake
@@ -74,8 +101,8 @@ class CarController():
if CS.steer_state in [9, 25]:
self.last_fault_frame = frame
# Cut steering for 2s after fault
if not enabled or (frame - self.last_fault_frame < 200):
# # Cut steering for 2s after fault
if not enabled: # or (frame - self.last_fault_frame < 200):
apply_steer = 0
apply_steer_req = 0
else:
@@ -86,7 +113,7 @@ class CarController():
pcm_cancel_cmd = 1
# on entering standstill, send standstill request
if CS.out.standstill and not self.last_standstill:
if not self.dragon_toyota_sng_mod 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
@@ -96,6 +123,19 @@ class CarController():
self.last_accel = apply_accel
self.last_standstill = CS.out.standstill
# 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 + self.dragon_blinker_off_timer
apply_steer_req = common_controller_ctrl(enabled,
self.dragon_lat_ctrl,
self.dragon_enable_steering_on_signal,
blinker_on or frame < self.blinker_end_frame,
apply_steer_req)
self.last_blinker_on = blinker_on
can_sends = []
#*** control msgs ***
@@ -112,7 +152,7 @@ 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:
if pcm_cancel_cmd and CS.CP.carFingerprint in [CAR.LEXUS_IS, CAR.LEXUS_ISH, CAR.LEXUS_GSH]:
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))
@@ -139,8 +179,16 @@ class CarController():
# forcing the pcm to disengage causes a bad fault sound so play a good sound instead
send_ui = True
# dp
if self.dragon_lane_departure_warning:
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))
+69 -8
View File
@@ -5,7 +5,10 @@ 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.realtime import sec_since_boot
from common.params import Params
from common.dp import get_last_modified
params = Params()
class CarState(CarStateBase):
def __init__(self, CP):
@@ -14,15 +17,29 @@ class CarState(CarStateBase):
self.shifter_values = can_define.dv["GEAR_PACKET"]['GEAR']
# 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]
# 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]
self.angle_offset = 0.
# dp
self.dragon_toyota_stock_dsu = False
self.ts_last_check = 0.
self.last_modifed = None
def update(self, cp, cp_cam):
# dp
ts = sec_since_boot()
if ts - self.ts_last_check >= 5.:
modified = get_last_modified()
if self.last_modifed != modified:
self.dragon_toyota_stock_dsu = True if params.get("DragonToyotaStockDSU", encoding='utf8') == "1" else False
self.last_modifed = modified
self.ts_last_check = ts
ret = car.CarState.new_message()
ret.doorOpen = any([cp.vl["SEATS_DOORS"]['DOOR_OPEN_FL'], cp.vl["SEATS_DOORS"]['DOOR_OPEN_FR'],
@@ -34,6 +51,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
@@ -74,15 +94,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
@@ -93,6 +121,8 @@ class CarState(CarStateBase):
if self.CP.carFingerprint == CAR.PRIUS:
ret.genericToggle = cp.vl["AUTOPARK_STATUS"]['STATE'] != 0
elif self.CP.carFingerprint in [CAR.LEXUS_ISH, CAR.LEXUS_GSH]:
ret.genericToggle = bool(cp.vl["LIGHT_STALK_ISH"]['AUTO_HIGH_BEAM'])
else:
ret.genericToggle = bool(cp.vl["LIGHT_STALK"]['AUTO_HIGH_BEAM'])
ret.stockAeb = bool(cp_cam.vl["PRE_COLLISION"]["PRECOLLISION_ACTIVE"] and cp_cam.vl["PRE_COLLISION"]["FORCE"] < -1e-5)
@@ -105,6 +135,15 @@ class CarState(CarStateBase):
ret.leftBlindspot = cp.vl["BSM"]['L_ADJACENT'] == 1
ret.rightBlindspot = cp.vl["BSM"]['R_ADJACENT'] == 1
# dp
if self.dragon_toyota_stock_dsu 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
ret.cruiseState.enabled = enable_acc
return ret
@staticmethod
@@ -141,8 +180,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),
@@ -150,7 +189,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))
@@ -174,6 +233,8 @@ class CarState(CarStateBase):
signals += [("L_ADJACENT", "BSM", 0)]
signals += [("R_ADJACENT", "BSM", 0)]
checks = []
return CANParser(DBC[CP.carFingerprint]['pt'], signals, checks, 0)
@staticmethod
+39 -2
View File
@@ -6,9 +6,11 @@ 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.params import Params
params = Params()
class CarInterface(CarInterfaceBase):
@staticmethod
def compute_gb(accel, speed):
return float(accel) / 3.0
@@ -231,6 +233,36 @@ 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 = 13.3
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
@@ -274,7 +306,11 @@ class CarInterface(CarInterfaceBase):
ret.longitudinalTuning.kpV = [1.2, 0.8, 0.5]
ret.longitudinalTuning.kiV = [0.18, 0.12]
else:
ret.gasMaxBP = [0.]
try:
max_bp = max(0., float(params.get("DragonToyotaSngResponse", encoding='utf8')))
except (TypeError, ValueError):
max_bp = 0.
ret.gasMaxBP = [max_bp]
ret.gasMaxV = [0.5]
ret.longitudinalTuning.kpV = [3.6, 2.4, 1.5]
ret.longitudinalTuning.kiV = [0.54, 0.36]
@@ -283,6 +319,7 @@ class CarInterface(CarInterfaceBase):
# returns a car.CarState
def update(self, c, can_strings):
self.dp_load_params('toyota')
# ******************* do can recv *******************
self.cp.update_strings(can_strings)
self.cp_cam.update_strings(can_strings)
+94 -10
View File
@@ -36,6 +36,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)
@@ -80,6 +83,10 @@ FINGERPRINTS = {
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
},
# Taiwan Prius 4.5
{
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
},
#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
@@ -108,6 +115,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
@@ -149,6 +160,10 @@ FINGERPRINTS = {
{
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: 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, 869: 7, 870: 7, 888: 8, 889: 8, 891: 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, 983: 8, 984: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1002: 8, 1011: 8, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1056: 8, 1059: 1, 1076: 8, 1077: 8, 1082: 8, 1114: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1228: 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, 1595: 8, 1745: 8, 1779: 8, 1786: 8, 1787: 8, 1788: 8, 1789: 8, 1808: 8, 1816: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 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
},
{
# 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
@@ -180,6 +195,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
@@ -199,6 +218,10 @@ FINGERPRINTS = {
36: 8, 37: 8, 170: 8, 180: 8, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 547: 8, 550: 8, 552: 4, 562: 6, 608: 8, 610: 5, 643: 7, 705: 8, 740: 5, 767:4, 800: 8, 835: 8, 836: 8, 849: 4, 869: 7, 870: 7, 871: 2, 896: 8, 897: 8, 905: 8, 911: 1, 916: 2, 921: 8, 933: 6, 944: 8, 945: 8, 951: 8, 955: 8, 956: 8, 979: 2, 1005: 2, 1014: 8, 1017: 8, 1041: 8, 1042: 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, 1200: 8, 1201: 8, 1202: 8, 1203: 8, 1206: 8, 1227: 8, 1235: 8, 1237: 8, 1264: 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, 1584: 8, 1589: 8, 1592: 8, 1593: 8, 1595: 8, 1596: 8, 1597: 8, 1664: 8, 1728: 8, 1779: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8
}],
CAR.RAV4_TSS2: [
# 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
},
# LE
{
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, 565: 8, 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, 882: 8, 885: 8, 896: 8, 898: 8, 900: 6, 902: 6, 905: 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, 1063: 8, 1076: 8, 1077: 8,1114: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 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, 1649: 8, 1745: 8, 1775: 8, 1779: 8, 1786: 8, 1787: 8, 1788: 8, 1789: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8
@@ -208,11 +231,27 @@ FINGERPRINTS = {
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
}],
CAR.COROLLA_TSS2: [
#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
},
# 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
}],
CAR.COROLLAH_TSS2: [
# 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
},
# 2019 Taiwan Altis 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, 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, 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
@@ -224,6 +263,10 @@ FINGERPRINTS = {
],
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: [
{
@@ -233,18 +276,22 @@ FINGERPRINTS = {
{
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, 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, 888: 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, 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
},
# 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
}],
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
}],
CAR.RAV4H_TSS2: [
#Hybrid Limited
@@ -252,16 +299,34 @@ FINGERPRINTS = {
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, 658: 8, 713: 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, 863: 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, 913:8, 918: 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, 987: 8, 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, 1063: 8, 1071: 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, 1808: 8, 1810: 8, 1816: 8, 1818: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8
},
],
CAR.LEXUS_CTH: [{
CAR.LEXUS_CTH: [
# 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
},
{
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
}],
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]
IGNORED_FINGERPRINTS = [CAR.HIGHLANDERH_TSS2]
FW_VERSIONS = {
CAR.AVALON: {
@@ -321,17 +386,20 @@ FW_VERSIONS = {
b'\x028966306R5000\x00\x00\x00\x00897CF3302002\x00\x00\x00\x00',
b'\x028966306R6000\x00\x00\x00\x00897CF3302002\x00\x00\x00\x00',
b'\x028966306S0100\x00\x00\x00\x00897CF3305001\x00\x00\x00\x00',
b'\x018966306N9000\x00\x00\x00\x00', # from a358063504 @wechat
],
(Ecu.esp, 0x7b0, None): [
b'F152633712\x00\x00\x00\x00\x00\x00',
b'F152633713\x00\x00\x00\x00\x00\x00',
b'F152633B51\x00\x00\x00\x00\x00\x00',
b'F152633214\x00\x00\x00\x00\x00\x00', # from a358063504 @wechat
],
(Ecu.dsu, 0x791, None): [
b'8821F0601200 ',
b'8821F0601300 ',
b'8821F0607200 ',
b'8821F0608000 ',
b'8821F0603600 ', # from a358063504 @wechat
],
(Ecu.eps, 0x7a1, None): [
b'8965B33540\x00\x00\x00\x00\x00\x00',
@@ -342,11 +410,13 @@ FW_VERSIONS = {
b'8821F0601300 ',
b'8821F0607200 ',
b'8821F0608000 ',
b'8821F0603600 ', # from a358063504 @wechat
],
(Ecu.fwdCamera, 0x750, 0x6d): [
b'8646F0601200 ',
b'8646F0601300 ',
b'8646F0605000 ',
b'8646F0603500 ', # from a358063504 @wechat
],
},
CAR.CHR: {
@@ -474,6 +544,8 @@ FW_VERSIONS = {
b'\x02896630ZR2000\x00\x00\x00\x008966A4703000\x00\x00\x00\x00',
b'\x028966312Q4000\x00\x00\x00\x008966A4703000\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',
],
(Ecu.eps, 0x7a1, None): [
b'8965B12361\x00\x00\x00\x00\x00\x00',
@@ -483,6 +555,8 @@ 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',
],
(Ecu.esp, 0x7b0, None): [
b'F152612590\x00\x00\x00\x00\x00\x00',
@@ -493,6 +567,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',
],
(Ecu.fwdRadar, 0x750, 0xf): [
b'\x018821F3301100\x00\x00\x00\x00',
@@ -776,8 +851,14 @@ FW_VERSIONS = {
b'\x01896630842000\x00\x00\x00\x00',
b'\x01896630851100\x00\x00\x00\x00',
b'\x01896630860000\x00\x00\x00\x00',
b'\x01896630852000\x00\x00\x00\x00',
],
(Ecu.esp, 0x7b0, None): [b'F152608130\x00\x00\x00\x00\x00\x00'],
(Ecu.dsu, 0x791, None): [b'881510801100\x00\x00\x00\x00'],
(Ecu.eps, 0x7a1, None): [
b'8965B45070\x00\x00\x00\x00\x00\x00',
b'8965B45070\x00\x00\x00\x00\x00\x00',
],
(Ecu.eps, 0x7a1, None): [b'8965B45070\x00\x00\x00\x00\x00\x00'],
(Ecu.fwdRadar, 0x750, 0xf): [
b'8821F4702100\x00\x00\x00\x00',
b'8821F4702300\x00\x00\x00\x00',
@@ -875,8 +956,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.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.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.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.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.HIGHLANDER_TSS2, CAR.HIGHLANDERH_TSS2, CAR.LEXUS_NXT] # no resume button press required
+14 -4
View File
@@ -1,7 +1,7 @@
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
VisualAlert = car.CarControl.HUDControl.VisualAlert
@@ -12,6 +12,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
@@ -98,7 +108,7 @@ class CarController():
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 +129,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 +188,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
+272 -46
View File
@@ -4,16 +4,34 @@ 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
@@ -28,22 +46,43 @@ class CarState(CarStateBase):
# 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["LWI_01"]['LWI_Lenkradwinkel'] * (1,-1)[int(pt_cp.vl["LWI_01"]['LWI_VZ_Lenkradwinkel'])]
ret.steeringRate = pt_cp.vl["LWI_01"]['LWI_Lenkradw_Geschw'] * (1,-1)[int(pt_cp.vl["LWI_01"]['LWI_VZ_Lenkradwinkel'])]
ret.steeringTorque = pt_cp.vl["EPS_01"]['Driver_Strain'] * (1,-1)[int(pt_cp.vl["EPS_01"]['Driver_Strain_VZ'])]
ret.steeringAngle = pt_cp.vl["LWI_01"]['LWI_Lenkradwinkel'] * (1, -1)[int(pt_cp.vl["LWI_01"]['LWI_VZ_Lenkradwinkel'])]
ret.steeringRate = pt_cp.vl["LWI_01"]['LWI_Lenkradw_Geschw'] * (1, -1)[int(pt_cp.vl["LWI_01"]['LWI_VZ_Lenkradwinkel'])]
ret.steeringTorque = pt_cp.vl["EPS_01"]['Driver_Strain'] * (1, -1)[int(pt_cp.vl["EPS_01"]['Driver_Strain_VZ'])]
ret.steeringPressed = abs(ret.steeringTorque) > CarControllerParams.STEER_DRIVER_ALLOWANCE
ret.yawRate = pt_cp.vl["ESP_02"]['ESP_Gierrate'] * (1,-1)[int(pt_cp.vl["ESP_02"]['ESP_VZ_Gierrate'])] * CV.DEG_TO_RAD
ret.yawRate = pt_cp.vl["ESP_02"]['ESP_Gierrate'] * (1, -1)[int(pt_cp.vl["ESP_02"]['ESP_VZ_Gierrate'])] * CV.DEG_TO_RAD
# Update gas, brakes, and gearshift.
ret.gas = pt_cp.vl["Motor_20"]['MO_Fahrpedalrohwert_01'] / 100.0
ret.gasPressed = ret.gas > 0
ret.brake = pt_cp.vl["ESP_05"]['ESP_Bremsdruck'] / 250.0 # FIXME: this is pressure in Bar, not sure what OP expects
ret.brake = pt_cp.vl["ESP_05"]['ESP_Bremsdruck'] / 250.0 # FIXME: this is pressure in Bar, not sure what OP expects
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 +116,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 +137,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 +146,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 +272,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,60 +285,150 @@ 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
("GRA_Tip_Hoch", "GRA_ACC_01", 0), # ACC button, increase or accel
("GRA_Tip_Runter", "GRA_ACC_01", 0), # ACC button, decrease or decel
("GRA_Tip_Wiederaufnahme", "GRA_ACC_01", 0), # ACC button, resume
("GRA_Verstellung_Zeitluecke", "GRA_ACC_01", 0), # ACC button, time gap adj
("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)
+77 -39
View File
@@ -1,20 +1,25 @@
from cereal import car
from selfdrive.config import Conversions as CV
from selfdrive.swaglog import cloudlog
from selfdrive.controls.lib.drive_helpers import create_event, EventTypes as ET
from selfdrive.car.volkswagen.values import CAR, BUTTON_STATES
from common.params import put_nonblocking
from selfdrive.car.volkswagen.values import CAR, BUTTON_STATES, NWL, TRANS, GEAR, MQB_CARS, PQ_CARS
from common.params import Params
from selfdrive.car import STD_CARGO_KG, scale_rot_inertia, scale_tire_stiffness, gen_empty_fingerprint
from selfdrive.car.interfaces import CarInterfaceBase
GEAR = car.CarState.GearShifter
class CarInterface(CarInterfaceBase):
def __init__(self, CP, CarController, CarState):
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
@@ -23,46 +28,67 @@ class CarInterface(CarInterfaceBase):
def get_params(candidate, fingerprint=gen_empty_fingerprint(), has_relay=False, car_fw=[]):
ret = CarInterfaceBase.get_std_params(candidate, fingerprint, has_relay)
# 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 = 0.5
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
# As a starting point for speed-adjusted lateral tuning, use the example
# map speed breakpoints from a VW Tiguan (SSP 399 page 9). It's unclear
# whether the driver assist map breakpoints have any direct bearing on
# HCA assist torque, but if they're good breakpoints for the driver,
# they're probably good breakpoints for HCA as well. OP won't be driving
# 250kph/155mph but it provides interpolation scaling above 100kmh/62mph.
ret.lateralTuning.pid.kpBP = [0., 15 * CV.KPH_TO_MS, 50 * CV.KPH_TO_MS]
ret.lateralTuning.pid.kiBP = [0., 15 * CV.KPH_TO_MS, 50 * CV.KPH_TO_MS]
elif candidate in PQ_CARS:
# Configurations shared between all PQ35/PQ46/NMS vehicles
ret.carName = "volkswagen"
ret.safetyModel = car.CarParams.SafetyModel.volkswagenPq
# FIXME: Per-vehicle parameters need to be reintegrated.
# For the time being, per-vehicle stuff is being archived since we
# can't auto-detect very well yet. Now that tuning is figured out,
# averaged params should work reasonably on a range of cars. Owners
# can tweak here, as needed, until we have car type auto-detection.
# 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
ret.mass = 1700 + STD_CARGO_KG
ret.wheelbase = 2.75
ret.centerToFront = ret.wheelbase * 0.45
cloudlog.warning("Detected network location: %s", ret.networkLocation)
cloudlog.warning("Detected transmission type: %s", ret.transmissionType)
# 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 # Estimated
ret.steerRatio = 15.6
ret.lateralTuning.pid.kf = 0.00006
ret.lateralTuning.pid.kpV = [0.15, 0.25, 0.60]
ret.lateralTuning.pid.kiV = [0.05, 0.05, 0.05]
tire_stiffness_factor = 0.6
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
# TODO: get actual value, for now starting with reasonable value for
# civic and scaling by mass and wheelbase
@@ -79,6 +105,7 @@ class CarInterface(CarInterfaceBase):
def update(self, c, can_strings):
canMonoTimes = []
buttonEvents = []
params = Params()
# Process the most recent CAN message traffic, and check for validity
# The camera CAN has no signals we use at this time, but we process it
@@ -86,14 +113,14 @@ class CarInterface(CarInterfaceBase):
self.cp.update_strings(can_strings)
self.cp_cam.update_strings(can_strings)
ret = self.CS.update(self.cp)
ret.canValid = self.cp.can_valid and self.cp_cam.can_valid
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
# Update the EON metric configuration to match the car at first startup,
# or if there's been a change.
if self.CS.displayMetricUnits != self.displayMetricUnitsPrev:
put_nonblocking("IsMetric", "1" if self.CS.displayMetricUnits else "0")
params.put("IsMetric", "1" if self.CS.displayMetricUnits else "0")
# Check for and process state-change events (button press or release) from
# the turn stalk switch or ACC steering wheel/control stalk buttons.
@@ -112,11 +139,22 @@ class CarInterface(CarInterfaceBase):
if self.CS.steeringFault:
events.append(create_event('steerTempUnavailable', [ET.NO_ENTRY, ET.WARNING]))
# Engagement and longitudinal control using stock ACC. Make sure OP is
# disengaged if stock ACC is disengaged.
if not ret.cruiseState.enabled:
events.append(create_event('pcmDisable', [ET.USER_DISABLE]))
# Attempt OP engagement only on rising edge of stock ACC engagement.
elif not self.cruise_enabled_prev:
events.append(create_event('pcmEnable', [ET.ENABLE]))
ret.events = events
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()
+68 -10
View File
@@ -1,8 +1,22 @@
# --------------------------------------------------------------------------- #
# #
# from: https://github.com/jyoung8607/openpilot/tree/vw-community-private-pq #
# verify: dinglx@uincore.net(https://shop442817640.taobao.com) #
# Date: 2020-05-22 #
# #
# --------------------------------------------------------------------------- #
from cereal import car
from selfdrive.car import dbc_dict
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
@@ -12,8 +26,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
@@ -22,6 +39,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,
@@ -44,15 +65,52 @@ 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),
}
+47 -2
View File
@@ -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
+10
View File
@@ -143,3 +143,13 @@ 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);
}
+1
View File
@@ -13,6 +13,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);
/* Display power modes */
enum {
+12
View File
@@ -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
View File
@@ -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,
+96 -29
View File
@@ -25,6 +25,8 @@ from selfdrive.controls.lib.alertmanager import AlertManager
from selfdrive.controls.lib.vehicle_model import VehicleModel
from selfdrive.controls.lib.planner import LON_MPC_STEP
from selfdrive.locationd.calibration_helpers import Calibration, Filter
# dp
from common.dp import get_last_modified
LANE_DEPARTURE_THRESHOLD = 0.1
STEER_ANGLE_SATURATION_TIMEOUT = 1.0 / DT_CTRL
@@ -37,15 +39,15 @@ HwType = log.HealthData.HwType
LaneChangeState = log.PathPlan.LaneChangeState
LaneChangeDirection = log.PathPlan.LaneChangeDirection
def add_lane_change_event(events, path_plan):
postfix = 'ALC' if path_plan.alcAllowed else ''
if path_plan.laneChangeState == LaneChangeState.preLaneChange:
if path_plan.laneChangeDirection == LaneChangeDirection.left:
events.append(create_event('preLaneChangeLeft', [ET.WARNING]))
events.append(create_event(f"preLaneChangeLeft{postfix}", [ET.WARNING]))
else:
events.append(create_event('preLaneChangeRight', [ET.WARNING]))
events.append(create_event(f"preLaneChangeRight{postfix}", [ET.WARNING]))
elif path_plan.laneChangeState in [LaneChangeState.laneChangeStarting, LaneChangeState.laneChangeFinishing]:
events.append(create_event('laneChange', [ET.WARNING]))
events.append(create_event(f"laneChange{postfix}", [ET.WARNING]))
def isActive(state):
@@ -69,7 +71,7 @@ def events_to_bytes(events):
return ret
def data_sample(CI, CC, sm, can_sock, state, mismatch_counter, can_error_counter, params):
def data_sample(CI, CC, sm, can_sock, state, mismatch_counter, can_error_counter, params, dragon_toyota_stock_dsu, dp_max_speed_limit):
"""Receive data from sockets and create events for battery, temperature and disk space"""
# Update carstate from CAN and create events
@@ -116,7 +118,7 @@ def data_sample(CI, CC, sm, can_sock, state, mismatch_counter, can_error_counter
else:
events.append(create_event('calibrationInvalid', [ET.NO_ENTRY, ET.SOFT_DISABLE]))
if CS.vEgo > 92 * CV.MPH_TO_MS:
if CS.vEgo > dp_max_speed_limit:
events.append(create_event('speedTooHigh', [ET.NO_ENTRY, ET.SOFT_DISABLE]))
# When the panda and controlsd do not agree on controls_allowed
@@ -126,11 +128,12 @@ def data_sample(CI, CC, sm, can_sock, state, mismatch_counter, can_error_counter
if not enabled:
mismatch_counter = 0
controls_allowed = sm['health'].controlsAllowed
if not controls_allowed and enabled:
mismatch_counter += 1
if mismatch_counter >= 200:
events.append(create_event('controlsMismatch', [ET.IMMEDIATE_DISABLE]))
if not dragon_toyota_stock_dsu:
controls_allowed = sm['health'].controlsAllowed
if not controls_allowed and enabled:
mismatch_counter += 1
if mismatch_counter >= 200:
events.append(create_event('controlsMismatch', [ET.IMMEDIATE_DISABLE]))
return CS, events, cal_perc, mismatch_counter, can_error_counter
@@ -223,7 +226,7 @@ def state_transition(frame, CS, CP, state, events, soft_disable_timer, v_cruise_
def state_control(frame, rcv_frame, plan, path_plan, CS, CP, state, events, v_cruise_kph, v_cruise_kph_last,
AM, rk, LaC, LoC, read_only, is_metric, cal_perc, last_blinker_frame, saturated_count):
AM, rk, LaC, LoC, read_only, is_metric, cal_perc, last_blinker_frame, saturated_count, dragon_lat_control, dragon_display_steering_limit_alert, dragon_lead_car_moving_alert):
"""Given the state, this function returns an actuators packet"""
actuators = car.CarControl.Actuators.new_message()
@@ -245,8 +248,13 @@ def state_control(frame, rcv_frame, plan, path_plan, CS, CP, state, events, v_cr
# State specific actions
if state in [State.preEnabled, State.disabled]:
if dragon_lead_car_moving_alert:
for e in get_events(events, [ET.WARNING]):
extra_text = ""
if e in ["leadCarDetected", "leadCarMoving"]:
AM.add(frame, e, enabled, extra_text_2=extra_text)
LaC.reset()
LoC.reset(v_pid=CS.vEgo)
LoC.reset(v_pid=plan.vTargetFuture)
elif state in [State.enabled, State.softDisabling]:
# parse warnings from car specific interface
@@ -266,7 +274,7 @@ def state_control(frame, rcv_frame, plan, path_plan, CS, CP, state, events, v_cr
v_acc_sol = plan.vStart + dt * (a_acc_sol + plan.aStart) / 2.0
# Gas/Brake PID loop
actuators.gas, actuators.brake = LoC.update(active, CS.vEgo, CS.brakePressed, CS.standstill, CS.cruiseState.standstill,
actuators.gas, actuators.brake = LoC.update(active, CS.vEgo, CS.gasPressed, CS.brakePressed, CS.standstill, CS.cruiseState.standstill,
v_cruise_kph, v_acc_sol, plan.vTargetFuture, a_acc_sol, CP)
# Steering PID loop and lateral MPC
actuators.steer, actuators.steerAngle, lac_log = LaC.update(active, CS.vEgo, CS.steeringAngle, CS.steeringRate, CS.steeringTorqueEps, CS.steeringPressed, CS.steeringRateLimited, CP, path_plan)
@@ -277,14 +285,15 @@ def state_control(frame, rcv_frame, plan, path_plan, CS, CP, state, events, v_cr
saturated_count = saturated_count + 1 if angle_control_saturated and not CS.steeringPressed and active else 0
# Send a "steering required alert" if saturation count has reached the limit
if (lac_log.saturated and not CS.steeringPressed) or (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 dragon_display_steering_limit_alert and dragon_lat_control:
# Send a "steering required alert" if saturation count has reached the limit
if (lac_log.saturated and not CS.steeringPressed) or (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:
AM.add(frame, "steerSaturated", enabled)
if left_deviation or right_deviation:
AM.add(frame, "steerSaturated", enabled)
# Parse permanent warnings to display constantly
for e in get_events(events, [ET.PERMANENT]):
@@ -302,7 +311,7 @@ def state_control(frame, rcv_frame, plan, path_plan, CS, CP, state, events, v_cr
def data_send(sm, pm, CS, CI, CP, VM, state, events, actuators, v_cruise_kph, rk, AM,
LaC, LoC, read_only, start_time, v_acc, a_acc, lac_log, events_prev,
last_blinker_frame, is_ldw_enabled, can_error_counter):
last_blinker_frame, is_ldw_enabled, can_error_counter, dp_camera_offset):
"""Send actuators and hud commands to the car, send controlsstate and MPC logging"""
CC = car.CarControl.new_message()
@@ -336,8 +345,8 @@ def data_send(sm, pm, CS, CI, CP, VM, state, events, actuators, v_cruise_kph, rk
l_lane_change_prob = md.meta.desirePrediction[log.PathPlan.Desire.laneChangeLeft - 1]
r_lane_change_prob = md.meta.desirePrediction[log.PathPlan.Desire.laneChangeRight - 1]
l_lane_close = left_lane_visible and (sm['pathPlan'].lPoly[3] < (1.08 - CAMERA_OFFSET))
r_lane_close = right_lane_visible and (sm['pathPlan'].rPoly[3] > -(1.08 + CAMERA_OFFSET))
l_lane_close = left_lane_visible and (sm['pathPlan'].lPoly[3] < (1.08 - dp_camera_offset))
r_lane_close = right_lane_visible and (sm['pathPlan'].rPoly[3] > -(1.08 + dp_camera_offset))
if ldw_allowed:
CC.hudControl.leftLaneDepart = bool(l_lane_change_prob > LANE_DEPARTURE_THRESHOLD and l_lane_close)
@@ -535,12 +544,47 @@ def controlsd_thread(sm=None, pm=None, can_sock=None):
prof = Profiler(False) # off by default
# dp
ts_last_check = 0.
dragon_toyota_stock_dsu = False
dragon_lat_control = True
dragon_display_steering_limit_alert = True
dragon_stopped_has_lead_count = 0
dragon_lead_car_moving_alert = False
dp_last_modified = None
dp_camera_offset = CAMERA_OFFSET
dp_max_speed_limit = 92. * CV.MPH_TO_MS
while True:
start_time = sec_since_boot()
# dp
ts = start_time
if ts - ts_last_check >= 5.:
modified = get_last_modified()
if dp_last_modified != modified:
try:
dp_camera_offset = int(params.get("DragonCameraOffset", encoding='utf8')) * 0.01
except (TypeError, ValueError):
dp_camera_offset = CAMERA_OFFSET
try:
dp_max_speed_limit = float(params.get("DragonMaxSpeedLimit", encoding='utf8')) * CV.MPH_TO_MS
except (TypeError, ValueError):
dp_max_speed_limit = 92. * CV.MPH_TO_MS
dragon_toyota_stock_dsu = True if params.get("DragonToyotaStockDSU", encoding='utf8') == "1" else False
dragon_lat_control = False if params.get("DragonLatCtrl", encoding='utf8') == "0" else True
if dragon_lat_control:
dragon_display_steering_limit_alert = False if params.get("DragonDisplaySteeringLimitAlert", encoding='utf8') == "0" else True
else:
dragon_display_steering_limit_alert = False
dragon_lead_car_moving_alert = True if params.get("DragonEnableLeadCarMovingAlert", encoding='utf8') == "1" else False
dp_last_modified = modified
ts_last_check = ts
prof.checkpoint("Ratekeeper", ignore=True)
# Sample data and compute car events
CS, events, cal_perc, mismatch_counter, can_error_counter = data_sample(CI, CC, sm, can_sock, state, mismatch_counter, can_error_counter, params)
CS, events, cal_perc, mismatch_counter, can_error_counter = data_sample(CI, CC, sm, can_sock, state, mismatch_counter, can_error_counter, params, dragon_toyota_stock_dsu, dp_max_speed_limit)
prof.checkpoint("Sample")
# Create alerts
@@ -561,7 +605,10 @@ def controlsd_thread(sm=None, pm=None, can_sock=None):
if sm['plan'].radarCanError:
events.append(create_event('radarCanError', [ET.NO_ENTRY, ET.SOFT_DISABLE]))
if not CS.canValid:
events.append(create_event('canError', [ET.NO_ENTRY, ET.IMMEDIATE_DISABLE]))
if dragon_toyota_stock_dsu:
events.append(create_event('pcmDisable', [ET.USER_DISABLE]))
else:
events.append(create_event('canError', [ET.NO_ENTRY, ET.IMMEDIATE_DISABLE]))
if not sounds_available:
events.append(create_event('soundsUnavailable', [ET.NO_ENTRY, ET.PERMANENT]))
if internet_needed:
@@ -575,9 +622,29 @@ def controlsd_thread(sm=None, pm=None, can_sock=None):
# Only allow engagement with brake pressed when stopped behind another stopped car
if CS.brakePressed and sm['plan'].vTargetFuture >= STARTING_TARGET_SPEED and not CP.radarOffCan and CS.vEgo < 0.3:
if not dragon_toyota_stock_dsu and CS.brakePressed and sm['plan'].vTargetFuture >= STARTING_TARGET_SPEED and not CP.radarOffCan and CS.vEgo < 0.3:
events.append(create_event('noTarget', [ET.NO_ENTRY, ET.IMMEDIATE_DISABLE]))
# dp
if dragon_lead_car_moving_alert:
# when car has a lead and is standstill and lead is barely moving, we start counting
if not CP.radarOffCan and sm['plan'].hasLead and CS.vEgo <= 0.01 and 0.3 >= abs(sm['plan'].vTarget) >= 0:
dragon_stopped_has_lead_count += 1
else:
dragon_stopped_has_lead_count = 0
# when we detect lead car over 3 secs and the lead car is started moving, we are ready to send alerts
# once the condition is triggered, we want to keep the trigger
if dragon_stopped_has_lead_count >= 300:
if abs(sm['plan'].vTargetFuture) >= 0.1:
events.append(create_event('leadCarMoving', [ET.WARNING]))
else:
events.append(create_event('leadCarDetected', [ET.WARNING]))
# we remove alert once our car is moving
if CS.vEgo > 0.:
dragon_stopped_has_lead_count = 0
if not read_only:
# update control state
state, soft_disable_timer, v_cruise_kph, v_cruise_kph_last = \
@@ -587,14 +654,14 @@ def controlsd_thread(sm=None, pm=None, can_sock=None):
# Compute actuators (runs PID loops and lateral MPC)
actuators, v_cruise_kph, v_acc, a_acc, lac_log, last_blinker_frame, saturated_count = \
state_control(sm.frame, sm.rcv_frame, sm['plan'], sm['pathPlan'], CS, CP, state, events, v_cruise_kph, v_cruise_kph_last, AM, rk,
LaC, LoC, read_only, is_metric, cal_perc, last_blinker_frame, saturated_count)
LaC, LoC, read_only, is_metric, cal_perc, last_blinker_frame, saturated_count, dragon_lat_control, dragon_display_steering_limit_alert, dragon_lead_car_moving_alert)
prof.checkpoint("State Control")
# Publish data
CC, events_prev = data_send(sm, pm, CS, CI, CP, VM, state, events, actuators, v_cruise_kph, rk, AM, LaC,
LoC, read_only, start_time, v_acc, a_acc, lac_log, events_prev, last_blinker_frame,
is_ldw_enabled, can_error_counter)
is_ldw_enabled, can_error_counter, dp_camera_offset)
prof.checkpoint("Sent")
rk.monitor_time()
+32 -1
View File
@@ -1,11 +1,13 @@
#!/usr/bin/env python3
import gc
from common.realtime import set_realtime_priority
from common.realtime import set_realtime_priority, sec_since_boot
from common.params import Params
import cereal.messaging as messaging
from selfdrive.controls.lib.drive_helpers import create_event, EventTypes as ET
from selfdrive.controls.lib.driver_monitor import DriverStatus, MAX_TERMINAL_ALERTS, MAX_TERMINAL_DURATION
from selfdrive.locationd.calibration_helpers import Calibration
params = Params()
from common.dp import get_last_modified
def dmonitoringd_thread(sm=None, pm=None):
gc.disable()
@@ -40,8 +42,37 @@ def dmonitoringd_thread(sm=None, pm=None):
v_cruise_last = 0
driver_engaged = False
# dragonpilot
last_ts = 0
dp_last_modified = None
dp_enable_driver_monitoring = True
# 10Hz <- dmonitoringmodeld
while True:
cur_time = sec_since_boot()
if cur_time - last_ts >= 5.:
modified = get_last_modified()
if dp_last_modified != modified:
dp_enable_driver_monitoring = False if params.get("DragonEnableDriverMonitoring", encoding='utf8') == "0" else True
try:
dp_awareness_time = int(params.get("DragonSteeringMonitorTimer", encoding='utf8'))
except (TypeError, ValueError):
dp_awareness_time = 70.
driver_status.awareness_time = 86400 if dp_awareness_time <= 0. else dp_awareness_time * 60.
dp_last_modified = modified
last_ts = cur_time
# reset all awareness val and set to rhd region, this will enforce steering monitor.
if not dp_enable_driver_monitoring:
driver_status.active_monitoring_mode = False
driver_status.awareness = 1.
driver_status.awareness_active = 1.
driver_status.awareness_passive = 1.
driver_status.terminal_alert_cnt = 0
driver_status.terminal_time = 0
driver_status.face_detected = False
driver_status.hi_stds = 0
sm.update()
# Handle calibration
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,353 @@
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 cereal.messaging import SubMaster
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
from common.dp import get_last_modified
from common.params import Params
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
# dp params
self.last_ts = 0.
self.dp_df_profile = PROFILE_OFF
self.dp_last_modified = None
self.params = Params()
self._setup_collector()
self._setup_changing_variables()
def _setup_collector(self):
self.sm = SubMaster(['liveTracks'])
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 self.mpc_id == 1:
self._gather_data()
if not self.lead_data.status or self.dp_df_profile == 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):
# dp
# update() gets call every time so we can read profile from param here
# as usual, we update every 5 secs
ts = sec_since_boot()
if self.last_ts is None or ts - self.last_ts >= 5.:
modified = get_last_modified()
if self.dp_last_modified != modified:
try:
self.dp_df_profile = int(self.params.get("DragonDynamicFollow", encoding='utf8'))
if self.dp_df_profile > 4 or self.dp_df_profile < 0:
self.dp_df_profile = 0
except (TypeError, ValueError):
self.dp_df_profile = PROFILE_OFF
self.dp_last_modified = modified
self.last_ts = ts
if self.dp_df_profile == PROFILE_AUTO:
self._get_pred() # sets self.model_profile, all other checks are inside function
def _gather_data(self):
self.sm.update(0)
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_df_profile == 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_df_profile
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
@@ -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
+21 -2
View File
@@ -1,6 +1,10 @@
from common.numpy_fast import interp
import numpy as np
from cereal import log
from common.dp import get_last_modified
from common.realtime import sec_since_boot
from common.params import Params
params = Params()
CAMERA_OFFSET = 0.06 # m from center car to camera
@@ -65,6 +69,11 @@ class LanePlanner():
self._path_pinv = compute_path_pinv()
self.x_points = np.arange(50)
# dp
self.last_ts = 0.
self.last_modified = 0.
self.camera_offset = 0.06
def parse_model(self, md):
if len(md.leftLane.poly):
self.l_poly = np.array(md.leftLane.poly)
@@ -82,9 +91,19 @@ class LanePlanner():
self.r_lane_change_prob = md.meta.desireState[log.PathPlan.Desire.laneChangeRight - 1]
def update_d_poly(self, v_ego):
ts = sec_since_boot()
if ts - self.last_ts >= 5.:
modified = get_last_modified()
if self.last_modified != modified:
try:
self.camera_offset = int(params.get("DragonCameraOffset", encoding='utf8')) * 0.01
except (TypeError, ValueError):
self.camera_offset = CAMERA_OFFSET
self.last_modified = modified
self.last_ts = ts
# 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
self.l_poly[3] += self.camera_offset
self.r_poly[3] += self.camera_offset
# Find current lanewidth
self.lane_width_certainty += 0.05 * (self.l_prob * self.r_prob - self.lane_width_certainty)
+6 -2
View File
@@ -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:
+2 -2
View File
@@ -71,7 +71,7 @@ class LongControl():
self.pid.reset()
self.v_pid = v_pid
def update(self, active, v_ego, brake_pressed, standstill, cruise_standstill, v_cruise, v_target, v_target_future, a_target, CP):
def update(self, active, v_ego, gas_pressed, brake_pressed, standstill, cruise_standstill, v_cruise, v_target, v_target_future, a_target, CP):
"""Update longitudinal control. This updates the state machine and runs a PID loop"""
# Actuation limits
gas_max = interp(v_ego, CP.gasMaxBP, CP.gasMaxV)
@@ -85,7 +85,7 @@ class LongControl():
v_ego_pid = max(v_ego, 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 gas_pressed or brake_pressed:
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.
+123 -7
View File
@@ -6,9 +6,12 @@ from selfdrive.controls.lib.lateral_mpc import libmpc_py
from selfdrive.controls.lib.drive_helpers import MPC_COST_LAT
from selfdrive.controls.lib.lane_planner import LanePlanner
from selfdrive.config import Conversions as CV
from common.params import Params
from common.params import Params, put_nonblocking
import cereal.messaging as messaging
from cereal import log
# dragonpilot
from common.dp import get_last_modified
from common.numpy_fast import interp
LaneChangeState = log.PathPlan.LaneChangeState
LaneChangeDirection = log.PathPlan.LaneChangeDirection
@@ -62,6 +65,24 @@ class PathPlanner():
self.lane_change_ll_prob = 1.0
self.prev_one_blinker = False
# dragonpilot
self.params = Params()
self.dragon_auto_lc_enabled = False
self.dragon_auto_lc_allowed = False
self.dragon_auto_lc_timer = None
self.dragon_assisted_lc_min_mph = LANE_CHANGE_SPEED_MIN
self.dragon_auto_lc_min_mph = 60 * CV.MPH_TO_MS
self.dragon_auto_lc_delay = 2.
self.last_ts = 0.
self.dp_last_modified = None
self.dp_enable_sr_boost = False
self.dp_continuous_auto_lc = False
self.dp_did_auto_lc = False
self.dp_steer_ratio = 0.
self.dp_sr_boost_bp = None
self.dp_sr_boost_range = None
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)
@@ -79,6 +100,65 @@ class PathPlanner():
self.angle_steers_des_time = 0.0
def update(self, sm, pm, CP, VM):
# dragonpilot
cur_time = sec_since_boot()
if cur_time - self.last_ts >= 5.:
modified = get_last_modified()
if self.dp_last_modified != modified:
self.lane_change_enabled = True if self.params.get("LaneChangeEnabled", encoding='utf8') == "1" else False
if self.lane_change_enabled:
self.dragon_auto_lc_enabled = True if self.params.get("DragonEnableAutoLC", encoding='utf8') == "1" else False
# adjustable assisted lc min speed
try:
self.dragon_assisted_lc_min_mph = float(self.params.get("DragonAssistedLCMinMPH", encoding='utf8'))
except (TypeError, ValueError):
self.dragon_assisted_lc_min_mph = 45
self.dragon_assisted_lc_min_mph *= CV.MPH_TO_MS
if self.dragon_assisted_lc_min_mph < 0:
self.dragon_assisted_lc_min_mph = 0
if self.dragon_auto_lc_enabled:
self.dp_continuous_auto_lc = True if self.params.get("DragonEnableContALC", encoding='utf8') == "1" else False
# adjustable auto lc min speed
try:
self.dragon_auto_lc_min_mph = float(self.params.get("DragonAutoLCMinMPH", encoding='utf8'))
except (TypeError, ValueError):
self.dragon_auto_lc_min_mph = 60
self.dragon_auto_lc_min_mph *= CV.MPH_TO_MS
if self.dragon_auto_lc_min_mph < 0:
self.dragon_auto_lc_min_mph = 0
# when auto lc is smaller than assisted lc, we set assisted lc to the same speed as auto lc
if self.dragon_auto_lc_min_mph < self.dragon_assisted_lc_min_mph:
self.dragon_assisted_lc_min_mph = self.dragon_auto_lc_min_mph
# adjustable auto lc delay
try:
self.dragon_auto_lc_delay = float(self.params.get("DragonAutoLCDelay", encoding='utf8'))
except (TypeError, ValueError):
self.dragon_auto_lc_delay = 2.
if self.dragon_auto_lc_delay < 0:
self.dragon_auto_lc_delay = 0
else:
self.dragon_auto_lc_enabled = False
self.dp_enable_sr_boost = True if self.params.get("DragonEnableSteerBoost", encoding='utf8') == "1" else False
if self.dp_enable_sr_boost:
try:
sr_boost_min = float(self.params.get("DragonSteerBoostMin", encoding='utf8'))
sr_boost_Max = float(self.params.get("DragonSteerBoostMax", encoding='utf8'))
self.dp_sr_boost_range = [sr_boost_min, sr_boost_Max]
boost_min_at = float(self.params.get("DragonSteerBoostMinAt", encoding='utf8'))
boost_max_at = float(self.params.get("DragonSteerBoostMaxAt", encoding='utf8'))
self.dp_sr_boost_bp = [boost_min_at, boost_max_at]
except (TypeError, ValueError):
put_nonblocking("DragonEnableSteerBoost", '0')
self.dp_enable_sr_boost = False
if not self.dp_enable_sr_boost:
self.dp_sr_boost_range = [0., 0.]
self.dp_sr_boost_bp = [0., 0.]
self.dp_last_modified = modified
self.last_ts = cur_time
v_ego = sm['carState'].vEgo
angle_steers = sm['carState'].steeringAngle
active = sm['controlsState'].active
@@ -89,12 +169,14 @@ class PathPlanner():
self.angle_steers_des_prev = self.angle_steers_des_mpc
VM.update_params(sm['liveParameters'].stiffnessFactor, sm['liveParameters'].steerRatio)
curvature_factor = VM.curvature_factor(v_ego)
boost_rate = (1 + (interp(abs(angle_steers), self.dp_sr_boost_bp, self.dp_sr_boost_range) / 100)) if self.dp_enable_sr_boost else 1
self.dp_steer_ratio = VM.sR * boost_rate
self.LP.parse_model(sm['model'])
# 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 < self.dragon_assisted_lc_min_mph
if sm['carState'].leftBlinker:
self.lane_change_direction = LaneChangeDirection.left
@@ -111,6 +193,33 @@ class PathPlanner():
lane_change_prob = self.LP.l_lane_change_prob + self.LP.r_lane_change_prob
# dragonpilot auto lc
if not below_lane_change_speed and self.dragon_auto_lc_enabled and v_ego >= self.dragon_auto_lc_min_mph:
# 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 self.dp_continuous_auto_lc 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 + self.dragon_auto_lc_delay
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:
@@ -141,11 +250,17 @@ class PathPlanner():
elif self.lane_change_ll_prob > 0.99:
self.lane_change_state = LaneChangeState.off
# 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]
@@ -157,7 +272,7 @@ class PathPlanner():
self.LP.update_d_poly(v_ego)
# account for actuation delay
self.cur_state = calc_states_after_delay(self.cur_state, v_ego, angle_steers - angle_offset, curvature_factor, VM.sR, CP.steerActuatorDelay)
self.cur_state = calc_states_after_delay(self.cur_state, v_ego, angle_steers - angle_offset, curvature_factor, self.dp_steer_ratio, CP.steerActuatorDelay)
v_ego_mpc = max(v_ego, 5.0) # avoid mpc roughness due to low speed
self.libmpc.run_mpc(self.cur_state, self.mpc_solution,
@@ -167,21 +282,21 @@ class PathPlanner():
# reset to current steer angle if not active or overriding
if active:
delta_desired = self.mpc_solution[0].delta[1]
rate_desired = math.degrees(self.mpc_solution[0].rate[0] * VM.sR)
rate_desired = math.degrees(self.mpc_solution[0].rate[0] * self.dp_steer_ratio)
else:
delta_desired = math.radians(angle_steers - angle_offset) / VM.sR
delta_desired = math.radians(angle_steers - angle_offset) / self.dp_steer_ratio
rate_desired = 0.0
self.cur_state[0].delta = delta_desired
self.angle_steers_des_mpc = float(math.degrees(delta_desired * VM.sR) + angle_offset)
self.angle_steers_des_mpc = float(math.degrees(delta_desired * self.dp_steer_ratio) + angle_offset)
# Check for infeasable MPC solution
mpc_nans = any(math.isnan(x) for x in self.mpc_solution[0].delta)
t = sec_since_boot()
if mpc_nans:
self.libmpc.init(MPC_COST_LAT.PATH, MPC_COST_LAT.LANE, MPC_COST_LAT.HEADING, CP.steerRateCost)
self.cur_state[0].delta = math.radians(angle_steers - angle_offset) / VM.sR
self.cur_state[0].delta = math.radians(angle_steers - angle_offset) / self.dp_steer_ratio
if t > self.last_cloudlog_t + 5.0:
self.last_cloudlog_t = t
@@ -213,6 +328,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.alcAllowed = self.dragon_auto_lc_allowed
pm.send('pathPlan', plan_send)
+102 -3
View File
@@ -10,10 +10,11 @@ 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
self._k_p = k_p # proportional gain
self._k_i = k_i # integral gain
self.k_f = k_f # feedforward gain
self.pos_limit = pos_limit
@@ -86,3 +87,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.op_params.get('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
+76 -12
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
import math
import numpy as np
from common.params import Params
from common.params import Params, put_nonblocking
from common.numpy_fast import interp
import cereal.messaging as messaging
@@ -13,6 +13,7 @@ from selfdrive.controls.lib.speed_smoother import speed_smoother
from selfdrive.controls.lib.longcontrol import LongCtrlState, MIN_CAN_SPEED
from selfdrive.controls.lib.fcw import FCWChecker
from selfdrive.controls.lib.long_mpc import LongitudinalMpc
from common.dp import get_last_modified
MAX_SPEED = 255.0
@@ -39,23 +40,64 @@ _A_TOTAL_MAX_BP = [20., 40.]
SPEED_PERCENTILE_IDX = 7
def calc_cruise_accel_limits(v_ego, following):
a_cruise_min = interp(v_ego, _A_CRUISE_MIN_BP, _A_CRUISE_MIN_V)
# dp
# accel profile by @arne182
_AP_CRUISE_MIN_V = [-2.0, -1.5, -1.0, -0.7, -0.5]
_AP_CRUISE_MIN_V_ECO = [-1.0, -0.7, -0.6, -0.5, -0.3]
_AP_CRUISE_MIN_V_SPORT = [-3.0, -2.6, -2.3, -2.0, -1.0]
_AP_CRUISE_MIN_V_FOLLOWING = [-4.0, -4.0, -3.5, -2.5, -2.0]
_AP_CRUISE_MIN_BP = [0.0, 5.0, 10.0, 20.0, 55.0]
if following:
a_cruise_max = interp(v_ego, _A_CRUISE_MAX_BP, _A_CRUISE_MAX_V_FOLLOWING)
_AP_CRUISE_MAX_V = [2.0, 2.0, 1.5, .5, .3]
_AP_CRUISE_MAX_V_ECO = [0.8, 0.9, 1.0, 0.4, 0.2]
_AP_CRUISE_MAX_V_SPORT = [3.0, 3.5, 3.0, 2.0, 2.0]
_AP_CRUISE_MAX_V_FOLLOWING = [1.6, 1.4, 1.4, .7, .3]
_AP_CRUISE_MAX_BP = [0., 5., 10., 20., 55.]
# Lookup table for turns
_AP_TOTAL_MAX_V = [3.3, 3.0, 3.9]
_AP_TOTAL_MAX_BP = [0., 25., 55.]
AP_OFF = 0
AP_ECO = 1
AP_NORMAL = 2
AP_SPORT = 3
def calc_cruise_accel_limits(v_ego, following, accel_profile):
if accel_profile == AP_OFF:
a_cruise_min = interp(v_ego, _A_CRUISE_MIN_BP, _A_CRUISE_MIN_V)
if following:
a_cruise_max = interp(v_ego, _A_CRUISE_MAX_BP, _A_CRUISE_MAX_V_FOLLOWING)
else:
a_cruise_max = interp(v_ego, _A_CRUISE_MAX_BP, _A_CRUISE_MAX_V)
else:
a_cruise_max = interp(v_ego, _A_CRUISE_MAX_BP, _A_CRUISE_MAX_V)
if following:
a_cruise_min = interp(v_ego, _AP_CRUISE_MIN_BP, _AP_CRUISE_MIN_V_FOLLOWING)
a_cruise_max = interp(v_ego, _AP_CRUISE_MAX_BP, _AP_CRUISE_MAX_V_FOLLOWING)
else:
if accel_profile == AP_ECO:
a_cruise_min = interp(v_ego, _AP_CRUISE_MIN_BP, _AP_CRUISE_MIN_V_ECO)
a_cruise_max = interp(v_ego, _AP_CRUISE_MAX_BP, _AP_CRUISE_MAX_V_ECO)
elif accel_profile == AP_SPORT:
a_cruise_min = interp(v_ego, _AP_CRUISE_MIN_BP, _AP_CRUISE_MIN_V_SPORT)
a_cruise_max = interp(v_ego, _AP_CRUISE_MAX_BP, _AP_CRUISE_MAX_V_SPORT)
else:
a_cruise_min = interp(v_ego, _AP_CRUISE_MIN_BP, _AP_CRUISE_MIN_V)
a_cruise_max = interp(v_ego, _AP_CRUISE_MAX_BP, _AP_CRUISE_MAX_V)
return np.vstack([a_cruise_min, a_cruise_max])
def limit_accel_in_turns(v_ego, angle_steers, a_target, CP):
def limit_accel_in_turns(v_ego, angle_steers, a_target, CP, accel_profile):
"""
This function returns a limited long acceleration allowed, depending on the existing lateral acceleration
this should avoid accelerating when losing the target in turns
"""
a_total_max = interp(v_ego, _A_TOTAL_MAX_BP, _A_TOTAL_MAX_V)
if accel_profile == AP_OFF:
a_total_max = interp(v_ego, _A_TOTAL_MAX_BP, _A_TOTAL_MAX_V)
else:
a_total_max = interp(v_ego, _AP_TOTAL_MAX_BP, _AP_TOTAL_MAX_V)
a_y = v_ego**2 * angle_steers * CV.DEG_TO_RAD / (CP.steerRatio * CP.wheelbase)
a_x_allowed = math.sqrt(max(a_total_max**2 - a_y**2, 0.))
@@ -87,6 +129,14 @@ class Planner():
self.params = Params()
self.first_loop = True
# dp
self.dragon_slow_on_curve = True
self.dragon_alt_accel_profile = False
self.dragon_fast_accel = False
self.dragon_accel_profile = AP_OFF
self.last_ts = 0.
self.dp_last_modified = None
def choose_solution(self, v_cruise_setpoint, enabled):
if enabled:
solutions = {'model': self.v_model, 'cruise': self.v_cruise}
@@ -119,6 +169,20 @@ class Planner():
cur_time = sec_since_boot()
v_ego = sm['carState'].vEgo
# dp
# update variable status every 5 secs
if cur_time - self.last_ts >= 5.:
modified = get_last_modified()
if self.dp_last_modified != modified:
self.dragon_slow_on_curve = False if self.params.get("DragonEnableSlowOnCurve", encoding='utf8') == "0" else True
try:
self.dragon_accel_profile = int(self.params.get("DragonAccelProfile", encoding='utf8').rstrip('\x00'))
except (TypeError, ValueError):
self.dragon_accel_profile = AP_OFF
put_nonblocking('DragonAccelProfile', AP_OFF)
self.dp_last_modified = modified
self.last_ts = cur_time
long_control_state = sm['controlsState'].longControlState
v_cruise_kph = sm['controlsState'].vCruise
force_slow_decel = sm['controlsState'].forceDecel
@@ -130,7 +194,7 @@ 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
if len(sm['model'].path.poly):
if self.dragon_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
@@ -150,9 +214,9 @@ class Planner():
# 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)]
accel_limits = [float(x) for x in calc_cruise_accel_limits(v_ego, following, self.dragon_accel_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)
accel_limits_turns = limit_accel_in_turns(v_ego, sm['carState'].steeringAngle, accel_limits, self.CP, self.dragon_accel_profile)
if force_slow_decel:
# if required so, force a smooth deceleration
+51 -12
View File
@@ -3,53 +3,92 @@ 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 import is_online
CRASHES_DIR = '/sdcard/crash_logs/'
from selfdrive.swaglog import cloudlog
from common.android import ANDROID
if os.getenv("NOLOG") or os.getenv("NOCRASH") or not ANDROID:
def capture_exception(*exc_info):
def capture_exception(*args, **kwargs):
pass
def bind_user(**kwargs):
pass
def bind_extra(**kwargs):
pass
def install():
pass
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)
def install():
# installs a sys.excepthook
__excepthook__ = sys.excepthook
def handle_exception(*exc_info):
if exc_info[0] not in (KeyboardInterrupt, SystemExit):
capture_exception()
__excepthook__(*exc_info)
sys.excepthook = handle_exception
"""
Workaround for `sys.excepthook` thread bug from:
http://bugs.python.org/issue1230540
Call once from the main thread before creating any threads.
Source: https://stackoverflow.com/a/31622038
"""
# installs a sys.excepthook
__excepthook__ = sys.excepthook
def handle_exception(*exc_info):
if exc_info[0] not in (KeyboardInterrupt, SystemExit):
capture_exception()
__excepthook__(*exc_info)
sys.excepthook = handle_exception
init_original = threading.Thread.__init__
def init(self, *args, **kwargs):
+21
View File
@@ -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.
+456
View File
@@ -0,0 +1,456 @@
#!/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.realtime import sec_since_boot
from common.params import Params, put_nonblocking
params = Params()
from common.dp import get_last_modified
from math import floor
import re
import os
from common.dp import is_online
is_online = is_online()
is_cnpmjs_src = "cnpmjs" in subprocess.check_output(["git", "-C", "/data/openpilot", "config", "--get", "remote.origin.url"]).decode('utf8').rstrip()
auto_update = params.get("DragonAppAutoUpdate", encoding='utf8') == "1"
class App():
# app type
TYPE_GPS = 0
TYPE_SERVICE = 1
TYPE_GPS_SERVICE = 2
TYPE_FULLSCREEN = 3
TYPE_UTIL = 4
# 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_param = enable_param
# read auto run param
self.auto_run_param = auto_run_param
# read manual run param
self.manual_ctrl_param = manual_ctrl_param
# 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.is_installed = False
self.is_enabled = True if params.get(self.enable_param, encoding='utf8') == "1" else 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
if self.is_enabled:
local_version = self.get_local_version()
if local_version is not None:
self.is_installed = True
if is_online:
remote_version = local_version
if local_version is not None and auto_update:
remote_version = self.get_remote_version()
if local_version is None or (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:
put_nonblocking(self.manual_ctrl_param, '0')
self.last_ts = sec_since_boot()
def get_remote_version(self):
apk = self.app + ".apk"
try:
if is_cnpmjs_src:
url = "https://github.com.cnpmjs.org/dragonpilot-community/apps/raw/%s/VERSION" % apk
else:
url = "https://raw.githubusercontent.com/dragonpilot-community/apps/%s/VERSION" % apk
return subprocess.check_output(["curl", "-H", "'Cache-Control: no-cache'", "-s", url], stderr=subprocess.STDOUT, shell=True).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):
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:
put_nonblocking('DragonUpdating', '1')
if is_cnpmjs_src:
url = "https://github.com.cnpmjs.org/dragonpilot-community/apps/blob/%s/%s" % (apk, apk)
else:
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
put_nonblocking('DragonUpdating', '0')
try:
os.remove(apk_path)
except (OSError, FileNotFoundError) as e:
pass
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 read_params(self):
self.last_is_enabled = self.is_enabled
if self.enable_param is None:
self.is_enabled = False
else:
self.is_enabled = True if params.get(self.enable_param, encoding='utf8') == "1" else False
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, App.TYPE_GPS_SERVICE]:
self.is_auto_runnable = True
self.manual_ctrl_status = self.MANUAL_IDLE
else:
if self.manual_ctrl_param is None:
self.manual_ctrl_status = self.MANUAL_IDLE
else:
self.manual_ctrl_status = params.get(self.manual_ctrl_param, encoding='utf8')
if self.manual_ctrl_status == self.MANUAL_IDLE:
if self.auto_run_param is None:
self.is_auto_runnable = False
else:
self.is_auto_runnable = True if params.get(self.auto_run_param, encoding='utf8') == "1" else False
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('DragonLastModified', 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_GPS_SERVICE:
self.appops_set(self.app, "android:mock_location", "allow")
if self.app_type in [self.TYPE_SERVICE, self.TYPE_GPS_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_GPS_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",
"DragonGreyPandaMode",
None,
None,
App.TYPE_GPS_SERVICE,
[],
[],
))
apps.append(App(
"com.mixplorer",
"com.mixplorer.activities.BrowseActivity",
"DragonEnableMixplorer",
None,
"DragonRunMixplorer",
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",
"DragonEnableTomTom",
"DragonBootTomTom",
"DragonRunTomTom",
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",
"DragonEnableAegis",
"DragonBootAegis",
"DragonRunAegis",
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",
"DragonEnableAutonavi",
"DragonBootAutonavi",
"DragonRunAutonavi",
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",
"DragonWazeMode",
None,
"DragonRunWaze",
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 = []
# enable hotspot on boot
if params.get("DragonBootHotspot", encoding='utf8') == "1":
system(f"service call wifi 37 i32 0 i32 1")
# system(f"settings put system accelerometer_rotation 0")
# system(f"settings put system user_rotation 1")
# system(f"pm enable com.android.settings")
# system(f"am start -n com.android.settings/.TetherSettings")
# time.sleep(1)
# system(f"LD_LIBRARY_PATH= input tap 995 160")
# system(f"pkill com.android.settings")
last_started = False
thermal_sock = messaging.sub_sock('thermal')
frame = 0
start_delay = None
stop_delay = None
allow_auto_run = True
last_thermal_status = None
thermal_status = None
start_ts = sec_since_boot()
init_done = False
last_modified = None
while 1: #has_enabled_apps:
if not init_done:
if sec_since_boot() - start_ts >= 10:
init_apps(apps)
init_done = True
else:
enabled_apps = []
has_fullscreen_apps = False
modified = get_last_modified()
for app in apps:
# read params loop
if last_modified != modified:
app.read_params()
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)
last_modified = modified
msg = messaging.recv_sock(thermal_sock, wait=True)
started = msg.thermal.started
# when car is running
if started:
stop_delay = None
# apps start 5 secs later
if start_delay is None:
start_delay = frame + 5
thermal_status = msg.thermal.thermalStatus
if thermal_status <= ThermalStatus.yellow:
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_thermal_status == ThermalStatus.red:
start_delay = frame + 60
elif thermal_status >= ThermalStatus.red:
allow_auto_run = False
last_thermal_status = thermal_status
# 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.TYPE_GPS_SERVICE]:
app.run()
elif app.app_type == App.TYPE_UTIL:
app.kill()
# 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 += 3
time.sleep(3)
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()
+132
View File
@@ -0,0 +1,132 @@
#!/usr/bin/env python3.7
#
# courtesy of pjlao307 (https://github.com/pjlao307/)
# this is just his original implementation but
# in openpilot service form so it's always on
#
# with the highest bit rates, the video is approx. 0.5MB per second
# the default value is set to 2.56Mbps = 0.32MB per second
#
import os
import time
import datetime
import cereal.messaging as messaging
import subprocess
from selfdrive.swaglog import cloudlog
from common.params import Params, put_nonblocking
params = Params()
from common.realtime import sec_since_boot, DT_TRML
from common.dp import get_last_modified
import collections
dashcam_videos_path = '/sdcard/dashcam/'
dashcam_duration = 60 # max is 180
bit_rates = 2560000 # max is 4000000
max_size_per_file = bit_rates/8*dashcam_duration # 2.56Mbps / 8 * 60 = 19.2MB per 60 seconds
freespace_limit = 0.15 # we start cleaning up footage when freespace is below 15%
shock_duration = 60
TYPE_DRIVING = 'driving'
TYPE_SHOCK = 'shock'
def main(gctx=None):
retry = 0
folder_exists = False
dashcam_allowed = True
# make sure dashcam folder exists
while not folder_exists:
try:
if not os.path.exists(dashcam_videos_path):
os.makedirs(dashcam_videos_path)
else:
folder_exists = True
break
except OSError:
pass
if retry >= 5:
folder_exists = True
dashcam_allowed = False
retry += 1
time.sleep(5)
health_timeout = int(1000 * 2.5 * DT_TRML) # 2.5x the expected health frequency
health_sock = messaging.sub_sock('health', timeout=health_timeout)
dragon_dashcam_hours = 24. * 60 * 60
max_storage = (max_size_per_file/dashcam_duration) * dragon_dashcam_hours
dashcam_enabled = False
last_ts = 0.
last_modified = None
thermal_sock = messaging.sub_sock('thermal')
while dashcam_allowed:
duration = dashcam_duration
ts = sec_since_boot()
if ts - last_ts >= 5.:
modified = get_last_modified()
if last_modified != modified:
dashcam_enabled = True if params.get("DragonEnableDashcam", encoding='utf8') == "1" else False
try:
dragon_dashcam_hours = float(params.get("DragonDashcamHours", encoding='utf8')) * 60 * 60
except (TypeError, ValueError):
dragon_dashcam_hours = 24. * 60 * 60
max_storage = (max_size_per_file/dashcam_duration) * dragon_dashcam_hours
last_modified = modified
last_ts = ts
health = messaging.recv_sock(health_sock, wait=False)
started = True if health is not None and (health.health.ignitionLine or health.health.ignitionCan) else False
if started and dashcam_enabled:
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 &" % (bit_rates, duration, dashcam_videos_path, file_name))
start_time = time.time()
try:
used_spaces = get_used_spaces()
last_used_spaces = used_spaces
# we should clean up files here if use too much spaces
# when used spaces greater than max available storage
# or when free space is less than 10%
# get health of board, log this in "thermal"
msg = messaging.recv_sock(thermal_sock, wait=True)
if used_spaces >= max_storage or (msg is not None and msg.thermal.freeSpace < freespace_limit):
# get all the files in the dashcam_videos_path path
files = [f for f in sorted(os.listdir(dashcam_videos_path)) if os.path.isfile(dashcam_videos_path + f)]
for file in files:
msg = messaging.recv_sock(thermal_sock, wait=True)
# delete file one by one and once it has enough space for 1 video, we stop deleting
if used_spaces - last_used_spaces < max_size_per_file or msg.thermal.freeSpace < freespace_limit:
system("rm -fr %s" % (dashcam_videos_path + file))
last_used_spaces = get_used_spaces()
else:
break
except os.error as e:
pass
time_diff = time.time()-start_time
# we start the process 1 second before screenrecord ended
# to make sure there are no missing footage
sleep_time = duration-1-time_diff
if sleep_time >= 0.:
time.sleep(sleep_time)
else:
time.sleep(5)
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 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,156 @@
#!/usr/bin/env python3.7
from common.params import Params, put_nonblocking
import time
from math import floor
import os
import json
default_conf = {
'DragonEnableDashcam': '0',
'DragonEnableAutoShutdown': '1',
'DragonAutoShutdownAt': '0', # in minute
'DragonEnableSteeringOnSignal': '0',
'DragonEnableLogger': '1',
'DragonEnableUploader': '1',
'DragonNoctuaMode': '0',
'DragonAllowGas': '0',
'DragonToyotaStockDSU': '0',
'DragonLatCtrl': '1',
'DragonUISpeed': '1',
'DragonUIEvent': '1',
'DragonUIMaxSpeed': '1',
'DragonUIFace': '1',
'DragonUIDev': '0',
'DragonUIDevMini': '0',
# 3rd party app
'DragonEnableTomTom': '0',
'DragonBootTomTom': '0',
'DragonRunTomTom': '0',
'DragonEnableAutonavi': '0',
'DragonBootAutonavi': '0',
'DragonRunAutonavi': '0',
'DragonEnableAegis': '0',
'DragonBootAegis': '0',
'DragonRunAegis': '0',
'DragonEnableMixplorer': '0',
'DragonRunMixplorer': '0',
'DragonSteeringMonitorTimer': '3', # 180 secs
'DragonCameraOffset': '6',
'DragonUIVolumeBoost': '0',
'DragonGreyPandaMode': '0',
'DragonDrivingUI': '1',
'DragonDisplaySteeringLimitAlert': '1',
'DragonChargingCtrl': '0',
'DragonCharging': '70',
'DragonDisCharging': '60',
'DragonToyotaLaneDepartureWarning': '1',
'DragonUILane': '1',
'DragonUILead': '1',
'DragonUIPath': '1',
'DragonUIBlinker': '0',
'DragonUIDMView': '0',
'DragonEnableDriverMonitoring': '1',
'DragonCarModel': '',
'DragonEnableSlowOnCurve': '1',
'DragonEnableLeadCarMovingAlert': '0',
'DragonToyotaSnGMod': '0',
'DragonWazeMode': '0',
'DragonRunWaze': '0',
'DragonEnableAutoLC': '0',
'DragonAssistedLCMinMPH': '45',
'DragonAutoLCMinMPH': '60',
'DragonAutoLCDelay': '2',
'DragonBTG': '0',
'DragonBootHotspot': '0',
'DragonAccelProfile': '0', # OFF = 0, ECO = 1, NORMAL = 2, SPORT = 3
'DragonLastModified': str(floor(time.time())),
'DragonEnableRegistration': '1',
'DragonDynamicFollow': '0', # OFF = 0, LONG = 1, NORMAL = 2, SHORT = 3
'DragonEnableGearCheck': '1',
'DragonEnableTempMonitor': '1',
'DragonAppAutoUpdate': '1',
'DragonUpdating': '0',
'DragonToyotaSngResponse': '0.0',
'DragonCustomModel': '',
'DragonLocale': 'en-US',
'DragonUIScreenOffReversing': '0',
'DragonEnableSRLearner': '1',
'DragonEnableSteerBoost': '0',
'DragonSteerBoostMin': '10', # percentage
'DragonSteerBoostMax': '30', # percentage
'DragonSteerBoostMinAt': '7.0',
'DragonSteerBoostMaxAt': '15.0',
'DragonDashcamHours': '24.0',
'DragonUIScreenOffDriving': '0',
'DragonEnableAutoUpdate': '1',
'DragonUIBrightness': '0',
'DragonEnableUploadOnMobile': '0',
'DragonEnableUploadOnHotspot': '0',
'DragonMaxSpeedLimit': '92',
'DragonEnableRating': '1',
'DragonEnableContALC' : '0',
'DragonBlinkerOffTimer': '0',
}
deprecated_conf = {
}
deprecated_conf_invert = {
# 'DragonDisableDriverSafetyCheck': True,
# 'DragonTempDisableSteerOnSignal': False,
# 'DragonDisableLogger': True,
# 'DragonDisableUploader': True,
# 'DragonBBUI': False
}
def dp_get_last_modified():
return Params().get('DragonLastModified', encoding='utf-8').rstrip('\x00')
def dragonpilot_set_params(params):
# # remove deprecated params
# for old, new in deprecated_conf.items():
# if params.get(old) is not None:
# if new is not None:
# old_val = str(params.get(old))
# new_val = old_val
# # invert the value if true
# if old in deprecated_conf_invert and deprecated_conf_invert[old] is True:
# new_val = "1" if old_val == "0" else "0"
# put_nonblocking(new, new_val)
# params.delete(old)
# set params
for key, val in default_conf.items():
if params.get(key) is None and key not in deprecated_conf:
put_nonblocking(key, str(val))
put_nonblocking('DragonSupportedCars', get_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)
if __name__ == "__main__":
params = Params()
params.manager_start()
dragonpilot_set_params(params)
@@ -0,0 +1,50 @@
#!/usr/bin/env python3.7
import os
import time
from common.params import Params
params = Params()
import cereal.messaging as messaging
from common.realtime import sec_since_boot
from common.dp import get_last_modified
def main():
thermal_sock = messaging.sub_sock('thermal')
secs = 0
last_secs = None
shutdown_at = 0
started = False
usb_online = False
enabled = False
last_enabled = None
dp_last_modified = None
while 1:
cur_time = sec_since_boot()
modified = get_last_modified()
if dp_last_modified != modified:
enabled = True if params.get("DragonEnableAutoShutdown", encoding='utf8') == '1' else False
if enabled:
try:
secs = int(params.get("DragonAutoShutdownAt", encoding='utf8')) * 60
except (TypeError, ValueError):
secs = 0
dp_last_modified = modified
if last_enabled != enabled or last_secs != secs or started or usb_online:
shutdown_at = cur_time + secs
if enabled:
msg = messaging.recv_sock(thermal_sock, wait=True)
started = msg.thermal.started
usb_online = msg.thermal.usbOnline
if not started and not usb_online and secs > 0 and cur_time >= shutdown_at:
os.system('LD_LIBRARY_PATH="" svc power shutdown')
last_enabled = enabled
last_secs = secs
time.sleep(10)
if __name__ == "__main__":
main()
+16 -1
View File
@@ -103,6 +103,18 @@ int main(int argc, char *argv[]) {
// Main loop
int save_counter = 0;
// dp, sr learner
char* enable_sr_learner_val = NULL;
read_db_value("DragonEnableSRLearner", &enable_sr_learner_val, NULL);
bool enable_sr_learner = true;
if (enable_sr_learner_val && strlen(enable_sr_learner_val) && enable_sr_learner_val[0] == '1') {
enable_sr_learner = true;
} else {
enable_sr_learner = false;
learner.sR = sR;
}
while (true){
for (auto s : poller->poll(100)){
Message * msg = s->receive();
@@ -128,7 +140,10 @@ int main(int argc, char *argv[]) {
double yaw_rate = -localizer.x[0];
bool valid = learner.update(yaw_rate, localizer.car_speed, localizer.steering_angle);
// dp - reset sR to json val;
if (!enable_sr_learner) {
learner.sR = sR;
}
// TODO: Fix in replay
double sensor_data_age = localizer.controls_state_time - localizer.sensor_data_time;
double camera_odometry_age = localizer.controls_state_time - localizer.camera_odometry_time;
+21 -4
View File
@@ -10,6 +10,8 @@ import requests
import traceback
import threading
import subprocess
from common.realtime import sec_since_boot
from common.dp import get_last_modified
from selfdrive.swaglog import cloudlog
from selfdrive.loggerd.config import ROOT
@@ -244,11 +246,26 @@ def uploader_fn(exit_event):
uploader = Uploader(dongle_id, ROOT)
backoff = 0.1
# dp
last_ts = None
dp_last_modified = None
on_hotspot = False
on_wifi = False
should_upload = False
allow_raw_upload = True
while True:
allow_raw_upload = (params.get("IsUploadRawEnabled") != b"0")
on_hotspot = is_on_hotspot()
on_wifi = is_on_wifi()
should_upload = on_wifi and not on_hotspot
ts = sec_since_boot()
if last_ts is None or ts - last_ts >= 5.:
modified = get_last_modified()
if dp_last_modified != modified:
on_hotspot = False if (params.get("DragonEnableUploadOnHotspot") == b"1") else is_on_hotspot()
on_wifi = False if (params.get("DragonEnableUploadOnMobile") == b"1") else is_on_wifi()
allow_raw_upload = (params.get("IsUploadRawEnabled") != b"0")
should_upload = on_wifi and not on_hotspot
dp_last_modified = modified
last_ts = ts
if exit_event.is_set():
return
+34 -4
View File
@@ -10,6 +10,7 @@ import subprocess
import datetime
import textwrap
from selfdrive.swaglog import cloudlog, add_logentries_handler
from selfdrive.dragonpilot.dragonconf import dragonpilot_set_params
from common.basedir import BASEDIR, PARAMS
from common.android import ANDROID
@@ -188,6 +189,10 @@ managed_processes = {
"dmonitoringmodeld": ("selfdrive/modeld", ["./dmonitoringmodeld"]),
"modeld": ("selfdrive/modeld", ["./modeld"]),
"driverview": "selfdrive.controls.lib.driverview",
# dp
"dashcamd": "selfdrive.dragonpilot.dashcamd.dashcamd",
"shutdownd": "selfdrive.dragonpilot.shutdownd.shutdownd",
"appd": "selfdrive.dragonpilot.appd.appd",
}
daemon_processes = {
@@ -222,6 +227,8 @@ if ANDROID:
'logcatd',
'tombstoned',
'updated',
'shutdownd',
'appd',
]
car_started_processes = [
@@ -426,11 +433,16 @@ def manager_thread():
cloudlog.info("manager start")
cloudlog.info({"environ": os.environ})
# save boot log
subprocess.call(["./loggerd", "--bootlog"], cwd=os.path.join(BASEDIR, "selfdrive/loggerd"))
params = Params()
# dp
# save boot log
if params.get("DragonEnableLogger", encoding='utf8') == "1":
subprocess.call(["./loggerd", "--bootlog"], cwd=os.path.join(BASEDIR, "selfdrive/loggerd"))
if params.get("DragonEnableDashcam", encoding='utf8') == "1":
persistent_processes.append('dashcamd')
# start daemon processes
for p in daemon_processes:
start_daemon_process(p)
@@ -567,6 +579,9 @@ def main():
if params.get(k) is None:
params.put(k, v)
# dp
dragonpilot_set_params(params)
# is this chffrplus?
if os.getenv("PASSIVE") is not None:
params.put("Passive", str(int(os.getenv("PASSIVE"))))
@@ -574,15 +589,30 @@ def main():
if params.get("Passive") is None:
raise Exception("Passive must be set to continue")
reg = False if params.get("DragonEnableRegistration", encoding='utf8') == "0" else True
if ANDROID:
update_apks()
manager_init()
manager_init(reg)
manager_prepare(spinner)
spinner.close()
if os.getenv("PREPAREONLY") is not None:
return
# dp
del managed_processes['tombstoned']
if params.get("DragonEnableLogger", encoding='utf8') == "0":
del managed_processes['loggerd']
del managed_processes['logmessaged']
del managed_processes['proclogd']
del managed_processes['logcatd']
if params.get("DragonEnableUploader", encoding='utf8') == "0":
del managed_processes['uploader']
if params.get("DragonEnableAutoUpdate", encoding='utf8') == "0":
del managed_processes['updated']
# SystemExit on sigterm
signal.signal(signal.SIGTERM, lambda signum, frame: sys.exit(1))
+119 -44
View File
@@ -17,7 +17,11 @@ from selfdrive.swaglog import cloudlog
import cereal.messaging as messaging
from selfdrive.loggerd.config import get_available_percent
from selfdrive.pandad import get_expected_signature
from selfdrive.thermald.power_monitoring import PowerMonitoring, get_battery_capacity, get_battery_status, get_battery_current, get_battery_voltage, get_usb_present
from selfdrive.thermald.power_monitoring import PowerMonitoring, get_battery_capacity, get_battery_status, get_battery_current, get_battery_voltage, get_usb_present, set_battery_charging, get_battery_charging
from common.dp import get_last_modified
import re
import subprocess
params = Params()
FW_SIGNATURE = get_expected_signature()
@@ -113,10 +117,14 @@ def set_eon_fan(val):
_TEMP_THRS_H = [50., 65., 80., 10000]
# temp thresholds to control fan speed - low hysteresis
_TEMP_THRS_L = [42.5, 57.5, 72.5, 10000]
# fan speed options
_FAN_SPEEDS = [0, 16384, 32768, 65535]
# max fan speed only allowed if battery is hot
_BAT_TEMP_THERSHOLD = 45.
if params.get('DragonNoctuaMode', encoding='utf8') == "1":
_FAN_SPEEDS = [65535, 65535, 65535, 65535]
_BAT_TEMP_THERSHOLD = 0.
else:
# fan speed options
_FAN_SPEEDS = [0, 16384, 32768, 65535]
# max fan speed only allowed if battery is hot
_BAT_TEMP_THERSHOLD = 45.
def handle_fan_eon(max_cpu_temp, bat_temp, fan_speed, ignition):
@@ -184,16 +192,55 @@ def thermald_thread():
handle_fan = None
is_uno = False
params = Params()
pm = PowerMonitoring()
no_panda_cnt = 0
# dp
ts_last_ip = 0
ts_last_update_vars = 0
ts_last_charging_ctrl = None
dp_last_modified = None
ip_addr = '255.255.255.255'
dragon_charging_ctrl = False
dragon_charging_ctrl_prev = False
dragon_to_discharge = 70
dragon_to_charge = 60
dp_temp_monitor = True
while 1:
# dp
ts = sec_since_boot()
# update variable status every 10 secs
if ts - ts_last_update_vars >= 10.:
modified = get_last_modified()
if dp_last_modified != modified:
dp_temp_monitor = False if params.get('DragonEnableTempMonitor', encoding='utf8') == "0" else True
if not is_uno:
dragon_charging_ctrl = True if params.get('DragonChargingCtrl', encoding='utf8') == "1" else False
if dragon_charging_ctrl:
try:
dragon_to_discharge = int(params.get('DragonCharging', encoding='utf8'))
except (TypeError, ValueError):
dragon_to_discharge = 70
try:
dragon_to_charge = int(params.get('DragonDisCharging', encoding='utf8'))
except (TypeError, ValueError):
dragon_to_charge = 60
else:
dragon_charging_ctrl = False
dp_last_modified = modified
ts_last_update_vars = ts
health = messaging.recv_sock(health_sock, wait=True)
location = messaging.recv_sock(location_sock)
location = location.gpsLocation if location else None
msg = read_thermal()
if handle_fan is None and params.get('DragonNoctuaMode', encoding='utf8') == "1":
setup_eon_fan()
handle_fan = handle_fan_eon
if health is not None:
usb_power = health.health.usbPowerMode != log.HealthData.UsbPowerMode.client
@@ -251,6 +298,18 @@ def thermald_thread():
msg.thermal.batteryPercent = 100
msg.thermal.batteryStatus = "Charging"
# dp
# update ip every 10 seconds
ts = sec_since_boot()
if ts - ts_last_ip >= 10.:
try:
result = subprocess.check_output(["ifconfig", "wlan0"], encoding='utf8') # pylint: disable=unexpected-keyword-arg
ip_addr = re.findall(r"inet addr:((\d+\.){3}\d+)", result)[0][0]
except:
ip_addr = 'N/A'
ts_last_ip = ts
msg.thermal.ipAddr = ip_addr
current_filter.update(msg.thermal.batteryCurrent / 1e6)
# TODO: add car battery voltage check
@@ -287,46 +346,49 @@ def thermald_thread():
# all good
thermal_status = ThermalStatus.green
if not dp_temp_monitor and thermal_status in [ThermalStatus.yellow, ThermalStatus.red, ThermalStatus.danger]:
thermal_status = ThermalStatus.yellow
# **** starting logic ****
time_valid = True
# Check for last update time and display alerts if needed
now = datetime.datetime.utcnow()
# show invalid date/time alert
time_valid = now.year >= 2019
if time_valid and not time_valid_prev:
params.delete("Offroad_InvalidTime")
if not time_valid and time_valid_prev:
put_nonblocking("Offroad_InvalidTime", json.dumps(OFFROAD_ALERTS["Offroad_InvalidTime"]))
time_valid_prev = time_valid
# Show update prompt
try:
last_update = datetime.datetime.fromisoformat(params.get("LastUpdateTime", encoding='utf8'))
except (TypeError, ValueError):
last_update = now
dt = now - last_update
update_failed_count = params.get("UpdateFailedCount")
update_failed_count = 0 if update_failed_count is None else int(update_failed_count)
if dt.days > DAYS_NO_CONNECTIVITY_MAX and update_failed_count > 1:
if current_connectivity_alert != "expired":
current_connectivity_alert = "expired"
params.delete("Offroad_ConnectivityNeededPrompt")
put_nonblocking("Offroad_ConnectivityNeeded", json.dumps(OFFROAD_ALERTS["Offroad_ConnectivityNeeded"]))
elif dt.days > DAYS_NO_CONNECTIVITY_PROMPT:
remaining_time = str(max(DAYS_NO_CONNECTIVITY_MAX - dt.days, 0))
if current_connectivity_alert != "prompt" + remaining_time:
current_connectivity_alert = "prompt" + remaining_time
alert_connectivity_prompt = copy.copy(OFFROAD_ALERTS["Offroad_ConnectivityNeededPrompt"])
alert_connectivity_prompt["text"] += remaining_time + " days."
params.delete("Offroad_ConnectivityNeeded")
put_nonblocking("Offroad_ConnectivityNeededPrompt", json.dumps(alert_connectivity_prompt))
elif current_connectivity_alert is not None:
current_connectivity_alert = None
params.delete("Offroad_ConnectivityNeeded")
params.delete("Offroad_ConnectivityNeededPrompt")
# now = datetime.datetime.utcnow()
#
# # show invalid date/time alert
# time_valid = now.year >= 2019
# if time_valid and not time_valid_prev:
# params.delete("Offroad_InvalidTime")
# if not time_valid and time_valid_prev:
# put_nonblocking("Offroad_InvalidTime", json.dumps(OFFROAD_ALERTS["Offroad_InvalidTime"]))
# time_valid_prev = time_valid
#
# # Show update prompt
# try:
# last_update = datetime.datetime.fromisoformat(params.get("LastUpdateTime", encoding='utf8'))
# except (TypeError, ValueError):
# last_update = now
# dt = now - last_update
#
# update_failed_count = params.get("UpdateFailedCount")
# update_failed_count = 0 if update_failed_count is None else int(update_failed_count)
#
# if dt.days > DAYS_NO_CONNECTIVITY_MAX and update_failed_count > 1:
# if current_connectivity_alert != "expired":
# current_connectivity_alert = "expired"
# params.delete("Offroad_ConnectivityNeededPrompt")
# put_nonblocking("Offroad_ConnectivityNeeded", json.dumps(OFFROAD_ALERTS["Offroad_ConnectivityNeeded"]))
# elif dt.days > DAYS_NO_CONNECTIVITY_PROMPT:
# remaining_time = str(max(DAYS_NO_CONNECTIVITY_MAX - dt.days, 0))
# if current_connectivity_alert != "prompt" + remaining_time:
# current_connectivity_alert = "prompt" + remaining_time
# alert_connectivity_prompt = copy.copy(OFFROAD_ALERTS["Offroad_ConnectivityNeededPrompt"])
# alert_connectivity_prompt["text"] += remaining_time + " days."
# params.delete("Offroad_ConnectivityNeeded")
# put_nonblocking("Offroad_ConnectivityNeededPrompt", json.dumps(alert_connectivity_prompt))
# elif current_connectivity_alert is not None:
# current_connectivity_alert = None
# params.delete("Offroad_ConnectivityNeeded")
# params.delete("Offroad_ConnectivityNeededPrompt")
do_uninstall = params.get("DoUninstall") == b"1"
accepted_terms = params.get("HasAcceptedTerms") == terms_version
@@ -415,6 +477,19 @@ def thermald_thread():
fw_version_match_prev = fw_version_match
should_start_prev = should_start
if dragon_charging_ctrl != dragon_charging_ctrl_prev:
set_battery_charging(True)
if dragon_charging_ctrl:
if ts_last_charging_ctrl is None or ts - ts_last_charging_ctrl >= 60.:
if msg.thermal.batteryPercent >= dragon_to_discharge and get_battery_charging():
set_battery_charging(False)
elif msg.thermal.batteryPercent <= dragon_to_charge and not get_battery_charging():
set_battery_charging(True)
ts_last_charging_ctrl = ts
dragon_charging_ctrl_prev = dragon_charging_ctrl
# report to server once per minute
if (count % int(60. / DT_TRML)) == 0:
cloudlog.event("STATUS_PACKET",
+483 -49
View File
@@ -254,6 +254,30 @@ static void draw_steering(UIState *s, float curvature) {
// ui_draw_lane_edge(s, points, 0.0, nvgRGBA(0, 0, 255, 128), 5);
}
static void draw_front_frame(UIState *s) {
const UIScene *scene = &s->scene;
float x1, x2, y1, y2;
glBindVertexArray(s->frame_vao[1]);
mat4 *out_mat;
out_mat = &s->front_frame_mat;
glActiveTexture(GL_TEXTURE0);
if (s->cur_vision_front_idx >= 0) {
glBindTexture(GL_TEXTURE_2D, s->frame_front_texs[s->cur_vision_front_idx]);
}
glUseProgram(s->frame_program);
glUniform1i(s->frame_texture_loc, 0);
glUniformMatrix4fv(s->frame_transform_loc, 1, GL_TRUE, out_mat->v);
assert(glGetError() == GL_NO_ERROR);
glEnableVertexAttribArray(0);
glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, (const void*)0);
glDisableVertexAttribArray(0);
glBindVertexArray(0);
}
static void draw_frame(UIState *s) {
const UIScene *scene = &s->scene;
@@ -344,27 +368,31 @@ static void ui_draw_vision_lanes(UIState *s) {
update_all_lane_lines_data(s, scene->model.right_lane, pvd + MODEL_LANE_PATH_CNT);
s->model_changed = false;
}
// Draw left lane edge
ui_draw_lane(
s, &scene->model.left_lane,
pvd,
nvgRGBAf(1.0, 1.0, 1.0, scene->model.left_lane.prob));
if (s->dragon_ui_lane) {
// Draw left lane edge
ui_draw_lane(
s, &scene->model.left_lane,
pvd,
nvgRGBAf(1.0, 1.0, 1.0, scene->model.left_lane.prob));
// Draw right lane edge
ui_draw_lane(
s, &scene->model.right_lane,
pvd + MODEL_LANE_PATH_CNT,
nvgRGBAf(1.0, 1.0, 1.0, scene->model.right_lane.prob));
// Draw right lane edge
ui_draw_lane(
s, &scene->model.right_lane,
pvd + MODEL_LANE_PATH_CNT,
nvgRGBAf(1.0, 1.0, 1.0, scene->model.right_lane.prob));
}
if(s->livempc_or_radarstate_changed) {
update_all_track_data(s);
s->livempc_or_radarstate_changed = false;
}
// Draw vision path
ui_draw_track(s, false, &s->track_vertices[0]);
if (scene->engaged) {
// Draw MPC path when engaged
ui_draw_track(s, true, &s->track_vertices[1]);
if (s->dragon_ui_path) {
// Draw vision path
ui_draw_track(s, false, &s->track_vertices[0]);
if (scene->engaged) {
// Draw MPC path when engaged
ui_draw_track(s, true, &s->track_vertices[1]);
}
}
}
@@ -393,11 +421,13 @@ static void ui_draw_world(UIState *s) {
// Draw lane edges and vision/mpc tracks
ui_draw_vision_lanes(s);
if (scene->lead_status) {
draw_lead(s, scene->lead_d_rel, scene->lead_v_rel, scene->lead_y_rel);
}
if ((scene->lead_status2) && (fabs(scene->lead_d_rel - scene->lead_d_rel2) > 3.0)) {
draw_lead(s, scene->lead_d_rel2, scene->lead_v_rel2, scene->lead_y_rel2);
if (s->dragon_ui_lead) {
if (scene->lead_status) {
draw_lead(s, scene->lead_d_rel, scene->lead_v_rel, scene->lead_y_rel);
}
if ((scene->lead_status2) && (fabs(scene->lead_d_rel - scene->lead_d_rel2) > 3.0)) {
draw_lead(s, scene->lead_d_rel2, scene->lead_v_rel2, scene->lead_y_rel2);
}
}
nvgRestore(s->vg);
}
@@ -452,13 +482,13 @@ static void ui_draw_vision_maxspeed(UIState *s) {
nvgTextAlign(s->vg, NVG_ALIGN_CENTER | NVG_ALIGN_BASELINE);
const int text_x = viz_maxspeed_x + (viz_maxspeed_xo / 2) + (viz_maxspeed_w / 2);
ui_draw_text(s->vg, text_x, 148, "MAX", 26 * 2.5, COLOR_WHITE_ALPHA(is_cruise_set ? 200 : 100), s->font_sans_regular);
ui_draw_text(s->vg, text_x, 148, (strcmp(s->dragon_locale, "zh-TW") == 0? "最高速限" : strcmp(s->dragon_locale, "zh-CN") == 0? "最高速限" : "MAX"), 26 * 2.5, COLOR_WHITE_ALPHA(is_cruise_set ? 200 : 100), s->font_sans_regular);
if (is_cruise_set) {
snprintf(maxspeed_str, sizeof(maxspeed_str), "%d", maxspeed_calc);
ui_draw_text(s->vg, text_x, 242, maxspeed_str, 48 * 2.5, COLOR_WHITE, s->font_sans_bold);
} else {
ui_draw_text(s->vg, text_x, 242, "N/A", 42 * 2.5, COLOR_WHITE_ALPHA(100), s->font_sans_semibold);
ui_draw_text(s->vg, text_x, 242, (strcmp(s->dragon_locale, "zh-TW") == 0? "未設" : strcmp(s->dragon_locale, "zh-CN") == 0? "未设" : "N/A"), 42 * 2.5, COLOR_WHITE_ALPHA(100), s->font_sans_semibold);
}
}
@@ -506,8 +536,8 @@ static void ui_draw_vision_speedlimit(UIState *s) {
// Draw "Speed Limit" Text
nvgTextAlign(s->vg, NVG_ALIGN_CENTER | NVG_ALIGN_BASELINE);
color = is_speedlim_valid && s->is_ego_over_limit ? COLOR_WHITE : COLOR_BLACK;
ui_draw_text(s->vg, text_x + (is_speedlim_valid ? 6 : 0), text_y, "SMART", 50, color, s->font_sans_semibold);
ui_draw_text(s->vg, text_x + (is_speedlim_valid ? 6 : 0), text_y + 40, "SPEED", 50, color, s->font_sans_semibold);
ui_draw_text(s->vg, text_x + (is_speedlim_valid ? 6 : 0), text_y, (strcmp(s->dragon_locale, "zh-TW") == 0? "智能" : strcmp(s->dragon_locale, "zh-CN") == 0? "智能" : "SMART"), 50, color, s->font_sans_semibold);
ui_draw_text(s->vg, text_x + (is_speedlim_valid ? 6 : 0), text_y + 40, (strcmp(s->dragon_locale, "zh-TW") == 0? "速度" : strcmp(s->dragon_locale, "zh-CN") == 0? "速度" : "DESIR STEER"), 50, color, s->font_sans_semibold);
// Draw Speed Text
color = s->is_ego_over_limit ? COLOR_WHITE : COLOR_BLACK;
@@ -515,7 +545,7 @@ static void ui_draw_vision_speedlimit(UIState *s) {
snprintf(speedlim_str, sizeof(speedlim_str), "%d", speedlim_calc);
ui_draw_text(s->vg, text_x, viz_speedlim_y + (is_speedlim_valid ? 170 : 165), speedlim_str, 48*2.5, color, s->font_sans_bold);
} else {
ui_draw_text(s->vg, text_x, viz_speedlim_y + (is_speedlim_valid ? 170 : 165), "N/A", 42*2.5, color, s->font_sans_semibold);
ui_draw_text(s->vg, text_x, viz_speedlim_y + (is_speedlim_valid ? 170 : 165), (strcmp(s->dragon_locale, "zh-TW") == 0? "未設" : strcmp(s->dragon_locale, "zh-CN") == 0? "未设" : "N/A"), 42*2.5, color, s->font_sans_semibold);
}
}
@@ -529,13 +559,43 @@ static void ui_draw_vision_speed(UIState *s) {
const int viz_speed_x = scene->ui_viz_rx+((scene->ui_viz_rw/2)-(viz_speed_w/2));
char speed_str[32];
nvgBeginPath(s->vg);
nvgRect(s->vg, viz_speed_x, box_y, viz_speed_w, header_h);
nvgTextAlign(s->vg, NVG_ALIGN_CENTER | NVG_ALIGN_BASELINE);
if (s->dragon_ui_speed) {
nvgBeginPath(s->vg);
nvgRect(s->vg, viz_speed_x, box_y, viz_speed_w, header_h);
nvgTextAlign(s->vg, NVG_ALIGN_CENTER | NVG_ALIGN_BASELINE);
snprintf(speed_str, sizeof(speed_str), "%d", (int)speed);
ui_draw_text(s->vg, viz_speed_x + viz_speed_w / 2, 240, speed_str, 96*2.5, COLOR_WHITE, s->font_sans_bold);
ui_draw_text(s->vg, viz_speed_x + viz_speed_w / 2, 320, s->is_metric?"kph":"mph", 36*2.5, COLOR_WHITE_ALPHA(200), s->font_sans_regular);
snprintf(speed_str, sizeof(speed_str), "%d", (int)speed);
ui_draw_text(s->vg, viz_speed_x + viz_speed_w / 2, 240, speed_str, 96*2.5, COLOR_WHITE, s->font_sans_bold);
ui_draw_text(s->vg, viz_speed_x + viz_speed_w / 2, 320, s->is_metric?"km/h":"mph", 36*2.5, COLOR_WHITE_ALPHA(200), s->font_sans_regular);
}
// dp blinker, from kegman
if (s->dragon_ui_blinker) {
if(s->scene.leftBlinker) {
nvgBeginPath(s->vg);
nvgMoveTo(s->vg, viz_speed_x, box_y + header_h/4);
nvgLineTo(s->vg, viz_speed_x - viz_speed_w/2, box_y + header_h/4 + header_h/4);
nvgLineTo(s->vg, viz_speed_x, box_y + header_h/2 + header_h/4);
nvgClosePath(s->vg);
nvgFillColor(s->vg, nvgRGBA(23,134,68,s->scene.blinker_blinkingrate>=50?210:60));
nvgFill(s->vg);
}
if(s->scene.rightBlinker) {
nvgBeginPath(s->vg);
nvgMoveTo(s->vg, viz_speed_x+viz_speed_w, box_y + header_h/4);
nvgLineTo(s->vg, viz_speed_x+viz_speed_w + viz_speed_w/2, box_y + header_h/4 + header_h/4);
nvgLineTo(s->vg, viz_speed_x+viz_speed_w, box_y + header_h/2 + header_h/4);
nvgClosePath(s->vg);
nvgFillColor(s->vg, nvgRGBA(23,134,68,s->scene.blinker_blinkingrate>=50?210:60));
nvgFill(s->vg);
}
if(s->scene.leftBlinker || s->scene.rightBlinker) {
s->scene.blinker_blinkingrate -= 3;
if(s->scene.blinker_blinkingrate<0) s->scene.blinker_blinkingrate = 120;
}
}
}
static void ui_draw_vision_event(UIState *s) {
@@ -577,6 +637,62 @@ static void ui_draw_vision_face(UIState *s) {
ui_draw_circle_image(s->vg, face_x, face_y, face_size, s->img_face, s->scene.monitoring_active);
}
static void ui_draw_df_button(UIState *s) {
nvgBeginPath(s->vg);
nvgRoundedRect(s->vg, df_btn_x, df_btn_y, df_btn_w, df_btn_h, 20);
nvgStrokeColor(s->vg, COLOR_WHITE_ALPHA(80));
nvgStrokeWidth(s->vg, 6);
nvgStroke(s->vg);
nvgFontFaceId(s->vg, s->font_sans_regular);
nvgFillColor(s->vg, COLOR_WHITE_ALPHA(200));
nvgFontSize(s->vg, (strcmp(s->dragon_locale, "zh-TW") == 0? 96 : strcmp(s->dragon_locale, "zh-CN") == 0? 96 : 48));
nvgTextAlign(s->vg, NVG_ALIGN_CENTER);
int val = s->dragon_df_mode;
nvgText(s->vg, df_btn_x + df_btn_w / 2, df_btn_y + df_btn_h / 2,
val == 4? (strcmp(s->dragon_locale, "zh-TW") == 0? "自動" : strcmp(s->dragon_locale, "zh-CN") == 0? "自动" : "AUTO") :
val == 3? (strcmp(s->dragon_locale, "zh-TW") == 0? "長距" : strcmp(s->dragon_locale, "zh-CN") == 0? "长距" : "LONG") :
val == 2? (strcmp(s->dragon_locale, "zh-TW") == 0? "正常" : strcmp(s->dragon_locale, "zh-CN") == 0? "正常" : "NORMAL") :
(strcmp(s->dragon_locale, "zh-TW") == 0? "短距" : strcmp(s->dragon_locale, "zh-CN") == 0? "短距" : "SHORT"),
NULL);
nvgFontFaceId(s->vg, s->font_sans_regular);
nvgFillColor(s->vg, COLOR_WHITE_ALPHA(200));
nvgFontSize(s->vg, 37.5);
nvgTextAlign(s->vg, NVG_ALIGN_CENTER);
nvgText(s->vg, df_btn_x + df_btn_w / 2, df_btn_y + df_btn_h - 10,
(strcmp(s->dragon_locale, "zh-TW") == 0? "車距" : strcmp(s->dragon_locale, "zh-CN") == 0? "车距" : "FOLLOW"),
NULL);
}
static void ui_draw_ap_button(UIState *s) {
nvgBeginPath(s->vg);
nvgRoundedRect(s->vg, ap_btn_x, ap_btn_y, ap_btn_w, ap_btn_h, 20);
nvgStrokeColor(s->vg, COLOR_WHITE_ALPHA(80));
nvgStrokeWidth(s->vg, 6);
nvgStroke(s->vg);
nvgFontFaceId(s->vg, s->font_sans_regular);
nvgFillColor(s->vg, COLOR_WHITE_ALPHA(200));
nvgFontSize(s->vg, (strcmp(s->dragon_locale, "zh-TW") == 0? 96 : strcmp(s->dragon_locale, "zh-CN") == 0? 96 : 48));
nvgTextAlign(s->vg, NVG_ALIGN_CENTER);
int val = s->dragon_ap_mode;
nvgText(s->vg, ap_btn_x + ap_btn_w / 2, ap_btn_y + ap_btn_h / 2,
val == 1? (strcmp(s->dragon_locale, "zh-TW") == 0? "節能" : strcmp(s->dragon_locale, "zh-CN") == 0? "节能" : "ECO") :
val == 2? (strcmp(s->dragon_locale, "zh-TW") == 0? "正常" : strcmp(s->dragon_locale, "zh-CN") == 0? "正常" : "NORMAL") :
(strcmp(s->dragon_locale, "zh-TW") == 0? "運動" : strcmp(s->dragon_locale, "zh-CN") == 0? "运动" : "SPORT"),
NULL);
nvgFontFaceId(s->vg, s->font_sans_regular);
nvgFillColor(s->vg, COLOR_WHITE_ALPHA(200));
nvgFontSize(s->vg, 37.5);
nvgTextAlign(s->vg, NVG_ALIGN_CENTER);
nvgText(s->vg, ap_btn_x + ap_btn_w / 2, ap_btn_y + ap_btn_h - 10,
(strcmp(s->dragon_locale, "zh-TW") == 0? "加速" : strcmp(s->dragon_locale, "zh-CN") == 0? "加速" : "ACCEL"),
NULL);
}
static void ui_draw_driver_view(UIState *s) {
const UIScene *scene = &s->scene;
s->scene.uilayout_sidebarcollapsed = true;
@@ -637,26 +753,332 @@ static void ui_draw_vision_header(UIState *s) {
int ui_viz_rx = scene->ui_viz_rx;
int ui_viz_rw = scene->ui_viz_rw;
NVGpaint gradient = nvgLinearGradient(s->vg, ui_viz_rx,
(box_y+(header_h-(header_h/2.5))),
ui_viz_rx, box_y+header_h,
nvgRGBAf(0,0,0,0.45), nvgRGBAf(0,0,0,0));
ui_draw_rect(s->vg, ui_viz_rx, box_y, ui_viz_rw, header_h, gradient);
ui_draw_vision_maxspeed(s);
if (s->dragon_driving_ui) {
NVGpaint gradient = nvgLinearGradient(s->vg, ui_viz_rx,
(box_y+(header_h-(header_h/2.5))),
ui_viz_rx, box_y+header_h,
nvgRGBAf(0,0,0,0.45), nvgRGBAf(0,0,0,0));
ui_draw_rect(s->vg, ui_viz_rx, box_y, ui_viz_rw, header_h, gradient);
}
if (s->dragon_ui_maxspeed) {
ui_draw_vision_maxspeed(s);
}
#ifdef SHOW_SPEEDLIMIT
ui_draw_vision_speedlimit(s);
#endif
ui_draw_vision_speed(s);
ui_draw_vision_event(s);
if (s->dragon_ui_event) {
ui_draw_vision_event(s);
}
}
static void ui_draw_infobar(UIState *s) {
const UIScene *scene = &s->scene;
int ui_viz_rx = scene->ui_viz_rx;
bool hasSidebar = !s->scene.uilayout_sidebarcollapsed;
int rect_w = vwp_w - ui_viz_rx - bdr_s;
int rect_h = 80;
int rect_x = (hasSidebar? (bdr_s+sbr_w) : ui_viz_rx);
int rect_y = vwp_h - bdr_s - rect_h;
int text_x = rect_w / 2 + ui_viz_rx;
int text_y = rect_y + 55;
char infobar[100];
// create time string
char date_time[20];
time_t rawtime = time(NULL);
struct tm timeinfo;
localtime_r(&rawtime, &timeinfo);
strftime(date_time, sizeof(date_time),"%D %T", &timeinfo);
// Create temp string
char temp[6];
snprintf(temp, sizeof(temp), "%02d°C", s->scene.paTemp);
// create battery percentage string
char battery[5];
snprintf(battery, sizeof(battery), "%02d%%", s->scene.batteryPercent);
if (s->dragon_ui_dev_mini) {
char rel_steer[9];
snprintf(rel_steer, sizeof(rel_steer), "%s%05.1f°", s->scene.angleSteers < 0? "-" : "+", fabs(s->scene.angleSteers));
char des_steer[9];
if (s->scene.engaged) {
snprintf(des_steer, sizeof(des_steer), "%s%05.1f°", s->scene.angleSteersDes < 0? "-" : "+", fabs(s->scene.angleSteersDes));
} else {
snprintf(des_steer, sizeof(des_steer), "%7s", "-");
}
char lead_dist[8];
if (s->scene.lead_status) {
snprintf(lead_dist, sizeof(lead_dist), "%06.2fm", s->scene.lead_d_rel);
} else {
snprintf(lead_dist, sizeof(lead_dist), "%7s", "-");
}
snprintf(
infobar,
sizeof(infobar),
"%s /TMP: %s /BAT: %s /REL: %s /DES: %s /DIS: %s",
date_time,
temp,
battery,
rel_steer,
des_steer,
lead_dist
);
} else {
snprintf(
infobar,
sizeof(infobar),
"%s /TMP: %s /BAT: %s",
date_time,
temp,
battery
);
}
nvgBeginPath(s->vg);
nvgRect(s->vg, rect_x, rect_y, rect_w, rect_h);
nvgFillColor(s->vg, (s->scene.brakeLights? COLOR_RED_ALPHA(s->dragon_waze_mode? 150 : 100) : COLOR_BLACK_ALPHA(s->dragon_waze_mode? 150 : 100)));
nvgFill(s->vg);
nvgFontSize(s->vg, hasSidebar? 35:42);
nvgFontFaceId(s->vg, s->font_courbd);
nvgFillColor(s->vg, COLOR_WHITE_ALPHA(200));
nvgTextAlign(s->vg, NVG_ALIGN_CENTER);
nvgText(s->vg, text_x, text_y, infobar, NULL);
}
//BB START: functions added for the display of various items
static int bb_ui_draw_measure(UIState *s, const char* bb_value, const char* bb_uom, const char* bb_label,
int bb_x, int bb_y, int bb_uom_dx,
NVGcolor bb_valueColor, NVGcolor bb_labelColor, NVGcolor bb_uomColor,
int bb_valueFontSize, int bb_labelFontSize, int bb_uomFontSize ) {
const UIScene *scene = &s->scene;
nvgTextAlign(s->vg, NVG_ALIGN_CENTER | NVG_ALIGN_BASELINE);
int dx = 0;
if (strlen(bb_uom) > 0) {
dx = (int)(bb_uomFontSize*2.5/2);
}
//print value
nvgFontFaceId(s->vg, s->font_sans_bold);
nvgFontSize(s->vg, bb_valueFontSize*2.5);
nvgFillColor(s->vg, bb_valueColor);
nvgText(s->vg, bb_x-dx/2, bb_y+ (int)(bb_valueFontSize*2.5)+5, bb_value, NULL);
//print label
nvgFontFaceId(s->vg, s->font_sans_regular);
nvgFontSize(s->vg, bb_labelFontSize*2.5);
nvgFillColor(s->vg, bb_labelColor);
nvgText(s->vg, bb_x, bb_y + (int)(bb_valueFontSize*2.5)+5 + (int)(bb_labelFontSize*2.5)+5, bb_label, NULL);
//print uom
if (strlen(bb_uom) > 0) {
nvgSave(s->vg);
int rx =bb_x + bb_uom_dx + bb_valueFontSize -3;
int ry = bb_y + (int)(bb_valueFontSize*2.5/2)+25;
nvgTranslate(s->vg,rx,ry);
nvgRotate(s->vg, -1.5708); //-90deg in radians
nvgFontFaceId(s->vg, s->font_sans_regular);
nvgFontSize(s->vg, (int)(bb_uomFontSize*2.5));
nvgFillColor(s->vg, bb_uomColor);
nvgText(s->vg, 0, 0, bb_uom, NULL);
nvgRestore(s->vg);
}
return (int)((bb_valueFontSize + bb_labelFontSize)*2.5) + 5;
}
static void bb_ui_draw_measures_left(UIState *s, int bb_x, int bb_y, int bb_w ) {
const UIScene *scene = &s->scene;
int bb_rx = bb_x + (int)(bb_w/2);
int bb_ry = bb_y;
int bb_h = 5;
NVGcolor lab_color = COLOR_WHITE_ALPHA(200);
NVGcolor uom_color = COLOR_WHITE_ALPHA(200);
int value_fontSize=30;
int label_fontSize=15;
int uom_fontSize = 15;
int bb_uom_dx = (int)(bb_w /2 - uom_fontSize*2.5) ;
//add visual radar relative distance
if (true) {
char val_str[16];
char uom_str[6];
NVGcolor val_color = COLOR_WHITE_ALPHA(200);
if (scene->lead_status) {
//show RED if less than 5 meters
//show orange if less than 15 meters
if((int)(scene->lead_d_rel) < 15) {
val_color = nvgRGBA(255, 188, 3, 200);
}
if((int)(scene->lead_d_rel) < 5) {
val_color = nvgRGBA(255, 0, 0, 200);
}
// lead car relative distance is always in meters
snprintf(val_str, sizeof(val_str), "%d", (int)scene->lead_d_rel);
} else {
snprintf(val_str, sizeof(val_str), "-");
}
snprintf(uom_str, sizeof(uom_str), "m ");
bb_h +=bb_ui_draw_measure(s, val_str, uom_str,
(strcmp(s->dragon_locale, "zh-TW") == 0? "真實車距" : strcmp(s->dragon_locale, "zh-CN") == 0? "真实车距" : "REL DIST"),
bb_rx, bb_ry, bb_uom_dx,
val_color, lab_color, uom_color,
value_fontSize, label_fontSize, uom_fontSize );
bb_ry = bb_y + bb_h;
}
//add visual radar relative speed
if (true) {
char val_str[16];
char uom_str[6];
NVGcolor val_color = COLOR_WHITE_ALPHA(200);
if (scene->lead_status) {
//show Orange if negative speed (approaching)
//show Orange if negative speed faster than 5mph (approaching fast)
if((int)(scene->lead_v_rel) < 0) {
val_color = nvgRGBA(255, 188, 3, 200);
}
if((int)(scene->lead_v_rel) < -5) {
val_color = nvgRGBA(255, 0, 0, 200);
}
// lead car relative speed is always in meters
if (s->is_metric) {
snprintf(val_str, sizeof(val_str), "%d", (int)(scene->lead_v_rel * 3.6 + 0.5));
} else {
snprintf(val_str, sizeof(val_str), "%d", (int)(scene->lead_v_rel * 2.2374144 + 0.5));
}
} else {
snprintf(val_str, sizeof(val_str), "-");
}
if (s->is_metric) {
snprintf(uom_str, sizeof(uom_str), "km/h");;
} else {
snprintf(uom_str, sizeof(uom_str), "mph");
}
bb_h +=bb_ui_draw_measure(s, val_str, uom_str,
(strcmp(s->dragon_locale, "zh-TW") == 0? "相對速度" : strcmp(s->dragon_locale, "zh-CN") == 0? "相对速度" : "REAL SPEED"),
bb_rx, bb_ry, bb_uom_dx,
val_color, lab_color, uom_color,
value_fontSize, label_fontSize, uom_fontSize );
bb_ry = bb_y + bb_h;
}
//finally draw the frame
bb_h += 20;
nvgBeginPath(s->vg);
nvgRoundedRect(s->vg, bb_x, bb_y, bb_w, bb_h, 20);
nvgStrokeColor(s->vg, COLOR_WHITE_ALPHA(80));
nvgStrokeWidth(s->vg, 6);
nvgStroke(s->vg);
}
static void bb_ui_draw_measures_right(UIState *s, int bb_x, int bb_y, int bb_w ) {
const UIScene *scene = &s->scene;
int bb_rx = bb_x + (int)(bb_w/2);
int bb_ry = bb_y;
int bb_h = 5;
NVGcolor lab_color = COLOR_WHITE_ALPHA(200);
NVGcolor uom_color = COLOR_WHITE_ALPHA(200);
int value_fontSize=30;
int label_fontSize=15;
int uom_fontSize = 15;
int bb_uom_dx = (int)(bb_w /2 - uom_fontSize*2.5) ;
//add steering angle
if (true) {
char val_str[16];
char uom_str[6];
NVGcolor val_color = COLOR_WHITE_ALPHA(200);
//show Orange if more than 6 degrees
//show red if more than 12 degrees
if(((int)(scene->angleSteers) < -6) || ((int)(scene->angleSteers) > 6)) {
val_color = nvgRGBA(255, 188, 3, 200);
}
if(((int)(scene->angleSteers) < -12) || ((int)(scene->angleSteers) > 12)) {
val_color = nvgRGBA(255, 0, 0, 200);
}
// steering is in degrees
snprintf(val_str, sizeof(val_str), "%.1f°",(scene->angleSteers));
snprintf(uom_str, sizeof(uom_str), "");
bb_h +=bb_ui_draw_measure(s, val_str, uom_str,
(strcmp(s->dragon_locale, "zh-TW") == 0? "實際轉角" : strcmp(s->dragon_locale, "zh-CN") == 0? "实际转角" : "REAL STEER"),
bb_rx, bb_ry, bb_uom_dx,
val_color, lab_color, uom_color,
value_fontSize, label_fontSize, uom_fontSize );
bb_ry = bb_y + bb_h;
}
//add desired steering angle
if (true) {
char val_str[16];
char uom_str[6];
NVGcolor val_color = COLOR_WHITE_ALPHA(200);
//show Orange if more than 6 degrees
//show red if more than 12 degrees
if(((int)(scene->angleSteersDes) < -6) || ((int)(scene->angleSteersDes) > 6)) {
val_color = nvgRGBA(255, 188, 3, 200);
}
if(((int)(scene->angleSteersDes) < -12) || ((int)(scene->angleSteersDes) > 12)) {
val_color = nvgRGBA(255, 0, 0, 200);
}
// steering is in degrees
snprintf(val_str, sizeof(val_str), "%.1f°",(scene->angleSteersDes));
snprintf(uom_str, sizeof(uom_str), "");
bb_h +=bb_ui_draw_measure(s, val_str, uom_str,
(strcmp(s->dragon_locale, "zh-TW") == 0? "預測轉角" : strcmp(s->dragon_locale, "zh-CN") == 0? "预测转角" : "DESIR STEER"),
bb_rx, bb_ry, bb_uom_dx,
val_color, lab_color, uom_color,
value_fontSize, label_fontSize, uom_fontSize );
bb_ry = bb_y + bb_h;
}
//finally draw the frame
bb_h += 20;
nvgBeginPath(s->vg);
nvgRoundedRect(s->vg, bb_x, bb_y, bb_w, bb_h, 20);
nvgStrokeColor(s->vg, COLOR_WHITE_ALPHA(80));
nvgStrokeWidth(s->vg, 6);
nvgStroke(s->vg);
}
static void ui_draw_bbui(UIState *s) {
const UIScene *scene = &s->scene;
const int bb_dml_w = 180;
const int bb_dml_x = (scene->ui_viz_rx + (bdr_s * 2));
const int bb_dml_y = (box_y + (bdr_s * 1.5)) + 220;
const int bb_dmr_w = 180;
const int bb_dmr_x = scene->ui_viz_rx + scene->ui_viz_rw - bb_dmr_w - (bdr_s * 2);
const int bb_dmr_y = (box_y + (bdr_s * 1.5)) + 220;
bb_ui_draw_measures_right(s, bb_dml_x, bb_dml_y, bb_dml_w);
bb_ui_draw_measures_left(s, bb_dmr_x, bb_dmr_y, bb_dmr_w);
}
static void ui_draw_vision_footer(UIState *s) {
nvgBeginPath(s->vg);
nvgRect(s->vg, s->scene.ui_viz_rx, footer_y, s->scene.ui_viz_rw, footer_h);
ui_draw_vision_face(s);
if (s->dragon_ui_face) {
ui_draw_vision_face(s);
}
if (!s->dragon_waze_mode) {
if ((int)s->dragon_df_mode > 0) {
ui_draw_df_button(s);
}
if ((int)s->dragon_ap_mode > 0) {
ui_draw_ap_button(s);
}
}
if (s->dragon_ui_dev) {
ui_draw_bbui(s);
}
if (s->dragon_ui_dev_mini || s->dragon_enable_dashcam || s->dragon_waze_mode) {
ui_draw_infobar(s);
}
#ifdef SHOW_SPEEDLIMIT
// ui_draw_vision_map(s);
@@ -717,13 +1139,20 @@ static void ui_draw_vision(UIState *s) {
glEnable(GL_SCISSOR_TEST);
glViewport(scene->ui_viz_rx+scene->ui_viz_ro, s->fb_h-(box_y+box_h), viz_w, box_h);
glScissor(scene->ui_viz_rx, s->fb_h-(box_y+box_h), scene->ui_viz_rw, box_h);
draw_frame(s);
if (s->dragon_driving_ui) {
draw_frame(s);
}
if (s->dragon_ui_dm_view) {
glViewport(1240, 110, viz_w*0.4, box_h*0.4);
draw_front_frame(s);
glClear(GL_STENCIL_BUFFER_BIT);
}
glDisable(GL_SCISSOR_TEST);
glViewport(0, 0, s->fb_w, s->fb_h);
// Draw augmented elements
if (!scene->frontview && !scene->fullview) {
if (s->dragon_driving_ui && !scene->frontview && !scene->fullview) {
ui_draw_world(s);
}
@@ -747,8 +1176,11 @@ static void ui_draw_background(UIState *s) {
int bg_status = s->status;
assert(bg_status < ARRAYSIZE(bg_colors));
const uint8_t *color = bg_colors[bg_status];
glClearColor(color[0]/256.0, color[1]/256.0, color[2]/256.0, 1.0);
if (s->vision_seen && s->dragon_waze_mode) {
glClearColor(0, 0, 0, 0);
} else {
glClearColor(color[0]/256.0, color[1]/256.0, color[2]/256.0, 1.0);
}
glClear(GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
}
@@ -759,7 +1191,9 @@ void ui_draw(UIState *s) {
glViewport(0, 0, s->fb_w, s->fb_h);
nvgBeginFrame(s->vg, s->fb_w, s->fb_h, 1.0f);
ui_draw_sidebar(s);
if (s->started && s->active_app == cereal::UiLayoutState::App::NONE && s->status != STATUS_STOPPED && s->vision_seen) {
if (s->vision_seen && s->dragon_waze_mode) {
ui_draw_vision(s);
} else if (s->started && s->active_app == cereal::UiLayoutState::App::NONE && s->status != STATUS_STOPPED && s->vision_seen) {
ui_draw_vision(s);
}
nvgEndFrame(s->vg);
@@ -865,11 +1299,11 @@ void ui_nvg_init(UIState *s) {
s->font_courbd = nvgCreateFont(s->vg, "courbd", "../assets/fonts/courbd.ttf");
assert(s->font_courbd >= 0);
s->font_sans_regular = nvgCreateFont(s->vg, "sans-regular", "../assets/fonts/opensans_regular.ttf");
s->font_sans_regular = nvgCreateFont(s->vg, "sans-regular", "../../dragonpilot/cjk-fonts/NotoSansCJKtc-Regular.otf");
assert(s->font_sans_regular >= 0);
s->font_sans_semibold = nvgCreateFont(s->vg, "sans-semibold", "../assets/fonts/opensans_semibold.ttf");
s->font_sans_semibold = nvgCreateFont(s->vg, "sans-semibold", "../../dragonpilot/cjk-fonts/NotoSansCJKtc-Medium.otf");
assert(s->font_sans_semibold >= 0);
s->font_sans_bold = nvgCreateFont(s->vg, "sans-bold", "../assets/fonts/opensans_bold.ttf");
s->font_sans_bold = nvgCreateFont(s->vg, "sans-bold", "../../dragonpilot/cjk-fonts/NotoSansCJKtc-Bold.otf");
assert(s->font_sans_bold >= 0);
s->img_wheel = nvgCreateImage(s->vg, "../assets/img_chffr_wheel.png", 1);
+66 -12
View File
@@ -20,7 +20,28 @@ static void ui_draw_sidebar_home_button(UIState *s) {
bool homeActive = s->active_app == cereal::UiLayoutState::App::HOME;
const int home_btn_xr = !s->scene.uilayout_sidebarcollapsed ? home_btn_x : -(sbr_w);
ui_draw_image(s->vg, home_btn_xr, home_btn_y, home_btn_w, home_btn_h, s->img_button_home, homeActive ? 1.0f : 0.65f);
if (s->dragon_updating) {
nvgBeginPath(s->vg);
nvgCircle(s->vg, home_btn_xr + home_btn_w/2, home_btn_y + home_btn_h/2, 90);
nvgFillColor(s->vg, nvgRGBA(255, 255, 255, s->scene.alert_rate));
nvgFill(s->vg);
nvgFillColor(s->vg, nvgRGBA(0, 0, 0, s->scene.alert_rate));
nvgFontSize(s->vg, (strcmp(s->dragon_locale, "zh-TW") == 0? 60 : strcmp(s->dragon_locale, "zh-CN") == 0? 60 : 46));
nvgFontFaceId(s->vg, s->font_sans_bold);
nvgTextAlign(s->vg, NVG_ALIGN_CENTER | NVG_ALIGN_MIDDLE);
nvgTextBox(s->vg, home_btn_xr, home_btn_y + home_btn_h/2, home_btn_w,
(strcmp(s->dragon_locale, "zh-TW") == 0? "更新中" : strcmp(s->dragon_locale, "zh-CN") == 0? "更新中" : "UPDATING"),
NULL);
s->scene.alert_rate += 5*s->scene.alert_type;
if (s->scene.alert_rate <= 0 || s->scene.alert_rate >= 255) {
s->scene.alert_type *= -1;
}
} else {
ui_draw_image(s->vg, home_btn_xr, home_btn_y, home_btn_w, home_btn_h, s->img_button_home, homeActive ? 1.0f : 0.65f);
}
}
static void ui_draw_sidebar_network_strength(UIState *s) {
@@ -38,6 +59,35 @@ static void ui_draw_sidebar_network_strength(UIState *s) {
ui_draw_image(s->vg, network_img_x, network_img_y, network_img_w, network_img_h, s->img_network[img_idx], 1.0f);
}
static void ui_draw_sidebar_ip_addr(UIState *s) {
const int network_ip_w = 176;
const int network_ip_x = !s->scene.uilayout_sidebarcollapsed ? 54 : -(sbr_w);
const int network_ip_y = 255;
char network_ip_str[15];
snprintf(network_ip_str, sizeof(network_ip_str), "%s", s->scene.ipAddr);
nvgFillColor(s->vg, COLOR_WHITE);
nvgFontSize(s->vg, 34);
nvgFontFaceId(s->vg, s->font_sans_regular);
nvgTextAlign(s->vg, NVG_ALIGN_CENTER | NVG_ALIGN_MIDDLE);
nvgTextBox(s->vg, network_ip_x, network_ip_y, network_ip_w, network_ip_str, NULL);
}
static void ui_draw_sidebar_battery_text(UIState *s) {
const int battery_img_h = 36;
const int battery_img_w = 96;
const int battery_img_x = !s->scene.uilayout_sidebarcollapsed ? 150 : -(sbr_w);
const int battery_img_y = 305;
char battery_str[7];
snprintf(battery_str, sizeof(battery_str), "%d%%%s", s->scene.batteryPercent, s->scene.batteryCharging ? "+" : "-");
nvgFillColor(s->vg, COLOR_WHITE);
nvgFontSize(s->vg, 44);
nvgFontFaceId(s->vg, s->font_sans_regular);
nvgTextAlign(s->vg, NVG_ALIGN_CENTER | NVG_ALIGN_MIDDLE);
nvgTextBox(s->vg, battery_img_x, battery_img_y, battery_img_w, battery_str, NULL);
}
static void ui_draw_sidebar_battery_icon(UIState *s) {
const int battery_img_h = 36;
const int battery_img_w = 76;
@@ -61,7 +111,7 @@ static void ui_draw_sidebar_network_type(UIState *s) {
{cereal::ThermalData::NetworkType::CELL4_G, "4G"},
{cereal::ThermalData::NetworkType::CELL5_G, "5G"}};
const int network_x = !s->scene.uilayout_sidebarcollapsed ? 50 : -(sbr_w);
const int network_y = 273;
const int network_y = 303;
const int network_w = 100;
const int network_h = 100;
const char *network_type = network_type_map[s->scene.networkType];
@@ -104,13 +154,13 @@ static void ui_draw_sidebar_metric(UIState *s, const char* label_str, const char
nvgTextBox(s->vg, metric_x + 50, metric_y + 50, metric_w - 60, value_str, NULL);
nvgFillColor(s->vg, COLOR_WHITE);
nvgFontSize(s->vg, 48);
nvgFontSize(s->vg, 46);
nvgFontFaceId(s->vg, s->font_sans_regular);
nvgTextAlign(s->vg, NVG_ALIGN_LEFT | NVG_ALIGN_MIDDLE);
nvgTextBox(s->vg, metric_x + 50, metric_y + 50 + 66, metric_w - 60, label_str, NULL);
} else {
nvgFillColor(s->vg, COLOR_WHITE);
nvgFontSize(s->vg, 48);
nvgFontSize(s->vg, 46);
nvgFontFaceId(s->vg, s->font_sans_bold);
nvgTextAlign(s->vg, NVG_ALIGN_CENTER | NVG_ALIGN_MIDDLE);
nvgTextBox(s->vg, metric_x + 35, metric_y + (strchr(message_str, '\n') ? 40 : 50), metric_w - 50, message_str, NULL);
@@ -129,7 +179,8 @@ static void ui_draw_sidebar_temp_metric(UIState *s) {
const int temp_y_offset = 0;
snprintf(temp_value_str, sizeof(temp_value_str), "%d", s->scene.paTemp);
snprintf(temp_value_unit, sizeof(temp_value_unit), "%s", "°C");
snprintf(temp_label_str, sizeof(temp_label_str), "%s", "TEMP");
snprintf(temp_label_str, sizeof(temp_label_str), "%s",
(strcmp(s->dragon_locale, "zh-TW") == 0? "溫度" : strcmp(s->dragon_locale, "zh-CN") == 0? "温度" : "TEMP"));
strcat(temp_value_str, temp_value_unit);
ui_draw_sidebar_metric(s, temp_label_str, temp_value_str, temp_severity_map[s->scene.thermalStatus], temp_y_offset, NULL);
@@ -147,10 +198,10 @@ static void ui_draw_sidebar_panda_metric(UIState *s) {
if (s->started){
if (s->scene.satelliteCount < 6) {
panda_severity = 1;
snprintf(panda_message_str, sizeof(panda_message_str), "%s", "VEHICLE\nNO GPS");
snprintf(panda_message_str, sizeof(panda_message_str), "%s %d", "VEHICLE\nGPS:", s->scene.satelliteCount);
} else if (s->scene.satelliteCount >= 6) {
panda_severity = 0;
snprintf(panda_message_str, sizeof(panda_message_str), "%s", "VEHICLE\nGOOD GPS");
snprintf(panda_message_str, sizeof(panda_message_str), "%s %d", "VEHICLE\nGPS:", s->scene.satelliteCount);
}
} else {
panda_severity = 0;
@@ -160,14 +211,16 @@ static void ui_draw_sidebar_panda_metric(UIState *s) {
ui_draw_sidebar_metric(s, NULL, NULL, panda_severity, panda_y_offset, panda_message_str);
}
static void ui_draw_sidebar_connectivity(UIState *s) {
if (s->scene.athenaStatus == NET_DISCONNECTED) {
ui_draw_sidebar_metric(s, NULL, NULL, 1, 180+158, "CONNECT\nOFFLINE");
ui_draw_sidebar_metric(s, NULL, NULL, 1, 180+158,
(strcmp(s->dragon_locale, "zh-TW") == 0? "CONNECT\n已離線" : strcmp(s->dragon_locale, "zh-CN") == 0? "CONNECT\n已离线" : "CONNECT\nOFFLINE"));
} else if (s->scene.athenaStatus == NET_CONNECTED) {
ui_draw_sidebar_metric(s, NULL, NULL, 0, 180+158, "CONNECT\nONLINE");
ui_draw_sidebar_metric(s, NULL, NULL, 0, 180+158,
(strcmp(s->dragon_locale, "zh-TW") == 0? "CONNECT\n已連線" : strcmp(s->dragon_locale, "zh-CN") == 0? "CONNECT\n已连线" : "CONNECT\nONLINE"));
} else {
ui_draw_sidebar_metric(s, NULL, NULL, 2, 180+158, "CONNECT\nERROR");
ui_draw_sidebar_metric(s, NULL, NULL, 2, 180+158,
(strcmp(s->dragon_locale, "zh-TW") == 0? "CONNECT\n錯誤" : strcmp(s->dragon_locale, "zh-CN") == 0? "CONNECT\n错误" : "CONNECT\nERROR"));
}
}
@@ -179,7 +232,8 @@ void ui_draw_sidebar(UIState *s) {
ui_draw_sidebar_settings_button(s);
ui_draw_sidebar_home_button(s);
ui_draw_sidebar_network_strength(s);
ui_draw_sidebar_battery_icon(s);
ui_draw_sidebar_ip_addr(s);
ui_draw_sidebar_battery_text(s);
ui_draw_sidebar_network_type(s);
ui_draw_sidebar_temp_metric(s);
ui_draw_sidebar_panda_metric(s);
Binary file not shown.
+237 -17
View File
@@ -16,6 +16,7 @@
#include "common/params.h"
static int last_brightness = -1;
char last_modified[20];
static void set_brightness(UIState *s, int brightness) {
if (last_brightness != brightness && (s->awake || brightness == 0)) {
FILE *f = fopen("/sys/class/leds/lcd-backlight/brightness", "wb");
@@ -42,7 +43,7 @@ static void set_awake(UIState *s, bool awake) {
#ifdef QCOM
if (awake) {
// 30 second timeout at 30 fps
s->awake_timeout = 30*30;
s->awake_timeout = (s->dragon_ui_screen_off_driving && s->started)? 10*30 : 30*30;
}
if (s->awake != awake) {
s->awake = awake;
@@ -121,6 +122,46 @@ static void handle_driver_view_touch(UIState *s, int touch_x, int touch_y) {
int err = write_db_value("IsDriverViewEnabled", "0", 1);
}
static bool handle_dp_btn_touch(UIState *s, int touch_x, int touch_y) {
//dfButton manager // code below thanks to kumar: https://github.com/arne182/openpilot/commit/71d5aac9f8a3f5942e89634b20cbabf3e19e3e78
if (s->started && s->active_app != cereal::UiLayoutState::App::SETTINGS) {
if ((int)s->dragon_df_mode > 0 && touch_x >= df_btn_x && touch_x <= (df_btn_x + df_btn_w) && touch_y >= df_btn_y && touch_y <= (df_btn_y + df_btn_h)) {
s->scene.uilayout_sidebarcollapsed = true; // collapse sidebar when tapping df button
int val = s->dragon_df_mode;
val++;
if (val >= 5) {
val = 1;
}
s->dragon_df_mode = val;
char str[1];
sprintf(str, "%d", val);
write_db_value("DragonDynamicFollow", str, 1);
char time_str[11];
snprintf(time_str, 11, "%lu", time(NULL));
write_db_value("DragonLastModified", time_str, 11);
return true;
} else if ((int)s->dragon_ap_mode > 0 && touch_x >= ap_btn_x && touch_x <= (ap_btn_x + ap_btn_w) && touch_y >= ap_btn_y && touch_y <= (ap_btn_y + ap_btn_h)) {
s->scene.uilayout_sidebarcollapsed = true; // collapse sidebar when tapping ap button
int val = s->dragon_ap_mode;
val++;
if (val >= 4) {
val = 1;
}
s->dragon_ap_mode = val;
char str[1];
sprintf(str, "%d", val);
write_db_value("DragonAccelProfile", str, 1);
char time_str[11];
snprintf(time_str, 11, "%lu", time(NULL));
write_db_value("DragonLastModified", time_str, 11);
return true;
}
}
return false;
}
static void handle_vision_touch(UIState *s, int touch_x, int touch_y) {
if (s->started && (touch_x >= s->scene.ui_viz_rx - bdr_s)
&& (s->active_app != cereal::UiLayoutState::App::SETTINGS)) {
@@ -167,6 +208,15 @@ static int read_param_uint64(uint64_t* dest, const char* param_name, bool persis
return result;
}
static void read_param_string(char* param, const char* param_name, bool persistent_param = false) {
char *s;
const int result = read_db_value(param_name, &s, NULL);
if (result == 0) {
snprintf(param, 128, "%s", s);
free(s);
}
}
static void read_param_bool_timeout(bool* param, const char* param_name, int* timeout, bool persistent_param = false) {
if (*timeout > 0){
(*timeout)--;
@@ -201,6 +251,15 @@ static int write_param_float(float param, const char* param_name, bool persisten
return write_db_value(param_name, s, MIN(size, sizeof(s)), persistent_param);
}
static void read_param_string_timeout(char* param, const char* param_name, int* timeout, bool persistent_param = false) {
if (*timeout > 0){
(*timeout)--;
} else {
read_param_string(param, param_name, persistent_param);
*timeout = 2 * UI_FREQ; // 0.5Hz
}
}
static void update_offroad_layout_timeout(UIState *s, int* timeout) {
if (*timeout > 0) {
(*timeout)--;
@@ -227,6 +286,7 @@ static void ui_init(UIState *s) {
s->driverstate_sock = SubSocket::create(s->ctx, "driverState");
s->dmonitoring_sock = SubSocket::create(s->ctx, "dMonitoringState");
s->offroad_sock = PubSocket::create(s->ctx, "offroadLayout");
s->carstate_sock = SubSocket::create(s->ctx, "carState");
assert(s->model_sock != NULL);
assert(s->controlsstate_sock != NULL);
@@ -239,6 +299,7 @@ static void ui_init(UIState *s) {
assert(s->driverstate_sock != NULL);
assert(s->dmonitoring_sock != NULL);
assert(s->offroad_sock != NULL);
assert(s->carstate_sock != NULL);
s->poller = Poller::create({
s->model_sock,
@@ -250,7 +311,8 @@ static void ui_init(UIState *s) {
s->health_sock,
s->ubloxgnss_sock,
s->driverstate_sock,
s->dmonitoring_sock
s->dmonitoring_sock,
s->carstate_sock
});
#ifdef SHOW_SPEEDLIMIT
@@ -323,10 +385,63 @@ static void ui_init_vision(UIState *s, const VisionStreamBufs back_bufs,
read_param_bool(&s->longitudinal_control, "LongitudinalControl");
read_param_bool(&s->limit_set_speed, "LimitSetSpeed");
// dp
read_param_string(s->dragon_last_modified, "DragonLastModified");
strncpy(last_modified, s->dragon_last_modified, sizeof(last_modified));
read_param_string(s->dragon_locale, "DragonLocale");
read_param_float(&s->dragon_ui_volume_boost, "DragonUIVolumeBoost");
read_param_bool(&s->dragon_waze_mode, "DragonWazeMode");
read_param_bool(&s->dragon_updating, "DragonUpdating");
read_param_uint64(&s->dragon_df_mode, "DragonDynamicFollow");
read_param_uint64(&s->dragon_ap_mode, "DragonAccelProfile");
read_param_bool(&s->dragon_ui_screen_off_reversing, "DragonUIScreenOffReversing");
read_param_bool(&s->dragon_ui_screen_off_driving, "DragonUIScreenOffDriving");
read_param_uint64(&s->dragon_ui_brightness, "DragonUIBrightness");
if (s->dragon_waze_mode) {
s->dragon_ui_speed = false;
s->dragon_ui_event = false;
s->dragon_ui_maxspeed = false;
s->dragon_ui_face = false;
s->dragon_ui_dev = false;
s->dragon_ui_dev_mini = false;
s->dragon_enable_dashcam = false;
s->dragon_driving_ui = false;
s->dragon_ui_lane = false;
s->dragon_ui_lead = false;
s->dragon_ui_path = false;
s->dragon_ui_blinker = false;
s->dragon_ui_dm_view = false;
} else {
read_param_bool(&s->dragon_enable_dm, "DragonEnableDriverMonitoring");
if (!s->dragon_enable_dm) {
s->dragon_ui_face = false;
} else {
read_param_bool(&s->dragon_ui_face, "DragonUIFace");
}
read_param_bool(&s->dragon_ui_speed, "DragonUISpeed");
read_param_bool(&s->dragon_ui_event, "DragonUIEvent");
read_param_bool(&s->dragon_ui_maxspeed, "DragonUIMaxSpeed");
read_param_bool(&s->dragon_ui_dev, "DragonUIDev");
read_param_bool(&s->dragon_ui_dev_mini, "DragonUIDevMini");
read_param_bool(&s->dragon_enable_dashcam, "DragonEnableDashcam");
read_param_bool(&s->dragon_driving_ui, "DragonDrivingUI");
read_param_bool(&s->dragon_ui_lane, "DragonUILane");
read_param_bool(&s->dragon_ui_lead, "DragonUILead");
read_param_bool(&s->dragon_ui_path, "DragonUIPath");
read_param_bool(&s->dragon_ui_blinker, "DragonUIBlinker");
read_param_bool(&s->dragon_ui_dm_view, "DragonUIDMView");
}
// Set offsets so params don't get read at the same time
s->longitudinal_control_timeout = UI_FREQ / 3;
s->is_metric_timeout = UI_FREQ / 2;
s->limit_set_speed_timeout = UI_FREQ;
// dp
s->dragon_last_modified_timeout = UI_FREQ / 4;
s->dragon_updating_timeout = UI_FREQ / 5;
}
static PathData read_path(cereal::ModelData::PathData::Reader pathp) {
@@ -395,6 +510,10 @@ void handle_message(UIState *s, Message* msg) {
scene.gps_planner_active = data.getGpsPlannerActive();
scene.monitoring_active = data.getDriverMonitoringOn();
// dp - steer data
s->scene.angleSteers = data.getAngleSteers();
s->scene.angleSteersDes = data.getAngleSteersDes();
scene.decel_for_model = data.getDecelForModel();
auto alert_sound = data.getAlertSound();
const auto sound_none = cereal::CarControl::HUDControl::AudibleAlert::NONE;
@@ -405,6 +524,9 @@ void handle_message(UIState *s, Message* msg) {
if (alert_sound != sound_none){
play_alert_sound(alert_sound);
s->alert_type = data.getAlertType();
if (s->dragon_ui_screen_off_driving) {
set_awake(s, true);
}
}
s->alert_sound = alert_sound;
}
@@ -492,7 +614,7 @@ void handle_message(UIState *s, Message* msg) {
scene.freeSpace = data.getFreeSpace();
scene.thermalStatus = data.getThermalStatus();
scene.paTemp = data.getPa0();
snprintf(scene.ipAddr, sizeof(scene.ipAddr), "%s", data.getIpAddr().cStr());
s->thermal_started = data.getStarted();
} else if (which == cereal::Event::UBLOX_GNSS) {
auto data = event.getUbloxGnss();
@@ -513,12 +635,23 @@ void handle_message(UIState *s, Message* msg) {
scene.is_rhd = data.getIsRHD();
scene.awareness_status = data.getAwarenessStatus();
s->preview_started = data.getIsPreview();
} else if (which == cereal::Event::CAR_STATE) {
auto data = event.getCarState();
if(scene.leftBlinker!=data.getLeftBlinker() || scene.rightBlinker!=data.getRightBlinker()) {
scene.blinker_blinkingrate = 100;
}
scene.leftBlinker = data.getLeftBlinker();
scene.rightBlinker = data.getRightBlinker();
scene.brakeLights = data.getBrakeLights();
scene.isReversing = data.getGearShifter() == cereal::CarState::GearShifter::REVERSE;
}
s->started = s->thermal_started || s->preview_started ;
// Handle onroad/offroad transition
if (!s->started) {
if (s->status != STATUS_STOPPED) {
framebuffer_swap_layer(s->fb, 0);
update_status(s, STATUS_STOPPED);
s->alert_sound_timeout = 0;
s->vision_seen = false;
@@ -630,6 +763,10 @@ static void ui_update(UIState *s) {
s->alert_blinking_alpha = 1.0;
s->alert_blinked = false;
if (s->dragon_waze_mode) {
framebuffer_swap_layer(s->fb, 0x00010000);
}
}
zmq_pollitem_t polls[1] = {{0}};
@@ -915,7 +1052,13 @@ int main(int argc, char* argv[]) {
s->scene.satelliteCount = -1;
s->started = false;
s->vision_seen = false;
// dp
s->scene.alert_rate = 0;
s->scene.alert_type = 1;
char locale[10];
if (s->dragon_ui_screen_off_driving) {
set_awake(s, true);
}
while (!do_exit) {
bool should_swap = false;
if (!s->started) {
@@ -927,11 +1070,15 @@ int main(int argc, char* argv[]) {
double u1 = millis_since_boot();
// light sensor is only exposed on EONs
float clipped_brightness = (s->light_sensor*brightness_m) + brightness_b;
if (clipped_brightness > 512) clipped_brightness = 512;
smooth_brightness = clipped_brightness * 0.01 + smooth_brightness * 0.99;
if (smooth_brightness > 255) smooth_brightness = 255;
set_brightness(s, (int)smooth_brightness);
if (s->dragon_ui_brightness == 0) {
float clipped_brightness = (s->light_sensor*brightness_m) + brightness_b;
if (clipped_brightness > 512) clipped_brightness = 512;
smooth_brightness = clipped_brightness * 0.01 + smooth_brightness * 0.99;
if (smooth_brightness > 255) smooth_brightness = 255;
set_brightness(s, (int)smooth_brightness);
} else {
set_brightness(s, (int)(255*s->dragon_ui_brightness*0.01));
}
// resize vision for collapsing sidebar
const bool hasSidebar = !s->scene.uilayout_sidebarcollapsed;
@@ -939,20 +1086,37 @@ int main(int argc, char* argv[]) {
s->scene.ui_viz_rw = hasSidebar ? box_w : (box_w + sbr_w - (bdr_s * 2));
s->scene.ui_viz_ro = hasSidebar ? -(sbr_w - 6 * bdr_s) : 0;
// poll for touch events
int touch_x = -1, touch_y = -1;
int touched = touch_poll(&touch, &touch_x, &touch_y, 0);
if (touched == 1) {
set_awake(s, true);
handle_sidebar_touch(s, touch_x, touch_y);
handle_vision_touch(s, touch_x, touch_y);
if (s->started && s->dragon_waze_mode) {
// always collapsed sidebar when vision is connect and in waze mode
s->scene.uilayout_sidebarcollapsed = true;
} else {
// poll for touch events
int touch_x = -1, touch_y = -1;
int touched = touch_poll(&touch, &touch_x, &touch_y, 0);
if (touched == 1) {
if (s->dragon_ui_screen_off_driving && s->awake_timeout == 0) {
set_awake(s, true);
} else {
set_awake(s, true);
if (!handle_dp_btn_touch(s, touch_x, touch_y)) {
handle_sidebar_touch(s, touch_x, touch_y);
handle_vision_touch(s, touch_x, touch_y);
}
}
}
}
if (!s->started) {
// always process events offroad
check_messages(s);
} else {
set_awake(s, true);
if (s->dragon_ui_screen_off_driving) {
// do nothing
} else if (s->scene.isReversing && s->dragon_ui_screen_off_reversing) {
set_awake(s, false);
} else {
set_awake(s, true);
}
// Car started, fetch a new rgb image from ipc
if (s->vision_connected){
ui_update(s);
@@ -995,6 +1159,10 @@ int main(int argc, char* argv[]) {
s->volume_timeout--;
} else {
int volume = fmin(MAX_VOLUME, MIN_VOLUME + s->scene.v_ego / 5); // up one notch every 5 m/s
if (s->dragon_ui_volume_boost > 0 || s->dragon_ui_volume_boost < 0) {
volume = volume * (1 + s->dragon_ui_volume_boost /100);
volume = volume > MAX_VOLUME? MAX_VOLUME : volume;
}
set_volume(volume);
s->volume_timeout = 5 * UI_FREQ;
}
@@ -1043,6 +1211,58 @@ int main(int argc, char* argv[]) {
}
update_offroad_layout_timeout(s, &s->offroad_layout_timeout);
// dp
read_param_bool_timeout(&s->dragon_updating, "DragonUpdating", &s->dragon_updating_timeout);
read_param_string_timeout(s->dragon_last_modified, "DragonLastModified", &s->dragon_last_modified_timeout);
if (strcmp(last_modified, s->dragon_last_modified) != 0) {
strncpy(last_modified, s->dragon_last_modified, sizeof(last_modified));
read_param_string(s->dragon_locale, "DragonLocale");
read_param_bool(&s->dragon_waze_mode, "DragonWazeMode");
read_param_float(&s->dragon_ui_volume_boost, "DragonUIVolumeBoost");
read_param_uint64(&s->dragon_df_mode, "DragonDynamicFollow");
read_param_uint64(&s->dragon_ap_mode, "DragonAccelProfile");
read_param_bool(&s->dragon_ui_screen_off_reversing, "DragonUIScreenOffReversing");
read_param_bool(&s->dragon_ui_screen_off_driving, "DragonUIScreenOffDriving");
read_param_uint64(&s->dragon_ui_brightness, "DragonUIBrightness");
if (s->dragon_waze_mode) {
s->dragon_ui_speed = false;
s->dragon_ui_event = false;
s->dragon_ui_maxspeed = false;
s->dragon_ui_face = false;
s->dragon_ui_dev = false;
s->dragon_ui_dev_mini = false;
s->dragon_enable_dashcam = false;
s->dragon_driving_ui = false;
s->dragon_ui_lane = false;
s->dragon_ui_lead = false;
s->dragon_ui_path = false;
s->dragon_ui_blinker = false;
s->dragon_ui_dm_view = false;
} else {
read_param_bool(&s->dragon_enable_dm, "DragonEnableDriverMonitoring");
if (!s->dragon_enable_dm) {
s->dragon_ui_face = false;
} else {
read_param_bool(&s->dragon_ui_face, "DragonUIFace");
}
read_param_bool(&s->dragon_ui_speed, "DragonUISpeed");
read_param_bool(&s->dragon_ui_event, "DragonUIEvent");
read_param_bool(&s->dragon_ui_maxspeed, "DragonUIMaxSpeed");
read_param_bool(&s->dragon_ui_dev, "DragonUIDev");
read_param_bool(&s->dragon_ui_dev_mini, "DragonUIDevMini");
read_param_bool(&s->dragon_enable_dashcam, "DragonEnableDashcam");
read_param_bool(&s->dragon_driving_ui, "DragonDrivingUI");
read_param_bool(&s->dragon_ui_lane, "DragonUILane");
read_param_bool(&s->dragon_ui_lead, "DragonUILead");
read_param_bool(&s->dragon_ui_path, "DragonUIPath");
read_param_bool(&s->dragon_ui_blinker, "DragonUIBlinker");
read_param_bool(&s->dragon_ui_dm_view, "DragonUIDMView");
}
}
pthread_mutex_unlock(&s->lock);
// the bg thread needs to be scheduled, so the main thread needs time without the lock
+60
View File
@@ -40,6 +40,7 @@
#define COLOR_WHITE_ALPHA(x) nvgRGBA(255, 255, 255, x)
#define COLOR_YELLOW nvgRGBA(218, 202, 37, 255)
#define COLOR_RED nvgRGBA(201, 34, 49, 255)
#define COLOR_RED_ALPHA(x) nvgRGBA(201, 34, 49, x)
#define COLOR_OCHRE nvgRGBA(218, 111, 37, 255)
#ifndef QCOM
@@ -74,6 +75,18 @@ const int home_btn_w = 180;
const int home_btn_x = 60;
const int home_btn_y = vwp_h - home_btn_h - 40;
// dp
// dynamic follow btn
const int df_btn_h = 180;
const int df_btn_w = 180;
const int df_btn_x = 1650;
const int df_btn_y = 750;
// accel profile btn
const int ap_btn_h = 180;
const int ap_btn_w = 180;
const int ap_btn_x = 1450;
const int ap_btn_y = 750;
const int UI_FREQ = 30; // Hz
const int MODEL_PATH_MAX_VERTICES_CNT = 98;
@@ -160,6 +173,23 @@ typedef struct UIScene {
cereal::HealthData::HwType hwType;
int satelliteCount;
uint8_t athenaStatus;
// dp
// for minimal UI
float angleSteersDes;
float angleSteers;
char ipAddr[20];
int alert_rate;
int alert_type;
// for black screen on reversing
bool isReversing;
// for blinker, from kegman
bool leftBlinker;
bool rightBlinker;
bool brakeLights;
int blinker_blinkingrate;
} UIScene;
typedef struct {
@@ -296,6 +326,36 @@ typedef struct UIState {
model_path_vertices_data model_path_vertices[MODEL_LANE_PATH_CNT * 2];
track_vertices_data track_vertices[2];
// dp
SubSocket *carstate_sock;
int dragon_updating_timeout;
int dragon_last_modified_timeout;
bool dragon_ui_speed;
bool dragon_ui_event;
bool dragon_ui_maxspeed;
bool dragon_ui_face;
bool dragon_ui_dev;
bool dragon_ui_dev_mini;
bool dragon_enable_dashcam;
float dragon_ui_volume_boost;
bool dragon_driving_ui;
bool dragon_ui_lane;
bool dragon_ui_lead;
bool dragon_ui_path;
bool dragon_ui_blinker;
bool dragon_waze_mode;
bool dragon_ui_dm_view;
bool dragon_updating;
uint64_t dragon_df_mode;
uint64_t dragon_ap_mode;
bool dragon_enable_dm;
char dragon_locale[20];
bool dragon_ui_screen_off_reversing;
char dragon_last_modified[20];
bool dragon_ui_screen_off_driving;
uint64_t dragon_ui_brightness;
} UIState;
// API
+9 -1
View File
@@ -33,6 +33,7 @@ from pathlib import Path
import fcntl
import threading
from cffi import FFI
from common.dp import is_online
from common.basedir import BASEDIR
from common.params import Params
@@ -116,8 +117,15 @@ def set_update_available_params(new_version=False):
params.put("LastUpdateTime", t.encode('utf8'))
if new_version:
branch_name = run(["git", "rev-parse", "--abbrev-ref", "HEAD"], FINALIZED).rstrip()
if branch_name == "testing":
postfix = ''
elif branch_name == "devel-i18n":
postfix = '-DEV'
else:
postfix = '-REL'
try:
with open(os.path.join(FINALIZED, "RELEASES.md"), "rb") as f:
with open(os.path.join(FINALIZED, f"CHANGELOGS{postfix}.md"), "rb") as f:
r = f.read()
r = r[:r.find(b'\n\n')] # Slice latest release notes
params.put("ReleaseNotes", r + b"\n")
+2 -1
View File
@@ -64,7 +64,8 @@ try:
dirty = dirty or (subprocess.call(["git", "diff-index", "--quiet", branch, "--"]) != 0)
if dirty:
dirty_files = subprocess.check_output(["git", "diff-index", branch, "--"], encoding='utf8')
#dirty_files = subprocess.check_output(["git", "diff-index", branch, "--"], encoding='utf8')
dirty_files = ""
commit = subprocess.check_output(["git", "rev-parse", "--verify", "HEAD"], encoding='utf8').rstrip()
origin_commit = subprocess.check_output(["git", "rev-parse", "--verify", branch], encoding='utf8').rstrip()
cloudlog.event("dirty comma branch", version=version, dirty=dirty, origin=origin, branch=branch, dirty_files=dirty_files, commit=commit, origin_commit=origin_commit)