diff --git a/installer/updater/Makefile b/installer/updater/Makefile index e222bc29..54bd7c9d 100644 --- a/installer/updater/Makefile +++ b/installer/updater/Makefile @@ -34,6 +34,7 @@ all: updater OBJS = opensans_regular.ttf.o \ opensans_semibold.ttf.o \ opensans_bold.ttf.o \ + ../../selfdrive/common/util.o \ ../../selfdrive/common/touch.o \ ../../selfdrive/common/framebuffer.o \ $(PHONELIBS)/json11/json11.o \ diff --git a/installer/updater/updater b/installer/updater/updater index 66047420..729de843 100755 Binary files a/installer/updater/updater and b/installer/updater/updater differ diff --git a/installer/updater/updater.cc b/installer/updater/updater.cc index ca0b9270..d737ea24 100644 --- a/installer/updater/updater.cc +++ b/installer/updater/updater.cc @@ -231,6 +231,8 @@ struct Updater { &fb_w, &fb_h); assert(fb); + framebuffer_set_power(fb, HWC_POWER_MODE_NORMAL); + vg = nvgCreateGLES3(NVG_ANTIALIAS | NVG_STENCIL_STROKES | NVG_DEBUG); assert(vg); diff --git a/selfdrive/ui/test/Makefile b/selfdrive/ui/test/Makefile deleted file mode 100644 index 76a7eba0..00000000 --- a/selfdrive/ui/test/Makefile +++ /dev/null @@ -1,69 +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 -g -fPIC -O2 $(WARN_FLAGS) -CXXFLAGS = -std=c++1z -g -fPIC -O2 $(WARN_FLAGS) - -ZMQ_FLAGS = -I$(PHONELIBS)/zmq/aarch64/include -ZMQ_LIBS = -L$(PHONELIBS)/zmq/aarch64/lib \ - -l:libzmq.a \ - -lgnustl_shared - -NANOVG_FLAGS = -I$(PHONELIBS)/nanovg -JSON_FLAGS = -I$(PHONELIBS)/json/src - -OPENGL_LIBS = -lGLESv3 - -FRAMEBUFFER_LIBS = -lutils -lgui -lEGL - -OBJS = test.o \ - ../../common/framebuffer.o \ - ../../common/touch.o - -DEPS := $(OBJS:.o=.d) - -all: test - -test: $(OBJS) - @echo "[ LINK ] $@" - $(CXX) -fPIC -o '$@' $^ \ - $(FRAMEBUFFER_LIBS) \ - $(CEREAL_LIBS) \ - $(ZMQ_LIBS) \ - -L/system/vendor/lib64 \ - -lhardware \ - $(OPENGL_LIBS) \ - -lcutils -lm -llog - -%.o: %.cc - @echo "[ CXX ] $@" - $(CXX) $(CXXFLAGS) -MMD \ - -Iinclude -I.. -I../.. \ - -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.. -I../.. \ - $(NANOVG_FLAGS) \ - $(ZMQ_FLAGS) \ - $(CEREAL_CFLAGS) \ - $(JSON_FLAGS) \ - -c -o '$@' '$<' - -.PHONY: clean -clean: - rm -f ui $(OBJS) $(DEPS) - --include $(DEPS) diff --git a/selfdrive/ui/test/test.c b/selfdrive/ui/test/test.c deleted file mode 100644 index 4b6df0ca..00000000 --- a/selfdrive/ui/test/test.c +++ /dev/null @@ -1,48 +0,0 @@ -#include -#include -#include - -#include -#include -#include - -#include "common/framebuffer.h" -#include "common/touch.h" - -typedef struct UIState { - FramebufferState *fb; - int fb_w, fb_h; - EGLDisplay display; - EGLSurface surface; -} UIState; - -TouchState touch = {0}; - -void wait_for_touch() { - int touch_x = -1, touch_y = -1; - while (1) { - int touched = touch_poll(&touch, &touch_x, &touch_y, 0); - if (touched == 1) { break; } - } -} - -int main() { - UIState uistate; - UIState *s = &uistate; - - memset(s, 0, sizeof(UIState)); - s->fb = framebuffer_init("ui", 0x00010000, true, - &s->display, &s->surface, &s->fb_w, &s->fb_h); - - touch_init(&touch); - - printf("waiting for touch with screen on\n"); - framebuffer_set_power(s->fb, HWC_POWER_MODE_NORMAL); - wait_for_touch(); - - printf("waiting for touch with screen off\n"); - framebuffer_set_power(s->fb, HWC_POWER_MODE_OFF); - wait_for_touch(); - printf("done\n"); -} -