From 39fc865f6066eb7795c30180dfd992bc5c18f0b0 Mon Sep 17 00:00:00 2001 From: dk Date: Tue, 30 Jul 2019 00:31:46 -0400 Subject: [PATCH 01/13] show process progress --- selfdrive/manager.py | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/selfdrive/manager.py b/selfdrive/manager.py index 4e52f2beb4bd4c..095a42d58b3082 100755 --- a/selfdrive/manager.py +++ b/selfdrive/manager.py @@ -494,15 +494,27 @@ def manager_update(): update_ssh() update_apks() -def manager_prepare(): +def manager_prepare(spinner_text): # build cereal first subprocess.check_call(["make", "-j4"], cwd=os.path.join(BASEDIR, "cereal")) # build all processes os.chdir(os.path.dirname(os.path.abspath(__file__))) - for p in managed_processes: + + process_cnt = len(managed_processes) + loader_proc = [] + + for n,p in enumerate(managed_processes): + if os.getenv("PREPAREONLY") is None: + loader_proc.append(subprocess.Popen(["./spinner", + "loading {0}: {1}/{2} {3}".format(spinner_text, n+1, process_cnt, p)], + cwd=os.path.join(BASEDIR, "selfdrive", "ui", "spinner"), + close_fds=True)) prepare_managed_process(p) + # end subprocesses here to stop screen flickering + loader_proc = [loader_proc[pc].terminate() for pc in range(process_cnt) if loader_proc] + def uninstall(): cloudlog.warning("uninstalling") with open('/cache/recovery/command', 'w') as f: @@ -576,16 +588,17 @@ def main(): # put something on screen while we set things up if os.getenv("PREPAREONLY") is not None: + spinner_text = None spinner_proc = None else: spinner_text = "chffrplus" if params.get("Passive")=="1" else "openpilot" - spinner_proc = subprocess.Popen(["./spinner", "loading %s"%spinner_text], + spinner_proc = subprocess.Popen(["./spinner", "initializing {0}".format(spinner_text)], cwd=os.path.join(BASEDIR, "selfdrive", "ui", "spinner"), close_fds=True) try: manager_update() manager_init() - manager_prepare() + manager_prepare(spinner_text) finally: if spinner_proc: spinner_proc.terminate() From ff79075dd3600dd768c6cfa2086c2bde2789a820 Mon Sep 17 00:00:00 2001 From: dk Date: Tue, 30 Jul 2019 17:59:31 -0400 Subject: [PATCH 02/13] manager_prepare independence --- selfdrive/manager.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/selfdrive/manager.py b/selfdrive/manager.py index 095a42d58b3082..3207739b58a2ae 100755 --- a/selfdrive/manager.py +++ b/selfdrive/manager.py @@ -494,7 +494,7 @@ def manager_update(): update_ssh() update_apks() -def manager_prepare(spinner_text): +def manager_prepare(): # build cereal first subprocess.check_call(["make", "-j4"], cwd=os.path.join(BASEDIR, "cereal")) @@ -503,7 +503,8 @@ def manager_prepare(spinner_text): process_cnt = len(managed_processes) loader_proc = [] - + params = Params() + spinner_text = "chffrplus" if params.get("Passive")=="1" else "openpilot" for n,p in enumerate(managed_processes): if os.getenv("PREPAREONLY") is None: loader_proc.append(subprocess.Popen(["./spinner", @@ -513,7 +514,7 @@ def manager_prepare(spinner_text): prepare_managed_process(p) # end subprocesses here to stop screen flickering - loader_proc = [loader_proc[pc].terminate() for pc in range(process_cnt) if loader_proc] + [loader_proc[pc].terminate() for pc in range(process_cnt) if loader_proc] def uninstall(): cloudlog.warning("uninstalling") @@ -588,7 +589,6 @@ def main(): # put something on screen while we set things up if os.getenv("PREPAREONLY") is not None: - spinner_text = None spinner_proc = None else: spinner_text = "chffrplus" if params.get("Passive")=="1" else "openpilot" @@ -598,7 +598,7 @@ def main(): try: manager_update() manager_init() - manager_prepare(spinner_text) + manager_prepare() finally: if spinner_proc: spinner_proc.terminate() From eb3774fa0f4ccb088ceb46dacf66e5b2d1e2229d Mon Sep 17 00:00:00 2001 From: dekerr Date: Sat, 17 Aug 2019 02:36:34 -0400 Subject: [PATCH 03/13] working commit --- selfdrive/manager.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/selfdrive/manager.py b/selfdrive/manager.py index e956a11a3fdbd6..cac19354fc8828 100755 --- a/selfdrive/manager.py +++ b/selfdrive/manager.py @@ -504,19 +504,22 @@ def manager_prepare(): # build all processes os.chdir(os.path.dirname(os.path.abspath(__file__))) - + + params = Params() process_cnt = len(managed_processes) loader_proc = [] - params = Params() spinner_text = "chffrplus" if params.get("Passive")=="1" else "openpilot" + for n,p in enumerate(managed_processes): if os.getenv("PREPAREONLY") is None: - loader_proc.append(subprocess.Popen(["./spinner", + loader_proc.append(subprocess.Popen(["./spinner", "loading {0}: {1}/{2} {3}".format(spinner_text, n+1, process_cnt, p)], cwd=os.path.join(BASEDIR, "selfdrive", "ui", "spinner"), close_fds=True)) + #loader_proc.stdin.write(loadtext + "\n") prepare_managed_process(p) - + + #loader_proc.stdin.close() # end subprocesses here to stop screen flickering [loader_proc[pc].terminate() for pc in range(process_cnt) if loader_proc] From c067a27914b0853fb85d81d0a185ccf95a541478 Mon Sep 17 00:00:00 2001 From: dk Date: Sat, 17 Aug 2019 05:11:32 -0400 Subject: [PATCH 04/13] a solution perhaps --- selfdrive/manager.py | 20 +++++++++++--------- selfdrive/ui/spinner/spinner.c | 17 +++++++++++------ 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/selfdrive/manager.py b/selfdrive/manager.py index cd18f96cc4c439..12300f40721b4e 100755 --- a/selfdrive/manager.py +++ b/selfdrive/manager.py @@ -507,21 +507,21 @@ def manager_prepare(): params = Params() process_cnt = len(managed_processes) - loader_proc = [] + loader_proc = subprocess.Popen(["./spinner"], + cwd=os.path.join(BASEDIR, "selfdrive", "ui", "spinner"), + close_fds=True) spinner_text = "chffrplus" if params.get("Passive")=="1" else "openpilot" for n,p in enumerate(managed_processes): if os.getenv("PREPAREONLY") is None: - loader_proc.append(subprocess.Popen(["./spinner", - "loading {0}: {1}/{2} {3}".format(spinner_text, n+1, process_cnt, p)], - cwd=os.path.join(BASEDIR, "selfdrive", "ui", "spinner"), - close_fds=True)) - #loader_proc.stdin.write(loadtext + "\n") + loader_text = "loading {0}: {1}/{2} {3}".format(spinner_text, n+1, process_cnt, p) + loader_proc.stdin.write(loader_text + "\n") prepare_managed_process(p) - #loader_proc.stdin.close() + loader_proc.stdin.close() + loader_proc.terminate() # end subprocesses here to stop screen flickering - [loader_proc[pc].terminate() for pc in range(process_cnt) if loader_proc] + #[loader_proc[pc].terminate() for pc in range(process_cnt) if loader_proc] def uninstall(): cloudlog.warning("uninstalling") @@ -604,9 +604,11 @@ def main(): spinner_proc = None else: spinner_text = "chffrplus" if params.get("Passive")=="1" else "openpilot" - spinner_proc = subprocess.Popen(["./spinner", "initializing {0}".format(spinner_text)], + init_text = "initializing {0}".format(spinner_text) + spinner_proc = subprocess.Popen(["./spinner"], cwd=os.path.join(BASEDIR, "selfdrive", "ui", "spinner"), close_fds=True) + spinner_proc.write(init_text + "\n") try: manager_update() manager_init() diff --git a/selfdrive/ui/spinner/spinner.c b/selfdrive/ui/spinner/spinner.c index 3ec36e7403f3de..84f0b46080e43e 100644 --- a/selfdrive/ui/spinner/spinner.c +++ b/selfdrive/ui/spinner/spinner.c @@ -16,13 +16,14 @@ #include "common/framebuffer.h" -int main(int argc, char** argv) { +int main() { int err; - - const char* spintext = NULL; - if (argc >= 2) { - spintext = argv[1]; - } + fd_set readfds; + FD_ZERO(&readfds); + struct timeval timeout; + timeout.tv_sec = 0; + timeout.tv_usec = 0; + char spintext[50]; // spinner int fb_w, fb_h; @@ -49,6 +50,10 @@ int main(int argc, char** argv) { assert(spinner_comma_img >= 0); for (int cnt = 0; ; cnt++) { + FD_SET(STDIN_FILENO, &readfds); + if (select(1, &readfds, NULL, NULL, &timeout)) { + scanf("%s", spintext); + } glClearColor(0.1, 0.1, 0.1, 1.0); glClear(GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT); glEnable(GL_BLEND); From f808aa77e796bf4df2c4aae62110605bde0bd025 Mon Sep 17 00:00:00 2001 From: dekerr Date: Sat, 17 Aug 2019 05:19:26 -0400 Subject: [PATCH 05/13] add makefile --- selfdrive/ui/spinner/Makefile | 58 +++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 selfdrive/ui/spinner/Makefile diff --git a/selfdrive/ui/spinner/Makefile b/selfdrive/ui/spinner/Makefile new file mode 100644 index 00000000000000..4fba0cf7664469 --- /dev/null +++ b/selfdrive/ui/spinner/Makefile @@ -0,0 +1,58 @@ +CC = clang +CXX = clang++ + +PHONELIBS = ../../../phonelibs + +WARN_FLAGS = -Werror=implicit-function-declaration \ + -Werror=incompatible-pointer-types \ + -Werror=int-conversion \ + -Werror=return-type \ + -Werror=format-extra-args + +CFLAGS = -std=gnu11 -fPIC -O2 $(WARN_FLAGS) +CXXFLAGS = -std=c++11 -fPIC -O2 $(WARN_FLAGS) + +NANOVG_FLAGS = -I$(PHONELIBS)/nanovg + +OPENGL_LIBS = -lGLESv3 + +FRAMEBUFFER_LIBS = -lutils -lgui -lEGL + +OBJS = spinner.o \ + ../../common/framebuffer.o \ + $(PHONELIBS)/nanovg/nanovg.o + +DEPS := $(OBJS:.o=.d) + +.PHONY: all +all: spinner + +spinner: $(OBJS) + @echo "[ LINK ] $@" + $(CXX) -fPIC -o '$@' $^ \ + -s \ + $(FRAMEBUFFER_LIBS) \ + -L/system/vendor/lib64 \ + $(OPENGL_LIBS) \ + -lm -llog + +../../common/framebuffer.o: ../../common/framebuffer.cc + @echo "[ CXX ] $@" + $(CXX) $(CXXFLAGS) -MMD \ + -I$(PHONELIBS)/android_frameworks_native/include \ + -I$(PHONELIBS)/android_system_core/include \ + -I$(PHONELIBS)/android_hardware_libhardware/include \ + -c -o '$@' '$<' + +%.o: %.c + @echo "[ CC ] $@" + $(CC) $(CFLAGS) -MMD \ + -I../.. \ + $(NANOVG_FLAGS) \ + -c -o '$@' '$<' + +.PHONY: clean +clean: + rm -f spinner $(OBJS) $(DEPS) + +-include $(DEPS) \ No newline at end of file From 765c5d28c341ce0d9fa6d63a6882202f908d6444 Mon Sep 17 00:00:00 2001 From: dk Date: Sat, 17 Aug 2019 05:26:21 -0400 Subject: [PATCH 06/13] add stdin --- selfdrive/manager.py | 4 ++-- selfdrive/ui/spinner/spinner.c | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/selfdrive/manager.py b/selfdrive/manager.py index 12300f40721b4e..9f3d98daa48db0 100755 --- a/selfdrive/manager.py +++ b/selfdrive/manager.py @@ -507,7 +507,7 @@ def manager_prepare(): params = Params() process_cnt = len(managed_processes) - loader_proc = subprocess.Popen(["./spinner"], + loader_proc = subprocess.Popen(["./spinner"], stdin = subprocess.PIPE, cwd=os.path.join(BASEDIR, "selfdrive", "ui", "spinner"), close_fds=True) spinner_text = "chffrplus" if params.get("Passive")=="1" else "openpilot" @@ -605,7 +605,7 @@ def main(): else: spinner_text = "chffrplus" if params.get("Passive")=="1" else "openpilot" init_text = "initializing {0}".format(spinner_text) - spinner_proc = subprocess.Popen(["./spinner"], + spinner_proc = subprocess.Popen(["./spinner"], stdin = subprocess.PIPE, cwd=os.path.join(BASEDIR, "selfdrive", "ui", "spinner"), close_fds=True) spinner_proc.write(init_text + "\n") diff --git a/selfdrive/ui/spinner/spinner.c b/selfdrive/ui/spinner/spinner.c index 84f0b46080e43e..02065740e7d8f7 100644 --- a/selfdrive/ui/spinner/spinner.c +++ b/selfdrive/ui/spinner/spinner.c @@ -90,11 +90,9 @@ int main() { nvgFill(vg); // message - if (spintext) { - nvgTextAlign(vg, NVG_ALIGN_CENTER | NVG_ALIGN_TOP); - nvgFontSize(vg, 96.0f); - nvgText(vg, fb_w/2, (fb_h*2/3)+24, spintext, NULL); - } + nvgTextAlign(vg, NVG_ALIGN_CENTER | NVG_ALIGN_TOP); + nvgFontSize(vg, 96.0f); + nvgText(vg, fb_w/2, (fb_h*2/3)+24, spintext, NULL); nvgEndFrame(vg); eglSwapBuffers(display, surface); From 95ddf5a2b52677fcc1a2758a4e37f87da7e9935f Mon Sep 17 00:00:00 2001 From: dk Date: Sat, 17 Aug 2019 05:43:29 -0400 Subject: [PATCH 07/13] fix format bugs --- selfdrive/manager.py | 2 +- selfdrive/ui/spinner/spinner.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/selfdrive/manager.py b/selfdrive/manager.py index 9f3d98daa48db0..5562dc98b50f5f 100755 --- a/selfdrive/manager.py +++ b/selfdrive/manager.py @@ -608,7 +608,7 @@ def main(): spinner_proc = subprocess.Popen(["./spinner"], stdin = subprocess.PIPE, cwd=os.path.join(BASEDIR, "selfdrive", "ui", "spinner"), close_fds=True) - spinner_proc.write(init_text + "\n") + spinner_proc.stdin.write(init_text + "\n") try: manager_update() manager_init() diff --git a/selfdrive/ui/spinner/spinner.c b/selfdrive/ui/spinner/spinner.c index 02065740e7d8f7..7914336e73fdc7 100644 --- a/selfdrive/ui/spinner/spinner.c +++ b/selfdrive/ui/spinner/spinner.c @@ -52,7 +52,7 @@ int main() { for (int cnt = 0; ; cnt++) { FD_SET(STDIN_FILENO, &readfds); if (select(1, &readfds, NULL, NULL, &timeout)) { - scanf("%s", spintext); + scanf("%[^\n]", spintext); } glClearColor(0.1, 0.1, 0.1, 1.0); glClear(GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT); From 7b2aea64829397445a5d526af4cfe30e1201a918 Mon Sep 17 00:00:00 2001 From: dk Date: Sat, 17 Aug 2019 05:56:25 -0400 Subject: [PATCH 08/13] use fgets --- selfdrive/ui/spinner/spinner.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/ui/spinner/spinner.c b/selfdrive/ui/spinner/spinner.c index 7914336e73fdc7..379d40f1ee9d3d 100644 --- a/selfdrive/ui/spinner/spinner.c +++ b/selfdrive/ui/spinner/spinner.c @@ -52,7 +52,7 @@ int main() { for (int cnt = 0; ; cnt++) { FD_SET(STDIN_FILENO, &readfds); if (select(1, &readfds, NULL, NULL, &timeout)) { - scanf("%[^\n]", spintext); + fgets(spintext, sizeof spintext, stdin); } glClearColor(0.1, 0.1, 0.1, 1.0); glClear(GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT); From 72c0ffeee86c456e1b56038698971e1c47bdfca6 Mon Sep 17 00:00:00 2001 From: dk Date: Sat, 17 Aug 2019 06:02:53 -0400 Subject: [PATCH 09/13] endline fix --- selfdrive/ui/spinner/spinner.c | 1 + 1 file changed, 1 insertion(+) diff --git a/selfdrive/ui/spinner/spinner.c b/selfdrive/ui/spinner/spinner.c index 379d40f1ee9d3d..95780d2623f258 100644 --- a/selfdrive/ui/spinner/spinner.c +++ b/selfdrive/ui/spinner/spinner.c @@ -53,6 +53,7 @@ int main() { FD_SET(STDIN_FILENO, &readfds); if (select(1, &readfds, NULL, NULL, &timeout)) { fgets(spintext, sizeof spintext, stdin); + spintext[strcspn(spintext, "\n")] = 0; } glClearColor(0.1, 0.1, 0.1, 1.0); glClear(GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT); From d10450a97a90a84bd23e3a01b48fdecd59131eb9 Mon Sep 17 00:00:00 2001 From: dk Date: Sat, 17 Aug 2019 10:17:03 +0000 Subject: [PATCH 10/13] add compiled spinner --- selfdrive/ui/spinner/Makefile | 58 ---------------------------------- selfdrive/ui/spinner/spinner | Bin 239976 -> 239976 bytes 2 files changed, 58 deletions(-) delete mode 100644 selfdrive/ui/spinner/Makefile diff --git a/selfdrive/ui/spinner/Makefile b/selfdrive/ui/spinner/Makefile deleted file mode 100644 index 4fba0cf7664469..00000000000000 --- a/selfdrive/ui/spinner/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -CC = clang -CXX = clang++ - -PHONELIBS = ../../../phonelibs - -WARN_FLAGS = -Werror=implicit-function-declaration \ - -Werror=incompatible-pointer-types \ - -Werror=int-conversion \ - -Werror=return-type \ - -Werror=format-extra-args - -CFLAGS = -std=gnu11 -fPIC -O2 $(WARN_FLAGS) -CXXFLAGS = -std=c++11 -fPIC -O2 $(WARN_FLAGS) - -NANOVG_FLAGS = -I$(PHONELIBS)/nanovg - -OPENGL_LIBS = -lGLESv3 - -FRAMEBUFFER_LIBS = -lutils -lgui -lEGL - -OBJS = spinner.o \ - ../../common/framebuffer.o \ - $(PHONELIBS)/nanovg/nanovg.o - -DEPS := $(OBJS:.o=.d) - -.PHONY: all -all: spinner - -spinner: $(OBJS) - @echo "[ LINK ] $@" - $(CXX) -fPIC -o '$@' $^ \ - -s \ - $(FRAMEBUFFER_LIBS) \ - -L/system/vendor/lib64 \ - $(OPENGL_LIBS) \ - -lm -llog - -../../common/framebuffer.o: ../../common/framebuffer.cc - @echo "[ CXX ] $@" - $(CXX) $(CXXFLAGS) -MMD \ - -I$(PHONELIBS)/android_frameworks_native/include \ - -I$(PHONELIBS)/android_system_core/include \ - -I$(PHONELIBS)/android_hardware_libhardware/include \ - -c -o '$@' '$<' - -%.o: %.c - @echo "[ CC ] $@" - $(CC) $(CFLAGS) -MMD \ - -I../.. \ - $(NANOVG_FLAGS) \ - -c -o '$@' '$<' - -.PHONY: clean -clean: - rm -f spinner $(OBJS) $(DEPS) - --include $(DEPS) \ No newline at end of file diff --git a/selfdrive/ui/spinner/spinner b/selfdrive/ui/spinner/spinner index 65c198aabda3d2438e13433e8be857d75c50ae14..50f2bce6e7bab7828411989d1a8e119ff00ed146 100755 GIT binary patch delta 21541 zcmc&+d0bW1_CI?chRZy2K}0}MCXq=574$OYJaCH1f~Pqu5HJVO`5hMd`GbGuiybX`0WKD9O-I#qp*t=5 zp*4Ty2CjfdiE-23u6i_QZs*OHlG4=XxKEjmh$rtg;4TJjUNt9&uI6R2E`KMtO! zhB=E+!=qLHH}JQV>e5nBalXY&A9wd>d%4 z8h=9N{lS-jB+ynBI|x1o^o$x`06q*92hxK^fvis~0y{uOph2KWUjB;+Oav_gMT7WL zY+-`8%DI`ZfSyz1$>2|dazF{7fuJFvaiIC2m7o_u{EKwCf?KpN0yP(KiVp0cp}f1gDt5wr&McaYaA{22?H z1me#=*0xB@w&y*{T|Pr1{Q?nk;1c!O1Rfxl*ayk^_I6J8D(VbfAF_-84Gaestm0M{ zkASOLXAk~rOH))qckn7T%vm}pln2x&3_Qvj0q+aaf!sikfYyVoPo^3e3ZANlv%o_@ zerjB0RG7()DV>V=qc)-`2v>t@KtZ5|pqD|`XM`G93jPu(8&m-r0OHSh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M@!HdB0I$0VEz8L%zcs=;BeJ}w0!U2nAFecq?2Q8Lu;4d~@|x;gLj8>Rf|RZPR>H`Y2cTRzz|J^Bz@gzvAn3kf46=e z3LdEG8?Y4oCb%!!>+Lro2fqe>1U#w9VtF6D2)q?s^OnUDj{iXSCirCV@S_&XO7NB7 zyTQK(e;fS$V-`y%__St=CDj}MAM`j3sX*Y!2^0W+3j7H8g@2+(;HFdX3|@w{Vy`k6 zJm5We0{n>C-(M?-2fmMZ0I}&tgRKR<&%4&jG2{Z*tpf|@L)OU|f$iv9aJ==2#@}Eh zy1+NtG!Cwl{d2wlj;w47)>0pUhQJ)DgeBJBy0`<|2)&z}te5@CB_6n5j?rIpDodm~ z3k}h?9XSmEb`994yktG*0$;v!y*vUF=H>PBP_m7uZNQSyd4NB;0W5f^=xg4!S!QsQQYHKAlm20`7_52OoIe;=PX-ol$As~dffe%) zs$l#D?xBE9R{`g{toQK8_c}|X^tuZ|NIr;GlL%L1tf5h?gC;w9eFbV%p4M6$- zQv*c#|4Rd`<^K;2u$BM6Gr;jvV*kH8q2p)xdfG-m{@Q;L#_@|Wj$eowS*rfBOMY6$ z%Cl~doZ{h_w5oXX9y!y`F-JN0GVbxBoZ{!0${hT2K1{%^F}C6yd^leR*dx_GQ>F6e z7e$`-sDq#79(ytGIp#M9$GkUuuiVG;57+TCd*mR#ZLb{dZ^*WlSy3d(**m@V$$i@DDt8TX7r z*WpEJJE!~P{+ahJdCjLLnhkeEX From d2b332a1c52184d7c703b8e96d8e9211020c14b8 Mon Sep 17 00:00:00 2001 From: dekerr Date: Sat, 17 Aug 2019 20:11:46 -0400 Subject: [PATCH 11/13] close stdin --- selfdrive/manager.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/selfdrive/manager.py b/selfdrive/manager.py index 5562dc98b50f5f..375b5c909f76c1 100755 --- a/selfdrive/manager.py +++ b/selfdrive/manager.py @@ -507,7 +507,7 @@ def manager_prepare(): params = Params() process_cnt = len(managed_processes) - loader_proc = subprocess.Popen(["./spinner"], stdin = subprocess.PIPE, + loader_proc = subprocess.Popen(["./spinner"], stdin=subprocess.PIPE, cwd=os.path.join(BASEDIR, "selfdrive", "ui", "spinner"), close_fds=True) spinner_text = "chffrplus" if params.get("Passive")=="1" else "openpilot" @@ -520,8 +520,6 @@ def manager_prepare(): loader_proc.stdin.close() loader_proc.terminate() - # end subprocesses here to stop screen flickering - #[loader_proc[pc].terminate() for pc in range(process_cnt) if loader_proc] def uninstall(): cloudlog.warning("uninstalling") @@ -605,10 +603,11 @@ def main(): else: spinner_text = "chffrplus" if params.get("Passive")=="1" else "openpilot" init_text = "initializing {0}".format(spinner_text) - spinner_proc = subprocess.Popen(["./spinner"], stdin = subprocess.PIPE, + spinner_proc = subprocess.Popen(["./spinner"], stdin=subprocess.PIPE, cwd=os.path.join(BASEDIR, "selfdrive", "ui", "spinner"), close_fds=True) spinner_proc.stdin.write(init_text + "\n") + spinner_proc.stdin.close() try: manager_update() manager_init() From 743c67634ecdcaa9d00bf6390add0055cec56892 Mon Sep 17 00:00:00 2001 From: dekerr Date: Thu, 12 Sep 2019 17:03:38 -0400 Subject: [PATCH 12/13] python changes --- selfdrive/manager.py | 110 +++++++++++------------- selfdrive/ui/__init__.py | 0 selfdrive/ui/spinner/__init__.py | 0 selfdrive/ui/spinner/spinner_manager.py | 18 ++++ 4 files changed, 70 insertions(+), 58 deletions(-) create mode 100644 selfdrive/ui/__init__.py create mode 100644 selfdrive/ui/spinner/__init__.py create mode 100644 selfdrive/ui/spinner/spinner_manager.py diff --git a/selfdrive/manager.py b/selfdrive/manager.py index 375b5c909f76c1..69338f48a32bc1 100755 --- a/selfdrive/manager.py +++ b/selfdrive/manager.py @@ -93,6 +93,7 @@ def unblock_stdout(): import selfdrive.crash as crash from selfdrive.loggerd.config import ROOT +from selfdrive.ui.spinner.spinner_manager import Spinner # comment out anything you don't want to run managed_processes = { @@ -305,32 +306,38 @@ def cleanup_all_processes(signal, frame): # ****************** run loop ****************** def manager_init(should_register=True): - if should_register: - reg_res = register() - if reg_res: - dongle_id, dongle_secret = reg_res + params = Params() + spinner_text = "chffrplus" if params.get("Passive")=="1" else "openpilot" + init_text = "initializing {0}".format(spinner_text) + with Spinner() as spinner: + spinner.update(init_text) + if should_register: + reg_res = register() + if reg_res: + dongle_id, dongle_secret = reg_res + else: + raise Exception("server registration failed") else: - raise Exception("server registration failed") - else: - dongle_id = "c"*16 + dongle_id = "c"*16 - # set dongle id - cloudlog.info("dongle id is " + dongle_id) - os.environ['DONGLE_ID'] = dongle_id + # set dongle id + cloudlog.info("dongle id is " + dongle_id) + os.environ['DONGLE_ID'] = dongle_id - cloudlog.info("dirty is %d" % dirty) - if not dirty: - os.environ['CLEAN'] = '1' + cloudlog.info("dirty is %d" % dirty) + if not dirty: + os.environ['CLEAN'] = '1' - cloudlog.bind_global(dongle_id=dongle_id, version=version, dirty=dirty, is_eon=True) - crash.bind_user(id=dongle_id) - crash.bind_extra(version=version, dirty=dirty, is_eon=True) + cloudlog.bind_global(dongle_id=dongle_id, version=version, dirty=dirty, is_eon=True) + crash.bind_user(id=dongle_id) + crash.bind_extra(version=version, dirty=dirty, is_eon=True) + + os.umask(0) + try: + os.mkdir(ROOT, 0o777) + except OSError: + pass - os.umask(0) - try: - os.mkdir(ROOT, 0o777) - except OSError: - pass def system(cmd): try: @@ -495,31 +502,31 @@ def update_ssh(): raise RuntimeError def manager_update(): - update_ssh() - update_apks() + params = Params() -def manager_prepare(): - # build cereal first - subprocess.check_call(["make", "-j4"], cwd=os.path.join(BASEDIR, "cereal")) + update_text = "updating {0}".format(spinner_text) + with Spinner() as spinner: + spinner.update(update_text) + update_ssh() + update_apks() - # build all processes - os.chdir(os.path.dirname(os.path.abspath(__file__))) - +def manager_prepare(): params = Params() - process_cnt = len(managed_processes) - loader_proc = subprocess.Popen(["./spinner"], stdin=subprocess.PIPE, - cwd=os.path.join(BASEDIR, "selfdrive", "ui", "spinner"), - close_fds=True) spinner_text = "chffrplus" if params.get("Passive")=="1" else "openpilot" + loader_text = "loading {0}".format(spinner_text) + with Spinner() as spinner: + spinner.update(loader_text) + # build cereal first + subprocess.check_call(["make", "-j4"], cwd=os.path.join(BASEDIR, "cereal")) + + # build all processes + os.chdir(os.path.dirname(os.path.abspath(__file__))) - for n,p in enumerate(managed_processes): - if os.getenv("PREPAREONLY") is None: + process_cnt = len(managed_processes) + for n,p in enumerate(managed_processes): loader_text = "loading {0}: {1}/{2} {3}".format(spinner_text, n+1, process_cnt, p) - loader_proc.stdin.write(loader_text + "\n") - prepare_managed_process(p) - - loader_proc.stdin.close() - loader_proc.terminate() + spinner.update(loader_text) + prepare_managed_process(p) def uninstall(): cloudlog.warning("uninstalling") @@ -597,24 +604,11 @@ def main(): if params.get("Passive") is None: raise Exception("Passive must be set to continue") - # put something on screen while we set things up - if os.getenv("PREPAREONLY") is not None: - spinner_proc = None - else: - spinner_text = "chffrplus" if params.get("Passive")=="1" else "openpilot" - init_text = "initializing {0}".format(spinner_text) - spinner_proc = subprocess.Popen(["./spinner"], stdin=subprocess.PIPE, - cwd=os.path.join(BASEDIR, "selfdrive", "ui", "spinner"), - close_fds=True) - spinner_proc.stdin.write(init_text + "\n") - spinner_proc.stdin.close() - try: - manager_update() - manager_init() - manager_prepare() - finally: - if spinner_proc: - spinner_proc.terminate() + spinner_text = "chffrplus" if params.get("Passive")=="1" else "openpilot" + + manager_update() + manager_init() + manager_prepare() if os.getenv("PREPAREONLY") is not None: return diff --git a/selfdrive/ui/__init__.py b/selfdrive/ui/__init__.py new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/selfdrive/ui/spinner/__init__.py b/selfdrive/ui/spinner/__init__.py new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/selfdrive/ui/spinner/spinner_manager.py b/selfdrive/ui/spinner/spinner_manager.py new file mode 100644 index 00000000000000..a16e09c12b0ebf --- /dev/null +++ b/selfdrive/ui/spinner/spinner_manager.py @@ -0,0 +1,18 @@ +import os +import subprocess +from common.basedir import BASEDIR + +class Spinner(object): + def __enter__(self): + self.spinner_proc = subprocess.Popen(["./spinner"], stdin=subprocess.PIPE, + cwd=os.path.join(BASEDIR, "selfdrive", "ui", "spinner"), + close_fds=True) + return self + + def update(self, spinner_text): + if os.getenv("PREPAREONLY") is None: + self.spinner_proc.stdin.write(spinner_text + "\n") + + def __exit__(self, type, value, traceback): + self.spinner_proc.stdin.close() + self.spinner_proc.terminate() \ No newline at end of file From c38485ffe871cc6447add666b97217b76a2c5d7f Mon Sep 17 00:00:00 2001 From: dekerr Date: Thu, 12 Sep 2019 17:08:17 -0400 Subject: [PATCH 13/13] remove unused variable --- selfdrive/manager.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/selfdrive/manager.py b/selfdrive/manager.py index 69338f48a32bc1..f107b6cd7b86e6 100755 --- a/selfdrive/manager.py +++ b/selfdrive/manager.py @@ -503,7 +503,7 @@ def update_ssh(): def manager_update(): params = Params() - + spinner_text = "chffrplus" if params.get("Passive")=="1" else "openpilot" update_text = "updating {0}".format(spinner_text) with Spinner() as spinner: spinner.update(update_text) @@ -604,8 +604,6 @@ def main(): if params.get("Passive") is None: raise Exception("Passive must be set to continue") - spinner_text = "chffrplus" if params.get("Passive")=="1" else "openpilot" - manager_update() manager_init() manager_prepare()