mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-22 06:22:06 +08:00
Merge branch 'devel-en' into devel-zhs
This commit is contained in:
@@ -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],
|
||||
|
||||
@@ -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():
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user