From d21b783199ec4a7571941188e83678c18ea4e49c Mon Sep 17 00:00:00 2001 From: dragonpilot Date: Sun, 13 Oct 2019 10:58:03 +1000 Subject: [PATCH 1/2] remove deprecated dragon params --- common/params.py | 5 --- selfdrive/dragonpilot/dragonconf/__init__.py | 39 +++++++++----------- 2 files changed, 17 insertions(+), 27 deletions(-) diff --git a/common/params.py b/common/params.py index e95525bb3..c83c9090b 100755 --- a/common/params.py +++ b/common/params.py @@ -94,14 +94,10 @@ keys = { "Offroad_ConnectivityNeeded": [TxType.CLEAR_ON_MANAGER_START], #dragonpilot config "DragonEnableDashcam": [TxType.PERSISTENT], - "DragonDisableDriverSafetyCheck": [TxType.PERSISTENT], # deprecated "DragonEnableDriverSafetyCheck": [TxType.PERSISTENT], "DragonAutoShutdownAt": [TxType.PERSISTENT], - "DragonTempDisableSteerOnSignal": [TxType.PERSISTENT], # deprecated "DragonEnableSteeringOnSignal": [TxType.PERSISTENT], - "DragonDisableLogger": [TxType.PERSISTENT], # deprecated "DragonEnableLogger": [TxType.PERSISTENT], - "DragonDisableUploader": [TxType.PERSISTENT], # deprecated "DragonEnableUploader": [TxType.PERSISTENT], "DragonNoctuaMode": [TxType.PERSISTENT], "DragonCacheCar": [TxType.PERSISTENT], @@ -109,7 +105,6 @@ keys = { "DragonCachedFP": [TxType.PERSISTENT], "DragonCachedVIN": [TxType.PERSISTENT], "DragonAllowGas": [TxType.PERSISTENT], - "DragonBBUI": [TxType.PERSISTENT], # deprecated "DragonToyotaStockDSU": [TxType.PERSISTENT], "DragonLatCtrl": [TxType.PERSISTENT], "DragonUISpeed": [TxType.PERSISTENT], diff --git a/selfdrive/dragonpilot/dragonconf/__init__.py b/selfdrive/dragonpilot/dragonconf/__init__.py index 70060ffab..67a81c22f 100644 --- a/selfdrive/dragonpilot/dragonconf/__init__.py +++ b/selfdrive/dragonpilot/dragonconf/__init__.py @@ -3,14 +3,10 @@ from common.params import Params, put_nonblocking default_conf = { 'DragonEnableDashcam': '1', - 'DragonDisableDriverSafetyCheck': '0', # deprecated 'DragonEnableDriverSafetyCheck': '1', 'DragonAutoShutdownAt': '30', # in minute - 'DragonTempDisableSteerOnSignal': '0', # deprecated 'DragonEnableSteeringOnSignal': '0', - 'DragonDisableLogger': '0', # deprecated 'DragonEnableLogger': '1', - 'DragonDisableUploader': '0', # deprecated 'DragonEnableUploader': '1', 'DragonNoctuaMode': '0', 'DragonCacheCar': '0', @@ -18,7 +14,6 @@ default_conf = { 'DragonCachedFP': '', # for cache car 'DragonCachedVIN': '', # for cache car 'DragonAllowGas': '0', - 'DragonBBUI': '0', # deprecated 'DragonToyotaStockDSU': '0', 'DragonLatCtrl': '1', 'DragonUISpeed': '1', @@ -61,26 +56,26 @@ deprecated_conf = { 'DragonBBUI': 'DragonUIDev', } -deprecated_conf_invert = { - 'DragonDisableDriverSafetyCheck': True, - 'DragonTempDisableSteerOnSignal': False, - 'DragonDisableLogger': True, - 'DragonDisableUploader': True, - 'DragonBBUI': False -} +# deprecated_conf_invert = { +# 'DragonDisableDriverSafetyCheck': True, +# 'DragonTempDisableSteerOnSignal': False, +# 'DragonDisableLogger': True, +# 'DragonDisableUploader': True, +# 'DragonBBUI': False +# } 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) + # 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(): From be9e6fa698a25ef35aab822f1787ddb62506006e Mon Sep 17 00:00:00 2001 From: dragonpilot Date: Mon, 14 Oct 2019 11:02:12 +1000 Subject: [PATCH 2/2] Display dp's changelog instead of dp's release notes --- selfdrive/updated.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/selfdrive/updated.py b/selfdrive/updated.py index d05a9a8fa..6cff5ee3a 100755 --- a/selfdrive/updated.py +++ b/selfdrive/updated.py @@ -42,7 +42,8 @@ def main(gctx=None): # Write latest release notes to param try: - r = subprocess.check_output(["git", "--no-pager", "show", "@{u}:RELEASES.md"]) + # r = subprocess.check_output(["git", "--no-pager", "show", "@{u}:RELEASES.md"]) + r = subprocess.check_output(["curl", "-s", "https://raw.githubusercontent.com/dragonpilot-community/dragonpilot/docs/CHANGELOG.md"]) r = r[:r.find(b'\n\n')] # Slice latest release notes params.put("ReleaseNotes", r + b"\n") except: