重新命名變數,apk 不支援 underscore

This commit is contained in:
Rick Lan
2019-07-02 12:57:22 +10:00
parent 54da0f0fb9
commit c9bf25b937
7 changed files with 13 additions and 13 deletions
+4 -4
View File
@@ -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],
}
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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 ***
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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)
+4 -4
View File
@@ -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):
+1 -1
View File
@@ -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: