* 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
This commit is contained in:
Rick Lan
2020-05-15 19:59:26 +10:00
parent e81e6393e6
commit 8502b57831
12 changed files with 124 additions and 19 deletions
+22 -1
View File
@@ -1,4 +1,25 @@
2020-05-10 (dp 0.7.5 v2)
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.
+34 -2
View File
@@ -1,4 +1,36 @@
2020-05-10 (dp 0.7.5 v2)
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.
@@ -7,7 +39,7 @@
* 簡/繁中文版和 i18n 整合成為單一版本。
* Merged zhs/zht/i18n versions into one.
* 新增大陸版 CAMRY HYBRID 指紋v2。(感謝 @杜子腾)
* Added China Camery Hybrid FPv2. (Thanks to @杜子腾)
* Added China Camry Hybrid FPv2. (Thanks to @杜子腾)
* 新增台灣版 Altis HYBRID 指紋v1。(感謝 @Fish)
* Added Taiwan Altis Hybrid FPv1. (Thanks to @Fish)
* 新增行駛時關閉畫面功能。
Binary file not shown.
+3
View File
@@ -195,6 +195,9 @@ keys = {
"DragonUIBrightness": [TxType.PERSISTENT],
"DragonDashcamImpactDetect": [TxType.PERSISTENT],
"DragonDashcamImpactDetectStarted": [TxType.CLEAR_ON_MANAGER_START],
"DragonEnableUploadOnMobile": [TxType.PERSISTENT],
"DragonEnableUploadOnHotspot": [TxType.PERSISTENT],
"DragonMaxSpeedLimit": [TxType.PERSISTENT],
}
+7 -2
View File
@@ -75,10 +75,15 @@ 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 not has_dragon_car_model and has_relay and not fixed_fingerprint:
if has_relay and not fixed_fingerprint:
# Vin query only reliably works thorugh OBDII
bus = 1
@@ -110,7 +115,7 @@ def fingerprint(logcan, sendcan, has_relay):
frame = 0
frame_fingerprint = 10 # 0.1s
car_fingerprint = None
done = True if has_dragon_car_model else False
done = False
while not done:
a = messaging.get_one_can(logcan)
+11 -1
View File
@@ -276,6 +276,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, 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
@@ -842,8 +846,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',
+6 -1
View File
@@ -50,7 +50,12 @@ 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
}],
},
{
# China Golf GTI @easyeiji
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, 804: 8, 806: 8, 807: 8, 808: 8, 809: 8, 870: 8, 896: 8, 897: 8, 898: 8, 901: 8, 917: 8, 919: 8, 927: 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, 1529: 8, 1600: 8, 1601: 8, 1603: 8, 1605: 8, 1624: 8, 1629: 8, 1631: 8, 1646: 8, 1648: 8, 1712: 6, 1714: 8, 1716: 8, 1717: 8, 1719: 8, 1720: 8, 1721: 8
},
],
}
DBC = {
+8 -3
View File
@@ -72,7 +72,7 @@ def events_to_bytes(events):
return ret
def data_sample(CI, CC, sm, can_sock, state, mismatch_counter, can_error_counter, params, dragon_toyota_stock_dsu):
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
@@ -119,7 +119,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
@@ -554,6 +554,7 @@ def controlsd_thread(sm=None, pm=None, can_sock=None):
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()
@@ -567,6 +568,10 @@ def controlsd_thread(sm=None, pm=None, can_sock=None):
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:
@@ -580,7 +585,7 @@ def controlsd_thread(sm=None, pm=None, can_sock=None):
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, dragon_toyota_stock_dsu)
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
+7 -4
View File
@@ -15,7 +15,7 @@ import os
from common.dp import is_online
is_online = is_online()
is_gitee_src = "gitee" in subprocess.check_output(["git", "-C", "/data/openpilot", "config", "--get", "remote.origin.url"]).decode('utf8').rstrip()
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():
@@ -94,8 +94,8 @@ class App():
def get_remote_version(self):
apk = self.app + ".apk"
try:
if is_gitee_src:
url = "https://gitee.com/dragonpilot/apps/raw/%s/VERSION" % apk
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()
@@ -128,7 +128,10 @@ class App():
# pass
try:
put_nonblocking('DragonUpdating', '1')
url = "https://raw.githubusercontent.com/dragonpilot-community/apps/%s/%s" % (apk, apk)
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
@@ -82,9 +82,13 @@ default_conf = {
'DragonSteerBoostMaxAt': '15.0',
'DragonDashcamHours': '24.0',
'DragonUIScreenOffDriving': '0',
'DragonEnableAutoUpdate': '1',
'DragonUIBrightness': '0',
'DragonDashcamImpactDetect': '0',
'DragonDashcamImpactDetectStarted': '0',
'DragonEnableUploadOnMobile': '0',
'DragonEnableUploadOnHotspot': '0',
'DragonMaxSpeedLimit': '92',
}
deprecated_conf = {
+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
+1 -1
View File
@@ -117,7 +117,7 @@ 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"], OVERLAY_MERGED).rstrip()
branch_name = run(["git", "rev-parse", "--abbrev-ref", "HEAD"], FINALIZED).rstrip()
if branch_name == "testing":
postfix = ''
elif branch_name == "devel-i18n":