mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-07-12 08:22:05 +08:00
Merge branch 'devel' of https://github.com/commaai/openpilot into devel
This commit is contained in:
@@ -32,6 +32,7 @@ def start_frame():
|
||||
|
||||
def set_package_permissions():
|
||||
pm_grant("ai.comma.plus.offroad", "android.permission.ACCESS_FINE_LOCATION")
|
||||
pm_grant("ai.comma.plus.offroad", "android.permission.READ_PHONE_STATE")
|
||||
appops_set("ai.comma.plus.offroad", "SU", "allow")
|
||||
appops_set("ai.comma.plus.offroad", "WIFI_SCAN", "allow")
|
||||
appops_set("ai.comma.plus.offroad", "READ_EXTERNAL_STORAGE", "allow")
|
||||
|
||||
@@ -67,11 +67,13 @@ def clear_locks(root):
|
||||
def is_on_wifi():
|
||||
# ConnectivityManager.getActiveNetworkInfo()
|
||||
try:
|
||||
result = android.parse_service_call_string(["connectivity", "2"])
|
||||
# TODO: figure out why the android service call sometimes dies with SIGUSR2 (signal from MSGQ)
|
||||
result = android.parse_service_call_string(android.service_call(["connectivity", "2"]))
|
||||
if result is None:
|
||||
return True
|
||||
return 'WIFI' in result
|
||||
except AttributeError:
|
||||
except (AttributeError, subprocess.CalledProcessError):
|
||||
cloudlog.exception("is_on_wifi failed")
|
||||
return False
|
||||
|
||||
def is_on_hotspot():
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ def update_panda():
|
||||
serial = None
|
||||
|
||||
panda_version = "bootstub" if panda.bootstub else panda.get_version()
|
||||
panda_signature = "bootstub" if panda.bootstub else panda.get_signature()
|
||||
panda_signature = b"" if panda.bootstub else panda.get_signature()
|
||||
cloudlog.warning("Panda %s connected, version: %s, signature %s, expected %s" % (
|
||||
serial,
|
||||
panda_version,
|
||||
|
||||
Reference in New Issue
Block a user