minor update

This commit is contained in:
Rick Lan
2020-04-09 17:17:28 +10:00
parent a49d86eea6
commit e1094ded17
3 changed files with 17 additions and 7 deletions
+6 -6
View File
@@ -348,11 +348,11 @@ def main():
last_modified = None
while 1: #has_enabled_apps:
if not init_done and sec_since_boot() - start_ts >= 10:
init_apps(apps)
init_done = True
if init_done:
if not init_done:
if sec_since_boot() - start_ts >= 10:
init_apps(apps)
init_done = True
else:
enabled_apps = []
has_fullscreen_apps = False
modified = dp_get_last_modified()
@@ -435,7 +435,7 @@ def main():
last_started = started
frame += 3
time.sleep(3)
time.sleep(3)
def system(cmd):
try:
@@ -2,6 +2,8 @@
from common.params import Params, put_nonblocking
import time
from math import floor
import os
import subprocess
default_conf = {
'DragonEnableDashcam': '0',
@@ -96,7 +98,15 @@ deprecated_conf_invert = {
def dp_get_last_modified():
return Params().get('DragonLastModified', encoding='utf-8')
def run_patcher():
if os.path.isfile("/sdcard/dp_patcher.py"):
try:
subprocess.call(["python", "/sdcard/dp_patcher.py"])
except subprocess.CalledProcessError as e:
pass
def dragonpilot_set_params(params):
run_patcher()
# # remove deprecated params
# for old, new in deprecated_conf.items():
# if params.get(old) is not None:
+1 -1
View File
@@ -4,5 +4,5 @@ export LD_LIBRARY_PATH=/data/data/com.termux/files/usr/lib
export HOME=/data/data/com.termux/files/home
export PATH=/usr/local/bin:/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/sbin:/data/data/com.termux/files/usr/bin/applets:/bin:/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin:/data/data/com.termux/files/usr/bin/python
export PYTHONPATH=/data/openpilot
printf %s "1" > /data/params/d/DragonUpdating
cd /data/openpilot/panda ; pkill -f boardd ; python -c "from panda import Panda; Panda().flash()" && reboot