Revert "create a new service to handle greygps mode"

This reverts commit 428bdb0517.
This commit is contained in:
dragonpilot
2019-09-20 15:20:47 +10:00
parent 428bdb0517
commit 437de933a4
2 changed files with 2 additions and 17 deletions
+1 -16
View File
@@ -22,9 +22,6 @@ autonavi_main = "com.autonavi.amapauto.MainMapActivity"
mixplorer = "com.mixplorer"
mixplorer_main = "com.mixplorer.activities.BrowseActivity"
gpsservice = "cn.dragonpilot.gpsservice"
gpsservice_main = "cn.dragonpilot.gpsservice.MainService"
def main(gctx=None):
dragon_enable_tomtom = True if params.get('DragonEnableTomTom') == "1" else False
@@ -32,8 +29,6 @@ def main(gctx=None):
dragon_enable_mixplorer = True if params.get('DragonEnableMixplorer') == "1" else False
dragon_boot_tomtom = True if params.get("DragonBootTomTom") == "1" else False
dragon_boot_autonavi = True if params.get("DragonBootAutonavi") == "1" else False
dragon_greypanda_mode = True if params.get("DragonGreyPandaMode") == "1" else False
dragon_grepanda_mode_started = False
tomtom_is_running = False
autonavi_is_running = False
mixplorer_is_running = False
@@ -53,11 +48,10 @@ def main(gctx=None):
system("pm disable %s" % tomtom)
system("pm disable %s" % autonavi)
system("pm disable %s" % mixplorer)
system("pm disable %s" % gpsservice)
thermal_sock = messaging.sub_sock(service_list['thermal'].port)
while dragon_enable_tomtom or dragon_enable_autonavi or dragon_enable_mixplorer or dragon_greypanda_mode:
while dragon_enable_tomtom or dragon_enable_autonavi or dragon_enable_mixplorer:
# allow user to manually start/stop app
if dragon_enable_tomtom:
@@ -88,11 +82,6 @@ def main(gctx=None):
started = msg.thermal.started
# car on
if started:
if dragon_greypanda_mode and not dragon_grepanda_mode_started:
dragon_grepanda_mode_started = True
system("pm enable %s" % gpsservice)
system("am startservice %s/%s" % (gpsservice, gpsservice_main))
stop_delay = None
if start_delay is None:
start_delay = frame + 5
@@ -126,10 +115,6 @@ def main(gctx=None):
# car off
else:
if dragon_greypanda_mode and dragon_grepanda_mode_started:
dragon_grepanda_mode_started = False
system("pm disable %s" % gpsservice)
start_delay = None
if stop_delay is None:
stop_delay = frame + 30
+1 -1
View File
@@ -126,7 +126,7 @@ managed_processes = {
daemon_processes = {
"athenad": "selfdrive.athena.athenad",
}
android_packages = ("cn.dragonpilot.gpsservice", "com.autonavi.amapauto", "com.mixplorer", "com.tomtom.speedcams.android.map", "ai.comma.plus.offroad", "ai.comma.plus.frame")
android_packages = ("com.autonavi.amapauto", "com.mixplorer", "com.tomtom.speedcams.android.map", "ai.comma.plus.offroad", "ai.comma.plus.frame")
running = {}
def get_running():