From d1bfc252f36fcc44bd3bc44b19e1c53a72e8090c Mon Sep 17 00:00:00 2001 From: dragonpilot Date: Mon, 16 Mar 2020 13:51:49 +1000 Subject: [PATCH] * ability to disable registration (for some phones that does not have proper IMEI) --- common/params.py | 1 + selfdrive/dragonpilot/dragonconf/__init__.py | 1 + selfdrive/manager.py | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/common/params.py b/common/params.py index 0f299010a..2e02beba8 100755 --- a/common/params.py +++ b/common/params.py @@ -172,6 +172,7 @@ keys = { "DragonBootHotspot": [TxType.PERSISTENT], "DragonAccelProfile": [TxType.PERSISTENT], "DragonLastModified": [TxType.PERSISTENT], + "DragonEnableRegistration": [TxType.PERSISTENT], } diff --git a/selfdrive/dragonpilot/dragonconf/__init__.py b/selfdrive/dragonpilot/dragonconf/__init__.py index c440cfb55..d8565d91b 100644 --- a/selfdrive/dragonpilot/dragonconf/__init__.py +++ b/selfdrive/dragonpilot/dragonconf/__init__.py @@ -70,6 +70,7 @@ default_conf = { 'DragonBootHotspot': 0, 'DragonAccelProfile': '0', 'DragonLastModified': str(floor(time.time())), + 'DragonEnableRegistration': '1', } deprecated_conf = { diff --git a/selfdrive/manager.py b/selfdrive/manager.py index 041478acc..7c4fbc0b5 100755 --- a/selfdrive/manager.py +++ b/selfdrive/manager.py @@ -544,9 +544,11 @@ 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()