mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-25 16:02:14 +08:00
重新命名變數,apk 不支援 underscore
This commit is contained in:
+4
-4
@@ -78,10 +78,10 @@ keys = {
|
||||
"TrainingVersion": [TxType.PERSISTENT],
|
||||
"Version": [TxType.PERSISTENT],
|
||||
#dragonpilot config
|
||||
"d_enableDashcam": [TxType.PERSISTENT],
|
||||
"d_enableDriverMonitor": [TxType.PERSISTENT],
|
||||
"d_autoShutdownAt": [TxType.PERSISTENT],
|
||||
"d_tempDisableSteerOnSignal": [TxType.PERSISTENT],
|
||||
"DragonEnableDashcam": [TxType.PERSISTENT],
|
||||
"DragonEnableDriverMonitor": [TxType.PERSISTENT],
|
||||
"DragonAutoShutdownAt": [TxType.PERSISTENT],
|
||||
"DragonTempDisableSteerOnSignal": [TxType.PERSISTENT],
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ class CarController(object):
|
||||
# Send CAN commands.
|
||||
can_sends = []
|
||||
|
||||
if (CS.left_blinker_on > 0 or CS.right_blinker_on > 0) and params.get("d_tempDisableSteerOnSignal") == "1":
|
||||
if (CS.left_blinker_on > 0 or CS.right_blinker_on > 0) and params.get("DragonTempDisableSteerOnSignal") == "1":
|
||||
apply_steer = 0
|
||||
# Send steering command.
|
||||
idx = frame % 4
|
||||
|
||||
@@ -200,7 +200,7 @@ class CarController(object):
|
||||
|
||||
can_sends = []
|
||||
|
||||
if (CS.left_blinker_on or CS.right_blinker_on) and params.get("d_tempDisableSteerOnSignal") == "1":
|
||||
if (CS.left_blinker_on or CS.right_blinker_on) and params.get("DragonTempDisableSteerOnSignal") == "1":
|
||||
apply_steer = 0
|
||||
apply_steer_req = 0
|
||||
#*** control msgs ***
|
||||
|
||||
@@ -145,7 +145,7 @@ class DriverStatus():
|
||||
not (standstill and self.awareness - self.step_change <= self.threshold_prompt):
|
||||
self.awareness = max(self.awareness - self.step_change, -0.1)
|
||||
|
||||
if params.get("d_enableDriverMonitor") == "1":
|
||||
if params.get("DragonEnableDriverMonitor") == "1":
|
||||
alert = None
|
||||
if self.awareness <= 0.:
|
||||
# terminal red alert: disengagement required
|
||||
|
||||
@@ -31,7 +31,7 @@ def main(gctx=None):
|
||||
thermal_sock = messaging.sub_sock(context, service_list['thermal'].port)
|
||||
|
||||
while 1:
|
||||
if params.get("d_enableDashcam") == "1":
|
||||
if params.get("DragonEnableDashcam") == "1":
|
||||
# get health of board, log this in "thermal"
|
||||
msg = messaging.recv_sock(thermal_sock, wait=True)
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ file = '/data/dragonpilot.json'
|
||||
|
||||
|
||||
default_conf = {
|
||||
'd_enableDashcam': '1',
|
||||
'd_enableDriverMonitor': '1',
|
||||
'd_autoShutdownAt': '1800', # shutdown after 30 mins
|
||||
'd_tempDisableSteerOnSignal': '0',
|
||||
'DragonEnableDashcam': '1',
|
||||
'DragonEnableDriverMonitor': '1',
|
||||
'DragonAutoShutdownAt': '1800', # shutdown after 30 mins
|
||||
'DragonTempDisableSteerOnSignal': '0',
|
||||
}
|
||||
|
||||
def write_json_config(config):
|
||||
|
||||
@@ -28,7 +28,7 @@ def main(gctx=None):
|
||||
time.sleep(1)
|
||||
|
||||
def get_shutdown_val():
|
||||
val = params.get("d_autoShutdownAt")
|
||||
val = params.get("DragonAutoShutdownAt")
|
||||
if val is None:
|
||||
return None
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user