移除指紋暫存

This commit is contained in:
Dragonpilot
2019-07-31 11:25:15 +10:00
parent 1727b59882
commit 11229fc9c0
3 changed files with 19 additions and 14 deletions
Binary file not shown.
+4 -4
View File
@@ -94,10 +94,10 @@ keys = {
"DragonDisableUploader": [TxType.PERSISTENT], # deprecated
"DragonEnableUploader": [TxType.PERSISTENT],
"DragonNoctuaMode": [TxType.PERSISTENT],
"DragonCacheCar": [TxType.PERSISTENT],
"DragonCachedModel": [TxType.PERSISTENT],
"DragonCachedFP": [TxType.PERSISTENT],
"DragonCachedVIN": [TxType.PERSISTENT],
"DragonCacheCar": [TxType.PERSISTENT], # deprecated
"DragonCachedModel": [TxType.PERSISTENT], # deprecated
"DragonCachedFP": [TxType.PERSISTENT], # deprecated
"DragonCachedVIN": [TxType.PERSISTENT], # deprecated
"DragonAllowGas": [TxType.PERSISTENT],
"DragonBBUI": [TxType.PERSISTENT],
"DragonToyotaStockDSU": [TxType.PERSISTENT],
+15 -10
View File
@@ -18,10 +18,10 @@ default_conf = {
'DragonDisableUploader': '0', # deprecated
'DragonEnableUploader': '1',
'DragonNoctuaMode': '0',
'DragonCacheCar': '1',
'DragonCachedModel': '', # for cache car
'DragonCachedFP': '', # for cache car
'DragonCachedVIN': '', # for cache car
'DragonCacheCar': '1', # deprecated
'DragonCachedModel': '', # for cache car # deprecated
'DragonCachedFP': '', # for cache car # deprecated
'DragonCachedVIN': '', # for cache car # deprecated
'DragonAllowGas': '0',
'DragonBBUI': '0',
'DragonToyotaStockDSU': '0',
@@ -32,6 +32,10 @@ deprecated_conf = {
'DragonTempDisableSteerOnSignal': 'DragonEnableSteeringOnSignal',
'DragonDisableLogger': 'DragonEnableLogger',
'DragonDisableUploader': 'DragonEnableUploader',
'DragonCacheCar': None,
'DragonCachedModel': None,
'DragonCachedFP': None,
'DragonCachedVIN': None,
}
deprecated_conf_invert = {
@@ -45,12 +49,13 @@ def dragonpilot_set_params(params):
# remove deprecated params
for old, new in deprecated_conf.items():
if params.get(old) 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"
params.put(new, new_val)
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"
params.put(new, new_val)
params.delete(old)
# set params