From 99149ebfb1794574060a72388b4f00a820be9991 Mon Sep 17 00:00:00 2001 From: dragonpilot Date: Thu, 19 Sep 2019 16:39:23 +1000 Subject: [PATCH] Remove greypanda mode GPS signal adjustment --- selfdrive/dragonpilot/appd/appd.py | 22 ++++++++-------------- selfdrive/ui/ui.c | 2 +- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/selfdrive/dragonpilot/appd/appd.py b/selfdrive/dragonpilot/appd/appd.py index c19690903..03cc3bf81 100644 --- a/selfdrive/dragonpilot/appd/appd.py +++ b/selfdrive/dragonpilot/appd/appd.py @@ -29,7 +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 tomtom_is_running = False autonavi_is_running = False mixplorer_is_running = False @@ -40,46 +39,40 @@ def main(gctx=None): frame = 0 start_delay = None stop_delay = None - high_accuracy_mode_enabled = False put_nonblocking('DragonRunTomTom', '0') put_nonblocking('DragonRunAutonavi', '0') put_nonblocking('DragonRunMixplorer', '0') # we want to disable all app when boot - system("pm disable %s ; pm disable %s ; pm disable %s" % (tomtom, autonavi, mixplorer)) + system("pm disable %s" % tomtom) + system("pm disable %s" % autonavi) + system("pm disable %s" % mixplorer) thermal_sock = messaging.sub_sock(service_list['thermal'].port) while dragon_enable_tomtom or dragon_enable_autonavi or dragon_enable_mixplorer: - if (dragon_enable_tomtom or dragon_enable_autonavi) and not high_accuracy_mode_enabled: - if dragon_greypanda_mode: - system("settings put secure location_providers_allowed -gps,network,wifi") - system("settings put secure location_providers_allowed +gps") - else: - system("settings put secure location_providers_allowed +gps,network,wifi") - high_accuracy_mode_enabled = True # allow user to manually start/stop app if dragon_enable_tomtom: status = params.get('DragonRunTomTom') if not status == "0": tomtom_is_running = exec_app(status, tomtom, tomtom_main) - put_nonblocking('DragonRunTomTom', '0') + params.put('DragonRunTomTom', '0') manual_tomtom = status != "0" if dragon_enable_autonavi: status = params.get('DragonRunAutonavi') if not status == "0": autonavi_is_running = exec_app(status, autonavi, autonavi_main) - put_nonblocking('DragonRunAutonavi', '0') + params.put('DragonRunAutonavi', '0') manual_autonavi = status != "0" if dragon_enable_mixplorer: status = params.get('DragonRunMixplorer') if not status == "0": mixplorer_is_running = exec_app(status, mixplorer, mixplorer_main) - put_nonblocking('DragonRunMixplorer', '0') + params.put('DragonRunMixplorer', '0') # if manual control is set, we do not allow any of the auto actions auto_tomtom = not manual_tomtom and dragon_enable_tomtom and dragon_boot_tomtom @@ -142,7 +135,8 @@ def main(gctx=None): def exec_app(status, app, app_main): if status == "1": - system("pm enable %s && am start -n %s/%s" % (app, app, app_main)) + system("pm enable %s" % app) + system("am start -n %s/%s" % (app, app_main)) return True if status == "-1": system("pm disable %s" % app) diff --git a/selfdrive/ui/ui.c b/selfdrive/ui/ui.c index fdb25d07f..7b772bfab 100644 --- a/selfdrive/ui/ui.c +++ b/selfdrive/ui/ui.c @@ -1525,7 +1525,7 @@ static void ui_draw_infobar(UIState *s) { nvgBeginPath(s->vg); nvgRoundedRect(s->vg, rect_x, rect_y, rect_w, rect_h, 15); - nvgFillColor(s->vg, nvgRGBA(0, 0, 0, 100)); + nvgFillColor(s->vg, nvgRGBA(0, 0, 0, 150)); nvgFill(s->vg); nvgFontSize(s->vg, hasSidebar? 40:50);