diff --git a/.gitignore b/.gitignore index cfd789ec1c..27196b5528 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +venv/ .DS_Store .tags .ipynb_checkpoints diff --git a/Dockerfile.openpilot b/Dockerfile.openpilot index f4c667fa03..0248d5acb0 100644 --- a/Dockerfile.openpilot +++ b/Dockerfile.openpilot @@ -4,32 +4,44 @@ ENV PYTHONUNBUFFERED 1 RUN apt-get update && apt-get install -y \ autoconf \ build-essential \ - clang \ - wget \ bzip2 \ + clang \ git \ + libarchive-dev \ + libavcodec-dev \ + libavdevice-dev \ + libavfilter-dev \ + libavresample-dev \ + libavutil-dev \ + libffi-dev \ libglib2.0-0 \ + libssl-dev \ + libswscale-dev \ libtool \ - python-pip \ - libzmq5-dev \ - libffi-dev \ libusb-1.0-0 \ - libssl-dev \ + libzmq5-dev \ ocl-icd-libopencl1 \ ocl-icd-opencl-dev \ - opencl-headers + opencl-headers \ + pkg-config \ + python-pip \ + wget COPY phonelibs/install_capnp.sh /tmp/install_capnp.sh RUN /tmp/install_capnp.sh RUN pip install --upgrade pip==18.0 -RUN pip install numpy==1.11.2 scipy==0.18.1 matplotlib==2.1.2 +RUN pip install pipenv==2018.11.26 -COPY requirements_openpilot.txt /tmp/ -RUN pip install -r /tmp/requirements_openpilot.txt +COPY Pipfile /tmp/ +COPY Pipfile.lock /tmp/ +RUN cd /tmp && pipenv install --deploy --system ENV PYTHONPATH /tmp/openpilot:$PYTHONPATH +RUN git clone --branch v0.6 https://github.com/commaai/openpilot-tools.git /tmp/openpilot/tools +RUN pip install -r /tmp/openpilot/tools/requirements.txt + COPY ./.pylintrc /tmp/openpilot/.pylintrc COPY ./common /tmp/openpilot/common COPY ./cereal /tmp/openpilot/cereal diff --git a/Pipfile b/Pipfile new file mode 100644 index 0000000000..84eea415bd --- /dev/null +++ b/Pipfile @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c8eab0ec610fccd29115e8451f1088ed71db5ce7575956d08fd76baf62172e28 +size 2565 diff --git a/Pipfile.lock b/Pipfile.lock new file mode 100644 index 0000000000..d4a2173f48 --- /dev/null +++ b/Pipfile.lock @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:14e21ae221670a6b9178371274d1b30428f6d136195e8320943e8988764d9bd4 +size 152571 diff --git a/README.md b/README.md index bf9f280928..7776587faf 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![](https://i.imgur.com/xY2gdHv.png)](#) +[![](https://i.imgur.com/UetIFyH.jpg)](#) Welcome to openpilot ====== @@ -91,13 +91,15 @@ Supported Cars | Kia | Optima 2019 | SCC + LKAS | Yes | Stock | 0mph | 0mph | Custom6| | Kia | Sorento 2018 | All | Yes | Stock | 0mph | 0mph | Custom6| | Kia | Stinger 2018 | SCC + LKAS | Yes | Stock | 0mph | 0mph | Custom6| +| Lexus | ES Hybrid 2019 | All | Yes | Yes | 0mph | 0mph | Toyota | | Lexus | RX Hybrid 2016-19 | All | Yes | Yes2| 0mph | 0mph | Toyota | | Subaru | Crosstrek 2018 | EyeSight | Yes | Stock | 0mph | 0mph | Custom4| | Subaru | Impreza 2019 | EyeSight | Yes | Stock | 0mph | 0mph | Custom4| | Toyota | Avalon 2016 | TSS-P | Yes | Yes2| 20mph1| 0mph | Toyota | | Toyota | Camry 2018 | All | Yes | Stock | 0mph5 | 0mph | Toyota | | Toyota | C-HR 2017-18 | All | Yes | Stock | 0mph | 0mph | Toyota | -| Toyota | Corolla 2017-18 | All | Yes | Yes2| 20mph1| 0mph | Toyota | +| Toyota | Corolla 2017-19 | All | Yes | Yes2| 20mph1| 0mph | Toyota | +| Toyota | Corolla 2020 | All | Yes | Yes | 0mph | 0mph | Toyota | | Toyota | Corolla Hatchback 2019 | All | Yes | Yes | 0mph | 0mph | Toyota | | Toyota | Highlander 2017-18 | All | Yes | Yes2| 0mph | 0mph | Toyota | | Toyota | Highlander Hybrid 2018 | All | Yes | Yes2| 0mph | 0mph | Toyota | diff --git a/RELEASES.md b/RELEASES.md index 50e71874b5..f73b8daf83 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,3 +1,16 @@ +Version 0.6 (2019-07-01) +======================== + * New model, with double the pixels and ten times the temporal context! + * Car should not take exits when in the right lane + * openpilot uses only ~65% of the CPU (down from 75%) + * Routes visible in connect/explorer after only 0.2% is uploaded (qlogs) + * loggerd and sensord are open source, every line of openpilot is now open + * Panda safety code is MISRA compliant and ships with a signed version on release2 + * New NEOS is 500MB smaller and has a reproducible usr/pipenv + * Lexus ES Hybrid support thanks to wocsor! + * Improve tuning for supported Toyota with TSS2 + * Various other stability improvements + Version 0.5.13 (2019-05-31) ========================== * Reduce panda power consumption by 70%, down to 80mW, when car is off (not for GM) diff --git a/apk/ai.comma.plus.black.apk b/apk/ai.comma.plus.black.apk index 67168f48fc..e0d0df3d96 100644 --- a/apk/ai.comma.plus.black.apk +++ b/apk/ai.comma.plus.black.apk @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6e6f3a8037283b87271a7bb0c95a9ae1a8ff5a86dea7e2b25d49911179b6e05e +oid sha256:309b46b7c38f10da52b18b0340eb3c57b633558a9a27c3ca4116474969ebb456 size 84675 diff --git a/apk/ai.comma.plus.frame.apk b/apk/ai.comma.plus.frame.apk index 21454e97ca..6eb9f17013 100644 --- a/apk/ai.comma.plus.frame.apk +++ b/apk/ai.comma.plus.frame.apk @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:61fc21ef8cec4ca15be05b1b5fdb9c4d95f3a78be891a36d84bd2dd89441e28e -size 2596571 +oid sha256:2b53c6b8927e634d09ece8c780cf8f3d4201a6ea1c8327396a46b663da0e94a6 +size 2604116 diff --git a/apk/ai.comma.plus.offroad.apk b/apk/ai.comma.plus.offroad.apk index 9495ad656d..e6a70e2cea 100644 --- a/apk/ai.comma.plus.offroad.apk +++ b/apk/ai.comma.plus.offroad.apk @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6976978d140b928a499f26a6e8d879a752034a762154dde2d9bde55ef59a9c29 -size 18310604 +oid sha256:3eaf6c7d0666f721967fdf5441ea254568cbe898ee71f31e55e41c0cdd6cc41b +size 18310731 diff --git a/common/fingerprints.py b/common/fingerprints.py index 5a29c9555c..ddc3bceb66 100644 --- a/common/fingerprints.py +++ b/common/fingerprints.py @@ -4,7 +4,7 @@ from common.basedir import BASEDIR def get_fingerprint_list(): # read all the folders in selfdrive/car and return a dict where: # - keys are all the car models for which we have a fingerprint - # - values are lists dicts of messages that constitute the unique + # - values are lists dicts of messages that constitute the unique # CAN fingerprint of each car model and all its variants fingerprints = {} for car_folder in [x[0] for x in os.walk(BASEDIR + '/selfdrive/car')]: diff --git a/common/kalman/Makefile b/common/kalman/Makefile index cb8f092650..88b032af1b 100644 --- a/common/kalman/Makefile +++ b/common/kalman/Makefile @@ -1,7 +1,7 @@ all: simple_kalman_impl.so simple_kalman_impl.so: simple_kalman_impl.pyx simple_kalman_impl.pxd simple_kalman_setup.py - python simple_kalman_setup.py build_ext --inplace + python2 simple_kalman_setup.py build_ext --inplace rm -rf build rm simple_kalman_impl.c diff --git a/common/params.py b/common/params.py index cde03156f3..c374d5233e 100755 --- a/common/params.py +++ b/common/params.py @@ -65,6 +65,7 @@ keys = { "IsGeofenceEnabled": [TxType.PERSISTENT], "IsMetric": [TxType.PERSISTENT], "IsUpdateAvailable": [TxType.PERSISTENT], + "IsUploadRawEnabled": [TxType.PERSISTENT], "IsUploadVideoOverCellularEnabled": [TxType.PERSISTENT], "LimitSetSpeed": [TxType.PERSISTENT], "LiveParameters": [TxType.PERSISTENT], diff --git a/common/realtime.py b/common/realtime.py index 21204db0dd..8bcd06966f 100644 --- a/common/realtime.py +++ b/common/realtime.py @@ -15,6 +15,13 @@ assert monotonic_time assert sec_since_boot +# time step for each process +DT_CTRL = 0.01 # controlsd +DT_PLAN = 0.05 # mpc +DT_MDL = 0.05 # model +DT_DMON = 0.1 # driver monitoring + + ffi = FFI() ffi.cdef("long syscall(long number, ...);") libc = ffi.dlopen(None) diff --git a/common/transformations/camera.py b/common/transformations/camera.py index 1ac9bc5b28..2e04c5ac22 100644 --- a/common/transformations/camera.py +++ b/common/transformations/camera.py @@ -1,6 +1,5 @@ import numpy as np import common.transformations.orientation as orient -import cv2 import math FULL_FRAME_SIZE = (1164, 874) @@ -126,6 +125,8 @@ def img_from_device(pt_device): #TODO please use generic img transform below def rotate_img(img, eulers, crop=None, intrinsics=eon_intrinsics): + import cv2 + size = img.shape[:2] rot = orient.rot_from_euler(eulers) quadrangle = np.array([[0, 0], @@ -162,6 +163,8 @@ def transform_img(base_img, output_size=None, pretransform=None, top_hacks=True): + import cv2 + size = base_img.shape[:2] if not output_size: output_size = size[::-1] @@ -204,10 +207,10 @@ def transform_img(base_img, def yuv_crop(frame, output_size, center=None): # output_size in camera coordinates so u,v # center in array coordinates so row, column + import cv2 rgb = cv2.cvtColor(frame, cv2.COLOR_YUV2RGB_I420) if not center: center = (rgb.shape[0]/2, rgb.shape[1]/2) rgb_crop = rgb[center[0] - output_size[1]/2: center[0] + output_size[1]/2, center[1] - output_size[0]/2: center[1] + output_size[0]/2] return cv2.cvtColor(rgb_crop, cv2.COLOR_RGB2YUV_I420) - diff --git a/installer/updater/Makefile b/installer/updater/Makefile new file mode 100644 index 0000000000..d9444e6c59 --- /dev/null +++ b/installer/updater/Makefile @@ -0,0 +1,88 @@ +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++11 -g -fPIC -O2 $(WARN_FLAGS) + +CURL_FLAGS = -I$(PHONELIBS)/curl/include +CURL_LIBS = $(PHONELIBS)/curl/lib/libcurl.a \ + $(PHONELIBS)/zlib/lib/libz.a + +BORINGSSL_FLAGS = -I$(PHONELIBS)/boringssl/include +BORINGSSL_LIBS = $(PHONELIBS)/boringssl/lib/libssl_static.a \ + $(PHONELIBS)/boringssl/lib/libcrypto_static.a \ + +NANOVG_FLAGS = -I$(PHONELIBS)/nanovg + +JSON11_FLAGS = -I$(PHONELIBS)/json11 + +OPENGL_LIBS = -lGLESv3 + +FRAMEBUFFER_LIBS = -lutils -lgui -lEGL + +.PHONY: all +all: updater + +OBJS = courbd.ttf.o \ + ../../selfdrive/common/touch.o \ + ../../selfdrive/common/framebuffer.o \ + $(PHONELIBS)/json11/json11.o \ + $(PHONELIBS)/nanovg/nanovg.o + +DEPS := $(OBJS:.o=.d) + +updater: updater.o $(OBJS) + @echo "[ LINK ] $@" + $(CXX) $(CPPFLAGS) -fPIC -o 'updater' $^ \ + $(FRAMEBUFFER_LIBS) \ + $(CURL_LIBS) \ + $(BORINGSSL_LIBS) \ + -L/system/vendor/lib64 \ + $(OPENGL_LIBS) \ + -lcutils -lm -llog + strip updater + +courbd.ttf.o: ../../selfdrive/assets/courbd.ttf + @echo "[ bin2o ] $@" + cd '$(dir $<)' && ld -r -b binary '$(notdir $<)' -o '$(abspath $@)' + +%.o: %.c + mkdir -p $(@D) + @echo "[ CC ] $@" + $(CC) $(CPPFLAGS) $(CFLAGS) \ + -I../.. \ + -I$(PHONELIBS)/android_frameworks_native/include \ + -I$(PHONELIBS)/android_system_core/include \ + -I$(PHONELIBS)/android_hardware_libhardware/include \ + $(NANOVG_FLAGS) \ + -c -o '$@' '$<' + +%.o: %.cc + mkdir -p $(@D) + @echo "[ CXX ] $@" + $(CXX) $(CPPFLAGS) $(CXXFLAGS) \ + -I../../selfdrive \ + -I../../ \ + -I$(PHONELIBS)/android_frameworks_native/include \ + -I$(PHONELIBS)/android_system_core/include \ + -I$(PHONELIBS)/android_hardware_libhardware/include \ + $(NANOVG_FLAGS) \ + $(JSON11_FLAGS) \ + $(CURL_FLAGS) \ + $(BORINGSSL_FLAGS) \ + -c -o '$@' '$<' + + +.PHONY: clean +clean: + rm -f $(OBJS) $(DEPS) + +-include $(DEPS) diff --git a/installer/updater/update.json b/installer/updater/update.json new file mode 100644 index 0000000000..827a44b10d --- /dev/null +++ b/installer/updater/update.json @@ -0,0 +1,7 @@ +{ + "ota_url": "https://commadist.azureedge.net/neosupdate/ota-signed-c992abb59cbaf6588f51055db52db619061107851773fc8480acb8bb5d77a28f.zip", + "ota_hash": "c992abb59cbaf6588f51055db52db619061107851773fc8480acb8bb5d77a28f", + "recovery_url": "https://commadist.azureedge.net/neosupdate/recovery-af099a84cfd7b91266090779238ac358278948dcde2dcfa0fbca6e8397366f0a.img", + "recovery_len": 15136044, + "recovery_hash": "af099a84cfd7b91266090779238ac358278948dcde2dcfa0fbca6e8397366f0a" +} diff --git a/installer/updater/updater b/installer/updater/updater index 3886b571d1..401c339a39 100755 --- a/installer/updater/updater +++ b/installer/updater/updater @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:206205b51ce5bfd3c387cb961302879b72d1e1ea3e81bb8b59dbbb7109197142 -size 2501608 +oid sha256:743ba86c3b4d643272c11eba28e2b0a8824c542caa613a94ff6a2f01c37e54a7 +size 2501656 diff --git a/installer/updater/updater.cc b/installer/updater/updater.cc new file mode 100644 index 0000000000..58fab32413 --- /dev/null +++ b/installer/updater/updater.cc @@ -0,0 +1,675 @@ +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include "nanovg.h" +#define NANOVG_GLES3_IMPLEMENTATION +#include "nanovg_gl.h" +#include "nanovg_gl_utils.h" + +#include "json11.hpp" + +#include "common/framebuffer.h" +#include "common/touch.h" +#include "common/utilpp.h" + +#define USER_AGENT "NEOSUpdater-0.2" + +#define MANIFEST_URL_EON_STAGING "https://github.com/commaai/eon-neos/raw/master/update.staging.json" +#define MANIFEST_URL_EON_LOCAL "http://192.168.5.1:8000/neosupdate/update.local.json" +#define MANIFEST_URL_EON "https://github.com/commaai/eon-neos/raw/master/update.json" +const char *manifest_url = MANIFEST_URL_EON; + +#define RECOVERY_DEV "/dev/block/bootdevice/by-name/recovery" +#define RECOVERY_COMMAND "/cache/recovery/command" + +#define UPDATE_DIR "/data/neoupdate" + +extern const uint8_t bin_courbd[] asm("_binary_courbd_ttf_start"); +extern const uint8_t bin_courbd_end[] asm("_binary_courbd_ttf_end"); + +namespace { + +std::string sha256_file(std::string fn, size_t limit=0) { + SHA256_CTX ctx; + SHA256_Init(&ctx); + + FILE *file = fopen(fn.c_str(), "rb"); + if (!file) return ""; + + const size_t buf_size = 8192; + std::unique_ptr buffer( new char[ buf_size ] ); + + bool read_limit = (limit != 0); + while (true) { + size_t read_size = buf_size; + if (read_limit) read_size = std::min(read_size, limit); + size_t bytes_read = fread(buffer.get(), 1, read_size, file); + if (!bytes_read) break; + + SHA256_Update(&ctx, buffer.get(), bytes_read); + + if (read_limit) { + limit -= bytes_read; + if (limit == 0) break; + } + } + + uint8_t hash[SHA256_DIGEST_LENGTH]; + SHA256_Final(hash, &ctx); + + fclose(file); + + return util::tohex(hash, sizeof(hash)); +} + +size_t download_string_write(void *ptr, size_t size, size_t nmeb, void *up) { + size_t sz = size * nmeb; + ((std::string*)up)->append((char*)ptr, sz); + return sz; +} + +std::string download_string(CURL *curl, std::string url) { + std::string os; + + curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); + curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1); + curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1); + curl_easy_setopt(curl, CURLOPT_USERAGENT, USER_AGENT); + curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1); + curl_easy_setopt(curl, CURLOPT_RESUME_FROM, 0); + + curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1); + + curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, download_string_write); + curl_easy_setopt(curl, CURLOPT_WRITEDATA, &os); + CURLcode res = curl_easy_perform(curl); + if (res != CURLE_OK) { + return ""; + } + + return os; +} + +size_t download_file_write(void *ptr, size_t size, size_t nmeb, void *up) { + return fwrite(ptr, size, nmeb, (FILE*)up); +} + +bool check_battery() { + std::string bat_cap_s = util::read_file("/sys/class/power_supply/battery/capacity"); + int bat_cap = atoi(bat_cap_s.c_str()); + std::string current_now_s = util::read_file("/sys/class/power_supply/battery/current_now"); + int current_now = atoi(current_now_s.c_str()); + return bat_cap > 35 || (current_now < 0 && bat_cap > 10); +} + +bool check_space() { + struct statvfs stat; + if (statvfs("/data/", &stat) != 0) { + return false; + } + size_t space = stat.f_bsize * stat.f_bavail; + return space > 2000000000ULL; // 2GB +} + +static void start_settings_activity(const char* name) { + char launch_cmd[1024]; + snprintf(launch_cmd, sizeof(launch_cmd), + "am start -W --ez :settings:show_fragment_as_subsetting true -n 'com.android.settings/.%s'", name); + system(launch_cmd); +} + +struct Updater { + bool do_exit = false; + + TouchState touch; + + int fb_w, fb_h; + EGLDisplay display; + EGLSurface surface; + + FramebufferState *fb = NULL; + NVGcontext *vg = NULL; + int font; + + std::thread update_thread_handle; + + std::mutex lock; + + // i hate state machines give me coroutines already + enum UpdateState { + CONFIRMATION, + RUNNING, + ERROR, + }; + UpdateState state; + + std::string progress_text; + float progress_frac; + + std::string error_text; + + // button + int b_x, b_w, b_y, b_h; + int balt_x; + + CURL *curl = NULL; + + Updater() { + touch_init(&touch); + + fb = framebuffer_init("updater", 0x00001000, false, + &display, &surface, &fb_w, &fb_h); + assert(fb); + + vg = nvgCreateGLES3(NVG_ANTIALIAS | NVG_STENCIL_STROKES | NVG_DEBUG); + assert(vg); + font = nvgCreateFontMem(vg, "courbd", (unsigned char*)bin_courbd, (bin_courbd_end - bin_courbd), 0); + assert(font >= 0); + + b_w = 600; + balt_x = 200; + b_x = fb_w-b_w-200; + b_y = 700; + b_h = 250; + + state = CONFIRMATION; + + } + + int download_file_xferinfo(curl_off_t dltotal, curl_off_t dlno, + curl_off_t ultotal, curl_off_t ulnow) { + { + std::lock_guard guard(lock); + if (dltotal != 0) { + progress_frac = (float) dlno / dltotal; + } + } + // printf("info: %ld %ld %f\n", dltotal, dlno, progress_frac); + return 0; + } + + bool download_file(std::string url, std::string out_fn) { + FILE *of = fopen(out_fn.c_str(), "ab"); + assert(of); + + CURLcode res; + long last_resume_from = 0; + + fseek(of, 0, SEEK_END); + + int tries = 4; + + bool ret = false; + + while (true) { + long resume_from = ftell(of); + + curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); + curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1); + curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1); + curl_easy_setopt(curl, CURLOPT_USERAGENT, USER_AGENT); + curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1); + curl_easy_setopt(curl, CURLOPT_RESUME_FROM, resume_from); + + curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, download_file_write); + curl_easy_setopt(curl, CURLOPT_WRITEDATA, of); + + curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0); + + curl_easy_setopt(curl, CURLOPT_XFERINFODATA, this); + curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, &Updater::download_file_xferinfo); + + CURLcode res = curl_easy_perform(curl); + + long response_code = 0; + curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response_code); + + // double content_length = 0.0; + // curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &content_length); + + printf("download %s res %d, code %ld, resume from %ld\n", url.c_str(), res, response_code, resume_from); + if (res == CURLE_OK) { + ret = true; + break; + } else if (res == CURLE_HTTP_RETURNED_ERROR && response_code == 416) { + // failed because the file is already complete? + ret = true; + break; + } else if (resume_from == last_resume_from) { + // failed and dind't make make forward progress. only retry a couple times + tries--; + if (tries <= 0) { + break; + } + } + last_resume_from = resume_from; + } + // printf("res %d\n", res); + + // printf("- %ld %f\n", response_code, content_length); + + fclose(of); + + return ret; + } + + void set_progress(std::string text) { + std::lock_guard guard(lock); + progress_text = text; + } + + void set_error(std::string text) { + std::lock_guard guard(lock); + error_text = text; + state = ERROR; + } + + std::string stage_download(std::string url, std::string hash, std::string name) { + std::string out_fn = UPDATE_DIR "/" + util::base_name(url); + + set_progress("downloading " + name + "..."); + bool r = download_file(url, out_fn); + if (!r) { + set_error("failed to download " + name); + return ""; + } + + set_progress("verifying " + name + "..."); + std::string fn_hash = sha256_file(out_fn); + printf("got %s hash: %s\n", name.c_str(), hash.c_str()); + if (fn_hash != hash) { + set_error(name + " was corrupt"); + unlink(out_fn.c_str()); + return ""; + } + + return out_fn; + } + + void run_stages() { + curl = curl_easy_init(); + assert(curl); + + if (!check_battery()) { + set_error("Please plug power in to your EON and wait for charge"); + return; + } + + if (!check_space()) { + set_error("2GB of free space required to update"); + return; + } + + mkdir(UPDATE_DIR, 0777); + + const int EON = (access("/EON", F_OK) != -1); + + set_progress("finding latest version..."); + std::string manifest_s; + if (EON) { + manifest_s = download_string(curl, manifest_url); + } else { + // don't update NEO + exit(0); + } + + printf("manifest: %s\n", manifest_s.c_str()); + + std::string err; + auto manifest = json11::Json::parse(manifest_s, err); + if (manifest.is_null() || !err.empty()) { + set_error("failed to load update manifest"); + return; + } + + std::string ota_url = manifest["ota_url"].string_value(); + std::string ota_hash = manifest["ota_hash"].string_value(); + + std::string recovery_url = manifest["recovery_url"].string_value(); + std::string recovery_hash = manifest["recovery_hash"].string_value(); + int recovery_len = manifest["recovery_len"].int_value(); + + // std::string installer_url = manifest["installer_url"].string_value(); + // std::string installer_hash = manifest["installer_hash"].string_value(); + + if (ota_url.empty() || ota_hash.empty()) { + set_error("invalid update manifest"); + return; + } + + // std::string installer_fn = stage_download(installer_url, installer_hash, "installer"); + // if (installer_fn.empty()) { + // //error'd + // return; + // } + + std::string recovery_fn; + if (recovery_url.empty() || recovery_hash.empty() || recovery_len == 0) { + set_progress("skipping recovery flash..."); + } else { + // only download the recovery if it differs from what's flashed + set_progress("checking recovery..."); + std::string existing_recovery_hash = sha256_file(RECOVERY_DEV, recovery_len); + printf("existing recovery hash: %s\n", existing_recovery_hash.c_str()); + + if (existing_recovery_hash != recovery_hash) { + recovery_fn = stage_download(recovery_url, recovery_hash, "recovery"); + if (recovery_fn.empty()) { + // error'd + return; + } + } + } + + std::string ota_fn = stage_download(ota_url, ota_hash, "update"); + if (ota_fn.empty()) { + //error'd + return; + } + + if (!check_battery()) { + set_error("must have at least 35% battery to update"); + return; + } + + if (!recovery_fn.empty()) { + // flash recovery + set_progress("flashing recovery..."); + + FILE *flash_file = fopen(recovery_fn.c_str(), "rb"); + if (!flash_file) { + set_error("failed to flash recovery"); + return; + } + + FILE *recovery_dev = fopen(RECOVERY_DEV, "w+b"); + if (!recovery_dev) { + fclose(flash_file); + set_error("failed to flash recovery"); + return; + } + + const size_t buf_size = 4096; + std::unique_ptr buffer( new char[ buf_size ] ); + + while (true) { + size_t bytes_read = fread(buffer.get(), 1, buf_size, flash_file); + if (!bytes_read) break; + + size_t bytes_written = fwrite(buffer.get(), 1, bytes_read, recovery_dev); + if (bytes_read != bytes_written) { + fclose(recovery_dev); + fclose(flash_file); + set_error("failed to flash recovery: write failed"); + return; + } + } + + fclose(recovery_dev); + fclose(flash_file); + + set_progress("verifying flash..."); + std::string new_recovery_hash = sha256_file(RECOVERY_DEV, recovery_len); + printf("new recovery hash: %s\n", new_recovery_hash.c_str()); + + if (new_recovery_hash != recovery_hash) { + set_error("recovery flash corrupted"); + return; + } + + } + + // write arguments to recovery + FILE *cmd_file = fopen(RECOVERY_COMMAND, "wb"); + if (!cmd_file) { + set_error("failed to reboot into recovery"); + return; + } + fprintf(cmd_file, "--update_package=%s\n", ota_fn.c_str()); + fclose(cmd_file); + + set_progress("rebooting"); + + // remove the continue.sh so we come back into the setup. + // maybe we should go directly into the installer, but what if we don't come back with internet? :/ + //unlink("/data/data/com.termux/files/continue.sh"); + + // TODO: this should be generic between android versions + // IPowerManager.reboot(confirm=false, reason="recovery", wait=true) + system("service call power 16 i32 0 s16 recovery i32 1"); + while(1) pause(); + + // execl("/system/bin/reboot", "recovery"); + // set_error("failed to reboot into recovery"); + } + + void draw_ack_screen(const char *message, const char *button, const char *altbutton) { + nvgFontSize(vg, 96.0f); + nvgFillColor(vg, nvgRGBA(255,255,255,255)); + nvgTextAlign(vg, NVG_ALIGN_LEFT | NVG_ALIGN_BASELINE); + nvgTextBox(vg, 50, 100, fb_w-100, message, NULL); + + // draw button + if (button) { + nvgBeginPath(vg); + nvgFillColor(vg, nvgRGBA(0, 0, 0, 255)); + nvgRoundedRect(vg, b_x, b_y, b_w, b_h, 20); + nvgFill(vg); + + nvgFillColor(vg, nvgRGBA(255, 255, 255, 255)); + nvgTextAlign(vg, NVG_ALIGN_CENTER | NVG_ALIGN_MIDDLE); + nvgText(vg, b_x+b_w/2, b_y+b_h/2, button, NULL); + + nvgBeginPath(vg); + nvgStrokeColor(vg, nvgRGBA(255, 255, 255, 255)); + nvgStrokeWidth(vg, 5); + nvgRoundedRect(vg, b_x, b_y, b_w, b_h, 20); + nvgStroke(vg); + } + + // draw button + if (altbutton) { + nvgBeginPath(vg); + nvgFillColor(vg, nvgRGBA(0, 0, 0, 255)); + nvgRoundedRect(vg, balt_x, b_y, b_w, b_h, 20); + nvgFill(vg); + + nvgFillColor(vg, nvgRGBA(255, 255, 255, 255)); + nvgTextAlign(vg, NVG_ALIGN_CENTER | NVG_ALIGN_MIDDLE); + nvgText(vg, balt_x+b_w/2, b_y+b_h/2, altbutton, NULL); + + nvgBeginPath(vg); + nvgStrokeColor(vg, nvgRGBA(255, 255, 255, 255)); + nvgStrokeWidth(vg, 5); + nvgRoundedRect(vg, balt_x, b_y, b_w, b_h, 20); + nvgStroke(vg); + } + } + + void draw_progress_screen() { + // draw progress message + nvgFontSize(vg, 64.0f); + nvgFillColor(vg, nvgRGBA(255,255,255,255)); + nvgTextAlign(vg, NVG_ALIGN_CENTER | NVG_ALIGN_BASELINE); + nvgTextBox(vg, 0, 700, fb_w, progress_text.c_str(), NULL); + + // draw progress bar + { + int progress_width = 800; + int progress_x = fb_w/2-progress_width/2; + int progress_y = 768; + int progress_height = 15; + + int powerprompt_y = 512; + nvgText(vg, fb_w/2, powerprompt_y, "Ensure EON is connected to power", NULL); + + NVGpaint paint = nvgBoxGradient( + vg, progress_x + 1, progress_y + 1, + progress_width - 2, progress_height, 3, 4, nvgRGB(0, 32, 0), nvgRGB(0, 92, 0)); + nvgBeginPath(vg); + nvgRoundedRect(vg, progress_x, progress_y, progress_width, progress_height, 3); + nvgFillPaint(vg, paint); + nvgFill(vg); + + float value = std::min(std::max(0.0f, progress_frac), 1.0f); + int bar_pos = ((progress_width - 2) * value); + + paint = nvgBoxGradient( + vg, progress_x, progress_y, + bar_pos+1.5f, progress_height-1, 3, 4, + nvgRGB(220, 100, 0), nvgRGB(128, 100, 0)); + + nvgBeginPath(vg); + nvgRoundedRect( + vg, progress_x+1, progress_y+1, + bar_pos, progress_height-2, 3); + nvgFillPaint(vg, paint); + nvgFill(vg); + } + } + + void ui_draw() { + std::lock_guard guard(lock); + + nvgBeginFrame(vg, fb_w, fb_h, 1.0f); + + switch (state) { + case CONFIRMATION: + draw_ack_screen("An upgrade to NEOS is required.\n\n" + "Your device will now be reset and upgraded. You may want to connect to wifi as download is around 1 GB\nData on device shouldn't be lost.", + "continue", + "wifi"); + break; + case RUNNING: + draw_progress_screen(); + break; + case ERROR: + draw_ack_screen(("ERROR: " + error_text + "\n\nYou will need to retry").c_str(), NULL, "exit"); + break; + } + + nvgEndFrame(vg); + } + + void ui_update() { + std::lock_guard guard(lock); + + switch (state) { + case ERROR: + case CONFIRMATION: { + int touch_x = -1, touch_y = -1; + int res = touch_poll(&touch, &touch_x, &touch_y, 0); + if (res == 1 && !is_settings_active()) { + if (touch_x >= b_x && touch_x < b_x+b_w && touch_y >= b_y && touch_y < b_y+b_h) { + if (state == CONFIRMATION) { + state = RUNNING; + update_thread_handle = std::thread(&Updater::run_stages, this); + } + } + if (touch_x >= balt_x && touch_x < balt_x+b_w && touch_y >= b_y && touch_y < b_y+b_h) { + if (state == CONFIRMATION) { + start_settings_activity("Settings$WifiSettingsActivity"); + } else if (state == ERROR) { + do_exit = 1; + } + } + } + } + default: + break; + } + } + + + void go() { + while (!do_exit) { + ui_update(); + + glClearColor(0.19, 0.09, 0.2, 1.0); + glClear(GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT); + + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + ui_draw(); + + glDisable(GL_BLEND); + + eglSwapBuffers(display, surface); + assert(glGetError() == GL_NO_ERROR); + + // no simple way to do 30fps vsync with surfaceflinger... + usleep(30000); + } + + if (update_thread_handle.joinable()) { + update_thread_handle.join(); + } + + system("service call power 16 i32 0 i32 0 i32 1"); + } + + bool is_settings_active() { + FILE *fp; + char sys_output[4096]; + + fp = popen("/bin/dumpsys window windows", "r"); + if (fp == NULL) { + return false; + } + + bool active = false; + while (fgets(sys_output, sizeof(sys_output), fp) != NULL) { + if (strstr(sys_output, "mCurrentFocus=null") != NULL) { + break; + } + + if (strstr(sys_output, "mCurrentFocus=Window") != NULL) { + active = true; + break; + } + } + + pclose(fp); + + return active; + } + +}; + +} +int main(int argc, char *argv[]) { + if (argc > 1) { + if (strcmp(argv[1], "local") == 0) { + manifest_url = MANIFEST_URL_EON_LOCAL; + } else if (strcmp(argv[1], "staging") == 0) { + manifest_url = MANIFEST_URL_EON_STAGING; + } else { + manifest_url = argv[1]; + } + } + printf("updating from %s\n", manifest_url); + Updater updater; + updater.go(); + + return 0; +} diff --git a/launch_chffrplus.sh b/launch_chffrplus.sh index 4b7c4c0369..4aa9d402b7 100755 --- a/launch_chffrplus.sh +++ b/launch_chffrplus.sh @@ -1,5 +1,11 @@ #!/usr/bin/bash +export OMP_NUM_THREADS=1 +export MKL_NUM_THREADS=1 +export NUMEXPR_NUM_THREADS=1 +export OPENBLAS_NUM_THREADS=1 +export VECLIB_MAXIMUM_THREADS=1 + if [ -z "$PASSIVE" ]; then export PASSIVE="1" fi diff --git a/models/driving_model.dlc b/models/driving_model.dlc index 7d7b35e955..14e3d05c1e 100644 --- a/models/driving_model.dlc +++ b/models/driving_model.dlc @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d1805ad557a93999b787ab1fd66f4bcef7d25226b123bd4f49774340f2e7476c -size 6354536 +oid sha256:46b4433f49e6d54ced1049e03aed650f6cb6de6d243ae64167945150935d7cd8 +size 12039472 diff --git a/phonelibs/android_frameworks_native/get.txt b/phonelibs/android_frameworks_native/get.txt new file mode 100644 index 0000000000..d1891f4392 --- /dev/null +++ b/phonelibs/android_frameworks_native/get.txt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e9f15383e6c4c5b38d23ebddc61e1ea470e3bfe1162bc5541731110c44c5e930 +size 218 diff --git a/phonelibs/android_frameworks_native/include/android/asset_manager.h b/phonelibs/android_frameworks_native/include/android/asset_manager.h new file mode 100644 index 0000000000..be24873389 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/android/asset_manager.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4f5dfc20e99151c75d84292c20078403e74a57845b67b7a7a6a4b914bc7489d7 +size 6310 diff --git a/phonelibs/android_frameworks_native/include/android/asset_manager_jni.h b/phonelibs/android_frameworks_native/include/android/asset_manager_jni.h new file mode 100644 index 0000000000..fe4caeb41b --- /dev/null +++ b/phonelibs/android_frameworks_native/include/android/asset_manager_jni.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1cc3d193d044c640dc508a71edade54dfbc8eda63ecd8357a56140040b9c7edb +size 1297 diff --git a/phonelibs/android_frameworks_native/include/android/bitmap.h b/phonelibs/android_frameworks_native/include/android/bitmap.h new file mode 100644 index 0000000000..d0f5a30fa2 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/android/bitmap.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:115e60c96995ddb54fb0e512f6daf22d4202f837b184516387db5d23d26a5646 +size 3321 diff --git a/phonelibs/android_frameworks_native/include/android/configuration.h b/phonelibs/android_frameworks_native/include/android/configuration.h new file mode 100644 index 0000000000..233477c13f --- /dev/null +++ b/phonelibs/android_frameworks_native/include/android/configuration.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6224c4f8ab7b39d8adeb75546a6525079ffedfeea5237cbd36e867f3cee04803 +size 24230 diff --git a/phonelibs/android_frameworks_native/include/android/input.h b/phonelibs/android_frameworks_native/include/android/input.h new file mode 100644 index 0000000000..c830bb82b5 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/android/input.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:522965edc66e550247798a34aea163332039153f24634d89258d291dc273e3c0 +size 50206 diff --git a/phonelibs/android_frameworks_native/include/android/keycodes.h b/phonelibs/android_frameworks_native/include/android/keycodes.h new file mode 100644 index 0000000000..72d21b0f8c --- /dev/null +++ b/phonelibs/android_frameworks_native/include/android/keycodes.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:670bbc519eb78fc02e3d219bb22852094a822c93059cb0d8b84bfb589bef69d2 +size 28013 diff --git a/phonelibs/android_frameworks_native/include/android/looper.h b/phonelibs/android_frameworks_native/include/android/looper.h new file mode 100644 index 0000000000..042945d3aa --- /dev/null +++ b/phonelibs/android_frameworks_native/include/android/looper.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac6faedcf48e9e7b4d5d3d954902e89ba4cb10547bf3b95e6d0b18d449622380 +size 9362 diff --git a/phonelibs/android_frameworks_native/include/android/multinetwork.h b/phonelibs/android_frameworks_native/include/android/multinetwork.h new file mode 100644 index 0000000000..0d95d8e9bb --- /dev/null +++ b/phonelibs/android_frameworks_native/include/android/multinetwork.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc9d7e479c930899802a616233eb19cf35c348f1983e58e0b19009314f70e300 +size 3827 diff --git a/phonelibs/android_frameworks_native/include/android/native_activity.h b/phonelibs/android_frameworks_native/include/android/native_activity.h new file mode 100644 index 0000000000..51693fcb28 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/android/native_activity.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:04f85d119fc222abd65aef1f57f8e03a94134c272b95ed781e8f3791c64d973a +size 11780 diff --git a/phonelibs/android_frameworks_native/include/android/native_window.h b/phonelibs/android_frameworks_native/include/android/native_window.h new file mode 100644 index 0000000000..bf34ffb1ef --- /dev/null +++ b/phonelibs/android_frameworks_native/include/android/native_window.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ee90636296c75189310323ce3bf1b4a2f893b04c46c0e4f6f103b9a013a60033 +size 4316 diff --git a/phonelibs/android_frameworks_native/include/android/native_window_jni.h b/phonelibs/android_frameworks_native/include/android/native_window_jni.h new file mode 100644 index 0000000000..4a7d95bc66 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/android/native_window_jni.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:170b6129e63451b96442573ecc95758388176d8793d5a979b00bf5346856716e +size 1312 diff --git a/phonelibs/android_frameworks_native/include/android/obb.h b/phonelibs/android_frameworks_native/include/android/obb.h new file mode 100644 index 0000000000..4271f8371e --- /dev/null +++ b/phonelibs/android_frameworks_native/include/android/obb.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd3e7a17778fa696a0fce301b5d50ed840d555b804f6d1b5b8f03d7fbb39283b +size 1645 diff --git a/phonelibs/android_frameworks_native/include/android/rect.h b/phonelibs/android_frameworks_native/include/android/rect.h new file mode 100644 index 0000000000..3266aca97e --- /dev/null +++ b/phonelibs/android_frameworks_native/include/android/rect.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7cc1c4048bdea60287aa1d882bc7d6f6022650f9046e25aff467460e824682eb +size 1360 diff --git a/phonelibs/android_frameworks_native/include/android/sensor.h b/phonelibs/android_frameworks_native/include/android/sensor.h new file mode 100644 index 0000000000..ae221f0c10 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/android/sensor.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1adbf47e36c389ce0b35d7e71d5dc554b395c773354f492fb05014f596a62fbb +size 13375 diff --git a/phonelibs/android_frameworks_native/include/android/storage_manager.h b/phonelibs/android_frameworks_native/include/android/storage_manager.h new file mode 100644 index 0000000000..2051f9aa29 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/android/storage_manager.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a5447e1652b16d9980d3b2c49f0c768ae72f3fbca63e53327db1f6792c017c9 +size 4478 diff --git a/phonelibs/android_frameworks_native/include/android/trace.h b/phonelibs/android_frameworks_native/include/android/trace.h new file mode 100644 index 0000000000..b618b82543 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/android/trace.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:101ddabd30d19118826fed11932cc31f93ca66f431577f9da332276ebe2b836c +size 1863 diff --git a/phonelibs/android_frameworks_native/include/android/window.h b/phonelibs/android_frameworks_native/include/android/window.h new file mode 100644 index 0000000000..9b299631fc --- /dev/null +++ b/phonelibs/android_frameworks_native/include/android/window.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f1458af50d003e0ecdce63c3898ff3d4ea8dd377d8c578bf3585224f09e0a19 +size 9558 diff --git a/phonelibs/android_frameworks_native/include/batteryservice/BatteryService.h b/phonelibs/android_frameworks_native/include/batteryservice/BatteryService.h new file mode 100644 index 0000000000..7f0cbf3b63 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/batteryservice/BatteryService.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c2a41eb4ce0779c2b1a8688963d941e42d865bb329f00b9b0afd1a47ce13f457 +size 3487 diff --git a/phonelibs/android_frameworks_native/include/batteryservice/IBatteryPropertiesListener.h b/phonelibs/android_frameworks_native/include/batteryservice/IBatteryPropertiesListener.h new file mode 100644 index 0000000000..7c1209b74c --- /dev/null +++ b/phonelibs/android_frameworks_native/include/batteryservice/IBatteryPropertiesListener.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d4f7436534cc53b22144089c1b4f1a2e2f0e46a73f7e34baac65f99f0c65b36e +size 1443 diff --git a/phonelibs/android_frameworks_native/include/batteryservice/IBatteryPropertiesRegistrar.h b/phonelibs/android_frameworks_native/include/batteryservice/IBatteryPropertiesRegistrar.h new file mode 100644 index 0000000000..a360724f29 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/batteryservice/IBatteryPropertiesRegistrar.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ef80851c4f0dabc111ca30f20fab1ad6986f3f0d0e647c0ff215cf0875b95d3 +size 1847 diff --git a/phonelibs/android_frameworks_native/include/binder/AppOpsManager.h b/phonelibs/android_frameworks_native/include/binder/AppOpsManager.h new file mode 100644 index 0000000000..64c4564cc1 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/binder/AppOpsManager.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:78aff1f5e3fcdd820a67090f0db2dc8354c3cce3bace7da137739e7c0698b3d0 +size 4135 diff --git a/phonelibs/android_frameworks_native/include/binder/Binder.h b/phonelibs/android_frameworks_native/include/binder/Binder.h new file mode 100644 index 0000000000..e1bcd794b8 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/binder/Binder.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:84a970cfdf33f86843304d0f49b9bde40cfd36b538c6e92cf8fccbb8101eba39 +size 3670 diff --git a/phonelibs/android_frameworks_native/include/binder/BinderService.h b/phonelibs/android_frameworks_native/include/binder/BinderService.h new file mode 100644 index 0000000000..3e57115459 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/binder/BinderService.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:757ac756acdb326d3b40dc1e01e56c38b4466cb188b0e2db34ea54407e28f14b +size 1909 diff --git a/phonelibs/android_frameworks_native/include/binder/BpBinder.h b/phonelibs/android_frameworks_native/include/binder/BpBinder.h new file mode 100644 index 0000000000..c2283f3776 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/binder/BpBinder.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca3771c1f65b2e9e95be641185f3948d06b41e274cfd84faa2237d926000a7d8 +size 4198 diff --git a/phonelibs/android_frameworks_native/include/binder/BufferedTextOutput.h b/phonelibs/android_frameworks_native/include/binder/BufferedTextOutput.h new file mode 100644 index 0000000000..e09e3a38c4 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/binder/BufferedTextOutput.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:21d16d34c5fd57030ad898f7b4c658f56a0cb16ddc187acbb514abaed91d3524 +size 1946 diff --git a/phonelibs/android_frameworks_native/include/binder/Debug.h b/phonelibs/android_frameworks_native/include/binder/Debug.h new file mode 100644 index 0000000000..9c5ba47102 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/binder/Debug.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec7353283565bfabfec563ffe770d538816c7f014f71268467f25535f83ce4b9 +size 1461 diff --git a/phonelibs/android_frameworks_native/include/binder/IAppOpsCallback.h b/phonelibs/android_frameworks_native/include/binder/IAppOpsCallback.h new file mode 100644 index 0000000000..f0fca447a2 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/binder/IAppOpsCallback.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dfd9355ceea4af60c603125897f8f1286488c415685a94849282eaf55f88a4cf +size 1587 diff --git a/phonelibs/android_frameworks_native/include/binder/IAppOpsService.h b/phonelibs/android_frameworks_native/include/binder/IAppOpsService.h new file mode 100644 index 0000000000..f74c98d183 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/binder/IAppOpsService.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cccdfcc2f97ae9f4555108f88d0afccb05ce60dc77ca5ce77ef9bed336439079 +size 2967 diff --git a/phonelibs/android_frameworks_native/include/binder/IBatteryStats.h b/phonelibs/android_frameworks_native/include/binder/IBatteryStats.h new file mode 100644 index 0000000000..b8aea219c8 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/binder/IBatteryStats.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:673dcc1b4783a037c0bd740dd6eb197abfedb4b60652b9f197eb42d2bbbb111d +size 2652 diff --git a/phonelibs/android_frameworks_native/include/binder/IBinder.h b/phonelibs/android_frameworks_native/include/binder/IBinder.h new file mode 100644 index 0000000000..07911a4dce --- /dev/null +++ b/phonelibs/android_frameworks_native/include/binder/IBinder.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c3588b911e0996b8c3d1302159543078a7f47f284a643757baaa064b33ef54f7 +size 5719 diff --git a/phonelibs/android_frameworks_native/include/binder/IInterface.h b/phonelibs/android_frameworks_native/include/binder/IInterface.h new file mode 100644 index 0000000000..e6cba059cc --- /dev/null +++ b/phonelibs/android_frameworks_native/include/binder/IInterface.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f1df1400d1802efa1493b12011c42a0463a78992fdcede39465a5a5c607d5f12 +size 5346 diff --git a/phonelibs/android_frameworks_native/include/binder/IMemory.h b/phonelibs/android_frameworks_native/include/binder/IMemory.h new file mode 100644 index 0000000000..3efcb2cd46 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/binder/IMemory.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:03399faeadd032a6ee04243da9598731155120ce5e0ba561176eeb5a23448a64 +size 2760 diff --git a/phonelibs/android_frameworks_native/include/binder/IPCThreadState.h b/phonelibs/android_frameworks_native/include/binder/IPCThreadState.h new file mode 100644 index 0000000000..8dd65f6561 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/binder/IPCThreadState.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2bb01005609d90b2764e74a286439d8ce18384ed49c5da5a32514a98199d3268 +size 5794 diff --git a/phonelibs/android_frameworks_native/include/binder/IPermissionController.h b/phonelibs/android_frameworks_native/include/binder/IPermissionController.h new file mode 100644 index 0000000000..c581650df0 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/binder/IPermissionController.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b7097beb61dd5f61c97ed00811ce3fdc8f54eb924966cb8df1c90587157ed29 +size 1989 diff --git a/phonelibs/android_frameworks_native/include/binder/IProcessInfoService.h b/phonelibs/android_frameworks_native/include/binder/IProcessInfoService.h new file mode 100644 index 0000000000..380b98fae8 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/binder/IProcessInfoService.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f6b79dd4de99b1641eed90ecdfc1bebe22b8eced1952f76d0817715ddeca1be2 +size 1761 diff --git a/phonelibs/android_frameworks_native/include/binder/IServiceManager.h b/phonelibs/android_frameworks_native/include/binder/IServiceManager.h new file mode 100644 index 0000000000..9592fd6b68 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/binder/IServiceManager.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b8ebc04536bf5b9a3b8476fc69b16af88b4f7e270cc25dd5593775d8fd168e4a +size 3058 diff --git a/phonelibs/android_frameworks_native/include/binder/MemoryBase.h b/phonelibs/android_frameworks_native/include/binder/MemoryBase.h new file mode 100644 index 0000000000..1e3e5ef48c --- /dev/null +++ b/phonelibs/android_frameworks_native/include/binder/MemoryBase.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91e920eb91a889b7ebe4f75cf93d85974f15f56830bd74446274c297e45ebb1b +size 1478 diff --git a/phonelibs/android_frameworks_native/include/binder/MemoryDealer.h b/phonelibs/android_frameworks_native/include/binder/MemoryDealer.h new file mode 100644 index 0000000000..00819f14a8 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/binder/MemoryDealer.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f2fa384a16c2dab3f5da239a403d475d1f66929c49546a68fef185f514b88f84 +size 1779 diff --git a/phonelibs/android_frameworks_native/include/binder/MemoryHeapBase.h b/phonelibs/android_frameworks_native/include/binder/MemoryHeapBase.h new file mode 100644 index 0000000000..affb626438 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/binder/MemoryHeapBase.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20ff33d9c67fc9f1dda1185a0c22233ba76fe802d9cd0baa1dc4d605866c2de5 +size 2969 diff --git a/phonelibs/android_frameworks_native/include/binder/MemoryHeapIon.h b/phonelibs/android_frameworks_native/include/binder/MemoryHeapIon.h new file mode 100644 index 0000000000..523c2119fb --- /dev/null +++ b/phonelibs/android_frameworks_native/include/binder/MemoryHeapIon.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:67a6a070382d161ad4986058dcee5796d6872c1fbbc1e4ebf9405a2bb149a00b +size 2121 diff --git a/phonelibs/android_frameworks_native/include/binder/Parcel.h b/phonelibs/android_frameworks_native/include/binder/Parcel.h new file mode 100644 index 0000000000..009e72265f --- /dev/null +++ b/phonelibs/android_frameworks_native/include/binder/Parcel.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a56179f0413127e1f482b52ed33484cd5614d0e4c3f5b73339e63855e5f33a5c +size 16085 diff --git a/phonelibs/android_frameworks_native/include/binder/PermissionCache.h b/phonelibs/android_frameworks_native/include/binder/PermissionCache.h new file mode 100644 index 0000000000..dc1f919c66 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/binder/PermissionCache.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0d2b02316d73c9c8162200def733398df09c65d0cd095f36b41cb85b65e99aa0 +size 2537 diff --git a/phonelibs/android_frameworks_native/include/binder/ProcessInfoService.h b/phonelibs/android_frameworks_native/include/binder/ProcessInfoService.h new file mode 100644 index 0000000000..4f807ec437 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/binder/ProcessInfoService.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:855e3f340536dc4f8adcc36d9008462581b03b1896424ab1e280d06d48eef8b2 +size 2089 diff --git a/phonelibs/android_frameworks_native/include/binder/ProcessState.h b/phonelibs/android_frameworks_native/include/binder/ProcessState.h new file mode 100644 index 0000000000..842da50972 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/binder/ProcessState.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cb9b5d3a8de374d4d321483dbad9f87d82aed3e5bae94b4ea95f0469f921b5aa +size 4161 diff --git a/phonelibs/android_frameworks_native/include/binder/TextOutput.h b/phonelibs/android_frameworks_native/include/binder/TextOutput.h new file mode 100644 index 0000000000..a9dcc119e9 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/binder/TextOutput.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:265061758f26c7f49c73d3bd5b378a19dd6a85c2670184c425329db726f40f62 +size 5538 diff --git a/phonelibs/android_frameworks_native/include/diskusage/dirsize.h b/phonelibs/android_frameworks_native/include/diskusage/dirsize.h new file mode 100644 index 0000000000..4cd1f66af9 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/diskusage/dirsize.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f64238396d565007970e2dae18e6512f78c76ef7f25afb7bfecca2781410cff1 +size 850 diff --git a/phonelibs/android_frameworks_native/include/gui/BitTube.h b/phonelibs/android_frameworks_native/include/gui/BitTube.h new file mode 100644 index 0000000000..880ece7cbc --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/BitTube.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1dd4dd8ea31194aec5eb308448a84f68e00686c2e388ffdaa0b3d59ecbeb7605 +size 2925 diff --git a/phonelibs/android_frameworks_native/include/gui/BufferItem.h b/phonelibs/android_frameworks_native/include/gui/BufferItem.h new file mode 100644 index 0000000000..01c2a75322 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/BufferItem.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6da33fd21ca28b94f486cc7c3d8f0963aefd5e281681dad2c59e27b0649dfda7 +size 4146 diff --git a/phonelibs/android_frameworks_native/include/gui/BufferItemConsumer.h b/phonelibs/android_frameworks_native/include/gui/BufferItemConsumer.h new file mode 100644 index 0000000000..78d0c08b33 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/BufferItemConsumer.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a7a2bce5e0fd0dbabf73d310d5b3396befca8a40fb3860c36fe99f5cbcebe552 +size 3771 diff --git a/phonelibs/android_frameworks_native/include/gui/BufferQueue.h b/phonelibs/android_frameworks_native/include/gui/BufferQueue.h new file mode 100644 index 0000000000..d5c8610ef0 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/BufferQueue.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e188a71436fdb40a19171bee104f0faf35fc73d7b170420ec468c1053ffafe2b +size 3770 diff --git a/phonelibs/android_frameworks_native/include/gui/BufferQueueConsumer.h b/phonelibs/android_frameworks_native/include/gui/BufferQueueConsumer.h new file mode 100644 index 0000000000..af7bf587e7 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/BufferQueueConsumer.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bae5d175a8754ab82f351203496381c9f988ffa9f1549dfd47254280cbc572c1 +size 8057 diff --git a/phonelibs/android_frameworks_native/include/gui/BufferQueueCore.h b/phonelibs/android_frameworks_native/include/gui/BufferQueueCore.h new file mode 100644 index 0000000000..52c30af502 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/BufferQueueCore.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bbcdb1e69a5d74aa1c549fa191853a03536d9408fef9023a98ed5436b498c912 +size 11790 diff --git a/phonelibs/android_frameworks_native/include/gui/BufferQueueDefs.h b/phonelibs/android_frameworks_native/include/gui/BufferQueueDefs.h new file mode 100644 index 0000000000..de2b17f948 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/BufferQueueDefs.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2fd6327d02df20b3560bcbbfc0f1c9cab5bd506b2bc26a78f2bd3abcebdcf9e8 +size 1144 diff --git a/phonelibs/android_frameworks_native/include/gui/BufferQueueProducer.h b/phonelibs/android_frameworks_native/include/gui/BufferQueueProducer.h new file mode 100644 index 0000000000..f8d2d9ffb1 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/BufferQueueProducer.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:78dd17ec37b92b113c1e30c226458ebec4006c75ec71d3324e659f0b6334c756 +size 10433 diff --git a/phonelibs/android_frameworks_native/include/gui/BufferSlot.h b/phonelibs/android_frameworks_native/include/gui/BufferSlot.h new file mode 100644 index 0000000000..d1c97f73fd --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/BufferSlot.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:245631b236d2ca272f3d565eefe70af92be7a2cbd7ef73b2cf6d276b9bad1090 +size 5494 diff --git a/phonelibs/android_frameworks_native/include/gui/ConsumerBase.h b/phonelibs/android_frameworks_native/include/gui/ConsumerBase.h new file mode 100644 index 0000000000..217ccc3917 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/ConsumerBase.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:339188da63c72c067a7b88bce21452d20d42f62bf9e0a9f23013b64e51121ad9 +size 11552 diff --git a/phonelibs/android_frameworks_native/include/gui/CpuConsumer.h b/phonelibs/android_frameworks_native/include/gui/CpuConsumer.h new file mode 100644 index 0000000000..3d7d89e21e --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/CpuConsumer.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:78197bb11633009e50538af6822158be2d00231c3e25f340f8914756833ae006 +size 4683 diff --git a/phonelibs/android_frameworks_native/include/gui/DisplayEventReceiver.h b/phonelibs/android_frameworks_native/include/gui/DisplayEventReceiver.h new file mode 100644 index 0000000000..9e36cab21c --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/DisplayEventReceiver.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b17767bfe0b7796f422fb9132a23e7bddf1ed29111562ecb49cdf0f42d52b8a +size 3979 diff --git a/phonelibs/android_frameworks_native/include/gui/GLConsumer.h b/phonelibs/android_frameworks_native/include/gui/GLConsumer.h new file mode 100644 index 0000000000..48f0ea3f4f --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/GLConsumer.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:65f7cd6b57b6afa4afb020769c45ce7c34ecb28aa24e2a32db422ec049501ae7 +size 22456 diff --git a/phonelibs/android_frameworks_native/include/gui/GraphicBufferAlloc.h b/phonelibs/android_frameworks_native/include/gui/GraphicBufferAlloc.h new file mode 100644 index 0000000000..a0c81f4e6a --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/GraphicBufferAlloc.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a5f5ad65254a75518430630e0efb42437717c1b5d5c779d8979a95d4bcfd43b2 +size 1404 diff --git a/phonelibs/android_frameworks_native/include/gui/GuiConfig.h b/phonelibs/android_frameworks_native/include/gui/GuiConfig.h new file mode 100644 index 0000000000..d991a8f9e0 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/GuiConfig.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7e2756965873ef04d7a5e9c74d129f987c7bda68cc6c2bcf1621ec7f607d8655 +size 892 diff --git a/phonelibs/android_frameworks_native/include/gui/IConsumerListener.h b/phonelibs/android_frameworks_native/include/gui/IConsumerListener.h new file mode 100644 index 0000000000..816f4d8431 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/IConsumerListener.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f27a7d810fab79a182925bcbad91845e8b0fcd23e34450187de2120b1b651b20 +size 4207 diff --git a/phonelibs/android_frameworks_native/include/gui/IDisplayEventConnection.h b/phonelibs/android_frameworks_native/include/gui/IDisplayEventConnection.h new file mode 100644 index 0000000000..7d02c2287f --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/IDisplayEventConnection.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0c041de77a8d30abba6fdc0cfd6a1d3e12e0542d2d36db0ad50fbffde103a9a9 +size 2260 diff --git a/phonelibs/android_frameworks_native/include/gui/IGraphicBufferAlloc.h b/phonelibs/android_frameworks_native/include/gui/IGraphicBufferAlloc.h new file mode 100644 index 0000000000..2d069e0c73 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/IGraphicBufferAlloc.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:190e6fd0d3aa51febe4425f207c9ccb3f3d477df30de4ecd47cf15d72b07cc2a +size 1797 diff --git a/phonelibs/android_frameworks_native/include/gui/IGraphicBufferConsumer.h b/phonelibs/android_frameworks_native/include/gui/IGraphicBufferConsumer.h new file mode 100644 index 0000000000..f21b636b45 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/IGraphicBufferConsumer.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7cc59712c78a22786ea7ea8151b49fa0882f4db09f79e5551f87780933378cbd +size 12943 diff --git a/phonelibs/android_frameworks_native/include/gui/IGraphicBufferProducer.h b/phonelibs/android_frameworks_native/include/gui/IGraphicBufferProducer.h new file mode 100644 index 0000000000..fdd11ccb2c --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/IGraphicBufferProducer.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:64566e05d8794a536fb6a7a86bd5125c76b54f5ce4c1c95fa1cfe810f3a4f4f8 +size 24769 diff --git a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/EXTRAS/SolutionAnalysis.o b/phonelibs/android_frameworks_native/include/gui/IProducerListener.h similarity index 82% rename from selfdrive/controls/lib/longitudinal_mpc/lib_qp/EXTRAS/SolutionAnalysis.o rename to phonelibs/android_frameworks_native/include/gui/IProducerListener.h index 27891b56ed..695f5ab2a5 100644 --- a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/EXTRAS/SolutionAnalysis.o +++ b/phonelibs/android_frameworks_native/include/gui/IProducerListener.h @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d1df0d4b3379b6daebd902add7e38a8f53b90c3b7c25b1d8855fd44a043fe650 -size 4488 +oid sha256:f34c4a8a04b6b04c012bf730d7e17ec379af9c1a1b06f3bf5d093ed3a182b18d +size 2071 diff --git a/phonelibs/android_frameworks_native/include/gui/ISensorEventConnection.h b/phonelibs/android_frameworks_native/include/gui/ISensorEventConnection.h new file mode 100644 index 0000000000..3a767d79fc --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/ISensorEventConnection.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5eae57aaf0445cb13dd971a5e050835d3dfe0d8a73818d9d700850845012f3f0 +size 1947 diff --git a/phonelibs/android_frameworks_native/include/gui/ISensorServer.h b/phonelibs/android_frameworks_native/include/gui/ISensorServer.h new file mode 100644 index 0000000000..ea46bcf8c1 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/ISensorServer.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6f1016bc60c8b046c4010d09b674d5b65812bc58abe1345de2e5bbbae8ccb3a +size 1873 diff --git a/phonelibs/android_frameworks_native/include/gui/ISurfaceComposer.h b/phonelibs/android_frameworks_native/include/gui/ISurfaceComposer.h new file mode 100644 index 0000000000..931432ff10 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/ISurfaceComposer.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4bf890c484480988656a5ad46d265d1d6c82832a521a2168a199f6ff5a77bfb7 +size 6461 diff --git a/phonelibs/android_frameworks_native/include/gui/ISurfaceComposerClient.h b/phonelibs/android_frameworks_native/include/gui/ISurfaceComposerClient.h new file mode 100644 index 0000000000..2b12e10225 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/ISurfaceComposerClient.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d64ef9a3ce9b4cf20a1c68ccf2fda5d8afeaa00c87b51fbfe424cea50ed4f3ce +size 2916 diff --git a/phonelibs/android_frameworks_native/include/gui/Sensor.h b/phonelibs/android_frameworks_native/include/gui/Sensor.h new file mode 100644 index 0000000000..74db01c957 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/Sensor.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fef9e2cf234338f057d1ca7fd572c288dbb55039c64e5430bbc4519818806d6d +size 3579 diff --git a/phonelibs/android_frameworks_native/include/gui/SensorEventQueue.h b/phonelibs/android_frameworks_native/include/gui/SensorEventQueue.h new file mode 100644 index 0000000000..a2efd91e81 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/SensorEventQueue.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e7abdb7046401e50d7a00bdf3e0af74c8cb6e29eec684559beb203f2dc2cb55 +size 3079 diff --git a/phonelibs/android_frameworks_native/include/gui/SensorManager.h b/phonelibs/android_frameworks_native/include/gui/SensorManager.h new file mode 100644 index 0000000000..02bf615482 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/SensorManager.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e6e156d6f99b5b5fe1ea69241d466eafda734c20d76b506b976028695486d09 +size 2528 diff --git a/phonelibs/android_frameworks_native/include/gui/StreamSplitter.h b/phonelibs/android_frameworks_native/include/gui/StreamSplitter.h new file mode 100644 index 0000000000..f13728dadc --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/StreamSplitter.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e126e8f6dc76e9f5ac8ceeb24f1c1add7d77b5d53e9b7281d37593d8e7bae956 +size 7596 diff --git a/phonelibs/android_frameworks_native/include/gui/Surface.h b/phonelibs/android_frameworks_native/include/gui/Surface.h new file mode 100644 index 0000000000..b1ef50a957 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/Surface.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3762e8cb68493ea8951bfe72510de46735e750e0acacb5e1abff719508c4634 +size 13515 diff --git a/phonelibs/android_frameworks_native/include/gui/SurfaceComposerClient.h b/phonelibs/android_frameworks_native/include/gui/SurfaceComposerClient.h new file mode 100644 index 0000000000..6fcd0c2b94 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/SurfaceComposerClient.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c32afc8cbfaa4cb365712a7a5dfe32ab25c9f7c9fb9aa604ba0008375ac6af42 +size 9287 diff --git a/phonelibs/android_frameworks_native/include/gui/SurfaceControl.h b/phonelibs/android_frameworks_native/include/gui/SurfaceControl.h new file mode 100644 index 0000000000..3727375907 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/gui/SurfaceControl.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e8d9b67e029a12641f472d341eb2f7e59ced566e7a0ed163158679eb09dfcb3 +size 3360 diff --git a/phonelibs/android_frameworks_native/include/input/IInputFlinger.h b/phonelibs/android_frameworks_native/include/input/IInputFlinger.h new file mode 100644 index 0000000000..c74f5db706 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/input/IInputFlinger.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7675d7d60165054bb459a20959e179a66cb4338db61d5da468c022be23e992ef +size 1356 diff --git a/phonelibs/android_frameworks_native/include/input/Input.h b/phonelibs/android_frameworks_native/include/input/Input.h new file mode 100644 index 0000000000..34257d78e0 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/input/Input.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:14589be7ab8b95eb7f71a9bebfade34f186740658634683121b60cea07977479 +size 20823 diff --git a/phonelibs/android_frameworks_native/include/input/InputDevice.h b/phonelibs/android_frameworks_native/include/input/InputDevice.h new file mode 100644 index 0000000000..e56f029388 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/input/InputDevice.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:37c55cb0fa7888c28b739d82e96dbc60f1e6b9482e94837cd7344efe3bbca505 +size 5991 diff --git a/phonelibs/android_frameworks_native/include/input/InputEventLabels.h b/phonelibs/android_frameworks_native/include/input/InputEventLabels.h new file mode 100644 index 0000000000..db2632877c --- /dev/null +++ b/phonelibs/android_frameworks_native/include/input/InputEventLabels.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:487225608179b1a66a7f5e46e3d814f6e46cb4ab08037566286087055c911c99 +size 12994 diff --git a/phonelibs/android_frameworks_native/include/input/InputTransport.h b/phonelibs/android_frameworks_native/include/input/InputTransport.h new file mode 100644 index 0000000000..9e4e482638 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/input/InputTransport.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7979ad97f182c34d8336af7db638ee03d6b243568a3c336b7c9e27f2700553be +size 16263 diff --git a/phonelibs/android_frameworks_native/include/input/KeyCharacterMap.h b/phonelibs/android_frameworks_native/include/input/KeyCharacterMap.h new file mode 100644 index 0000000000..cc9f99199d --- /dev/null +++ b/phonelibs/android_frameworks_native/include/input/KeyCharacterMap.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:39632c6080bf5b8e0da6a52375377e979a244c7aa805d476e883c1cb0d8c6e0d +size 9044 diff --git a/phonelibs/android_frameworks_native/include/input/KeyLayoutMap.h b/phonelibs/android_frameworks_native/include/input/KeyLayoutMap.h new file mode 100644 index 0000000000..be49a2085c --- /dev/null +++ b/phonelibs/android_frameworks_native/include/input/KeyLayoutMap.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da1866e4923ee525dd60aed19bb29c9b179f1b9abd6f6c160eb80d3e4efb3587 +size 3205 diff --git a/phonelibs/android_frameworks_native/include/input/Keyboard.h b/phonelibs/android_frameworks_native/include/input/Keyboard.h new file mode 100644 index 0000000000..bf385c4959 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/input/Keyboard.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc76bb51bfb9ec310932409592f2d3bfa038686b0c88001681e99c197203bf5e +size 3110 diff --git a/phonelibs/android_frameworks_native/include/input/VelocityControl.h b/phonelibs/android_frameworks_native/include/input/VelocityControl.h new file mode 100644 index 0000000000..f713b3ae5d --- /dev/null +++ b/phonelibs/android_frameworks_native/include/input/VelocityControl.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d501d4cbcacb1099ee07c78e847bc2db7b6eea85d5a53e9537aec2123555a908 +size 3738 diff --git a/phonelibs/android_frameworks_native/include/input/VelocityTracker.h b/phonelibs/android_frameworks_native/include/input/VelocityTracker.h new file mode 100644 index 0000000000..100e198e3b --- /dev/null +++ b/phonelibs/android_frameworks_native/include/input/VelocityTracker.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:594e1c35a751b8d6e43bb581809eb99435f928a6feeb6cf60875135369303694 +size 8807 diff --git a/phonelibs/android_frameworks_native/include/input/VirtualKeyMap.h b/phonelibs/android_frameworks_native/include/input/VirtualKeyMap.h new file mode 100644 index 0000000000..6dd117b314 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/input/VirtualKeyMap.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d40b11a51f1048b52d611c62ade05f22661c9698e5fb6a29adf969e59c7fae7e +size 2018 diff --git a/phonelibs/android_frameworks_native/include/media/drm/DrmAPI.h b/phonelibs/android_frameworks_native/include/media/drm/DrmAPI.h new file mode 100644 index 0000000000..431f7d8442 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/media/drm/DrmAPI.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12ec99988003c07d63ac94983cb929a9913d5d1ec1c7c04dd776e1d5aee8cd78 +size 19777 diff --git a/phonelibs/android_frameworks_native/include/media/editor/II420ColorConverter.h b/phonelibs/android_frameworks_native/include/media/editor/II420ColorConverter.h new file mode 100644 index 0000000000..661295c300 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/media/editor/II420ColorConverter.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:415f44a1e1c4dc26626f6539ed87654f3dd480f3396a2525d52489c732773caf +size 5444 diff --git a/phonelibs/android_frameworks_native/include/media/hardware/CryptoAPI.h b/phonelibs/android_frameworks_native/include/media/hardware/CryptoAPI.h new file mode 100644 index 0000000000..3f7aa241bc --- /dev/null +++ b/phonelibs/android_frameworks_native/include/media/hardware/CryptoAPI.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:149b990492e2cc2fe76348fc6a6ef17359677fdda6599ddc0f32634659f4084d +size 3932 diff --git a/phonelibs/android_frameworks_native/include/media/hardware/HDCPAPI.h b/phonelibs/android_frameworks_native/include/media/hardware/HDCPAPI.h new file mode 100644 index 0000000000..287c4d8b75 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/media/hardware/HDCPAPI.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f60a7a89bd01283b9823b1e90d656fab33c9f6e6131e0c24eeb913b077bc2c0e +size 7007 diff --git a/phonelibs/android_frameworks_native/include/media/hardware/HardwareAPI.h b/phonelibs/android_frameworks_native/include/media/hardware/HardwareAPI.h new file mode 100644 index 0000000000..4fdf56067a --- /dev/null +++ b/phonelibs/android_frameworks_native/include/media/hardware/HardwareAPI.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1de4b08d5bc9fa6c6556bb08f39c5ab0c994468d552b92ba5e7cf4635fc1627d +size 12963 diff --git a/phonelibs/android_frameworks_native/include/media/hardware/MetadataBufferType.h b/phonelibs/android_frameworks_native/include/media/hardware/MetadataBufferType.h new file mode 100644 index 0000000000..b55e593c9e --- /dev/null +++ b/phonelibs/android_frameworks_native/include/media/hardware/MetadataBufferType.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49fdb24fa2180407feac733d4a61fe52e5c607e34f032629acce3767e993786e +size 5279 diff --git a/phonelibs/android_frameworks_native/include/media/hardware/OMXPluginBase.h b/phonelibs/android_frameworks_native/include/media/hardware/OMXPluginBase.h new file mode 100644 index 0000000000..5e91f92958 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/media/hardware/OMXPluginBase.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8db8f05d79a00a6c4991d89dba67dbbd353075cc9d98cde77ef5034bcd23893e +size 1603 diff --git a/phonelibs/android_frameworks_native/include/media/openmax/OMX_AsString.h b/phonelibs/android_frameworks_native/include/media/openmax/OMX_AsString.h new file mode 100644 index 0000000000..15cf1d6503 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/media/openmax/OMX_AsString.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:15dd6dc2639caf617c5a0e2d8d20e86e8d4d474e7a924a37f58e9f3abdee3abd +size 50450 diff --git a/phonelibs/android_frameworks_native/include/media/openmax/OMX_Audio.h b/phonelibs/android_frameworks_native/include/media/openmax/OMX_Audio.h new file mode 100644 index 0000000000..72c6d197c4 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/media/openmax/OMX_Audio.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8c501618d96891bb74316584b8df989bda2f90558603f5fcdfdbcd43fd0f8f0 +size 78367 diff --git a/phonelibs/android_frameworks_native/include/media/openmax/OMX_AudioExt.h b/phonelibs/android_frameworks_native/include/media/openmax/OMX_AudioExt.h new file mode 100644 index 0000000000..10e7059d00 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/media/openmax/OMX_AudioExt.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:11d2d9202e2459ea94fff0b61fe89f97f6a11d32b45a6de41ba07b7aa5ae32f6 +size 5493 diff --git a/phonelibs/android_frameworks_native/include/media/openmax/OMX_Component.h b/phonelibs/android_frameworks_native/include/media/openmax/OMX_Component.h new file mode 100644 index 0000000000..7cf04124bd --- /dev/null +++ b/phonelibs/android_frameworks_native/include/media/openmax/OMX_Component.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:32ddf10d8b32f3e100b87a5e88049b8221464db2580a9c7c218758397993810a +size 24431 diff --git a/phonelibs/android_frameworks_native/include/media/openmax/OMX_ContentPipe.h b/phonelibs/android_frameworks_native/include/media/openmax/OMX_ContentPipe.h new file mode 100644 index 0000000000..17700c5abd --- /dev/null +++ b/phonelibs/android_frameworks_native/include/media/openmax/OMX_ContentPipe.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c2220ca301a16bebf0bd9c0d1ca8d4375692276d85d47ed9c43643703b21068c +size 9931 diff --git a/phonelibs/android_frameworks_native/include/media/openmax/OMX_Core.h b/phonelibs/android_frameworks_native/include/media/openmax/OMX_Core.h new file mode 100644 index 0000000000..79e3a01561 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/media/openmax/OMX_Core.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:38adf75a25a68c720b81ea667232704079c3e2aa51350c082b80bdb2b4d66c77 +size 70696 diff --git a/phonelibs/android_frameworks_native/include/media/openmax/OMX_IVCommon.h b/phonelibs/android_frameworks_native/include/media/openmax/OMX_IVCommon.h new file mode 100644 index 0000000000..b534708de2 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/media/openmax/OMX_IVCommon.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:69fe1895e151c468f2592b84b36e05fd2bf280a939eb6799cea6a0ea995e38ac +size 33521 diff --git a/phonelibs/android_frameworks_native/include/media/openmax/OMX_Image.h b/phonelibs/android_frameworks_native/include/media/openmax/OMX_Image.h new file mode 100644 index 0000000000..32ac255743 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/media/openmax/OMX_Image.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d3d9f1c9643b60fefbcfa7ad13a1c8905b5d8dc7d907e35515ac2c2a1290c68d +size 13833 diff --git a/phonelibs/android_frameworks_native/include/media/openmax/OMX_Index.h b/phonelibs/android_frameworks_native/include/media/openmax/OMX_Index.h new file mode 100644 index 0000000000..6f4d16ad71 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/media/openmax/OMX_Index.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a6a2fa7f1b06ec1458f24b592fbb21b8a5ddb659b0006b4fed5b95de44bce64 +size 18696 diff --git a/phonelibs/android_frameworks_native/include/media/openmax/OMX_IndexExt.h b/phonelibs/android_frameworks_native/include/media/openmax/OMX_IndexExt.h new file mode 100644 index 0000000000..570f089ee0 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/media/openmax/OMX_IndexExt.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c374f1c4c64cc72917b7273211da96a8a636d107226d6655e5f51380acf81e4c +size 4892 diff --git a/phonelibs/android_frameworks_native/include/media/openmax/OMX_Other.h b/phonelibs/android_frameworks_native/include/media/openmax/OMX_Other.h new file mode 100644 index 0000000000..8853a59b3a --- /dev/null +++ b/phonelibs/android_frameworks_native/include/media/openmax/OMX_Other.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc00885b8a98f01b98255b236fa7312bd22e3d8c1061c1944f482a54e607c310 +size 18564 diff --git a/phonelibs/android_frameworks_native/include/media/openmax/OMX_Types.h b/phonelibs/android_frameworks_native/include/media/openmax/OMX_Types.h new file mode 100644 index 0000000000..39d1d2e41b --- /dev/null +++ b/phonelibs/android_frameworks_native/include/media/openmax/OMX_Types.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4dd6361e455a1bd2493be27e214bbef1b3f3b3a9c1b775aa559cc53c0bdd0df7 +size 13726 diff --git a/phonelibs/android_frameworks_native/include/media/openmax/OMX_Video.h b/phonelibs/android_frameworks_native/include/media/openmax/OMX_Video.h new file mode 100644 index 0000000000..87122cd11c --- /dev/null +++ b/phonelibs/android_frameworks_native/include/media/openmax/OMX_Video.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:602b0e571337790a609583fc7b3517695d841324d3630075252fb05893878f7d +size 44190 diff --git a/phonelibs/android_frameworks_native/include/media/openmax/OMX_VideoExt.h b/phonelibs/android_frameworks_native/include/media/openmax/OMX_VideoExt.h new file mode 100644 index 0000000000..36edf2caaa --- /dev/null +++ b/phonelibs/android_frameworks_native/include/media/openmax/OMX_VideoExt.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:62c7a8def89031ce1d62fb12ad2bb5c5f1dd38d29dd3fbf1e04344d4cd45f776 +size 8284 diff --git a/phonelibs/android_frameworks_native/include/powermanager/IPowerManager.h b/phonelibs/android_frameworks_native/include/powermanager/IPowerManager.h new file mode 100644 index 0000000000..1368338622 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/powermanager/IPowerManager.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1674ad977b57b9ce57ee78189138e52dddf091b32f834d1e4f0281c92b8f6a7f +size 1924 diff --git a/phonelibs/android_frameworks_native/include/powermanager/PowerManager.h b/phonelibs/android_frameworks_native/include/powermanager/PowerManager.h new file mode 100644 index 0000000000..a5a528e26b --- /dev/null +++ b/phonelibs/android_frameworks_native/include/powermanager/PowerManager.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9891982e86612f29e26ea6ec4b04163ba2e8c64dafedfd32592a24646280eadc +size 1128 diff --git a/phonelibs/android_frameworks_native/include/private/binder/Static.h b/phonelibs/android_frameworks_native/include/private/binder/Static.h new file mode 100644 index 0000000000..d3aadc5d85 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/private/binder/Static.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa1da4edb2203662d396513f5d0dbb66ed1dbe72fd0eeb3e12f8144f17568a1e +size 1287 diff --git a/phonelibs/android_frameworks_native/include/private/binder/binder_module.h b/phonelibs/android_frameworks_native/include/private/binder/binder_module.h new file mode 100644 index 0000000000..d9a3273ef6 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/private/binder/binder_module.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c0b97b251bfb086a8e039cbdcfdfddfd7e6dc057bbab9c738667dda69457ff9a +size 913 diff --git a/phonelibs/android_frameworks_native/include/private/gui/ComposerService.h b/phonelibs/android_frameworks_native/include/private/gui/ComposerService.h new file mode 100644 index 0000000000..78d52247d8 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/private/gui/ComposerService.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d53364016ad44cacd3497732df4b260334f0e56ca47e004ce35a536fd6f8098e +size 1990 diff --git a/phonelibs/android_frameworks_native/include/private/gui/LayerState.h b/phonelibs/android_frameworks_native/include/private/gui/LayerState.h new file mode 100644 index 0000000000..ac4b2b2c7f --- /dev/null +++ b/phonelibs/android_frameworks_native/include/private/gui/LayerState.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b6cb8eacc42c866c67a54dc3f5789da65c91a24cde2acdf1e3696d3ecd35a103 +size 4204 diff --git a/phonelibs/android_frameworks_native/include/private/gui/SyncFeatures.h b/phonelibs/android_frameworks_native/include/private/gui/SyncFeatures.h new file mode 100644 index 0000000000..05b8129568 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/private/gui/SyncFeatures.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6937b5d4a30a6f7a5f4974b2446919420e88c51f91c3bf3e14d6d1e6ed7715a4 +size 1351 diff --git a/phonelibs/android_frameworks_native/include/private/ui/RegionHelper.h b/phonelibs/android_frameworks_native/include/private/ui/RegionHelper.h new file mode 100644 index 0000000000..27246d390a --- /dev/null +++ b/phonelibs/android_frameworks_native/include/private/ui/RegionHelper.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa56f49a5535f64767d28baaa0ce3a0c3dcee4c56694432fce555ebbe4bd9f87 +size 9552 diff --git a/phonelibs/android_frameworks_native/include/ui/ANativeObjectBase.h b/phonelibs/android_frameworks_native/include/ui/ANativeObjectBase.h new file mode 100644 index 0000000000..30290ea82c --- /dev/null +++ b/phonelibs/android_frameworks_native/include/ui/ANativeObjectBase.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5aff514fc0b3cecb18911900d5ec7ac047eb9da9513dd4a5ffa4aa936c8de167 +size 3064 diff --git a/phonelibs/android_frameworks_native/include/ui/DisplayInfo.h b/phonelibs/android_frameworks_native/include/ui/DisplayInfo.h new file mode 100644 index 0000000000..7364bf11b6 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/ui/DisplayInfo.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3ed4a68e2e3f7d1e143ff892c354a36487829f2e5cd0ca6cbe31a5145d910a7 +size 1345 diff --git a/phonelibs/android_frameworks_native/include/ui/DisplayStatInfo.h b/phonelibs/android_frameworks_native/include/ui/DisplayStatInfo.h new file mode 100644 index 0000000000..653a93e965 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/ui/DisplayStatInfo.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1a4ef06192f7e695b4ca62ac87d87e88354dbfa29f73b892dd1514e2ecd53a45 +size 893 diff --git a/phonelibs/android_frameworks_native/include/ui/Fence.h b/phonelibs/android_frameworks_native/include/ui/Fence.h new file mode 100644 index 0000000000..47ff8b5180 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/ui/Fence.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:83950f47d787160510daf34d65874a6c0376f9b355cc001fa280cf3bcc424e31 +size 4381 diff --git a/phonelibs/android_frameworks_native/include/ui/FrameStats.h b/phonelibs/android_frameworks_native/include/ui/FrameStats.h new file mode 100644 index 0000000000..f1f38a3198 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/ui/FrameStats.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c9d33bd184ae6c2bde896a7c53fe5609b105f32395edac64220f50b0bcd9f894 +size 2057 diff --git a/phonelibs/android_frameworks_native/include/ui/FramebufferNativeWindow.h b/phonelibs/android_frameworks_native/include/ui/FramebufferNativeWindow.h new file mode 100644 index 0000000000..2df48ea646 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/ui/FramebufferNativeWindow.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f5913a5731582e5079f3c28cbcd77ea7df7f037b3325f1c0ad576ce008e2c01a +size 3350 diff --git a/phonelibs/android_frameworks_native/include/ui/GraphicBuffer.h b/phonelibs/android_frameworks_native/include/ui/GraphicBuffer.h new file mode 100644 index 0000000000..851dcdccd5 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/ui/GraphicBuffer.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d8e2a7a5b89a9e1dc724ef9c174eb2c777a3c27686d5b253831f26de6ab7328 +size 6374 diff --git a/phonelibs/android_frameworks_native/include/ui/GraphicBufferAllocator.h b/phonelibs/android_frameworks_native/include/ui/GraphicBufferAllocator.h new file mode 100644 index 0000000000..3e737361c8 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/ui/GraphicBufferAllocator.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ebfbeaab93e0417d0db2f4202c193e48cd8f6913f4e8fc22d8d58fe6a669bb85 +size 2849 diff --git a/phonelibs/android_frameworks_native/include/ui/GraphicBufferMapper.h b/phonelibs/android_frameworks_native/include/ui/GraphicBufferMapper.h new file mode 100644 index 0000000000..b142e972d3 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/ui/GraphicBufferMapper.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d99eaf58200c56bb9aa0282f941d9fbac7a576232b1c45ea5eadd7f1dc62268c +size 2270 diff --git a/phonelibs/android_frameworks_native/include/ui/PixelFormat.h b/phonelibs/android_frameworks_native/include/ui/PixelFormat.h new file mode 100644 index 0000000000..a5596ced43 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/ui/PixelFormat.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f94a56c7cc444ceb908838457034bf25371595d6aba3ecdbbbcc79f45a987179 +size 2495 diff --git a/phonelibs/android_frameworks_native/include/ui/Point.h b/phonelibs/android_frameworks_native/include/ui/Point.h new file mode 100644 index 0000000000..044e6bf32a --- /dev/null +++ b/phonelibs/android_frameworks_native/include/ui/Point.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a5c557fa1646b971b6fd5983c4d4e58f9284234982da3ed7d04b4c673a278308 +size 2242 diff --git a/phonelibs/android_frameworks_native/include/ui/Rect.h b/phonelibs/android_frameworks_native/include/ui/Rect.h new file mode 100644 index 0000000000..560952f689 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/ui/Rect.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cca36f033a93ba645cf22521ab991768ae8a537f554c7215696988da33460677 +size 5305 diff --git a/phonelibs/android_frameworks_native/include/ui/Region.h b/phonelibs/android_frameworks_native/include/ui/Region.h new file mode 100644 index 0000000000..abcefe3d67 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/ui/Region.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:41413a7e82043a2f90d9fc298845dd1da4023b7ad2966be944f04acd2a372298 +size 8283 diff --git a/phonelibs/android_frameworks_native/include/ui/TMatHelpers.h b/phonelibs/android_frameworks_native/include/ui/TMatHelpers.h new file mode 100644 index 0000000000..fe3cddced4 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/ui/TMatHelpers.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b79d2191ddcccf3a895132edebc91a17d488b5e880d62b362f07ac7f3df54f5 +size 7647 diff --git a/phonelibs/android_frameworks_native/include/ui/TVecHelpers.h b/phonelibs/android_frameworks_native/include/ui/TVecHelpers.h new file mode 100644 index 0000000000..65ac76737b --- /dev/null +++ b/phonelibs/android_frameworks_native/include/ui/TVecHelpers.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e8b0b73855db9eeebb4b7a29bf814812b6e16763aff296a9aa151f308e5ddf39 +size 12117 diff --git a/phonelibs/android_frameworks_native/include/ui/UiConfig.h b/phonelibs/android_frameworks_native/include/ui/UiConfig.h new file mode 100644 index 0000000000..0b24aa5626 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/ui/UiConfig.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:37ff2e9ce8ff9f0d4152ac0fe26fb3634d00481bee74a35ad52ce33be49ea022 +size 887 diff --git a/phonelibs/android_frameworks_native/include/ui/mat4.h b/phonelibs/android_frameworks_native/include/ui/mat4.h new file mode 100644 index 0000000000..b40222e9dd --- /dev/null +++ b/phonelibs/android_frameworks_native/include/ui/mat4.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e5c6a1fdf95bed2714b3329d2de569068ab62540f78eca4e5bcc4b57e3c398c6 +size 12210 diff --git a/phonelibs/android_frameworks_native/include/ui/vec2.h b/phonelibs/android_frameworks_native/include/ui/vec2.h new file mode 100644 index 0000000000..02b4276b07 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/ui/vec2.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cdf8a09e072a2396e4572187825989d40aaefde44f968f52608b4255c22000f0 +size 2709 diff --git a/phonelibs/android_frameworks_native/include/ui/vec3.h b/phonelibs/android_frameworks_native/include/ui/vec3.h new file mode 100644 index 0000000000..d8b1010db1 --- /dev/null +++ b/phonelibs/android_frameworks_native/include/ui/vec3.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89d1605aa5a20d42f98f9063fd5c5b0a0882c1254014d77e8e10e0fea08fd38d +size 3463 diff --git a/phonelibs/android_frameworks_native/include/ui/vec4.h b/phonelibs/android_frameworks_native/include/ui/vec4.h new file mode 100644 index 0000000000..e1bf3e5c9c --- /dev/null +++ b/phonelibs/android_frameworks_native/include/ui/vec4.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bfab3cf370101fa119b309ceef972eb43e2fdaf4621bc5ecdd0a2d6db6e3c015 +size 3738 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/activity_recognition.h b/phonelibs/android_hardware_libhardware/include/hardware/activity_recognition.h new file mode 100644 index 0000000000..30372b28f3 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/activity_recognition.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:17d8f4ac20a98be10023b8db5593f2dd9d56d0a8d9d31445826d5766af3a9537 +size 10416 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/audio.h b/phonelibs/android_hardware_libhardware/include/hardware/audio.h new file mode 100644 index 0000000000..a877ce1faf --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/audio.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cb785c697446189c9608e75fe48fb134f2486b2320654e10468debf17dd3a57d +size 28309 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/audio_alsaops.h b/phonelibs/android_hardware_libhardware/include/hardware/audio_alsaops.h new file mode 100644 index 0000000000..b7572856ab --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/audio_alsaops.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:51d2e7ed6b8adcc0a95fee6298dfd5bcebd24d14f5542f1c6857984eb96cd5b2 +size 3146 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/audio_amplifier.h b/phonelibs/android_hardware_libhardware/include/hardware/audio_amplifier.h new file mode 100644 index 0000000000..5cea91b809 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/audio_amplifier.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ced588b6eda1526f6fe3739026d2ee84fa0d88fc156f65b2bf9df8d100e59d5 +size 4571 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/audio_effect.h b/phonelibs/android_hardware_libhardware/include/hardware/audio_effect.h new file mode 100644 index 0000000000..58174d0cf7 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/audio_effect.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4f5f5ba81540b13bf50d40cd440cdded2fe8d5aca6730f21be5f406375a2bb57 +size 53231 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/audio_policy.h b/phonelibs/android_hardware_libhardware/include/hardware/audio_policy.h new file mode 100644 index 0000000000..868c904cfb --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/audio_policy.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5720e31e4036ae3d990b109b93279b852477bea065e56a83c76ccb3bc3679325 +size 19077 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/bluetooth.h b/phonelibs/android_hardware_libhardware/include/hardware/bluetooth.h new file mode 100644 index 0000000000..c867a59018 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/bluetooth.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:90eb28c9027bad6b3c95d1a79cb013c101e19f299e7531e7ce1724fe2445f4ee +size 20082 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/bt_av.h b/phonelibs/android_hardware_libhardware/include/hardware/bt_av.h new file mode 100644 index 0000000000..2d96491ba2 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/bt_av.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2c2528b1e852a730c94a2d6f0670d3820ac0f39cfa4569c1f821c5504107c86a +size 4383 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/bt_common_types.h b/phonelibs/android_hardware_libhardware/include/hardware/bt_common_types.h new file mode 100644 index 0000000000..f83fe54913 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/bt_common_types.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d9299cf15a39edc02e2f4c6c6b12b75811fac4afc63e3caac8d194a786d3d53 +size 1443 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/bt_gatt.h b/phonelibs/android_hardware_libhardware/include/hardware/bt_gatt.h new file mode 100644 index 0000000000..63e16f3ffd --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/bt_gatt.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:540e3526f82d42edac0c5bd35e718abd6bf8360f3facc8d405c2177c8f80ceb7 +size 1699 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/bt_gatt_client.h b/phonelibs/android_hardware_libhardware/include/hardware/bt_gatt_client.h new file mode 100644 index 0000000000..208f682657 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/bt_gatt_client.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae9b8107ada2b75fece62374c588823fd4c7935ac9a7aeaeef9fd17d1827873a +size 19431 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/bt_gatt_server.h b/phonelibs/android_hardware_libhardware/include/hardware/bt_gatt_server.h new file mode 100644 index 0000000000..ef8e3b2440 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/bt_gatt_server.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b912e5fa8ee5a6641b9e043e37a0dae100a6c3f8420883c67d61297b1954066f +size 7891 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/bt_gatt_types.h b/phonelibs/android_hardware_libhardware/include/hardware/bt_gatt_types.h new file mode 100644 index 0000000000..473f49d6e0 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/bt_gatt_types.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:628436ed8930670eaf54d34eaedc8550e196950f12dcf5ff7374b0464dd4141d +size 1428 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/bt_hd.h b/phonelibs/android_hardware_libhardware/include/hardware/bt_hd.h new file mode 100644 index 0000000000..b8a59a2938 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/bt_hd.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fcef6648a215835538eb35629c8cf610aa8ea8f57b5bee9ed0d73a1ca7e17a8a +size 3917 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/bt_hf.h b/phonelibs/android_hardware_libhardware/include/hardware/bt_hf.h new file mode 100644 index 0000000000..5b0613c23f --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/bt_hf.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d43a212763e3462fd685f8cfeea5a59719cea3f328d2c84f021a89a528c5b8cc +size 11329 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/bt_hf_client.h b/phonelibs/android_hardware_libhardware/include/hardware/bt_hf_client.h new file mode 100644 index 0000000000..771d303c69 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/bt_hf_client.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a14b60d2609a6952d43d17ebbe654c6a1e14b3fa93af1dcfbb5fb552445abff +size 13704 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/bt_hh.h b/phonelibs/android_hardware_libhardware/include/hardware/bt_hh.h new file mode 100644 index 0000000000..0cf9f315b4 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/bt_hh.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56673c2d2d24ac40b10cd8e0a41eb4e69e24f18357ed03246aed8cfc428f2ca0 +size 6391 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/bt_hl.h b/phonelibs/android_hardware_libhardware/include/hardware/bt_hl.h new file mode 100644 index 0000000000..c3fe09ea19 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/bt_hl.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ba98ac4813e5490e1bd2e348cab85f403c8a1b4495753959c6388707474eb0a5 +size 3705 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/bt_mce.h b/phonelibs/android_hardware_libhardware/include/hardware/bt_mce.h new file mode 100644 index 0000000000..ebea16de51 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/bt_mce.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf36960dafe4ea2c86fb6ffad7cdce574d27295c3f2a815a341a41e716d97846 +size 1617 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/bt_pan.h b/phonelibs/android_hardware_libhardware/include/hardware/bt_pan.h new file mode 100644 index 0000000000..5aac0441ed --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/bt_pan.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d3604ca3ac6138abe6233061a80787fcd293c95ce7f3d865759332e322a427f +size 2891 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/bt_rc.h b/phonelibs/android_hardware_libhardware/include/hardware/bt_rc.h new file mode 100644 index 0000000000..45a4d62d73 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/bt_rc.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7df7f0ba25b08e509153a1c05dfc5fbf89da46547b1fc210a0278b6f1289d48 +size 21337 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/bt_sdp.h b/phonelibs/android_hardware_libhardware/include/hardware/bt_sdp.h new file mode 100644 index 0000000000..04c993631a --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/bt_sdp.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6cf44476a521dd8bd6e21c6c496aa1288742a17946015c4d2b06bec961886fa7 +size 4883 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/bt_sock.h b/phonelibs/android_hardware_libhardware/include/hardware/bt_sock.h new file mode 100644 index 0000000000..4e67bc946a --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/bt_sock.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a8c9fb14baee50696cd7d91fc132c952892c41b0719c74a80dfbf67c22a8580 +size 2996 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/camera.h b/phonelibs/android_hardware_libhardware/include/hardware/camera.h new file mode 100644 index 0000000000..f0a53b710b --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/camera.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f470417bc0a35c37de55636bf27e72dab7715e069bdbb37d24a93df740a91bd8 +size 11242 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/camera2.h b/phonelibs/android_hardware_libhardware/include/hardware/camera2.h new file mode 100644 index 0000000000..bae46de0ce --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/camera2.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72e6a43c6f5bd61f0fac8f100a64d5a45aca3aaadee805b88b48c80202b3c474 +size 34282 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/camera3.h b/phonelibs/android_hardware_libhardware/include/hardware/camera3.h new file mode 100644 index 0000000000..da7c8ebde5 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/camera3.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b205d54ada9fa6352300b71cb5254de9a36fb038159d9824ce9cbb273bc97ac +size 143197 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/camera_common.h b/phonelibs/android_hardware_libhardware/include/hardware/camera_common.h new file mode 100644 index 0000000000..0fa776bb6b --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/camera_common.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:073b2a23176578f28dd6434465c401707fff007cee1d39e7901b695a77ec2c5d +size 39026 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/consumerir.h b/phonelibs/android_hardware_libhardware/include/hardware/consumerir.h new file mode 100644 index 0000000000..ca6790921c --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/consumerir.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b6428bf2b4e1efa11ba445263f54a59666b4d2c5b8de173ffa062fdfa725e9a +size 3542 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/display_defs.h b/phonelibs/android_hardware_libhardware/include/hardware/display_defs.h new file mode 100644 index 0000000000..396fbb01cd --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/display_defs.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bde82fe0d5148ac7bb2e908c9caa47ea0420f19ef9432ae148926e499c80080e +size 2577 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/fb.h b/phonelibs/android_hardware_libhardware/include/hardware/fb.h new file mode 100644 index 0000000000..2617e4b578 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/fb.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:507800f48213ae1f7d248596381c31fc1a7daa979ad89380d2ed6493a446d85e +size 5549 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/fingerprint.h b/phonelibs/android_hardware_libhardware/include/hardware/fingerprint.h new file mode 100644 index 0000000000..85b5620e77 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/fingerprint.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c49e6811b8b64e2b5d8d8d61ff23cec0113ec9181f01ea52576512263b913299 +size 11962 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/fused_location.h b/phonelibs/android_hardware_libhardware/include/hardware/fused_location.h new file mode 100644 index 0000000000..1ccbd1ef03 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/fused_location.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b1cf5ae2de801352768c688f189fbce1516475e5799388ab2d9f962dc5a3f9e +size 30967 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/gatekeeper.h b/phonelibs/android_hardware_libhardware/include/hardware/gatekeeper.h new file mode 100644 index 0000000000..6a1f36c882 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/gatekeeper.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa1dac53dee8e9ab012343a1cd7cea4d0a9c19786d0529eabc313e28954c086d +size 8011 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/gps.h b/phonelibs/android_hardware_libhardware/include/hardware/gps.h new file mode 100644 index 0000000000..38cd0c9a08 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/gps.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4df2cf269113163f1e43e1d1e544848e8a04b999f74c94695ca6eaf2afa85c49 +size 67836 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/gralloc.h b/phonelibs/android_hardware_libhardware/include/hardware/gralloc.h new file mode 100644 index 0000000000..a1f97fb026 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/gralloc.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a7e41995d44196bc5d5cd83ea896c5165fc88a851d787d5e286369f9bf21f52 +size 14872 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/hardware.h b/phonelibs/android_hardware_libhardware/include/hardware/hardware.h new file mode 100644 index 0000000000..ff17b7e65b --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/hardware.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:66eeee3d7fdab1230e0fc3fe709b40a88e1d19841fe190d57dd04667678782e3 +size 7900 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/hdmi_cec.h b/phonelibs/android_hardware_libhardware/include/hardware/hdmi_cec.h new file mode 100644 index 0000000000..cbb4ecba20 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/hdmi_cec.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a89ebf54794151b0bbd4bbe86e1d806ecf3dcadae66a92bcaed5b298e3b26e2 +size 14538 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/hw_auth_token.h b/phonelibs/android_hardware_libhardware/include/hardware/hw_auth_token.h new file mode 100644 index 0000000000..71f08028b2 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/hw_auth_token.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c680778154f23346ff2ec9af0edbf0e2d2f07ff7b84b348bc0780e1058b3461a +size 1653 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/hwcomposer.h b/phonelibs/android_hardware_libhardware/include/hardware/hwcomposer.h new file mode 100644 index 0000000000..eae282a52b --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/hwcomposer.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34d701d4324ae78278fec21ee3a474338a252ae3218b8d22e4dbf65c324f04ea +size 35393 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/hwcomposer_defs.h b/phonelibs/android_hardware_libhardware/include/hardware/hwcomposer_defs.h new file mode 100644 index 0000000000..55281f87ca --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/hwcomposer_defs.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95b1363862409edd5b6e397d27e85c71e7b2d02b5839e26d6252bc34e14ea5c2 +size 9015 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/input.h b/phonelibs/android_hardware_libhardware/include/hardware/input.h new file mode 100644 index 0000000000..73e160e1fd --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/input.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24a57558f87aa194b3b39eb7f8e1514063d24f5048b34da1a7dc66260edcaa22 +size 19412 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/keymaster0.h b/phonelibs/android_hardware_libhardware/include/hardware/keymaster0.h new file mode 100644 index 0000000000..86a7dc387f --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/keymaster0.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:171d311ac207e8f0919afc2a7881897e6d29937be7f1ac2db4ecd710284d1325 +size 5095 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/keymaster1.h b/phonelibs/android_hardware_libhardware/include/hardware/keymaster1.h new file mode 100644 index 0000000000..f63f551738 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/keymaster1.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:17b728f8184dc06fae474c11b2da64a5c47af03aa02ab1b9c1c0ccee589d580a +size 28267 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/keymaster_common.h b/phonelibs/android_hardware_libhardware/include/hardware/keymaster_common.h new file mode 100644 index 0000000000..1d88d6fba5 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/keymaster_common.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7502900ae15a0f55e9945156ee2f84716a4ae75a69d851ae1c196bdfb97d30b +size 4955 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/keymaster_defs.h b/phonelibs/android_hardware_libhardware/include/hardware/keymaster_defs.h new file mode 100644 index 0000000000..e8a82419cc --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/keymaster_defs.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8dfb69fea2ee98c2d8232c1f42a040bed300a2dd2f74771f1ab732140a5e413c +size 22010 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/lights.h b/phonelibs/android_hardware_libhardware/include/hardware/lights.h new file mode 100644 index 0000000000..9e0d26eac6 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/lights.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f29fa3b037b8dc5f923a7939e3b011f9860e271176b0776c2643b1a708a401ae +size 4416 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/local_time_hal.h b/phonelibs/android_hardware_libhardware/include/hardware/local_time_hal.h new file mode 100644 index 0000000000..4739e7f452 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/local_time_hal.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:826e6e1b87cb40a010b1009827e93cee33251770d1bbcd70e7a546dbf29e9901 +size 3849 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/memtrack.h b/phonelibs/android_hardware_libhardware/include/hardware/memtrack.h new file mode 100644 index 0000000000..7a6664081c --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/memtrack.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:190d5111194ac4fc871365dcbcc089dea2ce17bbe7f0a93d2c05ff844615a6da +size 6162 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/nfc.h b/phonelibs/android_hardware_libhardware/include/hardware/nfc.h new file mode 100644 index 0000000000..cad6cbe1d3 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/nfc.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:378f92a186935e457354fba34b4f381b175199f3ad258c44ed1e436423a16697 +size 10061 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/nfc_tag.h b/phonelibs/android_hardware_libhardware/include/hardware/nfc_tag.h new file mode 100644 index 0000000000..6a940d8161 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/nfc_tag.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:42a9d32d2a7dccc4148e98c91242a6451bb42a466daf2895bfb20dace5052893 +size 2919 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/power.h b/phonelibs/android_hardware_libhardware/include/hardware/power.h new file mode 100644 index 0000000000..4c38ad46a3 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/power.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:401ce17409bcf761ac963f8f9d54b9d1d26df73f6a4b66ed438e223dd1cef917 +size 6579 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/qemu_pipe.h b/phonelibs/android_hardware_libhardware/include/hardware/qemu_pipe.h new file mode 100644 index 0000000000..d61d8ca96c --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/qemu_pipe.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:37b3043a9cf447656b2d5a2d5cf2f8397f7248f2fef0ad5e1d87032eba4931d7 +size 2837 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/qemud.h b/phonelibs/android_hardware_libhardware/include/hardware/qemud.h new file mode 100644 index 0000000000..ee6a04241a --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/qemud.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa1174926f4316838fc87bdad7cca864570de8aad4906c5fe1f324f5385e78be +size 4260 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/radio.h b/phonelibs/android_hardware_libhardware/include/hardware/radio.h new file mode 100644 index 0000000000..2add85077c --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/radio.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0106a08095506dfefdc828b435fc20f7ac4f958942639246d2e979690c8d5b4 +size 10615 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/sensors.h b/phonelibs/android_hardware_libhardware/include/hardware/sensors.h new file mode 100644 index 0000000000..915551171b --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/sensors.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da5fd6117d9d4724a15e41e9ce2d25b98546d20dbae9016f5b22b03276707216 +size 40148 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/sound_trigger.h b/phonelibs/android_hardware_libhardware/include/hardware/sound_trigger.h new file mode 100644 index 0000000000..7aef197606 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/sound_trigger.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9256a4e56a9c6955f41aaaae0c648d721d3b07c1304e854c51a8f16f5eae019d +size 4952 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/tv_input.h b/phonelibs/android_hardware_libhardware/include/hardware/tv_input.h new file mode 100644 index 0000000000..e072f6da59 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/tv_input.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa3e81c7f05c07efd4653615138eabfdd2f85c1ae112af527088f7b133a540a2 +size 13839 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/vibrator.h b/phonelibs/android_hardware_libhardware/include/hardware/vibrator.h new file mode 100644 index 0000000000..9b869d072f --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/vibrator.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d4083d6b4d7386e1c4135edc761a06d996101917e3e808ee05f73eb734968879 +size 2301 diff --git a/phonelibs/android_hardware_libhardware/include/hardware/wipower.h b/phonelibs/android_hardware_libhardware/include/hardware/wipower.h new file mode 100644 index 0000000000..36cd3ecbb6 --- /dev/null +++ b/phonelibs/android_hardware_libhardware/include/hardware/wipower.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72d28227594e70c0e04f84a3e0aa7ab0916c2b36b2aa57a1cbd88f56b3a65905 +size 3697 diff --git a/phonelibs/android_system_core/include/cutils/android_reboot.h b/phonelibs/android_system_core/include/cutils/android_reboot.h new file mode 100644 index 0000000000..c0baaff176 --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/android_reboot.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:17c7b38e3a99a7248ae698128e97217c7372cae4d10777d5c59113c39dd07c6c +size 1157 diff --git a/phonelibs/android_system_core/include/cutils/aref.h b/phonelibs/android_system_core/include/cutils/aref.h new file mode 100644 index 0000000000..7aedab2466 --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/aref.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:733314eb8710f2b10ec6b9b6cbbefeb2d4477b9e1d2de3ab4871450b762a6353 +size 1330 diff --git a/phonelibs/android_system_core/include/cutils/ashmem.h b/phonelibs/android_system_core/include/cutils/ashmem.h new file mode 100644 index 0000000000..10c63e9283 --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/ashmem.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5059e52cce7437c3755e9d0081e764536f9ea707b89c9504f23e50a88ad4edbd +size 1121 diff --git a/phonelibs/android_system_core/include/cutils/atomic.h b/phonelibs/android_system_core/include/cutils/atomic.h new file mode 100644 index 0000000000..b555b57b8a --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/atomic.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:611e35ef97f30b9cc06cce86b3675eba988d8121b631c179a3c4b7de67225ba6 +size 9190 diff --git a/phonelibs/android_system_core/include/cutils/bitops.h b/phonelibs/android_system_core/include/cutils/bitops.h new file mode 100644 index 0000000000..f4faf57551 --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/bitops.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0982fd74a6e397df0486e396cd5d433d5cc4f7b3099052774efacbd2eaba4cb2 +size 3036 diff --git a/phonelibs/android_system_core/include/cutils/compiler.h b/phonelibs/android_system_core/include/cutils/compiler.h new file mode 100644 index 0000000000..666e1a6d5d --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/compiler.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b544a1f41e0ec7592773af661cd21ba53c3e1165dd4a67c32d6cd9d79cf2abd6 +size 1359 diff --git a/phonelibs/android_system_core/include/cutils/config_utils.h b/phonelibs/android_system_core/include/cutils/config_utils.h new file mode 100644 index 0000000000..1b5b54287c --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/config_utils.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8bc869b58adeeac00fd53cf106b636dba8c84e70839409c48ac960ecffb25e62 +size 1767 diff --git a/phonelibs/android_system_core/include/cutils/debugger.h b/phonelibs/android_system_core/include/cutils/debugger.h new file mode 100644 index 0000000000..5846837e4f --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/debugger.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:11f5bc0654d1be976ad54008e21ad86e64d020742ee3aa4e059ee27e6ec05327 +size 2665 diff --git a/phonelibs/android_system_core/include/cutils/fs.h b/phonelibs/android_system_core/include/cutils/fs.h new file mode 100644 index 0000000000..ecbea4a2d0 --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/fs.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:43cd6a0eb6599c49577e1c1ba0d09b5a3aaadfc205d0ccfe7dec7096b598ab37 +size 2171 diff --git a/phonelibs/android_system_core/include/cutils/hashmap.h b/phonelibs/android_system_core/include/cutils/hashmap.h new file mode 100644 index 0000000000..ce7837a1fd --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/hashmap.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:abecb831fb515639c5694176c8d9a7364bfbb404f9bdff419e63f36579839d55 +size 3565 diff --git a/phonelibs/android_system_core/include/cutils/iosched_policy.h b/phonelibs/android_system_core/include/cutils/iosched_policy.h new file mode 100644 index 0000000000..2926e47d22 --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/iosched_policy.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:307715ef3cb18baed73f99f94666a91409085eed95d85092d660c6c66c5b8017 +size 1118 diff --git a/phonelibs/android_system_core/include/cutils/jstring.h b/phonelibs/android_system_core/include/cutils/jstring.h new file mode 100644 index 0000000000..50791b99a6 --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/jstring.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f7d12cdbde8674e902638233bdf030e9e1a234b27ce0bf92dd9f77572e1ccb25 +size 1453 diff --git a/phonelibs/android_system_core/include/cutils/klog.h b/phonelibs/android_system_core/include/cutils/klog.h new file mode 100644 index 0000000000..8ce59b1388 --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/klog.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b020a20ad5a3201e299266071242a11f346b7cfb895be1f624bc2e4f208916c +size 1699 diff --git a/phonelibs/android_system_core/include/cutils/list.h b/phonelibs/android_system_core/include/cutils/list.h new file mode 100644 index 0000000000..f79991b587 --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/list.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4241e5a97932744016a604517af4cbdd838e33d821b94feb4ea074aa9a8efd7f +size 2222 diff --git a/phonelibs/android_system_core/include/cutils/log.h b/phonelibs/android_system_core/include/cutils/log.h new file mode 100644 index 0000000000..ac230950ea --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/log.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:73abb3a501626b16b0dc2eb77947aec6ab27f294f478b5f3828e4eada2dd601e +size 21 diff --git a/phonelibs/android_system_core/include/cutils/memory.h b/phonelibs/android_system_core/include/cutils/memory.h new file mode 100644 index 0000000000..9b99efd9b3 --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/memory.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d186468e962d2d51ec60e3fca2e536766df2a5dc76f463a2eded303b624d2857 +size 1273 diff --git a/phonelibs/android_system_core/include/cutils/misc.h b/phonelibs/android_system_core/include/cutils/misc.h new file mode 100644 index 0000000000..367477c5d9 --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/misc.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d8c23c79390c7cb394f7020cffa159bc09a316534f36b0f5fce24a3e905cee79 +size 1248 diff --git a/phonelibs/android_system_core/include/cutils/multiuser.h b/phonelibs/android_system_core/include/cutils/multiuser.h new file mode 100644 index 0000000000..fb9b33db52 --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/multiuser.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dbb04e6750c99ac25fa058be11bc2d607326cd006b973c9ec1e2950631f7dfd7 +size 1109 diff --git a/phonelibs/android_system_core/include/cutils/native_handle.h b/phonelibs/android_system_core/include/cutils/native_handle.h new file mode 100644 index 0000000000..adb58a095a --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/native_handle.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc40921bf7e369619be1fe67b8b4e5280bcc0b402c71107050f8546bb4c745e7 +size 1857 diff --git a/phonelibs/android_system_core/include/cutils/open_memstream.h b/phonelibs/android_system_core/include/cutils/open_memstream.h new file mode 100644 index 0000000000..e2325eb565 --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/open_memstream.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c7e08577ae535b86cd624dc8a0060d8fe232852c42cee4faf4c6147075ee519b +size 921 diff --git a/phonelibs/android_system_core/include/cutils/partition_utils.h b/phonelibs/android_system_core/include/cutils/partition_utils.h new file mode 100644 index 0000000000..dafc9ba243 --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/partition_utils.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1d353727a39f7cd171e61c072593bfd0157289a0e6e1f1e8d7a261ae5a3d30ce +size 798 diff --git a/phonelibs/android_system_core/include/cutils/process_name.h b/phonelibs/android_system_core/include/cutils/process_name.h new file mode 100644 index 0000000000..7c7107ce0a --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/process_name.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b7bac6bff4f1b93ee6e0f79877db7e88bf7942ac810d92c41354a1809af922ce +size 1061 diff --git a/phonelibs/android_system_core/include/cutils/properties.h b/phonelibs/android_system_core/include/cutils/properties.h new file mode 100644 index 0000000000..67113224a3 --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/properties.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5b84c76c1842b53e8d106443fe931a548e80fd3b46e30cf486902259b89cd592 +size 4733 diff --git a/phonelibs/android_system_core/include/cutils/qtaguid.h b/phonelibs/android_system_core/include/cutils/qtaguid.h new file mode 100644 index 0000000000..b8c1f911ae --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/qtaguid.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da38a1a213489fe66acf7e3459ebeee526289689d3dd27de80678bfc6fb3bfed +size 1832 diff --git a/phonelibs/android_system_core/include/cutils/record_stream.h b/phonelibs/android_system_core/include/cutils/record_stream.h new file mode 100644 index 0000000000..dbf13c273a --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/record_stream.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:784a3cfdbf1a238f64afba4064c25a9d64aad1b8357c5eb9ced3891746b1393c +size 1170 diff --git a/phonelibs/android_system_core/include/cutils/sched_policy.h b/phonelibs/android_system_core/include/cutils/sched_policy.h new file mode 100644 index 0000000000..9bd071be94 --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/sched_policy.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ee56780796dfcd9d13f3b7e234427e3ce5290adbf3682ae81b47358c6ca2df7 +size 2196 diff --git a/phonelibs/android_system_core/include/cutils/sockets.h b/phonelibs/android_system_core/include/cutils/sockets.h new file mode 100644 index 0000000000..fc0e4dcbcc --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/sockets.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4aecb53859f8b0f9dc6abe3801987a7eed4b27eadffe6941c9e41ba3fbd6bc4b +size 3193 diff --git a/phonelibs/android_system_core/include/cutils/str_parms.h b/phonelibs/android_system_core/include/cutils/str_parms.h new file mode 100644 index 0000000000..8c1ec008c3 --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/str_parms.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f7d0b83838c2526b15b624435ff37088aa43bcd584d1597470e2acfa9fdc3f97 +size 2178 diff --git a/phonelibs/android_system_core/include/cutils/threads.h b/phonelibs/android_system_core/include/cutils/threads.h new file mode 100644 index 0000000000..273a9325c8 --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/threads.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb610409f27e0bb892540eb5021246e84444534a2e4cb45395bbc42cb6a790f0 +size 4090 diff --git a/phonelibs/android_system_core/include/cutils/trace.h b/phonelibs/android_system_core/include/cutils/trace.h new file mode 100644 index 0000000000..d939db496d --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/trace.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b2f0950ce5ae439cad0a93e79f9bcfd88cec0771103e27bbba9b9011ebb6f76 +size 8720 diff --git a/phonelibs/android_system_core/include/cutils/uevent.h b/phonelibs/android_system_core/include/cutils/uevent.h new file mode 100644 index 0000000000..0b3e0138b4 --- /dev/null +++ b/phonelibs/android_system_core/include/cutils/uevent.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a21fe897406d8c017fe936aaa98c6ae7bf61487588c769b5066be920dfc9a2c +size 1147 diff --git a/phonelibs/android_system_core/include/log/event_tag_map.h b/phonelibs/android_system_core/include/log/event_tag_map.h new file mode 100644 index 0000000000..2ddfe07e36 --- /dev/null +++ b/phonelibs/android_system_core/include/log/event_tag_map.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e40c3cc062f575a365fadb42846e4d0e892006c4f8a29db00b6a466e2b6f766d +size 1295 diff --git a/phonelibs/android_system_core/include/log/log.h b/phonelibs/android_system_core/include/log/log.h new file mode 100644 index 0000000000..1b95ca3e59 --- /dev/null +++ b/phonelibs/android_system_core/include/log/log.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91a13601e9b9b7ca6c6df88240758d86cb4abee4f532da1a5f8e207e5e6be249 +size 18074 diff --git a/phonelibs/android_system_core/include/log/log_read.h b/phonelibs/android_system_core/include/log/log_read.h new file mode 100644 index 0000000000..924e5b27a4 --- /dev/null +++ b/phonelibs/android_system_core/include/log/log_read.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98d6ed253ed708b0a75a4aaf34e3347f17f6b73ff96480b53172c1a7e0d38cd9 +size 4680 diff --git a/phonelibs/android_system_core/include/log/logd.h b/phonelibs/android_system_core/include/log/logd.h new file mode 100644 index 0000000000..dad1fa1f40 --- /dev/null +++ b/phonelibs/android_system_core/include/log/logd.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9c3d926a3aab7880ef8b8a1fc107b95b44ee21a65c152892c41bdf2d1e02991b +size 1379 diff --git a/phonelibs/android_system_core/include/log/logger.h b/phonelibs/android_system_core/include/log/logger.h new file mode 100644 index 0000000000..19150877d1 --- /dev/null +++ b/phonelibs/android_system_core/include/log/logger.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d69bda2e03827e4845fd80c1619340931b4c54cea48bad02aac6adee8c3f6b77 +size 6606 diff --git a/phonelibs/android_system_core/include/log/logprint.h b/phonelibs/android_system_core/include/log/logprint.h new file mode 100644 index 0000000000..e21eed2c59 --- /dev/null +++ b/phonelibs/android_system_core/include/log/logprint.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8975fe804b68dfbefdc5894046901496bd5db5f47d06440d41f6aaab3fd4471 +size 4073 diff --git a/phonelibs/android_system_core/include/log/uio.h b/phonelibs/android_system_core/include/log/uio.h new file mode 100644 index 0000000000..3729ee43ff --- /dev/null +++ b/phonelibs/android_system_core/include/log/uio.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c8c6265e30f22109fbbf6c3d6be2523e84117926fefc1e7aa191481be539496d +size 1105 diff --git a/phonelibs/android_system_core/include/system/camera.h b/phonelibs/android_system_core/include/system/camera.h new file mode 100644 index 0000000000..4e9bb2f6cd --- /dev/null +++ b/phonelibs/android_system_core/include/system/camera.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:170aec5a348e467eeec475723182074521463c2f4b0fa05fce58c389c96f33be +size 13812 diff --git a/phonelibs/android_system_core/include/system/graphics.h b/phonelibs/android_system_core/include/system/graphics.h new file mode 100644 index 0000000000..4c62588f07 --- /dev/null +++ b/phonelibs/android_system_core/include/system/graphics.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b30a70783d284a62d56088b99e4972b2ad476e246513e0d93c204cc71564247e +size 28797 diff --git a/phonelibs/android_system_core/include/system/radio.h b/phonelibs/android_system_core/include/system/radio.h new file mode 100644 index 0000000000..aaf8ecef15 --- /dev/null +++ b/phonelibs/android_system_core/include/system/radio.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89fd5f4349c28a266110d6c96024893b142d25e36f3f4c2782d856ba408aee0a +size 9997 diff --git a/phonelibs/android_system_core/include/system/thread_defs.h b/phonelibs/android_system_core/include/system/thread_defs.h new file mode 100644 index 0000000000..cabec899e9 --- /dev/null +++ b/phonelibs/android_system_core/include/system/thread_defs.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:42d3f3b29752d188bcb6ad7cdcad6dfa780b0d8a729b01fd376398fa32f016a7 +size 2611 diff --git a/phonelibs/android_system_core/include/system/window.h b/phonelibs/android_system_core/include/system/window.h new file mode 100644 index 0000000000..6ba036867f --- /dev/null +++ b/phonelibs/android_system_core/include/system/window.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57b7afa4f517fc0a32c0fc3649c62a5de81763ceea522282bb2c463ce8352f90 +size 37196 diff --git a/phonelibs/android_system_core/include/utils/AndroidThreads.h b/phonelibs/android_system_core/include/utils/AndroidThreads.h new file mode 100644 index 0000000000..9ce2c934e1 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/AndroidThreads.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bdf79e8acd396f3a9a2b13677ea142b2ebc8ce997adbd7bf091f900197e5be7c +size 4741 diff --git a/phonelibs/android_system_core/include/utils/Atomic.h b/phonelibs/android_system_core/include/utils/Atomic.h new file mode 100644 index 0000000000..f7df4bdc85 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/Atomic.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6742f9e50936527069462141814f29c10607ed790aa54315f87780a14e4ed36b +size 745 diff --git a/phonelibs/android_system_core/include/utils/BasicHashtable.h b/phonelibs/android_system_core/include/utils/BasicHashtable.h new file mode 100644 index 0000000000..1f9c9a8190 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/BasicHashtable.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:63332373f845bac22231c6e3596732fcadadefe062af4a44f1ab57f819708a76 +size 15872 diff --git a/phonelibs/android_system_core/include/utils/BitSet.h b/phonelibs/android_system_core/include/utils/BitSet.h new file mode 100644 index 0000000000..fa867bf597 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/BitSet.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d1f5f7eb69ab84f5c30b0a0befdd12ddb83d3f0f6297629ceac2d4597277ebe9 +size 10934 diff --git a/phonelibs/android_system_core/include/utils/BlobCache.h b/phonelibs/android_system_core/include/utils/BlobCache.h new file mode 100644 index 0000000000..598386d203 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/BlobCache.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e5059c3271c2b5df2e2ce772b5a2fa73498e120c366b7bd636b1e354169585e4 +size 9653 diff --git a/phonelibs/android_system_core/include/utils/ByteOrder.h b/phonelibs/android_system_core/include/utils/ByteOrder.h new file mode 100644 index 0000000000..e95f7ab7df --- /dev/null +++ b/phonelibs/android_system_core/include/utils/ByteOrder.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b9b8839fcbc538292424efe6138b48342405c943e8f6e51ab563b988ae8f5f73 +size 2171 diff --git a/phonelibs/android_system_core/include/utils/CallStack.h b/phonelibs/android_system_core/include/utils/CallStack.h new file mode 100644 index 0000000000..471a91194f --- /dev/null +++ b/phonelibs/android_system_core/include/utils/CallStack.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:18d8b6d380b3ad3ce01434ce8bff4a54df69747d6548effb2747a33b733c4cbe +size 2391 diff --git a/phonelibs/android_system_core/include/utils/Compat.h b/phonelibs/android_system_core/include/utils/Compat.h new file mode 100644 index 0000000000..9479ea7f83 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/Compat.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6941e32b204c91fa1a687567b7d7f02aa1e7d9a991c8b31876b958c6e5886481 +size 2132 diff --git a/phonelibs/android_system_core/include/utils/Condition.h b/phonelibs/android_system_core/include/utils/Condition.h new file mode 100644 index 0000000000..1d9b5e30cb --- /dev/null +++ b/phonelibs/android_system_core/include/utils/Condition.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5fd68654a647b0a34057c91774536aa8663e94161c36484fce8b6601c967a2db +size 4825 diff --git a/phonelibs/android_system_core/include/utils/Debug.h b/phonelibs/android_system_core/include/utils/Debug.h new file mode 100644 index 0000000000..2b5d66a821 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/Debug.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7ea7cae93880ddeca9e966fc9a67e790b764a0bfebe3bf231941651fe33526dc +size 1630 diff --git a/phonelibs/android_system_core/include/utils/Endian.h b/phonelibs/android_system_core/include/utils/Endian.h new file mode 100644 index 0000000000..951ee55bf0 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/Endian.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d8249ec3b5c3f8f2a158f746602bdf521b85dba9b9fe3bb13f4bf01ef691f16 +size 926 diff --git a/phonelibs/android_system_core/include/utils/Errors.h b/phonelibs/android_system_core/include/utils/Errors.h new file mode 100644 index 0000000000..3c8b5b5b70 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/Errors.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e16f6257b3251e1ef16abf5cbbbb24b6841bb9e905068b47e505f40fa61fee4c +size 2557 diff --git a/phonelibs/android_system_core/include/utils/FileMap.h b/phonelibs/android_system_core/include/utils/FileMap.h new file mode 100644 index 0000000000..2a688f4a22 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/FileMap.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:24e4b5b320a7d7adc79a5eec039d7510c0fd4042f6af936b7793ab2fd9929fe5 +size 3608 diff --git a/phonelibs/android_system_core/include/utils/Flattenable.h b/phonelibs/android_system_core/include/utils/Flattenable.h new file mode 100644 index 0000000000..8221fd51a1 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/Flattenable.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f2b92a49f5332fe29941cc79091c8b95df5682e046b3bc5d5be80a57af0c8625 +size 6566 diff --git a/phonelibs/android_system_core/include/utils/Functor.h b/phonelibs/android_system_core/include/utils/Functor.h new file mode 100644 index 0000000000..04c6f1d806 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/Functor.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa8361dd92102ce2bea388b64bbb309ff251b4d42894dbd7f1444276801cc734 +size 931 diff --git a/phonelibs/android_system_core/include/utils/JenkinsHash.h b/phonelibs/android_system_core/include/utils/JenkinsHash.h new file mode 100644 index 0000000000..ed9ee9e5cb --- /dev/null +++ b/phonelibs/android_system_core/include/utils/JenkinsHash.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0facdedb5b85b2eac4b46a1fc9072a147a2d7f3b32a33f43138215643996e1ac +size 1491 diff --git a/phonelibs/android_system_core/include/utils/KeyedVector.h b/phonelibs/android_system_core/include/utils/KeyedVector.h new file mode 100644 index 0000000000..f030804b13 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/KeyedVector.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d68b26a35e2084575a5253706bcd3c843884c3eab02cc9b0f4b7b5ecb6a2dd8 +size 7265 diff --git a/phonelibs/android_system_core/include/utils/LinearTransform.h b/phonelibs/android_system_core/include/utils/LinearTransform.h new file mode 100644 index 0000000000..f88eb527c2 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/LinearTransform.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:15eab5170ff65dc7b63560a018e3194fc291b4a6f9bbfe51f734d598063331a5 +size 1950 diff --git a/phonelibs/android_system_core/include/utils/List.h b/phonelibs/android_system_core/include/utils/List.h new file mode 100644 index 0000000000..db0cadfcef --- /dev/null +++ b/phonelibs/android_system_core/include/utils/List.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b8c75af7e7136f4c7e7fe6e3495e570a0c0911d79185f8e3a8a6eb10c0825cd +size 10250 diff --git a/phonelibs/android_system_core/include/utils/Log.h b/phonelibs/android_system_core/include/utils/Log.h new file mode 100644 index 0000000000..27018f53b8 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/Log.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2c08767cc89633244e345b6cf78551e9a1c2401c63b7e4fb24f8bf966425152d +size 2140 diff --git a/phonelibs/android_system_core/include/utils/Looper.h b/phonelibs/android_system_core/include/utils/Looper.h new file mode 100644 index 0000000000..a3cc8eea59 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/Looper.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa82e3bc54051d9efea28be7c2cfe318c06251464f82890bdb2d576b60772698 +size 16733 diff --git a/phonelibs/android_system_core/include/utils/LruCache.h b/phonelibs/android_system_core/include/utils/LruCache.h new file mode 100644 index 0000000000..5fb4366eb0 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/LruCache.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b631a13973c33b8553359b523d5b5d01bb89645f15bf04bea4767d0bb685070 +size 6685 diff --git a/phonelibs/android_system_core/include/utils/Mutex.h b/phonelibs/android_system_core/include/utils/Mutex.h new file mode 100644 index 0000000000..69fb93c726 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/Mutex.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ce6d3a499c7f6580708ce399457cd95da5e830be266a3b0171656fd1ebc37b49 +size 4530 diff --git a/phonelibs/android_system_core/include/utils/NativeHandle.h b/phonelibs/android_system_core/include/utils/NativeHandle.h new file mode 100644 index 0000000000..4abf7121f1 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/NativeHandle.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eda690f06d92d6b2f2e9cf9dc8e2b7cda9b5eeaa23233d485f0382c0b4a779a7 +size 1681 diff --git a/phonelibs/android_system_core/include/utils/Printer.h b/phonelibs/android_system_core/include/utils/Printer.h new file mode 100644 index 0000000000..50e1d2b8ce --- /dev/null +++ b/phonelibs/android_system_core/include/utils/Printer.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca9661912f114d3b38eb3df97addad70fdb3ef08983eaab520e25f33390cef5a +size 3805 diff --git a/phonelibs/android_system_core/include/utils/ProcessCallStack.h b/phonelibs/android_system_core/include/utils/ProcessCallStack.h new file mode 100644 index 0000000000..c569dd0512 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/ProcessCallStack.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8422f951e6c839a0f7b0834f336b5c721e274240f201a35707f5436565c3e743 +size 2436 diff --git a/phonelibs/android_system_core/include/utils/PropertyMap.h b/phonelibs/android_system_core/include/utils/PropertyMap.h new file mode 100644 index 0000000000..b77fe0cd3a --- /dev/null +++ b/phonelibs/android_system_core/include/utils/PropertyMap.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:199d6f35a7f6b70b9b6258c1a78d7671b9253a53171f2a624943851344c427c5 +size 3448 diff --git a/phonelibs/android_system_core/include/utils/RWLock.h b/phonelibs/android_system_core/include/utils/RWLock.h new file mode 100644 index 0000000000..678c106996 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/RWLock.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0da151d0e1d925be96ff81f11ba029739c23808ec0b4cf4f24c29e896539dc7 +size 3512 diff --git a/phonelibs/android_system_core/include/utils/RefBase.h b/phonelibs/android_system_core/include/utils/RefBase.h new file mode 100644 index 0000000000..4eb9183601 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/RefBase.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c95ab1cbaaf3287d76b567b19bee1285c8eb9b2993d454b3b535cd01057ad42 +size 16216 diff --git a/phonelibs/android_system_core/include/utils/SharedBuffer.h b/phonelibs/android_system_core/include/utils/SharedBuffer.h new file mode 100644 index 0000000000..ab54b59ad3 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/SharedBuffer.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2d7a3909b2e60b2e2a1d3ba7ef64f3a31dd23d6d7257c1bac952fd94644a6d4 +size 4334 diff --git a/phonelibs/android_system_core/include/utils/Singleton.h b/phonelibs/android_system_core/include/utils/Singleton.h new file mode 100644 index 0000000000..a91ef51635 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/Singleton.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:74ad3ec6a21575c5f4fa29179a7a43bf92506b74e40f20f8b5415e9d0b24200d +size 2345 diff --git a/phonelibs/android_system_core/include/utils/SortedVector.h b/phonelibs/android_system_core/include/utils/SortedVector.h new file mode 100644 index 0000000000..6676962a5b --- /dev/null +++ b/phonelibs/android_system_core/include/utils/SortedVector.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e9a306e7e6b5c338a2c221516d9dc0b92ef29753a75f8b7dcc7463126f53b99a +size 9447 diff --git a/phonelibs/android_system_core/include/utils/StopWatch.h b/phonelibs/android_system_core/include/utils/StopWatch.h new file mode 100644 index 0000000000..c3e3b30e65 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/StopWatch.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c15a0b6823c800d56797b9e0eddfbe45e93ffb9442d822e27dff7998d342e7e1 +size 1599 diff --git a/phonelibs/android_system_core/include/utils/String16.h b/phonelibs/android_system_core/include/utils/String16.h new file mode 100644 index 0000000000..ba870aa042 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/String16.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:802e81fb64d94a43bb1475b431b1657e7c6f580990d82b113769e0620309c78b +size 7890 diff --git a/phonelibs/android_system_core/include/utils/String8.h b/phonelibs/android_system_core/include/utils/String8.h new file mode 100644 index 0000000000..02374bf018 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/String8.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b99516e7575092489777f9132b06a7f20cfb35e23a51831649ed144db6347bc7 +size 12597 diff --git a/phonelibs/android_system_core/include/utils/StrongPointer.h b/phonelibs/android_system_core/include/utils/StrongPointer.h new file mode 100644 index 0000000000..9eb8afe3b8 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/StrongPointer.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7e833ca130de3524ecae17f74dd274c46e06c814f64afbbf32bbc1ca1aac790b +size 5604 diff --git a/phonelibs/android_system_core/include/utils/SystemClock.h b/phonelibs/android_system_core/include/utils/SystemClock.h new file mode 100644 index 0000000000..b03ad72246 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/SystemClock.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:39b93032b3bac489a600787d96a50bac0f78af33444243264cb529a5b534f107 +size 906 diff --git a/phonelibs/android_system_core/include/utils/Thread.h b/phonelibs/android_system_core/include/utils/Thread.h new file mode 100644 index 0000000000..4cd3b4a474 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/Thread.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a65e7abb33d0a5709303aedd1be894938f4d9dd3f84d54290bc67e29a550de00 +size 4267 diff --git a/phonelibs/android_system_core/include/utils/ThreadDefs.h b/phonelibs/android_system_core/include/utils/ThreadDefs.h new file mode 100644 index 0000000000..c2ec9c3a6e --- /dev/null +++ b/phonelibs/android_system_core/include/utils/ThreadDefs.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49c748917857ccbfb01adc192369328f75eb97ba92ce88dd1ce21bff02a61dc3 +size 2299 diff --git a/phonelibs/android_system_core/include/utils/Timers.h b/phonelibs/android_system_core/include/utils/Timers.h new file mode 100644 index 0000000000..d185fafb72 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/Timers.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2bb6416ee7ca1ad5ec2f8abc11b9b18b4c1432e5ea0e2de6e8a7fa712a97688e +size 3564 diff --git a/phonelibs/android_system_core/include/utils/Tokenizer.h b/phonelibs/android_system_core/include/utils/Tokenizer.h new file mode 100644 index 0000000000..1eb70d9264 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/Tokenizer.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8df5e4dfbe6fb974a7131ce6705a6fffad737e58222d3da907aa468a1fda13ec +size 3906 diff --git a/phonelibs/android_system_core/include/utils/Trace.h b/phonelibs/android_system_core/include/utils/Trace.h new file mode 100644 index 0000000000..5a9efc287a --- /dev/null +++ b/phonelibs/android_system_core/include/utils/Trace.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:02f9fd82c46511ebd4a2efa64c336a4811ad8b34982f739944ee15e251f4abc6 +size 1718 diff --git a/phonelibs/android_system_core/include/utils/TypeHelpers.h b/phonelibs/android_system_core/include/utils/TypeHelpers.h new file mode 100644 index 0000000000..752dc6068a --- /dev/null +++ b/phonelibs/android_system_core/include/utils/TypeHelpers.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c88e1e955cb8a34f06b8164b9d3eb8dfc2d067b286614da7107527870691a6f8 +size 9146 diff --git a/phonelibs/android_system_core/include/utils/Unicode.h b/phonelibs/android_system_core/include/utils/Unicode.h new file mode 100644 index 0000000000..690708b2c1 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/Unicode.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:17ec95a8d422948c90d08a42e862491f23f26d70c8cd565b06b737d26cb72f27 +size 6294 diff --git a/phonelibs/android_system_core/include/utils/Vector.h b/phonelibs/android_system_core/include/utils/Vector.h new file mode 100644 index 0000000000..f5d644698b --- /dev/null +++ b/phonelibs/android_system_core/include/utils/Vector.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b8443fdb99ee4f6c321e7dfb52e0dedb95f17759a969a6df9c56d467c65478e1 +size 13846 diff --git a/phonelibs/android_system_core/include/utils/VectorImpl.h b/phonelibs/android_system_core/include/utils/VectorImpl.h new file mode 100644 index 0000000000..150685c417 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/VectorImpl.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf1a313a1a21064845e10050ed01c34e6b3eb9fd8bc478708f0a1cd5653ce266 +size 7409 diff --git a/phonelibs/android_system_core/include/utils/ashmem.h b/phonelibs/android_system_core/include/utils/ashmem.h new file mode 100644 index 0000000000..a488fcc7a9 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/ashmem.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:64a86e1e730b2fb1e74efe49301acc2a21a4cfd5db410f0f8f30f35e4c5670ec +size 1281 diff --git a/phonelibs/android_system_core/include/utils/misc.h b/phonelibs/android_system_core/include/utils/misc.h new file mode 100644 index 0000000000..a6961998cc --- /dev/null +++ b/phonelibs/android_system_core/include/utils/misc.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f72739ffe69e99be6013692d49453fadf700aef949144f16c69dc7fffc87d1f8 +size 1105 diff --git a/phonelibs/android_system_core/include/utils/threads.h b/phonelibs/android_system_core/include/utils/threads.h new file mode 100644 index 0000000000..ae89472ee4 --- /dev/null +++ b/phonelibs/android_system_core/include/utils/threads.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5041ef681318648bbe35dee6c703823a693270c104f3592a9ce7bdcb956dfbeb +size 1048 diff --git a/phonelibs/capnp-c/include/capnp_c.h b/phonelibs/capnp-c/include/capnp_c.h deleted file mode 100644 index c55bb8eade..0000000000 --- a/phonelibs/capnp-c/include/capnp_c.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6e15562406dbfd526977b4cfadbbfa78d5753be37602da9548c8b892bbd05a88 -size 13180 diff --git a/phonelibs/capnp-cpp/aarch64/bin/capnp b/phonelibs/capnp-cpp/aarch64/bin/capnp deleted file mode 100755 index b274e77c8f..0000000000 --- a/phonelibs/capnp-cpp/aarch64/bin/capnp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2e587ed5f1a993dbd555d4feb52fefbf16f7ed5400513af2b70923d37a09ec7b -size 1525512 diff --git a/phonelibs/capnp-cpp/aarch64/bin/capnpc b/phonelibs/capnp-cpp/aarch64/bin/capnpc deleted file mode 120000 index 5668473f09..0000000000 --- a/phonelibs/capnp-cpp/aarch64/bin/capnpc +++ /dev/null @@ -1 +0,0 @@ -capnp \ No newline at end of file diff --git a/phonelibs/capnp-cpp/aarch64/bin/capnpc-c++ b/phonelibs/capnp-cpp/aarch64/bin/capnpc-c++ deleted file mode 100755 index c1c2bafdb4..0000000000 --- a/phonelibs/capnp-cpp/aarch64/bin/capnpc-c++ +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fd881b90aad022217a9bd9fd3edbdea6a4d849b9a4e784125f3a0bf34c5eaccc -size 1464976 diff --git a/phonelibs/capnp-cpp/aarch64/bin/capnpc-capnp b/phonelibs/capnp-cpp/aarch64/bin/capnpc-capnp deleted file mode 100755 index 6a4b207874..0000000000 --- a/phonelibs/capnp-cpp/aarch64/bin/capnpc-capnp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:acd14ceea3fa99e320562186fc150b3942402dd200d0a191c548df24a8b5f226 -size 824160 diff --git a/phonelibs/capnp-cpp/aarch64/lib/libcapnp.a b/phonelibs/capnp-cpp/aarch64/lib/libcapnp.a deleted file mode 100644 index 1827daf5b6..0000000000 --- a/phonelibs/capnp-cpp/aarch64/lib/libcapnp.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:64c52189119abd30d20ffad1989a99a6576048d3b5aeb6051cf6c55fd3d62fe0 -size 3376746 diff --git a/phonelibs/capnp-cpp/aarch64/lib/libcapnpc.a b/phonelibs/capnp-cpp/aarch64/lib/libcapnpc.a deleted file mode 100644 index 9363eb4919..0000000000 --- a/phonelibs/capnp-cpp/aarch64/lib/libcapnpc.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:58d733153edbb86b565785e1a29dae5f90816b18bc0d59908c40109f8838961b -size 7093966 diff --git a/phonelibs/capnp-cpp/aarch64/lib/libkj.a b/phonelibs/capnp-cpp/aarch64/lib/libkj.a deleted file mode 100644 index 154bf32b2a..0000000000 --- a/phonelibs/capnp-cpp/aarch64/lib/libkj.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:15365c956d5b90120a65429c0abae5601ef3f26f5c2800751ae3ac0dc5cfb44b -size 1318656 diff --git a/phonelibs/capnp-cpp/include/capnp/any.h b/phonelibs/capnp-cpp/include/capnp/any.h deleted file mode 100644 index cca5df0876..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/any.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b0ff4d65e7df901b76fa6417b56d2a878397f977cf2f2547c41560cbc00ad149 -size 34795 diff --git a/phonelibs/capnp-cpp/include/capnp/blob.h b/phonelibs/capnp-cpp/include/capnp/blob.h deleted file mode 100644 index 155442ed12..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/blob.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c1145a302e778a9bd6e6a34f96a85472818008a1d0fbbdb57d7c0659903ca41f -size 8513 diff --git a/phonelibs/capnp-cpp/include/capnp/c++.capnp b/phonelibs/capnp-cpp/include/capnp/c++.capnp deleted file mode 100644 index 477363e268..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/c++.capnp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fb306076cd38c27af1aed20fac6395e9a46fbe5b5df6a248b5f1b6845a079c44 -size 1354 diff --git a/phonelibs/capnp-cpp/include/capnp/c++.capnp.h b/phonelibs/capnp-cpp/include/capnp/c++.capnp.h deleted file mode 100644 index 8917e07dae..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/c++.capnp.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:01537f9ce3cbc843d6aab018195e02df268b9d16c15e5958cc367c6e47fc1589 -size 848 diff --git a/phonelibs/capnp-cpp/include/capnp/c.capnp b/phonelibs/capnp-cpp/include/capnp/c.capnp deleted file mode 100644 index 58b2a4a9cd..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/c.capnp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:953a999f02ff20c196fc62e60e80a45244d275195a7f956ddd3dbb49ae20f99b -size 1814 diff --git a/phonelibs/capnp-cpp/include/capnp/capability.h b/phonelibs/capnp-cpp/include/capnp/capability.h deleted file mode 100644 index f6b68ca694..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/capability.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8c86744ebbbb5c8c4d24bb6647d3c938d8672ef2d2c4ad498a7cb6de3d9cbf88 -size 37616 diff --git a/phonelibs/capnp-cpp/include/capnp/common.h b/phonelibs/capnp-cpp/include/capnp/common.h deleted file mode 100644 index 455e265052..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/common.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3529d6562cbc98627d662198d1ea5d8fefb67c1a2f6255c6be9bb16c09bfa04b -size 26891 diff --git a/phonelibs/capnp-cpp/include/capnp/compat/json.capnp.h b/phonelibs/capnp-cpp/include/capnp/compat/json.capnp.h deleted file mode 100644 index 5a5483b006..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/compat/json.capnp.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7bafe76fab6debe5a33dcf3b397df7be233391d97a6d81dc9ab189948b5f96d0 -size 33921 diff --git a/phonelibs/capnp-cpp/include/capnp/compat/json.h b/phonelibs/capnp-cpp/include/capnp/compat/json.h deleted file mode 100644 index 57f95be39c..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/compat/json.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4db4d9b9b5595676fc019a866394d48534fc3aca368fa6726293fc29e06d455a -size 21485 diff --git a/phonelibs/capnp-cpp/include/capnp/dynamic.h b/phonelibs/capnp-cpp/include/capnp/dynamic.h deleted file mode 100644 index bba4db3eb7..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/dynamic.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2d469ca634e1431d985c8022d0fe67e7fe79051a2d807d04186211d986a2b1ab -size 60368 diff --git a/phonelibs/capnp-cpp/include/capnp/endian.h b/phonelibs/capnp-cpp/include/capnp/endian.h deleted file mode 100644 index 64ca2b7857..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/endian.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c4535f1c350d8bfb590a1e1b9abd36d843eeadd414d981bf43b7bc23ce43de1c -size 9394 diff --git a/phonelibs/capnp-cpp/include/capnp/ez-rpc.h b/phonelibs/capnp-cpp/include/capnp/ez-rpc.h deleted file mode 100644 index 84165b09b2..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/ez-rpc.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:760907776eb6f2726749e53468c54982d8df009e6cec7e64b04f4caf6732987d -size 11855 diff --git a/phonelibs/capnp-cpp/include/capnp/generated-header-support.h b/phonelibs/capnp-cpp/include/capnp/generated-header-support.h deleted file mode 100644 index 15203ab202..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/generated-header-support.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4d48f9ac2426974e5877d8ff9d5f6d146aeec105eacccfbe18ccbb044ed7c183 -size 13507 diff --git a/phonelibs/capnp-cpp/include/capnp/json.capnp b/phonelibs/capnp-cpp/include/capnp/json.capnp deleted file mode 100644 index 315defe86e..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/json.capnp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8aa1ea3348a869f18a9c21e8f63862b9b416de1542b06648a1303f26cc1ca05d -size 2190 diff --git a/phonelibs/capnp-cpp/include/capnp/layout.h b/phonelibs/capnp-cpp/include/capnp/layout.h deleted file mode 100644 index 26203846f4..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/layout.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:db08dd4c3450e7428d6a5eec162b51df1fc15cab762596c5960c5a5cc1a4370b -size 52052 diff --git a/phonelibs/capnp-cpp/include/capnp/list.h b/phonelibs/capnp-cpp/include/capnp/list.h deleted file mode 100644 index 16fb66bccb..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/list.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:47c91e34cfb431cec9a2e2422cc693e25eccbce2e6b71aab2815aae4282e463f -size 20983 diff --git a/phonelibs/capnp-cpp/include/capnp/membrane.h b/phonelibs/capnp-cpp/include/capnp/membrane.h deleted file mode 100644 index 480497adbb..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/membrane.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f8ba2016719f2bd2d67848347f72ac1fba39b7a414089d1787a64f2a7b55afa4 -size 10900 diff --git a/phonelibs/capnp-cpp/include/capnp/message.h b/phonelibs/capnp-cpp/include/capnp/message.h deleted file mode 100644 index 62df767be0..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/message.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:018dc0f00ee97fce180084584f210a4965cc15342fa8e4ed7496ae7be3ffc259 -size 23593 diff --git a/phonelibs/capnp-cpp/include/capnp/orphan.h b/phonelibs/capnp-cpp/include/capnp/orphan.h deleted file mode 100644 index 083e69f4a9..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/orphan.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e1d4690b2fce91b7089d98346ef5455ebe6e621cc21760c27ae1c3197294334e -size 17874 diff --git a/phonelibs/capnp-cpp/include/capnp/persistent.capnp b/phonelibs/capnp-cpp/include/capnp/persistent.capnp deleted file mode 100644 index e376bc40fe..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/persistent.capnp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ea0fa94250ff56111f9fcccb2a560be29ff9c7c9068dd4e19705a4af37e257cf -size 8273 diff --git a/phonelibs/capnp-cpp/include/capnp/persistent.capnp.h b/phonelibs/capnp-cpp/include/capnp/persistent.capnp.h deleted file mode 100644 index 82c4eb0a10..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/persistent.capnp.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:250ef0923e0256e7651c9451c5cb79424078677ea84902b13381e3596e7a4cc4 -size 71148 diff --git a/phonelibs/capnp-cpp/include/capnp/pointer-helpers.h b/phonelibs/capnp-cpp/include/capnp/pointer-helpers.h deleted file mode 100644 index 5ee2905b84..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/pointer-helpers.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7b963933d154d9114ee6f9cf36b3023f5b99c8d96c078d95bcbdd19e656946d2 -size 6512 diff --git a/phonelibs/capnp-cpp/include/capnp/pretty-print.h b/phonelibs/capnp-cpp/include/capnp/pretty-print.h deleted file mode 100644 index eac4e2ecbd..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/pretty-print.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2f5427abfa4583dbb0841c275b9852ba2ee20dfb5ef6648c9871b6283adcc580 -size 2051 diff --git a/phonelibs/capnp-cpp/include/capnp/raw-schema.h b/phonelibs/capnp-cpp/include/capnp/raw-schema.h deleted file mode 100644 index 65ba404083..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/raw-schema.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5d2653f6a2fd04a79d600cfe626880e8bad0062557c9b1baecb1439269538dc9 -size 8912 diff --git a/phonelibs/capnp-cpp/include/capnp/rpc-prelude.h b/phonelibs/capnp-cpp/include/capnp/rpc-prelude.h deleted file mode 100644 index 792a95e993..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/rpc-prelude.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f97348f4aa486a38cd1be005f478a8e53601bfa47abf500592c6ef0c12b146df -size 4897 diff --git a/phonelibs/capnp-cpp/include/capnp/rpc-twoparty.capnp b/phonelibs/capnp-cpp/include/capnp/rpc-twoparty.capnp deleted file mode 100644 index 676be810cc..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/rpc-twoparty.capnp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e0401c91f90ae1283ce040537c88554a34f03491114c1393b535ffbbbe70741e -size 9716 diff --git a/phonelibs/capnp-cpp/include/capnp/rpc-twoparty.capnp.h b/phonelibs/capnp-cpp/include/capnp/rpc-twoparty.capnp.h deleted file mode 100644 index 4b425d2709..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/rpc-twoparty.capnp.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a80c2d746de0097a2d6193906d74b52f10587ab94a64830f41e232b33d87de91 -size 21232 diff --git a/phonelibs/capnp-cpp/include/capnp/rpc-twoparty.h b/phonelibs/capnp-cpp/include/capnp/rpc-twoparty.h deleted file mode 100644 index 81f8934818..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/rpc-twoparty.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:40d54e34d92e3ac1a6ab42a84fbeb8c7020989c994615ecd2d30ac689ccb2c2d -size 6252 diff --git a/phonelibs/capnp-cpp/include/capnp/rpc.capnp b/phonelibs/capnp-cpp/include/capnp/rpc.capnp deleted file mode 100644 index 71b1a1301f..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/rpc.capnp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4a20003d7fac60638fa0c16b1001caab7cac6389f1926114d50d5e975448ed12 -size 76462 diff --git a/phonelibs/capnp-cpp/include/capnp/rpc.capnp.h b/phonelibs/capnp-cpp/include/capnp/rpc.capnp.h deleted file mode 100644 index 112f04bec9..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/rpc.capnp.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:71c38f5c4e2b2dad42991286c68e57c2993b3403e497c8f011aaea18e4729a33 -size 185146 diff --git a/phonelibs/capnp-cpp/include/capnp/rpc.h b/phonelibs/capnp-cpp/include/capnp/rpc.h deleted file mode 100644 index 8983b7c08f..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/rpc.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d2f5e6fb81e016db2689070c465181c717452b246f6dee9c70c8cd9f2bcc20ee -size 26602 diff --git a/phonelibs/capnp-cpp/include/capnp/schema-lite.h b/phonelibs/capnp-cpp/include/capnp/schema-lite.h deleted file mode 100644 index 4ed6796818..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/schema-lite.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6226f1bcee096d3e13d9c2159ffe9695ca27c1a132a1702d84c08ee06e67e482 -size 2038 diff --git a/phonelibs/capnp-cpp/include/capnp/schema-loader.h b/phonelibs/capnp-cpp/include/capnp/schema-loader.h deleted file mode 100644 index 19017572bd..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/schema-loader.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:466d1e6a87a86d6ac3b24edb02e095cab2ac0ef36dcdcaddd2cb8bdba9166a33 -size 8681 diff --git a/phonelibs/capnp-cpp/include/capnp/schema-parser.h b/phonelibs/capnp-cpp/include/capnp/schema-parser.h deleted file mode 100644 index 5dfb150fb9..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/schema-parser.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4fc427bf35d1b4081587017a1172549bc8115fb6717fd801d922a45629867e40 -size 8616 diff --git a/phonelibs/capnp-cpp/include/capnp/schema.capnp b/phonelibs/capnp-cpp/include/capnp/schema.capnp deleted file mode 100644 index daa9528c56..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/schema.capnp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a8b4277ba9964831af0125e37f238f07a5db588549231b28be0fd4e2219a10e4 -size 16976 diff --git a/phonelibs/capnp-cpp/include/capnp/schema.capnp.h b/phonelibs/capnp-cpp/include/capnp/schema.capnp.h deleted file mode 100644 index 8207493922..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/schema.capnp.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:aa22dc6f17e5df03c24012d7c4d054e88395f5b88770cf8ef79c3324e5145408 -size 291672 diff --git a/phonelibs/capnp-cpp/include/capnp/schema.h b/phonelibs/capnp-cpp/include/capnp/schema.h deleted file mode 100644 index 0d897e029e..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/schema.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:261583f20eee704197b3aebd9da00225a7a437f3352ced3db45bfee7f2ecdb99 -size 36242 diff --git a/phonelibs/capnp-cpp/include/capnp/serialize-async.h b/phonelibs/capnp-cpp/include/capnp/serialize-async.h deleted file mode 100644 index 80f55e37a3..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/serialize-async.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e2b4777da2f36a2a51f784fcb4f7023679a4ec2272958e69de25e4014c4c4875 -size 2770 diff --git a/phonelibs/capnp-cpp/include/capnp/serialize-packed.h b/phonelibs/capnp-cpp/include/capnp/serialize-packed.h deleted file mode 100644 index e3e1200db7..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/serialize-packed.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fccc4e53638192db7688def8f4892d4bbcb0518c909dc34ebc3596b13f60b917 -size 5404 diff --git a/phonelibs/capnp-cpp/include/capnp/serialize-text.h b/phonelibs/capnp-cpp/include/capnp/serialize-text.h deleted file mode 100644 index 2a9c79e094..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/serialize-text.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d14d2e00e5b73422e2516256eddbccaa3c4f52aabd4201c5df1702822508893a -size 3753 diff --git a/phonelibs/capnp-cpp/include/capnp/serialize.h b/phonelibs/capnp-cpp/include/capnp/serialize.h deleted file mode 100644 index 2a8c71e95d..0000000000 --- a/phonelibs/capnp-cpp/include/capnp/serialize.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:962a36c62a361b1f2252f8facb89d1290cd7196287e7cdb50a042f7477aa16d5 -size 11669 diff --git a/phonelibs/capnp-cpp/include/kj/arena.h b/phonelibs/capnp-cpp/include/kj/arena.h deleted file mode 100644 index ec6a967405..0000000000 --- a/phonelibs/capnp-cpp/include/kj/arena.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7e3f65eb614ab0308dabaaeb3fe1907f33feb96fb4aa9d659db08ba7849d4273 -size 8300 diff --git a/phonelibs/capnp-cpp/include/kj/array.h b/phonelibs/capnp-cpp/include/kj/array.h deleted file mode 100644 index ffa1b06685..0000000000 --- a/phonelibs/capnp-cpp/include/kj/array.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e82ba9225547df2cb1b43e7c6025b3d876c4b5737936942aa17ec80c70451a40 -size 27097 diff --git a/phonelibs/capnp-cpp/include/kj/async-inl.h b/phonelibs/capnp-cpp/include/kj/async-inl.h deleted file mode 100644 index ef6809c937..0000000000 --- a/phonelibs/capnp-cpp/include/kj/async-inl.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7b6086c88ec56a3f294f6845b2fb493613b424042922c10b3c3f3f9d67f64961 -size 35246 diff --git a/phonelibs/capnp-cpp/include/kj/async-io.h b/phonelibs/capnp-cpp/include/kj/async-io.h deleted file mode 100644 index c5a4efa12d..0000000000 --- a/phonelibs/capnp-cpp/include/kj/async-io.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fedee3753645e2a932d9c40b27bd85b41ce29719e3d67464486a4c02f21afcbc -size 24313 diff --git a/phonelibs/capnp-cpp/include/kj/async-prelude.h b/phonelibs/capnp-cpp/include/kj/async-prelude.h deleted file mode 100644 index 3b9af36eb3..0000000000 --- a/phonelibs/capnp-cpp/include/kj/async-prelude.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9b0025cef7a323237540707cd6b74210681f8c599e368a1d735b7ec2e65102d3 -size 6589 diff --git a/phonelibs/capnp-cpp/include/kj/async-unix.h b/phonelibs/capnp-cpp/include/kj/async-unix.h deleted file mode 100644 index 03ba6e2faf..0000000000 --- a/phonelibs/capnp-cpp/include/kj/async-unix.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b57458b516e1e2a8ecb139313dffb80ae6ed652388a48af5d3a0f60a1630c59d -size 12133 diff --git a/phonelibs/capnp-cpp/include/kj/async-win32.h b/phonelibs/capnp-cpp/include/kj/async-win32.h deleted file mode 100644 index bf15ea3003..0000000000 --- a/phonelibs/capnp-cpp/include/kj/async-win32.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5434475aff2d6c1f25f333bd3324ac375c2fa1ebe9d2ee8aebbd29d757c9a43c -size 10110 diff --git a/phonelibs/capnp-cpp/include/kj/async.h b/phonelibs/capnp-cpp/include/kj/async.h deleted file mode 100644 index 1f79a276f9..0000000000 --- a/phonelibs/capnp-cpp/include/kj/async.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a7f78bbe2b4a8c15734e181af93f0f600d8010da3dd5c0d349cbee6de81c3c13 -size 33142 diff --git a/phonelibs/capnp-cpp/include/kj/common.h b/phonelibs/capnp-cpp/include/kj/common.h deleted file mode 100644 index a746cd1ce1..0000000000 --- a/phonelibs/capnp-cpp/include/kj/common.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8c0f8086465f312154d7def64da15cf790b0da847e811f59cc27860c1b35fb5e -size 51151 diff --git a/phonelibs/capnp-cpp/include/kj/compat/gtest.h b/phonelibs/capnp-cpp/include/kj/compat/gtest.h deleted file mode 100644 index 66d6ffae40..0000000000 --- a/phonelibs/capnp-cpp/include/kj/compat/gtest.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b3a3d94ac3206c4ac6e3554efa66d532fc97866cbf219624dd4afd567b9164f7 -size 4582 diff --git a/phonelibs/capnp-cpp/include/kj/compat/http.h b/phonelibs/capnp-cpp/include/kj/compat/http.h deleted file mode 100644 index f726ef9982..0000000000 --- a/phonelibs/capnp-cpp/include/kj/compat/http.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ce0327b2ab11618d2b302f33e1c937caf8a692f5adeae849cce8faa1e3948832 -size 24896 diff --git a/phonelibs/capnp-cpp/include/kj/debug.h b/phonelibs/capnp-cpp/include/kj/debug.h deleted file mode 100644 index a13f71c72d..0000000000 --- a/phonelibs/capnp-cpp/include/kj/debug.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7c7f8abd1e5b2194de42bc38bf958463dc4dfe51d24464a098e1161a3e7c45b9 -size 23227 diff --git a/phonelibs/capnp-cpp/include/kj/exception.h b/phonelibs/capnp-cpp/include/kj/exception.h deleted file mode 100644 index e11fca1bb4..0000000000 --- a/phonelibs/capnp-cpp/include/kj/exception.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0586183e1044baa98113ad3927e9b44b5b4a4159efec88978b03db2ef059031a -size 14802 diff --git a/phonelibs/capnp-cpp/include/kj/function.h b/phonelibs/capnp-cpp/include/kj/function.h deleted file mode 100644 index 0442a7f75d..0000000000 --- a/phonelibs/capnp-cpp/include/kj/function.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:aff9075eeb57a3646beaee526010541f17bf062ed1a7116e00970d641dc94f91 -size 9236 diff --git a/phonelibs/capnp-cpp/include/kj/io.h b/phonelibs/capnp-cpp/include/kj/io.h deleted file mode 100644 index b7a23da4b2..0000000000 --- a/phonelibs/capnp-cpp/include/kj/io.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4f38ef4fc1da744d81f1160a86a9e33dc6ce2506dc6aa511a378fae89ba3757c -size 15536 diff --git a/phonelibs/capnp-cpp/include/kj/main.h b/phonelibs/capnp-cpp/include/kj/main.h deleted file mode 100644 index 04cbbc54be..0000000000 --- a/phonelibs/capnp-cpp/include/kj/main.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:54e56fab508478c4fc043f1880da0e187187845723ec3c252d222f43cb41da80 -size 19767 diff --git a/phonelibs/capnp-cpp/include/kj/memory.h b/phonelibs/capnp-cpp/include/kj/memory.h deleted file mode 100644 index 4879c4b968..0000000000 --- a/phonelibs/capnp-cpp/include/kj/memory.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0dd04feded21ac677cfa8f91aadc76a351832aeb4d8d0e87248be16cbe02b93f -size 13633 diff --git a/phonelibs/capnp-cpp/include/kj/mutex.h b/phonelibs/capnp-cpp/include/kj/mutex.h deleted file mode 100644 index d618ff525c..0000000000 --- a/phonelibs/capnp-cpp/include/kj/mutex.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:77b917aab3bb44db463251934a2daccf8dd6474f20e87d4fbf34869513687863 -size 11678 diff --git a/phonelibs/capnp-cpp/include/kj/one-of.h b/phonelibs/capnp-cpp/include/kj/one-of.h deleted file mode 100644 index 0aa6949a21..0000000000 --- a/phonelibs/capnp-cpp/include/kj/one-of.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6d81a72d3717c27463b769dd5fc161314035849507faab76d89f0714d388f533 -size 5067 diff --git a/phonelibs/capnp-cpp/include/kj/parse/char.h b/phonelibs/capnp-cpp/include/kj/parse/char.h deleted file mode 100644 index b902784c4a..0000000000 --- a/phonelibs/capnp-cpp/include/kj/parse/char.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:178045b2c75b7ccf200e0f2007a1a16e2eba005b03913db412f64a31df197d57 -size 12126 diff --git a/phonelibs/capnp-cpp/include/kj/parse/common.h b/phonelibs/capnp-cpp/include/kj/parse/common.h deleted file mode 100644 index e0cd482284..0000000000 --- a/phonelibs/capnp-cpp/include/kj/parse/common.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:17a4c71083f75467fa32ec9daeb6bb6fb4888899e598d712abee75f20fc42491 -size 26546 diff --git a/phonelibs/capnp-cpp/include/kj/refcount.h b/phonelibs/capnp-cpp/include/kj/refcount.h deleted file mode 100644 index a5ff18dd89..0000000000 --- a/phonelibs/capnp-cpp/include/kj/refcount.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fda6fb25d8f6d4dd9b8ffc9de0bc62dd5aa9adbbd47f84e8554b79d26dd30fbc -size 4634 diff --git a/phonelibs/capnp-cpp/include/kj/std/iostream.h b/phonelibs/capnp-cpp/include/kj/std/iostream.h deleted file mode 100644 index a87d92a2a5..0000000000 --- a/phonelibs/capnp-cpp/include/kj/std/iostream.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bfd7565b95e0eb3cc8f8306e6f5b21aa0ffd34f14914cb066fafee4677e6990b -size 2685 diff --git a/phonelibs/capnp-cpp/include/kj/string-tree.h b/phonelibs/capnp-cpp/include/kj/string-tree.h deleted file mode 100644 index 4fcef2197e..0000000000 --- a/phonelibs/capnp-cpp/include/kj/string-tree.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1088bc02dc394cfea38b7205063fb9ac60335bb90061d45f426183a3cc60b04f -size 8157 diff --git a/phonelibs/capnp-cpp/include/kj/string.h b/phonelibs/capnp-cpp/include/kj/string.h deleted file mode 100644 index 62229d3cfa..0000000000 --- a/phonelibs/capnp-cpp/include/kj/string.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e9f8bcdf110c2f1aeb629ad9ba987fc51d6cb2fdbc48d9e3895ad830cbcc406b -size 21880 diff --git a/phonelibs/capnp-cpp/include/kj/test.h b/phonelibs/capnp-cpp/include/kj/test.h deleted file mode 100644 index efd6a12cb5..0000000000 --- a/phonelibs/capnp-cpp/include/kj/test.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:30d2355dc0012ae7ccb6b61271ca893907f722a5d23e1858d5ecb0d6f78dda1e -size 5532 diff --git a/phonelibs/capnp-cpp/include/kj/thread.h b/phonelibs/capnp-cpp/include/kj/thread.h deleted file mode 100644 index bfdeeeb42d..0000000000 --- a/phonelibs/capnp-cpp/include/kj/thread.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e10dd5c854d2e85b1201b8bb974f0effbebf9361b92e719cdce2cf7504fa80d6 -size 2475 diff --git a/phonelibs/capnp-cpp/include/kj/threadlocal.h b/phonelibs/capnp-cpp/include/kj/threadlocal.h deleted file mode 100644 index 37108b4e94..0000000000 --- a/phonelibs/capnp-cpp/include/kj/threadlocal.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:778e4bffe5e104c2ff1383c4fbad81489e694113295078b7ce9327ee91c15a26 -size 4759 diff --git a/phonelibs/capnp-cpp/include/kj/time.h b/phonelibs/capnp-cpp/include/kj/time.h deleted file mode 100644 index 5cfa9e39a8..0000000000 --- a/phonelibs/capnp-cpp/include/kj/time.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:da50a9f371cf0837af711b9d8131d96d11cd1b5269040a7cf3bc0ceaa7534a26 -size 6652 diff --git a/phonelibs/capnp-cpp/include/kj/tuple.h b/phonelibs/capnp-cpp/include/kj/tuple.h deleted file mode 100644 index f405b804a2..0000000000 --- a/phonelibs/capnp-cpp/include/kj/tuple.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b3292c28e17721868e1caa1ca9b6694aa2e105efbc44dec51a101f34e357b1ae -size 15713 diff --git a/phonelibs/capnp-cpp/include/kj/units.h b/phonelibs/capnp-cpp/include/kj/units.h deleted file mode 100644 index 7ad4a20bc3..0000000000 --- a/phonelibs/capnp-cpp/include/kj/units.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:31ba4f0ddbf586003f98ecfe9e198afab8a20b22566e00b321dcb8c6c22519f2 -size 45634 diff --git a/phonelibs/capnp-cpp/include/kj/vector.h b/phonelibs/capnp-cpp/include/kj/vector.h deleted file mode 100644 index 81e65dab66..0000000000 --- a/phonelibs/capnp-cpp/include/kj/vector.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ea68079d96d8e0bab678426caadcc078975dc9f2221d241419516418638e0c68 -size 4688 diff --git a/phonelibs/capnp-cpp/include/kj/windows-sanity.h b/phonelibs/capnp-cpp/include/kj/windows-sanity.h deleted file mode 100644 index 9b224b42c6..0000000000 --- a/phonelibs/capnp-cpp/include/kj/windows-sanity.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0c4dd9c5cdcf3e0affe9bd3ea2cbe1d4a7e3214c99482eade5564a27d86e6e53 -size 1604 diff --git a/phonelibs/install_capnp.sh b/phonelibs/install_capnp.sh index be0aed74f1..689bbe990f 100755 --- a/phonelibs/install_capnp.sh +++ b/phonelibs/install_capnp.sh @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:028ce694fe58a051bdc31e915da55fda733acf0ade0ad9da8ffd23deea27f941 -size 1707 +oid sha256:00856ae66b1bfc134dc3835ad7ece80d1b0cf8668a82a70d5ded8a8e06c8ca1e +size 1758 diff --git a/phonelibs/json11/json11.o b/phonelibs/json11/json11.o index e38132b585..e360eb1b47 100644 --- a/phonelibs/json11/json11.o +++ b/phonelibs/json11/json11.o @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a6514cc6b5b61b83c14dee636771f7747117d7a9704658762ccb98c73a7ff5fe -size 142824 +oid sha256:a48d23553ecb597c79b880e12398c968a984c9775bd9abfbb2686b7c1ee230c9 +size 134368 diff --git a/phonelibs/linux/include/linux/ion.h b/phonelibs/linux/include/linux/ion.h new file mode 100644 index 0000000000..329c732caf --- /dev/null +++ b/phonelibs/linux/include/linux/ion.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e88cc361789ea2095a8ef8593baed5695c0f92856807251b6c513e43ebd1b69f +size 2586 diff --git a/phonelibs/openmax/include/OMX_Audio.h b/phonelibs/openmax/include/OMX_Audio.h new file mode 100644 index 0000000000..16297a7d18 --- /dev/null +++ b/phonelibs/openmax/include/OMX_Audio.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a79a84bd1d498a6bb4f2be0c72bfc31e9549509953027ed06daed495f8603200 +size 77117 diff --git a/phonelibs/openmax/include/OMX_Component.h b/phonelibs/openmax/include/OMX_Component.h new file mode 100644 index 0000000000..ab10ce9fe5 --- /dev/null +++ b/phonelibs/openmax/include/OMX_Component.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1511c182af584c7605682d1b9cba4949cdb99169a78730a677ea1a9e985f778b +size 23869 diff --git a/phonelibs/openmax/include/OMX_ContentPipe.h b/phonelibs/openmax/include/OMX_ContentPipe.h new file mode 100644 index 0000000000..476a531cf9 --- /dev/null +++ b/phonelibs/openmax/include/OMX_ContentPipe.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d83ce4f1313757b4db838a9122d99048176e7edeb104e52b90ff9d52b8955ec +size 9223 diff --git a/phonelibs/openmax/include/OMX_Core.h b/phonelibs/openmax/include/OMX_Core.h new file mode 100644 index 0000000000..de90bb68f1 --- /dev/null +++ b/phonelibs/openmax/include/OMX_Core.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:759bccdbaa1c6afa189e5a528dd75602763c4a77ff14b581e9178c387342dff1 +size 70034 diff --git a/phonelibs/openmax/include/OMX_CoreExt.h b/phonelibs/openmax/include/OMX_CoreExt.h new file mode 100644 index 0000000000..6c2a64b6ed --- /dev/null +++ b/phonelibs/openmax/include/OMX_CoreExt.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd5af1232e30e239bf82f42322ac623e116272a2ba7968a0050a7602c417790e +size 2593 diff --git a/phonelibs/openmax/include/OMX_IVCommon.h b/phonelibs/openmax/include/OMX_IVCommon.h new file mode 100644 index 0000000000..90f7c313c2 --- /dev/null +++ b/phonelibs/openmax/include/OMX_IVCommon.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:242b6d449fadd52df0ed1935e3803ac8e12b48e19a466968a27901fa52714fd4 +size 33141 diff --git a/phonelibs/openmax/include/OMX_Image.h b/phonelibs/openmax/include/OMX_Image.h new file mode 100644 index 0000000000..4c1bffa7e6 --- /dev/null +++ b/phonelibs/openmax/include/OMX_Image.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a3f1a490953a4453347fb2c99dc4d9dcc9f3418202942aef6aaeb5e7b65dde7 +size 13267 diff --git a/phonelibs/openmax/include/OMX_Index.h b/phonelibs/openmax/include/OMX_Index.h new file mode 100644 index 0000000000..48b2b359e7 --- /dev/null +++ b/phonelibs/openmax/include/OMX_Index.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f4e3deb7606f867f327e8d6f2ef6345187db712fedd43e9f1b34b37b923485c4 +size 17977 diff --git a/phonelibs/openmax/include/OMX_IndexExt.h b/phonelibs/openmax/include/OMX_IndexExt.h new file mode 100644 index 0000000000..26016e06ef --- /dev/null +++ b/phonelibs/openmax/include/OMX_IndexExt.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa8479b1ffa0a9357e32a162052901c6277fcc1f78b4c7f7503f145e4990f5bc +size 4239 diff --git a/phonelibs/openmax/include/OMX_Other.h b/phonelibs/openmax/include/OMX_Other.h new file mode 100644 index 0000000000..c76b1342db --- /dev/null +++ b/phonelibs/openmax/include/OMX_Other.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a20c53c71ba440d6f1293625a79377dbc2f688c6ec7e81560790acdc134191e5 +size 17932 diff --git a/phonelibs/openmax/include/OMX_QCOMExtns.h b/phonelibs/openmax/include/OMX_QCOMExtns.h new file mode 100644 index 0000000000..f12088fde4 --- /dev/null +++ b/phonelibs/openmax/include/OMX_QCOMExtns.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a1d61fb5649544c473a98bf955b4bea2e51ea7a10841732640b27ac2e16e7280 +size 67453 diff --git a/phonelibs/openmax/include/OMX_Skype_VideoExtensions.h b/phonelibs/openmax/include/OMX_Skype_VideoExtensions.h new file mode 100644 index 0000000000..1a925614b9 --- /dev/null +++ b/phonelibs/openmax/include/OMX_Skype_VideoExtensions.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb0b58976083bf927080d193d896396735171b479bc2efd9ac6d7453284a1c33 +size 4729 diff --git a/phonelibs/openmax/include/OMX_Types.h b/phonelibs/openmax/include/OMX_Types.h new file mode 100644 index 0000000000..076f33a0d7 --- /dev/null +++ b/phonelibs/openmax/include/OMX_Types.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff5592a4396b7f1331e39f886429eda3d57eb424ce1aea0ffe7d86c15236bad5 +size 12542 diff --git a/phonelibs/openmax/include/OMX_Video.h b/phonelibs/openmax/include/OMX_Video.h new file mode 100644 index 0000000000..bce363ebf1 --- /dev/null +++ b/phonelibs/openmax/include/OMX_Video.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e019a14f0204796d40cc20b869ad654ea3a643349a8cc591bd5178e7090fc8d +size 44945 diff --git a/phonelibs/openmax/include/OMX_VideoExt.h b/phonelibs/openmax/include/OMX_VideoExt.h new file mode 100644 index 0000000000..2dd7b63770 --- /dev/null +++ b/phonelibs/openmax/include/OMX_VideoExt.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e685e54fc7058a951b91339df4622f6cfdd42f9e0c7811b38bb97b412f84803a +size 5628 diff --git a/phonelibs/snpe/x86_64-linux-clang/libSNPE.so b/phonelibs/snpe/x86_64-linux-clang/libSNPE.so new file mode 100644 index 0000000000..52d5f5197a --- /dev/null +++ b/phonelibs/snpe/x86_64-linux-clang/libSNPE.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:497d74dbb73862e4564cf210e117b2efa7a571a373aec5998c650b698e769eb0 +size 4221408 diff --git a/phonelibs/snpe/x86_64-linux-clang/libsymphony-cpu.so b/phonelibs/snpe/x86_64-linux-clang/libsymphony-cpu.so new file mode 100755 index 0000000000..59be1c12f5 --- /dev/null +++ b/phonelibs/snpe/x86_64-linux-clang/libsymphony-cpu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e66426d0d7c4550f77ec4e8576d0b8db9eeacb988e1ec3de0d970f38e7e7c40 +size 492416 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/anchor.h b/phonelibs/yaml-cpp/include/yaml-cpp/anchor.h new file mode 100644 index 0000000000..6bbc640d2b --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/anchor.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fec843fad67c0a1b6496992bbdc660cde5e3f59322feebe75b3fe38d48c87d18 +size 501 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/binary.h b/phonelibs/yaml-cpp/include/yaml-cpp/binary.h new file mode 100644 index 0000000000..cca9e88d84 --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/binary.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:75ce59a8b5b9c8cb68b615fcaf7865b581d68590b7aef5b6899ac8be81d49a7e +size 1938 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/contrib/anchordict.h b/phonelibs/yaml-cpp/include/yaml-cpp/contrib/anchordict.h new file mode 100644 index 0000000000..f8e9593af0 --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/contrib/anchordict.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d609c65fc3167c01117ff1b5635b94921b35b64ef4aa641e4d27ce1f4d360f0 +size 1009 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/contrib/graphbuilder.h b/phonelibs/yaml-cpp/include/yaml-cpp/contrib/graphbuilder.h new file mode 100644 index 0000000000..1138b6d7c2 --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/contrib/graphbuilder.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2891b581780c0e82e247080a416873d142a810faf92c8f29652b316616646351 +size 5258 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/dll.h b/phonelibs/yaml-cpp/include/yaml-cpp/dll.h new file mode 100644 index 0000000000..af8a07dd27 --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/dll.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:703de0a2406b0206ce265e6a4f7de4813796eaccdcf7f47dda326bd8dba673f5 +size 1481 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/emitfromevents.h b/phonelibs/yaml-cpp/include/yaml-cpp/emitfromevents.h new file mode 100644 index 0000000000..fd8ec59bab --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/emitfromevents.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c2427ca0e369c8a5c597960ee14e5cfdce91ab601753fe53fe311a1863720850 +size 1670 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/emitter.h b/phonelibs/yaml-cpp/include/yaml-cpp/emitter.h new file mode 100644 index 0000000000..3d9ede6e46 --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/emitter.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:33bd4b8e9ea8d2634bf1f52d267c524f3f05e7faabf4ab787b65eb00d361870a +size 7146 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/emitterdef.h b/phonelibs/yaml-cpp/include/yaml-cpp/emitterdef.h new file mode 100644 index 0000000000..c5d8e75540 --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/emitterdef.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:58d709085b46f31eef29fd8074d1c6d1657d3ebd4fb393b1c06a73cef69e6e48 +size 541 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/emittermanip.h b/phonelibs/yaml-cpp/include/yaml-cpp/emittermanip.h new file mode 100644 index 0000000000..98615b5fcc --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/emittermanip.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:66dda1a31345daef7d726c0d99813e1d41f0dd2ec87fc142a573a44dbd99e07d +size 3147 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/emitterstyle.h b/phonelibs/yaml-cpp/include/yaml-cpp/emitterstyle.h new file mode 100644 index 0000000000..6cdda40b32 --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/emitterstyle.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff854b2abd44bbb7c3a0f0e557068d2613e6a9dbcbf38ccd563942a7bb0ff1c2 +size 502 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/eventhandler.h b/phonelibs/yaml-cpp/include/yaml-cpp/eventhandler.h new file mode 100644 index 0000000000..b2fbaf47cf --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/eventhandler.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:25b82e4d8fd20b38f8c7f3e6d480543f00096d514d1d56e2e74dd4049930301e +size 1318 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/exceptions.h b/phonelibs/yaml-cpp/include/yaml-cpp/exceptions.h new file mode 100644 index 0000000000..acdd0862dd --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/exceptions.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:66c388573aef22bdf78fd85a0becdce6695c86bf35b3372d12e7b705127731da +size 9329 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/mark.h b/phonelibs/yaml-cpp/include/yaml-cpp/mark.h new file mode 100644 index 0000000000..13991cd326 --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/mark.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:069033be17c7a5875817102f3f77538431afdb7d1834a4673bad6a7267f0cab5 +size 785 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/node/convert.h b/phonelibs/yaml-cpp/include/yaml-cpp/node/convert.h new file mode 100644 index 0000000000..ffc715ac03 --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/node/convert.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf908acc1790290b8dcecb8011487b6df014f6643894f1839c1c9d34b29b5c73 +size 10168 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/node/detail/bool_type.h b/phonelibs/yaml-cpp/include/yaml-cpp/node/detail/bool_type.h new file mode 100644 index 0000000000..df8f8c6a85 --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/node/detail/bool_type.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31def5e52a7bd82d7f6fe3b5fbebe607316679573e1f2e768795cf5af65e83a1 +size 967 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/node/detail/impl.h b/phonelibs/yaml-cpp/include/yaml-cpp/node/detail/impl.h new file mode 100644 index 0000000000..c04b0c4b2d --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/node/detail/impl.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f990ad629f8f56e7e3e4ba493787049aafd2bb67951466879fd60f102d38ffc5 +size 5301 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/node/detail/iterator.h b/phonelibs/yaml-cpp/include/yaml-cpp/node/detail/iterator.h new file mode 100644 index 0000000000..618cd29b50 --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/node/detail/iterator.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8380485931f580085b6918288565710ba1135a22675302ce4f10ed1a269f7fbb +size 2513 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/node/detail/iterator_fwd.h b/phonelibs/yaml-cpp/include/yaml-cpp/node/detail/iterator_fwd.h new file mode 100644 index 0000000000..f61d240149 --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/node/detail/iterator_fwd.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e829c7f5653f0f89605321230e363467b5cfcfaece626d8728cc23d369667e62 +size 786 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/node/detail/memory.h b/phonelibs/yaml-cpp/include/yaml-cpp/node/detail/memory.h new file mode 100644 index 0000000000..7424695e9e --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/node/detail/memory.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:30517ab9574ef95d3a7d9e84e8706cd35a7263fc73142c9ec4b35dca049da95c +size 1035 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/node/detail/node.h b/phonelibs/yaml-cpp/include/yaml-cpp/node/detail/node.h new file mode 100644 index 0000000000..6a9d997fc5 --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/node/detail/node.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d9e86e7d918819dc8ab12f0e13fd902b684c21e0ebddb9cf7d90a1647d0feb2a +size 4861 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/node/detail/node_data.h b/phonelibs/yaml-cpp/include/yaml-cpp/node/detail/node_data.h new file mode 100644 index 0000000000..3e2fa5b4ae --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/node/detail/node_data.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:adafcaf7b487730aecb24d7d9c52fcd9a30535aa1dd3cf77d22693a2590224b4 +size 3425 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/node/detail/node_iterator.h b/phonelibs/yaml-cpp/include/yaml-cpp/node/detail/node_iterator.h new file mode 100644 index 0000000000..139e07ac3e --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/node/detail/node_iterator.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:837d6a254c4176742b829a9f5a2edf00f4c29f20ddfa0580ad0ff87a9d2befc5 +size 4864 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/node/detail/node_ref.h b/phonelibs/yaml-cpp/include/yaml-cpp/node/detail/node_ref.h new file mode 100644 index 0000000000..f77fb3a4a1 --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/node/detail/node_ref.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26fbb939e32d5f4237ab1712eedb3d695820de004cee2a0b2bb2d394b8dbd70b +size 3298 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/node/emit.h b/phonelibs/yaml-cpp/include/yaml-cpp/node/emit.h new file mode 100644 index 0000000000..2f2ce5210e --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/node/emit.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:39f35d344ba0502e05449a935c5c9fa3a0179d72b9aa2b75ee964ddd1c4a26af +size 958 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/node/impl.h b/phonelibs/yaml-cpp/include/yaml-cpp/node/impl.h new file mode 100644 index 0000000000..404bd3e78e --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/node/impl.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b6d0ab3813144e55d6e65c3ac99909f0462a46fb8c606ad769186010db05c12 +size 10672 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/node/iterator.h b/phonelibs/yaml-cpp/include/yaml-cpp/node/iterator.h new file mode 100644 index 0000000000..6022cb7b2d --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/node/iterator.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d4c6651999117c2ff840b2ee6f3411e07960b238c009401a58a41e32ecfe1c8 +size 1027 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/node/node.h b/phonelibs/yaml-cpp/include/yaml-cpp/node/node.h new file mode 100644 index 0000000000..4a62d9dfaa --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/node/node.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:042445d5f475623a22450298751220b1af681e561500d925a13ca3d96a480746 +size 3724 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/node/parse.h b/phonelibs/yaml-cpp/include/yaml-cpp/node/parse.h new file mode 100644 index 0000000000..46f93804fa --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/node/parse.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eafa4476872ab20c176cf9f93341e57e7e24190a2c3864242c211bc536b97de2 +size 2084 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/node/ptr.h b/phonelibs/yaml-cpp/include/yaml-cpp/node/ptr.h new file mode 100644 index 0000000000..1e01ea57da --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/node/ptr.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:25a692e3911d8acbad980a96577259804481fb74f5602b2e5830ea9e432d819e +size 831 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/node/type.h b/phonelibs/yaml-cpp/include/yaml-cpp/node/type.h new file mode 100644 index 0000000000..73b91f3201 --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/node/type.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd19cd477379648c56f5640f58ac9ab2d89e8374bdd96d023dbd484492fbd480 +size 510 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/noncopyable.h b/phonelibs/yaml-cpp/include/yaml-cpp/noncopyable.h new file mode 100644 index 0000000000..5eb5004ac1 --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/noncopyable.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c347a2ee75a05cfaec54176eb51f1d47c952e47d7c8508b55cb71e092ceb05af +size 687 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/null.h b/phonelibs/yaml-cpp/include/yaml-cpp/null.h new file mode 100644 index 0000000000..f9983fc6d9 --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/null.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b81505857f24e1e5940fe8c98a0ebc5aeb6a88ec8ab735dd800692d869904511 +size 790 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/ostream_wrapper.h b/phonelibs/yaml-cpp/include/yaml-cpp/ostream_wrapper.h new file mode 100644 index 0000000000..b4825e5c71 --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/ostream_wrapper.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2508e97879cfa632f9ccba50d22db9a1fba8a1e67637d093c7fb34c5eac77da +size 1766 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/parser.h b/phonelibs/yaml-cpp/include/yaml-cpp/parser.h new file mode 100644 index 0000000000..a7beea026c --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/parser.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b3eb3bf320e9432c83ed9b0af111ac5c8596c6d53cac4ca5d68f6105531d2b6f +size 2189 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/stlemitter.h b/phonelibs/yaml-cpp/include/yaml-cpp/stlemitter.h new file mode 100644 index 0000000000..0732316656 --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/stlemitter.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb8e241eb1f8e5cce088e560cd87bbd2b17d8fce8f944e7bcd8443ca836af5f9 +size 1457 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/traits.h b/phonelibs/yaml-cpp/include/yaml-cpp/traits.h new file mode 100644 index 0000000000..d35eb317cd --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/traits.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eab217387d173d8ba0ff694bf7b80fc43d3e37a2da85ebe009fd6d6579e6be93 +size 2085 diff --git a/phonelibs/yaml-cpp/include/yaml-cpp/yaml.h b/phonelibs/yaml-cpp/include/yaml-cpp/yaml.h new file mode 100644 index 0000000000..ec917600c1 --- /dev/null +++ b/phonelibs/yaml-cpp/include/yaml-cpp/yaml.h @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:946643e99e2f865887852f838a66130c54ed770645a73f2c5f8b71b9bb2b1488 +size 795 diff --git a/phonelibs/yaml-cpp/lib/libyaml-cpp.a b/phonelibs/yaml-cpp/lib/libyaml-cpp.a new file mode 100644 index 0000000000..1fc5ef2461 --- /dev/null +++ b/phonelibs/yaml-cpp/lib/libyaml-cpp.a @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:125c5a5d7287a958f8287b7aa5af5b987e687ceb96dc7bc31704597efc87db6c +size 1363604 diff --git a/phonelibs/zmq/aarch64-linux/bin/curve_keygen b/phonelibs/zmq/aarch64-linux/bin/curve_keygen deleted file mode 100755 index 7d83874f5f..0000000000 --- a/phonelibs/zmq/aarch64-linux/bin/curve_keygen +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:20f4a2b629bf70323244ae8b2df3ccfe182fbdbf2cf1643860e454bc4ea9e7d1 -size 13048 diff --git a/phonelibs/zmq/aarch64-linux/include/czmq.h b/phonelibs/zmq/aarch64-linux/include/czmq.h deleted file mode 100644 index 2b3bf3ea5b..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/czmq.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e434c73611bb5576b3a9b1a6a40bce70a5ecbe36ea1a510392a2935196af0569 -size 1275 diff --git a/phonelibs/zmq/aarch64-linux/include/czmq_library.h b/phonelibs/zmq/aarch64-linux/include/czmq_library.h deleted file mode 100644 index e3b5a35c09..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/czmq_library.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7a7c22cb33dcd531a21837dc70103043012f7b29d1f5b1b7aaf430f9034ef6f9 -size 5539 diff --git a/phonelibs/zmq/aarch64-linux/include/czmq_prelude.h b/phonelibs/zmq/aarch64-linux/include/czmq_prelude.h deleted file mode 100644 index 48faa989c0..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/czmq_prelude.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c6866da03dbd52cfd3eb2b3cd1fcbce6d81756d0d573590065d4a42f212a9356 -size 19294 diff --git a/phonelibs/zmq/aarch64-linux/include/zactor.h b/phonelibs/zmq/aarch64-linux/include/zactor.h deleted file mode 100644 index b29ec9afe1..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zactor.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f5e5e9e2086688abc765e0c13d6621b7648d0a5fe41446af777f9f192fbaeb29 -size 2473 diff --git a/phonelibs/zmq/aarch64-linux/include/zarmour.h b/phonelibs/zmq/aarch64-linux/include/zarmour.h deleted file mode 100644 index 44f6ba24fb..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zarmour.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f9696bd0aea94f596a6ad7083b72e7fc30c31b0da16d5731225a31d1c2c4ee11 -size 3644 diff --git a/phonelibs/zmq/aarch64-linux/include/zauth.h b/phonelibs/zmq/aarch64-linux/include/zauth.h deleted file mode 100644 index 493cc40195..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zauth.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4a97a24653ef009fb968102d4d4a41fe2bde9efea9d0d9cfffe1abb14b4cf592 -size 3611 diff --git a/phonelibs/zmq/aarch64-linux/include/zbeacon.h b/phonelibs/zmq/aarch64-linux/include/zbeacon.h deleted file mode 100644 index dd238d8abd..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zbeacon.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c4212faea9f2a2f7ba343cc02987fd96deffe8e23dee35e2c0a088841abffecb -size 2856 diff --git a/phonelibs/zmq/aarch64-linux/include/zcert.h b/phonelibs/zmq/aarch64-linux/include/zcert.h deleted file mode 100644 index 19f4fe553f..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zcert.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:450ea0eab5a4fd081d1face3cb4991cbdae8a05721493e5f8a099be208b2515b -size 4283 diff --git a/phonelibs/zmq/aarch64-linux/include/zcertstore.h b/phonelibs/zmq/aarch64-linux/include/zcertstore.h deleted file mode 100644 index 311f70ebdd..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zcertstore.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:be988dcc7301ebd693f1485cbe60d22d7cecc2d9fb6d986eadfded77678ff74c -size 3567 diff --git a/phonelibs/zmq/aarch64-linux/include/zchunk.h b/phonelibs/zmq/aarch64-linux/include/zchunk.h deleted file mode 100644 index dc923ae56a..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zchunk.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c5391efa3017a3fd4d90b73f661e43f0b0664052520f4f983b38766376521d7b -size 5899 diff --git a/phonelibs/zmq/aarch64-linux/include/zclock.h b/phonelibs/zmq/aarch64-linux/include/zclock.h deleted file mode 100644 index 2884660075..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zclock.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7f3f0c545553e4cef2115043f5ba58f5c856889c215fe123ed95d46dae14dfa5 -size 2465 diff --git a/phonelibs/zmq/aarch64-linux/include/zconfig.h b/phonelibs/zmq/aarch64-linux/include/zconfig.h deleted file mode 100644 index 7382618626..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zconfig.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e9b32a750b627e4a621ab3e9a4cefe64b3a367da091b8757450791e8d9361c2b -size 6591 diff --git a/phonelibs/zmq/aarch64-linux/include/zdigest.h b/phonelibs/zmq/aarch64-linux/include/zdigest.h deleted file mode 100644 index bce0ecf829..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zdigest.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:22a41bbe93e99cca59fe8d1617fb27b336cd2c4f2d094b4eea95f98e3470fce3 -size 2069 diff --git a/phonelibs/zmq/aarch64-linux/include/zdir.h b/phonelibs/zmq/aarch64-linux/include/zdir.h deleted file mode 100644 index 6635303478..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zdir.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4ea8ae429fee870ac8c605fe28adf604d7dd22109360f7c089471ec9f07f754d -size 6129 diff --git a/phonelibs/zmq/aarch64-linux/include/zdir_patch.h b/phonelibs/zmq/aarch64-linux/include/zdir_patch.h deleted file mode 100644 index 1157d28dca..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zdir_patch.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bdf4336095870dba4e5fdb89a7867b26b61a879cf4c0631dab857ebbee79ff9f -size 2422 diff --git a/phonelibs/zmq/aarch64-linux/include/zfile.h b/phonelibs/zmq/aarch64-linux/include/zfile.h deleted file mode 100644 index 6c0b217987..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zfile.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a66c39280771660524a50e359e2adc6f35df35a11d6cf7d922740e2d3b34e04a -size 6250 diff --git a/phonelibs/zmq/aarch64-linux/include/zframe.h b/phonelibs/zmq/aarch64-linux/include/zframe.h deleted file mode 100644 index 58a74b27c2..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zframe.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6f3b444f0b237c105a7aaef90ba2e09609e5d06a5a278c6cc5a6b8a1aa6c9752 -size 6538 diff --git a/phonelibs/zmq/aarch64-linux/include/zgossip.h b/phonelibs/zmq/aarch64-linux/include/zgossip.h deleted file mode 100644 index c49417587d..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zgossip.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:132f3c042ffc2a056405a6857a66ec6bfe40fad7edfc3229ef6b833407a0bfe3 -size 2964 diff --git a/phonelibs/zmq/aarch64-linux/include/zhash.h b/phonelibs/zmq/aarch64-linux/include/zhash.h deleted file mode 100644 index ae77b94364..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zhash.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ad6a1d63f4059cd6dd9c18eae4afd6a449c6f1ae4b03a1b697af79708612b9e1 -size 8178 diff --git a/phonelibs/zmq/aarch64-linux/include/zhashx.h b/phonelibs/zmq/aarch64-linux/include/zhashx.h deleted file mode 100644 index 5790f7141d..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zhashx.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d163c60813069859c1c8ea94e07f7769f35b406147abc342d3dbb9448cfb8dc9 -size 12557 diff --git a/phonelibs/zmq/aarch64-linux/include/ziflist.h b/phonelibs/zmq/aarch64-linux/include/ziflist.h deleted file mode 100644 index 0a01a19c62..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/ziflist.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3df305f973face711a307384a310bbe3d74afbd06fc263e4fe78e6886244df73 -size 2256 diff --git a/phonelibs/zmq/aarch64-linux/include/zlist.h b/phonelibs/zmq/aarch64-linux/include/zlist.h deleted file mode 100644 index 19376fb3d7..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zlist.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:23ca4ea43fe89ef066c42c0524b21bb2f3857bda386f8df8109f69cb25f13cc4 -size 6202 diff --git a/phonelibs/zmq/aarch64-linux/include/zlistx.h b/phonelibs/zmq/aarch64-linux/include/zlistx.h deleted file mode 100644 index df1ab07816..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zlistx.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:382c7fa2cfdcb3efdf1631ba6ba1f97bb03297c102cf6e629c3db8519e946a0e -size 8547 diff --git a/phonelibs/zmq/aarch64-linux/include/zloop.h b/phonelibs/zmq/aarch64-linux/include/zloop.h deleted file mode 100644 index 394f0f16dc..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zloop.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:32aa6915cea28c1a7b1bd360d0dc7d4981ace423a126c8708718d5058893289d -size 7185 diff --git a/phonelibs/zmq/aarch64-linux/include/zmonitor.h b/phonelibs/zmq/aarch64-linux/include/zmonitor.h deleted file mode 100644 index 21c138037f..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zmonitor.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8c4004636f31648f98050e637daa231c70fcf4b64da326548b4f50dccba5ceb1 -size 1889 diff --git a/phonelibs/zmq/aarch64-linux/include/zmq.h b/phonelibs/zmq/aarch64-linux/include/zmq.h deleted file mode 100644 index f70ef9d7f4..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zmq.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e00ab4b318526fc2b340ca69cafcd5e5071810f63471a0fe89064ee18e1afafb -size 24177 diff --git a/phonelibs/zmq/aarch64-linux/include/zmq_utils.h b/phonelibs/zmq/aarch64-linux/include/zmq_utils.h deleted file mode 100644 index 947923e6dd..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zmq_utils.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:926abbe8a8ab28df17746ca5bf60440b799b391be172c406e0628cdef3788909 -size 2316 diff --git a/phonelibs/zmq/aarch64-linux/include/zmsg.h b/phonelibs/zmq/aarch64-linux/include/zmsg.h deleted file mode 100644 index 4a9b43ae94..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zmsg.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1e08ea0a57a0cede5c2860dd447d5452226b61de22dc778e6e6c602ee940ad20 -size 11537 diff --git a/phonelibs/zmq/aarch64-linux/include/zpoller.h b/phonelibs/zmq/aarch64-linux/include/zpoller.h deleted file mode 100644 index 9ece76cf03..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zpoller.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1b2af935bab05d478ed103138e5a0b5ddce85a270de2eef73c474155a93f612c -size 3453 diff --git a/phonelibs/zmq/aarch64-linux/include/zproxy.h b/phonelibs/zmq/aarch64-linux/include/zproxy.h deleted file mode 100644 index 04dd99d803..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zproxy.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:61798dbd369cfefd3a90376818f628107bff9131d95cc8b444a924c28cb06115 -size 3889 diff --git a/phonelibs/zmq/aarch64-linux/include/zrex.h b/phonelibs/zmq/aarch64-linux/include/zrex.h deleted file mode 100644 index 48f2dd4676..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zrex.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5aa3120214f9fa79436f9b5ed4db050a5974d774dd99bd0e9bba13f70f04be6d -size 2903 diff --git a/phonelibs/zmq/aarch64-linux/include/zsock.h b/phonelibs/zmq/aarch64-linux/include/zsock.h deleted file mode 100644 index 738d1d69f8..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zsock.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b1e1908455d9810980fb5c9de6726c33a327ff71976d08f696860cd506087c6c -size 44814 diff --git a/phonelibs/zmq/aarch64-linux/include/zstr.h b/phonelibs/zmq/aarch64-linux/include/zstr.h deleted file mode 100644 index 1aaf84f04d..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zstr.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ea6f83ec5aa4ae69d95a991f0a9c8912b7f8e1c23db1d73be934c80e086f783a -size 4557 diff --git a/phonelibs/zmq/aarch64-linux/include/zsys.h b/phonelibs/zmq/aarch64-linux/include/zsys.h deleted file mode 100644 index adc1da73ef..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zsys.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0848d4218ef47604f36f365d1ee83727f2a03494c53a58475803b5f36437c5e6 -size 16109 diff --git a/phonelibs/zmq/aarch64-linux/include/zuuid.h b/phonelibs/zmq/aarch64-linux/include/zuuid.h deleted file mode 100644 index 4676899834..0000000000 --- a/phonelibs/zmq/aarch64-linux/include/zuuid.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6de67e7d53ebbffefe2c330bded67425df97d8bb5d79717d0227e3b6fb1899f9 -size 2790 diff --git a/phonelibs/zmq/aarch64-linux/lib/libczmq.a b/phonelibs/zmq/aarch64-linux/lib/libczmq.a deleted file mode 100644 index 70680fa617..0000000000 --- a/phonelibs/zmq/aarch64-linux/lib/libczmq.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9d7ee1202b89be647edcceaccbcbfd6777b6944b7c169bd28118c0a1710de22b -size 1172240 diff --git a/phonelibs/zmq/aarch64-linux/lib/libczmq.la b/phonelibs/zmq/aarch64-linux/lib/libczmq.la deleted file mode 100755 index 08b9fd3e18..0000000000 --- a/phonelibs/zmq/aarch64-linux/lib/libczmq.la +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9a8e4870eb46d2ad7f1df5823b42c4310e05ace540db4f546ce5df740e06eb97 -size 1053 diff --git a/phonelibs/zmq/aarch64-linux/lib/libczmq.so b/phonelibs/zmq/aarch64-linux/lib/libczmq.so deleted file mode 120000 index db9aa60f9b..0000000000 --- a/phonelibs/zmq/aarch64-linux/lib/libczmq.so +++ /dev/null @@ -1 +0,0 @@ -libczmq.so.4.0.2 \ No newline at end of file diff --git a/phonelibs/zmq/aarch64-linux/lib/libczmq.so.4 b/phonelibs/zmq/aarch64-linux/lib/libczmq.so.4 deleted file mode 120000 index db9aa60f9b..0000000000 --- a/phonelibs/zmq/aarch64-linux/lib/libczmq.so.4 +++ /dev/null @@ -1 +0,0 @@ -libczmq.so.4.0.2 \ No newline at end of file diff --git a/phonelibs/zmq/aarch64-linux/lib/libczmq.so.4.0.2 b/phonelibs/zmq/aarch64-linux/lib/libczmq.so.4.0.2 deleted file mode 100755 index de760a61fd..0000000000 --- a/phonelibs/zmq/aarch64-linux/lib/libczmq.so.4.0.2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0f8440c27b9323413721f07e206597c53209c6b311c735e046c30b6f211665d2 -size 544808 diff --git a/phonelibs/zmq/aarch64-linux/lib/libzmq.a b/phonelibs/zmq/aarch64-linux/lib/libzmq.a deleted file mode 100644 index b6bd2ab734..0000000000 --- a/phonelibs/zmq/aarch64-linux/lib/libzmq.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0f7c6db2f4cbd86282f952cc64a570416220e5c7bc4dff96e3a436a778b59730 -size 27918754 diff --git a/phonelibs/zmq/aarch64-linux/lib/libzmq.la b/phonelibs/zmq/aarch64-linux/lib/libzmq.la deleted file mode 100755 index c53516d035..0000000000 --- a/phonelibs/zmq/aarch64-linux/lib/libzmq.la +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c5b2b3ec08b209a69bd83ad5339d00ba0e60ff0fc0f511666b06d4895e7eed09 -size 966 diff --git a/phonelibs/zmq/aarch64-linux/lib/libzmq.so b/phonelibs/zmq/aarch64-linux/lib/libzmq.so deleted file mode 120000 index ef44cafc6a..0000000000 --- a/phonelibs/zmq/aarch64-linux/lib/libzmq.so +++ /dev/null @@ -1 +0,0 @@ -libzmq.so.5.1.2 \ No newline at end of file diff --git a/phonelibs/zmq/aarch64-linux/lib/libzmq.so.5 b/phonelibs/zmq/aarch64-linux/lib/libzmq.so.5 deleted file mode 120000 index ef44cafc6a..0000000000 --- a/phonelibs/zmq/aarch64-linux/lib/libzmq.so.5 +++ /dev/null @@ -1 +0,0 @@ -libzmq.so.5.1.2 \ No newline at end of file diff --git a/phonelibs/zmq/aarch64-linux/lib/libzmq.so.5.1.2 b/phonelibs/zmq/aarch64-linux/lib/libzmq.so.5.1.2 deleted file mode 100755 index 142923c3f1..0000000000 --- a/phonelibs/zmq/aarch64-linux/lib/libzmq.so.5.1.2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4e9cbc07c0c92b14930f664beda8da1b7fec88d51bec474b987850e43c65abf8 -size 8927592 diff --git a/phonelibs/zmq/aarch64-linux/lib/pkgconfig/libczmq.pc b/phonelibs/zmq/aarch64-linux/lib/pkgconfig/libczmq.pc deleted file mode 100644 index 60497ab6b9..0000000000 --- a/phonelibs/zmq/aarch64-linux/lib/pkgconfig/libczmq.pc +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:890b19a472b79e3e25cb5efe3485cff16c65f9a8ac887ad1e6738d06efc28c26 -size 929 diff --git a/phonelibs/zmq/aarch64-linux/lib/pkgconfig/libzmq.pc b/phonelibs/zmq/aarch64-linux/lib/pkgconfig/libzmq.pc deleted file mode 100644 index 0908750327..0000000000 --- a/phonelibs/zmq/aarch64-linux/lib/pkgconfig/libzmq.pc +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:662b0ac99fece95caa0f263364be0ac4e8a831e7fa72e26617928e6c06f8b6ec -size 238 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man1/zmakecert.1 b/phonelibs/zmq/aarch64-linux/share/man/man1/zmakecert.1 deleted file mode 100644 index ce67408923..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man1/zmakecert.1 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c6d1918afeb8335867f56d2d0d78484fbb793e4e47da8784e8ba38ff2b877573 -size 2576 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zactor.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zactor.3 deleted file mode 100644 index ec5cf961b6..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zactor.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1a4ea139c060c364b0f143ede4d8859dc7f1706380c36b86a828fd32d6625538 -size 4948 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zarmour.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zarmour.3 deleted file mode 100644 index a02314f596..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zarmour.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:de4d31fa069eff52350eeeeaef50ad16716d8238cf7c9c1a1a58717ff4320fa5 -size 14198 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zauth.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zauth.3 deleted file mode 100644 index 2b30ba59b6..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zauth.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:23474e4b01d47fdcbde596b0530ce9eae731a9563c17c4ce88dc8e608ff2d54d -size 11372 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zbeacon.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zbeacon.3 deleted file mode 100644 index 68f264599b..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zbeacon.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8144519498fa70f68a6787277f07f20fcf10e4b3e3609b3ae5a773dc5c94d15f -size 8208 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zcert.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zcert.3 deleted file mode 100644 index e398916006..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zcert.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7887ca6da2ebec62c0e90c8ac06a6a7616fb48f51a4a94fd477b3d2e5beaa01d -size 8160 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zcertstore.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zcertstore.3 deleted file mode 100644 index f3058b3958..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zcertstore.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:653423dfad509e4b2380e2c88b417da3180194ed680d0bf67ac7036b25cb6bfd -size 7400 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zchunk.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zchunk.3 deleted file mode 100644 index 7abafbf85d..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zchunk.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a769eefb94ebb22cc0f5326c3cd4172babee9b12f7aa3783cebeb34c76c49b0b -size 9519 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zclock.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zclock.3 deleted file mode 100644 index 72f4bdb129..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zclock.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b6322cde6b8789aabad3fa63aa51449658aa7eede0980119bd026e6863b8a88e -size 4232 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zconfig.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zconfig.3 deleted file mode 100644 index 0a51e40d14..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zconfig.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:83f13ff63832a62890946a560df1d0d5995f33a44835bd3f3b30923459e2c32a -size 10878 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zdigest.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zdigest.3 deleted file mode 100644 index dd74eec449..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zdigest.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8da6be01b2ce4dda42fd9e307d0798f7f532826b4cbf83fd1bf26bd35622cd85 -size 4213 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zdir.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zdir.3 deleted file mode 100644 index 2f9e747517..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zdir.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:df211896606dbf2e6c2b4384c46ce6da295ed03d650a735cae55c27d0fed7e15 -size 9357 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zdir_patch.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zdir_patch.3 deleted file mode 100644 index 6d9ab0db66..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zdir_patch.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bf0a78501e34bb6e2f9a500420d5ce7af1da0bab113c185cbb4d9475296a5ba3 -size 4214 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zfile.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zfile.3 deleted file mode 100644 index c9c51116c6..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zfile.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1f66288b4ca4c5eed0d09bd8390dc534b9f86a21f9ecf807b477681b881f7282 -size 11586 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zframe.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zframe.3 deleted file mode 100644 index 5c48f4c5b1..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zframe.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ab8e68d9bcf65dad60609689a4a799f064b20f4a7bd2d22e0045d890e523234b -size 11825 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zgossip.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zgossip.3 deleted file mode 100644 index 70c3620c91..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zgossip.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e3751249c9f9596b84bf57e8b91f27411a12b002fc8b85f84167e4aaca6d21f8 -size 10238 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zhash.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zhash.3 deleted file mode 100644 index f052a103ca..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zhash.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3debb724f3d52dd4e021f9494b096cffef574d0a2cc75ce8d51f540ba7caaeaa -size 13900 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zhashx.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zhashx.3 deleted file mode 100644 index 01151a76e0..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zhashx.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ac49fbed0addf5b7174262b2ee1d55ea69d97b9107ecebfb32b23a1944c64842 -size 18796 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/ziflist.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/ziflist.3 deleted file mode 100644 index 9997cc9267..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/ziflist.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:380d8d1b5c43d1daed9f148d6635f19b05a939f0b3e104c27e6df6f10a51f727 -size 4624 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zlist.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zlist.3 deleted file mode 100644 index 59045d85a4..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zlist.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f938ebd768fbda9079fca2eb66b7985fb40b86c874cef383d642233a057894ba -size 11230 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zlistx.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zlistx.3 deleted file mode 100644 index 8783af2031..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zlistx.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ec881dfb5263f7fd315a68ba9486bda278517c245d1449cb2e443453bbf4abc0 -size 13309 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zloop.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zloop.3 deleted file mode 100644 index 7db74e7246..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zloop.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5661deb2b79120ac911775153f489f10a3194244304958e15732a10dcfe2efe8 -size 10215 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmonitor.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmonitor.3 deleted file mode 100644 index cabfca10c6..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmonitor.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c58ac95ee0e589af9a6503f060497d4f40df86b70c54f6b712a5cb7584c0a499 -size 5113 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_atomic_counter_dec.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_atomic_counter_dec.3 deleted file mode 100644 index 6a6fb50248..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_atomic_counter_dec.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e947a67fe6072e8e4a47530677454c10fb24a5ddf622ef8663403b0b58818e9b -size 2810 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_atomic_counter_destroy.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_atomic_counter_destroy.3 deleted file mode 100644 index 2a8bd49d92..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_atomic_counter_destroy.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a98d994b0e42e4e3fcd4a8798efe52bb3669507197c56f4009f87ac3c0ff26ea -size 2904 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_atomic_counter_inc.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_atomic_counter_inc.3 deleted file mode 100644 index ad4c75a0f1..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_atomic_counter_inc.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6f6f0096366fcc85ed11db69d717b1955fa7aefa27b32cac08a0cf7bc3c595e2 -size 2766 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_atomic_counter_new.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_atomic_counter_new.3 deleted file mode 100644 index 3cc5941593..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_atomic_counter_new.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:913064457daa55f4a334f2eb3733be64147f6dddea5eb5853d67298da3d10670 -size 2906 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_atomic_counter_set.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_atomic_counter_set.3 deleted file mode 100644 index b0421542db..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_atomic_counter_set.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:09e0b5231d9d823917b49da0486c623f83574b263eeb7579649d3b003ee3889d -size 2828 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_atomic_counter_value.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_atomic_counter_value.3 deleted file mode 100644 index 7becb10e0e..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_atomic_counter_value.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:eb9a6c4d2dd4d57b50bf31f734fd5c71af34f7ac720b5d6ae5531bf8c814189c -size 2779 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_bind.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_bind.3 deleted file mode 100644 index 49a424335a..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_bind.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f9af3b2e22ce686e572d585c28d9931017907d06cfbf515d76dba38fe44e3d51 -size 5214 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_close.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_close.3 deleted file mode 100644 index 7f52bfe208..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_close.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8380b6e243e3a434bb4e61151e6bc43a0be93c1143b785cec696bc49def0b6b2 -size 2725 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_connect.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_connect.3 deleted file mode 100644 index de4b839510..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_connect.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a2d8fd7b348f9256e6dcf6d3055e21cd776caa11c8307ba04d3e655c8ac52de8 -size 5382 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_ctx_get.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_ctx_get.3 deleted file mode 100644 index f59da46df6..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_ctx_get.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:31da76fdd01ba6dafba58553cc69fbd96914b70c8f1888b50ba528428864bc94 -size 3881 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_ctx_new.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_ctx_new.3 deleted file mode 100644 index 7f83927e7e..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_ctx_new.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:36944b6963857e283cf47e842f15e6841edbf582ba350393e42f4e4878184de9 -size 2240 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_ctx_set.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_ctx_set.3 deleted file mode 100644 index 898c518511..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_ctx_set.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cd8105cb3e76b5a899ff0bf4edc6ed966c3dada4b3b3771480640efb8d12e1fc -size 5744 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_ctx_shutdown.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_ctx_shutdown.3 deleted file mode 100644 index ac1dd04f5b..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_ctx_shutdown.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2c4b6a1c94f48e1e064f99762cbeeee277bcaa0e3bc1f15296480832a7ea993b -size 2492 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_ctx_term.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_ctx_term.3 deleted file mode 100644 index 3b4384d6eb..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_ctx_term.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f2d8149c50015a5898916bfef67ba7a5ab3348ba2b54ee86b1e39773ef74484e -size 3437 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_curve_keypair.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_curve_keypair.3 deleted file mode 100644 index 2e9e6caac0..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_curve_keypair.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bc6004d30c73c808ed0e88939963728c31a2be471f0fd62a2fbea2c8ab857769 -size 2483 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_curve_public.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_curve_public.3 deleted file mode 100644 index b18f0270c9..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_curve_public.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:174e364242de0bb118ea1703a66b0d256120af51403edbb996eccf4ed203483b -size 2715 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_disconnect.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_disconnect.3 deleted file mode 100644 index 42b9bdcd27..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_disconnect.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b60296e3c3acc35fdbeef03fcf1e3bbe90c867a96d55d96135e4e353379660f6 -size 3655 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_errno.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_errno.3 deleted file mode 100644 index 525907f6e8..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_errno.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:283266581ae929083811bf2e2da011486eb97235122d7410e06a5d6a7bbaa5b3 -size 2528 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_getsockopt.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_getsockopt.3 deleted file mode 100644 index 94bb25b70a..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_getsockopt.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:02fffdbbbb91557666f78dd4089277f61261ed400289f2baf4b9910e2cc55d2e -size 38492 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_has.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_has.3 deleted file mode 100644 index 11e3ff7977..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_has.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7c06c30b004555e1f1dcc1097eba8a7d55f4c14b6b000c6cc8ee1a16439d58f6 -size 2983 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_close.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_close.3 deleted file mode 100644 index 926f0803ff..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_close.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2f83f56dc0b1558d152cdd1a606ddd3b19fdb26931fb834bf5dd155961b8934a -size 2784 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_copy.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_copy.3 deleted file mode 100644 index 6ab604e1b7..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_copy.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ddff021b17a6515e1412a81ad31025219f716d8663ff120a96ea984fa6582886 -size 3378 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_data.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_data.3 deleted file mode 100644 index 8cf5c3da1b..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_data.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:62c781fdf04b4545c0ed1168f17933bef458e1ef00a64c60de3961e2a9099a15 -size 2250 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_get.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_get.3 deleted file mode 100644 index 02a5c66057..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_get.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:205202fe6cffcc8a7cebc89614a3db2be41a02f71f0edd36f47cc9e7c0bf047c -size 3343 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_gets.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_gets.3 deleted file mode 100644 index 64e8e82c9c..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_gets.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2d4d8cb4646a66bfa837dc95505fee8d9fc34366a7a054d1df581b9623a47b37 -size 3301 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_init.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_init.3 deleted file mode 100644 index fe18b5b263..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_init.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:553edd04caf71a82d5f3d34349c57a15779e9370c77512ba7f63947a07d12725 -size 2831 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_init_data.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_init_data.3 deleted file mode 100644 index cd620b6cbb..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_init_data.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dcbb4284f5f790ad2ab7904cd95a8097fcbbbf8c7ab556626b65d27a386dc11d -size 4151 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_init_size.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_init_size.3 deleted file mode 100644 index f1d7fd15c1..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_init_size.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:50799dcfe68c173d791d755830d0c5fd1581f106366e1b5d93fc61a3d34e33ea -size 3019 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_more.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_more.3 deleted file mode 100644 index 0894af40c5..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_more.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:deaa26978f0a7c71ee02e5b187a00d87f39cb636e1c4f35f36401841b87f5dac -size 2771 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_move.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_move.3 deleted file mode 100644 index 7ddd3f0f9d..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_move.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a3806ccc5980397cb9a12545cb4f624b2888ad81d1d6dccd95a845470031f12a -size 2642 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_recv.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_recv.3 deleted file mode 100644 index a841a9a49a..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_recv.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8e757fc6576268c73ada043f2bc500694d11a0b1d3155e247e0cd81a824e5e5e -size 5405 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_routing_id.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_routing_id.3 deleted file mode 100644 index 84b10c14a8..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_routing_id.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:99d220007b2ae36283bd172df673d6729298f7c8ea4632c396a02f40f069bd4f -size 2688 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_send.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_send.3 deleted file mode 100644 index 043dfaaff2..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_send.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:06f9ed84d1dc2dd12ec5dac9e4905fa1eb3b3262cbd3a861be587a964cd266c0 -size 6002 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_set.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_set.3 deleted file mode 100644 index c760b5b952..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_set.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4d3feb4667e18a297b05b82d07e29d0154560fe09df11620d1748a52f1e5536c -size 2230 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_set_routing_id.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_set_routing_id.3 deleted file mode 100644 index 95e9aa91dc..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_set_routing_id.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f7cc6c0a567ce9196800f75c634214e63ecf5688f1c4b8fcf8934097ee708bb8 -size 2331 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_size.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_size.3 deleted file mode 100644 index 46da55a191..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_msg_size.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3a728d8583de76a2d0fcfb4ba1bbb739d811fb43b5dbcfe65646b5aa2e1a56c3 -size 2262 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_poll.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_poll.3 deleted file mode 100644 index 8de6a72317..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_poll.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f824a0e8f7a86d037e69fb50bd0aac6043906cb6b8fa56535827aa3b0e6049e8 -size 6590 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_proxy.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_proxy.3 deleted file mode 100644 index ec8f5abed8..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_proxy.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bce453ba36bf3bb4b5734c63e6f4437e9f31e3fc7ddbb5e959eab52dc89b8915 -size 4476 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_proxy_steerable.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_proxy_steerable.3 deleted file mode 100644 index 0b0b550e82..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_proxy_steerable.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:07c74f41c2da639a6a2f1bec137c93b425bd2bb03f4a035c1eae1981bcbb523b -size 4313 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_recv.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_recv.3 deleted file mode 100644 index 1616344f60..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_recv.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3e33829ccff17f3c30606cabec1cf1c9e125cf7ac15f162c4fb246fe91cf9df0 -size 4374 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_recvmsg.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_recvmsg.3 deleted file mode 100644 index 96b4117771..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_recvmsg.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f08ce67256b46dbd7c585b31271f730e35ed430b92436ac133878ae66a33aea8 -size 5352 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_send.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_send.3 deleted file mode 100644 index 83129bf298..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_send.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:13d3d10976e2a2f9670a606e90a2377461c89024751238cd46535fb90e4b4089 -size 4923 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_send_const.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_send_const.3 deleted file mode 100644 index 0ea1bb343c..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_send_const.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bb6c3e591e95b58e5dfe8d0887c423296ba2f9dbf6daf53a394d93cbc8b3f869 -size 5019 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_sendmsg.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_sendmsg.3 deleted file mode 100644 index 1bd9c6d7c6..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_sendmsg.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:70bdfe033a9a13662fc00bfdbbc72126690b7eb371ae6fe00b3686317655922e -size 5840 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_setsockopt.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_setsockopt.3 deleted file mode 100644 index f882392547..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_setsockopt.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:daa21e2c97698d8dd96483017b8f4c531b655cc08b07fff35fbfa5724f9f4047 -size 56701 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_socket.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_socket.3 deleted file mode 100644 index 789d4b2f56..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_socket.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1b417dc3195251680f5c77d86cd7d3bcc278a24007b160e6d069af9d7a3926c6 -size 31327 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_socket_monitor.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_socket_monitor.3 deleted file mode 100644 index 2ec1de4978..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_socket_monitor.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:173c4fcff8079ebda6a999734b3e5bdad857931331de3a9d4abe2f8a5bf7c045 -size 9446 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_strerror.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_strerror.3 deleted file mode 100644 index 9ae3590ae4..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_strerror.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:255128a5fb9472e76fc610c9c0d316a37c6feaa1c2f7ccea57e6b2964485272f -size 2389 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_unbind.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_unbind.3 deleted file mode 100644 index 938a947c74..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_unbind.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:50e59c17fefb0f73294cebb06d7f6b4151c4d7c60b4fcae9be91d1450533e185 -size 3779 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_version.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_version.3 deleted file mode 100644 index 5318a340b3..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_version.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f10ebd5d90684ce9201fe4cf7fed31f956707b78475ca0086c77401e78e69b69 -size 2399 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_z85_decode.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_z85_decode.3 deleted file mode 100644 index 60a7330077..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_z85_decode.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4f7489f289e5b926c51ca3be3a5a72500b1d27d28a7731709633786456d5703b -size 2341 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_z85_encode.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_z85_encode.3 deleted file mode 100644 index b8011cd9ae..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmq_z85_encode.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:06e8f16035f16ca0732fa4d71428bc4eff7ff7bf873e7baa2f5f202db0fa288e -size 2581 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zmsg.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zmsg.3 deleted file mode 100644 index b032b2b49c..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zmsg.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e7a85526bce10f9aac332153ae110705676ebf36f9899038c578133d1bda84bb -size 17876 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zpoller.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zpoller.3 deleted file mode 100644 index c0bf797085..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zpoller.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7653f5408945692895edf25809890a6cd305d473aab961e345edf0b4212e6fcc -size 7631 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zproc.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zproc.3 deleted file mode 100644 index 83667fb847..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zproc.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:11248a850e2a6aa6a9acc430a80f9b41320e1877a081465ec0e2bdc9078a21a4 -size 9035 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zproxy.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zproxy.3 deleted file mode 100644 index 0e5c9395e1..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zproxy.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:abdbbd79bce126aef19ffa209be927b9cff03e29493005ac8b3bdee452c10834 -size 14076 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zrex.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zrex.3 deleted file mode 100644 index e5b228f854..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zrex.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e1ba3f0c89103df19cc6b08a437070e8609468125a96c4c4421520531beb6f2a -size 7195 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zsock.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zsock.3 deleted file mode 100644 index 160f62d23c..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zsock.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:12971a8516ab8d9596dd8f6a109b6c15eb4916a82259f7a95bf7570f781534c4 -size 51574 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zstr.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zstr.3 deleted file mode 100644 index 2b3787f523..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zstr.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9a541bb58e2b13666880141f47f20dca0ec7221ed4a55957d8bffdd44bb39908 -size 8214 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zsys.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zsys.3 deleted file mode 100644 index 1da2284e92..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zsys.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:87af89b79fd92b36a1e0887194e2dce9cf32a8cb93166965fa32caa33f072eb0 -size 21228 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/ztimerset.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/ztimerset.3 deleted file mode 100644 index 222158f547..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/ztimerset.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:506fc86350e7c9dd292f5f83009dcd52edd79632eefaad30cc9cce3fee7c6c0e -size 6276 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/ztrie.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/ztrie.3 deleted file mode 100644 index f8321cbb77..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/ztrie.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dfe8e0ac8fa75f6f1ea3be1f3a462bef24e76628cabedff5159a16fa98b0f77a -size 12827 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man3/zuuid.3 b/phonelibs/zmq/aarch64-linux/share/man/man3/zuuid.3 deleted file mode 100644 index 74634cf5b9..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man3/zuuid.3 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:62fa312bffea7e94b26665830b381b5a9147b9a6bab769f5783363cae6d36961 -size 5722 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man7/czmq.7 b/phonelibs/zmq/aarch64-linux/share/man/man7/czmq.7 deleted file mode 100644 index 8311c7e1b6..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man7/czmq.7 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d8c1f3916d74e0be918b46bbe4f38a804a47c84449bdc1cebf92d554d6629b46 -size 28120 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man7/zmq.7 b/phonelibs/zmq/aarch64-linux/share/man/man7/zmq.7 deleted file mode 100644 index 2c3d12f21b..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man7/zmq.7 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9b146c5a356c862c05b56e486b4bd618e99137fa02b2800d710546fafdaed3a3 -size 9729 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_curve.7 b/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_curve.7 deleted file mode 100644 index 89f3eef15a..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_curve.7 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:20bbf0db7915217090a926ebadb6fb630bcc134c99bf12bc58e3124eaf467dd8 -size 4241 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_inproc.7 b/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_inproc.7 deleted file mode 100644 index 22d5fad7ab..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_inproc.7 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:46d8b2c7a1dadc3ec2f6b868493cd2c37c1e907d16289dd203adc8bb2613fb36 -size 4178 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_ipc.7 b/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_ipc.7 deleted file mode 100644 index b6b53c7833..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_ipc.7 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:040004d69f811768f4c7285b9212e8260cc5a1585bdd102e936f5804c81ab4f6 -size 5701 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_null.7 b/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_null.7 deleted file mode 100644 index 907b75e799..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_null.7 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c3bc3e2e9fe14d82132f4619ed064c7d8ef7caf76c72e5d903bb7d1e425e8c9a -size 1714 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_pgm.7 b/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_pgm.7 deleted file mode 100644 index 0b76fe88e6..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_pgm.7 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3787cf65088455b66112d44318eb2da3138315b1e7b2d4f45d3598cee2f17ca1 -size 7808 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_plain.7 b/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_plain.7 deleted file mode 100644 index 391bfa34a7..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_plain.7 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:84bb1b5566d834cc85b72a9ca2d772a5f7335854c3563704094df71a9b542d59 -size 2136 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_tcp.7 b/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_tcp.7 deleted file mode 100644 index 5b53124ed3..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_tcp.7 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:00130d02b88f509bd2b1316b6d29647b5b9cfefb84130de40e28d82bb0ae153b -size 5752 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_tipc.7 b/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_tipc.7 deleted file mode 100644 index fa16f39d97..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_tipc.7 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3e984c09e14e553fb08134c636b606b45a397b501c2ce0a0273cc0914e526dca -size 3573 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_udp.7 b/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_udp.7 deleted file mode 100644 index 51e9f1840d..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_udp.7 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7ee895ca4af242c0e36684c4f2bed7fae7e97a7c7465c64699fa9c779dac58d2 -size 4395 diff --git a/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_vmci.7 b/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_vmci.7 deleted file mode 100644 index 88110ee64c..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/man/man7/zmq_vmci.7 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ad102ce35f78e7d3b7e206d04b842aab660026b099f18bef3797e67605273532 -size 4619 diff --git a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zactor.api b/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zactor.api deleted file mode 100644 index 974143b9ee..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zactor.api +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9826ce5f8f600ecbd903d3cebbfe20fb924185778dcde1fd61369dcb90ffa0a9 -size 2290 diff --git a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zarmour.api b/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zarmour.api deleted file mode 100644 index 300176fe75..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zarmour.api +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1aefc4d428c5020e956f8ff63874428ce13d832e395ee59919729a61b5c13683 -size 3362 diff --git a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zcert.api b/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zcert.api deleted file mode 100644 index a2800aae4a..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zcert.api +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a4d53e54aa2b1d7a616f3f5b7aa8ff1db31ef9f630a6bb4520f593acf3e48ab4 -size 4083 diff --git a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zcertstore.api b/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zcertstore.api deleted file mode 100644 index 2ad976a62e..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zcertstore.api +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:742c8702211602c4a889eca03f185f02520832a5291746767dfa87124563bab3 -size 2997 diff --git a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zchunk.api b/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zchunk.api deleted file mode 100644 index c3fbaac88a..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zchunk.api +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cfb19bf7d822d7b85ce076881c30ea515bfdc5c894c5d4044e8ddf519c0ec4ff -size 6368 diff --git a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zclock.api b/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zclock.api deleted file mode 100644 index 9f7774b4de..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zclock.api +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:89af2ca114341e31005e4bf4fa0f13c4054a19fc741d31c4c2353ddf3b738e62 -size 1760 diff --git a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zconfig.api b/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zconfig.api deleted file mode 100644 index 64c95ea475..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zconfig.api +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e96de46830fe20e4e74ce50f3a38916923bc76c188e9730d9993aa7364bd3f16 -size 6661 diff --git a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zdigest.api b/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zdigest.api deleted file mode 100644 index f64a5b2fe8..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zdigest.api +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f19e2777648cfb9b935f8691725f38030ef28ac7a0291a849988627228255177 -size 1555 diff --git a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zdir.api b/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zdir.api deleted file mode 100644 index 0c1fef19ef..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zdir.api +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a66a1a3ad3d93b6db96e576238887f4143481cd11955bc0235e8433b36eb29a3 -size 4371 diff --git a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zdir_patch.api b/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zdir_patch.api deleted file mode 100644 index 4bd4d54a02..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zdir_patch.api +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3e0298a4b893f1bc4c3540c3704250a2d5174f80c75dfe68bbacca5facfababa -size 1791 diff --git a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zfile.api b/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zfile.api deleted file mode 100644 index 7c5b898ebd..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zfile.api +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ab9915fded6de5d27f682ccca9673a67fcd203eeeb55fc0348eeda6aa3a42d89 -size 5405 diff --git a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zframe.api b/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zframe.api deleted file mode 100644 index cd06873f60..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zframe.api +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bdd244f4152b277e2587db422dd2b9008fa4926507f3afa7d3a9dd0c1bbe48c2 -size 5592 diff --git a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zgossip_msg.api b/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zgossip_msg.api deleted file mode 100644 index 9906ad87ca..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zgossip_msg.api +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e03edfa8fad7b50acea5d96e148543fefcc58af7012386843c699611ab09d7a1 -size 3218 diff --git a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zhash.api b/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zhash.api deleted file mode 100644 index de5a02e943..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zhash.api +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:50e5b4c36f175e09625e9ac7ce84b1ff8bda734764a9c054d3ab45d49614aee9 -size 7410 diff --git a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zhashx.api b/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zhashx.api deleted file mode 100644 index b01f9e622c..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zhashx.api +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:076ab11fa2d8b66b0a9054f5746af514a0e60e0d35cf967ecc2ffbb0e5e0622f -size 12179 diff --git a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/ziflist.api b/phonelibs/zmq/aarch64-linux/share/zproject/czmq/ziflist.api deleted file mode 100644 index 2cc14ee906..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/ziflist.api +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:858d525bb64dd8bc3ce900f2863d91d2447226c7a9b7ef0fed8351fcc1b8bce7 -size 1724 diff --git a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zlist.api b/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zlist.api deleted file mode 100644 index dbdfd61839..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zlist.api +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b3d1fb52af53a77905a228390d94201e398494b237f66500346279145a1662bf -size 6348 diff --git a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zlistx.api b/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zlistx.api deleted file mode 100644 index b4a10cd0ec..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zlistx.api +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:151b3108fae69ee10b2961216c8a8fc27ae0037aede4e9cad0677c66bbb56efa -size 9198 diff --git a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zloop.api b/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zloop.api deleted file mode 100644 index cc24737b52..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zloop.api +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:39e95b0d89c1635cc6c02a1bcdd704cfa76eaf56a14cb9e6ec1aab0bcbbbb1e1 -size 7721 diff --git a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zmsg.api b/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zmsg.api deleted file mode 100644 index 024c0e6aed..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zmsg.api +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:13b0e349b67636f2dfa314650e97e74db1228e7eaee1344c879c27ecd5eef2da -size 9918 diff --git a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zpoller.api b/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zpoller.api deleted file mode 100644 index 4f2520837d..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zpoller.api +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6ea8ef73c9d9a5fc7f20e98091d07de3c88822a9aaba9e0edfd531b22375fb24 -size 3074 diff --git a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zproc.api b/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zproc.api deleted file mode 100644 index 8e50197ccc..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zproc.api +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:eb7d75a6ada0fb318dfa2442a2f0f8c798443200cf4b873d3efd126202f19ec7 -size 6262 diff --git a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zsock.api b/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zsock.api deleted file mode 100644 index 97c7aa8455..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zsock.api +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:90c65feecc02b2ddbdfa7d7064b4ab35c82048a45e280c7bd8e47ce7cd2bd1d6 -size 18050 diff --git a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zsock_option.api b/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zsock_option.api deleted file mode 100644 index ec1c80e5f4..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zsock_option.api +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8816be9977843e6f1cba59210292121b523e242148818f9afd9edb7f12bc61b2 -size 24845 diff --git a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zstr.api b/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zstr.api deleted file mode 100644 index df8e5c933e..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zstr.api +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:840d551c958cc009123952ecd41041f4badb1006d9844ebf818e75941264052a -size 3973 diff --git a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/ztimerset.api b/phonelibs/zmq/aarch64-linux/share/zproject/czmq/ztimerset.api deleted file mode 100644 index 6f01145294..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/ztimerset.api +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:57f73090875edd5348b97770f68a20380f909526b7f8de21f2486a5318c01162 -size 2467 diff --git a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/ztrie.api b/phonelibs/zmq/aarch64-linux/share/zproject/czmq/ztrie.api deleted file mode 100644 index 88227b4c02..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/ztrie.api +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f3f3b3068847d7ed87d8caced3550b36ea703be1095ad46e5e4aebfdb1c97a48 -size 2877 diff --git a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zuuid.api b/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zuuid.api deleted file mode 100644 index 87ca42083b..0000000000 --- a/phonelibs/zmq/aarch64-linux/share/zproject/czmq/zuuid.api +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:890e831bf1651a34eb29ce484bb5520cd1c6a2631e5afbb3760799b2e757dccf -size 2510 diff --git a/phonelibs/zmq/aarch64/include/czmq.h b/phonelibs/zmq/aarch64/include/czmq.h deleted file mode 100644 index 10d64f8187..0000000000 --- a/phonelibs/zmq/aarch64/include/czmq.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:12af7932bddbb54cf2c2b24ae837c307080daa3370b8bc6dd7321ba06fd7a5fc -size 1110 diff --git a/phonelibs/zmq/aarch64/include/czmq_library.h b/phonelibs/zmq/aarch64/include/czmq_library.h deleted file mode 100644 index afd8bfc1de..0000000000 --- a/phonelibs/zmq/aarch64/include/czmq_library.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:288309c96a99f4df9bd439b8a60d305b2375d1a39e9a9905f90ab4fdc8b24f5f -size 6113 diff --git a/phonelibs/zmq/aarch64/include/czmq_prelude.h b/phonelibs/zmq/aarch64/include/czmq_prelude.h deleted file mode 100644 index ee430059f2..0000000000 --- a/phonelibs/zmq/aarch64/include/czmq_prelude.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6e32111326b91a16db1cd72af8520be7d1eda1f8427db67f3b6183523d1ea182 -size 18943 diff --git a/phonelibs/zmq/aarch64/include/zactor.h b/phonelibs/zmq/aarch64/include/zactor.h deleted file mode 100644 index b29ec9afe1..0000000000 --- a/phonelibs/zmq/aarch64/include/zactor.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f5e5e9e2086688abc765e0c13d6621b7648d0a5fe41446af777f9f192fbaeb29 -size 2473 diff --git a/phonelibs/zmq/aarch64/include/zarmour.h b/phonelibs/zmq/aarch64/include/zarmour.h deleted file mode 100644 index 44f6ba24fb..0000000000 --- a/phonelibs/zmq/aarch64/include/zarmour.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f9696bd0aea94f596a6ad7083b72e7fc30c31b0da16d5731225a31d1c2c4ee11 -size 3644 diff --git a/phonelibs/zmq/aarch64/include/zauth.h b/phonelibs/zmq/aarch64/include/zauth.h deleted file mode 100644 index 75fb8fd6c7..0000000000 --- a/phonelibs/zmq/aarch64/include/zauth.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2638f40e6ffeb60ea1ba6224c2589779e0d734340aa3e08b4a2821b08c25a94c -size 3612 diff --git a/phonelibs/zmq/aarch64/include/zauth_v2.h b/phonelibs/zmq/aarch64/include/zauth_v2.h deleted file mode 100644 index 4af41414c2..0000000000 --- a/phonelibs/zmq/aarch64/include/zauth_v2.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2674a57fc2593cb2ccdd8ab6e2e5776eb4ad648d503e769e6a8756c0bee104f1 -size 3449 diff --git a/phonelibs/zmq/aarch64/include/zbeacon.h b/phonelibs/zmq/aarch64/include/zbeacon.h deleted file mode 100644 index dd238d8abd..0000000000 --- a/phonelibs/zmq/aarch64/include/zbeacon.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c4212faea9f2a2f7ba343cc02987fd96deffe8e23dee35e2c0a088841abffecb -size 2856 diff --git a/phonelibs/zmq/aarch64/include/zbeacon_v2.h b/phonelibs/zmq/aarch64/include/zbeacon_v2.h deleted file mode 100644 index 65af279ea8..0000000000 --- a/phonelibs/zmq/aarch64/include/zbeacon_v2.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6ac3a8725076e0c821b40a09989ab354d0961ad75174adcee86ffb3b9c705226 -size 2326 diff --git a/phonelibs/zmq/aarch64/include/zcert.h b/phonelibs/zmq/aarch64/include/zcert.h deleted file mode 100644 index 6308f4cdc0..0000000000 --- a/phonelibs/zmq/aarch64/include/zcert.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4bf47e53573e20faacefe225463194ee6b3bb571cb122e56ddd2019537aacae0 -size 4811 diff --git a/phonelibs/zmq/aarch64/include/zcertstore.h b/phonelibs/zmq/aarch64/include/zcertstore.h deleted file mode 100644 index 0e4b7c87ff..0000000000 --- a/phonelibs/zmq/aarch64/include/zcertstore.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e153358fddb6a9dca76a8f46ab0db6aa8b729e9728491454304dabf77d306a7d -size 3993 diff --git a/phonelibs/zmq/aarch64/include/zchunk.h b/phonelibs/zmq/aarch64/include/zchunk.h deleted file mode 100644 index dc923ae56a..0000000000 --- a/phonelibs/zmq/aarch64/include/zchunk.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c5391efa3017a3fd4d90b73f661e43f0b0664052520f4f983b38766376521d7b -size 5899 diff --git a/phonelibs/zmq/aarch64/include/zclock.h b/phonelibs/zmq/aarch64/include/zclock.h deleted file mode 100644 index 2884660075..0000000000 --- a/phonelibs/zmq/aarch64/include/zclock.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7f3f0c545553e4cef2115043f5ba58f5c856889c215fe123ed95d46dae14dfa5 -size 2465 diff --git a/phonelibs/zmq/aarch64/include/zconfig.h b/phonelibs/zmq/aarch64/include/zconfig.h deleted file mode 100644 index 7e3dd18971..0000000000 --- a/phonelibs/zmq/aarch64/include/zconfig.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4faada45b4fc8316d139b0b18893582129fbcbdb79a03045b39f6871f63912a5 -size 6928 diff --git a/phonelibs/zmq/aarch64/include/zctx.h b/phonelibs/zmq/aarch64/include/zctx.h deleted file mode 100644 index e68fcbcb94..0000000000 --- a/phonelibs/zmq/aarch64/include/zctx.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f48cb2bc6175b27f0ac500b49acf9d519431c363972b3f4923b7695bff624730 -size 3520 diff --git a/phonelibs/zmq/aarch64/include/zdigest.h b/phonelibs/zmq/aarch64/include/zdigest.h deleted file mode 100644 index bce0ecf829..0000000000 --- a/phonelibs/zmq/aarch64/include/zdigest.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:22a41bbe93e99cca59fe8d1617fb27b336cd2c4f2d094b4eea95f98e3470fce3 -size 2069 diff --git a/phonelibs/zmq/aarch64/include/zdir.h b/phonelibs/zmq/aarch64/include/zdir.h deleted file mode 100644 index 6635303478..0000000000 --- a/phonelibs/zmq/aarch64/include/zdir.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4ea8ae429fee870ac8c605fe28adf604d7dd22109360f7c089471ec9f07f754d -size 6129 diff --git a/phonelibs/zmq/aarch64/include/zdir_patch.h b/phonelibs/zmq/aarch64/include/zdir_patch.h deleted file mode 100644 index 1157d28dca..0000000000 --- a/phonelibs/zmq/aarch64/include/zdir_patch.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bdf4336095870dba4e5fdb89a7867b26b61a879cf4c0631dab857ebbee79ff9f -size 2422 diff --git a/phonelibs/zmq/aarch64/include/zfile.h b/phonelibs/zmq/aarch64/include/zfile.h deleted file mode 100644 index 6c0b217987..0000000000 --- a/phonelibs/zmq/aarch64/include/zfile.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a66c39280771660524a50e359e2adc6f35df35a11d6cf7d922740e2d3b34e04a -size 6250 diff --git a/phonelibs/zmq/aarch64/include/zframe.h b/phonelibs/zmq/aarch64/include/zframe.h deleted file mode 100644 index 58a74b27c2..0000000000 --- a/phonelibs/zmq/aarch64/include/zframe.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6f3b444f0b237c105a7aaef90ba2e09609e5d06a5a278c6cc5a6b8a1aa6c9752 -size 6538 diff --git a/phonelibs/zmq/aarch64/include/zgossip.h b/phonelibs/zmq/aarch64/include/zgossip.h deleted file mode 100644 index c49417587d..0000000000 --- a/phonelibs/zmq/aarch64/include/zgossip.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:132f3c042ffc2a056405a6857a66ec6bfe40fad7edfc3229ef6b833407a0bfe3 -size 2964 diff --git a/phonelibs/zmq/aarch64/include/zhash.h b/phonelibs/zmq/aarch64/include/zhash.h deleted file mode 100644 index 6450c9a9fa..0000000000 --- a/phonelibs/zmq/aarch64/include/zhash.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ab662b94646bc2494e4c737c1ac00b9000badf2f487a16adfaeb6120a468d9d2 -size 8943 diff --git a/phonelibs/zmq/aarch64/include/zhashx.h b/phonelibs/zmq/aarch64/include/zhashx.h deleted file mode 100644 index 0c01c1e9db..0000000000 --- a/phonelibs/zmq/aarch64/include/zhashx.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c569d9e5b882da3c1d1eb5587f37e015299414fc21933d5438fc29c24a037bd6 -size 13767 diff --git a/phonelibs/zmq/aarch64/include/ziflist.h b/phonelibs/zmq/aarch64/include/ziflist.h deleted file mode 100644 index 0a01a19c62..0000000000 --- a/phonelibs/zmq/aarch64/include/ziflist.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3df305f973face711a307384a310bbe3d74afbd06fc263e4fe78e6886244df73 -size 2256 diff --git a/phonelibs/zmq/aarch64/include/zlist.h b/phonelibs/zmq/aarch64/include/zlist.h deleted file mode 100644 index 19376fb3d7..0000000000 --- a/phonelibs/zmq/aarch64/include/zlist.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:23ca4ea43fe89ef066c42c0524b21bb2f3857bda386f8df8109f69cb25f13cc4 -size 6202 diff --git a/phonelibs/zmq/aarch64/include/zlistx.h b/phonelibs/zmq/aarch64/include/zlistx.h deleted file mode 100644 index df1ab07816..0000000000 --- a/phonelibs/zmq/aarch64/include/zlistx.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:382c7fa2cfdcb3efdf1631ba6ba1f97bb03297c102cf6e629c3db8519e946a0e -size 8547 diff --git a/phonelibs/zmq/aarch64/include/zloop.h b/phonelibs/zmq/aarch64/include/zloop.h deleted file mode 100644 index f7835e89dd..0000000000 --- a/phonelibs/zmq/aarch64/include/zloop.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1c65b2148d5514638c2d30f0de3f0a29f334986142414bfb2548c20030ec1e46 -size 7460 diff --git a/phonelibs/zmq/aarch64/include/zmonitor.h b/phonelibs/zmq/aarch64/include/zmonitor.h deleted file mode 100644 index 21c138037f..0000000000 --- a/phonelibs/zmq/aarch64/include/zmonitor.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8c4004636f31648f98050e637daa231c70fcf4b64da326548b4f50dccba5ceb1 -size 1889 diff --git a/phonelibs/zmq/aarch64/include/zmonitor_v2.h b/phonelibs/zmq/aarch64/include/zmonitor_v2.h deleted file mode 100644 index a76fb49cfd..0000000000 --- a/phonelibs/zmq/aarch64/include/zmonitor_v2.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f50c065b82825f6cdaecd67cc70743c8e9a31e09dc5dfea120afcac4987d8027 -size 1582 diff --git a/phonelibs/zmq/aarch64/include/zmq.h b/phonelibs/zmq/aarch64/include/zmq.h deleted file mode 100644 index 0e65d39f49..0000000000 --- a/phonelibs/zmq/aarch64/include/zmq.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:033fd6f0e51b20d1d0d4667d4ddf9cfe0d389eafe65490436fe9a003d5e599a6 -size 22965 diff --git a/phonelibs/zmq/aarch64/include/zmq_utils.h b/phonelibs/zmq/aarch64/include/zmq_utils.h deleted file mode 100644 index 947923e6dd..0000000000 --- a/phonelibs/zmq/aarch64/include/zmq_utils.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:926abbe8a8ab28df17746ca5bf60440b799b391be172c406e0628cdef3788909 -size 2316 diff --git a/phonelibs/zmq/aarch64/include/zmsg.h b/phonelibs/zmq/aarch64/include/zmsg.h deleted file mode 100644 index 8224783105..0000000000 --- a/phonelibs/zmq/aarch64/include/zmsg.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d723e0a1422461be75780f3801477f36cadb09b03e2f4a3e81ada72a9c7fa59c -size 11698 diff --git a/phonelibs/zmq/aarch64/include/zmutex.h b/phonelibs/zmq/aarch64/include/zmutex.h deleted file mode 100644 index 4485f62e45..0000000000 --- a/phonelibs/zmq/aarch64/include/zmutex.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7678c6f6056ddfc4a58fddbb5fbd373755b7052fa704cce74a27aa7493aa75ca -size 1394 diff --git a/phonelibs/zmq/aarch64/include/zpoller.h b/phonelibs/zmq/aarch64/include/zpoller.h deleted file mode 100644 index 2e40b608d8..0000000000 --- a/phonelibs/zmq/aarch64/include/zpoller.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:15b35fe5fbcff5e58701a934724f54d367bfc9ba1bd80da59d9ac4db45dfb93a -size 3728 diff --git a/phonelibs/zmq/aarch64/include/zproc.h b/phonelibs/zmq/aarch64/include/zproc.h deleted file mode 100644 index a7df1e87a1..0000000000 --- a/phonelibs/zmq/aarch64/include/zproc.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:20171a7b330c3142a51b9c58c07221c4e1076505b88dc52319c3e4c761698838 -size 8135 diff --git a/phonelibs/zmq/aarch64/include/zproxy.h b/phonelibs/zmq/aarch64/include/zproxy.h deleted file mode 100644 index 04dd99d803..0000000000 --- a/phonelibs/zmq/aarch64/include/zproxy.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:61798dbd369cfefd3a90376818f628107bff9131d95cc8b444a924c28cb06115 -size 3889 diff --git a/phonelibs/zmq/aarch64/include/zproxy_v2.h b/phonelibs/zmq/aarch64/include/zproxy_v2.h deleted file mode 100644 index 72a3a1d522..0000000000 --- a/phonelibs/zmq/aarch64/include/zproxy_v2.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:630b2d19cd98817c3ec2893f398466cc55b2a26e71e88b3a05dd940a681e93da -size 1957 diff --git a/phonelibs/zmq/aarch64/include/zrex.h b/phonelibs/zmq/aarch64/include/zrex.h deleted file mode 100644 index 48f2dd4676..0000000000 --- a/phonelibs/zmq/aarch64/include/zrex.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5aa3120214f9fa79436f9b5ed4db050a5974d774dd99bd0e9bba13f70f04be6d -size 2903 diff --git a/phonelibs/zmq/aarch64/include/zsock.h b/phonelibs/zmq/aarch64/include/zsock.h deleted file mode 100644 index c0565456f7..0000000000 --- a/phonelibs/zmq/aarch64/include/zsock.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6d821c68a69e67bc787d692507c024f1227670e84a4a51bde821ddfa856f4321 -size 36671 diff --git a/phonelibs/zmq/aarch64/include/zsocket.h b/phonelibs/zmq/aarch64/include/zsocket.h deleted file mode 100644 index 7e1c8997cb..0000000000 --- a/phonelibs/zmq/aarch64/include/zsocket.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:47bc88aaba1b2672d38df07379ba23b79621ac3f6c29643f764171879588cda7 -size 3939 diff --git a/phonelibs/zmq/aarch64/include/zsockopt.h b/phonelibs/zmq/aarch64/include/zsockopt.h deleted file mode 100644 index abe090ca4e..0000000000 --- a/phonelibs/zmq/aarch64/include/zsockopt.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cf59f6989aa5437be9aee8b9577bcc0e784964e6013320767870898dcdf198d8 -size 14034 diff --git a/phonelibs/zmq/aarch64/include/zstr.h b/phonelibs/zmq/aarch64/include/zstr.h deleted file mode 100644 index b294826a00..0000000000 --- a/phonelibs/zmq/aarch64/include/zstr.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5c48b4b887c6bc47232c274eeef38d8e7956735e0a13aed7ac824df59583c0c6 -size 4710 diff --git a/phonelibs/zmq/aarch64/include/zsys.h b/phonelibs/zmq/aarch64/include/zsys.h deleted file mode 100644 index 944d89a777..0000000000 --- a/phonelibs/zmq/aarch64/include/zsys.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b0fb3776e0587966abb11f743aeea465ce7a25d50141b256c90b61b19c074770 -size 15888 diff --git a/phonelibs/zmq/aarch64/include/zthread.h b/phonelibs/zmq/aarch64/include/zthread.h deleted file mode 100644 index c917ec84ea..0000000000 --- a/phonelibs/zmq/aarch64/include/zthread.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:11d2ac5dd71c3babf3d7a50eae30ea8197576bfdffc91148217689992f60a74e -size 1624 diff --git a/phonelibs/zmq/aarch64/include/ztimerset.h b/phonelibs/zmq/aarch64/include/ztimerset.h deleted file mode 100644 index 4621e8f084..0000000000 --- a/phonelibs/zmq/aarch64/include/ztimerset.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:09649e6b235a6b2af50eb7e7644c38fd5132d16e4b63351affd7adf5009f06ad -size 3551 diff --git a/phonelibs/zmq/aarch64/include/ztrie.h b/phonelibs/zmq/aarch64/include/ztrie.h deleted file mode 100644 index 7f5f61c27b..0000000000 --- a/phonelibs/zmq/aarch64/include/ztrie.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:89dc6a1b5e09267704dc07ed986fb82b5057e51a4e7f0bf801cc204dedf9fb4e -size 4475 diff --git a/phonelibs/zmq/aarch64/include/zuuid.h b/phonelibs/zmq/aarch64/include/zuuid.h deleted file mode 100644 index 4676899834..0000000000 --- a/phonelibs/zmq/aarch64/include/zuuid.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6de67e7d53ebbffefe2c330bded67425df97d8bb5d79717d0227e3b6fb1899f9 -size 2790 diff --git a/phonelibs/zmq/aarch64/lib/libczmq.a b/phonelibs/zmq/aarch64/lib/libczmq.a deleted file mode 100644 index 55cd0425ab..0000000000 --- a/phonelibs/zmq/aarch64/lib/libczmq.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9618198e65b31e6816bc0aa7f72a22de06d402e0554e3e0d26ddf267fa18a5c8 -size 1344552 diff --git a/phonelibs/zmq/aarch64/lib/libczmq.la b/phonelibs/zmq/aarch64/lib/libczmq.la deleted file mode 100755 index 355cd5ffe2..0000000000 --- a/phonelibs/zmq/aarch64/lib/libczmq.la +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fced2688e3eba856e6419c392355c643520d6b61c0319a3671105709c73fe8b4 -size 1355 diff --git a/phonelibs/zmq/aarch64/lib/libczmq.so b/phonelibs/zmq/aarch64/lib/libczmq.so deleted file mode 100755 index 7c20ca1856..0000000000 --- a/phonelibs/zmq/aarch64/lib/libczmq.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b7804a57fad15a6464fe57d593f9922ff642bb4571b36e58195b0a03d68582d4 -size 688384 diff --git a/phonelibs/zmq/aarch64/lib/libzmq.a b/phonelibs/zmq/aarch64/lib/libzmq.a deleted file mode 100644 index a32cab1701..0000000000 --- a/phonelibs/zmq/aarch64/lib/libzmq.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d267f512e7c5e2247ce702a8cc7cb20cc08e2ffbeaa2495cb4915f7a771dfd4a -size 5113020 diff --git a/phonelibs/zmq/aarch64/lib/libzmq.la b/phonelibs/zmq/aarch64/lib/libzmq.la deleted file mode 100755 index 52f6129018..0000000000 --- a/phonelibs/zmq/aarch64/lib/libzmq.la +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b69dbd5282f4d3951c00e92fdc58a6635f0ae5b84649a1dc7dd9a0f2798287a2 -size 1104 diff --git a/phonelibs/zmq/aarch64/lib/libzmq.so b/phonelibs/zmq/aarch64/lib/libzmq.so deleted file mode 100755 index 18e2f3fb9f..0000000000 --- a/phonelibs/zmq/aarch64/lib/libzmq.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:08cc8a870269dc18f1f6351a88895d0d8479229c549b07752009e299a53911ac -size 1351000 diff --git a/phonelibs/zmq/arm/include/czmq.h b/phonelibs/zmq/arm/include/czmq.h deleted file mode 100644 index 10d64f8187..0000000000 --- a/phonelibs/zmq/arm/include/czmq.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:12af7932bddbb54cf2c2b24ae837c307080daa3370b8bc6dd7321ba06fd7a5fc -size 1110 diff --git a/phonelibs/zmq/arm/include/czmq_library.h b/phonelibs/zmq/arm/include/czmq_library.h deleted file mode 100644 index afd8bfc1de..0000000000 --- a/phonelibs/zmq/arm/include/czmq_library.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:288309c96a99f4df9bd439b8a60d305b2375d1a39e9a9905f90ab4fdc8b24f5f -size 6113 diff --git a/phonelibs/zmq/arm/include/czmq_prelude.h b/phonelibs/zmq/arm/include/czmq_prelude.h deleted file mode 100644 index ee430059f2..0000000000 --- a/phonelibs/zmq/arm/include/czmq_prelude.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6e32111326b91a16db1cd72af8520be7d1eda1f8427db67f3b6183523d1ea182 -size 18943 diff --git a/phonelibs/zmq/arm/include/zactor.h b/phonelibs/zmq/arm/include/zactor.h deleted file mode 100644 index b29ec9afe1..0000000000 --- a/phonelibs/zmq/arm/include/zactor.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f5e5e9e2086688abc765e0c13d6621b7648d0a5fe41446af777f9f192fbaeb29 -size 2473 diff --git a/phonelibs/zmq/arm/include/zarmour.h b/phonelibs/zmq/arm/include/zarmour.h deleted file mode 100644 index 44f6ba24fb..0000000000 --- a/phonelibs/zmq/arm/include/zarmour.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f9696bd0aea94f596a6ad7083b72e7fc30c31b0da16d5731225a31d1c2c4ee11 -size 3644 diff --git a/phonelibs/zmq/arm/include/zauth.h b/phonelibs/zmq/arm/include/zauth.h deleted file mode 100644 index 75fb8fd6c7..0000000000 --- a/phonelibs/zmq/arm/include/zauth.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2638f40e6ffeb60ea1ba6224c2589779e0d734340aa3e08b4a2821b08c25a94c -size 3612 diff --git a/phonelibs/zmq/arm/include/zauth_v2.h b/phonelibs/zmq/arm/include/zauth_v2.h deleted file mode 100644 index 4af41414c2..0000000000 --- a/phonelibs/zmq/arm/include/zauth_v2.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2674a57fc2593cb2ccdd8ab6e2e5776eb4ad648d503e769e6a8756c0bee104f1 -size 3449 diff --git a/phonelibs/zmq/arm/include/zbeacon.h b/phonelibs/zmq/arm/include/zbeacon.h deleted file mode 100644 index dd238d8abd..0000000000 --- a/phonelibs/zmq/arm/include/zbeacon.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c4212faea9f2a2f7ba343cc02987fd96deffe8e23dee35e2c0a088841abffecb -size 2856 diff --git a/phonelibs/zmq/arm/include/zbeacon_v2.h b/phonelibs/zmq/arm/include/zbeacon_v2.h deleted file mode 100644 index 65af279ea8..0000000000 --- a/phonelibs/zmq/arm/include/zbeacon_v2.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6ac3a8725076e0c821b40a09989ab354d0961ad75174adcee86ffb3b9c705226 -size 2326 diff --git a/phonelibs/zmq/arm/include/zcert.h b/phonelibs/zmq/arm/include/zcert.h deleted file mode 100644 index 6308f4cdc0..0000000000 --- a/phonelibs/zmq/arm/include/zcert.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4bf47e53573e20faacefe225463194ee6b3bb571cb122e56ddd2019537aacae0 -size 4811 diff --git a/phonelibs/zmq/arm/include/zcertstore.h b/phonelibs/zmq/arm/include/zcertstore.h deleted file mode 100644 index 0e4b7c87ff..0000000000 --- a/phonelibs/zmq/arm/include/zcertstore.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e153358fddb6a9dca76a8f46ab0db6aa8b729e9728491454304dabf77d306a7d -size 3993 diff --git a/phonelibs/zmq/arm/include/zchunk.h b/phonelibs/zmq/arm/include/zchunk.h deleted file mode 100644 index dc923ae56a..0000000000 --- a/phonelibs/zmq/arm/include/zchunk.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c5391efa3017a3fd4d90b73f661e43f0b0664052520f4f983b38766376521d7b -size 5899 diff --git a/phonelibs/zmq/arm/include/zclock.h b/phonelibs/zmq/arm/include/zclock.h deleted file mode 100644 index 2884660075..0000000000 --- a/phonelibs/zmq/arm/include/zclock.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7f3f0c545553e4cef2115043f5ba58f5c856889c215fe123ed95d46dae14dfa5 -size 2465 diff --git a/phonelibs/zmq/arm/include/zconfig.h b/phonelibs/zmq/arm/include/zconfig.h deleted file mode 100644 index 7e3dd18971..0000000000 --- a/phonelibs/zmq/arm/include/zconfig.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4faada45b4fc8316d139b0b18893582129fbcbdb79a03045b39f6871f63912a5 -size 6928 diff --git a/phonelibs/zmq/arm/include/zctx.h b/phonelibs/zmq/arm/include/zctx.h deleted file mode 100644 index e68fcbcb94..0000000000 --- a/phonelibs/zmq/arm/include/zctx.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f48cb2bc6175b27f0ac500b49acf9d519431c363972b3f4923b7695bff624730 -size 3520 diff --git a/phonelibs/zmq/arm/include/zdigest.h b/phonelibs/zmq/arm/include/zdigest.h deleted file mode 100644 index bce0ecf829..0000000000 --- a/phonelibs/zmq/arm/include/zdigest.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:22a41bbe93e99cca59fe8d1617fb27b336cd2c4f2d094b4eea95f98e3470fce3 -size 2069 diff --git a/phonelibs/zmq/arm/include/zdir.h b/phonelibs/zmq/arm/include/zdir.h deleted file mode 100644 index 6635303478..0000000000 --- a/phonelibs/zmq/arm/include/zdir.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4ea8ae429fee870ac8c605fe28adf604d7dd22109360f7c089471ec9f07f754d -size 6129 diff --git a/phonelibs/zmq/arm/include/zdir_patch.h b/phonelibs/zmq/arm/include/zdir_patch.h deleted file mode 100644 index 1157d28dca..0000000000 --- a/phonelibs/zmq/arm/include/zdir_patch.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bdf4336095870dba4e5fdb89a7867b26b61a879cf4c0631dab857ebbee79ff9f -size 2422 diff --git a/phonelibs/zmq/arm/include/zfile.h b/phonelibs/zmq/arm/include/zfile.h deleted file mode 100644 index 6c0b217987..0000000000 --- a/phonelibs/zmq/arm/include/zfile.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a66c39280771660524a50e359e2adc6f35df35a11d6cf7d922740e2d3b34e04a -size 6250 diff --git a/phonelibs/zmq/arm/include/zframe.h b/phonelibs/zmq/arm/include/zframe.h deleted file mode 100644 index 58a74b27c2..0000000000 --- a/phonelibs/zmq/arm/include/zframe.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6f3b444f0b237c105a7aaef90ba2e09609e5d06a5a278c6cc5a6b8a1aa6c9752 -size 6538 diff --git a/phonelibs/zmq/arm/include/zgossip.h b/phonelibs/zmq/arm/include/zgossip.h deleted file mode 100644 index c49417587d..0000000000 --- a/phonelibs/zmq/arm/include/zgossip.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:132f3c042ffc2a056405a6857a66ec6bfe40fad7edfc3229ef6b833407a0bfe3 -size 2964 diff --git a/phonelibs/zmq/arm/include/zhash.h b/phonelibs/zmq/arm/include/zhash.h deleted file mode 100644 index 6450c9a9fa..0000000000 --- a/phonelibs/zmq/arm/include/zhash.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ab662b94646bc2494e4c737c1ac00b9000badf2f487a16adfaeb6120a468d9d2 -size 8943 diff --git a/phonelibs/zmq/arm/include/zhashx.h b/phonelibs/zmq/arm/include/zhashx.h deleted file mode 100644 index 0c01c1e9db..0000000000 --- a/phonelibs/zmq/arm/include/zhashx.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c569d9e5b882da3c1d1eb5587f37e015299414fc21933d5438fc29c24a037bd6 -size 13767 diff --git a/phonelibs/zmq/arm/include/ziflist.h b/phonelibs/zmq/arm/include/ziflist.h deleted file mode 100644 index 0a01a19c62..0000000000 --- a/phonelibs/zmq/arm/include/ziflist.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3df305f973face711a307384a310bbe3d74afbd06fc263e4fe78e6886244df73 -size 2256 diff --git a/phonelibs/zmq/arm/include/zlist.h b/phonelibs/zmq/arm/include/zlist.h deleted file mode 100644 index 19376fb3d7..0000000000 --- a/phonelibs/zmq/arm/include/zlist.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:23ca4ea43fe89ef066c42c0524b21bb2f3857bda386f8df8109f69cb25f13cc4 -size 6202 diff --git a/phonelibs/zmq/arm/include/zlistx.h b/phonelibs/zmq/arm/include/zlistx.h deleted file mode 100644 index df1ab07816..0000000000 --- a/phonelibs/zmq/arm/include/zlistx.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:382c7fa2cfdcb3efdf1631ba6ba1f97bb03297c102cf6e629c3db8519e946a0e -size 8547 diff --git a/phonelibs/zmq/arm/include/zloop.h b/phonelibs/zmq/arm/include/zloop.h deleted file mode 100644 index f7835e89dd..0000000000 --- a/phonelibs/zmq/arm/include/zloop.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1c65b2148d5514638c2d30f0de3f0a29f334986142414bfb2548c20030ec1e46 -size 7460 diff --git a/phonelibs/zmq/arm/include/zmonitor.h b/phonelibs/zmq/arm/include/zmonitor.h deleted file mode 100644 index 21c138037f..0000000000 --- a/phonelibs/zmq/arm/include/zmonitor.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8c4004636f31648f98050e637daa231c70fcf4b64da326548b4f50dccba5ceb1 -size 1889 diff --git a/phonelibs/zmq/arm/include/zmonitor_v2.h b/phonelibs/zmq/arm/include/zmonitor_v2.h deleted file mode 100644 index a76fb49cfd..0000000000 --- a/phonelibs/zmq/arm/include/zmonitor_v2.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f50c065b82825f6cdaecd67cc70743c8e9a31e09dc5dfea120afcac4987d8027 -size 1582 diff --git a/phonelibs/zmq/arm/include/zmq.h b/phonelibs/zmq/arm/include/zmq.h deleted file mode 100644 index 0e65d39f49..0000000000 --- a/phonelibs/zmq/arm/include/zmq.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:033fd6f0e51b20d1d0d4667d4ddf9cfe0d389eafe65490436fe9a003d5e599a6 -size 22965 diff --git a/phonelibs/zmq/arm/include/zmq_utils.h b/phonelibs/zmq/arm/include/zmq_utils.h deleted file mode 100644 index 947923e6dd..0000000000 --- a/phonelibs/zmq/arm/include/zmq_utils.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:926abbe8a8ab28df17746ca5bf60440b799b391be172c406e0628cdef3788909 -size 2316 diff --git a/phonelibs/zmq/arm/include/zmsg.h b/phonelibs/zmq/arm/include/zmsg.h deleted file mode 100644 index 8224783105..0000000000 --- a/phonelibs/zmq/arm/include/zmsg.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d723e0a1422461be75780f3801477f36cadb09b03e2f4a3e81ada72a9c7fa59c -size 11698 diff --git a/phonelibs/zmq/arm/include/zmutex.h b/phonelibs/zmq/arm/include/zmutex.h deleted file mode 100644 index 4485f62e45..0000000000 --- a/phonelibs/zmq/arm/include/zmutex.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7678c6f6056ddfc4a58fddbb5fbd373755b7052fa704cce74a27aa7493aa75ca -size 1394 diff --git a/phonelibs/zmq/arm/include/zpoller.h b/phonelibs/zmq/arm/include/zpoller.h deleted file mode 100644 index 2e40b608d8..0000000000 --- a/phonelibs/zmq/arm/include/zpoller.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:15b35fe5fbcff5e58701a934724f54d367bfc9ba1bd80da59d9ac4db45dfb93a -size 3728 diff --git a/phonelibs/zmq/arm/include/zproc.h b/phonelibs/zmq/arm/include/zproc.h deleted file mode 100644 index a7df1e87a1..0000000000 --- a/phonelibs/zmq/arm/include/zproc.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:20171a7b330c3142a51b9c58c07221c4e1076505b88dc52319c3e4c761698838 -size 8135 diff --git a/phonelibs/zmq/arm/include/zproxy.h b/phonelibs/zmq/arm/include/zproxy.h deleted file mode 100644 index 04dd99d803..0000000000 --- a/phonelibs/zmq/arm/include/zproxy.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:61798dbd369cfefd3a90376818f628107bff9131d95cc8b444a924c28cb06115 -size 3889 diff --git a/phonelibs/zmq/arm/include/zproxy_v2.h b/phonelibs/zmq/arm/include/zproxy_v2.h deleted file mode 100644 index 72a3a1d522..0000000000 --- a/phonelibs/zmq/arm/include/zproxy_v2.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:630b2d19cd98817c3ec2893f398466cc55b2a26e71e88b3a05dd940a681e93da -size 1957 diff --git a/phonelibs/zmq/arm/include/zrex.h b/phonelibs/zmq/arm/include/zrex.h deleted file mode 100644 index 48f2dd4676..0000000000 --- a/phonelibs/zmq/arm/include/zrex.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5aa3120214f9fa79436f9b5ed4db050a5974d774dd99bd0e9bba13f70f04be6d -size 2903 diff --git a/phonelibs/zmq/arm/include/zsock.h b/phonelibs/zmq/arm/include/zsock.h deleted file mode 100644 index c0565456f7..0000000000 --- a/phonelibs/zmq/arm/include/zsock.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6d821c68a69e67bc787d692507c024f1227670e84a4a51bde821ddfa856f4321 -size 36671 diff --git a/phonelibs/zmq/arm/include/zsocket.h b/phonelibs/zmq/arm/include/zsocket.h deleted file mode 100644 index 7e1c8997cb..0000000000 --- a/phonelibs/zmq/arm/include/zsocket.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:47bc88aaba1b2672d38df07379ba23b79621ac3f6c29643f764171879588cda7 -size 3939 diff --git a/phonelibs/zmq/arm/include/zsockopt.h b/phonelibs/zmq/arm/include/zsockopt.h deleted file mode 100644 index abe090ca4e..0000000000 --- a/phonelibs/zmq/arm/include/zsockopt.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cf59f6989aa5437be9aee8b9577bcc0e784964e6013320767870898dcdf198d8 -size 14034 diff --git a/phonelibs/zmq/arm/include/zstr.h b/phonelibs/zmq/arm/include/zstr.h deleted file mode 100644 index b294826a00..0000000000 --- a/phonelibs/zmq/arm/include/zstr.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5c48b4b887c6bc47232c274eeef38d8e7956735e0a13aed7ac824df59583c0c6 -size 4710 diff --git a/phonelibs/zmq/arm/include/zsys.h b/phonelibs/zmq/arm/include/zsys.h deleted file mode 100644 index 944d89a777..0000000000 --- a/phonelibs/zmq/arm/include/zsys.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b0fb3776e0587966abb11f743aeea465ce7a25d50141b256c90b61b19c074770 -size 15888 diff --git a/phonelibs/zmq/arm/include/zthread.h b/phonelibs/zmq/arm/include/zthread.h deleted file mode 100644 index c917ec84ea..0000000000 --- a/phonelibs/zmq/arm/include/zthread.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:11d2ac5dd71c3babf3d7a50eae30ea8197576bfdffc91148217689992f60a74e -size 1624 diff --git a/phonelibs/zmq/arm/include/ztimerset.h b/phonelibs/zmq/arm/include/ztimerset.h deleted file mode 100644 index 4621e8f084..0000000000 --- a/phonelibs/zmq/arm/include/ztimerset.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:09649e6b235a6b2af50eb7e7644c38fd5132d16e4b63351affd7adf5009f06ad -size 3551 diff --git a/phonelibs/zmq/arm/include/ztrie.h b/phonelibs/zmq/arm/include/ztrie.h deleted file mode 100644 index 7f5f61c27b..0000000000 --- a/phonelibs/zmq/arm/include/ztrie.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:89dc6a1b5e09267704dc07ed986fb82b5057e51a4e7f0bf801cc204dedf9fb4e -size 4475 diff --git a/phonelibs/zmq/arm/include/zuuid.h b/phonelibs/zmq/arm/include/zuuid.h deleted file mode 100644 index 4676899834..0000000000 --- a/phonelibs/zmq/arm/include/zuuid.h +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6de67e7d53ebbffefe2c330bded67425df97d8bb5d79717d0227e3b6fb1899f9 -size 2790 diff --git a/phonelibs/zmq/arm/lib/libczmq.a b/phonelibs/zmq/arm/lib/libczmq.a deleted file mode 100644 index e14d1d6082..0000000000 --- a/phonelibs/zmq/arm/lib/libczmq.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9f23608f1521e443acb64bda0cb40a4da2405bed2fa29d8147c1e4c41e3037ec -size 865728 diff --git a/phonelibs/zmq/arm/lib/libczmq.so b/phonelibs/zmq/arm/lib/libczmq.so deleted file mode 100755 index dc17f719c3..0000000000 --- a/phonelibs/zmq/arm/lib/libczmq.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:923453f14924642719631db7bcd2713c5ad9fe9d7d877b6caf12a2b5f7ad89c4 -size 707900 diff --git a/phonelibs/zmq/arm/lib/libzmq.a b/phonelibs/zmq/arm/lib/libzmq.a deleted file mode 100644 index 247b33aa4f..0000000000 --- a/phonelibs/zmq/arm/lib/libzmq.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8d533d845bc5ad13a1649ae96be1eff98f2d9ddfe586cd3e05eeb088680bf592 -size 5617928 diff --git a/phonelibs/zmq/arm/lib/libzmq.so b/phonelibs/zmq/arm/lib/libzmq.so deleted file mode 100755 index d344f0f839..0000000000 --- a/phonelibs/zmq/arm/lib/libzmq.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2a97974f1f1d6df5cdbbccd4308209cc03d78e5104b26b18fbe822c33c7de10f -size 1268548 diff --git a/phonelibs/zmq/build.sh b/phonelibs/zmq/build.sh deleted file mode 100755 index b0effe6358..0000000000 --- a/phonelibs/zmq/build.sh +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2c521234ebfde5b82521ce8e45b12242ec6b7a0b2fd4fe0414da77ffd528817e -size 2199 diff --git a/phonelibs/zmq/build_aarch64.patch b/phonelibs/zmq/build_aarch64.patch deleted file mode 100644 index c143281710..0000000000 --- a/phonelibs/zmq/build_aarch64.patch +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:98644997824031aa9c80578ca644367d08960205a4186319fcad1008c95117a8 -size 881 diff --git a/phonelibs/zmq/build_linux.txt b/phonelibs/zmq/build_linux.txt deleted file mode 100644 index 9cc8223a4b..0000000000 --- a/phonelibs/zmq/build_linux.txt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:aa1eb0c0062676dd1a2234dbb66519d315a79d88ec2cd169ee78fe7bd10f6297 -size 178 diff --git a/phonelibs/zmq/mac/lib/libczmq.a b/phonelibs/zmq/mac/lib/libczmq.a deleted file mode 100644 index e90aabc4e7..0000000000 --- a/phonelibs/zmq/mac/lib/libczmq.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:824c6e80b2d9ba516ed8decbde32d1efc3af9d7aa76b17cdadafd88fc57d8185 -size 628352 diff --git a/phonelibs/zmq/mac/lib/libczmq.dylib b/phonelibs/zmq/mac/lib/libczmq.dylib deleted file mode 100644 index a1edde18b7..0000000000 --- a/phonelibs/zmq/mac/lib/libczmq.dylib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bbbe4404c8e722f3510f6b93d13a9c9eee5d580d46adf8596b03cb937514f695 -size 353580 diff --git a/phonelibs/zmq/mac/lib/libzmq.a b/phonelibs/zmq/mac/lib/libzmq.a deleted file mode 100644 index 75702bd047..0000000000 --- a/phonelibs/zmq/mac/lib/libzmq.a +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:96afefde9b258124554282860d64da173a032386fdfa1ffc4e6399c6adcc3a24 -size 1263200 diff --git a/phonelibs/zmq/mac/lib/libzmq.dylib b/phonelibs/zmq/mac/lib/libzmq.dylib deleted file mode 100755 index 3370e0ec83..0000000000 --- a/phonelibs/zmq/mac/lib/libzmq.dylib +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e706a9d0acf8fcedf2ff66dbcaa267f819651c712bc87559bd0a9c1d0b1dd554 -size 621868 diff --git a/requirements_openpilot.txt b/requirements_openpilot.txt deleted file mode 100644 index a36aa048eb..0000000000 --- a/requirements_openpilot.txt +++ /dev/null @@ -1,73 +0,0 @@ -# This are the packages installed on the EON --e git+https://github.com/commaai/le_python.git@5eef8f5be5929d33973e1b10e686fa0cdcd6792f#egg=Logentries --e git+https://github.com/commaai/python-overpy.git@f86529af402d4642e1faeb146671c40284007323#egg=overpy -Cython==0.27.3 -Flask==1.0.2 -#PyGObject==3.28.2 This is installed on the EON, but requires a ton of dependencies to install -PyJWT==1.4.1 -PyYAML==3.12 -appdirs==1.4.0 -atomicwrites==1.1.5 -attrs==16.0.0 -bitstring==3.1.5 -capnpy==0.4.2 -certifi==2016.8.31 -cffi==1.11.5 -contextlib2==0.5.4 -crc16==0.1.1 -crcmod==1.7 -cryptography==1.4 -cycler==0.10.0 -decorator==4.0.10 -docopt==0.6.2 -enum34==1.1.6 -evdev==0.6.1 -fastcluster==1.1.20 -filterpy==1.2.4 -hexdump==3.3 -ipaddress==1.0.16 -json-rpc==1.12.1 -libusb1==1.5.0 -lmdb==0.92 -mpmath==1.0.0 -nose==1.3.7 -numpy==1.11.1 -opencv-python==3.4.0.12 -pause==0.1.2 -psutil==3.4.2 -py==1.4.31 -pyOpenSSL==16.0.0 -pyasn1-modules==0.0.8 -pyasn1==0.1.9 -pycapnp==0.6.3 -pycparser==2.18 -pycrypto==2.6.1 -pyflakes==1.6.0 -pylint==1.8.3 -pyopencl==2016.1 -pyparsing==2.1.10 -#pypcap==1.1.5 needs extra dependencies and is not used -pyproj==1.9.5.1 -pypytools==0.4.3 -pyserial==3.1.1 -pytest==2.9.2 -python-dateutil==2.6.0 -pytools==2016.2.1 -pytz==2016.10 -pyyaml==3.12 -pyzmq==15.4.0 -raven==5.23.0 -recordclass==0.4.1 -requests==2.10.0 -scipy==0.19.1 -service-identity==16.0.0 -setproctitle==1.1.10 -simplejson==3.8.2 -six==1.10.0 -smbus-cffi==0.5.1 -smbus2==0.2.0 -sympy==1.1.1 -tqdm==4.23.1 -ujson==1.35 -v4l2==0.2 -websocket_client==0.55.0 diff --git a/selfdrive/athena/athenad.py b/selfdrive/athena/athenad.py index 2671672c52..58918de81a 100755 --- a/selfdrive/athena/athenad.py +++ b/selfdrive/athena/athenad.py @@ -65,10 +65,9 @@ def jsonrpc_handler(end_event): # TODO: add service to, for example, start visiond and take a picture @dispatcher.add_method def getMessage(service=None, timeout=1000): - context = zmq.Context() if service is None or service not in service_list: raise Exception("invalid service") - socket = messaging.sub_sock(context, service_list[service].port) + socket = messaging.sub_sock(service_list[service].port) socket.setsockopt(zmq.RCVTIMEO, timeout) ret = messaging.recv_one(socket) return ret.to_dict() diff --git a/selfdrive/boardd/Makefile b/selfdrive/boardd/Makefile index 18d0571093..c6b5f21910 100644 --- a/selfdrive/boardd/Makefile +++ b/selfdrive/boardd/Makefile @@ -16,14 +16,11 @@ WARN_FLAGS = -Werror=implicit-function-declaration \ CFLAGS = -std=gnu11 -g -fPIC -I../ -I../../ -O2 $(WARN_FLAGS) CXXFLAGS = -std=c++11 -g -fPIC -I../ -I../../ -O2 $(WARN_FLAGS) -ZMQ_FLAGS = -I$(PHONELIBS)/zmq/aarch64/include -ZMQ_LIBS = -L$(PHONELIBS)/zmq/aarch64/lib \ - -l:libczmq.a -l:libzmq.a \ - -lgnustl_shared +ZMQ_LIBS = -l:libczmq.a -l:libzmq.a -lgnustl_shared JSON_FLAGS = -I$(PHONELIBS)/json/src -EXTRA_LIBS = -lusb +EXTRA_LIBS = -lusb-1.0 # ifeq ($(OS),GNU/Linux) # # for Drive PX2 @@ -31,8 +28,14 @@ EXTRA_LIBS = -lusb # CEREAL_LIBS = -lcapnp -lkj -lcapnp_c # EXTRA_LIBS = -lusb-1.0 -lpthread # endif +ifeq ($(ARCH),aarch64) +CFLAGS += -mcpu=cortex-a57 +CXXFLAGS += -mcpu=cortex-a57 +endif + ifeq ($(ARCH),x86_64) +ZMQ_FLAGS = -I$(PHONELIBS)/zmq/aarch64/include ZMQ_LIBS = -L$(BASEDIR)/external/zmq/lib/ \ -l:libczmq.a -l:libzmq.a EXTRA_LIBS = -lusb-1.0 -lpthread @@ -75,7 +78,7 @@ boardd.o: boardd.cc boardd_api_impl.so: libcan_list_to_can_capnp.a boardd_api_impl.pyx boardd_setup.py - python boardd_setup.py build_ext --inplace + python2 boardd_setup.py build_ext --inplace rm -rf build rm -f boardd_api_impl.cpp diff --git a/selfdrive/boardd/boardd.cc b/selfdrive/boardd/boardd.cc index 3ee867083f..1a64416e9f 100644 --- a/selfdrive/boardd/boardd.cc +++ b/selfdrive/boardd/boardd.cc @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include "cereal/gen/cpp/log.capnp.h" @@ -96,37 +96,37 @@ void *safety_setter_thread(void *s) { int safety_setting = 0; switch (safety_model) { - case (int)cereal::CarParams::SafetyModels::NO_OUTPUT: + case cereal::CarParams::SafetyModel::NO_OUTPUT: safety_setting = SAFETY_NOOUTPUT; break; - case (int)cereal::CarParams::SafetyModels::HONDA: + case cereal::CarParams::SafetyModel::HONDA: safety_setting = SAFETY_HONDA; break; - case (int)cereal::CarParams::SafetyModels::TOYOTA: + case cereal::CarParams::SafetyModel::TOYOTA: safety_setting = SAFETY_TOYOTA; break; - case (int)cereal::CarParams::SafetyModels::ELM327: + case cereal::CarParams::SafetyModel::ELM327: safety_setting = SAFETY_ELM327; break; - case (int)cereal::CarParams::SafetyModels::GM: + case cereal::CarParams::SafetyModel::GM: safety_setting = SAFETY_GM; break; - case (int)cereal::CarParams::SafetyModels::HONDA_BOSCH: + case cereal::CarParams::SafetyModel::HONDA_BOSCH: safety_setting = SAFETY_HONDA_BOSCH; break; - case (int)cereal::CarParams::SafetyModels::FORD: + case cereal::CarParams::SafetyModel::FORD: safety_setting = SAFETY_FORD; break; - case (int)cereal::CarParams::SafetyModels::CADILLAC: + case cereal::CarParams::SafetyModel::CADILLAC: safety_setting = SAFETY_CADILLAC; break; - case (int)cereal::CarParams::SafetyModels::HYUNDAI: + case cereal::CarParams::SafetyModel::HYUNDAI: safety_setting = SAFETY_HYUNDAI; break; - case (int)cereal::CarParams::SafetyModels::CHRYSLER: + case cereal::CarParams::SafetyModel::CHRYSLER: safety_setting = SAFETY_CHRYSLER; break; - case (int)cereal::CarParams::SafetyModels::SUBARU: + case cereal::CarParams::SafetyModel::SUBARU: safety_setting = SAFETY_SUBARU; break; default: diff --git a/selfdrive/boardd/boardd_api_impl.pyx b/selfdrive/boardd/boardd_api_impl.pyx index 75aa1081c3..eddf1fbf7a 100644 --- a/selfdrive/boardd/boardd_api_impl.pyx +++ b/selfdrive/boardd/boardd_api_impl.pyx @@ -9,9 +9,9 @@ cdef struct can_frame: long busTime long src -cdef extern void can_list_to_can_capnp_cpp(const vector[can_frame] &can_list, string &out, bool sendCan) +cdef extern void can_list_to_can_capnp_cpp(const vector[can_frame] &can_list, string &out, bool sendCan, bool valid) -def can_list_to_can_capnp(can_msgs, msgtype='can'): +def can_list_to_can_capnp(can_msgs, msgtype='can', valid=True): cdef vector[can_frame] can_list cdef can_frame f for can_msg in can_msgs: @@ -21,5 +21,5 @@ def can_list_to_can_capnp(can_msgs, msgtype='can'): f.src = can_msg[3] can_list.push_back(f) cdef string out - can_list_to_can_capnp_cpp(can_list, out, msgtype == 'sendcan') + can_list_to_can_capnp_cpp(can_list, out, msgtype == 'sendcan', valid) return out diff --git a/selfdrive/boardd/can_list_to_can_capnp.cc b/selfdrive/boardd/can_list_to_can_capnp.cc index 3850474100..8ba9d3d560 100644 --- a/selfdrive/boardd/can_list_to_can_capnp.cc +++ b/selfdrive/boardd/can_list_to_can_capnp.cc @@ -15,10 +15,11 @@ typedef struct { extern "C" { -void can_list_to_can_capnp_cpp(const std::vector &can_list, std::string &out, bool sendCan) { +void can_list_to_can_capnp_cpp(const std::vector &can_list, std::string &out, bool sendCan, bool valid) { capnp::MallocMessageBuilder msg; cereal::Event::Builder event = msg.initRoot(); event.setLogMonoTime(nanos_since_boot()); + event.setValid(valid); auto canData = sendCan ? event.initSendcan(can_list.size()) : event.initCan(can_list.size()); int j = 0; diff --git a/selfdrive/boardd/tests/boardd_old.py b/selfdrive/boardd/tests/boardd_old.py index 9ce5f7f3e1..5989e62746 100755 --- a/selfdrive/boardd/tests/boardd_old.py +++ b/selfdrive/boardd/tests/boardd_old.py @@ -8,7 +8,6 @@ import os import struct -import zmq import time import selfdrive.messaging as messaging @@ -113,12 +112,11 @@ def can_init(): cloudlog.info("can init done") def boardd_mock_loop(): - context = zmq.Context() can_init() handle.controlWrite(0x40, 0xdc, SAFETY_ALLOUTPUT, 0, b'') - logcan = messaging.sub_sock(context, service_list['can'].port) - sendcan = messaging.pub_sock(context, service_list['sendcan'].port) + logcan = messaging.sub_sock(service_list['can'].port) + sendcan = messaging.pub_sock(service_list['sendcan'].port) while 1: tsc = messaging.drain_sock(logcan, wait_for_one=True) @@ -126,12 +124,19 @@ def boardd_mock_loop(): snd = [] for s in snds: snd += s - snd = filter(lambda x: x[-1] <= 1, snd) + snd = filter(lambda x: x[-1] <= 2, snd) + snd_0 = len(filter(lambda x: x[-1] == 0, snd)) + snd_1 = len(filter(lambda x: x[-1] == 1, snd)) + snd_2 = len(filter(lambda x: x[-1] == 2, snd)) can_send_many(snd) # recv @ 100hz can_msgs = can_recv() - print("sent %d got %d" % (len(snd), len(can_msgs))) + got_0 = len(filter(lambda x: x[-1] == 0+0x80, can_msgs)) + got_1 = len(filter(lambda x: x[-1] == 1+0x80, can_msgs)) + got_2 = len(filter(lambda x: x[-1] == 2+0x80, can_msgs)) + print("sent %3d (%3d/%3d/%3d) got %3d (%3d/%3d/%3d)" % + (len(snd), snd_0, snd_1, snd_2, len(can_msgs), got_0, got_1, got_2)) m = can_list_to_can_capnp(can_msgs, msgtype='sendcan') sendcan.send(m.to_bytes()) @@ -151,16 +156,15 @@ def boardd_test_loop(): # *** main loop *** def boardd_loop(rate=200): rk = Ratekeeper(rate) - context = zmq.Context() can_init() # *** publishes can and health - logcan = messaging.pub_sock(context, service_list['can'].port) - health_sock = messaging.pub_sock(context, service_list['health'].port) + logcan = messaging.pub_sock(service_list['can'].port) + health_sock = messaging.pub_sock(service_list['health'].port) # *** subscribes to can send - sendcan = messaging.sub_sock(context, service_list['sendcan'].port) + sendcan = messaging.sub_sock(service_list['sendcan'].port) # drain sendcan to delete any stale messages from previous runs messaging.drain_sock(sendcan) @@ -199,14 +203,13 @@ def boardd_loop(rate=200): # *** main loop *** def boardd_proxy_loop(rate=200, address="192.168.2.251"): rk = Ratekeeper(rate) - context = zmq.Context() can_init() # *** subscribes can - logcan = messaging.sub_sock(context, service_list['can'].port, addr=address) + logcan = messaging.sub_sock(service_list['can'].port, addr=address) # *** publishes to can send - sendcan = messaging.pub_sock(context, service_list['sendcan'].port) + sendcan = messaging.pub_sock(service_list['sendcan'].port) # drain sendcan to delete any stale messages from previous runs messaging.drain_sock(sendcan) diff --git a/selfdrive/boardd/tests/replay_many.py b/selfdrive/boardd/tests/replay_many.py new file mode 100755 index 0000000000..710cfee486 --- /dev/null +++ b/selfdrive/boardd/tests/replay_many.py @@ -0,0 +1,54 @@ +#!/usr/bin/env python +import sys +import time +import signal +from panda import Panda +from multiprocessing import Pool + +import selfdrive.messaging as messaging +from selfdrive.services import service_list +from selfdrive.boardd.boardd import can_capnp_to_can_list + +def initializer(): + """Ignore CTRL+C in the worker process. + source: https://stackoverflow.com/a/44869451 """ + signal.signal(signal.SIGINT, signal.SIG_IGN) + +def send_thread(serial): + panda = Panda(serial) + panda.set_safety_mode(Panda.SAFETY_ALLOUTPUT) + panda.set_can_loopback(False) + + can_sock = messaging.sub_sock(service_list['can'].port) + + while True: + # Send messages one bus 0 and 1 + tsc = messaging.recv_one(can_sock) + snd = can_capnp_to_can_list(tsc.can) + snd = filter(lambda x: x[-1] <= 2, snd) + panda.can_send_many(snd) + + # Drain panda message buffer + panda.can_recv() + + +if __name__ == "__main__": + serials = Panda.list() + num_pandas = len(serials) + + if num_pandas == 0: + print("No pandas found. Exiting") + sys.exit(1) + else: + print("%d pandas found. Starting broadcast" % num_pandas) + + pool = Pool(num_pandas, initializer=initializer) + pool.map_async(send_thread, serials) + + while True: + try: + time.sleep(10) + except KeyboardInterrupt: + pool.terminate() + pool.join() + raise diff --git a/selfdrive/boardd/tests/test_boardd_loopback.py b/selfdrive/boardd/tests/test_boardd_loopback.py index 1b6f1b1387..042a5783a5 100755 --- a/selfdrive/boardd/tests/test_boardd_loopback.py +++ b/selfdrive/boardd/tests/test_boardd_loopback.py @@ -3,7 +3,6 @@ import os import random -import zmq import time from selfdrive.boardd.boardd import can_list_to_can_capnp @@ -16,10 +15,8 @@ def get_test_string(): BUS = 0 def main(): - context = zmq.Context() - - rcv = sub_sock(context, service_list['can'].port) # port 8006 - snd = pub_sock(context, service_list['sendcan'].port) # port 8017 + rcv = sub_sock(service_list['can'].port) # port 8006 + snd = pub_sock(service_list['sendcan'].port) # port 8017 time.sleep(0.3) # wait to bind before send/recv for i in range(10): diff --git a/selfdrive/can/Makefile b/selfdrive/can/Makefile index 918c445288..e53a0730de 100644 --- a/selfdrive/can/Makefile +++ b/selfdrive/can/Makefile @@ -18,6 +18,11 @@ CFLAGS = -std=gnu11 -g -fPIC -O2 $(WARN_FLAGS) CXXFLAGS = -std=c++11 -g -fPIC -O2 $(WARN_FLAGS) LDFLAGS = +ifeq ($(ARCH),aarch64) +CFLAGS += -mcpu=cortex-a57 +CXXFLAGS += -mcpu=cortex-a57 +endif + ifeq ($(UNAME_S),Darwin) ZMQ_LIBS = -L/usr/local/lib -lzmq else ifeq ($(OPTEST),1) @@ -26,14 +31,12 @@ else ifeq ($(UNAME_M),x86_64) ZMQ_FLAGS = -I$(PHONELIBS)/zmq/x64/include ZMQ_LIBS = -L$(PHONELIBS)/zmq/x64/lib -l:libzmq.a else ifeq ($(UNAME_M),aarch64) - ZMQ_FLAGS = -I$(PHONELIBS)/zmq/aarch64/include - ZMQ_LIBS = -L$(PHONELIBS)/zmq/aarch64/lib -l:libzmq.a - LDFLAGS += -lgnustl_shared + ZMQ_LIBS = -l:libzmq.a -lgnustl_shared endif OBJDIR = obj -OPENDBC_PATH := $(shell python -c 'import opendbc; print opendbc.DBC_PATH') +OPENDBC_PATH := $(shell python2 -c 'import opendbc; print opendbc.DBC_PATH') DBC_SOURCES := $(wildcard $(OPENDBC_PATH)/*.dbc) DBC_OBJS := $(patsubst $(OPENDBC_PATH)/%.dbc,$(OBJDIR)/%.o,$(DBC_SOURCES)) @@ -45,7 +48,7 @@ LIBDBC_OBJS := $(OBJDIR)/dbc.o $(OBJDIR)/parser.o $(OBJDIR)/packer.o CWD := $(shell pwd) .PHONY: all -all: $(OBJDIR) libdbc.so +all: $(OBJDIR) libdbc.so parser_pyx.so include ../common/cereal.mk @@ -67,10 +70,15 @@ libdbc.so:: $(LIBDBC_OBJS) $(DBC_OBJS) $(CEREAL_LIBS) packer_impl.so: packer_impl.pyx packer_setup.py - python packer_setup.py build_ext --inplace + python2 packer_setup.py build_ext --inplace rm -rf build rm -f packer_impl.cpp +parser_pyx.so: parser_pyx_setup.py parser_pyx.pyx parser_pyx.pxd + python $< build_ext --inplace + rm -rf build + rm -f parser_pyx.cpp + $(OBJDIR)/%.o: %.cc @echo "[ CXX ] $@" $(CXX) -fPIC -c -o '$@' $^ \ @@ -90,7 +98,7 @@ $(OBJDIR)/%.o: dbc_out/%.cc dbc_out/%.cc: process_dbc.py dbc_template.cc $(OPENDBC_PATH)/%.dbc @echo "[ DBC GEN ] $@" @echo "Missing prereq $?" - PYTHONPATH=$(PYTHONPATH):$(CWD)/../../pyextra ./process_dbc.py $(OPENDBC_PATH) dbc_out + ./process_dbc.py $(OPENDBC_PATH) dbc_out $(OBJDIR): mkdir -p $@ diff --git a/selfdrive/can/can_define.py b/selfdrive/can/can_define.py new file mode 100644 index 0000000000..48ff8798fd --- /dev/null +++ b/selfdrive/can/can_define.py @@ -0,0 +1,39 @@ +from collections import defaultdict +from selfdrive.can.libdbc_py import libdbc, ffi + +class CANDefine(object): + def __init__(self, dbc_name): + self.dv = defaultdict(dict) + self.dbc_name = dbc_name + self.dbc = libdbc.dbc_lookup(dbc_name) + + num_vals = self.dbc[0].num_vals + + self.address_to_msg_name = {} + num_msgs = self.dbc[0].num_msgs + for i in range(num_msgs): + msg = self.dbc[0].msgs[i] + name = ffi.string(msg.name) + address = msg.address + self.address_to_msg_name[address] = name + + for i in range(num_vals): + val = self.dbc[0].vals[i] + + sgname = ffi.string(val.name) + address = val.address + def_val = ffi.string(val.def_val) + + #separate definition/value pairs + def_val = def_val.split() + values = [int(v) for v in def_val[::2]] + defs = def_val[1::2] + + if address not in self.dv: + self.dv[address] = {} + msgname = self.address_to_msg_name[address] + self.dv[msgname] = {} + + # two ways to lookup: address or msg name + self.dv[address][sgname] = {v: d for v, d in zip(values, defs)} #build dict + self.dv[msgname][sgname] = self.dv[address][sgname] diff --git a/selfdrive/can/parser.cc b/selfdrive/can/parser.cc index eb828cd8ee..e3225181ba 100644 --- a/selfdrive/can/parser.cc +++ b/selfdrive/can/parser.cc @@ -416,6 +416,17 @@ void* can_init(int bus, const char* dbc_name, return (void*)ret; } +void* can_init_with_vectors(int bus, const char* dbc_name, + std::vector message_options, + std::vector signal_options, + bool sendcan, const char* tcp_addr, int timeout) { + CANParser* ret = new CANParser(bus, std::string(dbc_name), + message_options, + signal_options, + sendcan, std::string(tcp_addr), timeout); + return (void*)ret; +} + int can_update(void* can, uint64_t sec, bool wait) { CANParser* cp = (CANParser*)can; return cp->update(sec, wait); @@ -435,6 +446,14 @@ size_t can_query(void* can, uint64_t sec, bool *out_can_valid, size_t out_values return values.size(); }; +void can_query_vector(void* can, uint64_t sec, bool *out_can_valid, std::vector &values) { + CANParser* cp = (CANParser*)can; + if (out_can_valid) { + *out_can_valid = cp->can_valid; + } + values = cp->query(sec); +}; + } #ifdef TEST diff --git a/selfdrive/can/parser.py b/selfdrive/can/parser.py index 31af2df04e..b8b2061dc9 100644 --- a/selfdrive/can/parser.py +++ b/selfdrive/can/parser.py @@ -1,252 +1,9 @@ -import time -from collections import defaultdict -import numbers +import os +import subprocess -from selfdrive.can.libdbc_py import libdbc, ffi +can_dir = os.path.dirname(os.path.abspath(__file__)) +libdbc_fn = os.path.join(can_dir, "libdbc.so") +subprocess.check_call(["make"], cwd=can_dir) - -class CANParser(object): - def __init__(self, dbc_name, signals, checks=None, bus=0, sendcan=False, tcp_addr="127.0.0.1", timeout=-1): - if checks is None: - checks = [] - - self.can_valid = True - self.vl = defaultdict(dict) - self.ts = defaultdict(dict) - - self.dbc_name = dbc_name - self.dbc = libdbc.dbc_lookup(dbc_name) - self.msg_name_to_addres = {} - self.address_to_msg_name = {} - - num_msgs = self.dbc[0].num_msgs - for i in range(num_msgs): - msg = self.dbc[0].msgs[i] - - name = ffi.string(msg.name) - address = msg.address - - self.msg_name_to_addres[name] = address - self.address_to_msg_name[address] = name - - # Convert message names into addresses - for i in range(len(signals)): - s = signals[i] - if not isinstance(s[1], numbers.Number): - s = (s[0], self.msg_name_to_addres[s[1]], s[2]) - signals[i] = s - - for i in range(len(checks)): - c = checks[i] - if not isinstance(c[0], numbers.Number): - c = (self.msg_name_to_addres[c[0]], c[1]) - checks[i] = c - - sig_names = dict((name, ffi.new("char[]", name)) for name, _, _ in signals) - - signal_options_c = ffi.new("SignalParseOptions[]", [ - { - 'address': sig_address, - 'name': sig_names[sig_name], - 'default_value': sig_default, - } for sig_name, sig_address, sig_default in signals]) - - message_options = dict((address, 0) for _, address, _ in signals) - message_options.update(dict(checks)) - - message_options_c = ffi.new("MessageParseOptions[]", [ - { - 'address': msg_address, - 'check_frequency': freq, - } for msg_address, freq in message_options.items()]) - - self.can = libdbc.can_init(bus, dbc_name, len(message_options_c), message_options_c, - len(signal_options_c), signal_options_c, sendcan, tcp_addr, timeout) - - self.p_can_valid = ffi.new("bool*") - - value_count = libdbc.can_query(self.can, 0, self.p_can_valid, 0, ffi.NULL) - self.can_values = ffi.new("SignalValue[%d]" % value_count) - self.update_vl(0) - # print("===") - - def update_vl(self, sec): - - can_values_len = libdbc.can_query(self.can, sec, self.p_can_valid, len(self.can_values), self.can_values) - assert can_values_len <= len(self.can_values) - - self.can_valid = self.p_can_valid[0] - - # print(can_values_len) - ret = set() - for i in xrange(can_values_len): - cv = self.can_values[i] - address = cv.address - # print("{0} {1}".format(hex(cv.address), ffi.string(cv.name))) - name = ffi.string(cv.name) - self.vl[address][name] = cv.value - self.ts[address][name] = cv.ts - - sig_name = self.address_to_msg_name[address] - self.vl[sig_name][name] = cv.value - self.ts[sig_name][name] = cv.ts - ret.add(address) - return ret - - def update(self, sec, wait): - """Returns if the update was successfull (e.g. no rcv timeout happened)""" - r = libdbc.can_update(self.can, sec, wait) - return bool(r >= 0), self.update_vl(sec) - - -class CANDefine(object): - def __init__(self, dbc_name): - self.dv = defaultdict(dict) - self.dbc_name = dbc_name - self.dbc = libdbc.dbc_lookup(dbc_name) - - num_vals = self.dbc[0].num_vals - - self.address_to_msg_name = {} - num_msgs = self.dbc[0].num_msgs - for i in range(num_msgs): - msg = self.dbc[0].msgs[i] - name = ffi.string(msg.name) - address = msg.address - self.address_to_msg_name[address] = name - - for i in range(num_vals): - val = self.dbc[0].vals[i] - - sgname = ffi.string(val.name) - address = val.address - def_val = ffi.string(val.def_val) - - #separate definition/value pairs - def_val = def_val.split() - values = [int(v) for v in def_val[::2]] - defs = def_val[1::2] - - if address not in self.dv: - self.dv[address] = {} - msgname = self.address_to_msg_name[address] - self.dv[msgname] = {} - - # two ways to lookup: address or msg name - self.dv[address][sgname] = {v: d for v, d in zip(values, defs)} #build dict - self.dv[msgname][sgname] = self.dv[address][sgname] - - -if __name__ == "__main__": - from common.realtime import sec_since_boot - - radar_messages = range(0x430, 0x43A) + range(0x440, 0x446) - # signals = zip(['LONG_DIST'] * 16 + ['NEW_TRACK'] * 16 + ['LAT_DIST'] * 16 + - # ['REL_SPEED'] * 16, radar_messages * 4, - # [255] * 16 + [1] * 16 + [0] * 16 + [0] * 16) - # checks = zip(radar_messages, [20]*16) - - # cp = CANParser("acura_ilx_2016_nidec", signals, checks, 1) - - - # signals = [ - # ("XMISSION_SPEED", 0x158, 0), #sig_name, sig_address, default - # ("WHEEL_SPEED_FL", 0x1d0, 0), - # ("WHEEL_SPEED_FR", 0x1d0, 0), - # ("WHEEL_SPEED_RL", 0x1d0, 0), - # ("STEER_ANGLE", 0x14a, 0), - # ("STEER_TORQUE_SENSOR", 0x18f, 0), - # ("GEAR", 0x191, 0), - # ("WHEELS_MOVING", 0x1b0, 1), - # ("DOOR_OPEN_FL", 0x405, 1), - # ("DOOR_OPEN_FR", 0x405, 1), - # ("DOOR_OPEN_RL", 0x405, 1), - # ("DOOR_OPEN_RR", 0x405, 1), - # ("CRUISE_SPEED_PCM", 0x324, 0), - # ("SEATBELT_DRIVER_LAMP", 0x305, 1), - # ("SEATBELT_DRIVER_LATCHED", 0x305, 0), - # ("BRAKE_PRESSED", 0x17c, 0), - # ("CAR_GAS", 0x130, 0), - # ("CRUISE_BUTTONS", 0x296, 0), - # ("ESP_DISABLED", 0x1a4, 1), - # ("HUD_LEAD", 0x30c, 0), - # ("USER_BRAKE", 0x1a4, 0), - # ("STEER_STATUS", 0x18f, 5), - # ("WHEEL_SPEED_RR", 0x1d0, 0), - # ("BRAKE_ERROR_1", 0x1b0, 1), - # ("BRAKE_ERROR_2", 0x1b0, 1), - # ("GEAR_SHIFTER", 0x191, 0), - # ("MAIN_ON", 0x326, 0), - # ("ACC_STATUS", 0x17c, 0), - # ("PEDAL_GAS", 0x17c, 0), - # ("CRUISE_SETTING", 0x296, 0), - # ("LEFT_BLINKER", 0x326, 0), - # ("RIGHT_BLINKER", 0x326, 0), - # ("COUNTER", 0x324, 0), - # ("ENGINE_RPM", 0x17C, 0) - # ] - # checks = [ - # (0x14a, 100), # address, frequency - # (0x158, 100), - # (0x17c, 100), - # (0x191, 100), - # (0x1a4, 50), - # (0x326, 10), - # (0x1b0, 50), - # (0x1d0, 50), - # (0x305, 10), - # (0x324, 10), - # (0x405, 3), - # ] - - # cp = CANParser("honda_civic_touring_2016_can_generated", signals, checks, 0) - - - signals = [ - # sig_name, sig_address, default - ("GEAR", 956, 0x20), - ("BRAKE_PRESSED", 548, 0), - ("GAS_PEDAL", 705, 0), - - ("WHEEL_SPEED_FL", 170, 0), - ("WHEEL_SPEED_FR", 170, 0), - ("WHEEL_SPEED_RL", 170, 0), - ("WHEEL_SPEED_RR", 170, 0), - ("DOOR_OPEN_FL", 1568, 1), - ("DOOR_OPEN_FR", 1568, 1), - ("DOOR_OPEN_RL", 1568, 1), - ("DOOR_OPEN_RR", 1568, 1), - ("SEATBELT_DRIVER_UNLATCHED", 1568, 1), - ("TC_DISABLED", 951, 1), - ("STEER_ANGLE", 37, 0), - ("STEER_FRACTION", 37, 0), - ("STEER_RATE", 37, 0), - ("GAS_RELEASED", 466, 0), - ("CRUISE_STATE", 466, 0), - ("MAIN_ON", 467, 0), - ("SET_SPEED", 467, 0), - ("STEER_TORQUE_DRIVER", 608, 0), - ("STEER_TORQUE_EPS", 608, 0), - ("TURN_SIGNALS", 1556, 3), # 3 is no blinkers - ("LKA_STATE", 610, 0), - ] - checks = [ - (548, 40), - (705, 33), - - (170, 80), - (37, 80), - (466, 33), - (608, 50), - ] - - cp = CANParser("toyota_rav4_2017_pt_generated", signals, checks, 0) - - # print(cp.vl) - - while True: - cp.update(int(sec_since_boot()*1e9), True) - # print(cp.vl) - print(cp.ts) - print(cp.can_valid) - time.sleep(0.01) +from selfdrive.can.parser_pyx import CANParser # pylint: disable=no-name-in-module, import-error +assert CANParser diff --git a/selfdrive/can/parser_pyx.pxd b/selfdrive/can/parser_pyx.pxd new file mode 100644 index 0000000000..9d8efa318c --- /dev/null +++ b/selfdrive/can/parser_pyx.pxd @@ -0,0 +1,92 @@ +# distutils: language = c++ +from libc.stdint cimport uint32_t, uint64_t, uint16_t +from libcpp.vector cimport vector +from libcpp.map cimport map +from libcpp.string cimport string +from libcpp.unordered_set cimport unordered_set +from libcpp cimport bool + +ctypedef enum SignalType: + DEFAULT, + HONDA_CHECKSUM, + HONDA_COUNTER, + TOYOTA_CHECKSUM, + PEDAL_CHECKSUM, + PEDAL_COUNTER + +cdef struct Signal: + const char* name + int b1, b2, bo + bool is_signed + double factor, offset + SignalType type + + + +cdef struct Msg: + const char* name + uint32_t address + unsigned int size + size_t num_sigs + const Signal *sigs + +cdef struct Val: + const char* name + uint32_t address + const char* def_val + const Signal *sigs + +cdef struct DBC: + const char* name + size_t num_msgs + const Msg *msgs + const Val *vals + size_t num_vals + +cdef struct SignalParseOptions: + uint32_t address + const char* name + double default_value + + +cdef struct MessageParseOptions: + uint32_t address + int check_frequency + +cdef struct SignalValue: + uint32_t address + uint16_t ts + const char* name + double value + +ctypedef const DBC * (*dbc_lookup_func)(const char* dbc_name) +ctypedef void* (*can_init_with_vectors_func)(int bus, const char* dbc_name, + vector[MessageParseOptions] message_options, + vector[SignalParseOptions] signal_options, + bool sendcan, + const char* tcp_addr, + int timeout) +ctypedef int (*can_update_func)(void* can, uint64_t sec, bool wait); +ctypedef size_t (*can_query_func)(void* can, uint64_t sec, bool *out_can_valid, size_t out_values_size, SignalValue* out_values); +ctypedef void (*can_query_vector_func)(void* can, uint64_t sec, bool *out_can_valid, vector[SignalValue] &values) + +cdef class CANParser: + cdef: + void *can + const DBC *dbc + dbc_lookup_func dbc_lookup + can_init_with_vectors_func can_init_with_vectors + can_update_func can_update + can_query_vector_func can_query_vector + map[string, uint32_t] msg_name_to_address + map[uint32_t, string] address_to_msg_name + vector[SignalValue] can_values + bool test_mode_enabled + cdef public: + string dbc_name + dict vl + dict ts + bool can_valid + int can_invalid_cnt + + cdef unordered_set[uint32_t] update_vl(self, uint64_t sec) diff --git a/selfdrive/can/parser_pyx.pyx b/selfdrive/can/parser_pyx.pyx new file mode 100644 index 0000000000..65c6f5ab21 --- /dev/null +++ b/selfdrive/can/parser_pyx.pyx @@ -0,0 +1,105 @@ +# distutils: language = c++ +from posix.dlfcn cimport dlopen, dlsym, RTLD_LAZY + +from libcpp cimport bool +import os +import numbers + +cdef int CAN_INVALID_CNT = 5 + +cdef class CANParser: + def __init__(self, dbc_name, signals, checks=None, bus=0, sendcan=False, tcp_addr="127.0.0.1", timeout=-1): + self.test_mode_enabled = False + can_dir = os.path.dirname(os.path.abspath(__file__)) + libdbc_fn = os.path.join(can_dir, "libdbc.so") + + cdef void *libdbc = dlopen(libdbc_fn, RTLD_LAZY) + self.can_init_with_vectors = dlsym(libdbc, 'can_init_with_vectors') + self.dbc_lookup = dlsym(libdbc, 'dbc_lookup') + self.can_update = dlsym(libdbc, 'can_update') + self.can_query_vector = dlsym(libdbc, 'can_query_vector') + if checks is None: + checks = [] + + self.can_valid = True + self.dbc_name = dbc_name + self.dbc = self.dbc_lookup(dbc_name) + self.vl = {} + self.ts = {} + + self.can_invalid_cnt = CAN_INVALID_CNT + + num_msgs = self.dbc[0].num_msgs + for i in range(num_msgs): + msg = self.dbc[0].msgs[i] + self.msg_name_to_address[string(msg.name)] = msg.address + self.address_to_msg_name[msg.address] = string(msg.name) + self.vl[msg.address] = {} + self.vl[str(msg.name)] = {} + self.ts[msg.address] = {} + self.ts[str(msg.name)] = {} + + # Convert message names into addresses + for i in range(len(signals)): + s = signals[i] + if not isinstance(s[1], numbers.Number): + s = (s[0], self.msg_name_to_address[s[1]], s[2]) + signals[i] = s + + for i in range(len(checks)): + c = checks[i] + if not isinstance(c[0], numbers.Number): + c = (self.msg_name_to_address[c[0]], c[1]) + checks[i] = c + + cdef vector[SignalParseOptions] signal_options_v + cdef SignalParseOptions spo + for sig_name, sig_address, sig_default in signals: + spo.address = sig_address + spo.name = sig_name + spo.default_value = sig_default + signal_options_v.push_back(spo) + + message_options = dict((address, 0) for _, address, _ in signals) + message_options.update(dict(checks)) + + cdef vector[MessageParseOptions] message_options_v + cdef MessageParseOptions mpo + for msg_address, freq in message_options.items(): + mpo.address = msg_address + mpo.check_frequency = freq + message_options_v.push_back(mpo) + + self.can = self.can_init_with_vectors(bus, dbc_name, message_options_v, signal_options_v, sendcan, tcp_addr, timeout) + self.update_vl(0) + + cdef unordered_set[uint32_t] update_vl(self, uint64_t sec): + cdef string sig_name + cdef unordered_set[uint32_t] updated_val + cdef bool valid = False + + self.can_query_vector(self.can, sec, &valid, self.can_values) + + # Update invalid flag + self.can_invalid_cnt += 1 + if valid: + self.can_invalid_cnt = 0 + self.can_valid = self.can_invalid_cnt < CAN_INVALID_CNT + + + for cv in self.can_values: + self.vl[cv.address][string(cv.name)] = cv.value + self.ts[cv.address][string(cv.name)] = cv.ts + + sig_name = self.address_to_msg_name[cv.address] + self.vl[sig_name][string(cv.name)] = cv.value + self.ts[sig_name][string(cv.name)] = cv.ts + + updated_val.insert(cv.address) + + return updated_val + + def update(self, uint64_t sec, bool wait): + r = (self.can_update(self.can, sec, wait) >= 0) + updated_val = self.update_vl(sec) + return r, updated_val diff --git a/selfdrive/can/parser_pyx_setup.py b/selfdrive/can/parser_pyx_setup.py new file mode 100644 index 0000000000..f20224f343 --- /dev/null +++ b/selfdrive/can/parser_pyx_setup.py @@ -0,0 +1,18 @@ +from distutils.core import setup, Extension +from Cython.Build import cythonize +import subprocess + +sourcefiles = ['parser_pyx.pyx'] +extra_compile_args = ["-std=c++11"] +ARCH = subprocess.check_output(["uname", "-m"]).rstrip() +if ARCH == "aarch64": + extra_compile_args += ["-Wno-deprecated-register"] + +setup(name='Radard Thread', + ext_modules=cythonize( + Extension( + "parser_pyx", + sources=sourcefiles, + extra_compile_args=extra_compile_args + ), + nthreads=4)) diff --git a/selfdrive/can/process_dbc.py b/selfdrive/can/process_dbc.py index 3f3f2ddcad..5f9237020b 100755 --- a/selfdrive/can/process_dbc.py +++ b/selfdrive/can/process_dbc.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import os import glob import sys diff --git a/selfdrive/can/tests/parser_old.py b/selfdrive/can/tests/parser_old.py new file mode 100644 index 0000000000..5a899efa50 --- /dev/null +++ b/selfdrive/can/tests/parser_old.py @@ -0,0 +1,220 @@ +import time +import numbers + +from selfdrive.can.libdbc_py import libdbc, ffi + +CAN_INVALID_CNT = 5 # after so many consecutive CAN data with wrong checksum, counter or frequency, flag CAN invalidity + +class CANParser(object): + def __init__(self, dbc_name, signals, checks=None, bus=0, sendcan=False, tcp_addr="127.0.0.1", timeout=-1): + if checks is None: + checks = [] + + self.can_valid = True + self.can_invalid_cnt = CAN_INVALID_CNT + self.vl = {} + self.ts = {} + + self.dbc_name = dbc_name + self.dbc = libdbc.dbc_lookup(dbc_name) + self.msg_name_to_addres = {} + self.address_to_msg_name = {} + + num_msgs = self.dbc[0].num_msgs + for i in range(num_msgs): + msg = self.dbc[0].msgs[i] + + name = ffi.string(msg.name) + address = msg.address + + self.msg_name_to_addres[name] = address + self.address_to_msg_name[address] = name + + self.vl[address] = {} + self.vl[name] = {} + self.ts[address] = {} + self.ts[name] = {} + + # Convert message names into addresses + for i in range(len(signals)): + s = signals[i] + if not isinstance(s[1], numbers.Number): + s = (s[0], self.msg_name_to_addres[s[1]], s[2]) + signals[i] = s + + for i in range(len(checks)): + c = checks[i] + if not isinstance(c[0], numbers.Number): + c = (self.msg_name_to_addres[c[0]], c[1]) + checks[i] = c + + sig_names = dict((name, ffi.new("char[]", name)) for name, _, _ in signals) + + signal_options_c = ffi.new("SignalParseOptions[]", [ + { + 'address': sig_address, + 'name': sig_names[sig_name], + 'default_value': sig_default, + } for sig_name, sig_address, sig_default in signals]) + + message_options = dict((address, 0) for _, address, _ in signals) + message_options.update(dict(checks)) + + message_options_c = ffi.new("MessageParseOptions[]", [ + { + 'address': msg_address, + 'check_frequency': freq, + } for msg_address, freq in message_options.items()]) + + self.can = libdbc.can_init(bus, dbc_name, len(message_options_c), message_options_c, + len(signal_options_c), signal_options_c, sendcan, tcp_addr, timeout) + + self.p_can_valid = ffi.new("bool*") + + value_count = libdbc.can_query(self.can, 0, self.p_can_valid, 0, ffi.NULL) + self.can_values = ffi.new("SignalValue[%d]" % value_count) + self.update_vl(0) + + def update_vl(self, sec): + can_values_len = libdbc.can_query(self.can, sec, self.p_can_valid, len(self.can_values), self.can_values) + assert can_values_len <= len(self.can_values) + + self.can_invalid_cnt += 1 + if self.p_can_valid[0]: + self.can_invalid_cnt = 0 + self.can_valid = self.can_invalid_cnt < CAN_INVALID_CNT + + ret = set() + for i in xrange(can_values_len): + cv = self.can_values[i] + address = cv.address + # print("{0} {1}".format(hex(cv.address), ffi.string(cv.name))) + name = ffi.string(cv.name) + self.vl[address][name] = cv.value + self.ts[address][name] = cv.ts + + sig_name = self.address_to_msg_name[address] + self.vl[sig_name][name] = cv.value + self.ts[sig_name][name] = cv.ts + ret.add(address) + return ret + + def update(self, sec, wait): + """Returns if the update was successfull (e.g. no rcv timeout happened)""" + r = libdbc.can_update(self.can, sec, wait) + return bool(r >= 0), self.update_vl(sec) + + +if __name__ == "__main__": + from common.realtime import sec_since_boot + + radar_messages = range(0x430, 0x43A) + range(0x440, 0x446) + # signals = zip(['LONG_DIST'] * 16 + ['NEW_TRACK'] * 16 + ['LAT_DIST'] * 16 + + # ['REL_SPEED'] * 16, radar_messages * 4, + # [255] * 16 + [1] * 16 + [0] * 16 + [0] * 16) + # checks = zip(radar_messages, [20]*16) + + # cp = CANParser("acura_ilx_2016_nidec", signals, checks, 1) + + + # signals = [ + # ("XMISSION_SPEED", 0x158, 0), #sig_name, sig_address, default + # ("WHEEL_SPEED_FL", 0x1d0, 0), + # ("WHEEL_SPEED_FR", 0x1d0, 0), + # ("WHEEL_SPEED_RL", 0x1d0, 0), + # ("STEER_ANGLE", 0x14a, 0), + # ("STEER_TORQUE_SENSOR", 0x18f, 0), + # ("GEAR", 0x191, 0), + # ("WHEELS_MOVING", 0x1b0, 1), + # ("DOOR_OPEN_FL", 0x405, 1), + # ("DOOR_OPEN_FR", 0x405, 1), + # ("DOOR_OPEN_RL", 0x405, 1), + # ("DOOR_OPEN_RR", 0x405, 1), + # ("CRUISE_SPEED_PCM", 0x324, 0), + # ("SEATBELT_DRIVER_LAMP", 0x305, 1), + # ("SEATBELT_DRIVER_LATCHED", 0x305, 0), + # ("BRAKE_PRESSED", 0x17c, 0), + # ("CAR_GAS", 0x130, 0), + # ("CRUISE_BUTTONS", 0x296, 0), + # ("ESP_DISABLED", 0x1a4, 1), + # ("HUD_LEAD", 0x30c, 0), + # ("USER_BRAKE", 0x1a4, 0), + # ("STEER_STATUS", 0x18f, 5), + # ("WHEEL_SPEED_RR", 0x1d0, 0), + # ("BRAKE_ERROR_1", 0x1b0, 1), + # ("BRAKE_ERROR_2", 0x1b0, 1), + # ("GEAR_SHIFTER", 0x191, 0), + # ("MAIN_ON", 0x326, 0), + # ("ACC_STATUS", 0x17c, 0), + # ("PEDAL_GAS", 0x17c, 0), + # ("CRUISE_SETTING", 0x296, 0), + # ("LEFT_BLINKER", 0x326, 0), + # ("RIGHT_BLINKER", 0x326, 0), + # ("COUNTER", 0x324, 0), + # ("ENGINE_RPM", 0x17C, 0) + # ] + # checks = [ + # (0x14a, 100), # address, frequency + # (0x158, 100), + # (0x17c, 100), + # (0x191, 100), + # (0x1a4, 50), + # (0x326, 10), + # (0x1b0, 50), + # (0x1d0, 50), + # (0x305, 10), + # (0x324, 10), + # (0x405, 3), + # ] + + # cp = CANParser("honda_civic_touring_2016_can_generated", signals, checks, 0) + + + signals = [ + # sig_name, sig_address, default + ("GEAR", 956, 0x20), + ("BRAKE_PRESSED", 548, 0), + ("GAS_PEDAL", 705, 0), + + ("WHEEL_SPEED_FL", 170, 0), + ("WHEEL_SPEED_FR", 170, 0), + ("WHEEL_SPEED_RL", 170, 0), + ("WHEEL_SPEED_RR", 170, 0), + ("DOOR_OPEN_FL", 1568, 1), + ("DOOR_OPEN_FR", 1568, 1), + ("DOOR_OPEN_RL", 1568, 1), + ("DOOR_OPEN_RR", 1568, 1), + ("SEATBELT_DRIVER_UNLATCHED", 1568, 1), + ("TC_DISABLED", 951, 1), + ("STEER_ANGLE", 37, 0), + ("STEER_FRACTION", 37, 0), + ("STEER_RATE", 37, 0), + ("GAS_RELEASED", 466, 0), + ("CRUISE_STATE", 466, 0), + ("MAIN_ON", 467, 0), + ("SET_SPEED", 467, 0), + ("STEER_TORQUE_DRIVER", 608, 0), + ("STEER_TORQUE_EPS", 608, 0), + ("TURN_SIGNALS", 1556, 3), # 3 is no blinkers + ("LKA_STATE", 610, 0), + ] + checks = [ + (548, 40), + (705, 33), + + (170, 80), + (37, 80), + (466, 33), + (608, 50), + ] + + cp = CANParser("toyota_rav4_2017_pt_generated", signals, checks, 0) + + # print(cp.vl) + + while True: + cp.update(int(sec_since_boot()*1e9), True) + # print(cp.vl) + print(cp.ts) + print(cp.can_valid) + time.sleep(0.01) diff --git a/selfdrive/can/tests/test_parser.py b/selfdrive/can/tests/test_parser.py new file mode 100755 index 0000000000..bb00d042fc --- /dev/null +++ b/selfdrive/can/tests/test_parser.py @@ -0,0 +1,96 @@ +#!/usr/bin/env python2 + +import os +import unittest + +import requests + +import selfdrive.messaging as messaging +from selfdrive.can.parser import CANParser as CANParserNew +from selfdrive.can.tests.parser_old import CANParser as CANParserOld +from selfdrive.car.honda.carstate import get_can_signals +from selfdrive.car.honda.interface import CarInterface +from selfdrive.car.honda.values import CAR, DBC +from selfdrive.services import service_list +from tools.lib.logreader import LogReader + +BASE_URL = "https://commadataci.blob.core.windows.net/openpilotci/" +DT = int(0.01 * 1e9) # ns + + +def dict_keys_differ(dict1, dict2): + keys1 = set(dict1.keys()) + keys2 = set(dict2.keys()) + + if keys1 != keys2: + return True + + for k in keys1: + keys1 = set(dict1[k].keys()) + keys2 = set(dict2[k].keys()) + + if keys1 != keys2: + return True + + return False + +def dicts_vals_differ(dict1, dict2): + for k_outer in dict1.keys(): + for k_inner in dict1[k_outer].keys(): + if dict1[k_outer][k_inner] != dict2[k_outer][k_inner]: + return True + + return False + +def run_route(route): + can = messaging.pub_sock(service_list['can'].port) + + CP = CarInterface.get_params(CAR.CIVIC, {}) + signals, checks = get_can_signals(CP) + parser_old = CANParserOld(DBC[CP.carFingerprint]['pt'], signals, checks, 0, timeout=-1) + parser_new = CANParserNew(DBC[CP.carFingerprint]['pt'], signals, checks, 0, timeout=-1) + + if dict_keys_differ(parser_old.vl, parser_new.vl): + return False + + lr = LogReader(route + ".bz2") + + route_ok = True + + t = 0 + for msg in lr: + if msg.which() == 'can': + t += DT + can.send(msg.as_builder().to_bytes()) + + _, updated_old = parser_old.update(t, True) + _, updated_new = parser_new.update(t, True) + + if updated_old != updated_new: + route_ok = False + print(t, "Diff in seen") + + if dicts_vals_differ(parser_old.vl, parser_new.vl): + print(t, "Diff in dict") + route_ok = False + + return route_ok + +class TestCanParser(unittest.TestCase): + def setUp(self): + self.routes = { + CAR.CIVIC: "b0c9d2329ad1606b|2019-05-30--20-23-57" + } + + for route in self.routes.values(): + route_filename = route + ".bz2" + if not os.path.isfile(route_filename): + with open(route + ".bz2", "w") as f: + f.write(requests.get(BASE_URL + route_filename).content) + + def test_parser_civic(self): + self.assertTrue(run_route(self.routes[CAR.CIVIC])) + + +if __name__ == "__main__": + unittest.main() diff --git a/selfdrive/car/__init__.py b/selfdrive/car/__init__.py index 255b20806c..bb996e5885 100644 --- a/selfdrive/car/__init__.py +++ b/selfdrive/car/__init__.py @@ -1,7 +1,9 @@ # functions common among cars from common.numpy_fast import clip - +# kg of standard extra cargo to count for drive, gas, etc... +STD_CARGO_KG = 136. + def dbc_dict(pt_dbc, radar_dbc, chassis_dbc=None): return {'pt': pt_dbc, 'radar': radar_dbc, 'chassis': chassis_dbc} diff --git a/selfdrive/car/car_helpers.py b/selfdrive/car/car_helpers.py index ef807abb65..f7e8c53757 100644 --- a/selfdrive/car/car_helpers.py +++ b/selfdrive/car/car_helpers.py @@ -1,8 +1,6 @@ import os -import time from common.vin import is_vin_response_valid from common.basedir import BASEDIR -from common.realtime import sec_since_boot from common.fingerprints import eliminate_incompatible_cars, all_known_cars from selfdrive.boardd.boardd import can_list_to_can_capnp from selfdrive.swaglog import cloudlog @@ -64,7 +62,7 @@ def fingerprint(logcan, sendcan): finger = {} cloudlog.warning("waiting for fingerprint...") candidate_cars = all_known_cars() - can_seen_ts = None + can_seen_frame = None can_seen = False # works on standard 11-bit addresses for diagnostic. Tested on Toyota and Subaru; @@ -80,52 +78,55 @@ def fingerprint(logcan, sendcan): vin_dat = [] vin = "" - while 1: - for a in messaging.drain_sock(logcan): - for can in a.can: - can_seen = True - - # have we got a VIN query response? - if can.src == 0 and can.address == 0x7e8: - vin_never_responded = False - # basic sanity checks on ISO-TP response - if is_vin_response_valid(can.dat, vin_step, vin_cnt): - vin_dat += can.dat[2:] if vin_step == 0 else can.dat[1:] - vin_cnt += 1 - if vin_cnt == vin_cnts[vin_step]: - vin_responded = True - vin_step += 1 - - # ignore everything not on bus 0 and with more than 11 bits, - # which are ussually sporadic and hard to include in fingerprints. - # also exclude VIN query response on 0x7e8 - if can.src == 0 and can.address < 0x800 and can.address != 0x7e8: - finger[can.address] = len(can.dat) - candidate_cars = eliminate_incompatible_cars(can, candidate_cars) - - if can_seen_ts is None and can_seen: - can_seen_ts = sec_since_boot() # start time - ts = sec_since_boot() + frame = 0 + while True: + a = messaging.recv_one(logcan) + + for can in a.can: + can_seen = True + + # have we got a VIN query response? + if can.src == 0 and can.address == 0x7e8: + vin_never_responded = False + # basic sanity checks on ISO-TP response + if is_vin_response_valid(can.dat, vin_step, vin_cnt): + vin_dat += can.dat[2:] if vin_step == 0 else can.dat[1:] + vin_cnt += 1 + if vin_cnt == vin_cnts[vin_step]: + vin_responded = True + vin_step += 1 + + # ignore everything not on bus 0 and with more than 11 bits, + # which are ussually sporadic and hard to include in fingerprints. + # also exclude VIN query response on 0x7e8 + if can.src == 0 and can.address < 0x800 and can.address != 0x7e8: + finger[can.address] = len(can.dat) + candidate_cars = eliminate_incompatible_cars(can, candidate_cars) + + if can_seen_frame is None and can_seen: + can_seen_frame = frame + # if we only have one car choice and the time_fingerprint since we got our first # message has elapsed, exit. Toyota needs higher time_fingerprint, since DSU does not # broadcast immediately - if len(candidate_cars) == 1 and can_seen_ts is not None: + if len(candidate_cars) == 1 and can_seen_frame is not None: time_fingerprint = 1.0 if ("TOYOTA" in candidate_cars[0] or "LEXUS" in candidate_cars[0]) else 0.1 - if (ts - can_seen_ts) > time_fingerprint: + if (frame - can_seen_frame) > (time_fingerprint * 100): break # bail if no cars left or we've been waiting for more than 2s since can_seen - elif len(candidate_cars) == 0 or (can_seen_ts is not None and (ts - can_seen_ts) > 2.): + elif len(candidate_cars) == 0 or (can_seen_frame is not None and (frame - can_seen_frame) > 200): return None, finger, "" # keep sending VIN qury if ECU isn't responsing. # sendcan is probably not ready due to the zmq slow joiner syndrome - if can_seen and (vin_never_responded or (vin_responded and vin_step < len(vin_cnts))): + # TODO: VIN query temporarily disabled until we have the harness + if False and can_seen and (vin_never_responded or (vin_responded and vin_step < len(vin_cnts))): sendcan.send(can_list_to_can_capnp([vin_query_msg[vin_step]], msgtype='sendcan')) vin_responded = False vin_cnt = 0 - time.sleep(0.01) + frame += 1 # only report vin if procedure is finished if vin_step == len(vin_cnts) and vin_cnt == vin_cnts[-1]: diff --git a/selfdrive/car/chrysler/carstate.py b/selfdrive/car/chrysler/carstate.py index 7f4ad675d0..1d38b8cdab 100644 --- a/selfdrive/car/chrysler/carstate.py +++ b/selfdrive/car/chrysler/carstate.py @@ -97,8 +97,6 @@ class CarState(object): def update(self, cp, cp_cam): - # copy can_valid - self.can_valid = cp.can_valid # update prevs, update must run once per loop self.prev_left_blinker_on = self.left_blinker_on diff --git a/selfdrive/car/chrysler/interface.py b/selfdrive/car/chrysler/interface.py index cef9698fd3..6621c7e20f 100755 --- a/selfdrive/car/chrysler/interface.py +++ b/selfdrive/car/chrysler/interface.py @@ -6,6 +6,7 @@ from selfdrive.controls.lib.drive_helpers import EventTypes as ET, create_event from selfdrive.controls.lib.vehicle_model import VehicleModel from selfdrive.car.chrysler.carstate import CarState, get_can_parser, get_camera_parser from selfdrive.car.chrysler.values import ECU, check_ecu_msgs, CAR +from selfdrive.car import STD_CARGO_KG class CarInterface(object): @@ -14,7 +15,6 @@ class CarInterface(object): self.VM = VehicleModel(CP) self.frame = 0 - self.can_invalid_count = 0 self.gas_pressed_prev = False self.brake_pressed_prev = False self.cruise_enabled_prev = False @@ -40,23 +40,20 @@ class CarInterface(object): @staticmethod def get_params(candidate, fingerprint, vin=""): - # kg of standard extra cargo to count for drive, gas, etc... - std_cargo = 136 - ret = car.CarParams.new_message() ret.carName = "chrysler" ret.carFingerprint = candidate ret.carVin = vin - ret.safetyModel = car.CarParams.SafetyModels.chrysler + ret.safetyModel = car.CarParams.SafetyModel.chrysler # pedal ret.enableCruise = True # FIXME: hardcoding honda civic 2016 touring params so they can be used to # scale unknown params for other cars - mass_civic = 2923./2.205 + std_cargo + mass_civic = 2923. * CV.LB_TO_KG + STD_CARGO_KG wheelbase_civic = 2.70 centerToFront_civic = wheelbase_civic * 0.4 centerToRear_civic = wheelbase_civic - centerToFront_civic @@ -67,7 +64,7 @@ class CarInterface(object): # Speed conversion: 20, 45 mph ret.wheelbase = 3.089 # in meters for Pacifica Hybrid 2017 ret.steerRatio = 16.2 # Pacifica Hybrid 2017 - ret.mass = 2858 + std_cargo # kg curb weight Pacifica Hybrid 2017 + ret.mass = 2858. + STD_CARGO_KG # kg curb weight Pacifica Hybrid 2017 ret.lateralTuning.pid.kpBP, ret.lateralTuning.pid.kiBP = [[9., 20.], [9., 20.]] ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.15,0.30], [0.03,0.05]] ret.lateralTuning.pid.kf = 0.00006 # full torque for 10 deg at 80mph means 0.00007818594 @@ -135,15 +132,16 @@ class CarInterface(object): def update(self, c): # ******************* do can recv ******************* canMonoTimes = [] - can_valid, _ = self.cp.update(int(sec_since_boot() * 1e9), True) - cam_valid, _ = self.cp_cam.update(int(sec_since_boot() * 1e9), False) - can_rcv_error = not can_valid or not cam_valid + can_rcv_valid, _ = self.cp.update(int(sec_since_boot() * 1e9), True) + cam_rcv_valid, _ = self.cp_cam.update(int(sec_since_boot() * 1e9), False) self.CS.update(self.cp, self.cp_cam) # create message ret = car.CarState.new_message() + ret.canValid = can_rcv_valid and cam_rcv_valid and self.cp.can_valid and self.cp_cam.can_valid + # speeds ret.vEgo = self.CS.v_ego ret.vEgoRaw = self.CS.v_ego_raw @@ -212,14 +210,6 @@ class CarInterface(object): # events events = [] - if not self.CS.can_valid: - self.can_invalid_count += 1 - else: - self.can_invalid_count = 0 - - if can_rcv_error or self.can_invalid_count >= 5: - events.append(create_event('commIssue', [ET.NO_ENTRY, ET.IMMEDIATE_DISABLE])) - if not (ret.gearShifter in ('drive', 'low')): events.append(create_event('wrongGear', [ET.NO_ENTRY, ET.SOFT_DISABLE])) if ret.doorOpen: diff --git a/selfdrive/car/chrysler/radar_interface.py b/selfdrive/car/chrysler/radar_interface.py index e5359fad8e..b4970b2223 100755 --- a/selfdrive/car/chrysler/radar_interface.py +++ b/selfdrive/car/chrysler/radar_interface.py @@ -3,10 +3,6 @@ import os from selfdrive.can.parser import CANParser from cereal import car from common.realtime import sec_since_boot -import zmq -from selfdrive.services import service_list -import selfdrive.messaging as messaging - RADAR_MSGS_C = range(0x2c2, 0x2d4+2, 2) # c_ messages 706,...,724 RADAR_MSGS_D = range(0x2a2, 0x2b4+2, 2) # d_ messages @@ -55,8 +51,6 @@ class RadarInterface(object): self.pts = {} self.delay = 0.0 # Delay of radar #TUNE self.rcp = _create_radar_can_parser() - context = zmq.Context() - self.logcan = messaging.sub_sock(context, service_list['can'].port) def update(self): canMonoTimes = [] @@ -73,7 +67,7 @@ class RadarInterface(object): ret = car.RadarData.new_message() errors = [] if not self.rcp.can_valid: - errors.append("commIssue") + errors.append("canError") ret.errors = errors ret.canMonoTimes = canMonoTimes diff --git a/selfdrive/car/ford/carstate.py b/selfdrive/car/ford/carstate.py index 2e26eb7c64..dc6d824ff5 100644 --- a/selfdrive/car/ford/carstate.py +++ b/selfdrive/car/ford/carstate.py @@ -53,9 +53,6 @@ class CarState(object): self.v_ego = 0.0 def update(self, cp): - # copy can_valid - self.can_valid = cp.can_valid - # update prevs, update must run once per loop self.prev_left_blinker_on = self.left_blinker_on self.prev_right_blinker_on = self.right_blinker_on diff --git a/selfdrive/car/ford/interface.py b/selfdrive/car/ford/interface.py index 439e561a4e..7664d99640 100755 --- a/selfdrive/car/ford/interface.py +++ b/selfdrive/car/ford/interface.py @@ -7,6 +7,7 @@ from selfdrive.controls.lib.drive_helpers import EventTypes as ET, create_event from selfdrive.controls.lib.vehicle_model import VehicleModel from selfdrive.car.ford.carstate import CarState, get_can_parser from selfdrive.car.ford.values import MAX_ANGLE +from selfdrive.car import STD_CARGO_KG class CarInterface(object): @@ -15,7 +16,6 @@ class CarInterface(object): self.VM = VehicleModel(CP) self.frame = 0 - self.can_invalid_count = 0 self.gas_pressed_prev = False self.brake_pressed_prev = False self.cruise_enabled_prev = False @@ -40,23 +40,20 @@ class CarInterface(object): @staticmethod def get_params(candidate, fingerprint, vin=""): - # kg of standard extra cargo to count for drive, gas, etc... - std_cargo = 136 - ret = car.CarParams.new_message() ret.carName = "ford" ret.carFingerprint = candidate ret.carVin = vin - ret.safetyModel = car.CarParams.SafetyModels.ford + ret.safetyModel = car.CarParams.SafetyModel.ford # pedal ret.enableCruise = True # FIXME: hardcoding honda civic 2016 touring params so they can be used to # scale unknown params for other cars - mass_civic = 2923. * CV.LB_TO_KG + std_cargo + mass_civic = 2923. * CV.LB_TO_KG + STD_CARGO_KG wheelbase_civic = 2.70 centerToFront_civic = wheelbase_civic * 0.4 centerToRear_civic = wheelbase_civic - centerToFront_civic @@ -66,7 +63,7 @@ class CarInterface(object): ret.wheelbase = 2.85 ret.steerRatio = 14.8 - ret.mass = 3045. * CV.LB_TO_KG + std_cargo + ret.mass = 3045. * CV.LB_TO_KG + STD_CARGO_KG ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.01], [0.005]] # TODO: tune this ret.lateralTuning.pid.kf = 1. / MAX_ANGLE # MAX Steer angle to normalize FF @@ -133,14 +130,15 @@ class CarInterface(object): # ******************* do can recv ******************* canMonoTimes = [] - can_valid, _ = self.cp.update(int(sec_since_boot() * 1e9), True) - can_rcv_error = not can_valid + can_rcv_valid, _ = self.cp.update(int(sec_since_boot() * 1e9), True) self.CS.update(self.cp) # create message ret = car.CarState.new_message() + ret.canValid = can_rcv_valid and self.cp.can_valid + # speeds ret.vEgo = self.CS.v_ego ret.vEgoRaw = self.CS.v_ego_raw @@ -168,13 +166,6 @@ class CarInterface(object): # events events = [] - if not self.CS.can_valid: - self.can_invalid_count += 1 - else: - self.can_invalid_count = 0 - - if can_rcv_error or self.can_invalid_count >= 5: - events.append(create_event('commIssue', [ET.NO_ENTRY, ET.IMMEDIATE_DISABLE])) if self.CS.steer_error: events.append(create_event('steerUnavailable', [ET.NO_ENTRY, ET.IMMEDIATE_DISABLE, ET.PERMANENT])) diff --git a/selfdrive/car/ford/radar_interface.py b/selfdrive/car/ford/radar_interface.py index a49ad413c1..08b54723d6 100755 --- a/selfdrive/car/ford/radar_interface.py +++ b/selfdrive/car/ford/radar_interface.py @@ -4,10 +4,6 @@ import numpy as np from selfdrive.can.parser import CANParser from cereal import car from common.realtime import sec_since_boot -import zmq -from selfdrive.services import service_list -import selfdrive.messaging as messaging - RADAR_MSGS = range(0x500, 0x540) @@ -33,9 +29,6 @@ class RadarInterface(object): # Nidec self.rcp = _create_radar_can_parser() - context = zmq.Context() - self.logcan = messaging.sub_sock(context, service_list['can'].port) - def update(self): canMonoTimes = [] @@ -52,7 +45,7 @@ class RadarInterface(object): ret = car.RadarData.new_message() errors = [] if not self.rcp.can_valid: - errors.append("commIssue") + errors.append("canError") ret.errors = errors ret.canMonoTimes = canMonoTimes diff --git a/selfdrive/car/gm/carcontroller.py b/selfdrive/car/gm/carcontroller.py index 000f7dde68..a2ffac61f0 100644 --- a/selfdrive/car/gm/carcontroller.py +++ b/selfdrive/car/gm/carcontroller.py @@ -1,6 +1,6 @@ from cereal import car +from common.realtime import DT_CTRL from common.numpy_fast import interp -from common.realtime import sec_since_boot from selfdrive.config import Conversions as CV from selfdrive.car import apply_std_steer_torque_limits from selfdrive.car.gm import gmcan @@ -9,6 +9,7 @@ from selfdrive.can.packer import CANPacker VisualAlert = car.CarControl.HUDControl.VisualAlert + class CarControllerParams(): def __init__(self, car_fingerprint): if car_fingerprint in SUPERCRUISE_CARS: @@ -47,7 +48,7 @@ class CarControllerParams(): def actuator_hystereses(final_pedal, pedal_steady): # hyst params... TODO: move these to VehicleParams - pedal_hyst_gap = 0.01 # don't change pedal command for small oscilalitons within this value + pedal_hyst_gap = 0.01 # don't change pedal command for small oscillations within this value # for small pedal oscillations within pedal_hyst_gap, don't change the pedal command if final_pedal == 0.: @@ -70,7 +71,7 @@ def process_hud_alert(hud_alert): class CarController(object): def __init__(self, canbus, car_fingerprint): self.pedal_steady = 0. - self.start_time = sec_since_boot() + self.start_time = 0. self.chime = 0 self.steer_idx = 0 self.apply_steer_last = 0 @@ -154,7 +155,7 @@ class CarController(object): # Radar needs to know current speed and yaw rate (50hz), # and that ADAS is alive (10hz) time_and_headlights_step = 10 - tt = sec_since_boot() + tt = frame * DT_CTRL if frame % time_and_headlights_step == 0: idx = (frame // time_and_headlights_step) % 4 diff --git a/selfdrive/car/gm/carstate.py b/selfdrive/car/gm/carstate.py index 350274f2f6..174d11b46b 100644 --- a/selfdrive/car/gm/carstate.py +++ b/selfdrive/car/gm/carstate.py @@ -71,8 +71,6 @@ class CarState(object): self.v_ego = 0. def update(self, pt_cp): - - self.can_valid = pt_cp.can_valid self.prev_cruise_buttons = self.cruise_buttons self.cruise_buttons = pt_cp.vl["ASCMSteeringButton"]['ACCButtons'] @@ -118,7 +116,6 @@ class CarState(object): self.steer_error = False self.brake_error = False - self.can_valid = True self.prev_left_blinker_on = self.left_blinker_on self.prev_right_blinker_on = self.right_blinker_on diff --git a/selfdrive/car/gm/interface.py b/selfdrive/car/gm/interface.py index d8177ccef6..4a909bc844 100755 --- a/selfdrive/car/gm/interface.py +++ b/selfdrive/car/gm/interface.py @@ -7,6 +7,7 @@ from selfdrive.controls.lib.vehicle_model import VehicleModel from selfdrive.car.gm.values import DBC, CAR, STOCK_CONTROL_MSGS, AUDIO_HUD, \ SUPERCRUISE_CARS, AccState from selfdrive.car.gm.carstate import CarState, CruiseButtons, get_powertrain_can_parser +from selfdrive.car import STD_CARGO_KG class CanBus(object): @@ -23,7 +24,6 @@ class CarInterface(object): self.frame = 0 self.gas_pressed_prev = False self.brake_pressed_prev = False - self.can_invalid_count = 0 self.acc_active_prev = 0 # *** init the major players *** @@ -61,14 +61,11 @@ class CarInterface(object): ret.enableCamera = not any(x for x in STOCK_CONTROL_MSGS[candidate] if x in fingerprint) ret.openpilotLongitudinalControl = ret.enableCamera - std_cargo = 136 - if candidate == CAR.VOLT: # supports stop and go, but initial engage must be above 18mph (which include conservatism) ret.minEnableSpeed = 18 * CV.MPH_TO_MS - # kg of standard extra cargo to count for driver, gas, etc... - ret.mass = 1607. + std_cargo - ret.safetyModel = car.CarParams.SafetyModels.gm + ret.mass = 1607. + STD_CARGO_KG + ret.safetyModel = car.CarParams.SafetyModel.gm ret.wheelbase = 2.69 ret.steerRatio = 15.7 ret.steerRatioRear = 0. @@ -77,28 +74,27 @@ class CarInterface(object): elif candidate == CAR.MALIBU: # supports stop and go, but initial engage must be above 18mph (which include conservatism) ret.minEnableSpeed = 18 * CV.MPH_TO_MS - ret.mass = 1496. + std_cargo - ret.safetyModel = car.CarParams.SafetyModels.gm + ret.mass = 1496. + STD_CARGO_KG + ret.safetyModel = car.CarParams.SafetyModel.gm ret.wheelbase = 2.83 ret.steerRatio = 15.8 ret.steerRatioRear = 0. ret.centerToFront = ret.wheelbase * 0.4 # wild guess elif candidate == CAR.HOLDEN_ASTRA: - # kg of standard extra cargo to count for driver, gas, etc... - ret.mass = 1363. + std_cargo + ret.mass = 1363. + STD_CARGO_KG ret.wheelbase = 2.662 # Remaining parameters copied from Volt for now ret.centerToFront = ret.wheelbase * 0.4 ret.minEnableSpeed = 18 * CV.MPH_TO_MS - ret.safetyModel = car.CarParams.SafetyModels.gm + ret.safetyModel = car.CarParams.SafetyModel.gm ret.steerRatio = 15.7 ret.steerRatioRear = 0. elif candidate == CAR.ACADIA: ret.minEnableSpeed = -1. # engage speed is decided by pcm - ret.mass = 4353. * CV.LB_TO_KG + std_cargo - ret.safetyModel = car.CarParams.SafetyModels.gm + ret.mass = 4353. * CV.LB_TO_KG + STD_CARGO_KG + ret.safetyModel = car.CarParams.SafetyModel.gm ret.wheelbase = 2.86 ret.steerRatio = 14.4 #end to end is 13.46 ret.steerRatioRear = 0. @@ -106,8 +102,8 @@ class CarInterface(object): elif candidate == CAR.BUICK_REGAL: ret.minEnableSpeed = 18 * CV.MPH_TO_MS - ret.mass = 3779. * CV.LB_TO_KG + std_cargo # (3849+3708)/2 - ret.safetyModel = car.CarParams.SafetyModels.gm + ret.mass = 3779. * CV.LB_TO_KG + STD_CARGO_KG # (3849+3708)/2 + ret.safetyModel = car.CarParams.SafetyModel.gm ret.wheelbase = 2.83 #111.4 inches in meters ret.steerRatio = 14.4 # guess for tourx ret.steerRatioRear = 0. @@ -115,8 +111,8 @@ class CarInterface(object): elif candidate == CAR.CADILLAC_ATS: ret.minEnableSpeed = 18 * CV.MPH_TO_MS - ret.mass = 1601. + std_cargo - ret.safetyModel = car.CarParams.SafetyModels.gm + ret.mass = 1601. + STD_CARGO_KG + ret.safetyModel = car.CarParams.SafetyModel.gm ret.wheelbase = 2.78 ret.steerRatio = 15.3 ret.steerRatioRear = 0. @@ -125,9 +121,8 @@ class CarInterface(object): elif candidate == CAR.CADILLAC_CT6: # engage speed is decided by pcm ret.minEnableSpeed = -1. - # kg of standard extra cargo to count for driver, gas, etc... - ret.mass = 4016. * CV.LB_TO_KG + std_cargo - ret.safetyModel = car.CarParams.SafetyModels.cadillac + ret.mass = 4016. * CV.LB_TO_KG + STD_CARGO_KG + ret.safetyModel = car.CarParams.SafetyModel.cadillac ret.wheelbase = 3.11 ret.steerRatio = 14.6 # it's 16.3 without rear active steering ret.steerRatioRear = 0. # TODO: there is RAS on this car! @@ -136,7 +131,7 @@ class CarInterface(object): # hardcoding honda civic 2016 touring params so they can be used to # scale unknown params for other cars - mass_civic = 2923. * CV.LB_TO_KG + std_cargo + mass_civic = 2923. * CV.LB_TO_KG + STD_CARGO_KG wheelbase_civic = 2.70 centerToFront_civic = wheelbase_civic * 0.4 centerToRear_civic = wheelbase_civic - centerToFront_civic @@ -191,13 +186,15 @@ class CarInterface(object): # returns a car.CarState def update(self, c): - can_valid, _ = self.pt_cp.update(int(sec_since_boot() * 1e9), True) - can_rcv_error = not can_valid + can_rcv_valid, _ = self.pt_cp.update(int(sec_since_boot() * 1e9), True) + self.CS.update(self.pt_cp) # create message ret = car.CarState.new_message() + ret.canValid = can_rcv_valid and self.pt_cp.can_valid + # speeds ret.vEgo = self.CS.v_ego ret.aEgo = self.CS.a_ego @@ -275,14 +272,6 @@ class CarInterface(object): ret.buttonEvents = buttonEvents events = [] - if not self.CS.can_valid: - self.can_invalid_count += 1 - else: - self.can_invalid_count = 0 - - if can_rcv_error or self.can_invalid_count >= 5: - events.append(create_event('commIssue', [ET.NO_ENTRY, ET.IMMEDIATE_DISABLE])) - if self.CS.steer_error: events.append(create_event('steerUnavailable', [ET.NO_ENTRY, ET.IMMEDIATE_DISABLE, ET.PERMANENT])) if self.CS.steer_not_allowed: diff --git a/selfdrive/car/gm/radar_interface.py b/selfdrive/car/gm/radar_interface.py index 7a8d9c4716..12fb7c2342 100755 --- a/selfdrive/car/gm/radar_interface.py +++ b/selfdrive/car/gm/radar_interface.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -import zmq import math import time import numpy as np @@ -8,8 +7,6 @@ from selfdrive.can.parser import CANParser from selfdrive.car.gm.interface import CanBus from selfdrive.car.gm.values import DBC, CAR from common.realtime import sec_since_boot -from selfdrive.services import service_list -import selfdrive.messaging as messaging RADAR_HEADER_MSG = 1120 SLOT_1_MSG = RADAR_HEADER_MSG + 1 @@ -55,9 +52,6 @@ class RadarInterface(object): print "Using %d as obstacle CAN bus ID" % canbus.obstacle self.rcp = create_radar_can_parser(canbus, CP.carFingerprint) - context = zmq.Context() - self.logcan = messaging.sub_sock(context, service_list['can'].port) - def update(self): updated_messages = set() ret = car.RadarData.new_message() @@ -79,7 +73,7 @@ class RadarInterface(object): header['FLRRAntTngFltPrsnt'] or header['FLRRAlgnFltPrsnt'] errors = [] if not self.rcp.can_valid: - errors.append("commIssue") + errors.append("canError") if fault: errors.append("fault") ret.errors = errors diff --git a/selfdrive/car/honda/carcontroller.py b/selfdrive/car/honda/carcontroller.py index bf7d158fc3..3a5703e117 100644 --- a/selfdrive/car/honda/carcontroller.py +++ b/selfdrive/car/honda/carcontroller.py @@ -1,5 +1,5 @@ from collections import namedtuple -from common.realtime import sec_since_boot +from common.realtime import DT_CTRL from selfdrive.controls.lib.drive_helpers import rate_limit from common.numpy_fast import clip from selfdrive.car import create_gas_command @@ -7,6 +7,7 @@ from selfdrive.car.honda import hondacan from selfdrive.car.honda.values import AH, CruiseButtons, CAR from selfdrive.can.packer import CANPacker + def actuator_hystereses(brake, braking, brake_steady, v_ego, car_fingerprint): # hyst params brake_hyst_on = 0.02 # to activate brakes exceed this value @@ -33,15 +34,14 @@ def actuator_hystereses(brake, braking, brake_steady, v_ego, car_fingerprint): return brake, braking, brake_steady -def brake_pump_hysteresis(apply_brake, apply_brake_last, last_pump_ts): - ts = sec_since_boot() +def brake_pump_hysteresis(apply_brake, apply_brake_last, last_pump_ts, ts): pump_on = False # reset pump timer if: # - there is an increment in brake request # - we are applying steady state brakes and we haven't been running the pump # for more than 20s (to prevent pressure bleeding) - if apply_brake > apply_brake_last or (ts - last_pump_ts > 20 and apply_brake > 0): + if apply_brake > apply_brake_last or (ts - last_pump_ts > 20. and apply_brake > 0): last_pump_ts = ts # once the pump is on, run it for at least 0.2s @@ -79,7 +79,7 @@ class CarController(object): self.brake_steady = 0. self.brake_last = 0. self.apply_brake_last = 0 - self.last_pump_ts = 0 + self.last_pump_ts = 0. self.packer = CANPacker(dbc_name) self.new_radar_config = False @@ -167,7 +167,8 @@ class CarController(object): # Send gas and brake commands. if (frame % 2) == 0: idx = frame // 2 - pump_on, self.last_pump_ts = brake_pump_hysteresis(apply_brake, self.apply_brake_last, self.last_pump_ts) + ts = frame * DT_CTRL + pump_on, self.last_pump_ts = brake_pump_hysteresis(apply_brake, self.apply_brake_last, self.last_pump_ts, ts) can_sends.append(hondacan.create_brake_command(self.packer, apply_brake, pump_on, pcm_override, pcm_cancel_cmd, hud.chime, hud.fcw, idx)) self.apply_brake_last = apply_brake diff --git a/selfdrive/car/honda/carstate.py b/selfdrive/car/honda/carstate.py index f3374da576..6c0aec52a0 100644 --- a/selfdrive/car/honda/carstate.py +++ b/selfdrive/car/honda/carstate.py @@ -1,6 +1,7 @@ from common.numpy_fast import interp from common.kalman.simple_kalman import KF1D -from selfdrive.can.parser import CANParser, CANDefine +from selfdrive.can.can_define import CANDefine +from selfdrive.can.parser import CANParser from selfdrive.config import Conversions as CV from selfdrive.car.honda.values import CAR, DBC, STEER_THRESHOLD, SPEED_FACTOR, HONDA_BOSCH @@ -199,10 +200,6 @@ class CarState(object): def update(self, cp, cp_cam): - # copy can_valid on buses 0 and 2 - self.can_valid = cp.can_valid - self.cam_can_valid = cp_cam.can_valid - # car params v_weight_v = [0., 1.] # don't trust smooth speed at low values to avoid premature zero snapping v_weight_bp = [1., 6.] # smooth blending, below ~0.6m/s the smooth speed snaps to zero diff --git a/selfdrive/car/honda/interface.py b/selfdrive/car/honda/interface.py index c261d86c26..72c85c862c 100755 --- a/selfdrive/car/honda/interface.py +++ b/selfdrive/car/honda/interface.py @@ -3,20 +3,16 @@ import os import numpy as np from cereal import car from common.numpy_fast import clip, interp -from common.realtime import sec_since_boot +from common.realtime import sec_since_boot, DT_CTRL from selfdrive.swaglog import cloudlog from selfdrive.config import Conversions as CV from selfdrive.controls.lib.drive_helpers import create_event, EventTypes as ET, get_events from selfdrive.controls.lib.vehicle_model import VehicleModel from selfdrive.car.honda.carstate import CarState, get_can_parser, get_cam_can_parser -from selfdrive.car.honda.values import CruiseButtons, CAR, HONDA_BOSCH, AUDIO_HUD, VISUAL_HUD +from selfdrive.car.honda.values import CruiseButtons, CAR, HONDA_BOSCH, AUDIO_HUD, VISUAL_HUD, CAMERA_MSGS +from selfdrive.car import STD_CARGO_KG from selfdrive.controls.lib.planner import _A_CRUISE_MAX_V_FOLLOWING - -# msgs sent for steering controller by camera module on can 0. -# those messages are mutually exclusive on CRV and non-CRV cars -CAMERA_MSGS = [0xe4, 0x194] - A_ACC_MAX = max(_A_CRUISE_MAX_V_FOLLOWING) @@ -83,8 +79,6 @@ class CarInterface(object): self.last_enable_sent = 0 self.gas_pressed_prev = False self.brake_pressed_prev = False - self.can_invalid_count = 0 - self.cam_can_invalid_count = 0 self.cp = get_can_parser(CP) self.cp_cam = get_cam_can_parser(CP) @@ -143,12 +137,12 @@ class CarInterface(object): ret.carVin = vin if candidate in HONDA_BOSCH: - ret.safetyModel = car.CarParams.SafetyModels.hondaBosch + ret.safetyModel = car.CarParams.SafetyModel.hondaBosch ret.enableCamera = True ret.radarOffCan = True ret.openpilotLongitudinalControl = False else: - ret.safetyModel = car.CarParams.SafetyModels.honda + ret.safetyModel = car.CarParams.SafetyModel.honda ret.enableCamera = not any(x for x in CAMERA_MSGS if x in fingerprint) ret.enableGasInterceptor = 0x201 in fingerprint ret.openpilotLongitudinalControl = ret.enableCamera @@ -158,12 +152,9 @@ class CarInterface(object): ret.enableCruise = not ret.enableGasInterceptor - # kg of standard extra cargo to count for drive, gas, etc... - std_cargo = 136 - # FIXME: hardcoding honda civic 2016 touring params so they can be used to # scale unknown params for other cars - mass_civic = 2923 * CV.LB_TO_KG + std_cargo + mass_civic = 2923. * CV.LB_TO_KG + STD_CARGO_KG wheelbase_civic = 2.70 centerToFront_civic = wheelbase_civic * 0.4 centerToRear_civic = wheelbase_civic - centerToFront_civic @@ -203,7 +194,7 @@ class CarInterface(object): stop_and_go = True if not candidate == CAR.ACCORDH: # Hybrid uses same brake msg as hatch ret.safetyParam = 1 # Accord and CRV 5G use an alternate user brake msg - ret.mass = 3279. * CV.LB_TO_KG + std_cargo + ret.mass = 3279. * CV.LB_TO_KG + STD_CARGO_KG ret.wheelbase = 2.83 ret.centerToFront = ret.wheelbase * 0.39 ret.steerRatio = 15.96 # 11.82 is spec end-to-end @@ -216,7 +207,7 @@ class CarInterface(object): elif candidate == CAR.ACURA_ILX: stop_and_go = False - ret.mass = 3095 * CV.LB_TO_KG + std_cargo + ret.mass = 3095. * CV.LB_TO_KG + STD_CARGO_KG ret.wheelbase = 2.67 ret.centerToFront = ret.wheelbase * 0.37 ret.steerRatio = 18.61 # 15.3 is spec end-to-end @@ -229,7 +220,7 @@ class CarInterface(object): elif candidate == CAR.CRV: stop_and_go = False - ret.mass = 3572 * CV.LB_TO_KG + std_cargo + ret.mass = 3572. * CV.LB_TO_KG + STD_CARGO_KG ret.wheelbase = 2.62 ret.centerToFront = ret.wheelbase * 0.41 ret.steerRatio = 15.3 # as spec @@ -243,7 +234,7 @@ class CarInterface(object): elif candidate == CAR.CRV_5G: stop_and_go = True ret.safetyParam = 1 # Accord and CRV 5G use an alternate user brake msg - ret.mass = 3410. * CV.LB_TO_KG + std_cargo + ret.mass = 3410. * CV.LB_TO_KG + STD_CARGO_KG ret.wheelbase = 2.66 ret.centerToFront = ret.wheelbase * 0.41 ret.steerRatio = 16.0 # 12.3 is spec end-to-end @@ -257,7 +248,7 @@ class CarInterface(object): elif candidate == CAR.CRV_HYBRID: stop_and_go = True ret.safetyParam = 1 # Accord and CRV 5G use an alternate user brake msg - ret.mass = 1667. + std_cargo # mean of 4 models in kg + ret.mass = 1667. + STD_CARGO_KG # mean of 4 models in kg ret.wheelbase = 2.66 ret.centerToFront = ret.wheelbase * 0.41 ret.steerRatio = 16.0 # 12.3 is spec end-to-end @@ -270,7 +261,7 @@ class CarInterface(object): elif candidate == CAR.ACURA_RDX: stop_and_go = False - ret.mass = 3935 * CV.LB_TO_KG + std_cargo + ret.mass = 3935. * CV.LB_TO_KG + STD_CARGO_KG ret.wheelbase = 2.68 ret.centerToFront = ret.wheelbase * 0.38 ret.steerRatio = 15.0 # as spec @@ -283,7 +274,7 @@ class CarInterface(object): elif candidate == CAR.ODYSSEY: stop_and_go = False - ret.mass = 4471 * CV.LB_TO_KG + std_cargo + ret.mass = 4471. * CV.LB_TO_KG + STD_CARGO_KG ret.wheelbase = 3.00 ret.centerToFront = ret.wheelbase * 0.41 ret.steerRatio = 14.35 # as spec @@ -296,7 +287,7 @@ class CarInterface(object): elif candidate == CAR.ODYSSEY_CHN: stop_and_go = False - ret.mass = 1849.2 + std_cargo # mean of 4 models in kg + ret.mass = 1849.2 + STD_CARGO_KG # mean of 4 models in kg ret.wheelbase = 2.90 # spec ret.centerToFront = ret.wheelbase * 0.41 # from CAR.ODYSSEY ret.steerRatio = 14.35 # from CAR.ODYSSEY @@ -309,7 +300,7 @@ class CarInterface(object): elif candidate in (CAR.PILOT, CAR.PILOT_2019): stop_and_go = False - ret.mass = 4204 * CV.LB_TO_KG + std_cargo # average weight + ret.mass = 4204. * CV.LB_TO_KG + STD_CARGO_KG # average weight ret.wheelbase = 2.82 ret.centerToFront = ret.wheelbase * 0.428 # average weight distribution ret.steerRatio = 16.0 # as spec @@ -322,7 +313,7 @@ class CarInterface(object): elif candidate == CAR.RIDGELINE: stop_and_go = False - ret.mass = 4515 * CV.LB_TO_KG + std_cargo + ret.mass = 4515. * CV.LB_TO_KG + STD_CARGO_KG ret.wheelbase = 3.18 ret.centerToFront = ret.wheelbase * 0.41 ret.steerRatio = 15.59 # as spec @@ -386,15 +377,16 @@ class CarInterface(object): def update(self, c): # ******************* do can recv ******************* canMonoTimes = [] - can_valid, _ = self.cp.update(int(sec_since_boot() * 1e9), True) - cam_valid, _ = self.cp_cam.update(int(sec_since_boot() * 1e9), False) - can_rcv_error = not can_valid or not cam_valid + can_rcv_valid, _ = self.cp.update(int(sec_since_boot() * 1e9), True) + cam_rcv_valid, _ = self.cp_cam.update(int(sec_since_boot() * 1e9), False) self.CS.update(self.cp, self.cp_cam) # create message ret = car.CarState.new_message() + ret.canValid = can_rcv_valid and cam_rcv_valid and self.cp.can_valid + # speeds ret.vEgo = self.CS.v_ego ret.aEgo = self.CS.a_ego @@ -493,25 +485,10 @@ class CarInterface(object): ret.buttonEvents = buttonEvents # events - # TODO: event names aren't checked at compile time. - # Maybe there is a way to use capnp enums directly events = [] - if not self.CS.can_valid: - self.can_invalid_count += 1 - else: - self.can_invalid_count = 0 - - if can_rcv_error or self.can_invalid_count >= 5: - events.append(create_event('commIssue', [ET.NO_ENTRY, ET.IMMEDIATE_DISABLE])) - - if not self.CS.cam_can_valid and self.CP.enableCamera: - self.cam_can_invalid_count += 1 - # wait 1.0s before throwing the alert to avoid it popping when you turn off the car - if self.cam_can_invalid_count >= 100 and self.CS.CP.carFingerprint not in HONDA_BOSCH: - events.append(create_event('invalidGiraffeHonda', [ET.NO_ENTRY, ET.IMMEDIATE_DISABLE, ET.PERMANENT])) - else: - self.cam_can_invalid_count = 0 - + # wait 1.0s before throwing the alert to avoid it popping when you turn off the car + if self.cp_cam.can_invalid_cnt >= 100 and self.CS.CP.carFingerprint not in HONDA_BOSCH and self.CP.enableCamera: + events.append(create_event('invalidGiraffeHonda', [ET.NO_ENTRY, ET.IMMEDIATE_DISABLE, ET.PERMANENT])) if self.CS.steer_error: events.append(create_event('steerUnavailable', [ET.NO_ENTRY, ET.IMMEDIATE_DISABLE, ET.PERMANENT])) elif self.CS.steer_warning: @@ -557,7 +534,7 @@ class CarInterface(object): if self.CS.CP.minEnableSpeed > 0 and ret.vEgo < 0.001: events.append(create_event('manualRestart', [ET.WARNING])) - cur_time = sec_since_boot() + cur_time = self.frame * DT_CTRL enable_pressed = False # handle button presses for b in ret.buttonEvents: diff --git a/selfdrive/car/honda/radar_interface.py b/selfdrive/car/honda/radar_interface.py index 6b5d692084..94e98cf2cb 100755 --- a/selfdrive/car/honda/radar_interface.py +++ b/selfdrive/car/honda/radar_interface.py @@ -1,13 +1,9 @@ #!/usr/bin/env python import os -import zmq import time from cereal import car from selfdrive.can.parser import CANParser from common.realtime import sec_since_boot -from selfdrive.services import service_list -import selfdrive.messaging as messaging - def _create_nidec_can_parser(): dbc_f = 'acura_ilx_2016_nidec.dbc' @@ -36,9 +32,6 @@ class RadarInterface(object): # Nidec self.rcp = _create_nidec_can_parser() - context = zmq.Context() - self.logcan = messaging.sub_sock(context, service_list['can'].port) - def update(self): canMonoTimes = [] @@ -81,7 +74,7 @@ class RadarInterface(object): errors = [] if not self.rcp.can_valid: - errors.append("commIssue") + errors.append("canError") if self.radar_fault: errors.append("fault") if self.radar_wrong_config: diff --git a/selfdrive/car/honda/values.py b/selfdrive/car/honda/values.py index a79ac6dc55..8b4d13bf75 100644 --- a/selfdrive/car/honda/values.py +++ b/selfdrive/car/honda/values.py @@ -193,5 +193,9 @@ SPEED_FACTOR = { CAR.RIDGELINE: 1., } +# msgs sent for steering controller by camera module on can 0. +# those messages are mutually exclusive on CRV and non-CRV cars +CAMERA_MSGS = [0xe4, 0x194] + # TODO: get these from dbc file HONDA_BOSCH = [CAR.ACCORD, CAR.ACCORD_15, CAR.ACCORDH, CAR.CIVIC_BOSCH, CAR.CRV_5G, CAR.CRV_HYBRID] diff --git a/selfdrive/car/hyundai/carstate.py b/selfdrive/car/hyundai/carstate.py index 6e5db74e5e..8c900d73f8 100644 --- a/selfdrive/car/hyundai/carstate.py +++ b/selfdrive/car/hyundai/carstate.py @@ -145,9 +145,6 @@ class CarState(object): self.right_blinker_flash = 0 def update(self, cp, cp_cam): - # copy can_valid - self.can_valid = cp.can_valid - # update prevs, update must run once per Loop self.prev_left_blinker_on = self.left_blinker_on self.prev_right_blinker_on = self.right_blinker_on diff --git a/selfdrive/car/hyundai/interface.py b/selfdrive/car/hyundai/interface.py index 75597bcb2c..bd99eaa5ac 100644 --- a/selfdrive/car/hyundai/interface.py +++ b/selfdrive/car/hyundai/interface.py @@ -6,6 +6,7 @@ from selfdrive.controls.lib.drive_helpers import EventTypes as ET, create_event from selfdrive.controls.lib.vehicle_model import VehicleModel from selfdrive.car.hyundai.carstate import CarState, get_can_parser, get_camera_parser from selfdrive.car.hyundai.values import CAMERA_MSGS, CAR, get_hud_alerts, FEATURES +from selfdrive.car import STD_CARGO_KG class CarInterface(object): @@ -18,7 +19,6 @@ class CarInterface(object): self.gas_pressed_prev = False self.brake_pressed_prev = False - self.can_invalid_count = 0 self.cruise_enabled_prev = False self.low_speed_alert = False @@ -42,21 +42,18 @@ class CarInterface(object): @staticmethod def get_params(candidate, fingerprint, vin=""): - # kg of standard extra cargo to count for drive, gas, etc... - std_cargo = 136 - ret = car.CarParams.new_message() ret.carName = "hyundai" ret.carFingerprint = candidate ret.carVin = vin ret.radarOffCan = True - ret.safetyModel = car.CarParams.SafetyModels.hyundai + ret.safetyModel = car.CarParams.SafetyModel.hyundai ret.enableCruise = True # stock acc # FIXME: hardcoding honda civic 2016 touring params so they can be used to # scale unknown params for other cars - mass_civic = 2923 * CV.LB_TO_KG + std_cargo + mass_civic = 2923. * CV.LB_TO_KG + STD_CARGO_KG wheelbase_civic = 2.70 centerToFront_civic = wheelbase_civic * 0.4 centerToRear_civic = wheelbase_civic - centerToFront_civic @@ -70,7 +67,7 @@ class CarInterface(object): if candidate == CAR.SANTA_FE: ret.lateralTuning.pid.kf = 0.00005 - ret.mass = 3982 * CV.LB_TO_KG + std_cargo + ret.mass = 3982. * CV.LB_TO_KG + STD_CARGO_KG ret.wheelbase = 2.766 # Values from optimizer @@ -82,7 +79,7 @@ class CarInterface(object): ret.minSteerSpeed = 0. elif candidate == CAR.KIA_SORENTO: ret.lateralTuning.pid.kf = 0.00005 - ret.mass = 1985 + std_cargo + ret.mass = 1985. + STD_CARGO_KG ret.wheelbase = 2.78 ret.steerRatio = 14.4 * 1.1 # 10% higher at the center seems reasonable ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] @@ -90,7 +87,7 @@ class CarInterface(object): ret.minSteerSpeed = 0. elif candidate == CAR.ELANTRA: ret.lateralTuning.pid.kf = 0.00006 - ret.mass = 1275 + std_cargo + ret.mass = 1275. + STD_CARGO_KG ret.wheelbase = 2.7 ret.steerRatio = 13.73 #Spec tire_stiffness_factor = 0.385 @@ -99,7 +96,7 @@ class CarInterface(object): ret.minSteerSpeed = 32 * CV.MPH_TO_MS elif candidate == CAR.GENESIS: ret.lateralTuning.pid.kf = 0.00005 - ret.mass = 2060 + std_cargo + ret.mass = 2060. + STD_CARGO_KG ret.wheelbase = 3.01 ret.steerRatio = 16.5 ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] @@ -107,7 +104,7 @@ class CarInterface(object): ret.minSteerSpeed = 35 * CV.MPH_TO_MS elif candidate == CAR.KIA_OPTIMA: ret.lateralTuning.pid.kf = 0.00005 - ret.mass = 3558 * CV.LB_TO_KG + ret.mass = 3558. * CV.LB_TO_KG ret.wheelbase = 2.80 ret.steerRatio = 13.75 tire_stiffness_factor = 0.5 @@ -115,7 +112,7 @@ class CarInterface(object): ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.25], [0.05]] elif candidate == CAR.KIA_STINGER: ret.lateralTuning.pid.kf = 0.00005 - ret.mass = 1825 + std_cargo + ret.mass = 1825. + STD_CARGO_KG ret.wheelbase = 2.78 ret.steerRatio = 14.4 * 1.15 # 15% higher at the center seems reasonable ret.lateralTuning.pid.kiBP, ret.lateralTuning.pid.kpBP = [[0.], [0.]] @@ -174,13 +171,15 @@ class CarInterface(object): def update(self, c): # ******************* do can recv ******************* canMonoTimes = [] - can_rcv_error = not self.cp.update(int(sec_since_boot() * 1e9), True) - cam_rcv_error = not self.cp_cam.update(int(sec_since_boot() * 1e9), False) - can_rcv_error = can_rcv_error or cam_rcv_error + can_rcv_valid, _ = self.cp.update(int(sec_since_boot() * 1e9), True) + cam_rcv_valid, _ = self.cp_cam.update(int(sec_since_boot() * 1e9), False) self.CS.update(self.cp, self.cp_cam) # create message ret = car.CarState.new_message() + + ret.canValid = can_rcv_valid and cam_rcv_valid and self.cp.can_valid # TODO: check cp_cam validity + # speeds ret.vEgo = self.CS.v_ego ret.vEgoRaw = self.CS.v_ego_raw @@ -247,23 +246,13 @@ class CarInterface(object): ret.doorOpen = not self.CS.door_all_closed ret.seatbeltUnlatched = not self.CS.seatbelt - # low speed steer alert hysteresis logic (only for cars with steer cut off above 10 m/s) if ret.vEgo < (self.CP.minSteerSpeed + 2.) and self.CP.minSteerSpeed > 10.: self.low_speed_alert = True if ret.vEgo > (self.CP.minSteerSpeed + 4.): self.low_speed_alert = False - # events events = [] - if not self.CS.can_valid: - self.can_invalid_count += 1 - else: - self.can_invalid_count = 0 - - if can_rcv_error or self.can_invalid_count >= 5: - events.append(create_event('commIssue', [ET.NO_ENTRY, ET.IMMEDIATE_DISABLE])) - if not ret.gearShifter == 'drive': events.append(create_event('wrongGear', [ET.NO_ENTRY, ET.SOFT_DISABLE])) if ret.doorOpen: diff --git a/selfdrive/car/mock/interface.py b/selfdrive/car/mock/interface.py index a14e4f0be9..a18d2bf244 100755 --- a/selfdrive/car/mock/interface.py +++ b/selfdrive/car/mock/interface.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -import zmq from cereal import car from selfdrive.config import Conversions as CV from selfdrive.services import service_list @@ -21,11 +20,10 @@ class CarInterface(object): self.CC = CarController cloudlog.debug("Using Mock Car Interface") - context = zmq.Context() # TODO: subscribe to phone sensor - self.sensor = messaging.sub_sock(context, service_list['sensorEvents'].port) - self.gps = messaging.sub_sock(context, service_list['gpsLocation'].port) + self.sensor = messaging.sub_sock(service_list['sensorEvents'].port) + self.gps = messaging.sub_sock(service_list['gpsLocation'].port) self.speed = 0. self.prev_speed = 0. @@ -50,7 +48,7 @@ class CarInterface(object): ret.carName = "mock" ret.carFingerprint = candidate - ret.safetyModel = car.CarParams.SafetyModels.noOutput + ret.safetyModel = car.CarParams.SafetyModel.noOutput ret.openpilotLongitudinalControl = False # FIXME: hardcoding honda civic 2016 touring params so they can be used to diff --git a/selfdrive/car/subaru/carcontroller.py b/selfdrive/car/subaru/carcontroller.py index 83dbbd7c5a..95e0013faa 100644 --- a/selfdrive/car/subaru/carcontroller.py +++ b/selfdrive/car/subaru/carcontroller.py @@ -1,5 +1,4 @@ #from common.numpy_fast import clip -from common.realtime import sec_since_boot from selfdrive.car import apply_std_steer_torque_limits from selfdrive.car.subaru import subarucan from selfdrive.car.subaru.values import CAR, DBC @@ -21,7 +20,6 @@ class CarControllerParams(): class CarController(object): def __init__(self, car_fingerprint): - self.start_time = sec_since_boot() self.lkas_active = False self.steer_idx = 0 self.apply_steer_last = 0 diff --git a/selfdrive/car/subaru/carstate.py b/selfdrive/car/subaru/carstate.py index 0d5deec011..9a92777548 100644 --- a/selfdrive/car/subaru/carstate.py +++ b/selfdrive/car/subaru/carstate.py @@ -106,9 +106,6 @@ class CarState(object): def update(self, cp, cp_cam): - self.can_valid = cp.can_valid - self.cam_can_valid = cp_cam.can_valid - self.pedal_gas = cp.vl["Throttle"]['Throttle_Pedal'] self.brake_pressure = cp.vl["Brake_Pedal"]['Brake_Pedal'] self.user_gas_pressed = self.pedal_gas > 0 diff --git a/selfdrive/car/subaru/interface.py b/selfdrive/car/subaru/interface.py index 874745a66f..a609ee9092 100644 --- a/selfdrive/car/subaru/interface.py +++ b/selfdrive/car/subaru/interface.py @@ -6,6 +6,7 @@ from selfdrive.controls.lib.drive_helpers import create_event, EventTypes as ET from selfdrive.controls.lib.vehicle_model import VehicleModel from selfdrive.car.subaru.values import CAR from selfdrive.car.subaru.carstate import CarState, get_powertrain_can_parser, get_camera_can_parser +from selfdrive.car import STD_CARGO_KG class CarInterface(object): @@ -13,7 +14,6 @@ class CarInterface(object): self.CP = CP self.frame = 0 - self.can_invalid_count = 0 self.acc_active_prev = 0 self.gas_pressed_prev = False @@ -44,18 +44,17 @@ class CarInterface(object): ret.carName = "subaru" ret.carFingerprint = candidate ret.carVin = vin - ret.safetyModel = car.CarParams.SafetyModels.subaru + ret.safetyModel = car.CarParams.SafetyModel.subaru ret.enableCruise = True ret.steerLimitAlert = True ret.enableCamera = True - std_cargo = 136 ret.steerRateCost = 0.7 if candidate in [CAR.IMPREZA]: - ret.mass = 1568 + std_cargo + ret.mass = 1568. + STD_CARGO_KG ret.wheelbase = 2.67 ret.centerToFront = ret.wheelbase * 0.5 ret.steerRatio = 15 @@ -87,7 +86,7 @@ class CarInterface(object): # hardcoding honda civic 2016 touring params so they can be used to # scale unknown params for other cars - mass_civic = 2923./2.205 + std_cargo + mass_civic = 2923. * CV.LB_TO_KG + STD_CARGO_KG wheelbase_civic = 2.70 centerToFront_civic = wheelbase_civic * 0.4 centerToRear_civic = wheelbase_civic - centerToFront_civic @@ -114,15 +113,16 @@ class CarInterface(object): # returns a car.CarState def update(self, c): - can_rcv_error = not self.pt_cp.update(int(sec_since_boot() * 1e9), True) - cam_rcv_error = not self.cam_cp.update(int(sec_since_boot() * 1e9), False) - can_rcv_error = can_rcv_error or cam_rcv_error + can_rcv_valid, _ = self.pt_cp.update(int(sec_since_boot() * 1e9), True) + cam_rcv_valid, _ = self.cam_cp.update(int(sec_since_boot() * 1e9), False) self.CS.update(self.pt_cp, self.cam_cp) # create message ret = car.CarState.new_message() + ret.canValid = can_rcv_valid and cam_rcv_valid and self.pt_cp.can_valid and self.cam_cp.can_valid + # speeds ret.vEgo = self.CS.v_ego ret.aEgo = self.CS.a_ego @@ -177,14 +177,6 @@ class CarInterface(object): events = [] - if not self.CS.can_valid: - self.can_invalid_count += 1 - else: - self.can_invalid_count = 0 - - if can_rcv_error or self.can_invalid_count >= 5: - events.append(create_event('commIssue', [ET.NO_ENTRY, ET.IMMEDIATE_DISABLE])) - if ret.seatbeltUnlatched: events.append(create_event('seatbeltNotLatched', [ET.NO_ENTRY, ET.SOFT_DISABLE])) diff --git a/selfdrive/car/toyota/carcontroller.py b/selfdrive/car/toyota/carcontroller.py index 91bcb677a5..c6ffe0ea1e 100644 --- a/selfdrive/car/toyota/carcontroller.py +++ b/selfdrive/car/toyota/carcontroller.py @@ -6,7 +6,7 @@ from selfdrive.car.toyota.toyotacan import make_can_msg, create_video_target,\ create_steer_command, create_ui_command, \ create_ipas_steer_command, create_accel_command, \ create_fcw_command -from selfdrive.car.toyota.values import ECU, STATIC_MSGS, TSSP2_CAR +from selfdrive.car.toyota.values import ECU, STATIC_MSGS, TSS2_CAR from selfdrive.can.packer import CANPacker VisualAlert = car.CarControl.HUDControl.VisualAlert @@ -248,7 +248,7 @@ class CarController(object): if (frame % 100 == 0 or send_ui) and ECU.CAM in self.fake_ecus: can_sends.append(create_ui_command(self.packer, steer, sound1, sound2, left_line, right_line, left_lane_depart, right_lane_depart)) - if frame % 100 == 0 and ECU.DSU in self.fake_ecus and self.car_fingerprint not in TSSP2_CAR: + if frame % 100 == 0 and ECU.DSU in self.fake_ecus and self.car_fingerprint not in TSS2_CAR: can_sends.append(create_fcw_command(self.packer, fcw)) #*** static msgs *** diff --git a/selfdrive/car/toyota/carstate.py b/selfdrive/car/toyota/carstate.py index cdb735d4fc..9994e793dd 100644 --- a/selfdrive/car/toyota/carstate.py +++ b/selfdrive/car/toyota/carstate.py @@ -1,8 +1,9 @@ import numpy as np from common.kalman.simple_kalman import KF1D -from selfdrive.can.parser import CANParser, CANDefine +from selfdrive.can.parser import CANParser +from selfdrive.can.can_define import CANDefine from selfdrive.config import Conversions as CV -from selfdrive.car.toyota.values import CAR, DBC, STEER_THRESHOLD +from selfdrive.car.toyota.values import CAR, DBC, STEER_THRESHOLD, NO_DSU_CAR def parse_gear_shifter(gear, vals): @@ -31,10 +32,8 @@ def get_can_parser(CP): ("DOOR_OPEN_RR", "SEATS_DOORS", 1), ("SEATBELT_DRIVER_UNLATCHED", "SEATS_DOORS", 1), ("TC_DISABLED", "ESP_CONTROL", 1), - ("STEER_ANGLE", "STEER_ANGLE_SENSOR", 0), ("STEER_FRACTION", "STEER_ANGLE_SENSOR", 0), ("STEER_RATE", "STEER_ANGLE_SENSOR", 0), - ("GAS_RELEASED", "PCM_CRUISE", 0), ("CRUISE_ACTIVE", "PCM_CRUISE", 0), ("CRUISE_STATE", "PCM_CRUISE", 0), ("MAIN_ON", "PCM_CRUISE_2", 0), @@ -60,6 +59,11 @@ def get_can_parser(CP): ("EPS_STATUS", 25), ] + if CP.carFingerprint in NO_DSU_CAR: + signals += [("STEER_ANGLE", "STEER_TORQUE_SENSOR", 0)] + else: + signals += [("STEER_ANGLE", "STEER_ANGLE_SENSOR", 0)] + if CP.carFingerprint == CAR.PRIUS: signals += [("STATE", "AUTOPARK_STATUS", 0)] @@ -103,11 +107,7 @@ class CarState(object): K=[[0.12287673], [0.29666309]]) self.v_ego = 0.0 - def update(self, cp, cp_cam): - # copy can_valid - self.can_valid = cp.can_valid - self.cam_can_valid = cp_cam.can_valid - + def update(self, cp): # update prevs, update must run once per loop self.prev_left_blinker_on = self.left_blinker_on self.prev_right_blinker_on = self.right_blinker_on @@ -141,7 +141,10 @@ class CarState(object): self.a_ego = float(v_ego_x[1]) self.standstill = not v_wheel > 0.001 - self.angle_steers = cp.vl["STEER_ANGLE_SENSOR"]['STEER_ANGLE'] + cp.vl["STEER_ANGLE_SENSOR"]['STEER_FRACTION'] + if self.CP.carFingerprint in NO_DSU_CAR: + self.angle_steers = cp.vl["STEER_TORQUE_SENSOR"]['STEER_ANGLE'] + else: + self.angle_steers = cp.vl["STEER_ANGLE_SENSOR"]['STEER_ANGLE'] + cp.vl["STEER_ANGLE_SENSOR"]['STEER_FRACTION'] self.angle_steers_rate = cp.vl["STEER_ANGLE_SENSOR"]['STEER_RATE'] can_gear = int(cp.vl["GEAR_PACKET"]['GEAR']) self.gear_shifter = parse_gear_shifter(can_gear, self.shifter_values) @@ -163,7 +166,6 @@ class CarState(object): self.v_cruise_pcm = cp.vl["PCM_CRUISE_2"]['SET_SPEED'] self.pcm_acc_status = cp.vl["PCM_CRUISE"]['CRUISE_STATE'] self.pcm_acc_active = bool(cp.vl["PCM_CRUISE"]['CRUISE_ACTIVE']) - self.gas_pressed = not cp.vl["PCM_CRUISE"]['GAS_RELEASED'] self.low_speed_lockout = cp.vl["PCM_CRUISE_2"]['LOW_SPEED_LOCKOUT'] == 2 self.brake_lights = bool(cp.vl["ESP_CONTROL"]['BRAKE_LIGHTS_ACC'] or self.brake_pressed) if self.CP.carFingerprint == CAR.PRIUS: diff --git a/selfdrive/car/toyota/interface.py b/selfdrive/car/toyota/interface.py index 71ace4c1f6..83bf921d95 100755 --- a/selfdrive/car/toyota/interface.py +++ b/selfdrive/car/toyota/interface.py @@ -6,6 +6,7 @@ from selfdrive.controls.lib.drive_helpers import EventTypes as ET, create_event from selfdrive.controls.lib.vehicle_model import VehicleModel from selfdrive.car.toyota.carstate import CarState, get_can_parser, get_cam_can_parser from selfdrive.car.toyota.values import ECU, check_ecu_msgs, CAR, NO_STOP_TIMER_CAR +from selfdrive.car import STD_CARGO_KG from selfdrive.swaglog import cloudlog @@ -17,8 +18,6 @@ class CarInterface(object): self.frame = 0 self.gas_pressed_prev = False self.brake_pressed_prev = False - self.can_invalid_count = 0 - self.cam_can_valid_count = 0 self.cruise_enabled_prev = False # *** init the major players *** @@ -44,23 +43,20 @@ class CarInterface(object): @staticmethod def get_params(candidate, fingerprint, vin=""): - # kg of standard extra cargo to count for drive, gas, etc... - std_cargo = 136 - ret = car.CarParams.new_message() ret.carName = "toyota" ret.carFingerprint = candidate ret.carVin = vin - ret.safetyModel = car.CarParams.SafetyModels.toyota + ret.safetyModel = car.CarParams.SafetyModel.toyota # pedal ret.enableCruise = not ret.enableGasInterceptor # FIXME: hardcoding honda civic 2016 touring params so they can be used to # scale unknown params for other cars - mass_civic = 2923 * CV.LB_TO_KG + std_cargo + mass_civic = 2923. * CV.LB_TO_KG + STD_CARGO_KG wheelbase_civic = 2.70 centerToFront_civic = wheelbase_civic * 0.4 centerToRear_civic = wheelbase_civic - centerToFront_civic @@ -79,7 +75,7 @@ class CarInterface(object): ret.wheelbase = 2.70 ret.steerRatio = 15.00 # unknown end-to-end spec tire_stiffness_factor = 0.6371 # hand-tune - ret.mass = 3045 * CV.LB_TO_KG + std_cargo + ret.mass = 3045. * CV.LB_TO_KG + STD_CARGO_KG ret.lateralTuning.init('indi') ret.lateralTuning.indi.innerLoopGain = 4.0 @@ -88,96 +84,105 @@ class CarInterface(object): ret.lateralTuning.indi.actuatorEffectiveness = 1.0 ret.steerActuatorDelay = 0.5 - ret.steerRateCost = 0.5 elif candidate in [CAR.RAV4, CAR.RAV4H]: stop_and_go = True if (candidate in CAR.RAV4H) else False - ret.safetyParam = 73 # see conversion factor for STEER_TORQUE_EPS in dbc file + ret.safetyParam = 73 ret.wheelbase = 2.65 ret.steerRatio = 16.30 # 14.5 is spec end-to-end tire_stiffness_factor = 0.5533 - ret.mass = 3650 * CV.LB_TO_KG + std_cargo # mean between normal and hybrid + ret.mass = 3650. * CV.LB_TO_KG + STD_CARGO_KG # mean between normal and hybrid ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.6], [0.05]] ret.lateralTuning.pid.kf = 0.00006 # full torque for 10 deg at 80mph means 0.00007818594 elif candidate == CAR.COROLLA: stop_and_go = False - ret.safetyParam = 100 # see conversion factor for STEER_TORQUE_EPS in dbc file + ret.safetyParam = 100 ret.wheelbase = 2.70 ret.steerRatio = 17.8 tire_stiffness_factor = 0.444 - ret.mass = 2860 * CV.LB_TO_KG + std_cargo # mean between normal and hybrid + ret.mass = 2860. * CV.LB_TO_KG + STD_CARGO_KG # mean between normal and hybrid ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.2], [0.05]] ret.lateralTuning.pid.kf = 0.00003 # full torque for 20 deg at 80mph means 0.00007818594 elif candidate == CAR.LEXUS_RXH: stop_and_go = True - ret.safetyParam = 100 # see conversion factor for STEER_TORQUE_EPS in dbc file + ret.safetyParam = 73 ret.wheelbase = 2.79 ret.steerRatio = 16. # 14.8 is spec end-to-end tire_stiffness_factor = 0.444 # not optimized yet - ret.mass = 4481 * CV.LB_TO_KG + std_cargo # mean between min and max + ret.mass = 4481. * CV.LB_TO_KG + STD_CARGO_KG # mean between min and max ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.6], [0.1]] ret.lateralTuning.pid.kf = 0.00006 # full torque for 10 deg at 80mph means 0.00007818594 elif candidate in [CAR.CHR, CAR.CHRH]: stop_and_go = True - ret.safetyParam = 100 + ret.safetyParam = 73 ret.wheelbase = 2.63906 ret.steerRatio = 13.6 tire_stiffness_factor = 0.7933 - ret.mass = 3300. * CV.LB_TO_KG + std_cargo + ret.mass = 3300. * CV.LB_TO_KG + STD_CARGO_KG ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.723], [0.0428]] ret.lateralTuning.pid.kf = 0.00006 elif candidate in [CAR.CAMRY, CAR.CAMRYH]: stop_and_go = True - ret.safetyParam = 100 + ret.safetyParam = 73 ret.wheelbase = 2.82448 ret.steerRatio = 13.7 tire_stiffness_factor = 0.7933 - ret.mass = 3400 * CV.LB_TO_KG + std_cargo #mean between normal and hybrid + ret.mass = 3400. * CV.LB_TO_KG + STD_CARGO_KG #mean between normal and hybrid ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.6], [0.1]] ret.lateralTuning.pid.kf = 0.00006 elif candidate in [CAR.HIGHLANDER, CAR.HIGHLANDERH]: stop_and_go = True - ret.safetyParam = 100 + ret.safetyParam = 73 ret.wheelbase = 2.78 ret.steerRatio = 16.0 tire_stiffness_factor = 0.444 # not optimized yet - ret.mass = 4607 * CV.LB_TO_KG + std_cargo #mean between normal and hybrid limited + ret.mass = 4607. * CV.LB_TO_KG + STD_CARGO_KG #mean between normal and hybrid limited ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.6], [0.05]] ret.lateralTuning.pid.kf = 0.00006 elif candidate == CAR.AVALON: stop_and_go = False - ret.safetyParam = 73 # see conversion factor for STEER_TORQUE_EPS in dbc file + ret.safetyParam = 73 ret.wheelbase = 2.82 ret.steerRatio = 14.8 #Found at https://pressroom.toyota.com/releases/2016+avalon+product+specs.download tire_stiffness_factor = 0.7983 - ret.mass = 3505 * CV.LB_TO_KG + std_cargo # mean between normal and hybrid + ret.mass = 3505. * CV.LB_TO_KG + STD_CARGO_KG # mean between normal and hybrid ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.17], [0.03]] ret.lateralTuning.pid.kf = 0.00006 - elif candidate == CAR.RAV4_2019: + elif candidate == CAR.RAV4_TSS2: stop_and_go = True - ret.safetyParam = 100 + ret.safetyParam = 73 ret.wheelbase = 2.68986 ret.steerRatio = 14.3 tire_stiffness_factor = 0.7933 - ret.mass = 3370. * CV.LB_TO_KG + std_cargo - ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.3], [0.05]] + ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.6], [0.1]] + ret.mass = 3370. * CV.LB_TO_KG + STD_CARGO_KG ret.lateralTuning.pid.kf = 0.00007818594 - elif candidate == CAR.COROLLA_HATCH: + elif candidate == CAR.COROLLA_TSS2: stop_and_go = True - ret.safetyParam = 100 + ret.safetyParam = 73 ret.wheelbase = 2.63906 ret.steerRatio = 13.9 tire_stiffness_factor = 0.444 - ret.mass = 3060. * CV.LB_TO_KG + std_cargo - ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.3], [0.05]] + ret.mass = 3060. * CV.LB_TO_KG + STD_CARGO_KG + ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.6], [0.1]] + ret.lateralTuning.pid.kf = 0.00007818594 + + elif candidate == CAR.LEXUS_ESH_TSS2: + stop_and_go = True + ret.safetyParam = 73 + ret.wheelbase = 2.8702 + ret.steerRatio = 16.0 #not optimized + tire_stiffness_factor = 0.444 + ret.mass = 3704. * CV.LB_TO_KG + STD_CARGO_KG + ret.lateralTuning.pid.kpV, ret.lateralTuning.pid.kiV = [[0.6], [0.1]] ret.lateralTuning.pid.kf = 0.00007818594 ret.steerRateCost = 1. @@ -251,18 +256,19 @@ class CarInterface(object): # ******************* do can recv ******************* canMonoTimes = [] - can_valid, _ = self.cp.update(int(sec_since_boot() * 1e9), True) - can_rcv_error = not can_valid + can_rcv_valid, _ = self.cp.update(int(sec_since_boot() * 1e9), True) # run the cam can update for 10s as we just need to know if the camera is alive if self.frame < 1000: self.cp_cam.update(int(sec_since_boot() * 1e9), False) - self.CS.update(self.cp, self.cp_cam) + self.CS.update(self.cp) # create message ret = car.CarState.new_message() + ret.canValid = can_rcv_valid and self.cp.can_valid + # speeds ret.vEgo = self.CS.v_ego ret.vEgoRaw = self.CS.v_ego_raw @@ -335,18 +341,8 @@ class CarInterface(object): # events events = [] - if not self.CS.can_valid: - self.can_invalid_count += 1 - else: - self.can_invalid_count = 0 - - if can_rcv_error or self.can_invalid_count >= 5: - events.append(create_event('commIssue', [ET.NO_ENTRY, ET.IMMEDIATE_DISABLE])) - - if self.CS.cam_can_valid: - self.cam_can_valid_count += 1 - if self.cam_can_valid_count >= 5: - self.forwarding_camera = True + if self.cp_cam.can_valid: + self.forwarding_camera = True if not ret.gearShifter == 'drive' and self.CP.enableDsu: events.append(create_event('wrongGear', [ET.NO_ENTRY, ET.SOFT_DISABLE])) diff --git a/selfdrive/car/toyota/radar_interface.py b/selfdrive/car/toyota/radar_interface.py index b8628c5bb1..c160e751aa 100755 --- a/selfdrive/car/toyota/radar_interface.py +++ b/selfdrive/car/toyota/radar_interface.py @@ -1,18 +1,15 @@ #!/usr/bin/env python import os -import zmq import time from selfdrive.can.parser import CANParser from cereal import car from common.realtime import sec_since_boot -from selfdrive.services import service_list -import selfdrive.messaging as messaging -from selfdrive.car.toyota.values import NO_DSU_CAR, DBC, TSSP2_CAR +from selfdrive.car.toyota.values import NO_DSU_CAR, DBC, TSS2_CAR def _create_radar_can_parser(car_fingerprint): dbc_f = DBC[car_fingerprint]['radar'] - if car_fingerprint in TSSP2_CAR: + if car_fingerprint in TSS2_CAR: RADAR_A_MSGS = list(range(0x180, 0x190)) RADAR_B_MSGS = list(range(0x190, 0x1a0)) else: @@ -39,7 +36,7 @@ class RadarInterface(object): self.delay = 0.0 # Delay of radar - if CP.carFingerprint in TSSP2_CAR: + if CP.carFingerprint in TSS2_CAR: self.RADAR_A_MSGS = list(range(0x180, 0x190)) self.RADAR_B_MSGS = list(range(0x190, 0x1a0)) else: @@ -49,17 +46,15 @@ class RadarInterface(object): self.valid_cnt = {key: 0 for key in self.RADAR_A_MSGS} self.rcp = _create_radar_can_parser(CP.carFingerprint) - self.no_dsu_car = CP.carFingerprint in NO_DSU_CAR - - context = zmq.Context() - self.logcan = messaging.sub_sock(context, service_list['can'].port) + # No radar dbc for cars without DSU which are not TSS 2.0 + # TODO: make a adas dbc file for dsu-less models + self.no_radar = CP.carFingerprint in NO_DSU_CAR and CP.carFingerprint not in TSS2_CAR def update(self): ret = car.RadarData.new_message() - if self.no_dsu_car: - # TODO: make a adas dbc file for dsu-less models + if self.no_radar: time.sleep(0.05) return ret @@ -74,7 +69,7 @@ class RadarInterface(object): errors = [] if not self.rcp.can_valid: - errors.append("commIssue") + errors.append("canError") ret.errors = errors ret.canMonoTimes = canMonoTimes diff --git a/selfdrive/car/toyota/toyotacan.py b/selfdrive/car/toyota/toyotacan.py index 85b8dce8d7..7de38c8914 100644 --- a/selfdrive/car/toyota/toyotacan.py +++ b/selfdrive/car/toyota/toyotacan.py @@ -64,6 +64,22 @@ def create_steer_command(packer, steer, steer_req, raw_cnt): return packer.make_can_msg("STEERING_LKA", 0, values) +def create_lta_steer_command(packer, steer, steer_req, raw_cnt, angle): + """Creates a CAN message for the Toyota LTA Steer Command.""" + + values = { + "COUNTER": raw_cnt, + "SETME_X3": 3, + "PERCENTAGE" : 100, + "SETME_X64": 0x64, + "ANGLE": angle, + "STEER_ANGLE_CMD": steer, + "STEER_REQUEST": steer_req, + "BIT": 0, + } + return packer.make_can_msg("STEERING_LTA", 0, values) + + def create_accel_command(packer, accel, pcm_cancel, standstill_req, lead): # TODO: find the exact canceling bit that does not create a chime values = { diff --git a/selfdrive/car/toyota/values.py b/selfdrive/car/toyota/values.py index b3c5a11fa7..f487888424 100644 --- a/selfdrive/car/toyota/values.py +++ b/selfdrive/car/toyota/values.py @@ -13,8 +13,9 @@ class CAR: HIGHLANDER = "TOYOTA HIGHLANDER 2017" HIGHLANDERH = "TOYOTA HIGHLANDER HYBRID 2018" AVALON = "TOYOTA AVALON 2016" - RAV4_2019 = "TOYOTA RAV4 2019" - COROLLA_HATCH = "TOYOTA COROLLA HATCH 2019" + RAV4_TSS2 = "TOYOTA RAV4 2019" + COROLLA_TSS2 = "TOYOTA COROLLA TSS2 2019" + LEXUS_ESH_TSS2 = "LEXUS ES 300H 2019" class ECU: @@ -159,7 +160,7 @@ FINGERPRINTS = { CAR.AVALON: [{ 36: 8, 37: 8, 170: 8, 180: 8, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 547: 8, 550: 8, 552: 4, 562: 6, 608: 8, 610: 5, 643: 7, 705: 8, 740: 5, 800: 8, 835: 8, 836: 8, 849: 4, 869: 7, 870: 7, 871: 2, 896: 8, 897: 8, 905: 8, 911: 1, 916: 2, 921: 8, 933: 6, 944: 8, 945: 8, 951: 8, 955: 8, 956: 8, 979: 2, 1005: 2, 1014: 8, 1017: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1059: 1, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1176: 8, 1177: 8, 1178: 8, 1179: 8, 1180: 8, 1181: 8, 1190: 8, 1191: 8, 1192: 8, 1196: 8, 1200: 8, 1201: 8, 1202: 8, 1203: 8, 1206: 8, 1227: 8, 1235: 8, 1237: 8, 1264: 8, 1279: 8, 1552: 8, 1553: 8, 1554: 8, 1555: 8, 1556: 8, 1557: 8, 1558: 8, 1561: 8, 1562: 8, 1568: 8, 1569: 8, 1570: 8, 1571: 8, 1572: 8, 1584: 8, 1589: 8, 1592: 8, 1593: 8, 1595: 8, 1596: 8, 1597: 8, 1664: 8, 1728: 8, 1779: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8 }], - CAR.RAV4_2019: [ + CAR.RAV4_TSS2: [ # LE { 36: 8, 37: 8, 170: 8, 180: 8, 186: 4, 355: 5, 401: 8, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 544: 4, 550: 8, 552: 4, 562: 6, 565: 8, 608: 8, 610: 8, 643: 7, 705: 8, 728: 8, 740: 5, 742: 8, 743: 8, 761: 8, 764: 8, 765: 8, 800: 8, 810: 2, 812: 8, 824: 8, 829: 2, 830: 7, 835: 8, 836: 8, 865: 8, 869: 7, 870: 7, 871: 2, 877: 8, 881: 8, 882: 8, 885: 8, 896: 8, 898: 8, 900: 6, 902: 6, 905: 8, 921: 8, 933: 8, 934: 8, 935: 8, 944: 8, 945: 8, 951: 8, 955: 8, 956: 8, 976: 1, 998: 5, 999: 7, 1000: 8, 1001: 8, 1002: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1059: 1, 1063: 8, 1076: 8, 1077: 8,1114: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1172: 8, 1235: 8, 1279: 8, 1541: 8, 1552: 8, 1553:8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1592: 8, 1594: 8, 1595: 8, 1649: 8, 1745: 8, 1775: 8, 1779: 8, 1786: 8, 1787: 8, 1788: 8, 1789: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8 @@ -168,30 +169,37 @@ FINGERPRINTS = { { 36: 8, 37: 8, 170: 8, 180: 8, 186: 4, 401: 8, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 544: 4, 550: 8, 552: 4, 562: 6, 565: 8, 608: 8, 610: 8, 643: 7, 658: 8, 705: 8, 728: 8, 740: 5, 742: 8, 743: 8, 761: 8, 764: 8, 765: 8, 800: 8, 810: 2, 812: 8, 814: 8, 818: 8, 822: 8, 824: 8, 829: 2, 830: 7, 835: 8, 836: 8, 865: 8, 869: 7, 870: 7, 871: 2, 877: 8, 881: 8, 882: 8, 885: 8, 889: 8, 891: 8, 896: 8, 898: 8, 900: 6, 902: 6, 905: 8, 918: 8, 921: 8, 933: 8, 934: 8, 935: 8, 944: 8, 945: 8, 951: 8, 955: 8, 956: 8, 976: 1, 987: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1002: 8, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1059: 1, 1063: 8, 1076: 8, 1077: 8, 1082: 8, 1084: 8, 1085: 8, 1086: 8, 1114: 8, 1132: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1172: 8, 1228: 8, 1235: 8, 1237: 8, 1263: 8, 1264: 8, 1279: 8, 1541: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1592: 8, 1594: 8, 1595: 8, 1649: 8, 1696: 8, 1745: 8, 1775: 8, 1779: 8, 1786: 8, 1787: 8, 1788: 8, 1789: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8 }], - CAR.COROLLA_HATCH: [{ - 36: 8, 37: 8, 114: 5, 170: 8, 180: 8, 186: 4, 401: 8, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 544: 4, 550: 8, 552: 4, 562: 6, 608: 8, 610: 8, 643: 7, 705: 8, 728: 8, 740: 5, 742: 8, 743: 8, 761: 8, 764: 8, 765: 8, 800: 8, 810: 2, 812: 8, 824: 8, 829: 2, 830: 7, 835: 8, 836: 8, 865: 8, 869: 7, 870: 7, 871: 2, 877: 8, 881: 8, 896: 8, 898: 8, 900: 6, 902: 6, 905: 8, 921: 8, 933: 8, 934: 8, 935: 8, 944: 8, 945: 8, 951: 8, 955: 8, 956: 8, 976: 1, 998: 5, 999: 7, 1000: 8, 1001: 8, 1002: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1059: 1, 1076: 8, 1077: 8, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1172: 8, 1235: 8, 1279: 8, 1541: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1592: 8, 1595: 8, 1649: 8, 1745: 8, 1775: 8, 1779: 8, 1786: 8, 1787: 8, 1788: 8, 1789: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8 - }] + CAR.COROLLA_TSS2: [ + # hatch 2019+ and sedan 2020+ + { + 36: 8, 37: 8, 114: 5, 170: 8, 180: 8, 186: 4, 401: 8, 426: 6, 452: 8, 464: 8, 466: 8, 467: 8, 544: 4, 550: 8, 552: 4, 562: 6, 608: 8, 610: 8, 643: 7, 705: 8, 728: 8, 740: 5, 742: 8, 743: 8, 761: 8, 764: 8, 765: 8, 800: 8, 810: 2, 812: 8, 824: 8, 829: 2, 830: 7, 835: 8, 836: 8, 865: 8, 869: 7, 870: 7, 871: 2, 877: 8, 881: 8, 896: 8, 898: 8, 900: 6, 902: 6, 905: 8, 921: 8, 933: 8, 934: 8, 935: 8, 944: 8, 945: 8, 951: 8, 955: 8, 956: 8, 976: 1, 998: 5, 999: 7, 1000: 8, 1001: 8, 1002: 8, 1014: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1044: 8, 1056: 8, 1059: 1, 1076: 8, 1077: 8, 1114: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1172: 8, 1235: 8, 1237: 8, 1279: 8, 1541: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1592: 8, 1595: 8, 1649: 8, 1745: 8, 1775: 8, 1779: 8, 1786: 8, 1787: 8, 1788: 8, 1789: 8, 1808: 8, 1809: 8, 1816: 8, 1817: 8, 1840: 8, 1848: 8, 1904: 8, 1912: 8, 1940: 8, 1941: 8, 1948: 8, 1949: 8, 1952: 8, 1960: 8, 1981: 8, 1986: 8, 1990: 8, 1994: 8, 1998: 8, 2004: 8 + }], + CAR.LEXUS_ESH_TSS2: [ + { + 36: 8, 37: 8, 166: 8, 170: 8, 180: 8, 295: 8, 296: 8, 401: 8, 426: 6, 452: 8, 466: 8, 467: 8, 550: 8, 552: 4, 560: 7, 562: 6, 581: 5, 608: 8, 610: 8, 643: 7, 658: 8, 713: 8, 728: 8, 740: 5, 742: 8, 743: 8, 744: 8, 761: 8, 764: 8, 765: 8, 800: 8, 810: 2, 812: 8, 814: 8, 818: 8, 824: 8, 829: 2, 830: 7, 835: 8, 836: 8, 863: 8, 865: 8, 869: 7, 870: 7, 871: 2, 877: 8, 881: 8, 882: 8, 885: 8, 889: 8, 896: 8, 898: 8, 900: 6, 902: 6, 905: 8, 913: 8, 918: 8, 921: 8, 933: 8, 934: 8, 935: 8, 944: 8, 945: 8, 950: 8, 951: 8, 953: 8, 955: 8, 956: 8, 971: 7, 975: 5, 987: 8, 993: 8, 998: 5, 999: 7, 1000: 8, 1001: 8, 1002: 8, 1017: 8, 1020: 8, 1041: 8, 1042: 8, 1056: 8, 1057: 8, 1059: 1, 1071: 8, 1076: 8, 1077: 8, 1082: 8, 1084: 8, 1085: 8, 1086: 8, 1114: 8, 1132: 8, 1161: 8, 1162: 8, 1163: 8, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1172: 8, 1228: 8, 1235: 8, 1264: 8, 1279: 8, 1541: 8, 1552: 8, 1553: 8, 1556: 8, 1557: 8, 1568: 8, 1570: 8, 1571: 8, 1572: 8, 1575: 8, 1592: 8, 1594: 8, 1595: 8, 1649: 8, 1696: 8, 1775: 8, 1777: 8, 1779: 8, 1786: 8, 1787: 8, 1788: 8, 1789: 8, 1904: 8, 1912: 8, 1990: 8, 1998: 8 + }], } STEER_THRESHOLD = 100 DBC = { - CAR.RAV4H: dbc_dict('toyota_rav4_hybrid_2017_pt_generated', 'toyota_prius_2017_adas'), - CAR.RAV4: dbc_dict('toyota_rav4_2017_pt_generated', 'toyota_prius_2017_adas'), - CAR.PRIUS: dbc_dict('toyota_prius_2017_pt_generated', 'toyota_prius_2017_adas'), - CAR.COROLLA: dbc_dict('toyota_corolla_2017_pt_generated', 'toyota_prius_2017_adas'), - CAR.LEXUS_RXH: dbc_dict('lexus_rx_hybrid_2017_pt_generated', 'toyota_prius_2017_adas'), - CAR.CHR: dbc_dict('toyota_chr_2018_pt_generated', 'toyota_prius_2017_adas'), - CAR.CHRH: dbc_dict('toyota_chr_hybrid_2018_pt_generated', 'toyota_prius_2017_adas'), - CAR.CAMRY: dbc_dict('toyota_chr_2018_pt_generated', 'toyota_prius_2017_adas'), - CAR.CAMRYH: dbc_dict('toyota_camry_hybrid_2018_pt_generated', 'toyota_prius_2017_adas'), - CAR.HIGHLANDER: dbc_dict('toyota_highlander_2017_pt_generated', 'toyota_prius_2017_adas'), - CAR.HIGHLANDERH: dbc_dict('toyota_highlander_hybrid_2018_pt_generated', 'toyota_prius_2017_adas'), - CAR.AVALON: dbc_dict('toyota_avalon_2017_pt_generated', 'toyota_prius_2017_adas'), - CAR.RAV4_2019: dbc_dict('toyota_chr_2018_pt_generated', 'toyota_rav4_2019_adas'), - CAR.COROLLA_HATCH: dbc_dict('toyota_chr_2018_pt_generated', 'toyota_rav4_2019_adas'), + CAR.RAV4H: dbc_dict('toyota_rav4_hybrid_2017_pt_generated', 'toyota_adas'), + CAR.RAV4: dbc_dict('toyota_rav4_2017_pt_generated', 'toyota_adas'), + CAR.PRIUS: dbc_dict('toyota_prius_2017_pt_generated', 'toyota_adas'), + CAR.COROLLA: dbc_dict('toyota_corolla_2017_pt_generated', 'toyota_adas'), + CAR.LEXUS_RXH: dbc_dict('lexus_rx_hybrid_2017_pt_generated', 'toyota_adas'), + CAR.CHR: dbc_dict('toyota_nodsu_pt_generated', 'toyota_adas'), + CAR.CHRH: dbc_dict('toyota_nodsu_hybrid_pt_generated', 'toyota_adas'), + CAR.CAMRY: dbc_dict('toyota_nodsu_pt_generated', 'toyota_adas'), + CAR.CAMRYH: dbc_dict('toyota_camry_hybrid_2018_pt_generated', 'toyota_adas'), + CAR.HIGHLANDER: dbc_dict('toyota_highlander_2017_pt_generated', 'toyota_adas'), + CAR.HIGHLANDERH: dbc_dict('toyota_highlander_hybrid_2018_pt_generated', 'toyota_adas'), + CAR.AVALON: dbc_dict('toyota_avalon_2017_pt_generated', 'toyota_adas'), + CAR.RAV4_TSS2: dbc_dict('toyota_nodsu_pt_generated', 'toyota_tss2_adas'), + CAR.COROLLA_TSS2: dbc_dict('toyota_nodsu_pt_generated', 'toyota_tss2_adas'), + CAR.LEXUS_ESH_TSS2: dbc_dict('toyota_nodsu_pt_generated', 'toyota_tss2_adas'), } -NO_DSU_CAR = [CAR.CHR, CAR.CHRH, CAR.CAMRY, CAR.CAMRYH] -TSSP2_CAR = [CAR.RAV4_2019, CAR.COROLLA_HATCH] -NO_STOP_TIMER_CAR = [CAR.RAV4H, CAR.HIGHLANDERH, CAR.HIGHLANDER, CAR.RAV4_2019, CAR.COROLLA_HATCH] # no resume button press required +NO_DSU_CAR = [CAR.CHR, CAR.CHRH, CAR.CAMRY, CAR.CAMRYH, CAR.RAV4_TSS2, CAR.COROLLA_TSS2, CAR.LEXUS_ESH_TSS2] +TSS2_CAR = [CAR.RAV4_TSS2, CAR.COROLLA_TSS2, CAR.LEXUS_ESH_TSS2] +NO_STOP_TIMER_CAR = [CAR.RAV4H, CAR.HIGHLANDERH, CAR.HIGHLANDER, CAR.RAV4_TSS2, CAR.COROLLA_TSS2, CAR.LEXUS_ESH_TSS2] # no resume button press required diff --git a/selfdrive/common/cereal.mk b/selfdrive/common/cereal.mk index 0a3958a23f..ed05efc08c 100644 --- a/selfdrive/common/cereal.mk +++ b/selfdrive/common/cereal.mk @@ -1,19 +1,15 @@ UNAME_M ?= $(shell uname -m) UNAME_S ?= $(shell uname -s) - - -CEREAL_CFLAGS = -I$(PHONELIBS)/capnp-c/include - ifeq ($(UNAME_S),Darwin) - +CEREAL_CFLAGS = -I$(PHONELIBS)/capnp-c/include CEREAL_CXXFLAGS = -I$(PHONELIBS)/capnp-cpp/mac/include CEREAL_LIBS = $(PHONELIBS)/capnp-cpp/mac/lib/libcapnp.a \ $(PHONELIBS)/capnp-cpp/mac/lib/libkj.a \ $(PHONELIBS)/capnp-c/mac/lib/libcapnp_c.a else ifeq ($(UNAME_M),x86_64) - +CEREAL_CFLAGS = -I$(PHONELIBS)/capnp-c/include CEREAL_CXXFLAGS = -I$(PHONELIBS)/capnp-cpp/include ifeq ($(CEREAL_LIBS),) CEREAL_LIBS = -L$(PHONELIBS)/capnp-cpp/x64/lib/ \ @@ -23,15 +19,12 @@ endif else -CEREAL_CXXFLAGS = -I$(PHONELIBS)/capnp-cpp/include +#CEREAL_CXXFLAGS = -I$(PHONELIBS)/capnp-cpp/include ifeq ($(CEREAL_LIBS),) - CEREAL_LIBS = -L$(PHONELIBS)/capnp-cpp/aarch64/lib/ \ - -L$(PHONELIBS)/capnp-c/aarch64/lib/ \ - -l:libcapn.a -l:libcapnp.a -l:libkj.a + CEREAL_LIBS = -l:libcapn.a -l:libcapnp.a -l:libkj.a endif endif - CEREAL_OBJS = ../../cereal/gen/c/log.capnp.o ../../cereal/gen/c/car.capnp.o log.capnp.o: ../../cereal/gen/cpp/log.capnp.c++ diff --git a/selfdrive/common/cqueue.c b/selfdrive/common/cqueue.c new file mode 100644 index 0000000000..fe2c6f4ebf --- /dev/null +++ b/selfdrive/common/cqueue.c @@ -0,0 +1,52 @@ +#include +#include +#include + +#include "cqueue.h" + +void queue_init(Queue *q) { + memset(q, 0, sizeof(*q)); + TAILQ_INIT(&q->q); + pthread_mutex_init(&q->lock, NULL); + pthread_cond_init(&q->cv, NULL); +} + +void* queue_pop(Queue *q) { + pthread_mutex_lock(&q->lock); + while (TAILQ_EMPTY(&q->q)) { + pthread_cond_wait(&q->cv, &q->lock); + } + QueueEntry *entry = TAILQ_FIRST(&q->q); + TAILQ_REMOVE(&q->q, entry, entries); + pthread_mutex_unlock(&q->lock); + + void* r = entry->data; + free(entry); + return r; +} + +void* queue_try_pop(Queue *q) { + pthread_mutex_lock(&q->lock); + + void* r = NULL; + if (!TAILQ_EMPTY(&q->q)) { + QueueEntry *entry = TAILQ_FIRST(&q->q); + TAILQ_REMOVE(&q->q, entry, entries); + r = entry->data; + free(entry); + } + + pthread_mutex_unlock(&q->lock); + return r; +} + +void queue_push(Queue *q, void *data) { + QueueEntry *entry = calloc(1, sizeof(QueueEntry)); + assert(entry); + entry->data = data; + + pthread_mutex_lock(&q->lock); + TAILQ_INSERT_TAIL(&q->q, entry, entries); + pthread_cond_signal(&q->cv); + pthread_mutex_unlock(&q->lock); +} diff --git a/selfdrive/common/cqueue.h b/selfdrive/common/cqueue.h new file mode 100644 index 0000000000..f2613660b2 --- /dev/null +++ b/selfdrive/common/cqueue.h @@ -0,0 +1,33 @@ +#ifndef COMMON_CQUEUE_H +#define COMMON_CQUEUE_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +// a blocking queue + +typedef struct QueueEntry { + TAILQ_ENTRY(QueueEntry) entries; + void *data; +} QueueEntry; + +typedef struct Queue { + TAILQ_HEAD(queue, QueueEntry) q; + pthread_mutex_t lock; + pthread_cond_t cv; +} Queue; + +void queue_init(Queue *q); +void* queue_pop(Queue *q); +void* queue_try_pop(Queue *q); +void queue_push(Queue *q, void *data); + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif diff --git a/selfdrive/common/modeldata.h b/selfdrive/common/modeldata.h index c3f48930f2..b5b38bafd8 100644 --- a/selfdrive/common/modeldata.h +++ b/selfdrive/common/modeldata.h @@ -1,18 +1,23 @@ #ifndef MODELDATA_H #define MODELDATA_H -#define MODEL_PATH_DISTANCE 50 +#define MODEL_PATH_DISTANCE 100 +#define POLYFIT_DEGREE 4 typedef struct PathData { float points[MODEL_PATH_DISTANCE]; float prob; float std; + float stds[MODEL_PATH_DISTANCE]; + float poly[POLYFIT_DEGREE]; } PathData; typedef struct LeadData { float dist; float prob; float std; + float rel_v; + float rel_v_std; } LeadData; typedef struct ModelData { diff --git a/selfdrive/common/mutex.h b/selfdrive/common/mutex.h new file mode 100644 index 0000000000..ef01359357 --- /dev/null +++ b/selfdrive/common/mutex.h @@ -0,0 +1,13 @@ +#ifndef COMMON_MUTEX_H +#define COMMON_MUTEX_H + +#include + +static inline void mutex_init_reentrant(pthread_mutex_t *mutex) { + pthread_mutexattr_t attr; + pthread_mutexattr_init(&attr); + pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); + pthread_mutex_init(mutex, &attr); +} + +#endif diff --git a/selfdrive/common/util.h b/selfdrive/common/util.h index 65dde16e24..b3ca916941 100644 --- a/selfdrive/common/util.h +++ b/selfdrive/common/util.h @@ -1,6 +1,7 @@ #ifndef COMMON_UTIL_H #define COMMON_UTIL_H +#include #ifndef __cplusplus diff --git a/selfdrive/common/version.h b/selfdrive/common/version.h index b925f41522..ad486deed5 100644 --- a/selfdrive/common/version.h +++ b/selfdrive/common/version.h @@ -1 +1 @@ -#define COMMA_VERSION "0.5.13-release" +#define COMMA_VERSION "0.6-release" diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index 8e27c7c3ba..f1c556ba12 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -1,12 +1,9 @@ #!/usr/bin/env python import gc -import zmq -import json -from collections import defaultdict - +import capnp from cereal import car, log from common.numpy_fast import clip -from common.realtime import sec_since_boot, set_realtime_priority, Ratekeeper +from common.realtime import sec_since_boot, set_realtime_priority, Ratekeeper, DT_CTRL from common.profiler import Profiler from common.params import Params import selfdrive.messaging as messaging @@ -15,8 +12,7 @@ from selfdrive.services import service_list from selfdrive.boardd.boardd import can_list_to_can_capnp from selfdrive.car.car_helpers import get_car, get_startup_alert from selfdrive.controls.lib.model_parser import CAMERA_OFFSET -from selfdrive.controls.lib.drive_helpers import learn_angle_model_bias, \ - get_events, \ +from selfdrive.controls.lib.drive_helpers import get_events, \ create_event, \ EventTypes as ET, \ update_v_cruise, \ @@ -27,7 +23,7 @@ from selfdrive.controls.lib.latcontrol_indi import LatControlINDI from selfdrive.controls.lib.alertmanager import AlertManager from selfdrive.controls.lib.vehicle_model import VehicleModel from selfdrive.controls.lib.driver_monitor import DriverStatus -from selfdrive.controls.lib.planner import _DT_MPC +from selfdrive.controls.lib.planner import LON_MPC_STEP from selfdrive.locationd.calibration_helpers import Calibration, Filter ThermalStatus = log.ThermalData.ThermalStatus @@ -43,10 +39,18 @@ def isEnabled(state): """Check if openpilot is engaged""" return (isActive(state) or state == State.preEnabled) +def events_to_bytes(events): + # optimization when comparing capnp structs: str() or tree traverse are much slower + ret = [] + for e in events: + if isinstance(e, capnp.lib.capnp._DynamicStructReader): + e = e.as_builder() + ret.append(e.to_bytes()) + return ret + -def data_sample(rcv_times, CI, CC, plan_sock, path_plan_sock, thermal, calibration, health, driver_monitor, - poller, cal_status, cal_perc, overtemp, free_space, low_battery, - driver_status, state, mismatch_counter, params, plan, path_plan): +def data_sample(CI, CC, sm, cal_status, cal_perc, overtemp, free_space, low_battery, + driver_status, state, mismatch_counter, params): """Receive data from sockets and create events for battery, temperature and disk space""" # Update carstate from CAN and create events @@ -54,33 +58,12 @@ def data_sample(rcv_times, CI, CC, plan_sock, path_plan_sock, thermal, calibrati events = list(CS.events) enabled = isEnabled(state) - # Receive from sockets - td = None - cal = None - hh = None - dm = None - - for socket, event in poller.poll(0): - msg = messaging.recv_one(socket) - rcv_times[msg.which()] = sec_since_boot() - - if socket is thermal: - td = msg - elif socket is calibration: - cal = msg - elif socket is health: - hh = msg - elif socket is driver_monitor: - dm = msg - elif socket is plan_sock: - plan = msg - elif socket is path_plan_sock: - path_plan = msg - - if td is not None: - overtemp = td.thermal.thermalStatus >= ThermalStatus.red - free_space = td.thermal.freeSpace < 0.07 # under 7% of space free no enable allowed - low_battery = td.thermal.batteryPercent < 1 and td.thermal.chargingError # at zero percent battery, while discharging, OP should not be allowed + sm.update(0) + + if sm.updated['thermal']: + overtemp = sm['thermal'].thermalStatus >= ThermalStatus.red + free_space = sm['thermal'].freeSpace < 0.07 # under 7% of space free no enable allowed + low_battery = sm['thermal'].batteryPercent < 1 and sm['thermal'].chargingError # at zero percent battery, while discharging, OP should not allowed # Create events for battery, temperature and disk space if low_battery: @@ -91,9 +74,9 @@ def data_sample(rcv_times, CI, CC, plan_sock, path_plan_sock, thermal, calibrati events.append(create_event('outOfSpace', [ET.NO_ENTRY])) # Handle calibration - if cal is not None: - cal_status = cal.liveCalibration.calStatus - cal_perc = cal.liveCalibration.calPerc + if sm.updated['liveCalibration']: + cal_status = sm['liveCalibration'].calStatus + cal_perc = sm['liveCalibration'].calPerc if cal_status != Calibration.CALIBRATED: if cal_status == Calibration.UNCALIBRATED: @@ -103,26 +86,26 @@ def data_sample(rcv_times, CI, CC, plan_sock, path_plan_sock, thermal, calibrati # When the panda and controlsd do not agree on controls_allowed # we want to disengage openpilot. However the status from the panda goes through - # another socket than the CAN messages, therefore one can arrive earlier than the other. + # another socket other than the CAN messages and one can arrive earlier than the other. # Therefore we allow a mismatch for two samples, then we trigger the disengagement. if not enabled: mismatch_counter = 0 - if hh is not None: - controls_allowed = hh.health.controlsAllowed + if sm.updated['health']: + controls_allowed = sm['health'].controlsAllowed if not controls_allowed and enabled: mismatch_counter += 1 if mismatch_counter >= 2: events.append(create_event('controlsMismatch', [ET.IMMEDIATE_DISABLE])) # Driver monitoring - if dm is not None: - driver_status.get_pose(dm.driverMonitoring, params) + if sm.updated['driverMonitoring']: + driver_status.get_pose(sm['driverMonitoring'], params) - return CS, events, cal_status, cal_perc, overtemp, free_space, low_battery, mismatch_counter, plan, path_plan + return CS, events, cal_status, cal_perc, overtemp, free_space, low_battery, mismatch_counter -def state_transition(CS, CP, state, events, soft_disable_timer, v_cruise_kph, AM): +def state_transition(frame, CS, CP, state, events, soft_disable_timer, v_cruise_kph, AM): """Compute conditional state transitions and execute actions on state transitions""" enabled = isEnabled(state) @@ -143,43 +126,43 @@ def state_transition(CS, CP, state, events, soft_disable_timer, v_cruise_kph, AM if get_events(events, [ET.ENABLE]): if get_events(events, [ET.NO_ENTRY]): for e in get_events(events, [ET.NO_ENTRY]): - AM.add(str(e) + "NoEntry", enabled) + AM.add(frame, str(e) + "NoEntry", enabled) else: if get_events(events, [ET.PRE_ENABLE]): state = State.preEnabled else: state = State.enabled - AM.add("enable", enabled) + AM.add(frame, "enable", enabled) v_cruise_kph = initialize_v_cruise(CS.vEgo, CS.buttonEvents, v_cruise_kph_last) # ENABLED elif state == State.enabled: if get_events(events, [ET.USER_DISABLE]): state = State.disabled - AM.add("disable", enabled) + AM.add(frame, "disable", enabled) elif get_events(events, [ET.IMMEDIATE_DISABLE]): state = State.disabled for e in get_events(events, [ET.IMMEDIATE_DISABLE]): - AM.add(e, enabled) + AM.add(frame, e, enabled) elif get_events(events, [ET.SOFT_DISABLE]): state = State.softDisabling soft_disable_timer = 300 # 3s for e in get_events(events, [ET.SOFT_DISABLE]): - AM.add(e, enabled) + AM.add(frame, e, enabled) # SOFT DISABLING elif state == State.softDisabling: if get_events(events, [ET.USER_DISABLE]): state = State.disabled - AM.add("disable", enabled) + AM.add(frame, "disable", enabled) elif get_events(events, [ET.IMMEDIATE_DISABLE]): state = State.disabled for e in get_events(events, [ET.IMMEDIATE_DISABLE]): - AM.add(e, enabled) + AM.add(frame, e, enabled) elif not get_events(events, [ET.SOFT_DISABLE]): # no more soft disabling condition, so go back to ENABLED @@ -187,7 +170,7 @@ def state_transition(CS, CP, state, events, soft_disable_timer, v_cruise_kph, AM elif get_events(events, [ET.SOFT_DISABLE]) and soft_disable_timer > 0: for e in get_events(events, [ET.SOFT_DISABLE]): - AM.add(e, enabled) + AM.add(frame, e, enabled) elif soft_disable_timer <= 0: state = State.disabled @@ -196,12 +179,12 @@ def state_transition(CS, CP, state, events, soft_disable_timer, v_cruise_kph, AM elif state == State.preEnabled: if get_events(events, [ET.USER_DISABLE]): state = State.disabled - AM.add("disable", enabled) + AM.add(frame, "disable", enabled) elif get_events(events, [ET.IMMEDIATE_DISABLE, ET.SOFT_DISABLE]): state = State.disabled for e in get_events(events, [ET.IMMEDIATE_DISABLE, ET.SOFT_DISABLE]): - AM.add(e, enabled) + AM.add(frame, e, enabled) elif not get_events(events, [ET.PRE_ENABLE]): state = State.enabled @@ -209,8 +192,8 @@ def state_transition(CS, CP, state, events, soft_disable_timer, v_cruise_kph, AM return state, soft_disable_timer, v_cruise_kph, v_cruise_kph_last -def state_control(rcv_times, plan, path_plan, CS, CP, state, events, v_cruise_kph, v_cruise_kph_last, AM, rk, - driver_status, LaC, LoC, VM, angle_model_bias, read_only, is_metric, cal_perc): +def state_control(frame, rcv_frame, plan, path_plan, CS, CP, state, events, v_cruise_kph, v_cruise_kph_last, + AM, rk, driver_status, LaC, LoC, VM, read_only, is_metric, cal_perc): """Given the state, this function returns an actuators packet""" actuators = car.CarControl.Actuators.new_message() @@ -228,7 +211,7 @@ def state_control(rcv_times, plan, path_plan, CS, CP, state, events, v_cruise_kp # send FCW alert if triggered by planner if plan.fcw: - AM.add("fcw", enabled) + AM.add(frame, "fcw", enabled) # State specific actions @@ -245,20 +228,12 @@ def state_control(rcv_times, plan, path_plan, CS, CP, state, events, v_cruise_kp extra_text = str(int(round(CP.minSteerSpeed * CV.MS_TO_KPH))) + " kph" else: extra_text = str(int(round(CP.minSteerSpeed * CV.MS_TO_MPH))) + " mph" - AM.add(e, enabled, extra_text_2=extra_text) + AM.add(frame, e, enabled, extra_text_2=extra_text) - # Run angle offset learner at 20 Hz - if rk.frame % 5 == 2: - angle_model_bias = learn_angle_model_bias(active, CS.vEgo, angle_model_bias, - path_plan.cPoly, path_plan.cProb, CS.steeringAngle, - CS.steeringPressed) + plan_age = DT_CTRL * (frame - rcv_frame['plan']) + dt = min(plan_age, LON_MPC_STEP + DT_CTRL) + DT_CTRL # no greater than dt mpc + dt, to prevent too high extraps - cur_time = sec_since_boot() - radar_time = rcv_times['plan'] - plan.processingDelay # Subtract processing delay to get the original measurement time - _DT = 0.01 # 100Hz - - dt = min(cur_time - radar_time, _DT_MPC + _DT) + _DT # no greater than dt mpc + dt, to prevent too high extraps - a_acc_sol = plan.aStart + (dt / _DT_MPC) * (plan.aTarget - plan.aStart) + a_acc_sol = plan.aStart + (dt / LON_MPC_STEP) * (plan.aTarget - plan.aStart) v_acc_sol = plan.vStart + dt * (a_acc_sol + plan.aStart) / 2.0 # Gas/Brake PID loop @@ -270,7 +245,7 @@ def state_control(rcv_times, plan, path_plan, CS, CP, state, events, v_cruise_kp # Send a "steering required alert" if saturation count has reached the limit if LaC.sat_flag and CP.steerLimitAlert: - AM.add("steerSaturated", enabled) + AM.add(frame, "steerSaturated", enabled) # Parse permanent warnings to display constantly for e in get_events(events, [ET.PERMANENT]): @@ -281,65 +256,63 @@ def state_control(rcv_times, plan, path_plan, CS, CP, state, events, v_cruise_kp extra_text_2 = str(int(round(Filter.MIN_SPEED * CV.MS_TO_KPH))) + " kph" else: extra_text_2 = str(int(round(Filter.MIN_SPEED * CV.MS_TO_MPH))) + " mph" - AM.add(str(e) + "Permanent", enabled, extra_text_1=extra_text_1, extra_text_2=extra_text_2) + AM.add(frame, str(e) + "Permanent", enabled, extra_text_1=extra_text_1, extra_text_2=extra_text_2) - AM.process_alerts(sec_since_boot()) + AM.process_alerts(frame) - return actuators, v_cruise_kph, driver_status, angle_model_bias, v_acc_sol, a_acc_sol, lac_log + return actuators, v_cruise_kph, driver_status, v_acc_sol, a_acc_sol, lac_log -def data_send(plan, path_plan, CS, CI, CP, VM, state, events, actuators, v_cruise_kph, rk, carstate, - carcontrol, controlsstate, sendcan, AM, driver_status, - LaC, LoC, angle_model_bias, read_only, start_time, v_acc, a_acc, lac_log): +def data_send(sm, CS, CI, CP, VM, state, events, actuators, v_cruise_kph, rk, carstate, + carcontrol, carevents, carparams, controlsstate, sendcan, AM, driver_status, + LaC, LoC, read_only, start_time, v_acc, a_acc, lac_log, events_prev): """Send actuators and hud commands to the car, send controlsstate and MPC logging""" - plan_ts = plan.logMonoTime - plan = plan.plan CC = car.CarControl.new_message() + CC.enabled = isEnabled(state) + CC.actuators = actuators - if not read_only: - CC.enabled = isEnabled(state) - CC.actuators = actuators - - CC.cruiseControl.override = True - CC.cruiseControl.cancel = not CP.enableCruise or (not isEnabled(state) and CS.cruiseState.enabled) + CC.cruiseControl.override = True + CC.cruiseControl.cancel = not CP.enableCruise or (not isEnabled(state) and CS.cruiseState.enabled) - # Some override values for Honda - brake_discount = (1.0 - clip(actuators.brake * 3., 0.0, 1.0)) # brake discount removes a sharp nonlinearity - CC.cruiseControl.speedOverride = float(max(0.0, (LoC.v_pid + CS.cruiseState.speedOffset) * brake_discount) if CP.enableCruise else 0.0) - CC.cruiseControl.accelOverride = CI.calc_accel_override(CS.aEgo, plan.aTarget, CS.vEgo, plan.vTarget) + # Some override values for Honda + brake_discount = (1.0 - clip(actuators.brake * 3., 0.0, 1.0)) # brake discount removes a sharp nonlinearity + CC.cruiseControl.speedOverride = float(max(0.0, (LoC.v_pid + CS.cruiseState.speedOffset) * brake_discount) if CP.enableCruise else 0.0) + CC.cruiseControl.accelOverride = CI.calc_accel_override(CS.aEgo, sm['plan'].aTarget, CS.vEgo, sm['plan'].vTarget) - CC.hudControl.setSpeed = float(v_cruise_kph * CV.KPH_TO_MS) - CC.hudControl.speedVisible = isEnabled(state) - CC.hudControl.lanesVisible = isEnabled(state) - CC.hudControl.leadVisible = plan.hasLead + CC.hudControl.setSpeed = float(v_cruise_kph * CV.KPH_TO_MS) + CC.hudControl.speedVisible = isEnabled(state) + CC.hudControl.lanesVisible = isEnabled(state) + CC.hudControl.leadVisible = sm['plan'].hasLead - right_lane_visible = path_plan.pathPlan.rProb > 0.5 - left_lane_visible = path_plan.pathPlan.lProb > 0.5 + right_lane_visible = sm['pathPlan'].rProb > 0.5 + left_lane_visible = sm['pathPlan'].lProb > 0.5 - CC.hudControl.rightLaneVisible = bool(right_lane_visible) - CC.hudControl.leftLaneVisible = bool(left_lane_visible) + CC.hudControl.rightLaneVisible = bool(right_lane_visible) + CC.hudControl.leftLaneVisible = bool(left_lane_visible) - blinker = CS.leftBlinker or CS.rightBlinker - ldw_allowed = CS.vEgo > 12.5 and not blinker + blinker = CS.leftBlinker or CS.rightBlinker + ldw_allowed = CS.vEgo > 12.5 and not blinker - if len(list(path_plan.pathPlan.rPoly)) == 4: - CC.hudControl.rightLaneDepart = bool(ldw_allowed and path_plan.pathPlan.rPoly[3] > -(1 + CAMERA_OFFSET) and right_lane_visible) - if len(list(path_plan.pathPlan.lPoly)) == 4: - CC.hudControl.leftLaneDepart = bool(ldw_allowed and path_plan.pathPlan.lPoly[3] < (1 - CAMERA_OFFSET) and left_lane_visible) + if len(list(sm['pathPlan'].rPoly)) == 4: + CC.hudControl.rightLaneDepart = bool(ldw_allowed and sm['pathPlan'].rPoly[3] > -(1 + CAMERA_OFFSET) and right_lane_visible) + if len(list(sm['pathPlan'].lPoly)) == 4: + CC.hudControl.leftLaneDepart = bool(ldw_allowed and sm['pathPlan'].lPoly[3] < (1 - CAMERA_OFFSET) and left_lane_visible) - CC.hudControl.visualAlert = AM.visual_alert - CC.hudControl.audibleAlert = AM.audible_alert + CC.hudControl.visualAlert = AM.visual_alert + CC.hudControl.audibleAlert = AM.audible_alert + if not read_only: # send car controls over can can_sends = CI.apply(CC) - sendcan.send(can_list_to_can_capnp(can_sends, msgtype='sendcan')) + sendcan.send(can_list_to_can_capnp(can_sends, msgtype='sendcan', valid=CS.canValid)) force_decel = driver_status.awareness < 0. # controlsState dat = messaging.new_message() dat.init('controlsState') + dat.valid = CS.canValid dat.controlsState = { "alertText1": AM.alert_text_1, "alertText2": AM.alert_text_2, @@ -351,8 +324,8 @@ def data_send(plan, path_plan, CS, CI, CP, VM, state, events, actuators, v_cruis "awarenessStatus": max(driver_status.awareness, 0.0) if isEnabled(state) else 0.0, "driverMonitoringOn": bool(driver_status.monitor_on and driver_status.face_detected), "canMonoTimes": list(CS.canMonoTimes), - "planMonoTime": plan_ts, - "pathPlanMonoTime": path_plan.logMonoTime, + "planMonoTime": sm.logMonoTime['plan'], + "pathPlanMonoTime": sm.logMonoTime['pathPlan'], "enabled": isEnabled(state), "active": isActive(state), "vEgo": CS.vEgo, @@ -371,14 +344,14 @@ def data_send(plan, path_plan, CS, CI, CP, VM, state, events, actuators, v_cruis "angleSteersDes": float(LaC.angle_steers_des), "vTargetLead": float(v_acc), "aTarget": float(a_acc), - "jerkFactor": float(plan.jerkFactor), - "angleModelBias": float(angle_model_bias), - "gpsPlannerActive": plan.gpsPlannerActive, - "vCurvature": plan.vCurvature, - "decelForTurn": plan.decelForTurn, + "jerkFactor": float(sm['plan'].jerkFactor), + "angleModelBias": 0., + "gpsPlannerActive": sm['plan'].gpsPlannerActive, + "vCurvature": sm['plan'].vCurvature, + "decelForTurn": sm['plan'].decelForTurn, "cumLagMs": -rk.remaining * 1000., "startMonoTime": int(start_time * 1e9), - "mapValid": plan.mapValid, + "mapValid": sm['plan'].mapValid, "forceDecel": bool(force_decel), } @@ -391,17 +364,34 @@ def data_send(plan, path_plan, CS, CI, CP, VM, state, events, actuators, v_cruis # carState cs_send = messaging.new_message() cs_send.init('carState') + cs_send.valid = CS.canValid cs_send.carState = CS cs_send.carState.events = events carstate.send(cs_send.to_bytes()) + # carEvents - logged every second or on change + events_bytes = events_to_bytes(events) + if (sm.frame % int(1. / DT_CTRL) == 0) or (events_bytes != events_prev): + ce_send = messaging.new_message() + ce_send.init('carEvents', len(events)) + ce_send.carEvents = events + carevents.send(ce_send.to_bytes()) + + # carParams - logged every 50 seconds (> 1 per segment) + if (sm.frame % int(50. / DT_CTRL) == 0): + cp_send = messaging.new_message() + cp_send.init('carParams') + cp_send.carParams = CP + carparams.send(cp_send.to_bytes()) + # carControl cc_send = messaging.new_message() cc_send.init('carControl') + cc_send.valid = CS.canValid cc_send.carControl = CC carcontrol.send(cc_send.to_bytes()) - return CC + return CC, events_bytes def controlsd_thread(gctx=None): @@ -410,28 +400,21 @@ def controlsd_thread(gctx=None): # start the loop set_realtime_priority(3) - context = zmq.Context() params = Params() # Pub Sockets - controlsstate = messaging.pub_sock(context, service_list['controlsState'].port) - carstate = messaging.pub_sock(context, service_list['carState'].port) - carcontrol = messaging.pub_sock(context, service_list['carControl'].port) + sendcan = messaging.pub_sock(service_list['sendcan'].port) + controlsstate = messaging.pub_sock(service_list['controlsState'].port) + carstate = messaging.pub_sock(service_list['carState'].port) + carcontrol = messaging.pub_sock(service_list['carControl'].port) + carevents = messaging.pub_sock(service_list['carEvents'].port) + carparams = messaging.pub_sock(service_list['carParams'].port) is_metric = params.get("IsMetric") == "1" passive = params.get("Passive") != "0" - sendcan = messaging.pub_sock(context, service_list['sendcan'].port) - - # Sub sockets - poller = zmq.Poller() - thermal = messaging.sub_sock(context, service_list['thermal'].port, conflate=True, poller=poller) - health = messaging.sub_sock(context, service_list['health'].port, conflate=True, poller=poller) - cal = messaging.sub_sock(context, service_list['liveCalibration'].port, conflate=True, poller=poller) - driver_monitor = messaging.sub_sock(context, service_list['driverMonitoring'].port, conflate=True, poller=poller) - plan_sock = messaging.sub_sock(context, service_list['plan'].port, conflate=True, poller=poller) - path_plan_sock = messaging.sub_sock(context, service_list['pathPlan'].port, conflate=True, poller=poller) - logcan = messaging.sub_sock(context, service_list['can'].port) + sm = messaging.SubMaster(['thermal', 'health', 'liveCalibration', 'driverMonitoring', 'plan', 'pathPlan']) + logcan = messaging.sub_sock(service_list['can'].port) CC = car.CarControl.new_message() CI, CP = get_car(logcan, sendcan) @@ -442,10 +425,10 @@ def controlsd_thread(gctx=None): controller_available = CP.enableCamera and CI.CC is not None and not passive read_only = not car_recognized or not controller_available if read_only: - CP.safetyModel = car.CarParams.SafetyModels.elm327 # diagnostic only + CP.safetyModel = car.CarParams.SafetyModel.elm327 # diagnostic only startup_alert = get_startup_alert(car_recognized, controller_available) - AM.add(startup_alert, False) + AM.add(sm.frame, startup_alert, False) LoC = LongControl(CP, CI.compute_gb) VM = VehicleModel(CP) @@ -471,27 +454,12 @@ def controlsd_thread(gctx=None): cal_perc = 0 mismatch_counter = 0 low_battery = False + events_prev = [] - rcv_times = defaultdict(int) - - plan = messaging.new_message() - plan.init('plan') - path_plan = messaging.new_message() - path_plan.init('pathPlan') - path_plan.pathPlan.sensorValid = True + sm['pathPlan'].sensorValid = True # controlsd is driven by can recv, expected at 100Hz rk = Ratekeeper(100, print_delay_threshold=None) - controls_params = params.get("ControlsParams") - - # Read angle offset from previous drive - angle_model_bias = 0. - if controls_params is not None: - try: - controls_params = json.loads(controls_params) - angle_model_bias = controls_params['angle_model_bias'] - except (ValueError, KeyError): - pass prof = Profiler(False) # off by default @@ -500,50 +468,47 @@ def controlsd_thread(gctx=None): prof.checkpoint("Ratekeeper", ignore=True) # Sample data and compute car events - CS, events, cal_status, cal_perc, overtemp, free_space, low_battery, mismatch_counter, plan, path_plan =\ - data_sample(rcv_times, CI, CC, plan_sock, path_plan_sock, thermal, cal, health, driver_monitor, - poller, cal_status, cal_perc, overtemp, free_space, low_battery, driver_status, - state, mismatch_counter, params, plan, path_plan) + CS, events, cal_status, cal_perc, overtemp, free_space, low_battery, mismatch_counter =\ + data_sample(CI, CC, sm, cal_status, cal_perc, overtemp, free_space, low_battery, + driver_status, state, mismatch_counter, params) prof.checkpoint("Sample") # Create alerts - path_plan_age = start_time - rcv_times['pathPlan'] - plan_age = start_time - rcv_times['plan'] - - if not path_plan.pathPlan.valid or plan_age > 0.5 or path_plan_age > 0.5: - events.append(create_event('plannerError', [ET.NO_ENTRY, ET.SOFT_DISABLE])) - if not path_plan.pathPlan.sensorValid: + if not sm.all_alive_and_valid(): + events.append(create_event('commIssue', [ET.NO_ENTRY, ET.SOFT_DISABLE])) + if not sm['pathPlan'].mpcSolutionValid: + events.append(create_event('plannerError', [ET.NO_ENTRY, ET.IMMEDIATE_DISABLE])) + if not sm['pathPlan'].sensorValid: events.append(create_event('sensorDataInvalid', [ET.NO_ENTRY, ET.PERMANENT])) - if not path_plan.pathPlan.paramsValid: + if not sm['pathPlan'].paramsValid: events.append(create_event('vehicleModelInvalid', [ET.WARNING])) - if not path_plan.pathPlan.modelValid: - events.append(create_event('modelCommIssue', [ET.NO_ENTRY, ET.SOFT_DISABLE])) - if not plan.plan.radarValid: + if not sm['plan'].radarValid: events.append(create_event('radarFault', [ET.NO_ENTRY, ET.SOFT_DISABLE])) - if plan.plan.radarCommIssue: - events.append(create_event('radarCommIssue', [ET.NO_ENTRY, ET.SOFT_DISABLE])) + if sm['plan'].radarCanError: + events.append(create_event('radarCanError', [ET.NO_ENTRY, ET.SOFT_DISABLE])) + if not CS.canValid: + events.append(create_event('canError', [ET.NO_ENTRY, ET.IMMEDIATE_DISABLE])) # Only allow engagement with brake pressed when stopped behind another stopped car - if CS.brakePressed and plan.plan.vTargetFuture >= STARTING_TARGET_SPEED and not CP.radarOffCan and CS.vEgo < 0.3: + if CS.brakePressed and sm['plan'].vTargetFuture >= STARTING_TARGET_SPEED and not CP.radarOffCan and CS.vEgo < 0.3: events.append(create_event('noTarget', [ET.NO_ENTRY, ET.IMMEDIATE_DISABLE])) if not read_only: # update control state state, soft_disable_timer, v_cruise_kph, v_cruise_kph_last = \ - state_transition(CS, CP, state, events, soft_disable_timer, v_cruise_kph, AM) + state_transition(sm.frame, CS, CP, state, events, soft_disable_timer, v_cruise_kph, AM) prof.checkpoint("State transition") # Compute actuators (runs PID loops and lateral MPC) - actuators, v_cruise_kph, driver_status, angle_model_bias, v_acc, a_acc, lac_log = \ - state_control(rcv_times, plan.plan, path_plan.pathPlan, CS, CP, state, events, v_cruise_kph, - v_cruise_kph_last, AM, rk, driver_status, - LaC, LoC, VM, angle_model_bias, read_only, is_metric, cal_perc) + actuators, v_cruise_kph, driver_status, v_acc, a_acc, lac_log = \ + state_control(sm.frame, sm.rcv_frame, sm['plan'], sm['pathPlan'], CS, CP, state, events, v_cruise_kph, v_cruise_kph_last, AM, rk, + driver_status, LaC, LoC, VM, read_only, is_metric, cal_perc) prof.checkpoint("State Control") # Publish data - CC = data_send(plan, path_plan, CS, CI, CP, VM, state, events, actuators, v_cruise_kph, rk, carstate, carcontrol, - controlsstate, sendcan, AM, driver_status, LaC, LoC, angle_model_bias, read_only, start_time, v_acc, a_acc, lac_log) + CC, events_prev = data_send(sm, CS, CI, CP, VM, state, events, actuators, v_cruise_kph, rk, carstate, carcontrol, carevents, carparams, + controlsstate, sendcan, AM, driver_status, LaC, LoC, read_only, start_time, v_acc, a_acc, lac_log, events_prev) prof.checkpoint("Sent") rk.monitor_time() diff --git a/selfdrive/controls/lib/alertmanager.py b/selfdrive/controls/lib/alertmanager.py index 5ce2bfac13..df2727e6e7 100644 --- a/selfdrive/controls/lib/alertmanager.py +++ b/selfdrive/controls/lib/alertmanager.py @@ -1,7 +1,7 @@ from cereal import log +from common.realtime import DT_CTRL from selfdrive.swaglog import cloudlog from selfdrive.controls.lib.alerts import ALERTS -from common.realtime import sec_since_boot import copy @@ -18,12 +18,12 @@ class AlertManager(object): def alertPresent(self): return len(self.activealerts) > 0 - def add(self, alert_type, enabled=True, extra_text_1='', extra_text_2=''): + def add(self, frame, alert_type, enabled=True, extra_text_1='', extra_text_2=''): alert_type = str(alert_type) added_alert = copy.copy(self.alerts[alert_type]) added_alert.alert_text_1 += extra_text_1 added_alert.alert_text_2 += extra_text_2 - added_alert.start_time = sec_since_boot() + added_alert.start_time = frame * DT_CTRL # if new alert is higher priority, log it if not self.alertPresent() or added_alert.alert_priority > self.activealerts[0].alert_priority: @@ -34,7 +34,8 @@ class AlertManager(object): # sort by priority first and then by start_time self.activealerts.sort(key=lambda k: (k.alert_priority, k.start_time), reverse=True) - def process_alerts(self, cur_time): + def process_alerts(self, frame): + cur_time = frame * DT_CTRL # first get rid of all the expired alerts self.activealerts = [a for a in self.activealerts if a.start_time + diff --git a/selfdrive/controls/lib/alerts.py b/selfdrive/controls/lib/alerts.py index d6e3f4535c..da7e88acbd 100644 --- a/selfdrive/controls/lib/alerts.py +++ b/selfdrive/controls/lib/alerts.py @@ -355,28 +355,28 @@ ALERTS = [ AlertStatus.critical, AlertSize.full, Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarning2, .1, 2., 2.), - # Cancellation alerts causing immediate disabling Alert( - "radarCommIssue", + "commIssue", "TAKE CONTROL IMMEDIATELY", - "Radar Error: Restart the Car", + "Communication Issue between Processes", AlertStatus.critical, AlertSize.full, - Priority.HIGHEST, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, 1., 3., 4.), + Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarning2, .1, 2., 2.), Alert( - "radarFault", + "radarCanError", "TAKE CONTROL IMMEDIATELY", "Radar Error: Restart the Car", AlertStatus.critical, AlertSize.full, - Priority.HIGHEST, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, 1., 3., 4.), + Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarning2, .1, 2., 2.), Alert( - "modelCommIssue", + "radarFault", "TAKE CONTROL IMMEDIATELY", - "Model Error: Check Internet Connection", + "Radar Error: Restart the Car", AlertStatus.critical, AlertSize.full, - Priority.HIGHEST, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, 1., 3., 4.), + Priority.MID, VisualAlert.steerRequired, AudibleAlert.chimeWarning2, .1, 2., 2.), + # Cancellation alerts causing immediate disabling Alert( "controlsFailed", "TAKE CONTROL IMMEDIATELY", @@ -392,7 +392,7 @@ ALERTS = [ Priority.HIGHEST, VisualAlert.steerRequired, AudibleAlert.chimeWarningRepeat, 1., 3., 4.), Alert( - "commIssue", + "canError", "TAKE CONTROL IMMEDIATELY", "CAN Error: Check Connections", AlertStatus.critical, AlertSize.full, @@ -520,7 +520,7 @@ ALERTS = [ Priority.MID, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.), Alert( - "radarCommIssueNoEntry", + "radarCanErrorNoEntry", "openpilot Unavailable", "Radar Error: Restart the Car", AlertStatus.normal, AlertSize.mid, @@ -533,13 +533,6 @@ ALERTS = [ AlertStatus.normal, AlertSize.mid, Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.), - Alert( - "modelCommIssueNoEntry", - "openpilot Unavailable", - "Model Error: Check Internet Connection", - AlertStatus.normal, AlertSize.mid, - Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.), - Alert( "controlsFailedNoEntry", "openpilot Unavailable", @@ -548,7 +541,7 @@ ALERTS = [ Priority.LOW, VisualAlert.none, AudibleAlert.chimeError, .4, 2., 3.), Alert( - "commIssueNoEntry", + "canErrorNoEntry", "openpilot Unavailable", "CAN Error: Check Connections", AlertStatus.normal, AlertSize.mid, @@ -610,6 +603,13 @@ ALERTS = [ AlertStatus.normal, AlertSize.mid, Priority.LOW, VisualAlert.none, AudibleAlert.chimeDisengage, .4, 2., 3.), + Alert( + "commIssueNoEntry", + "openpilot unavailable", + "Communication Issue between Processes", + AlertStatus.normal, AlertSize.mid, + Priority.LOW, VisualAlert.none, AudibleAlert.chimeDisengage, .4, 2., 3.), + # permanent alerts Alert( "steerUnavailablePermanent", diff --git a/selfdrive/controls/lib/cluster/Makefile b/selfdrive/controls/lib/cluster/Makefile index ed5edfb59e..ca4a23da59 100644 --- a/selfdrive/controls/lib/cluster/Makefile +++ b/selfdrive/controls/lib/cluster/Makefile @@ -1,7 +1,11 @@ CC = clang CXX = clang++ -CPPFLAGS = -Wall -g -fPIC -std=c++11 -O2 +CXXFLAGS = -Wall -g -fPIC -std=c++11 -O2 + +ifeq ($(ARCH),aarch64) +CXXFLAGS += -mcpu=cortex-a57 +endif OBJS = fastcluster.o test.o DEPS := $(OBJS:.o=.d) @@ -19,7 +23,7 @@ libfastcluster.so: fastcluster.o $(CXX) -g -shared -o $@ $+ %.o: %.cpp - $(CXX) $(CPPFLAGS) -MMD -c $*.cpp + $(CXX) $(CXXFLAGS) -MMD -c $*.cpp clean: rm -f $(OBJS) $(DEPS) libfastcluster.so test diff --git a/selfdrive/controls/lib/drive_helpers.py b/selfdrive/controls/lib/drive_helpers.py index 28e35dddf8..9c1144b966 100644 --- a/selfdrive/controls/lib/drive_helpers.py +++ b/selfdrive/controls/lib/drive_helpers.py @@ -2,8 +2,6 @@ from cereal import car from common.numpy_fast import clip, interp from selfdrive.config import Conversions as CV -DT = 0.01 # Controlsd runs at 100Hz - # kph V_CRUISE_MAX = 144 V_CRUISE_MIN = 8 diff --git a/selfdrive/controls/lib/driver_monitor.py b/selfdrive/controls/lib/driver_monitor.py index 814d77a6a6..e813d0b176 100644 --- a/selfdrive/controls/lib/driver_monitor.py +++ b/selfdrive/controls/lib/driver_monitor.py @@ -1,10 +1,8 @@ import numpy as np -from common.realtime import sec_since_boot +from common.realtime import sec_since_boot, DT_CTRL, DT_DMON from selfdrive.controls.lib.drive_helpers import create_event, EventTypes as ET from common.filter_simple import FirstOrderFilter -_DT = 0.01 # update runs at 100Hz -_DTM = 0.1 # DM runs at 10Hz _AWARENESS_TIME = 180 # 3 minutes limit without user touching steering wheels make the car enter a terminal status _AWARENESS_PRE_TIME = 20. # a first alert is issued 20s before expiration _AWARENESS_PROMPT_TIME = 5. # a second alert is issued 5s before start decelerating the car @@ -65,9 +63,9 @@ class DriverStatus(): self.monitor_valid = True # variance needs to be low self.awareness = 1. self.driver_distracted = False - self.driver_distraction_filter = FirstOrderFilter(0., _DISTRACTED_FILTER_TS, _DTM) + self.driver_distraction_filter = FirstOrderFilter(0., _DISTRACTED_FILTER_TS, DT_DMON) self.variance_high = False - self.variance_filter = FirstOrderFilter(0., _VARIANCE_FILTER_TS, _DTM) + self.variance_filter = FirstOrderFilter(0., _VARIANCE_FILTER_TS, DT_DMON) self.ts_last_check = 0. self.face_detected = False self._set_timers() @@ -81,11 +79,11 @@ class DriverStatus(): if self.monitor_on: self.threshold_pre = _DISTRACTED_PRE_TIME / _DISTRACTED_TIME self.threshold_prompt = _DISTRACTED_PROMPT_TIME / _DISTRACTED_TIME - self.step_change = _DT / _DISTRACTED_TIME + self.step_change = DT_CTRL / _DISTRACTED_TIME else: self.threshold_pre = _AWARENESS_PRE_TIME / _AWARENESS_TIME self.threshold_prompt = _AWARENESS_PROMPT_TIME / _AWARENESS_TIME - self.step_change = _DT / _AWARENESS_TIME + self.step_change = DT_CTRL / _AWARENESS_TIME def _is_driver_distracted(self, pose): # to be tuned and to learn the driver's normal pose diff --git a/selfdrive/controls/lib/latcontrol_indi.py b/selfdrive/controls/lib/latcontrol_indi.py index 28e37b9e27..31ff6dd3dc 100644 --- a/selfdrive/controls/lib/latcontrol_indi.py +++ b/selfdrive/controls/lib/latcontrol_indi.py @@ -1,19 +1,20 @@ import math import numpy as np +from cereal import log +from common.realtime import DT_CTRL +from common.numpy_fast import clip from selfdrive.car.toyota.carcontroller import SteerLimitParams from selfdrive.car import apply_toyota_steer_torque_limits -from selfdrive.controls.lib.drive_helpers import get_steer_max, DT -from common.numpy_fast import clip -from cereal import log +from selfdrive.controls.lib.drive_helpers import get_steer_max class LatControlINDI(object): def __init__(self, CP): self.angle_steers_des = 0. - A = np.matrix([[1.0, DT, 0.0], - [0.0, 1.0, DT], + A = np.matrix([[1.0, DT_CTRL, 0.0], + [0.0, 1.0, DT_CTRL], [0.0, 0.0, 1.0]]) C = np.matrix([[1.0, 0.0, 0.0], [0.0, 1.0, 0.0]]) @@ -37,7 +38,7 @@ class LatControlINDI(object): self.G = CP.lateralTuning.indi.actuatorEffectiveness self.outer_loop_gain = CP.lateralTuning.indi.outerLoopGain self.inner_loop_gain = CP.lateralTuning.indi.innerLoopGain - self.alpha = 1. - DT / (self.RC + DT) + self.alpha = 1. - DT_CTRL / (self.RC + DT_CTRL) self.reset() diff --git a/selfdrive/controls/lib/latcontrol_pid.py b/selfdrive/controls/lib/latcontrol_pid.py index 4468062392..65a5a8b6d9 100644 --- a/selfdrive/controls/lib/latcontrol_pid.py +++ b/selfdrive/controls/lib/latcontrol_pid.py @@ -24,10 +24,6 @@ class LatControlPID(object): pid_log.active = False self.pid.reset() else: - # TODO: ideally we should interp, but for tuning reasons we keep the mpc solution - # constant for 0.05s. - #dt = min(cur_time - self.angle_steers_des_time, _DT_MPC + _DT) + _DT # no greater than dt mpc + dt, to prevent too high extraps - #self.angle_steers_des = self.angle_steers_des_prev + (dt / _DT_MPC) * (self.angle_steers_des_mpc - self.angle_steers_des_prev) self.angle_steers_des = path_plan.angleSteers # get from MPC/PathPlanner steers_max = get_steer_max(CP, v_ego) diff --git a/selfdrive/controls/lib/lateral_mpc/Makefile b/selfdrive/controls/lib/lateral_mpc/Makefile index 97579e751c..42970efd66 100644 --- a/selfdrive/controls/lib/lateral_mpc/Makefile +++ b/selfdrive/controls/lib/lateral_mpc/Makefile @@ -15,11 +15,13 @@ QPOASES_FLAGS = -I$(PHONELIBS)/qpoases -I$(PHONELIBS)/qpoases/INCLUDE -I$(PHONEL ACADO_FLAGS = -I$(PHONELIBS)/acado/include -I$(PHONELIBS)/acado/include/acado ifeq ($(UNAME_S),Darwin) - ACADO_LIBS := -lacado_toolkit_s +ACADO_LIBS := -lacado_toolkit_s else ifeq ($(UNAME_M),aarch64) - ACADO_LIBS := -L $(PHONELIBS)/acado/aarch64/lib -l:libacado_toolkit.a -l:libacado_casadi.a -l:libacado_csparse.a +ACADO_LIBS := -L $(PHONELIBS)/acado/aarch64/lib -l:libacado_toolkit.a -l:libacado_casadi.a -l:libacado_csparse.a +CFLAGS += -mcpu=cortex-a57 +CXXFLAGS += -mcpu=cortex-a57 else - ACADO_LIBS := -L $(PHONELIBS)/acado/x64/lib -l:libacado_toolkit.a -l:libacado_casadi.a -l:libacado_csparse.a +ACADO_LIBS := -L $(PHONELIBS)/acado/x64/lib -l:libacado_toolkit.a -l:libacado_casadi.a -l:libacado_csparse.a endif OBJS = \ diff --git a/selfdrive/controls/lib/lateral_mpc/generator.cpp b/selfdrive/controls/lib/lateral_mpc/generator.cpp index 9af88f9dc8..523ed8ac84 100644 --- a/selfdrive/controls/lib/lateral_mpc/generator.cpp +++ b/selfdrive/controls/lib/lateral_mpc/generator.cpp @@ -46,20 +46,22 @@ int main( ) auto angle_p = atan(3*p_poly_r0*xx*xx + 2*p_poly_r1*xx + p_poly_r2); // given the lane width estimate, this is where we estimate the path given lane lines - auto l_phantom = poly_l - lane_width/2.0; - auto r_phantom = poly_r + lane_width/2.0; + auto path_from_left_lane = poly_l - lane_width/2.0; + auto path_from_right_lane = poly_r + lane_width/2.0; - // best path estimate path is a linear combination of poly_p and the path estimate - // given the lane lines - auto path = lr_prob * (l_prob * l_phantom + r_prob * r_phantom) / (l_prob + r_prob + 0.0001) - + (1-lr_prob) * poly_p; + // if the lanes are visible, drive in the center, otherwise follow the path + auto path = lr_prob * (l_prob * path_from_left_lane + r_prob * path_from_right_lane) / (l_prob + r_prob + 0.0001) + + (1-lr_prob) * poly_p; - auto angle = lr_prob * (l_prob * angle_l + r_prob * angle_r) / (l_prob + r_prob + 0.0001) - + (1-lr_prob) * angle_p; + auto angle = lr_prob * (l_prob * angle_l + r_prob * angle_r) / (l_prob + r_prob + 0.0001) + + (1-lr_prob) * angle_p; - // instead of using actual lane lines, use their estimated distance from path given lane_width - auto c_left_lane = exp(-(path + lane_width/2.0 - yy)); - auto c_right_lane = exp(path - lane_width/2.0 - yy); + // When the lane is not visible, use an estimate of its position + auto weighted_left_lane = l_prob * poly_l + (1 - l_prob) * (path + lane_width/2.0); + auto weighted_right_lane = r_prob * poly_r + (1 - r_prob) * (path - lane_width/2.0); + + auto c_left_lane = exp(-(weighted_left_lane - yy)); + auto c_right_lane = exp(weighted_right_lane - yy); // Running cost Function h; diff --git a/selfdrive/controls/lib/lateral_mpc/lateral_mpc.c b/selfdrive/controls/lib/lateral_mpc/lateral_mpc.c index e5adf02cf4..ea6f85b304 100644 --- a/selfdrive/controls/lib/lateral_mpc/lateral_mpc.c +++ b/selfdrive/controls/lib/lateral_mpc/lateral_mpc.c @@ -26,7 +26,7 @@ typedef struct { double y[N+1]; double psi[N+1]; double delta[N+1]; - double rate[N+1]; + double rate[N]; double cost; } log_t; @@ -51,16 +51,17 @@ void init(double pathCost, double laneCost, double headingCost, double steerRate if (i > 4){ f = STEP_MULTIPLIER; } - acadoVariables.W[25 * i + 0] = pathCost * f; - acadoVariables.W[25 * i + 6] = laneCost * f; - acadoVariables.W[25 * i + 12] = laneCost * f; - acadoVariables.W[25 * i + 18] = headingCost * f; - acadoVariables.W[25 * i + 24] = steerRateCost * f; + // Setup diagonal entries + acadoVariables.W[NY*NY*i + (NY+1)*0] = pathCost * f; + acadoVariables.W[NY*NY*i + (NY+1)*1] = laneCost * f; + acadoVariables.W[NY*NY*i + (NY+1)*2] = laneCost * f; + acadoVariables.W[NY*NY*i + (NY+1)*3] = headingCost * f; + acadoVariables.W[NY*NY*i + (NY+1)*4] = steerRateCost * f; } - acadoVariables.WN[0] = pathCost * STEP_MULTIPLIER; - acadoVariables.WN[5] = laneCost * STEP_MULTIPLIER; - acadoVariables.WN[10] = laneCost * STEP_MULTIPLIER; - acadoVariables.WN[15] = headingCost * STEP_MULTIPLIER; + acadoVariables.WN[(NYN+1)*0] = pathCost * STEP_MULTIPLIER; + acadoVariables.WN[(NYN+1)*1] = laneCost * STEP_MULTIPLIER; + acadoVariables.WN[(NYN+1)*2] = laneCost * STEP_MULTIPLIER; + acadoVariables.WN[(NYN+1)*3] = headingCost * STEP_MULTIPLIER; } int run_mpc(state_t * x0, log_t * solution, @@ -113,7 +114,9 @@ int run_mpc(state_t * x0, log_t * solution, solution->y[i] = acadoVariables.x[i*NX+1]; solution->psi[i] = acadoVariables.x[i*NX+2]; solution->delta[i] = acadoVariables.x[i*NX+3]; - solution->rate[i] = acadoVariables.u[i]; + if (i < N){ + solution->rate[i] = acadoVariables.u[i]; + } } solution->cost = acado_getObjective(); diff --git a/selfdrive/controls/lib/lateral_mpc/lateral_mpc.d b/selfdrive/controls/lib/lateral_mpc/lateral_mpc.d deleted file mode 100644 index 6cac7c2e14..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lateral_mpc.d +++ /dev/null @@ -1,3 +0,0 @@ -lateral_mpc.o: lateral_mpc.c lib_mpc_export/acado_common.h \ - lib_mpc_export/acado_qpoases_interface.hpp \ - lib_mpc_export/acado_auxiliary_functions.h diff --git a/selfdrive/controls/lib/lateral_mpc/lateral_mpc.o b/selfdrive/controls/lib/lateral_mpc/lateral_mpc.o deleted file mode 100644 index cd461aa4eb..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lateral_mpc.o +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b0ccf356c299a12f40fd99fa61361812e5fedff6f1836c8afad98b7b2f3a2a2a -size 2456 diff --git a/selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_auxiliary_functions.d b/selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_auxiliary_functions.d deleted file mode 100644 index 0d376ee632..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_auxiliary_functions.d +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9c5571edf4541f5966032a6964cdb3f1c3c26ac20c7fd8149c0ab6dd03c08c1f -size 219 diff --git a/selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_auxiliary_functions.o b/selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_auxiliary_functions.o deleted file mode 100644 index ba0c68dbb0..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_auxiliary_functions.o +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1994e0b05785ab5c46c4175ac4a322ce63685cd026f8b8ebbe4e5363d00cf3f3 -size 5416 diff --git a/selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_integrator.d b/selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_integrator.d deleted file mode 100644 index 87537719b2..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_integrator.d +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:28e31ac55feb4c787b02ce8c7eee799b1b9f95a9ec9b25e395fa4d4ce5807e6c -size 150 diff --git a/selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_integrator.o b/selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_integrator.o deleted file mode 100644 index 8583ebf854..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_integrator.o +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c7f17eb14c859a5fd41a2e37e5cb8751ef6f42bc641c25e3c0370c7501117f07 -size 5536 diff --git a/selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_qpoases_interface.d b/selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_qpoases_interface.d deleted file mode 100644 index ae2e81c22c..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_qpoases_interface.d +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6480142ecf8a67001cfe5904fdabdbf05715901ae9e4d040673d55dc31d401ac -size 1260 diff --git a/selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_qpoases_interface.o b/selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_qpoases_interface.o deleted file mode 100644 index 220a5498c8..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_qpoases_interface.o +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ea02cc950bb4500a5dbf1e9af10cab4adc9e5c0dad715dbdea70b6784a7b378b -size 2992 diff --git a/selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_solver.c b/selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_solver.c index 5d53ecc75e..2d7afc5f03 100644 --- a/selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_solver.c +++ b/selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_solver.c @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:31bac678a145034c0f43020059ef4e77c128a4fbe734cfbf1fe65325dbec77cd -size 398689 +oid sha256:269cf8ba0c80202e59352e7474d5aa768fa1ffc8268e051496d28629fa8cb144 +size 400285 diff --git a/selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_solver.d b/selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_solver.d deleted file mode 100644 index 8ae0395257..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_solver.d +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2fa7bde92a2d7d20c459eac2c10dadc0811492cd4cd45495ae78fa05843a9b73 -size 142 diff --git a/selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_solver.o b/selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_solver.o deleted file mode 100644 index 5b02a77771..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lib_mpc_export/acado_solver.o +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8a7ff78c73ae3d1a73b0f9652d024037e23eabfec834f712c269a68fee8c4d11 -size 398016 diff --git a/selfdrive/controls/lib/lateral_mpc/lib_qp/Bounds.d b/selfdrive/controls/lib/lateral_mpc/lib_qp/Bounds.d deleted file mode 100644 index 752ec5e9f3..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lib_qp/Bounds.d +++ /dev/null @@ -1,14 +0,0 @@ -lib_qp/Bounds.o: ../../../../phonelibs/qpoases/SRC/Bounds.cpp \ - ../../../../phonelibs/qpoases/INCLUDE/Bounds.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/SubjectTo.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Indexlist.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Utils.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/MessageHandling.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Types.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Constants.hpp \ - lib_mpc_export/acado_qpoases_interface.hpp \ - ../../../../phonelibs/qpoases/SRC/MessageHandling.ipp \ - ../../../../phonelibs/qpoases/SRC/Utils.ipp \ - ../../../../phonelibs/qpoases/SRC/Indexlist.ipp \ - ../../../../phonelibs/qpoases/SRC/SubjectTo.ipp \ - ../../../../phonelibs/qpoases/SRC/Bounds.ipp diff --git a/selfdrive/controls/lib/lateral_mpc/lib_qp/Bounds.o b/selfdrive/controls/lib/lateral_mpc/lib_qp/Bounds.o deleted file mode 100644 index 5c3cebdc64..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lib_qp/Bounds.o +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:aec30a8bd0ebecadafb867744d0f222e420ca24cb51fdb2b4fb8ebdfb07192d0 -size 8088 diff --git a/selfdrive/controls/lib/lateral_mpc/lib_qp/Constraints.d b/selfdrive/controls/lib/lateral_mpc/lib_qp/Constraints.d deleted file mode 100644 index 60295bc07b..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lib_qp/Constraints.d +++ /dev/null @@ -1,14 +0,0 @@ -lib_qp/Constraints.o: ../../../../phonelibs/qpoases/SRC/Constraints.cpp \ - ../../../../phonelibs/qpoases/INCLUDE/Constraints.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/SubjectTo.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Indexlist.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Utils.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/MessageHandling.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Types.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Constants.hpp \ - lib_mpc_export/acado_qpoases_interface.hpp \ - ../../../../phonelibs/qpoases/SRC/MessageHandling.ipp \ - ../../../../phonelibs/qpoases/SRC/Utils.ipp \ - ../../../../phonelibs/qpoases/SRC/Indexlist.ipp \ - ../../../../phonelibs/qpoases/SRC/SubjectTo.ipp \ - ../../../../phonelibs/qpoases/SRC/Constraints.ipp diff --git a/selfdrive/controls/lib/lateral_mpc/lib_qp/Constraints.o b/selfdrive/controls/lib/lateral_mpc/lib_qp/Constraints.o deleted file mode 100644 index fd7a75150c..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lib_qp/Constraints.o +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:aa13430fdfc35b699c48903084ed2ea4b1592863c19f6db46b516d13bd4871cf -size 8160 diff --git a/selfdrive/controls/lib/lateral_mpc/lib_qp/CyclingManager.d b/selfdrive/controls/lib/lateral_mpc/lib_qp/CyclingManager.d deleted file mode 100644 index 24145d8ed3..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lib_qp/CyclingManager.d +++ /dev/null @@ -1,11 +0,0 @@ -lib_qp/CyclingManager.o: \ - ../../../../phonelibs/qpoases/SRC/CyclingManager.cpp \ - ../../../../phonelibs/qpoases/INCLUDE/CyclingManager.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Utils.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/MessageHandling.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Types.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Constants.hpp \ - lib_mpc_export/acado_qpoases_interface.hpp \ - ../../../../phonelibs/qpoases/SRC/MessageHandling.ipp \ - ../../../../phonelibs/qpoases/SRC/Utils.ipp \ - ../../../../phonelibs/qpoases/SRC/CyclingManager.ipp diff --git a/selfdrive/controls/lib/lateral_mpc/lib_qp/CyclingManager.o b/selfdrive/controls/lib/lateral_mpc/lib_qp/CyclingManager.o deleted file mode 100644 index 259f2c0956..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lib_qp/CyclingManager.o +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:79c451a01859a4231a9fd3cae055c7cc1940419061e94993a029b02f619e39e8 -size 2944 diff --git a/selfdrive/controls/lib/lateral_mpc/lib_qp/EXTRAS/SolutionAnalysis.d b/selfdrive/controls/lib/lateral_mpc/lib_qp/EXTRAS/SolutionAnalysis.d deleted file mode 100644 index 77c09376ee..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lib_qp/EXTRAS/SolutionAnalysis.d +++ /dev/null @@ -1,24 +0,0 @@ -lib_qp/EXTRAS/SolutionAnalysis.o: \ - ../../../../phonelibs/qpoases/SRC/EXTRAS/SolutionAnalysis.cpp \ - ../../../../phonelibs/qpoases/INCLUDE/EXTRAS/SolutionAnalysis.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/QProblem.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/QProblemB.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Bounds.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/SubjectTo.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Indexlist.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Utils.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/MessageHandling.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Types.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Constants.hpp \ - lib_mpc_export/acado_qpoases_interface.hpp \ - ../../../../phonelibs/qpoases/SRC/MessageHandling.ipp \ - ../../../../phonelibs/qpoases/SRC/Utils.ipp \ - ../../../../phonelibs/qpoases/SRC/Indexlist.ipp \ - ../../../../phonelibs/qpoases/SRC/SubjectTo.ipp \ - ../../../../phonelibs/qpoases/SRC/Bounds.ipp \ - ../../../../phonelibs/qpoases/SRC/QProblemB.ipp \ - ../../../../phonelibs/qpoases/INCLUDE/Constraints.hpp \ - ../../../../phonelibs/qpoases/SRC/Constraints.ipp \ - ../../../../phonelibs/qpoases/INCLUDE/CyclingManager.hpp \ - ../../../../phonelibs/qpoases/SRC/CyclingManager.ipp \ - ../../../../phonelibs/qpoases/SRC/QProblem.ipp diff --git a/selfdrive/controls/lib/lateral_mpc/lib_qp/EXTRAS/SolutionAnalysis.o b/selfdrive/controls/lib/lateral_mpc/lib_qp/EXTRAS/SolutionAnalysis.o deleted file mode 100644 index 0386c8c3a8..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lib_qp/EXTRAS/SolutionAnalysis.o +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:14d5df38d3aa9371b8c4caf9569203395ea76c97d8cc34f927eb8ad80810bf1d -size 4488 diff --git a/selfdrive/controls/lib/lateral_mpc/lib_qp/Indexlist.d b/selfdrive/controls/lib/lateral_mpc/lib_qp/Indexlist.d deleted file mode 100644 index 6ead64cb9d..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lib_qp/Indexlist.d +++ /dev/null @@ -1,10 +0,0 @@ -lib_qp/Indexlist.o: ../../../../phonelibs/qpoases/SRC/Indexlist.cpp \ - ../../../../phonelibs/qpoases/INCLUDE/Indexlist.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Utils.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/MessageHandling.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Types.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Constants.hpp \ - lib_mpc_export/acado_qpoases_interface.hpp \ - ../../../../phonelibs/qpoases/SRC/MessageHandling.ipp \ - ../../../../phonelibs/qpoases/SRC/Utils.ipp \ - ../../../../phonelibs/qpoases/SRC/Indexlist.ipp diff --git a/selfdrive/controls/lib/lateral_mpc/lib_qp/Indexlist.o b/selfdrive/controls/lib/lateral_mpc/lib_qp/Indexlist.o deleted file mode 100644 index 8a6b05d5b8..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lib_qp/Indexlist.o +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3ee913941e65a9c724f19e41f52857d848623e3152b51b313e360d57ef7d0afd -size 4480 diff --git a/selfdrive/controls/lib/lateral_mpc/lib_qp/MessageHandling.d b/selfdrive/controls/lib/lateral_mpc/lib_qp/MessageHandling.d deleted file mode 100644 index b5c6166aba..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lib_qp/MessageHandling.d +++ /dev/null @@ -1,9 +0,0 @@ -lib_qp/MessageHandling.o: \ - ../../../../phonelibs/qpoases/SRC/MessageHandling.cpp \ - ../../../../phonelibs/qpoases/INCLUDE/MessageHandling.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Types.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Constants.hpp \ - lib_mpc_export/acado_qpoases_interface.hpp \ - ../../../../phonelibs/qpoases/SRC/MessageHandling.ipp \ - ../../../../phonelibs/qpoases/INCLUDE/Utils.hpp \ - ../../../../phonelibs/qpoases/SRC/Utils.ipp diff --git a/selfdrive/controls/lib/lateral_mpc/lib_qp/MessageHandling.o b/selfdrive/controls/lib/lateral_mpc/lib_qp/MessageHandling.o deleted file mode 100644 index 20853f2b22..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lib_qp/MessageHandling.o +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c45080765fd104b3669c465e679f76c0867aa7062cb8d96722e996145a123aaf -size 11728 diff --git a/selfdrive/controls/lib/lateral_mpc/lib_qp/QProblem.d b/selfdrive/controls/lib/lateral_mpc/lib_qp/QProblem.d deleted file mode 100644 index 1f6e188af5..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lib_qp/QProblem.d +++ /dev/null @@ -1,22 +0,0 @@ -lib_qp/QProblem.o: ../../../../phonelibs/qpoases/SRC/QProblem.cpp \ - ../../../../phonelibs/qpoases/INCLUDE/QProblem.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/QProblemB.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Bounds.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/SubjectTo.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Indexlist.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Utils.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/MessageHandling.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Types.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Constants.hpp \ - lib_mpc_export/acado_qpoases_interface.hpp \ - ../../../../phonelibs/qpoases/SRC/MessageHandling.ipp \ - ../../../../phonelibs/qpoases/SRC/Utils.ipp \ - ../../../../phonelibs/qpoases/SRC/Indexlist.ipp \ - ../../../../phonelibs/qpoases/SRC/SubjectTo.ipp \ - ../../../../phonelibs/qpoases/SRC/Bounds.ipp \ - ../../../../phonelibs/qpoases/SRC/QProblemB.ipp \ - ../../../../phonelibs/qpoases/INCLUDE/Constraints.hpp \ - ../../../../phonelibs/qpoases/SRC/Constraints.ipp \ - ../../../../phonelibs/qpoases/INCLUDE/CyclingManager.hpp \ - ../../../../phonelibs/qpoases/SRC/CyclingManager.ipp \ - ../../../../phonelibs/qpoases/SRC/QProblem.ipp diff --git a/selfdrive/controls/lib/lateral_mpc/lib_qp/QProblem.o b/selfdrive/controls/lib/lateral_mpc/lib_qp/QProblem.o deleted file mode 100644 index 099848e3cb..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lib_qp/QProblem.o +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dcdfa5db252a625cf2a1406177efee045ea9fd38a7bc41709539e4fabf581b93 -size 72880 diff --git a/selfdrive/controls/lib/lateral_mpc/lib_qp/QProblemB.d b/selfdrive/controls/lib/lateral_mpc/lib_qp/QProblemB.d deleted file mode 100644 index 7878a825ce..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lib_qp/QProblemB.d +++ /dev/null @@ -1,16 +0,0 @@ -lib_qp/QProblemB.o: ../../../../phonelibs/qpoases/SRC/QProblemB.cpp \ - ../../../../phonelibs/qpoases/INCLUDE/QProblemB.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Bounds.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/SubjectTo.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Indexlist.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Utils.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/MessageHandling.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Types.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Constants.hpp \ - lib_mpc_export/acado_qpoases_interface.hpp \ - ../../../../phonelibs/qpoases/SRC/MessageHandling.ipp \ - ../../../../phonelibs/qpoases/SRC/Utils.ipp \ - ../../../../phonelibs/qpoases/SRC/Indexlist.ipp \ - ../../../../phonelibs/qpoases/SRC/SubjectTo.ipp \ - ../../../../phonelibs/qpoases/SRC/Bounds.ipp \ - ../../../../phonelibs/qpoases/SRC/QProblemB.ipp diff --git a/selfdrive/controls/lib/lateral_mpc/lib_qp/QProblemB.o b/selfdrive/controls/lib/lateral_mpc/lib_qp/QProblemB.o deleted file mode 100644 index 08fb54be4b..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lib_qp/QProblemB.o +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1c38342248cdb2a85ce493d8a895fe9a670e5580a6c05543c0cbc9971db1e38a -size 37824 diff --git a/selfdrive/controls/lib/lateral_mpc/lib_qp/SubjectTo.d b/selfdrive/controls/lib/lateral_mpc/lib_qp/SubjectTo.d deleted file mode 100644 index c896d9a9fa..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lib_qp/SubjectTo.d +++ /dev/null @@ -1,12 +0,0 @@ -lib_qp/SubjectTo.o: ../../../../phonelibs/qpoases/SRC/SubjectTo.cpp \ - ../../../../phonelibs/qpoases/INCLUDE/SubjectTo.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Indexlist.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Utils.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/MessageHandling.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Types.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Constants.hpp \ - lib_mpc_export/acado_qpoases_interface.hpp \ - ../../../../phonelibs/qpoases/SRC/MessageHandling.ipp \ - ../../../../phonelibs/qpoases/SRC/Utils.ipp \ - ../../../../phonelibs/qpoases/SRC/Indexlist.ipp \ - ../../../../phonelibs/qpoases/SRC/SubjectTo.ipp diff --git a/selfdrive/controls/lib/lateral_mpc/lib_qp/SubjectTo.o b/selfdrive/controls/lib/lateral_mpc/lib_qp/SubjectTo.o deleted file mode 100644 index 5fc831afb5..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lib_qp/SubjectTo.o +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:569156b51f6d4996f24a08abf31b80d16b15efb45bf18480983e29f079e1c11b -size 3824 diff --git a/selfdrive/controls/lib/lateral_mpc/lib_qp/Utils.d b/selfdrive/controls/lib/lateral_mpc/lib_qp/Utils.d deleted file mode 100644 index 58f35a0653..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lib_qp/Utils.d +++ /dev/null @@ -1,8 +0,0 @@ -lib_qp/Utils.o: ../../../../phonelibs/qpoases/SRC/Utils.cpp \ - ../../../../phonelibs/qpoases/INCLUDE/Utils.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/MessageHandling.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Types.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Constants.hpp \ - lib_mpc_export/acado_qpoases_interface.hpp \ - ../../../../phonelibs/qpoases/SRC/MessageHandling.ipp \ - ../../../../phonelibs/qpoases/SRC/Utils.ipp diff --git a/selfdrive/controls/lib/lateral_mpc/lib_qp/Utils.o b/selfdrive/controls/lib/lateral_mpc/lib_qp/Utils.o deleted file mode 100644 index 8933520838..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/lib_qp/Utils.o +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7953dd5b169995db14a02abd10a2c20a61aa8e2c93e303895af898cd1cd2aed5 -size 952 diff --git a/selfdrive/controls/lib/lateral_mpc/libmpc.so b/selfdrive/controls/lib/lateral_mpc/libmpc.so deleted file mode 100755 index 977124333c..0000000000 --- a/selfdrive/controls/lib/lateral_mpc/libmpc.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:849733e32eecd68112c4ab305c013025dbfa41ec3f13c54fbb9368388d835260 -size 532192 diff --git a/selfdrive/controls/lib/lateral_mpc/libmpc_py.py b/selfdrive/controls/lib/lateral_mpc/libmpc_py.py index 3af46c304e..6b86d9565a 100644 --- a/selfdrive/controls/lib/lateral_mpc/libmpc_py.py +++ b/selfdrive/controls/lib/lateral_mpc/libmpc_py.py @@ -18,7 +18,7 @@ typedef struct { double y[21]; double psi[21]; double delta[21]; - double rate[21]; + double rate[20]; double cost; } log_t; diff --git a/selfdrive/controls/lib/long_mpc.py b/selfdrive/controls/lib/long_mpc.py index 19fb706deb..9d43e97f26 100644 --- a/selfdrive/controls/lib/long_mpc.py +++ b/selfdrive/controls/lib/long_mpc.py @@ -1,3 +1,4 @@ +import os import numpy as np import selfdrive.messaging as messaging @@ -7,6 +8,8 @@ from selfdrive.controls.lib.radar_helpers import _LEAD_ACCEL_TAU from selfdrive.controls.lib.longitudinal_mpc import libmpc_py from selfdrive.controls.lib.drive_helpers import MPC_COST_LONG +LOG_MPC = os.environ.get('LOG_MPC', False) + class LongitudinalMpc(object): def __init__(self, mpc_id, live_longitudinal_mpc): @@ -56,7 +59,7 @@ class LongitudinalMpc(object): self.cur_state[0].a_ego = a def update(self, CS, lead, v_cruise_setpoint): - v_ego = CS.carState.vEgo + v_ego = CS.vEgo # Setup current mpc state self.cur_state[0].x_ego = 0.0 @@ -92,7 +95,9 @@ class LongitudinalMpc(object): t = sec_since_boot() n_its = self.libmpc.run_mpc(self.cur_state, self.mpc_solution, self.a_lead_tau, a_lead) duration = int((sec_since_boot() - t) * 1e9) - self.send_mpc_solution(n_its, duration) + + if LOG_MPC: + self.send_mpc_solution(n_its, duration) # Get solution. MPC timestep is 0.2 s, so interpolation to 0.05 s is needed self.v_mpc = self.mpc_solution[0].v_ego[1] @@ -116,5 +121,5 @@ class LongitudinalMpc(object): self.cur_state[0].v_ego = v_ego self.cur_state[0].a_ego = 0.0 self.v_mpc = v_ego - self.a_mpc = CS.carState.aEgo + self.a_mpc = CS.aEgo self.prev_lead_status = False diff --git a/selfdrive/controls/lib/longitudinal_mpc/Makefile b/selfdrive/controls/lib/longitudinal_mpc/Makefile index 17f78eada9..e00914c214 100644 --- a/selfdrive/controls/lib/longitudinal_mpc/Makefile +++ b/selfdrive/controls/lib/longitudinal_mpc/Makefile @@ -14,11 +14,13 @@ QPOASES_FLAGS = -I$(PHONELIBS)/qpoases -I$(PHONELIBS)/qpoases/INCLUDE -I$(PHONEL ACADO_FLAGS = -I$(PHONELIBS)/acado/include -I$(PHONELIBS)/acado/include/acado ifeq ($(UNAME_S),Darwin) - ACADO_LIBS := -lacado_toolkit_s +ACADO_LIBS := -lacado_toolkit_s else ifeq ($(UNAME_M),aarch64) - ACADO_LIBS := -L $(PHONELIBS)/acado/aarch64/lib -l:libacado_toolkit.a -l:libacado_casadi.a -l:libacado_csparse.a +ACADO_LIBS := -L $(PHONELIBS)/acado/aarch64/lib -l:libacado_toolkit.a -l:libacado_casadi.a -l:libacado_csparse.a +CFLAGS += -mcpu=cortex-a57 +CXXFLAGS += -mcpu=cortex-a57 else - ACADO_LIBS := -L $(PHONELIBS)/acado/x64/lib -l:libacado_toolkit.a -l:libacado_casadi.a -l:libacado_csparse.a +ACADO_LIBS := -L $(PHONELIBS)/acado/x64/lib -l:libacado_toolkit.a -l:libacado_casadi.a -l:libacado_csparse.a endif OBJS = \ diff --git a/selfdrive/controls/lib/longitudinal_mpc/lib_mpc_export/acado_auxiliary_functions.d b/selfdrive/controls/lib/longitudinal_mpc/lib_mpc_export/acado_auxiliary_functions.d deleted file mode 100644 index 0d376ee632..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/lib_mpc_export/acado_auxiliary_functions.d +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9c5571edf4541f5966032a6964cdb3f1c3c26ac20c7fd8149c0ab6dd03c08c1f -size 219 diff --git a/selfdrive/controls/lib/longitudinal_mpc/lib_mpc_export/acado_auxiliary_functions.o b/selfdrive/controls/lib/longitudinal_mpc/lib_mpc_export/acado_auxiliary_functions.o deleted file mode 100644 index 8b1e489c3e..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/lib_mpc_export/acado_auxiliary_functions.o +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:453ffa5ad5c533e6d6065167fb1a674ed9196e2ade87df4a55d163ff178eccf7 -size 5376 diff --git a/selfdrive/controls/lib/longitudinal_mpc/lib_mpc_export/acado_integrator.d b/selfdrive/controls/lib/longitudinal_mpc/lib_mpc_export/acado_integrator.d deleted file mode 100644 index 87537719b2..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/lib_mpc_export/acado_integrator.d +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:28e31ac55feb4c787b02ce8c7eee799b1b9f95a9ec9b25e395fa4d4ce5807e6c -size 150 diff --git a/selfdrive/controls/lib/longitudinal_mpc/lib_mpc_export/acado_integrator.o b/selfdrive/controls/lib/longitudinal_mpc/lib_mpc_export/acado_integrator.o deleted file mode 100644 index f3f43e77d5..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/lib_mpc_export/acado_integrator.o +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1a5e0651c2c8c650b59421bb4c4beea5c3b666bbd1c6e440eb2b62e2a64119bb -size 3560 diff --git a/selfdrive/controls/lib/longitudinal_mpc/lib_mpc_export/acado_qpoases_interface.d b/selfdrive/controls/lib/longitudinal_mpc/lib_mpc_export/acado_qpoases_interface.d deleted file mode 100644 index ae2e81c22c..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/lib_mpc_export/acado_qpoases_interface.d +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6480142ecf8a67001cfe5904fdabdbf05715901ae9e4d040673d55dc31d401ac -size 1260 diff --git a/selfdrive/controls/lib/longitudinal_mpc/lib_mpc_export/acado_qpoases_interface.o b/selfdrive/controls/lib/longitudinal_mpc/lib_mpc_export/acado_qpoases_interface.o deleted file mode 100644 index 1792de3769..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/lib_mpc_export/acado_qpoases_interface.o +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:825e0c17d93fe11ec1d537da26ae0a0ecbd92ed2662c20fb0da9e5c9f9e29b1e -size 2992 diff --git a/selfdrive/controls/lib/longitudinal_mpc/lib_mpc_export/acado_solver.d b/selfdrive/controls/lib/longitudinal_mpc/lib_mpc_export/acado_solver.d deleted file mode 100644 index 8ae0395257..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/lib_mpc_export/acado_solver.d +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2fa7bde92a2d7d20c459eac2c10dadc0811492cd4cd45495ae78fa05843a9b73 -size 142 diff --git a/selfdrive/controls/lib/longitudinal_mpc/lib_mpc_export/acado_solver.o b/selfdrive/controls/lib/longitudinal_mpc/lib_mpc_export/acado_solver.o deleted file mode 100644 index 325eb847be..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/lib_mpc_export/acado_solver.o +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b65f59656003d5dca321aabebff4f3ba09b45813f74381ff3fba0f0b15c92931 -size 274744 diff --git a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/Bounds.d b/selfdrive/controls/lib/longitudinal_mpc/lib_qp/Bounds.d deleted file mode 100644 index 752ec5e9f3..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/Bounds.d +++ /dev/null @@ -1,14 +0,0 @@ -lib_qp/Bounds.o: ../../../../phonelibs/qpoases/SRC/Bounds.cpp \ - ../../../../phonelibs/qpoases/INCLUDE/Bounds.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/SubjectTo.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Indexlist.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Utils.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/MessageHandling.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Types.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Constants.hpp \ - lib_mpc_export/acado_qpoases_interface.hpp \ - ../../../../phonelibs/qpoases/SRC/MessageHandling.ipp \ - ../../../../phonelibs/qpoases/SRC/Utils.ipp \ - ../../../../phonelibs/qpoases/SRC/Indexlist.ipp \ - ../../../../phonelibs/qpoases/SRC/SubjectTo.ipp \ - ../../../../phonelibs/qpoases/SRC/Bounds.ipp diff --git a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/Bounds.o b/selfdrive/controls/lib/longitudinal_mpc/lib_qp/Bounds.o deleted file mode 100644 index 7c03ce5dfe..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/Bounds.o +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a955478920067e11d3c1d40f96323bfb943196d66954911dfc62c5f673ecab06 -size 8048 diff --git a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/Constraints.d b/selfdrive/controls/lib/longitudinal_mpc/lib_qp/Constraints.d deleted file mode 100644 index 60295bc07b..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/Constraints.d +++ /dev/null @@ -1,14 +0,0 @@ -lib_qp/Constraints.o: ../../../../phonelibs/qpoases/SRC/Constraints.cpp \ - ../../../../phonelibs/qpoases/INCLUDE/Constraints.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/SubjectTo.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Indexlist.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Utils.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/MessageHandling.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Types.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Constants.hpp \ - lib_mpc_export/acado_qpoases_interface.hpp \ - ../../../../phonelibs/qpoases/SRC/MessageHandling.ipp \ - ../../../../phonelibs/qpoases/SRC/Utils.ipp \ - ../../../../phonelibs/qpoases/SRC/Indexlist.ipp \ - ../../../../phonelibs/qpoases/SRC/SubjectTo.ipp \ - ../../../../phonelibs/qpoases/SRC/Constraints.ipp diff --git a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/Constraints.o b/selfdrive/controls/lib/longitudinal_mpc/lib_qp/Constraints.o deleted file mode 100644 index f1dbf45635..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/Constraints.o +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:81feeda7638a908cd175f97addf62d16c4f47d3e38b020a0069838f3502ceff0 -size 8112 diff --git a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/CyclingManager.d b/selfdrive/controls/lib/longitudinal_mpc/lib_qp/CyclingManager.d deleted file mode 100644 index 24145d8ed3..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/CyclingManager.d +++ /dev/null @@ -1,11 +0,0 @@ -lib_qp/CyclingManager.o: \ - ../../../../phonelibs/qpoases/SRC/CyclingManager.cpp \ - ../../../../phonelibs/qpoases/INCLUDE/CyclingManager.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Utils.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/MessageHandling.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Types.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Constants.hpp \ - lib_mpc_export/acado_qpoases_interface.hpp \ - ../../../../phonelibs/qpoases/SRC/MessageHandling.ipp \ - ../../../../phonelibs/qpoases/SRC/Utils.ipp \ - ../../../../phonelibs/qpoases/SRC/CyclingManager.ipp diff --git a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/CyclingManager.o b/selfdrive/controls/lib/longitudinal_mpc/lib_qp/CyclingManager.o deleted file mode 100644 index 868cffebbc..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/CyclingManager.o +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:57289f47ce5d35735edc673351e496e32ec606028512ecd785b9ea4309005629 -size 2944 diff --git a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/EXTRAS/SolutionAnalysis.d b/selfdrive/controls/lib/longitudinal_mpc/lib_qp/EXTRAS/SolutionAnalysis.d deleted file mode 100644 index 77c09376ee..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/EXTRAS/SolutionAnalysis.d +++ /dev/null @@ -1,24 +0,0 @@ -lib_qp/EXTRAS/SolutionAnalysis.o: \ - ../../../../phonelibs/qpoases/SRC/EXTRAS/SolutionAnalysis.cpp \ - ../../../../phonelibs/qpoases/INCLUDE/EXTRAS/SolutionAnalysis.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/QProblem.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/QProblemB.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Bounds.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/SubjectTo.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Indexlist.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Utils.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/MessageHandling.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Types.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Constants.hpp \ - lib_mpc_export/acado_qpoases_interface.hpp \ - ../../../../phonelibs/qpoases/SRC/MessageHandling.ipp \ - ../../../../phonelibs/qpoases/SRC/Utils.ipp \ - ../../../../phonelibs/qpoases/SRC/Indexlist.ipp \ - ../../../../phonelibs/qpoases/SRC/SubjectTo.ipp \ - ../../../../phonelibs/qpoases/SRC/Bounds.ipp \ - ../../../../phonelibs/qpoases/SRC/QProblemB.ipp \ - ../../../../phonelibs/qpoases/INCLUDE/Constraints.hpp \ - ../../../../phonelibs/qpoases/SRC/Constraints.ipp \ - ../../../../phonelibs/qpoases/INCLUDE/CyclingManager.hpp \ - ../../../../phonelibs/qpoases/SRC/CyclingManager.ipp \ - ../../../../phonelibs/qpoases/SRC/QProblem.ipp diff --git a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/Indexlist.d b/selfdrive/controls/lib/longitudinal_mpc/lib_qp/Indexlist.d deleted file mode 100644 index 6ead64cb9d..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/Indexlist.d +++ /dev/null @@ -1,10 +0,0 @@ -lib_qp/Indexlist.o: ../../../../phonelibs/qpoases/SRC/Indexlist.cpp \ - ../../../../phonelibs/qpoases/INCLUDE/Indexlist.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Utils.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/MessageHandling.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Types.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Constants.hpp \ - lib_mpc_export/acado_qpoases_interface.hpp \ - ../../../../phonelibs/qpoases/SRC/MessageHandling.ipp \ - ../../../../phonelibs/qpoases/SRC/Utils.ipp \ - ../../../../phonelibs/qpoases/SRC/Indexlist.ipp diff --git a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/Indexlist.o b/selfdrive/controls/lib/longitudinal_mpc/lib_qp/Indexlist.o deleted file mode 100644 index 13522ae13f..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/Indexlist.o +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3ac57f4a4c5410bf29c12a32418e3b0ccd020d0362cc4a5316a915482cb4c99d -size 4496 diff --git a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/MessageHandling.d b/selfdrive/controls/lib/longitudinal_mpc/lib_qp/MessageHandling.d deleted file mode 100644 index b5c6166aba..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/MessageHandling.d +++ /dev/null @@ -1,9 +0,0 @@ -lib_qp/MessageHandling.o: \ - ../../../../phonelibs/qpoases/SRC/MessageHandling.cpp \ - ../../../../phonelibs/qpoases/INCLUDE/MessageHandling.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Types.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Constants.hpp \ - lib_mpc_export/acado_qpoases_interface.hpp \ - ../../../../phonelibs/qpoases/SRC/MessageHandling.ipp \ - ../../../../phonelibs/qpoases/INCLUDE/Utils.hpp \ - ../../../../phonelibs/qpoases/SRC/Utils.ipp diff --git a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/MessageHandling.o b/selfdrive/controls/lib/longitudinal_mpc/lib_qp/MessageHandling.o deleted file mode 100644 index 20853f2b22..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/MessageHandling.o +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c45080765fd104b3669c465e679f76c0867aa7062cb8d96722e996145a123aaf -size 11728 diff --git a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/QProblem.d b/selfdrive/controls/lib/longitudinal_mpc/lib_qp/QProblem.d deleted file mode 100644 index 1f6e188af5..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/QProblem.d +++ /dev/null @@ -1,22 +0,0 @@ -lib_qp/QProblem.o: ../../../../phonelibs/qpoases/SRC/QProblem.cpp \ - ../../../../phonelibs/qpoases/INCLUDE/QProblem.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/QProblemB.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Bounds.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/SubjectTo.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Indexlist.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Utils.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/MessageHandling.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Types.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Constants.hpp \ - lib_mpc_export/acado_qpoases_interface.hpp \ - ../../../../phonelibs/qpoases/SRC/MessageHandling.ipp \ - ../../../../phonelibs/qpoases/SRC/Utils.ipp \ - ../../../../phonelibs/qpoases/SRC/Indexlist.ipp \ - ../../../../phonelibs/qpoases/SRC/SubjectTo.ipp \ - ../../../../phonelibs/qpoases/SRC/Bounds.ipp \ - ../../../../phonelibs/qpoases/SRC/QProblemB.ipp \ - ../../../../phonelibs/qpoases/INCLUDE/Constraints.hpp \ - ../../../../phonelibs/qpoases/SRC/Constraints.ipp \ - ../../../../phonelibs/qpoases/INCLUDE/CyclingManager.hpp \ - ../../../../phonelibs/qpoases/SRC/CyclingManager.ipp \ - ../../../../phonelibs/qpoases/SRC/QProblem.ipp diff --git a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/QProblem.o b/selfdrive/controls/lib/longitudinal_mpc/lib_qp/QProblem.o deleted file mode 100644 index 2dec436cf0..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/QProblem.o +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:67f333a6f1d18e9372b0c9eb8588cf4d3db87d3f731ff56497fbcecd79294400 -size 72200 diff --git a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/QProblemB.d b/selfdrive/controls/lib/longitudinal_mpc/lib_qp/QProblemB.d deleted file mode 100644 index 7878a825ce..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/QProblemB.d +++ /dev/null @@ -1,16 +0,0 @@ -lib_qp/QProblemB.o: ../../../../phonelibs/qpoases/SRC/QProblemB.cpp \ - ../../../../phonelibs/qpoases/INCLUDE/QProblemB.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Bounds.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/SubjectTo.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Indexlist.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Utils.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/MessageHandling.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Types.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Constants.hpp \ - lib_mpc_export/acado_qpoases_interface.hpp \ - ../../../../phonelibs/qpoases/SRC/MessageHandling.ipp \ - ../../../../phonelibs/qpoases/SRC/Utils.ipp \ - ../../../../phonelibs/qpoases/SRC/Indexlist.ipp \ - ../../../../phonelibs/qpoases/SRC/SubjectTo.ipp \ - ../../../../phonelibs/qpoases/SRC/Bounds.ipp \ - ../../../../phonelibs/qpoases/SRC/QProblemB.ipp diff --git a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/QProblemB.o b/selfdrive/controls/lib/longitudinal_mpc/lib_qp/QProblemB.o deleted file mode 100644 index 5027584212..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/QProblemB.o +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:250c5e3626bd753796225bca9d031751a9f21e73e7b7e7fc8c4821b59af96298 -size 37592 diff --git a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/SubjectTo.d b/selfdrive/controls/lib/longitudinal_mpc/lib_qp/SubjectTo.d deleted file mode 100644 index c896d9a9fa..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/SubjectTo.d +++ /dev/null @@ -1,12 +0,0 @@ -lib_qp/SubjectTo.o: ../../../../phonelibs/qpoases/SRC/SubjectTo.cpp \ - ../../../../phonelibs/qpoases/INCLUDE/SubjectTo.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Indexlist.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Utils.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/MessageHandling.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Types.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Constants.hpp \ - lib_mpc_export/acado_qpoases_interface.hpp \ - ../../../../phonelibs/qpoases/SRC/MessageHandling.ipp \ - ../../../../phonelibs/qpoases/SRC/Utils.ipp \ - ../../../../phonelibs/qpoases/SRC/Indexlist.ipp \ - ../../../../phonelibs/qpoases/SRC/SubjectTo.ipp diff --git a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/SubjectTo.o b/selfdrive/controls/lib/longitudinal_mpc/lib_qp/SubjectTo.o deleted file mode 100644 index 37ccdf7bf4..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/SubjectTo.o +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ec3bcbb2a42f595b00d2b7ed13f08077c1c759366bf83fb553e397f5091dc60c -size 3856 diff --git a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/Utils.d b/selfdrive/controls/lib/longitudinal_mpc/lib_qp/Utils.d deleted file mode 100644 index 58f35a0653..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/Utils.d +++ /dev/null @@ -1,8 +0,0 @@ -lib_qp/Utils.o: ../../../../phonelibs/qpoases/SRC/Utils.cpp \ - ../../../../phonelibs/qpoases/INCLUDE/Utils.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/MessageHandling.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Types.hpp \ - ../../../../phonelibs/qpoases/INCLUDE/Constants.hpp \ - lib_mpc_export/acado_qpoases_interface.hpp \ - ../../../../phonelibs/qpoases/SRC/MessageHandling.ipp \ - ../../../../phonelibs/qpoases/SRC/Utils.ipp diff --git a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/Utils.o b/selfdrive/controls/lib/longitudinal_mpc/lib_qp/Utils.o deleted file mode 100644 index 8933520838..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/lib_qp/Utils.o +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7953dd5b169995db14a02abd10a2c20a61aa8e2c93e303895af898cd1cd2aed5 -size 952 diff --git a/selfdrive/controls/lib/longitudinal_mpc/libmpc1.so b/selfdrive/controls/lib/longitudinal_mpc/libmpc1.so deleted file mode 100755 index 31490dc83c..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/libmpc1.so +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c980d0f55f9208270b328c358cfbc5f681d9a8da90b78568dc222e9352561b75 -size 405136 diff --git a/selfdrive/controls/lib/longitudinal_mpc/libmpc_py.py b/selfdrive/controls/lib/longitudinal_mpc/libmpc_py.py index 354a4a493e..95e9135a81 100644 --- a/selfdrive/controls/lib/longitudinal_mpc/libmpc_py.py +++ b/selfdrive/controls/lib/longitudinal_mpc/libmpc_py.py @@ -29,7 +29,7 @@ def _get_libmpc(mpc_id): double x_ego[21]; double v_ego[21]; double a_ego[21]; - double j_ego[21]; + double j_ego[20]; double x_l[21]; double v_l[21]; double a_l[21]; diff --git a/selfdrive/controls/lib/longitudinal_mpc/longitudinal_mpc.c b/selfdrive/controls/lib/longitudinal_mpc/longitudinal_mpc.c index e903ccc758..d4bfee8c8a 100644 --- a/selfdrive/controls/lib/longitudinal_mpc/longitudinal_mpc.c +++ b/selfdrive/controls/lib/longitudinal_mpc/longitudinal_mpc.c @@ -26,12 +26,12 @@ typedef struct { double x_ego[N+1]; double v_ego[N+1]; double a_ego[N+1]; - double j_ego[N+1]; - double x_l[N+1]; - double v_l[N+1]; - double a_l[N+1]; - double t[N+1]; - double cost; + double j_ego[N]; + double x_l[N+1]; + double v_l[N+1]; + double a_l[N+1]; + double t[N+1]; + double cost; } log_t; void init(double ttcCost, double distanceCost, double accelerationCost, double jerkCost){ @@ -56,14 +56,15 @@ void init(double ttcCost, double distanceCost, double accelerationCost, double j if (i > 4){ f = STEP_MULTIPLIER; } - acadoVariables.W[16 * i + 0] = ttcCost * f; // exponential cost for time-to-collision (ttc) - acadoVariables.W[16 * i + 5] = distanceCost * f; // desired distance - acadoVariables.W[16 * i + 10] = accelerationCost * f; // acceleration - acadoVariables.W[16 * i + 15] = jerkCost * f; // jerk + // Setup diagonal entries + acadoVariables.W[NY*NY*i + (NY+1)*0] = ttcCost * f; // exponential cost for time-to-collision (ttc) + acadoVariables.W[NY*NY*i + (NY+1)*1] = distanceCost * f; // desired distance + acadoVariables.W[NY*NY*i + (NY+1)*2] = accelerationCost * f; // acceleration + acadoVariables.W[NY*NY*i + (NY+1)*3] = jerkCost * f; // jerk } - acadoVariables.WN[0] = ttcCost * STEP_MULTIPLIER; // exponential cost for danger zone - acadoVariables.WN[4] = distanceCost * STEP_MULTIPLIER; // desired distance - acadoVariables.WN[8] = accelerationCost * STEP_MULTIPLIER; // acceleration + acadoVariables.WN[(NYN+1)*0] = ttcCost * STEP_MULTIPLIER; // exponential cost for danger zone + acadoVariables.WN[(NYN+1)*1] = distanceCost * STEP_MULTIPLIER; // desired distance + acadoVariables.WN[(NYN+1)*2] = accelerationCost * STEP_MULTIPLIER; // acceleration } @@ -154,12 +155,15 @@ int run_mpc(state_t * x0, log_t * solution, double l, double a_l_0){ acado_preparationStep(); acado_feedbackStep(); - for (i = 0; i <= N; i++){ + for (i = 0; i <= N; i++){ solution->x_ego[i] = acadoVariables.x[i*NX]; - solution->v_ego[i] = acadoVariables.x[i*NX+1]; + solution->v_ego[i] = acadoVariables.x[i*NX+1]; solution->a_ego[i] = acadoVariables.x[i*NX+2]; - solution->j_ego[i] = acadoVariables.u[i]; - } + + if (i < N){ + solution->j_ego[i] = acadoVariables.u[i]; + } + } solution->cost = acado_getObjective(); // Dont shift states here. Current solution is closer to next timestep than if diff --git a/selfdrive/controls/lib/longitudinal_mpc/longitudinal_mpc.d b/selfdrive/controls/lib/longitudinal_mpc/longitudinal_mpc.d deleted file mode 100644 index 34a2a0d20c..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/longitudinal_mpc.d +++ /dev/null @@ -1,3 +0,0 @@ -longitudinal_mpc.o: longitudinal_mpc.c lib_mpc_export/acado_common.h \ - lib_mpc_export/acado_qpoases_interface.hpp \ - lib_mpc_export/acado_auxiliary_functions.h diff --git a/selfdrive/controls/lib/longitudinal_mpc/longitudinal_mpc.o b/selfdrive/controls/lib/longitudinal_mpc/longitudinal_mpc.o deleted file mode 100644 index 09380d29fd..0000000000 --- a/selfdrive/controls/lib/longitudinal_mpc/longitudinal_mpc.o +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:88e99546f68b7838c5a32a60bb8f209ed4e9e30d6461930f5c7ea80224899ec6 -size 3136 diff --git a/selfdrive/controls/lib/model_parser.py b/selfdrive/controls/lib/model_parser.py index 747e918f75..0b4bb241db 100644 --- a/selfdrive/controls/lib/model_parser.py +++ b/selfdrive/controls/lib/model_parser.py @@ -1,4 +1,5 @@ from common.numpy_fast import interp +import numpy as np from selfdrive.controls.lib.latcontrol_helpers import model_polyfit, calc_desired_path, compute_path_pinv CAMERA_OFFSET = 0.06 # m from center car to camera @@ -18,48 +19,48 @@ class ModelParser(object): self.lane_width = 3.7 self.l_prob = 0. self.r_prob = 0. + self.x_points = np.arange(50) def update(self, v_ego, md): - if md is not None: - p_poly = model_polyfit(md.model.path.points, self._path_pinv) # predicted path - l_poly = model_polyfit(md.model.leftLane.points, self._path_pinv) # left line - r_poly = model_polyfit(md.model.rightLane.points, self._path_pinv) # right line + if len(md.leftLane.poly): + l_poly = np.array(md.leftLane.poly) + r_poly = np.array(md.rightLane.poly) + p_poly = np.array(md.path.poly) + else: + l_poly = model_polyfit(md.leftLane.points, self._path_pinv) # left line + r_poly = model_polyfit(md.rightLane.points, self._path_pinv) # right line + p_poly = model_polyfit(md.path.points, self._path_pinv) # predicted path - # only offset left and right lane lines; offsetting p_poly does not make sense - l_poly[3] += CAMERA_OFFSET - r_poly[3] += CAMERA_OFFSET + # only offset left and right lane lines; offsetting p_poly does not make sense + l_poly[3] += CAMERA_OFFSET + r_poly[3] += CAMERA_OFFSET - p_prob = 1. # model does not tell this probability yet, so set to 1 for now - l_prob = md.model.leftLane.prob # left line prob - r_prob = md.model.rightLane.prob # right line prob + p_prob = 1. # model does not tell this probability yet, so set to 1 for now + l_prob = md.leftLane.prob # left line prob + r_prob = md.rightLane.prob # right line prob - # Find current lanewidth - lr_prob = l_prob * r_prob - self.lane_width_certainty += 0.05 * (lr_prob - self.lane_width_certainty) - current_lane_width = abs(l_poly[3] - r_poly[3]) - self.lane_width_estimate += 0.005 * (current_lane_width - self.lane_width_estimate) - speed_lane_width = interp(v_ego, [0., 31.], [3., 3.8]) - self.lane_width = self.lane_width_certainty * self.lane_width_estimate + \ - (1 - self.lane_width_certainty) * speed_lane_width + # Find current lanewidth + lr_prob = l_prob * r_prob + self.lane_width_certainty += 0.05 * (lr_prob - self.lane_width_certainty) + current_lane_width = abs(l_poly[3] - r_poly[3]) + self.lane_width_estimate += 0.005 * (current_lane_width - self.lane_width_estimate) + speed_lane_width = interp(v_ego, [0., 31.], [3., 3.8]) + self.lane_width = self.lane_width_certainty * self.lane_width_estimate + \ + (1 - self.lane_width_certainty) * speed_lane_width - lane_width_diff = abs(self.lane_width - current_lane_width) - lane_r_prob = interp(lane_width_diff, [0.3, 1.0], [1.0, 0.0]) + self.lead_dist = md.lead.dist + self.lead_prob = md.lead.prob + self.lead_var = md.lead.std**2 - r_prob *= lane_r_prob + # compute target path + self.d_poly, self.c_poly, self.c_prob = calc_desired_path( + l_poly, r_poly, p_poly, l_prob, r_prob, p_prob, v_ego, self.lane_width) - self.lead_dist = md.model.lead.dist - self.lead_prob = md.model.lead.prob - self.lead_var = md.model.lead.std**2 + self.r_poly = r_poly + self.r_prob = r_prob - # compute target path - self.d_poly, self.c_poly, self.c_prob = calc_desired_path( - l_poly, r_poly, p_poly, l_prob, r_prob, p_prob, v_ego, self.lane_width) + self.l_poly = l_poly + self.l_prob = l_prob - self.r_poly = r_poly - self.r_prob = r_prob - - self.l_poly = l_poly - self.l_prob = l_prob - - self.p_poly = p_poly - self.p_prob = p_prob + self.p_poly = p_poly + self.p_prob = p_prob diff --git a/selfdrive/controls/lib/pathplanner.py b/selfdrive/controls/lib/pathplanner.py index f3cdffdfd2..cbd144edcd 100644 --- a/selfdrive/controls/lib/pathplanner.py +++ b/selfdrive/controls/lib/pathplanner.py @@ -1,4 +1,4 @@ -import zmq +import os import math import numpy as np @@ -10,6 +10,8 @@ from selfdrive.controls.lib.drive_helpers import MPC_COST_LAT from selfdrive.controls.lib.model_parser import ModelParser import selfdrive.messaging as messaging +LOG_MPC = os.environ.get('LOG_MPC', False) + def calc_states_after_delay(states, v_ego, steer_angle, curvature_factor, steer_ratio, delay): states[0].x = v_ego * delay @@ -26,12 +28,11 @@ class PathPlanner(object): self.last_cloudlog_t = 0 - context = zmq.Context() - self.plan = messaging.pub_sock(context, service_list['pathPlan'].port) - self.livempc = messaging.pub_sock(context, service_list['liveMpc'].port) + self.plan = messaging.pub_sock(service_list['pathPlan'].port) + self.livempc = messaging.pub_sock(service_list['liveMpc'].port) self.setup_mpc(CP.steerRateCost) - self.invalid_counter = 0 + self.solution_invalid_cnt = 0 def setup_mpc(self, steer_rate_cost): self.libmpc = libmpc_py.libmpc @@ -49,31 +50,34 @@ class PathPlanner(object): self.angle_steers_des_prev = 0.0 self.angle_steers_des_time = 0.0 - def update(self, rcv_times, CP, VM, CS, md, controls_state, live_parameters): - v_ego = CS.carState.vEgo - angle_steers = CS.carState.steeringAngle - active = controls_state.controlsState.active + self.l_poly = libmpc_py.ffi.new("double[4]") + self.r_poly = libmpc_py.ffi.new("double[4]") + self.p_poly = libmpc_py.ffi.new("double[4]") + + def update(self, sm, CP, VM): + v_ego = sm['carState'].vEgo + angle_steers = sm['carState'].steeringAngle + active = sm['controlsState'].active - angle_offset_average = live_parameters.liveParameters.angleOffsetAverage - angle_offset_bias = controls_state.controlsState.angleModelBias + angle_offset_average + angle_offset_average = sm['liveParameters'].angleOffsetAverage + angle_offset_bias = sm['controlsState'].angleModelBias + angle_offset_average - self.MP.update(v_ego, md) + self.MP.update(v_ego, sm['model']) # Run MPC self.angle_steers_des_prev = self.angle_steers_des_mpc - VM.update_params(live_parameters.liveParameters.stiffnessFactor, live_parameters.liveParameters.steerRatio) + VM.update_params(sm['liveParameters'].stiffnessFactor, sm['liveParameters'].steerRatio) curvature_factor = VM.curvature_factor(v_ego) - - l_poly = libmpc_py.ffi.new("double[4]", list(self.MP.l_poly)) - r_poly = libmpc_py.ffi.new("double[4]", list(self.MP.r_poly)) - p_poly = libmpc_py.ffi.new("double[4]", list(self.MP.p_poly)) + self.l_poly = list(self.MP.l_poly) + self.r_poly = list(self.MP.r_poly) + self.p_poly = list(self.MP.p_poly) # account for actuation delay self.cur_state = calc_states_after_delay(self.cur_state, v_ego, angle_steers - angle_offset_average, curvature_factor, VM.sR, CP.steerActuatorDelay) v_ego_mpc = max(v_ego, 5.0) # avoid mpc roughness due to low speed self.libmpc.run_mpc(self.cur_state, self.mpc_solution, - l_poly, r_poly, p_poly, + self.l_poly, self.r_poly, self.p_poly, self.MP.l_prob, self.MP.r_prob, self.MP.p_prob, curvature_factor, v_ego_mpc, self.MP.lane_width) # reset to current steer angle if not active or overriding @@ -93,46 +97,44 @@ class PathPlanner(object): t = sec_since_boot() if mpc_nans: self.libmpc.init(MPC_COST_LAT.PATH, MPC_COST_LAT.LANE, MPC_COST_LAT.HEADING, CP.steerRateCost) - self.cur_state[0].delta = math.radians(angle_steers) / VM.sR + self.cur_state[0].delta = math.radians(angle_steers - angle_offset_bias) / VM.sR if t > self.last_cloudlog_t + 5.0: self.last_cloudlog_t = t cloudlog.warning("Lateral mpc - nan: True") if self.mpc_solution[0].cost > 20000. or mpc_nans: # TODO: find a better way to detect when MPC did not converge - self.invalid_counter += 1 + self.solution_invalid_cnt += 1 else: - self.invalid_counter = 0 - - cur_time = sec_since_boot() - model_dead = cur_time - rcv_times['model'] > 0.5 - plan_valid = self.invalid_counter < 2 + self.solution_invalid_cnt = 0 + plan_solution_valid = self.solution_invalid_cnt < 2 plan_send = messaging.new_message() plan_send.init('pathPlan') + plan_send.valid = sm.all_alive_and_valid(service_list=['carState', 'controlsState', 'liveParameters', 'model']) plan_send.pathPlan.laneWidth = float(self.MP.lane_width) plan_send.pathPlan.dPoly = [float(x) for x in self.MP.d_poly] plan_send.pathPlan.cPoly = [float(x) for x in self.MP.c_poly] plan_send.pathPlan.cProb = float(self.MP.c_prob) - plan_send.pathPlan.lPoly = [float(x) for x in l_poly] + plan_send.pathPlan.lPoly = [float(x) for x in self.l_poly] plan_send.pathPlan.lProb = float(self.MP.l_prob) - plan_send.pathPlan.rPoly = [float(x) for x in r_poly] + plan_send.pathPlan.rPoly = [float(x) for x in self.r_poly] plan_send.pathPlan.rProb = float(self.MP.r_prob) plan_send.pathPlan.angleSteers = float(self.angle_steers_des_mpc) plan_send.pathPlan.rateSteers = float(rate_desired) plan_send.pathPlan.angleOffset = float(angle_offset_average) - plan_send.pathPlan.valid = bool(plan_valid) - plan_send.pathPlan.paramsValid = bool(live_parameters.liveParameters.valid) - plan_send.pathPlan.sensorValid = bool(live_parameters.liveParameters.sensorValid) - plan_send.pathPlan.modelValid = bool(not model_dead) + plan_send.pathPlan.mpcSolutionValid = bool(plan_solution_valid) + plan_send.pathPlan.paramsValid = bool(sm['liveParameters'].valid) + plan_send.pathPlan.sensorValid = bool(sm['liveParameters'].sensorValid) self.plan.send(plan_send.to_bytes()) - dat = messaging.new_message() - dat.init('liveMpc') - dat.liveMpc.x = list(self.mpc_solution[0].x) - dat.liveMpc.y = list(self.mpc_solution[0].y) - dat.liveMpc.psi = list(self.mpc_solution[0].psi) - dat.liveMpc.delta = list(self.mpc_solution[0].delta) - dat.liveMpc.cost = self.mpc_solution[0].cost - self.livempc.send(dat.to_bytes()) + if LOG_MPC: + dat = messaging.new_message() + dat.init('liveMpc') + dat.liveMpc.x = list(self.mpc_solution[0].x) + dat.liveMpc.y = list(self.mpc_solution[0].y) + dat.liveMpc.psi = list(self.mpc_solution[0].psi) + dat.liveMpc.delta = list(self.mpc_solution[0].delta) + dat.liveMpc.cost = self.mpc_solution[0].cost + self.livempc.send(dat.to_bytes()) diff --git a/selfdrive/controls/lib/planner.py b/selfdrive/controls/lib/planner.py index c8c3d1805a..9aaec513be 100755 --- a/selfdrive/controls/lib/planner.py +++ b/selfdrive/controls/lib/planner.py @@ -7,7 +7,7 @@ from common.numpy_fast import interp import selfdrive.messaging as messaging from cereal import car -from common.realtime import sec_since_boot +from common.realtime import sec_since_boot, DT_PLAN from selfdrive.swaglog import cloudlog from selfdrive.config import Conversions as CV from selfdrive.services import service_list @@ -18,7 +18,7 @@ from selfdrive.controls.lib.long_mpc import LongitudinalMpc NO_CURVATURE_SPEED = 200. * CV.MPH_TO_MS -_DT_MPC = 0.2 # 5Hz +LON_MPC_STEP = 0.2 # first step is 0.2s MAX_SPEED_ERROR = 2.0 AWARENESS_DECEL = -0.2 # car smoothly decel at .2m/s^2 when user is distracted @@ -64,12 +64,11 @@ def limit_accel_in_turns(v_ego, angle_steers, a_target, CP): class Planner(object): def __init__(self, CP, fcw_enabled): - context = zmq.Context() self.CP = CP self.poller = zmq.Poller() - self.plan = messaging.pub_sock(context, service_list['plan'].port) - self.live_longitudinal_mpc = messaging.pub_sock(context, service_list['liveLongitudinalMpc'].port) + self.plan = messaging.pub_sock(service_list['plan'].port) + self.live_longitudinal_mpc = messaging.pub_sock(service_list['liveLongitudinalMpc'].port) self.mpc1 = LongitudinalMpc(1, self.live_longitudinal_mpc) self.mpc2 = LongitudinalMpc(2, self.live_longitudinal_mpc) @@ -114,18 +113,18 @@ class Planner(object): self.v_acc_future = min([self.mpc1.v_mpc_future, self.mpc2.v_mpc_future, v_cruise_setpoint]) - def update(self, rcv_times, CS, CP, VM, PP, radar_state, controls_state, md, live_map_data): + def update(self, sm, CP, VM, PP, live_map_data): """Gets called when new radarState is available""" cur_time = sec_since_boot() - v_ego = CS.carState.vEgo + v_ego = sm['carState'].vEgo - long_control_state = controls_state.controlsState.longControlState - v_cruise_kph = controls_state.controlsState.vCruise - force_slow_decel = controls_state.controlsState.forceDecel + long_control_state = sm['controlsState'].longControlState + v_cruise_kph = sm['controlsState'].vCruise + force_slow_decel = sm['controlsState'].forceDecel v_cruise_setpoint = v_cruise_kph * CV.KPH_TO_MS - lead_1 = radar_state.radarState.leadOne - lead_2 = radar_state.radarState.leadTwo + lead_1 = sm['radarState'].leadOne + lead_2 = sm['radarState'].leadTwo enabled = (long_control_state == LongCtrlState.pid) or (long_control_state == LongCtrlState.stopping) following = lead_1.status and lead_1.dRel < 45.0 and lead_1.vLeadK > v_ego and lead_1.aLeadK > 0.0 @@ -133,8 +132,8 @@ class Planner(object): v_speedlimit = NO_CURVATURE_SPEED v_curvature = NO_CURVATURE_SPEED - map_age = cur_time - rcv_times['liveMapData'] - map_valid = live_map_data.liveMapData.mapValid and map_age < 10.0 + #map_age = cur_time - rcv_times['liveMapData'] + map_valid = False # live_map_data.liveMapData.mapValid and map_age < 10.0 # Speed limit and curvature set_speed_limit_active = self.params.get("LimitSetSpeed") == "1" and self.params.get("SpeedLimitOffset") is not None @@ -157,7 +156,7 @@ class Planner(object): if enabled: accel_limits = [float(x) for x in calc_cruise_accel_limits(v_ego, following)] jerk_limits = [min(-0.1, accel_limits[0]), max(0.1, accel_limits[1])] # TODO: make a separate lookup for jerk tuning - accel_limits = limit_accel_in_turns(v_ego, CS.carState.steeringAngle, accel_limits, self.CP) + accel_limits = limit_accel_in_turns(v_ego, sm['carState'].steeringAngle, accel_limits, self.CP) if force_slow_decel: # if required so, force a smooth deceleration @@ -174,12 +173,12 @@ class Planner(object): v_cruise_setpoint, accel_limits[1], accel_limits[0], jerk_limits[1], jerk_limits[0], - _DT_MPC) + LON_MPC_STEP) # cruise speed can't be negative even is user is distracted self.v_cruise = max(self.v_cruise, 0.) else: starting = long_control_state == LongCtrlState.starting - a_ego = min(CS.carState.aEgo, 0.0) + a_ego = min(sm['carState'].aEgo, 0.0) reset_speed = MIN_CAN_SPEED if starting else v_ego reset_accel = self.CP.startAccel if starting else a_ego self.v_acc = reset_speed @@ -192,8 +191,8 @@ class Planner(object): self.mpc1.set_cur_state(self.v_acc_start, self.a_acc_start) self.mpc2.set_cur_state(self.v_acc_start, self.a_acc_start) - self.mpc1.update(CS, lead_1, v_cruise_setpoint) - self.mpc2.update(CS, lead_2, v_cruise_setpoint) + self.mpc1.update(sm['carState'], lead_1, v_cruise_setpoint) + self.mpc2.update(sm['carState'], lead_2, v_cruise_setpoint) self.choose_solution(v_cruise_setpoint, enabled) @@ -201,26 +200,28 @@ class Planner(object): if self.mpc1.new_lead: self.fcw_checker.reset_lead(cur_time) - blinkers = CS.carState.leftBlinker or CS.carState.rightBlinker - fcw = self.fcw_checker.update(self.mpc1.mpc_solution, cur_time, v_ego, CS.carState.aEgo, + blinkers = sm['carState'].leftBlinker or sm['carState'].rightBlinker + fcw = self.fcw_checker.update(self.mpc1.mpc_solution, cur_time, v_ego, sm['carState'].aEgo, lead_1.dRel, lead_1.vLead, lead_1.aLeadK, lead_1.yRel, lead_1.vLat, - lead_1.fcw, blinkers) and not CS.carState.brakePressed + lead_1.fcw, blinkers) and not sm['carState'].brakePressed if fcw: cloudlog.info("FCW triggered %s", self.fcw_checker.counters) - radar_dead = cur_time - rcv_times['radarState'] > 0.5 + radar_dead = not sm.alive['radarState'] - radar_errors = list(radar_state.radarState.radarErrors) + radar_errors = list(sm['radarState'].radarErrors) radar_fault = car.RadarData.Error.fault in radar_errors - radar_comm_issue = car.RadarData.Error.commIssue in radar_errors + radar_can_error = car.RadarData.Error.canError in radar_errors # **** send the plan **** plan_send = messaging.new_message() plan_send.init('plan') - plan_send.plan.mdMonoTime = md.logMonoTime - plan_send.plan.radarStateMonoTime = radar_state.logMonoTime + plan_send.valid = sm.all_alive_and_valid(service_list=['carState', 'controlsState', 'radarState']) + + plan_send.plan.mdMonoTime = sm.logMonoTime['model'] + plan_send.plan.radarStateMonoTime = sm.logMonoTime['radarState'] # longitudal plan plan_send.plan.vCruise = self.v_cruise @@ -239,9 +240,9 @@ class Planner(object): radar_valid = not (radar_dead or radar_fault) plan_send.plan.radarValid = bool(radar_valid) - plan_send.plan.radarCommIssue = bool(radar_comm_issue) + plan_send.plan.radarCanError = bool(radar_can_error) - plan_send.plan.processingDelay = (plan_send.logMonoTime / 1e9) - rcv_times['radarState'] + plan_send.plan.processingDelay = (plan_send.logMonoTime / 1e9) - sm.rcv_time['radarState'] # Send out fcw fcw = fcw and (self.fcw_enabled or long_control_state != LongCtrlState.off) @@ -250,8 +251,7 @@ class Planner(object): self.plan.send(plan_send.to_bytes()) # Interpolate 0.05 seconds and save as starting point for next iteration - dt = 0.05 # s - a_acc_sol = self.a_acc_start + (dt / _DT_MPC) * (self.a_acc - self.a_acc_start) - v_acc_sol = self.v_acc_start + dt * (a_acc_sol + self.a_acc_start) / 2.0 + a_acc_sol = self.a_acc_start + (DT_PLAN / LON_MPC_STEP) * (self.a_acc - self.a_acc_start) + v_acc_sol = self.v_acc_start + DT_PLAN * (a_acc_sol + self.a_acc_start) / 2.0 self.v_acc_start = v_acc_sol self.a_acc_start = a_acc_sol diff --git a/selfdrive/controls/plannerd.py b/selfdrive/controls/plannerd.py index c152d01fd3..306dab05ba 100755 --- a/selfdrive/controls/plannerd.py +++ b/selfdrive/controls/plannerd.py @@ -1,13 +1,10 @@ #!/usr/bin/env python import gc -import zmq -from collections import defaultdict from cereal import car from common.params import Params -from common.realtime import sec_since_boot, set_realtime_priority +from common.realtime import set_realtime_priority from selfdrive.swaglog import cloudlog -from selfdrive.services import service_list from selfdrive.controls.lib.planner import Planner from selfdrive.controls.lib.vehicle_model import VehicleModel from selfdrive.controls.lib.pathplanner import PathPlanner @@ -20,7 +17,6 @@ def plannerd_thread(): # start the loop set_realtime_priority(2) - context = zmq.Context() params = Params() # Get FCW toggle from settings @@ -35,53 +31,24 @@ def plannerd_thread(): VM = VehicleModel(CP) - poller = zmq.Poller() - car_state_sock = messaging.sub_sock(context, service_list['carState'].port, conflate=True, poller=poller) - controls_state_sock = messaging.sub_sock(context, service_list['controlsState'].port, conflate=True, poller=poller) - radar_state_sock = messaging.sub_sock(context, service_list['radarState'].port, conflate=True, poller=poller) - model_sock = messaging.sub_sock(context, service_list['model'].port, conflate=True, poller=poller) - live_parameters_sock = messaging.sub_sock(context, service_list['liveParameters'].port, conflate=True, poller=poller) - # live_map_data_sock = messaging.sub_sock(context, service_list['liveMapData'].port, conflate=True, poller=poller) - - car_state = messaging.new_message() - car_state.init('carState') - controls_state = messaging.new_message() - controls_state.init('controlsState') - model = messaging.new_message() - model.init('model') - radar_state = messaging.new_message() - radar_state.init('radarState') + sm = messaging.SubMaster(['carState', 'controlsState', 'radarState', 'model', 'liveParameters']) + + sm['liveParameters'].valid = True + sm['liveParameters'].sensorValid = True + sm['liveParameters'].steerRatio = CP.steerRatio + sm['liveParameters'].stiffnessFactor = 1.0 live_map_data = messaging.new_message() live_map_data.init('liveMapData') - live_parameters = messaging.new_message() - live_parameters.init('liveParameters') - live_parameters.liveParameters.valid = True - live_parameters.liveParameters.sensorValid = True - live_parameters.liveParameters.steerRatio = CP.steerRatio - live_parameters.liveParameters.stiffnessFactor = 1.0 - - rcv_times = defaultdict(int) - while True: - for socket, event in poller.poll(): - msg = messaging.recv_one(socket) - rcv_times[msg.which()] = sec_since_boot() - - if socket is controls_state_sock: - controls_state = msg - elif socket is car_state_sock: - car_state = msg - elif socket is live_parameters_sock: - live_parameters = msg - elif socket is model_sock: - model = msg - PP.update(rcv_times, CP, VM, car_state, model, controls_state, live_parameters) - elif socket is radar_state_sock: - radar_state = msg - PL.update(rcv_times, car_state, CP, VM, PP, radar_state, controls_state, model, live_map_data) - # elif socket is live_map_data_sock: - # live_map_data = msg + sm.update() + + if sm.updated['model']: + PP.update(sm, CP, VM) + if sm.updated['radarState']: + PL.update(sm, CP, VM, PP, live_map_data.liveMapData) + # elif socket is live_map_data_sock: + # live_map_data = msg def main(gctx=None): diff --git a/selfdrive/controls/radard.py b/selfdrive/controls/radard.py index c4c135c1c4..b37ed8f755 100755 --- a/selfdrive/controls/radard.py +++ b/selfdrive/controls/radard.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -import zmq import numpy as np import numpy.matlib import importlib @@ -17,7 +16,7 @@ from selfdrive.controls.lib.vehicle_model import VehicleModel from selfdrive.swaglog import cloudlog from cereal import car from common.params import Params -from common.realtime import set_realtime_priority, Ratekeeper +from common.realtime import set_realtime_priority, Ratekeeper, DT_MDL from common.kalman.ekf import EKF, SimpleSensor DEBUG = False @@ -59,13 +58,8 @@ def radard_thread(gctx=None): # import the radar from the fingerprint cloudlog.info("radard is importing %s", CP.carName) RadarInterface = importlib.import_module('selfdrive.car.%s.radar_interface' % CP.carName).RadarInterface - context = zmq.Context() - # *** subscribe to features and model from visiond - poller = zmq.Poller() - model = messaging.sub_sock(context, service_list['model'].port, conflate=True, poller=poller) - controls_state_sock = messaging.sub_sock(context, service_list['controlsState'].port, conflate=True, poller=poller) - live_parameters_sock = messaging.sub_sock(context, service_list['liveParameters'].port, conflate=True, poller=poller) + sm = messaging.SubMaster(['model', 'controlsState', 'liveParameters']) # Default parameters live_parameters = messaging.new_message() @@ -81,15 +75,14 @@ def radard_thread(gctx=None): last_controls_state_ts = 0 # *** publish radarState and liveTracks - radarState = messaging.pub_sock(context, service_list['radarState'].port) - liveTracks = messaging.pub_sock(context, service_list['liveTracks'].port) + radarState = messaging.pub_sock(service_list['radarState'].port) + liveTracks = messaging.pub_sock(service_list['liveTracks'].port) path_x = np.arange(0.0, 140.0, 0.1) # 140 meters is max # Time-alignment - rate = 20. # model and radar are both at 20Hz - tsv = 1./rate - v_len = 20 # how many speed data points to remember for t alignment with rdr data + rate = 1. / DT_MDL # model and radar are both at 20Hz + v_len = 20 # how many speed data points to remember for t alignment with rdr data active = 0 steer_angle = 0. @@ -102,9 +95,9 @@ def radard_thread(gctx=None): speedSensorV = SimpleSensor(XV, 1, 2) # v_ego - v_ego = None - v_ego_hist_t = deque(maxlen=v_len) - v_ego_hist_v = deque(maxlen=v_len) + v_ego = 0. + v_ego_hist_t = deque([0], maxlen=v_len) + v_ego_hist_v = deque([0], maxlen=v_len) v_ego_t_aligned = 0. rk = Ratekeeper(rate, print_delay_threshold=None) @@ -115,44 +108,32 @@ def radard_thread(gctx=None): for pt in rr.points: ar_pts[pt.trackId] = [pt.dRel + RDR_TO_LDR, pt.yRel, pt.vRel, pt.measured] - # receive the controlsStates - controls_state = None - md = None - - for socket, event in poller.poll(0): - if socket is controls_state_sock: - controls_state = messaging.recv_one(socket) - elif socket is model: - md = messaging.recv_one(socket) - elif socket is live_parameters_sock: - live_parameters = messaging.recv_one(socket) - VM.update_params(live_parameters.liveParameters.stiffnessFactor, live_parameters.liveParameters.steerRatio) - - if controls_state is not None: - active = controls_state.controlsState.active - v_ego = controls_state.controlsState.vEgo - steer_angle = controls_state.controlsState.angleSteers - steer_override = controls_state.controlsState.steerOverride + sm.update(0) + + if sm.updated['liveParameters']: + VM.update_params(sm['liveParameters'].stiffnessFactor, sm['liveParameters'].steerRatio) + + if sm.updated['controlsState']: + active = sm['controlsState'].active + v_ego = sm['controlsState'].vEgo + steer_angle = sm['controlsState'].angleSteers + steer_override = sm['controlsState'].steerOverride v_ego_hist_v.append(v_ego) v_ego_hist_t.append(float(rk.frame)/rate) - last_controls_state_ts = controls_state.logMonoTime - - if v_ego is None: - continue + last_controls_state_ts = sm.logMonoTime['controlsState'] - if md is not None: - last_md_ts = md.logMonoTime + if sm.updated['model']: + last_md_ts = sm.logMonoTime['model'] + MP.update(v_ego, sm['model']) - # *** get path prediction from the model *** - MP.update(v_ego, md) # run kalman filter only if prob is high enough if MP.lead_prob > 0.7: reading = speedSensorV.read(MP.lead_dist, covar=np.matrix(MP.lead_var)) ekfv.update_scalar(reading) - ekfv.predict(tsv) + ekfv.predict(DT_MDL) # When changing lanes the distance to the lead car can suddenly change, # which makes the Kalman filter output large relative acceleration @@ -264,6 +245,7 @@ def radard_thread(gctx=None): # *** publish radarState *** dat = messaging.new_message() dat.init('radarState') + dat.valid = sm.all_alive_and_valid(service_list=['controlsState']) dat.radarState.mdMonoTime = last_md_ts dat.radarState.canMonoTimes = list(rr.canMonoTimes) dat.radarState.radarErrors = list(rr.errors) diff --git a/selfdrive/controls/tests/test_following_distance.py b/selfdrive/controls/tests/test_following_distance.py index 228636e671..994ea7ea5d 100644 --- a/selfdrive/controls/tests/test_following_distance.py +++ b/selfdrive/controls/tests/test_following_distance.py @@ -61,8 +61,8 @@ def run_following_distance_simulation(v_lead, t_end=200.0): mpc.set_cur_state(v_ego, a_ego) if first: # Make sure MPC is converged on first timestep for _ in range(20): - mpc.update(CS, lead, v_cruise_setpoint) - mpc.update(CS, lead, v_cruise_setpoint) + mpc.update(CS.carState, lead, v_cruise_setpoint) + mpc.update(CS.carState, lead, v_cruise_setpoint) # Choose slowest of two solutions if v_cruise < mpc.v_mpc: diff --git a/selfdrive/controls/tests/test_lateral_mpc.py b/selfdrive/controls/tests/test_lateral_mpc.py new file mode 100644 index 0000000000..77b37bb740 --- /dev/null +++ b/selfdrive/controls/tests/test_lateral_mpc.py @@ -0,0 +1,121 @@ +import unittest +import copy +import numpy as np +from selfdrive.car.honda.interface import CarInterface +from selfdrive.controls.lib.lateral_mpc import libmpc_py +from selfdrive.controls.lib.vehicle_model import VehicleModel + + +def run_mpc(v_ref=30., x_init=0., y_init=0., psi_init=0., delta_init=0., + l_prob=1., r_prob=1., p_prob=1., + poly_l=np.array([0., 0., 0., 1.8]), poly_r=np.array([0., 0., 0., -1.8]), poly_p=np.array([0., 0., 0., 0.]), + lane_width=3.6, poly_shift=0.): + + libmpc = libmpc_py.libmpc + libmpc.init(1.0, 3.0, 1.0, 1.0) + + mpc_solution = libmpc_py.ffi.new("log_t *") + + p_l = copy.copy(poly_l) + p_l[3] += poly_shift + p_r = copy.copy(poly_r) + p_r[3] += poly_shift + p_p = copy.copy(poly_p) + p_p[3] += poly_shift + + CP = CarInterface.get_params("HONDA CIVIC 2016 TOURING", {}) + VM = VehicleModel(CP) + + v_ref = v_ref + curvature_factor = VM.curvature_factor(v_ref) + + l_poly = libmpc_py.ffi.new("double[4]", map(float, p_l)) + r_poly = libmpc_py.ffi.new("double[4]", map(float, p_r)) + p_poly = libmpc_py.ffi.new("double[4]", map(float, p_p)) + + cur_state = libmpc_py.ffi.new("state_t *") + cur_state[0].x = x_init + cur_state[0].y = y_init + cur_state[0].psi = psi_init + cur_state[0].delta = delta_init + + # converge in no more than 20 iterations + for _ in range(20): + libmpc.run_mpc(cur_state, mpc_solution, l_poly, r_poly, p_poly, l_prob, r_prob, p_prob, + curvature_factor, v_ref, lane_width) + + return mpc_solution + + +class TestLateralMpc(unittest.TestCase): + + def _assert_null(self, sol, delta=1e-6): + for i in range(len(sol[0].y)): + self.assertAlmostEqual(sol[0].y[i], 0., delta=delta) + self.assertAlmostEqual(sol[0].psi[i], 0., delta=delta) + self.assertAlmostEqual(sol[0].delta[i], 0., delta=delta) + + def _assert_simmetry(self, sol, delta=1e-6): + for i in range(len(sol[0][0].y)): + self.assertAlmostEqual(sol[0][0].y[i], -sol[1][0].y[i], delta=delta) + self.assertAlmostEqual(sol[0][0].psi[i], -sol[1][0].psi[i], delta=delta) + self.assertAlmostEqual(sol[0][0].delta[i], -sol[1][0].delta[i], delta=delta) + self.assertAlmostEqual(sol[0][0].x[i], sol[1][0].x[i], delta=delta) + + def _assert_identity(self, sol, ignore_y=False, delta=1e-6): + for i in range(len(sol[0][0].y)): + self.assertAlmostEqual(sol[0][0].psi[i], sol[1][0].psi[i], delta=delta) + self.assertAlmostEqual(sol[0][0].delta[i], sol[1][0].delta[i], delta=delta) + self.assertAlmostEqual(sol[0][0].x[i], sol[1][0].x[i], delta=delta) + if not ignore_y: + self.assertAlmostEqual(sol[0][0].y[i], sol[1][0].y[i], delta=delta) + + def test_straight(self): + sol = run_mpc() + self._assert_null(sol) + + def test_y_symmetry(self): + sol = [] + for y_init in [-0.5, 0.5]: + sol.append(run_mpc(y_init=y_init)) + self._assert_simmetry(sol) + + def test_poly_symmetry(self): + sol = [] + for poly_shift in [-1., 1.]: + sol.append(run_mpc(poly_shift=poly_shift)) + self._assert_simmetry(sol) + + def test_delta_symmetry(self): + sol = [] + for delta_init in [-0.1, 0.1]: + sol.append(run_mpc(delta_init=delta_init)) + self._assert_simmetry(sol) + + def test_psi_symmetry(self): + sol = [] + for psi_init in [-0.1, 0.1]: + sol.append(run_mpc(psi_init=psi_init)) + self._assert_simmetry(sol) + + def test_prob_symmetry(self): + sol = [] + lane_width = 3. + for r_prob in [0., 1.]: + sol.append(run_mpc(r_prob=r_prob, l_prob=1.-r_prob, lane_width=lane_width)) + self._assert_simmetry(sol) + + def test_y_shift_vs_poly_shift(self): + shift = 1. + sol = [] + sol.append(run_mpc(y_init=shift)) + sol.append(run_mpc(poly_shift=-shift)) + # need larger delta than standard, otherwise it false triggers. + # this is acceptable because the 2 cases are very different from the optimizer standpoint + self._assert_identity(sol, ignore_y=True, delta=1e-5) + + def test_no_overshoot(self): + y_init = 1. + sol = run_mpc(y_init=y_init) + for y in list(sol[0].y): + self.assertGreaterEqual(y_init, abs(y)) diff --git a/selfdrive/crash.py b/selfdrive/crash.py index 94bdfd125b..6ceb56b627 100644 --- a/selfdrive/crash.py +++ b/selfdrive/crash.py @@ -2,6 +2,7 @@ import os import sys import threading +import capnp from selfdrive.version import version, dirty from selfdrive.swaglog import cloudlog @@ -22,7 +23,9 @@ else: install_sys_hook=False, transport=HTTPTransport, release=version, tags={'dirty': dirty}) def capture_exception(*args, **kwargs): - client.captureException(*args, **kwargs) + exc_info = sys.exc_info() + if not exc_info[0] is capnp.lib.capnp.KjException: + client.captureException(*args, **kwargs) cloudlog.error("crash", exc_info=kwargs.get('exc_info', 1)) def bind_user(**kwargs): diff --git a/selfdrive/debug/can_printer.py b/selfdrive/debug/can_printer.py index 876b2ab808..daa0500b2f 100755 --- a/selfdrive/debug/can_printer.py +++ b/selfdrive/debug/can_printer.py @@ -3,14 +3,12 @@ import os import sys from collections import defaultdict from common.realtime import sec_since_boot -import zmq import selfdrive.messaging as messaging from selfdrive.services import service_list def can_printer(bus=0, max_msg=None, addr="127.0.0.1"): - context = zmq.Context() - logcan = messaging.sub_sock(context, service_list['can'].port, addr=addr) + logcan = messaging.sub_sock(service_list['can'].port, addr=addr) start = sec_since_boot() lp = sec_since_boot() diff --git a/selfdrive/debug/cpu_usage_stat.py b/selfdrive/debug/cpu_usage_stat.py index 55723ff354..7adf7ef78e 100755 --- a/selfdrive/debug/cpu_usage_stat.py +++ b/selfdrive/debug/cpu_usage_stat.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import psutil import time import os @@ -30,7 +30,7 @@ SLEEP_INTERVAL = 0.2 monitored_proc_names = [ 'ubloxd', 'thermald', 'uploader', 'deleter', 'controlsd', 'plannerd', 'radard', 'mapd', 'loggerd' , 'logmessaged', 'tombstoned', - 'logcatd', 'proclogd', 'boardd', 'pandad', './ui', 'calibrationd', 'locationd', 'visiond', 'sensord', 'updated', 'gpsd', 'athena'] + 'logcatd', 'proclogd', 'boardd', 'pandad', './ui', 'calibrationd', 'params_learner', 'visiond', 'sensord', 'updated', 'gpsd', 'athena'] cpu_time_names = ['user', 'system', 'children_user', 'children_system'] timer = getattr(time, 'monotonic', time.time) diff --git a/selfdrive/debug/dump.py b/selfdrive/debug/dump.py index 0434023f71..7fd8a7cf4f 100755 --- a/selfdrive/debug/dump.py +++ b/selfdrive/debug/dump.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import sys import argparse import zmq @@ -14,7 +14,6 @@ def run_server(socketio): socketio.run(app, host='0.0.0.0', port=4000) if __name__ == "__main__": - context = zmq.Context() poller = zmq.Poller() parser = argparse.ArgumentParser(description='Sniff a communcation socket') @@ -40,9 +39,9 @@ if __name__ == "__main__": else: print("service not found") sys.exit(-1) - sock = messaging.sub_sock(context, port, poller, addr=args.addr) + sock = messaging.sub_sock(port, poller, addr=args.addr) if args.proxy: - republish_socks[sock] = messaging.pub_sock(context, port) + republish_socks[sock] = messaging.pub_sock(port) if args.map: from flask.ext.socketio import SocketIO #pylint: disable=no-name-in-module, import-error diff --git a/selfdrive/debug/get_fingerprint.py b/selfdrive/debug/get_fingerprint.py index ed877ff508..e528d9826c 100755 --- a/selfdrive/debug/get_fingerprint.py +++ b/selfdrive/debug/get_fingerprint.py @@ -11,12 +11,10 @@ # - since some messages are published at low frequency, keep this script running for at least 30s, # until all messages are received at least once -import zmq import selfdrive.messaging as messaging from selfdrive.services import service_list -context = zmq.Context() -logcan = messaging.sub_sock(context, service_list['can'].port) +logcan = messaging.sub_sock(service_list['can'].port) msgs = {} while True: lc = messaging.recv_sock(logcan, True) diff --git a/selfdrive/locationd/.gitignore b/selfdrive/locationd/.gitignore index 6c8271a885..8cdb0d2305 100644 --- a/selfdrive/locationd/.gitignore +++ b/selfdrive/locationd/.gitignore @@ -1,2 +1,3 @@ ubloxd ubloxd_test +params_learner \ No newline at end of file diff --git a/selfdrive/locationd/Makefile b/selfdrive/locationd/Makefile index 110c1457ee..f7652648e1 100644 --- a/selfdrive/locationd/Makefile +++ b/selfdrive/locationd/Makefile @@ -13,28 +13,47 @@ WARN_FLAGS = -Werror=implicit-function-declaration \ -Werror=return-type \ -Werror=format-extra-args -CFLAGS = -std=gnu11 -g -fPIC -I../ -I../../ -O2 $(WARN_FLAGS) -CXXFLAGS = -std=c++11 -g -fPIC -I../ -I../../ -O2 $(WARN_FLAGS) +CFLAGS = -std=gnu11 -g -fPIC -I../ -I../../ -O2 $(WARN_FLAGS) -Wall +CXXFLAGS = -std=c++11 -g -fPIC -I../ -I../../ -O2 $(WARN_FLAGS) -Wall +ZMQ_LIBS = -l:libczmq.a -l:libzmq.a + +ifeq ($(ARCH),aarch64) +CFLAGS += -mcpu=cortex-a57 +CXXFLAGS += -mcpu=cortex-a57 +ZMQ_LIBS += -lgnustl_shared +endif -ZMQ_FLAGS = -I$(PHONELIBS)/zmq/aarch64/include -ZMQ_LIBS = -L$(PHONELIBS)/zmq/aarch64/lib \ - -l:libczmq.a -l:libzmq.a \ - -lgnustl_shared JSON_FLAGS = -I$(PHONELIBS)/json/src +JSON11_FLAGS = -I$(PHONELIBS)/json11 EXTRA_LIBS = -lpthread ifeq ($(ARCH),x86_64) +ZMQ_FLAGS = -I$(BASEDIR)/phonelibs/zmq/x64/include ZMQ_LIBS = -L$(BASEDIR)/external/zmq/lib \ -l:libczmq.a -l:libzmq.a +ZMQ_SHARED_LIBS = -L$(BASEDIR)/external/zmq/lib \ + -lczmq -lzmq +else +EXTRA_LIBS += -llog -luuid endif .PHONY: all -all: ubloxd +all: ubloxd params_learner include ../common/cereal.mk +LOC_OBJS = locationd_yawrate.o params_learner.o \ + ../common/swaglog.o \ + ../common/params.o \ + ../common/util.o \ + $(PHONELIBS)/json11/json11.o \ + $(PHONELIBS)/json/src/json.o \ + $(CEREAL_OBJS) + +LOC_DEPS := $(LOC_OBJS:.o=.d) + OBJS = ublox_msg.o \ ubloxd_main.o \ ../common/swaglog.o \ @@ -45,6 +64,20 @@ OBJS = ublox_msg.o \ DEPS := $(OBJS:.o=.d) ubloxd.d ubloxd_test.d +liblocationd.so: $(LOC_OBJS) + @echo "[ LINK ] $@" + $(CXX) -shared -o '$@' $^ \ + $(CEREAL_LIBS) \ + $(ZMQ_SHARED_LIBS) \ + $(EXTRA_LIBS) + +params_learner: $(LOC_OBJS) + @echo "[ LINK ] $@" + $(CXX) -fPIC -o '$@' $^ \ + $(CEREAL_LIBS) \ + $(ZMQ_LIBS) \ + $(EXTRA_LIBS) + ubloxd: ubloxd.o $(OBJS) @echo "[ LINK ] $@" $(CXX) -fPIC -o '$@' $^ \ @@ -65,6 +98,7 @@ ubloxd_test: ubloxd_test.o $(OBJS) -Iinclude -I.. -I../.. \ $(CEREAL_CXXFLAGS) \ $(ZMQ_FLAGS) \ + $(JSON11_FLAGS) \ $(JSON_FLAGS) \ -I../ \ -I../../ \ @@ -81,6 +115,7 @@ ubloxd_test: ubloxd_test.o $(OBJS) .PHONY: clean clean: - rm -f ubloxd ubloxd.d ubloxd.o ubloxd_test ubloxd_test.o ubloxd_test.d $(OBJS) $(DEPS) + rm -f ubloxd params_learner liblocationd.so ubloxd.d ubloxd.o ubloxd_test ubloxd_test.o ubloxd_test.d $(OBJS) $(LOC_OBJS) $(DEPS) -include $(DEPS) +-include $(LOC_DEPS) diff --git a/selfdrive/locationd/calibrationd.py b/selfdrive/locationd/calibrationd.py index 61c6e4553e..e3a0b10ad0 100755 --- a/selfdrive/locationd/calibrationd.py +++ b/selfdrive/locationd/calibrationd.py @@ -1,6 +1,5 @@ #!/usr/bin/env python import os -import zmq import copy import json import numpy as np @@ -9,7 +8,7 @@ from selfdrive.locationd.calibration_helpers import Calibration from selfdrive.swaglog import cloudlog from selfdrive.services import service_list from common.params import Params -from common.transformations.model import model_height, get_camera_frame_from_model_frame, get_camera_frame_from_bigmodel_frame +from common.transformations.model import model_height, get_camera_frame_from_model_frame, get_camera_frame_from_medmodel_frame from common.transformations.camera import view_frame_from_device_frame, get_view_frame_from_road_frame, \ eon_intrinsics, get_calib_from_vp, H, W @@ -85,7 +84,7 @@ class Calibrator(object): extrinsic_matrix = get_view_frame_from_road_frame(0, calib[1], calib[2], model_height) ke = eon_intrinsics.dot(extrinsic_matrix) warp_matrix = get_camera_frame_from_model_frame(ke) - warp_matrix_big = get_camera_frame_from_bigmodel_frame(ke) + warp_matrix_big = get_camera_frame_from_medmodel_frame(ke) cal_send = messaging.new_message() cal_send.init('liveCalibration') @@ -99,10 +98,8 @@ class Calibrator(object): def calibrationd_thread(gctx=None, addr="127.0.0.1"): - context = zmq.Context() - - cameraodometry = messaging.sub_sock(context, service_list['cameraOdometry'].port, addr=addr, conflate=True) - livecalibration = messaging.pub_sock(context, service_list['liveCalibration'].port) + cameraodometry = messaging.sub_sock(service_list['cameraOdometry'].port, addr=addr, conflate=True) + livecalibration = messaging.pub_sock(service_list['liveCalibration'].port) calibrator = Calibrator(param_put=True) # buffer with all the messages that still need to be input into the kalman diff --git a/selfdrive/locationd/kalman/.gitignore b/selfdrive/locationd/kalman/.gitignore deleted file mode 100644 index 9d357c72cc..0000000000 --- a/selfdrive/locationd/kalman/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -lane.cpp -gnss.cpp -loc*.cpp -pos_computer*.cpp diff --git a/selfdrive/locationd/kalman/__init__.py b/selfdrive/locationd/kalman/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/selfdrive/locationd/kalman/chi2_lookup.py b/selfdrive/locationd/kalman/chi2_lookup.py deleted file mode 100644 index f45b4577f5..0000000000 --- a/selfdrive/locationd/kalman/chi2_lookup.py +++ /dev/null @@ -1,21 +0,0 @@ -import numpy as np -import os - - -def gen_chi2_ppf_lookup(max_dim=200): - from scipy.stats import chi2 - table = np.zeros((max_dim, 98)) - for dim in range(1,max_dim): - table[dim] = chi2.ppf(np.arange(.01, .99, .01), dim) - #outfile = open('chi2_lookup_table', 'w') - np.save('chi2_lookup_table', table) - - -def chi2_ppf(p, dim): - table = np.load(os.path.dirname(os.path.realpath(__file__)) + '/chi2_lookup_table.npy') - result = np.interp(p, np.arange(.01, .99, .01), table[dim]) - return result - - -if __name__== "__main__": - gen_chi2_ppf_lookup() diff --git a/selfdrive/locationd/kalman/chi2_lookup_table.npy b/selfdrive/locationd/kalman/chi2_lookup_table.npy deleted file mode 100644 index 73f068e4b4..0000000000 --- a/selfdrive/locationd/kalman/chi2_lookup_table.npy +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0cc301b3a918cce76bd119a219e31722c6a03fa837927eb10fd84e877966cc3e -size 156928 diff --git a/selfdrive/locationd/kalman/ekf_c.c b/selfdrive/locationd/kalman/ekf_c.c deleted file mode 100644 index 1331036de3..0000000000 --- a/selfdrive/locationd/kalman/ekf_c.c +++ /dev/null @@ -1,124 +0,0 @@ -#include -#include - -typedef Eigen::Matrix DDM; -typedef Eigen::Matrix EEM; -typedef Eigen::Matrix DEM; - -void predict(double *in_x, double *in_P, double *in_Q, double dt) { - typedef Eigen::Matrix RRM; - - double nx[DIM] = {0}; - double in_F[EDIM*EDIM] = {0}; - - // functions from sympy - f_fun(in_x, dt, nx); - F_fun(in_x, dt, in_F); - - - EEM F(in_F); - EEM P(in_P); - EEM Q(in_Q); - - RRM F_main = F.topLeftCorner(MEDIM, MEDIM); - P.topLeftCorner(MEDIM, MEDIM) = (F_main * P.topLeftCorner(MEDIM, MEDIM)) * F_main.transpose(); - P.topRightCorner(MEDIM, EDIM - MEDIM) = F_main * P.topRightCorner(MEDIM, EDIM - MEDIM); - P.bottomLeftCorner(EDIM - MEDIM, MEDIM) = P.bottomLeftCorner(EDIM - MEDIM, MEDIM) * F_main.transpose(); - - P = P + dt*Q; - - // copy out state - memcpy(in_x, nx, DIM * sizeof(double)); - memcpy(in_P, P.data(), EDIM * EDIM * sizeof(double)); -} - -// note: extra_args dim only correct when null space projecting -// otherwise 1 -template -void update(double *in_x, double *in_P, Hfun h_fun, Hfun H_fun, Hfun Hea_fun, double *in_z, double *in_R, double *in_ea, double MAHA_THRESHOLD) { - typedef Eigen::Matrix ZZM; - typedef Eigen::Matrix ZDM; - typedef Eigen::Matrix ZEM; - typedef Eigen::Matrix XEM; - typedef Eigen::Matrix EZM; - typedef Eigen::Matrix X1M; - typedef Eigen::Matrix XXM; - - double in_hx[ZDIM] = {0}; - double in_H[ZDIM * DIM] = {0}; - double in_H_mod[EDIM * DIM] = {0}; - double delta_x[EDIM] = {0}; - double x_new[DIM] = {0}; - - - // state x, P - Eigen::Matrix z(in_z); - EEM P(in_P); - ZZM pre_R(in_R); - - // functions from sympy - h_fun(in_x, in_ea, in_hx); - H_fun(in_x, in_ea, in_H); - ZDM pre_H(in_H); - - // get y (y = z - hx) - Eigen::Matrix pre_y(in_hx); pre_y = z - pre_y; - X1M y; XXM H; XXM R; - if (Hea_fun){ - typedef Eigen::Matrix ZAM; - double in_Hea[ZDIM * EADIM] = {0}; - Hea_fun(in_x, in_ea, in_Hea); - ZAM Hea(in_Hea); - XXM A = Hea.transpose().fullPivLu().kernel(); - - - y = A.transpose() * pre_y; - H = A.transpose() * pre_H; - R = A.transpose() * pre_R * A; - } else { - y = pre_y; - H = pre_H; - R = pre_R; - } - // get modified H - H_mod_fun(in_x, in_H_mod); - DEM H_mod(in_H_mod); - XEM H_err = H * H_mod; - - // Do mahalobis distance test - if (MAHA_TEST){ - XXM a = (H_err * P * H_err.transpose() + R).inverse(); - double maha_dist = y.transpose() * a * y; - if (maha_dist > MAHA_THRESHOLD){ - R = 1.0e16 * R; - } - } - - // Outlier resilient weighting - double weight = 1;//(1.5)/(1 + y.squaredNorm()/R.sum()); - - // kalman gains and I_KH - XXM S = ((H_err * P) * H_err.transpose()) + R/weight; - XEM KT = S.fullPivLu().solve(H_err * P.transpose()); - //EZM K = KT.transpose(); TODO: WHY DOES THIS NOT COMPILE? - //EZM K = S.fullPivLu().solve(H_err * P.transpose()).transpose(); - //std::cout << "Here is the matrix rot:\n" << K << std::endl; - EEM I_KH = Eigen::Matrix::Identity() - (KT.transpose() * H_err); - - // update state by injecting dx - Eigen::Matrix dx(delta_x); - dx = (KT.transpose() * y); - memcpy(delta_x, dx.data(), EDIM * sizeof(double)); - err_fun(in_x, delta_x, x_new); - Eigen::Matrix x(x_new); - - // update cov - P = ((I_KH * P) * I_KH.transpose()) + ((KT.transpose() * R) * KT); - - // copy out state - memcpy(in_x, x.data(), DIM * sizeof(double)); - memcpy(in_P, P.data(), EDIM * EDIM * sizeof(double)); - memcpy(in_z, y.data(), y.rows() * sizeof(double)); -} - - diff --git a/selfdrive/locationd/kalman/ekf_sym.py b/selfdrive/locationd/kalman/ekf_sym.py deleted file mode 100644 index a1f282ab05..0000000000 --- a/selfdrive/locationd/kalman/ekf_sym.py +++ /dev/null @@ -1,562 +0,0 @@ -import os -from bisect import bisect_right -import sympy as sp -import numpy as np -from numpy import dot -from common.ffi_wrapper import compile_code, wrap_compiled -from common.sympy_helpers import sympy_into_c -from chi2_lookup import chi2_ppf - - -EXTERNAL_PATH = os.path.dirname(os.path.abspath(__file__)) - -def solve(a, b): - if a.shape[0] == 1 and a.shape[1] == 1: - #assert np.allclose(b/a[0][0], np.linalg.solve(a, b)) - return b/a[0][0] - else: - return np.linalg.solve(a, b) - -def null(H, eps=1e-12): - u, s, vh = np.linalg.svd(H) - padding = max(0,np.shape(H)[1]-np.shape(s)[0]) - null_mask = np.concatenate(((s <= eps), np.ones((padding,),dtype=bool)),axis=0) - null_space = np.compress(null_mask, vh, axis=0) - return np.transpose(null_space) - -def gen_code(name, f_sym, dt_sym, x_sym, obs_eqs, dim_x, dim_err, eskf_params=None, msckf_params=None, maha_test_kinds=[]): - # optional state transition matrix, H modifier - # and err_function if an error-state kalman filter (ESKF) - # is desired. Best described in "Quaternion kinematics - # for the error-state Kalman filter" by Joan Sola - - if eskf_params: - err_eqs = eskf_params[0] - inv_err_eqs = eskf_params[1] - H_mod_sym = eskf_params[2] - f_err_sym = eskf_params[3] - x_err_sym = eskf_params[4] - else: - nom_x = sp.MatrixSymbol('nom_x',dim_x,1) - true_x = sp.MatrixSymbol('true_x',dim_x,1) - delta_x = sp.MatrixSymbol('delta_x',dim_x,1) - err_function_sym = sp.Matrix(nom_x + delta_x) - inv_err_function_sym = sp.Matrix(true_x - nom_x) - err_eqs = [err_function_sym, nom_x, delta_x] - inv_err_eqs = [inv_err_function_sym, nom_x, true_x] - - H_mod_sym = sp.Matrix(np.eye(dim_x)) - f_err_sym = f_sym - x_err_sym = x_sym - - # This configures the multi-state augmentation - # needed for EKF-SLAM with MSCKF (Mourikis et al 2007) - if msckf_params: - msckf = True - dim_main = msckf_params[0] # size of the main state - dim_augment = msckf_params[1] # size of one augment state chunk - dim_main_err = msckf_params[2] - dim_augment_err = msckf_params[3] - N = msckf_params[4] - feature_track_kinds = msckf_params[5] - assert dim_main + dim_augment*N == dim_x - assert dim_main_err + dim_augment_err*N == dim_err - else: - msckf = False - dim_main = dim_x - dim_augment = 0 - dim_main_err = dim_err - dim_augment_err = 0 - N = 0 - - # linearize with jacobians - F_sym = f_err_sym.jacobian(x_err_sym) - for sym in x_err_sym: - F_sym = F_sym.subs(sym, 0) - for i in xrange(len(obs_eqs)): - obs_eqs[i].append(obs_eqs[i][0].jacobian(x_sym)) - if msckf and obs_eqs[i][1] in feature_track_kinds: - obs_eqs[i].append(obs_eqs[i][0].jacobian(obs_eqs[i][2])) - else: - obs_eqs[i].append(None) - - # collect sympy functions - sympy_functions = [] - - # error functions - sympy_functions.append(('err_fun', err_eqs[0], [err_eqs[1], err_eqs[2]])) - sympy_functions.append(('inv_err_fun', inv_err_eqs[0], [inv_err_eqs[1], inv_err_eqs[2]])) - - # H modifier for ESKF updates - sympy_functions.append(('H_mod_fun', H_mod_sym, [x_sym])) - - # state propagation function - sympy_functions.append(('f_fun', f_sym, [x_sym, dt_sym])) - sympy_functions.append(('F_fun', F_sym, [x_sym, dt_sym])) - - # observation functions - for h_sym, kind, ea_sym, H_sym, He_sym in obs_eqs: - sympy_functions.append(('h_%d' % kind, h_sym, [x_sym, ea_sym])) - sympy_functions.append(('H_%d' % kind, H_sym, [x_sym, ea_sym])) - if msckf and kind in feature_track_kinds: - sympy_functions.append(('He_%d' % kind, He_sym, [x_sym, ea_sym])) - - # Generate and wrap all th c code - header, code = sympy_into_c(sympy_functions) - extra_header = "#define DIM %d\n" % dim_x - extra_header += "#define EDIM %d\n" % dim_err - extra_header += "#define MEDIM %d\n" % dim_main_err - extra_header += "typedef void (*Hfun)(double *, double *, double *);\n" - - extra_header += "\nvoid predict(double *x, double *P, double *Q, double dt);" - - extra_post = "" - - for h_sym, kind, ea_sym, H_sym, He_sym in obs_eqs: - if msckf and kind in feature_track_kinds: - He_str = 'He_%d' % kind - # ea_dim = ea_sym.shape[0] - else: - He_str = 'NULL' - # ea_dim = 1 # not really dim of ea but makes c function work - maha_thresh = chi2_ppf(0.95, int(h_sym.shape[0])) # mahalanobis distance for outlier detection - maha_test = kind in maha_test_kinds - extra_post += """ - void update_%d(double *in_x, double *in_P, double *in_z, double *in_R, double *in_ea) { - update<%d,%d,%d>(in_x, in_P, h_%d, H_%d, %s, in_z, in_R, in_ea, MAHA_THRESH_%d); - } - """ % (kind, h_sym.shape[0], 3, maha_test, kind, kind, He_str, kind) - extra_header += "\nconst static double MAHA_THRESH_%d = %f;" % (kind, maha_thresh) - extra_header += "\nvoid update_%d(double *, double *, double *, double *, double *);" % kind - - code += "\n" + extra_header - code += "\n" + open(os.path.join(EXTERNAL_PATH, "ekf_c.c")).read() - code += "\n" + extra_post - header += "\n" + extra_header - compile_code(name, code, header, EXTERNAL_PATH) - -class EKF_sym(object): - def __init__(self, name, Q, x_initial, P_initial, dim_main, dim_main_err, - N=0, dim_augment=0, dim_augment_err=0, maha_test_kinds=[]): - ''' - Generates process function and all - observation functions for the kalman - filter. - ''' - if N > 0: - self.msckf = True - else: - self.msckf = False - self.N = N - self.dim_augment = dim_augment - self.dim_augment_err = dim_augment_err - self.dim_main = dim_main - self.dim_main_err = dim_main_err - - # state - x_initial = x_initial.reshape((-1, 1)) - self.dim_x = x_initial.shape[0] - self.dim_err = P_initial.shape[0] - assert dim_main + dim_augment*N == self.dim_x - assert dim_main_err + dim_augment_err*N == self.dim_err - - # kinds that should get mahalanobis distance - # tested for outlier rejection - self.maha_test_kinds = maha_test_kinds - - # process noise - self.Q = Q - - # rewind stuff - self.rewind_t = [] - self.rewind_states = [] - self.rewind_obscache = [] - self.init_state(x_initial, P_initial, None) - - ffi, lib = wrap_compiled(name, EXTERNAL_PATH) - kinds, self.feature_track_kinds = [], [] - for func in dir(lib): - if func[:2] == 'h_': - kinds.append(int(func[2:])) - if func[:3] == 'He_': - self.feature_track_kinds.append(int(func[3:])) - - # wrap all the sympy functions - def wrap_1lists(name): - func = eval("lib.%s" % name, {"lib":lib}) - def ret(lst1, out): - func(ffi.cast("double *", lst1.ctypes.data), - ffi.cast("double *", out.ctypes.data)) - return ret - def wrap_2lists(name): - func = eval("lib.%s" % name, {"lib":lib}) - def ret(lst1, lst2, out): - func(ffi.cast("double *", lst1.ctypes.data), - ffi.cast("double *", lst2.ctypes.data), - ffi.cast("double *", out.ctypes.data)) - return ret - def wrap_1list_1float(name): - func = eval("lib.%s" % name, {"lib":lib}) - def ret(lst1, fl, out): - func(ffi.cast("double *", lst1.ctypes.data), - ffi.cast("double", fl), - ffi.cast("double *", out.ctypes.data)) - return ret - - self.f = wrap_1list_1float("f_fun") - self.F = wrap_1list_1float("F_fun") - - self.err_function = wrap_2lists("err_fun") - self.inv_err_function = wrap_2lists("inv_err_fun") - self.H_mod = wrap_1lists("H_mod_fun") - - self.hs, self.Hs, self.Hes = {}, {}, {} - for kind in kinds: - self.hs[kind] = wrap_2lists("h_%d" % kind) - self.Hs[kind] = wrap_2lists("H_%d" % kind) - if self.msckf and kind in self.feature_track_kinds: - self.Hes[kind] = wrap_2lists("He_%d" % kind) - - # wrap the C++ predict function - def _predict_blas(x, P, dt): - lib.predict(ffi.cast("double *", x.ctypes.data), - ffi.cast("double *", P.ctypes.data), - ffi.cast("double *", self.Q.ctypes.data), - ffi.cast("double", dt)) - return x, P - - # wrap the C++ update function - def fun_wrapper(f, kind): - f = eval("lib.%s" % f, {"lib": lib}) - def _update_inner_blas(x, P, z, R, extra_args): - f(ffi.cast("double *", x.ctypes.data), - ffi.cast("double *", P.ctypes.data), - ffi.cast("double *", z.ctypes.data), - ffi.cast("double *", R.ctypes.data), - ffi.cast("double *", extra_args.ctypes.data)) - if self.msckf and kind in self.feature_track_kinds: - y = z[:-len(extra_args)] - else: - y = z - return x, P, y - return _update_inner_blas - - self._updates = {} - for kind in kinds: - self._updates[kind] = fun_wrapper("update_%d" % kind, kind) - - def _update_blas(x, P, kind, z, R, extra_args=[]): - return self._updates[kind](x, P, z, R, extra_args) - - # assign the functions - self._predict = _predict_blas - #self._predict = self._predict_python - self._update = _update_blas - #self._update = self._update_python - - - def init_state(self, state, covs, filter_time): - self.x = np.array(state.reshape((-1, 1))).astype(np.float64) - self.P = np.array(covs).astype(np.float64) - self.filter_time = filter_time - self.augment_times = [0]*self.N - self.rewind_obscache = [] - self.rewind_t = [] - self.rewind_states = [] - - def augment(self): - # TODO this is not a generalized way of doing - # this and implies that the augmented states - # are simply the first (dim_augment_state) - # elements of the main state. - assert self.msckf - d1 = self.dim_main - d2 = self.dim_main_err - d3 = self.dim_augment - d4 = self.dim_augment_err - # push through augmented states - self.x[d1:-d3] = self.x[d1+d3:] - self.x[-d3:] = self.x[:d3] - assert self.x.shape == (self.dim_x, 1) - # push through augmented covs - assert self.P.shape == (self.dim_err, self.dim_err) - P_reduced = self.P - P_reduced = np.delete(P_reduced, np.s_[d2:d2+d4], axis=1) - P_reduced = np.delete(P_reduced, np.s_[d2:d2+d4], axis=0) - assert P_reduced.shape == (self.dim_err -d4, self.dim_err -d4) - to_mult = np.zeros((self.dim_err, self.dim_err - d4)) - to_mult[:-d4,:] = np.eye(self.dim_err - d4) - to_mult[-d4:,:d4] = np.eye(d4) - self.P = to_mult.dot(P_reduced.dot(to_mult.T)) - self.augment_times = self.augment_times[1:] - self.augment_times.append(self.filter_time) - assert self.P.shape == (self.dim_err, self.dim_err) - - def state(self): - return np.array(self.x).flatten() - - def covs(self): - return self.P - - def rewind(self, t): - # find where we are rewinding to - idx = bisect_right(self.rewind_t, t) - assert self.rewind_t[idx-1] <= t - assert self.rewind_t[idx] > t # must be true, or rewind wouldn't be called - - # set the state to the time right before that - self.filter_time = self.rewind_t[idx-1] - self.x[:] = self.rewind_states[idx-1][0] - self.P[:] = self.rewind_states[idx-1][1] - - # return the observations we rewound over for fast forwarding - ret = self.rewind_obscache[idx:] - - # throw away the old future - # TODO: is this making a copy? - self.rewind_t = self.rewind_t[:idx] - self.rewind_states = self.rewind_states[:idx] - self.rewind_obscache = self.rewind_obscache[:idx] - - return ret - - def checkpoint(self, obs): - # push to rewinder - self.rewind_t.append(self.filter_time) - self.rewind_states.append((np.copy(self.x), np.copy(self.P))) - self.rewind_obscache.append(obs) - - # only keep a certain number around - REWIND_TO_KEEP = 512 - self.rewind_t = self.rewind_t[-REWIND_TO_KEEP:] - self.rewind_states = self.rewind_states[-REWIND_TO_KEEP:] - self.rewind_obscache = self.rewind_obscache[-REWIND_TO_KEEP:] - - def predict_and_update_batch(self, t, kind, z, R, extra_args=[[]], augment=False): - # TODO handle rewinding at this level" - - # rewind - if t < self.filter_time: - if len(self.rewind_t) == 0 or t < self.rewind_t[0] or t < self.rewind_t[-1] -1.0: - print("observation too old at %.3f with filter at %.3f, ignoring" % (t, self.filter_time)) - return None - rewound = self.rewind(t) - else: - rewound = [] - - ret = self._predict_and_update_batch(t, kind, z, R, extra_args, augment) - - # optional fast forward - for r in rewound: - self._predict_and_update_batch(*r) - - return ret - - def _predict_and_update_batch(self, t, kind, z, R, extra_args, augment=False): - """The main kalman filter function - Predicts the state and then updates a batch of observations - - dim_x: dimensionality of the state space - dim_z: dimensionality of the observation and depends on kind - n: number of observations - - Args: - t (float): Time of observation - kind (int): Type of observation - z (vec [n,dim_z]): Measurements - R (mat [n,dim_z, dim_z]): Measurement Noise - extra_args (list, [n]): Values used in H computations - """ - # initialize time - if self.filter_time is None: - self.filter_time = t - - # predict - dt = t - self.filter_time - assert dt >= 0 - self.x, self.P = self._predict(self.x, self.P, dt) - self.filter_time = t - xk_km1, Pk_km1 = np.copy(self.x).flatten(), np.copy(self.P) - - # update batch - y = [] - for i in xrange(len(z)): - # these are from the user, so we canonicalize them - z_i = np.array(z[i], dtype=np.float64, order='F') - R_i = np.array(R[i], dtype=np.float64, order='F') - extra_args_i = np.array(extra_args[i], dtype=np.float64, order='F') - # update - self.x, self.P, y_i = self._update(self.x, self.P, kind, z_i, R_i, extra_args=extra_args_i) - y.append(y_i) - xk_k, Pk_k = np.copy(self.x).flatten(), np.copy(self.P) - - if augment: - self.augment() - - # checkpoint - self.checkpoint((t, kind, z, R, extra_args)) - - return xk_km1, xk_k, Pk_km1, Pk_k, t, kind, y, z, extra_args - - def _predict_python(self, x, P, dt): - x_new = np.zeros(x.shape, dtype=np.float64) - self.f(x, dt, x_new) - - F = np.zeros(P.shape, dtype=np.float64) - self.F(x, dt, F) - - if not self.msckf: - P = dot(dot(F, P), F.T) - else: - # Update the predicted state covariance: - # Pk+1|k = |F*Pii*FT + Q*dt F*Pij | - # |PijT*FT Pjj | - # Where F is the jacobian of the main state - # predict function, Pii is the main state's - # covariance and Q its process noise. Pij - # is the covariance between the augmented - # states and the main state. - # - d2 = self.dim_main_err # known at compile time - F_curr = F[:d2, :d2] - P[:d2, :d2] = (F_curr.dot(P[:d2, :d2])).dot(F_curr.T) - P[:d2, d2:] = F_curr.dot(P[:d2, d2:]) - P[d2:, :d2] = P[d2:, :d2].dot(F_curr.T) - - P += dt*self.Q - return x_new, P - - def _update_python(self, x, P, kind, z, R, extra_args=[]): - # init vars - z = z.reshape((-1, 1)) - h = np.zeros(z.shape, dtype=np.float64) - H = np.zeros((z.shape[0], self.dim_x), dtype=np.float64) - - # C functions - self.hs[kind](x, extra_args, h) - self.Hs[kind](x, extra_args, H) - - # y is the "loss" - y = z - h - - # *** same above this line *** - - if self.msckf and kind in self.Hes: - # Do some algebraic magic to decorrelate - He = np.zeros((z.shape[0], len(extra_args)), dtype=np.float64) - self.Hes[kind](x, extra_args, He) - - # TODO: Don't call a function here, do projection locally - A = null(He.T) - - y = A.T.dot(y) - H = A.T.dot(H) - R = A.T.dot(R.dot(A)) - - # TODO If nullspace isn't the dimension we want - if A.shape[1] + He.shape[1] != A.shape[0]: - print('Warning: null space projection failed, measurement ignored') - return x, P, np.zeros(A.shape[0] - He.shape[1]) - - # if using eskf - H_mod = np.zeros((x.shape[0], P.shape[0]), dtype=np.float64) - self.H_mod(x, H_mod) - H = H.dot(H_mod) - - # Do mahalobis distance test - # currently just runs on msckf observations - # could run on anything if needed - if self.msckf and kind in self.maha_test_kinds: - a = np.linalg.inv(H.dot(P).dot(H.T) + R) - maha_dist = y.T.dot(a.dot(y)) - if maha_dist > chi2_ppf(0.95, y.shape[0]): - R = 10e16*R - - # *** same below this line *** - - # Outlier resilient weighting as described in: - # "A Kalman Filter for Robust Outlier Detection - Jo-Anne Ting, ..." - weight = 1 #(1.5)/(1 + np.sum(y**2)/np.sum(R)) - - S = dot(dot(H, P), H.T) + R/weight - K = solve(S, dot(H, P.T)).T - I_KH = np.eye(P.shape[0]) - dot(K, H) - - # update actual state - delta_x = dot(K, y) - P = dot(dot(I_KH, P), I_KH.T) + dot(dot(K, R), K.T) - - # inject observed error into state - x_new = np.zeros(x.shape, dtype=np.float64) - self.err_function(x, delta_x, x_new) - return x_new, P, y.flatten() - - def maha_test(self, x, P, kind, z, R, extra_args=[], maha_thresh=0.95): - # init vars - z = z.reshape((-1, 1)) - h = np.zeros(z.shape, dtype=np.float64) - H = np.zeros((z.shape[0], self.dim_x), dtype=np.float64) - - # C functions - self.hs[kind](x, extra_args, h) - self.Hs[kind](x, extra_args, H) - - # y is the "loss" - y = z - h - - # if using eskf - H_mod = np.zeros((x.shape[0], P.shape[0]), dtype=np.float64) - self.H_mod(x, H_mod) - H = H.dot(H_mod) - - a = np.linalg.inv(H.dot(P).dot(H.T) + R) - maha_dist = y.T.dot(a.dot(y)) - if maha_dist > chi2_ppf(maha_thresh, y.shape[0]): - return False - else: - return True - - - - - def rts_smooth(self, estimates, norm_quats=False): - ''' - Returns rts smoothed results of - kalman filter estimates - - If the kalman state is augmented with - old states only the main state is smoothed - ''' - xk_n = estimates[-1][0] - Pk_n = estimates[-1][2] - Fk_1 = np.zeros(Pk_n.shape, dtype=np.float64) - - states_smoothed = [xk_n] - covs_smoothed = [Pk_n] - for k in xrange(len(estimates) - 2, -1, -1): - xk1_n = xk_n - if norm_quats: - xk1_n[3:7] /= np.linalg.norm(xk1_n[3:7]) - Pk1_n = Pk_n - - xk1_k, _, Pk1_k, _, t2, _, _, _, _ = estimates[k + 1] - _, xk_k, _, Pk_k, t1, _, _, _, _ = estimates[k] - dt = t2 - t1 - self.F(xk_k, dt, Fk_1) - - d1 = self.dim_main - d2 = self.dim_main_err - Ck = np.linalg.solve(Pk1_k[:d2,:d2], Fk_1[:d2,:d2].dot(Pk_k[:d2,:d2].T)).T - xk_n = xk_k - delta_x = np.zeros((Pk_n.shape[0], 1), dtype=np.float64) - self.inv_err_function(xk1_k, xk1_n, delta_x) - delta_x[:d2] = Ck.dot(delta_x[:d2]) - x_new = np.zeros((xk_n.shape[0], 1), dtype=np.float64) - self.err_function(xk_k, delta_x, x_new) - xk_n[:d1] = x_new[:d1,0] - Pk_n = Pk_k - Pk_n[:d2,:d2] = Pk_k[:d2,:d2] + Ck.dot(Pk1_n[:d2,:d2] - Pk1_k[:d2,:d2]).dot(Ck.T) - states_smoothed.append(xk_n) - covs_smoothed.append(Pk_n) - - return np.flipud(np.vstack(states_smoothed)), np.stack(covs_smoothed, 0)[::-1] diff --git a/selfdrive/locationd/kalman/kalman_helpers.py b/selfdrive/locationd/kalman/kalman_helpers.py deleted file mode 100644 index ded1fd3fd3..0000000000 --- a/selfdrive/locationd/kalman/kalman_helpers.py +++ /dev/null @@ -1,165 +0,0 @@ -import numpy as np -import os -from bisect import bisect -from tqdm import tqdm - - -class ObservationKind(object): - UNKNOWN = 0 - NO_OBSERVATION = 1 - GPS_NED = 2 - ODOMETRIC_SPEED = 3 - PHONE_GYRO = 4 - GPS_VEL = 5 - PSEUDORANGE_GPS = 6 - PSEUDORANGE_RATE_GPS = 7 - SPEED = 8 - NO_ROT = 9 - PHONE_ACCEL = 10 - ORB_POINT = 11 - ECEF_POS = 12 - CAMERA_ODO_TRANSLATION = 13 - CAMERA_ODO_ROTATION = 14 - ORB_FEATURES = 15 - MSCKF_TEST = 16 - FEATURE_TRACK_TEST = 17 - LANE_PT = 18 - IMU_FRAME = 19 - PSEUDORANGE_GLONASS = 20 - PSEUDORANGE_RATE_GLONASS = 21 - PSEUDORANGE = 22 - PSEUDORANGE_RATE = 23 - - names = ['Unknown', - 'No observation', - 'GPS NED', - 'Odometric speed', - 'Phone gyro', - 'GPS velocity', - 'GPS pseudorange', - 'GPS pseudorange rate', - 'Speed', - 'No rotation', - 'Phone acceleration', - 'ORB point', - 'ECEF pos', - 'camera odometric translation', - 'camera odometric rotation', - 'ORB features', - 'MSCKF test', - 'Feature track test', - 'Lane ecef point', - 'imu frame eulers', - 'GLONASS pseudorange', - 'GLONASS pseudorange rate'] - - @classmethod - def to_string(cls, kind): - return cls.names[kind] - - - -SAT_OBS = [ObservationKind.PSEUDORANGE_GPS, - ObservationKind.PSEUDORANGE_RATE_GPS, - ObservationKind.PSEUDORANGE_GLONASS, - ObservationKind.PSEUDORANGE_RATE_GLONASS] - - -def run_car_ekf_offline(kf, observations_by_kind): - from laika.raw_gnss import GNSSMeasurement # pylint: disable=import-error - observations = [] - # create list of observations with element format: [kind, time, data] - for kind in observations_by_kind: - for t, data in zip(observations_by_kind[kind][0], observations_by_kind[kind][1]): - observations.append([t, kind, data]) - observations.sort(key=lambda obs: obs[0]) - - times, estimates = run_observations_through_filter(kf, observations) - - forward_states = np.stack(e[1] for e in estimates) - forward_covs = np.stack(e[3] for e in estimates) - smoothed_states, smoothed_covs = kf.rts_smooth(estimates) - - observations_dict = {} - # TODO assuming observations and estimates - # are same length may not work with VO - for e in estimates: - t = e[4] - kind = str(int(e[5])) - res = e[6] - z = e[7] - ea = e[8] - if len(z) == 0: - continue - if kind not in observations_dict: - observations_dict[kind] = {} - observations_dict[kind]['t'] = np.array(len(z)*[t]) - observations_dict[kind]['z'] = np.array(z) - observations_dict[kind]['ea'] = np.array(ea) - observations_dict[kind]['residual'] = np.array(res) - else: - observations_dict[kind]['t'] = np.append(observations_dict[kind]['t'], np.array(len(z)*[t])) - observations_dict[kind]['z'] = np.vstack((observations_dict[kind]['z'], np.array(z))) - observations_dict[kind]['ea'] = np.vstack((observations_dict[kind]['ea'], np.array(ea))) - observations_dict[kind]['residual'] = np.vstack((observations_dict[kind]['residual'], np.array(res))) - - # add svIds to gnss data - for kind in map(str, SAT_OBS): - if int(kind) in observations_by_kind and kind in observations_dict: - observations_dict[kind]['svIds'] = np.array([]) - observations_dict[kind]['CNO'] = np.array([]) - observations_dict[kind]['std'] = np.array([]) - for obs in observations_by_kind[int(kind)][1]: - observations_dict[kind]['svIds'] = np.append(observations_dict[kind]['svIds'], - np.array([obs[:,GNSSMeasurement.PRN]])) - observations_dict[kind]['std'] = np.append(observations_dict[kind]['std'], - np.array([obs[:,GNSSMeasurement.PR_STD]])) - return smoothed_states, smoothed_covs, forward_states, forward_covs, times, observations_dict - - -def run_observations_through_filter(kf, observations, filter_time=None): - estimates = [] - - for obs in tqdm(observations): - t = obs[0] - kind = obs[1] - data = obs[2] - estimates.append(kf.predict_and_observe(t, kind, data)) - times = [x[4] for x in estimates] - return times, estimates - - -def save_residuals_plot(obs, save_path, data_name): - import matplotlib.pyplot as plt - import mpld3 # pylint: disable=import-error - fig = plt.figure(figsize=(10,20)) - fig.suptitle('Residuals of ' + data_name, fontsize=24) - n = len(obs.keys()) - start_times = [obs[kind]['t'][0] for kind in obs] - start_time = min(start_times) - xlims = [start_time + 3, start_time + 60] - - for i, kind in enumerate(obs): - ax = fig.add_subplot(n, 1, i+1) - ax.set_xlim(xlims) - t = obs[kind]['t'] - res = obs[kind]['residual'] - start_idx = bisect(t, xlims[0]) - if len(res) == start_idx: - continue - ylim = max(np.linalg.norm(res[start_idx:], axis=1)) - ax.set_ylim([-ylim, ylim]) - if int(kind) in SAT_OBS: - svIds = obs[kind]['svIds'] - for svId in set(svIds): - svId_idx = (svIds == svId) - t = obs[kind]['t'][svId_idx] - res = obs[kind]['residual'][svId_idx] - ax.plot(t, res, label='SV ' + str(int(svId))) - ax.legend(loc='right') - else: - ax.plot(t, res) - plt.title('Residual of kind ' + ObservationKind.to_string(int(kind)), fontsize=20) - plt.tight_layout() - os.makedirs(save_path) - mpld3.save_html(fig, save_path + 'residuals_plot.html') diff --git a/selfdrive/locationd/kalman/loc_local_kf.py b/selfdrive/locationd/kalman/loc_local_kf.py deleted file mode 100755 index 331b7fee6f..0000000000 --- a/selfdrive/locationd/kalman/loc_local_kf.py +++ /dev/null @@ -1,128 +0,0 @@ -#!/usr/bin/env python -import numpy as np -from selfdrive.locationd.kalman import loc_local_model - -from selfdrive.locationd.kalman.kalman_helpers import ObservationKind -from selfdrive.locationd.kalman.ekf_sym import EKF_sym - - - -class States(object): - VELOCITY = slice(0,3) # device frame velocity in m/s - ANGULAR_VELOCITY = slice(3, 6) # roll, pitch and yaw rates in device frame in radians/s - GYRO_BIAS = slice(6, 9) # roll, pitch and yaw biases - ODO_SCALE = slice(9, 10) # odometer scale - ACCELERATION = slice(10, 13) # Acceleration in device frame in m/s**2 - - -class LocLocalKalman(object): - def __init__(self): - x_initial = np.array([0, 0, 0, - 0, 0, 0, - 0, 0, 0, - 1, - 0, 0, 0]) - - # state covariance - P_initial = np.diag([10**2, 10**2, 10**2, - 1**2, 1**2, 1**2, - 0.05**2, 0.05**2, 0.05**2, - 0.02**2, - 1**2, 1**2, 1**2]) - - # process noise - Q = np.diag([0.0**2, 0.0**2, 0.0**2, - .01**2, .01**2, .01**2, - (0.005/100)**2, (0.005/100)**2, (0.005/100)**2, - (0.02/100)**2, - 3**2, 3**2, 3**2]) - - self.obs_noise = {ObservationKind.ODOMETRIC_SPEED: np.atleast_2d(0.2**2), - ObservationKind.PHONE_GYRO: np.diag([0.025**2, 0.025**2, 0.025**2])} - - # MSCKF stuff - self.dim_state = len(x_initial) - self.dim_main = self.dim_state - - name = 'loc_local' - loc_local_model.gen_model(name, self.dim_state) - - # init filter - self.filter = EKF_sym(name, Q, x_initial, P_initial, self.dim_main, self.dim_main) - - @property - def x(self): - return self.filter.state() - - @property - def t(self): - return self.filter.filter_time - - @property - def P(self): - return self.filter.covs() - - def predict(self, t): - if self.t: - # Does NOT modify filter state - return self.filter._predict(self.x, self.P, t - self.t)[0] - else: - raise RuntimeError("Request predict on filter with uninitialized time") - - def rts_smooth(self, estimates): - return self.filter.rts_smooth(estimates, norm_quats=True) - - - def init_state(self, state, covs_diag=None, covs=None, filter_time=None): - if covs_diag is not None: - P = np.diag(covs_diag) - elif covs is not None: - P = covs - else: - P = self.filter.covs() - self.filter.init_state(state, P, filter_time) - - def predict_and_observe(self, t, kind, data): - if len(data) > 0: - data = np.atleast_2d(data) - if kind == ObservationKind.CAMERA_ODO_TRANSLATION: - r = self.predict_and_update_odo_trans(data, t, kind) - elif kind == ObservationKind.CAMERA_ODO_ROTATION: - r = self.predict_and_update_odo_rot(data, t, kind) - elif kind == ObservationKind.ODOMETRIC_SPEED: - r = self.predict_and_update_odo_speed(data, t, kind) - else: - r = self.filter.predict_and_update_batch(t, kind, data, self.get_R(kind, len(data))) - return r - - def get_R(self, kind, n): - obs_noise = self.obs_noise[kind] - dim = obs_noise.shape[0] - R = np.zeros((n, dim, dim)) - for i in xrange(n): - R[i,:,:] = obs_noise - return R - - def predict_and_update_odo_speed(self, speed, t, kind): - z = np.array(speed) - R = np.zeros((len(speed), 1, 1)) - for i, _ in enumerate(z): - R[i,:,:] = np.diag([0.2**2]) - return self.filter.predict_and_update_batch(t, kind, z, R) - - def predict_and_update_odo_trans(self, trans, t, kind): - z = trans[:,:3] - R = np.zeros((len(trans), 3, 3)) - for i, _ in enumerate(z): - R[i,:,:] = np.diag(trans[i,3:]**2) - return self.filter.predict_and_update_batch(t, kind, z, R) - - def predict_and_update_odo_rot(self, rot, t, kind): - z = rot[:,:3] - R = np.zeros((len(rot), 3, 3)) - for i, _ in enumerate(z): - R[i,:,:] = np.diag(rot[i,3:]**2) - return self.filter.predict_and_update_batch(t, kind, z, R) - -if __name__ == "__main__": - LocLocalKalman() diff --git a/selfdrive/locationd/kalman/loc_local_model.py b/selfdrive/locationd/kalman/loc_local_model.py deleted file mode 100644 index bc80d9911f..0000000000 --- a/selfdrive/locationd/kalman/loc_local_model.py +++ /dev/null @@ -1,80 +0,0 @@ -import numpy as np -import sympy as sp -import os - -from selfdrive.locationd.kalman.kalman_helpers import ObservationKind -from selfdrive.locationd.kalman.ekf_sym import gen_code - - -def gen_model(name, dim_state): - - # check if rebuild is needed - try: - dir_path = os.path.dirname(__file__) - deps = [dir_path + '/' + 'ekf_c.c', - dir_path + '/' + 'ekf_sym.py', - dir_path + '/' + 'loc_local_model.py', - dir_path + '/' + 'loc_local_kf.py'] - - outs = [dir_path + '/' + name + '.o', - dir_path + '/' + name + '.so', - dir_path + '/' + name + '.cpp'] - out_times = map(os.path.getmtime, outs) - dep_times = map(os.path.getmtime, deps) - rebuild = os.getenv("REBUILD", False) - if min(out_times) > max(dep_times) and not rebuild: - return - map(os.remove, outs) - except OSError: - pass - - # make functions and jacobians with sympy - # state variables - state_sym = sp.MatrixSymbol('state', dim_state, 1) - state = sp.Matrix(state_sym) - v = state[0:3,:] - omega = state[3:6,:] - vroll, vpitch, vyaw = omega - vx, vy, vz = v - roll_bias, pitch_bias, yaw_bias = state[6:9,:] - odo_scale = state[9,:] - accel = state[10:13,:] - - dt = sp.Symbol('dt') - - # Time derivative of the state as a function of state - state_dot = sp.Matrix(np.zeros((dim_state, 1))) - state_dot[:3,:] = accel - - # Basic descretization, 1st order intergrator - # Can be pretty bad if dt is big - f_sym = sp.Matrix(state + dt*state_dot) - - # - # Observation functions - # - - # extra args - #imu_rot = euler_rotate(*imu_angles) - #h_gyro_sym = imu_rot*sp.Matrix([vroll + roll_bias, - # vpitch + pitch_bias, - # vyaw + yaw_bias]) - h_gyro_sym = sp.Matrix([vroll + roll_bias, - vpitch + pitch_bias, - vyaw + yaw_bias]) - - speed = vx**2 + vy**2 + vz**2 - h_speed_sym = sp.Matrix([sp.sqrt(speed)*odo_scale]) - - h_relative_motion = sp.Matrix(v) - h_phone_rot_sym = sp.Matrix([vroll, - vpitch, - vyaw]) - - - obs_eqs = [[h_speed_sym, ObservationKind.ODOMETRIC_SPEED, None], - [h_gyro_sym, ObservationKind.PHONE_GYRO, None], - [h_phone_rot_sym, ObservationKind.NO_ROT, None], - [h_relative_motion, ObservationKind.CAMERA_ODO_TRANSLATION, None], - [h_phone_rot_sym, ObservationKind.CAMERA_ODO_ROTATION, None]] - gen_code(name, f_sym, dt, state_sym, obs_eqs, dim_state, dim_state) diff --git a/selfdrive/locationd/locationd_local.py b/selfdrive/locationd/locationd_local.py deleted file mode 100755 index 627f873032..0000000000 --- a/selfdrive/locationd/locationd_local.py +++ /dev/null @@ -1,285 +0,0 @@ -#!/usr/bin/env python -import os -import zmq -import math -import json - -os.environ["OMP_NUM_THREADS"] = "1" -import numpy as np -from bisect import bisect_right - -from cereal import car -from common.params import Params -from common.numpy_fast import clip -import selfdrive.messaging as messaging -from selfdrive.swaglog import cloudlog -from selfdrive.controls.lib.vehicle_model import VehicleModel -from selfdrive.services import service_list -from selfdrive.locationd.kalman.loc_local_kf import LocLocalKalman -from selfdrive.locationd.kalman.kalman_helpers import ObservationKind - -DEBUG = False -kf = LocLocalKalman() # Make sure that model is generated on import time - -MAX_ANGLE_OFFSET = math.radians(10.) -MAX_ANGLE_OFFSET_TH = math.radians(9.) -MIN_STIFFNESS = 0.5 -MAX_STIFFNESS = 2.0 -MIN_SR = 0.5 -MAX_SR = 2.0 -MIN_SR_TH = 0.55 -MAX_SR_TH = 1.9 - -LEARNING_RATE = 3 - - -class Localizer(object): - def __init__(self, disabled_logs=None, dog=None): - self.kf = LocLocalKalman() - self.reset_kalman() - - self.sensor_data_t = 0.0 - self.max_age = .2 # seconds - self.calibration_valid = False - - if disabled_logs is None: - self.disabled_logs = list() - else: - self.disabled_logs = disabled_logs - - def reset_kalman(self): - self.filter_time = None - self.observation_buffer = [] - self.converter = None - self.speed_counter = 0 - self.sensor_counter = 0 - - def liveLocationMsg(self, time): - fix = messaging.log.KalmanOdometry.new_message() - - predicted_state = self.kf.x - fix.trans = [float(predicted_state[0]), float(predicted_state[1]), float(predicted_state[2])] - fix.rot = [float(predicted_state[3]), float(predicted_state[4]), float(predicted_state[5])] - - return fix - - def update_kalman(self, time, kind, meas): - idx = bisect_right([x[0] for x in self.observation_buffer], time) - self.observation_buffer.insert(idx, (time, kind, meas)) - while self.observation_buffer[-1][0] - self.observation_buffer[0][0] > self.max_age: - self.kf.predict_and_observe(*self.observation_buffer.pop(0)) - - def handle_cam_odo(self, log, current_time): - self.update_kalman(current_time, ObservationKind.CAMERA_ODO_ROTATION, np.concatenate([log.cameraOdometry.rot, - log.cameraOdometry.rotStd])) - self.update_kalman(current_time, ObservationKind.CAMERA_ODO_TRANSLATION, np.concatenate([log.cameraOdometry.trans, - log.cameraOdometry.transStd])) - - def handle_controls_state(self, log, current_time): - self.speed_counter += 1 - if self.speed_counter % 5 == 0: - self.update_kalman(current_time, ObservationKind.ODOMETRIC_SPEED, np.array([log.controlsState.vEgo])) - - def handle_sensors(self, log, current_time): - for sensor_reading in log.sensorEvents: - # TODO does not yet account for double sensor readings in the log - if sensor_reading.type == 4: - self.sensor_counter += 1 - if self.sensor_counter % LEARNING_RATE == 0: - self.update_kalman(current_time, ObservationKind.PHONE_GYRO, [-sensor_reading.gyro.v[2], -sensor_reading.gyro.v[1], -sensor_reading.gyro.v[0]]) - - def handle_log(self, log): - current_time = 1e-9 * log.logMonoTime - typ = log.which - if typ in self.disabled_logs: - return - if typ == "sensorEvents": - self.sensor_data_t = current_time - self.handle_sensors(log, current_time) - elif typ == "controlsState": - self.handle_controls_state(log, current_time) - elif typ == "cameraOdometry": - self.handle_cam_odo(log, current_time) - - -class ParamsLearner(object): - def __init__(self, VM, angle_offset=0., stiffness_factor=1.0, steer_ratio=None, learning_rate=1.0): - self.VM = VM - - self.ao = math.radians(angle_offset) - self.slow_ao = math.radians(angle_offset) - self.x = stiffness_factor - self.sR = VM.sR if steer_ratio is None else steer_ratio - self.MIN_SR = MIN_SR * self.VM.sR - self.MAX_SR = MAX_SR * self.VM.sR - self.MIN_SR_TH = MIN_SR_TH * self.VM.sR - self.MAX_SR_TH = MAX_SR_TH * self.VM.sR - - self.alpha1 = 0.01 * learning_rate - self.alpha2 = 0.0005 * learning_rate - self.alpha3 = 0.1 * learning_rate - self.alpha4 = 1.0 * learning_rate - - def get_values(self): - return { - 'angleOffsetAverage': math.degrees(self.slow_ao), - 'stiffnessFactor': self.x, - 'steerRatio': self.sR, - } - - def update(self, psi, u, sa): - cF0 = self.VM.cF - cR0 = self.VM.cR - aR = self.VM.aR - aF = self.VM.aF - l = self.VM.l - m = self.VM.m - - x = self.x - ao = self.ao - sR = self.sR - - # Gradient descent: learn angle offset, tire stiffness and steer ratio. - if u > 10.0 and abs(math.degrees(sa)) < 15.: - self.ao -= self.alpha1 * 2.0*cF0*cR0*l*u*x*(1.0*cF0*cR0*l*u*x*(ao - sa) + psi*sR*(cF0*cR0*l**2*x - m*u**2*(aF*cF0 - aR*cR0)))/(sR**2*(cF0*cR0*l**2*x - m*u**2*(aF*cF0 - aR*cR0))**2) - - ao = self.slow_ao - self.slow_ao -= self.alpha2 * 2.0*cF0*cR0*l*u*x*(1.0*cF0*cR0*l*u*x*(ao - sa) + psi*sR*(cF0*cR0*l**2*x - m*u**2*(aF*cF0 - aR*cR0)))/(sR**2*(cF0*cR0*l**2*x - m*u**2*(aF*cF0 - aR*cR0))**2) - - self.x -= self.alpha3 * -2.0*cF0*cR0*l*m*u**3*(ao - sa)*(aF*cF0 - aR*cR0)*(1.0*cF0*cR0*l*u*x*(ao - sa) + psi*sR*(cF0*cR0*l**2*x - m*u**2*(aF*cF0 - aR*cR0)))/(sR**2*(cF0*cR0*l**2*x - m*u**2*(aF*cF0 - aR*cR0))**3) - - self.sR -= self.alpha4 * -2.0*cF0*cR0*l*u*x*(ao - sa)*(1.0*cF0*cR0*l*u*x*(ao - sa) + psi*sR*(cF0*cR0*l**2*x - m*u**2*(aF*cF0 - aR*cR0)))/(sR**3*(cF0*cR0*l**2*x - m*u**2*(aF*cF0 - aR*cR0))**2) - - if DEBUG: - # s1 = "Measured yaw rate % .6f" % psi - # ao = 0. - # s2 = "Uncompensated yaw % .6f" % (1.0*u*(-ao + sa)/(l*sR*(1 - m*u**2*(aF*cF0*x - aR*cR0*x)/(cF0*cR0*l**2*x**2)))) - # instant_ao = aF*m*psi*sR*u/(cR0*l*x) - aR*m*psi*sR*u/(cF0*l*x) - l*psi*sR/u + sa - s4 = "Instant AO: % .2f Avg. AO % .2f" % (math.degrees(self.ao), math.degrees(self.slow_ao)) - s5 = "Stiffnes: % .3f x" % self.x - print("{0} {1}".format(s4, s5)) - - - self.ao = clip(self.ao, -MAX_ANGLE_OFFSET, MAX_ANGLE_OFFSET) - self.slow_ao = clip(self.slow_ao, -MAX_ANGLE_OFFSET, MAX_ANGLE_OFFSET) - self.x = clip(self.x, MIN_STIFFNESS, MAX_STIFFNESS) - self.sR = clip(self.sR, self.MIN_SR, self.MAX_SR) - - # don't check stiffness for validity, as it can change quickly if sR is off - valid = abs(self.slow_ao) < MAX_ANGLE_OFFSET_TH and \ - self.sR > self.MIN_SR_TH and self.sR < self.MAX_SR_TH - - return valid - - -def locationd_thread(gctx, addr, disabled_logs): - ctx = zmq.Context() - poller = zmq.Poller() - - controls_state_socket = messaging.sub_sock(ctx, service_list['controlsState'].port, poller, addr=addr, conflate=True) - sensor_events_socket = messaging.sub_sock(ctx, service_list['sensorEvents'].port, poller, addr=addr, conflate=True) - camera_odometry_socket = messaging.sub_sock(ctx, service_list['cameraOdometry'].port, poller, addr=addr, conflate=True) - - kalman_odometry_socket = messaging.pub_sock(ctx, service_list['kalmanOdometry'].port) - live_parameters_socket = messaging.pub_sock(ctx, service_list['liveParameters'].port) - - params_reader = Params() - cloudlog.info("Parameter learner is waiting for CarParams") - CP = car.CarParams.from_bytes(params_reader.get("CarParams", block=True)) - VM = VehicleModel(CP) - cloudlog.info("Parameter learner got CarParams: %s" % CP.carFingerprint) - - params = params_reader.get("LiveParameters") - - # Check if car model matches - if params is not None: - params = json.loads(params) - if (params.get('carFingerprint', None) != CP.carFingerprint) or (params.get('carVin', CP.carVin) != CP.carVin): - cloudlog.info("Parameter learner found parameters for wrong car.") - params = None - - if params is None: - params = { - 'carFingerprint': CP.carFingerprint, - 'carVin': CP.carVin, - 'angleOffsetAverage': 0.0, - 'stiffnessFactor': 1.0, - 'steerRatio': VM.sR, - } - params_reader.put("LiveParameters", json.dumps(params)) - cloudlog.info("Parameter learner resetting to default values") - - cloudlog.info("Parameter starting with: %s" % str(params)) - localizer = Localizer(disabled_logs=disabled_logs) - - learner = ParamsLearner(VM, - angle_offset=params['angleOffsetAverage'], - stiffness_factor=params['stiffnessFactor'], - steer_ratio=params['steerRatio'], - learning_rate=LEARNING_RATE) - - i = 1 - while True: - for socket, event in poller.poll(timeout=1000): - log = messaging.recv_one(socket) - localizer.handle_log(log) - - if socket is controls_state_socket: - if not localizer.kf.t: - continue - - if i % LEARNING_RATE == 0: - # controlsState is not updating the Kalman Filter, so update KF manually - localizer.kf.predict(1e-9 * log.logMonoTime) - - predicted_state = localizer.kf.x - yaw_rate = -float(predicted_state[5]) - - steering_angle = math.radians(log.controlsState.angleSteers) - params_valid = learner.update(yaw_rate, log.controlsState.vEgo, steering_angle) - - log_t = 1e-9 * log.logMonoTime - sensor_data_age = log_t - localizer.sensor_data_t - - params = messaging.new_message() - params.init('liveParameters') - params.liveParameters.valid = bool(params_valid) - params.liveParameters.sensorValid = bool(sensor_data_age < 5.0) - params.liveParameters.angleOffset = float(math.degrees(learner.ao)) - params.liveParameters.angleOffsetAverage = float(math.degrees(learner.slow_ao)) - params.liveParameters.stiffnessFactor = float(learner.x) - params.liveParameters.steerRatio = float(learner.sR) - live_parameters_socket.send(params.to_bytes()) - - if i % 6000 == 0: # once a minute - params = learner.get_values() - params['carFingerprint'] = CP.carFingerprint - params['carVin'] = CP.carVin - params_reader.put("LiveParameters", json.dumps(params)) - params_reader.put("ControlsParams", json.dumps({'angle_model_bias': log.controlsState.angleModelBias})) - - i += 1 - elif socket is camera_odometry_socket: - msg = messaging.new_message() - msg.init('kalmanOdometry') - msg.logMonoTime = log.logMonoTime - msg.kalmanOdometry = localizer.liveLocationMsg(log.logMonoTime * 1e-9) - kalman_odometry_socket.send(msg.to_bytes()) - elif socket is sensor_events_socket: - pass - - -def main(gctx=None, addr="127.0.0.1"): - IN_CAR = os.getenv("IN_CAR", False) - disabled_logs = os.getenv("DISABLED_LOGS", "").split(",") - - # No speed for now - disabled_logs.append('controlsState') - if IN_CAR: - addr = "192.168.5.11" - - locationd_thread(gctx, addr, disabled_logs) - - -if __name__ == "__main__": - main() diff --git a/selfdrive/locationd/locationd_yawrate.cc b/selfdrive/locationd/locationd_yawrate.cc new file mode 100644 index 0000000000..f03f808ffd --- /dev/null +++ b/selfdrive/locationd/locationd_yawrate.cc @@ -0,0 +1,311 @@ +#include +#include +#include + +#include +#include +#include +#include +#include "json11.hpp" + +#include "cereal/gen/cpp/log.capnp.h" +#include "common/swaglog.h" +#include "common/messaging.h" +#include "common/params.h" +#include "common/timing.h" +#include "params_learner.h" + +const int num_polls = 3; + +class Localizer +{ + Eigen::Matrix2d A; + Eigen::Matrix2d I; + Eigen::Matrix2d Q; + Eigen::Matrix2d P; + Eigen::Matrix C_posenet; + Eigen::Matrix C_gyro; + + double R_gyro; + + void update_state(const Eigen::Matrix &C, const double R, double current_time, double meas) { + double dt = current_time - prev_update_time; + prev_update_time = current_time; + if (dt < 1.0e-9) { + return; + } + + // x = A * x; + // P = A * P * A.transpose() + dt * Q; + // Simplify because A is unity + P = P + dt * Q; + + double y = meas - C * x; + double S = R + C * P * C.transpose(); + Eigen::Vector2d K = P * C.transpose() * (1.0 / S); + x = x + K * y; + P = (I - K * C) * P; + } + + void handle_sensor_events(capnp::List::Reader sensor_events, double current_time) { + for (cereal::SensorEventData::Reader sensor_event : sensor_events){ + if (sensor_event.getType() == 4) { + sensor_data_time = current_time; + + double meas = -sensor_event.getGyro().getV()[0]; + update_state(C_gyro, R_gyro, current_time, meas); + } + } + + } + + void handle_camera_odometry(cereal::CameraOdometry::Reader camera_odometry, double current_time) { + double R = 250.0 * pow(camera_odometry.getRotStd()[2], 2); + double meas = camera_odometry.getRot()[2]; + update_state(C_posenet, R, current_time, meas); + } + + void handle_controls_state(cereal::ControlsState::Reader controls_state, double current_time) { + steering_angle = controls_state.getAngleSteers() * DEGREES_TO_RADIANS; + car_speed = controls_state.getVEgo(); + controls_state_time = current_time; + } + + +public: + Eigen::Vector2d x; + double steering_angle = 0; + double car_speed = 0; + double prev_update_time = -1; + double controls_state_time = -1; + double sensor_data_time = -1; + + Localizer() { + A << 1, 0, 0, 1; + I << 1, 0, 0, 1; + + Q << pow(0.1, 2.0), 0, 0, pow(0.005 / 100.0, 2.0); + P << pow(1.0, 2.0), 0, 0, pow(0.05, 2.0); + + C_posenet << 1, 0; + C_gyro << 1, 1; + x << 0, 0; + + R_gyro = pow(0.05, 2.0); + } + + cereal::Event::Which handle_log(const unsigned char* msg_dat, size_t msg_size) { + const kj::ArrayPtr view((const capnp::word*)msg_dat, msg_size); + capnp::FlatArrayMessageReader msg(view); + cereal::Event::Reader event = msg.getRoot(); + double current_time = event.getLogMonoTime() / 1.0e9; + + if (prev_update_time < 0) { + prev_update_time = current_time; + } + + auto type = event.which(); + switch(type) { + case cereal::Event::CONTROLS_STATE: + handle_controls_state(event.getControlsState(), current_time); + break; + case cereal::Event::CAMERA_ODOMETRY: + handle_camera_odometry(event.getCameraOdometry(), current_time); + break; + case cereal::Event::SENSOR_EVENTS: + handle_sensor_events(event.getSensorEvents(), current_time); + break; + default: + break; + } + + return type; + } +}; + + + +int main(int argc, char *argv[]) { + auto ctx = zmq_ctx_new(); + auto controls_state_sock = sub_sock(ctx, "tcp://127.0.0.1:8007"); + auto sensor_events_sock = sub_sock(ctx, "tcp://127.0.0.1:8003"); + auto camera_odometry_sock = sub_sock(ctx, "tcp://127.0.0.1:8066"); + + auto live_parameters_sock = zsock_new_pub("@tcp://*:8064"); + assert(live_parameters_sock); + auto live_parameters_sock_raw = zsock_resolve(live_parameters_sock); + + int err; + Localizer localizer; + + zmq_pollitem_t polls[num_polls] = {{0}}; + polls[0].socket = controls_state_sock; + polls[0].events = ZMQ_POLLIN; + polls[1].socket = sensor_events_sock; + polls[1].events = ZMQ_POLLIN; + polls[2].socket = camera_odometry_sock; + polls[2].events = ZMQ_POLLIN; + + // Read car params + char *value; + size_t value_sz = 0; + + LOGW("waiting for params to set vehicle model"); + while (true) { + read_db_value(NULL, "CarParams", &value, &value_sz); + if (value_sz > 0) break; + usleep(100*1000); + } + LOGW("got %d bytes CarParams", value_sz); + + // make copy due to alignment issues + auto amsg = kj::heapArray((value_sz / sizeof(capnp::word)) + 1); + memcpy(amsg.begin(), value, value_sz); + free(value); + + capnp::FlatArrayMessageReader cmsg(amsg); + cereal::CarParams::Reader car_params = cmsg.getRoot(); + + // Read params from previous run + const int result = read_db_value(NULL, "LiveParameters", &value, &value_sz); + + std::string fingerprint = car_params.getCarFingerprint(); + std::string vin = car_params.getCarVin(); + double sR = car_params.getSteerRatio(); + double x = 1.0; + double ao = 0.0; + + if (result == 0){ + auto str = std::string(value, value_sz); + free(value); + + std::string err; + auto json = json11::Json::parse(str, err); + if (json.is_null() || !err.empty()) { + std::string log = "Error parsing json: " + err; + LOGW(log.c_str()); + } else { + std::string new_fingerprint = json["carFingerprint"].string_value(); + std::string new_vin = json["carVin"].string_value(); + + if (fingerprint == new_fingerprint && vin == new_vin) { + std::string log = "Parameter starting with: " + str; + LOGW(log.c_str()); + + sR = json["steerRatio"].number_value(); + x = json["stiffnessFactor"].number_value(); + ao = json["angleOffsetAverage"].number_value(); + } + } + } + + ParamsLearner learner(car_params, ao, x, sR, 1.0); + + // Main loop + int save_counter = 0; + while (true){ + int ret = zmq_poll(polls, num_polls, 100); + + if (ret == 0){ + continue; + } else if (ret < 0){ + break; + } + + for (int i=0; i < num_polls; i++) { + if (polls[i].revents) { + zmq_msg_t msg; + err = zmq_msg_init(&msg); + assert(err == 0); + err = zmq_msg_recv(&msg, polls[i].socket, 0); + assert(err >= 0); + // make copy due to alignment issues, will be freed on out of scope + auto amsg = kj::heapArray((zmq_msg_size(&msg) / sizeof(capnp::word)) + 1); + memcpy(amsg.begin(), zmq_msg_data(&msg), zmq_msg_size(&msg)); + + auto which = localizer.handle_log((const unsigned char*)amsg.begin(), amsg.size()); + zmq_msg_close(&msg); + + if (which == cereal::Event::CONTROLS_STATE){ + save_counter++; + + double yaw_rate = -localizer.x[0]; + bool valid = learner.update(yaw_rate, localizer.car_speed, localizer.steering_angle); + + // TODO: Fix in replay + double sensor_data_age = localizer.controls_state_time - localizer.sensor_data_time; + + double angle_offset_degrees = RADIANS_TO_DEGREES * learner.ao; + double angle_offset_average_degrees = RADIANS_TO_DEGREES * learner.slow_ao; + + // Send parameters at 10 Hz + if (save_counter % 10 == 0){ + capnp::MallocMessageBuilder msg; + cereal::Event::Builder event = msg.initRoot(); + event.setLogMonoTime(nanos_since_boot()); + auto live_params = event.initLiveParameters(); + live_params.setValid(valid); + live_params.setYawRate(localizer.x[0]); + live_params.setGyroBias(localizer.x[1]); + live_params.setSensorValid(sensor_data_age < 5.0); + live_params.setAngleOffset(angle_offset_degrees); + live_params.setAngleOffsetAverage(angle_offset_average_degrees); + live_params.setStiffnessFactor(learner.x); + live_params.setSteerRatio(learner.sR); + + auto words = capnp::messageToFlatArray(msg); + auto bytes = words.asBytes(); + zmq_send(live_parameters_sock_raw, bytes.begin(), bytes.size(), ZMQ_DONTWAIT); + } + + + // Save parameters every minute + if (save_counter % 6000 == 0) { + json11::Json json = json11::Json::object { + {"carVin", vin}, + {"carFingerprint", fingerprint}, + {"steerRatio", learner.sR}, + {"stiffnessFactor", learner.x}, + {"angleOffsetAverage", angle_offset_average_degrees}, + }; + + std::string out = json.dump(); + write_db_value(NULL, "LiveParameters", out.c_str(), out.length()); + } + } + } + } + } + + zmq_close(controls_state_sock); + zmq_close(sensor_events_sock); + zmq_close(camera_odometry_sock); + zmq_close(live_parameters_sock_raw); + return 0; +} + + +extern "C" { + void *localizer_init(void) { + Localizer * localizer = new Localizer; + return (void*)localizer; + } + + void localizer_handle_log(void * localizer, const unsigned char * data, size_t len) { + Localizer * loc = (Localizer*) localizer; + loc->handle_log(data, len); + } + + double localizer_get_yaw(void * localizer) { + Localizer * loc = (Localizer*) localizer; + return loc->x[0]; + } + double localizer_get_bias(void * localizer) { + Localizer * loc = (Localizer*) localizer; + return loc->x[1]; + } + double localizer_get_t(void * localizer) { + Localizer * loc = (Localizer*) localizer; + return loc->prev_update_time; + } +} diff --git a/selfdrive/locationd/params_learner.cc b/selfdrive/locationd/params_learner.cc new file mode 100644 index 0000000000..a150805d86 --- /dev/null +++ b/selfdrive/locationd/params_learner.cc @@ -0,0 +1,75 @@ +#include +#include +#include + +#include "cereal/gen/cpp/log.capnp.h" +#include "cereal/gen/cpp/car.capnp.h" +#include "params_learner.h" + +// #define DEBUG + +template +T clip(const T& n, const T& lower, const T& upper) { + return std::max(lower, std::min(n, upper)); +} + +ParamsLearner::ParamsLearner(cereal::CarParams::Reader car_params, + double angle_offset, + double stiffness_factor, + double steer_ratio, + double learning_rate) : + ao(angle_offset * DEGREES_TO_RADIANS), + slow_ao(angle_offset * DEGREES_TO_RADIANS), + x(stiffness_factor), + sR(steer_ratio) { + cF0 = car_params.getTireStiffnessFront(); + cR0 = car_params.getTireStiffnessRear(); + + l = car_params.getWheelbase(); + m = car_params.getMass(); + + aF = car_params.getCenterToFront(); + aR = l - aF; + + min_sr = MIN_SR * car_params.getSteerRatio(); + max_sr = MAX_SR * car_params.getSteerRatio(); + min_sr_th = MIN_SR_TH * car_params.getSteerRatio(); + max_sr_th = MAX_SR_TH * car_params.getSteerRatio(); + alpha1 = 0.01 * learning_rate; + alpha2 = 0.0005 * learning_rate; + alpha3 = 0.1 * learning_rate; + alpha4 = 1.0 * learning_rate; +} + +bool ParamsLearner::update(double psi, double u, double sa) { + if (u > 10.0 && fabs(sa) < (DEGREES_TO_RADIANS * 15.)) { + double ao_diff = 2.0*cF0*cR0*l*u*x*(1.0*cF0*cR0*l*u*x*(ao - sa) + psi*sR*(cF0*cR0*pow(l, 2)*x - m*pow(u, 2)*(aF*cF0 - aR*cR0)))/(pow(sR, 2)*pow(cF0*cR0*pow(l, 2)*x - m*pow(u, 2)*(aF*cF0 - aR*cR0), 2)); + double new_ao = ao - alpha1 * ao_diff; + + double slow_ao_diff = 2.0*cF0*cR0*l*u*x*(1.0*cF0*cR0*l*u*x*(slow_ao - sa) + psi*sR*(cF0*cR0*pow(l, 2)*x - m*pow(u, 2)*(aF*cF0 - aR*cR0)))/(pow(sR, 2)*pow(cF0*cR0*pow(l, 2)*x - m*pow(u, 2)*(aF*cF0 - aR*cR0), 2)); + double new_slow_ao = slow_ao - alpha2 * slow_ao_diff; + + double new_x = x - alpha3 * (-2.0*cF0*cR0*l*m*pow(u, 3)*(slow_ao - sa)*(aF*cF0 - aR*cR0)*(1.0*cF0*cR0*l*u*x*(slow_ao - sa) + psi*sR*(cF0*cR0*pow(l, 2)*x - m*pow(u, 2)*(aF*cF0 - aR*cR0)))/(pow(sR, 2)*pow(cF0*cR0*pow(l, 2)*x - m*pow(u, 2)*(aF*cF0 - aR*cR0), 3))); + double new_sR = sR - alpha4 * (-2.0*cF0*cR0*l*u*x*(slow_ao - sa)*(1.0*cF0*cR0*l*u*x*(slow_ao - sa) + psi*sR*(cF0*cR0*pow(l, 2)*x - m*pow(u, 2)*(aF*cF0 - aR*cR0)))/(pow(sR, 3)*pow(cF0*cR0*pow(l, 2)*x - m*pow(u, 2)*(aF*cF0 - aR*cR0), 2))); + + ao = new_ao; + slow_ao = new_slow_ao; + x = new_x; + sR = new_sR; + } + +#ifdef DEBUG + std::cout << "Instant AO: " << (RADIANS_TO_DEGREES * ao) << "\tAverage AO: " << (RADIANS_TO_DEGREES * slow_ao); + std::cout << "\tStiffness: " << x << "\t sR: " << sR << std::endl; +#endif + + ao = clip(ao, -MAX_ANGLE_OFFSET, MAX_ANGLE_OFFSET); + slow_ao = clip(slow_ao, -MAX_ANGLE_OFFSET, MAX_ANGLE_OFFSET); + x = clip(x, MIN_STIFFNESS, MAX_STIFFNESS); + sR = clip(sR, min_sr, max_sr); + + bool valid = fabs(slow_ao) < MAX_ANGLE_OFFSET_TH; + valid = valid && sR > min_sr_th; + valid = valid && sR < max_sr_th; + return valid; +} diff --git a/selfdrive/locationd/params_learner.h b/selfdrive/locationd/params_learner.h new file mode 100644 index 0000000000..4d97551b3b --- /dev/null +++ b/selfdrive/locationd/params_learner.h @@ -0,0 +1,35 @@ +#pragma once + +#define DEGREES_TO_RADIANS 0.017453292519943295 +#define RADIANS_TO_DEGREES (1.0 / DEGREES_TO_RADIANS) + +#define MAX_ANGLE_OFFSET (10.0 * DEGREES_TO_RADIANS) +#define MAX_ANGLE_OFFSET_TH (9.0 * DEGREES_TO_RADIANS) +#define MIN_STIFFNESS 0.5 +#define MAX_STIFFNESS 2.0 +#define MIN_SR 0.5 +#define MAX_SR 2.0 +#define MIN_SR_TH 0.55 +#define MAX_SR_TH 1.9 + +class ParamsLearner { + double cF0, cR0; + double aR, aF; + double l, m; + + double min_sr, max_sr, min_sr_th, max_sr_th; + double alpha1, alpha2, alpha3, alpha4; + +public: + double ao; + double slow_ao; + double x, sR; + + ParamsLearner(cereal::CarParams::Reader car_params, + double angle_offset, + double stiffness_factor, + double steer_ratio, + double learning_rate); + + bool update(double psi, double u, double sa); +}; diff --git a/selfdrive/locationd/test/ublox.py b/selfdrive/locationd/test/ublox.py index 945b05a122..175316fd81 100644 --- a/selfdrive/locationd/test/ublox.py +++ b/selfdrive/locationd/test/ublox.py @@ -719,14 +719,12 @@ class UBlox: self.dev = PandaSerial(self.panda, 1, self.baudrate) elif grey: - import zmq from selfdrive.services import service_list import selfdrive.messaging as messaging class BoarddSerial(object): def __init__(self): - context = zmq.Context() - self.ubloxRaw = messaging.sub_sock(context, service_list['ubloxRaw'].port) + self.ubloxRaw = messaging.sub_sock(service_list['ubloxRaw'].port) self.buf = "" def read(self, n): diff --git a/selfdrive/locationd/test/ubloxd.py b/selfdrive/locationd/test/ubloxd.py index 001d541360..388a69bf42 100755 --- a/selfdrive/locationd/test/ubloxd.py +++ b/selfdrive/locationd/test/ubloxd.py @@ -8,7 +8,6 @@ import struct import sys from cereal import log from common import realtime -import zmq import selfdrive.messaging as messaging from selfdrive.services import service_list from selfdrive.locationd.test.ephemeris import EphemerisData, GET_FIELD_U @@ -270,9 +269,8 @@ def main(gctx=None): nav_frame_buffer[0][i] = {} - context = zmq.Context() - gpsLocationExternal = messaging.pub_sock(context, service_list['gpsLocationExternal'].port) - ubloxGnss = messaging.pub_sock(context, service_list['ubloxGnss'].port) + gpsLocationExternal = messaging.pub_sock(service_list['gpsLocationExternal'].port) + ubloxGnss = messaging.pub_sock(service_list['ubloxGnss'].port) dev = init_reader() while True: diff --git a/selfdrive/locationd/test/ubloxd_easy.py b/selfdrive/locationd/test/ubloxd_easy.py index 96139ab61f..8bb16d403a 100755 --- a/selfdrive/locationd/test/ubloxd_easy.py +++ b/selfdrive/locationd/test/ubloxd_easy.py @@ -11,14 +11,12 @@ from selfdrive.services import service_list unlogger = os.getenv("UNLOGGER") is not None # debug prints def main(gctx=None): - context = zmq.Context() poller = zmq.Poller() - context = zmq.Context() - gpsLocationExternal = messaging.pub_sock(context, service_list['gpsLocationExternal'].port) - ubloxGnss = messaging.pub_sock(context, service_list['ubloxGnss'].port) + gpsLocationExternal = messaging.pub_sock(service_list['gpsLocationExternal'].port) + ubloxGnss = messaging.pub_sock(service_list['ubloxGnss'].port) - # ubloxRaw = messaging.sub_sock(context, service_list['ubloxRaw'].port, poller) + # ubloxRaw = messaging.sub_sock(service_list['ubloxRaw'].port, poller) # buffer with all the messages that still need to be input into the kalman while 1: diff --git a/selfdrive/logcatd/Makefile b/selfdrive/logcatd/Makefile index 077f20f8cd..fff9220dd3 100644 --- a/selfdrive/logcatd/Makefile +++ b/selfdrive/logcatd/Makefile @@ -1,6 +1,8 @@ CC = clang CXX = clang++ +ARCH := $(shell uname -m) + PHONELIBS = ../../phonelibs BASEDIR = ../.. @@ -12,11 +14,14 @@ WARN_FLAGS = -Werror=implicit-function-declaration \ CFLAGS = -std=gnu11 -g -fPIC -O2 $(WARN_FLAGS) CXXFLAGS = -std=c++11 -g -fPIC -O2 $(WARN_FLAGS) +ZMQ_LIBS = -l:libczmq.a -l:libzmq.a + +ifeq ($(ARCH),aarch64) +CFLAGS += -mcpu=cortex-a57 +CXXFLAGS += -mcpu=cortex-a57 +ZMQ_LIBS += -lgnustl_shared +endif -ZMQ_FLAGS = -I$(PHONELIBS)/zmq/aarch64/include -ZMQ_LIBS = -L$(PHONELIBS)/zmq/aarch64/lib \ - -l:libczmq.a -l:libzmq.a \ - -lgnustl_shared .PHONY: all all: logcatd diff --git a/selfdrive/logcatd/logcatd.cc b/selfdrive/logcatd/logcatd.cc index c2f688fd59..637c5e6c0a 100644 --- a/selfdrive/logcatd/logcatd.cc +++ b/selfdrive/logcatd/logcatd.cc @@ -1,8 +1,9 @@ #include #include #include +#include -#include +//#include #include #include @@ -24,8 +25,8 @@ int main() { assert(system_logger); struct logger *crash_logger = android_logger_open(logger_list, LOG_ID_CRASH); assert(crash_logger); - struct logger *kernel_logger = android_logger_open(logger_list, LOG_ID_KERNEL); - assert(kernel_logger); +// struct logger *kernel_logger = android_logger_open(logger_list, LOG_ID_KERNEL); +// assert(kernel_logger); void *context = zmq_ctx_new(); void *publisher = zmq_socket(context, ZMQ_PUB); @@ -65,4 +66,4 @@ int main() { android_logger_list_close(logger_list); return 0; -} \ No newline at end of file +} diff --git a/selfdrive/loggerd/build_from_src.mk b/selfdrive/loggerd/build_from_src.mk new file mode 100644 index 0000000000..47f4f9b265 --- /dev/null +++ b/selfdrive/loggerd/build_from_src.mk @@ -0,0 +1,132 @@ +CC = clang +CXX = clang++ + +ARCH := $(shell uname -m) + +PHONELIBS = ../../phonelibs +BASEDIR = ../.. + +WARN_FLAGS = -Werror=implicit-function-declaration \ + -Werror=incompatible-pointer-types \ + -Werror=int-conversion \ + -Werror=return-type \ + -Werror=format-extra-args \ + -Wno-deprecated-declarations + +CFLAGS = -std=gnu11 -g -fPIC -O2 $(WARN_FLAGS) \ + -I$(PHONELIBS)/android_frameworks_native/include \ + -I$(PHONELIBS)/android_system_core/include \ + -I$(PHONELIBS)/android_hardware_libhardware/include +CXXFLAGS = -std=c++11 -g -fPIC -O2 $(WARN_FLAGS) \ + -I$(PHONELIBS)/android_frameworks_native/include \ + -I$(PHONELIBS)/android_system_core/include \ + -I$(PHONELIBS)/android_hardware_libhardware/include + +ZMQ_LIBS = -l:libczmq.a -l:libzmq.a + +ifeq ($(ARCH),aarch64) +CFLAGS += -mcpu=cortex-a57 +CXXFLAGS += -mcpu=cortex-a57 +ZMQ_LIBS += -lgnustl_shared +endif + + +BZIP_FLAGS = -I$(PHONELIBS)/bzip2/ +BZIP_LIBS = -L$(PHONELIBS)/bzip2/ \ + -l:libbz2.a + +# todo: dont use system ffmpeg libs +FFMPEG_LIBS = -lavformat \ + -lavcodec \ + -lswscale \ + -lavutil \ + -lz + +LIBYUV_FLAGS = -I$(PHONELIBS)/libyuv/include +LIBYUV_LIBS = $(PHONELIBS)/libyuv/lib/libyuv.a + +OPENMAX_FLAGS = -I$(PHONELIBS)/openmax/include +OPENMAX_LIBS = -lOmxVenc -lOmxCore + +JSON_FLAGS = -I$(PHONELIBS)/json/src + +YAML_FLAGS = -I$(PHONELIBS)/yaml-cpp/include +YAML_LIBS = $(PHONELIBS)/yaml-cpp/lib/libyaml-cpp.a + +.PHONY: all +all: loggerd + +include ../common/cereal.mk + +OBJS += loggerd.o \ + logger.o \ + ../common/util.o \ + ../common/params.o \ + ../common/cqueue.o \ + ../common/swaglog.o \ + ../common/visionipc.o \ + ../common/ipc.o \ + $(PHONELIBS)/json/src/json.o + +ifeq ($(ARCH),x86_64) +CXXFLAGS += "-DDISABLE_ENCODER" +ZMQ_LIBS = -L$(BASEDIR)/external/zmq/lib/ \ + -l:libczmq.a -l:libzmq.a +EXTRA_LIBS = -lpthread +OPENMAX_LIBS = "" +YAML_LIBS = $(PHONELIBS)/yaml-cpp/x64/lib/libyaml-cpp.a +else +OBJS += encoder.o \ + raw_logger.o +EXTRA_LIBS = -lcutils -llog +endif + +DEPS := $(OBJS:.o=.d) + +loggerd: $(OBJS) + @echo "[ LINK ] $@" + $(CXX) -fPIC -o '$@' $^ \ + $(LIBYUV_LIBS) \ + $(CEREAL_LIBS) \ + $(ZMQ_LIBS) \ + -L/usr/lib \ + $(FFMPEG_LIBS) \ + -L/system/vendor/lib64 \ + $(OPENMAX_LIBS) \ + $(YAML_LIBS) \ + $(EXTRA_LIBS) \ + $(BZIP_LIBS) \ + -lm + +%.o: %.cc + @echo "[ CXX ] $@" + $(CXX) $(CXXFLAGS) -MMD \ + $(CEREAL_CXXFLAGS) \ + $(LIBYUV_FLAGS) \ + $(ZMQ_FLAGS) \ + $(OPENMAX_FLAGS) \ + $(YAML_FLAGS) \ + $(BZIP_FLAGS) \ + -Iinclude \ + -I../ \ + -I../../ \ + -c -o '$@' '$<' + +%.o: %.c + @echo "[ CC ] $@" + $(CC) $(CFLAGS) -MMD \ + $(LIBYUV_FLAGS) \ + $(ZMQ_FLAGS) \ + $(OPENMAX_FLAGS) \ + $(JSON_FLAGS) \ + $(BZIP_FLAGS) \ + -Iinclude \ + -I../ \ + -I../../ \ + -c -o '$@' '$<' + +.PHONY: clean +clean: + rm -f loggerd $(OBJS) $(DEPS) + +-include $(DEPS) diff --git a/selfdrive/loggerd/deleter.py b/selfdrive/loggerd/deleter.py index 86974a00c5..b1e1ffcd04 100644 --- a/selfdrive/loggerd/deleter.py +++ b/selfdrive/loggerd/deleter.py @@ -26,8 +26,9 @@ def deleter_thread(exit_event): break except OSError: cloudlog.exception("issue deleting %s" % delete_path) - - exit_event.wait(30) + exit_event.wait(.1) + else: + exit_event.wait(30) def main(gctx=None): diff --git a/selfdrive/loggerd/encoder.c b/selfdrive/loggerd/encoder.c new file mode 100644 index 0000000000..1b85ad263d --- /dev/null +++ b/selfdrive/loggerd/encoder.c @@ -0,0 +1,714 @@ +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include +#include +#include + +#include + +#include + +#include + +#include "common/mutex.h" +#include "common/swaglog.h" + +#include "encoder.h" + +#define ALOG(...) __android_log_print(ANDROID_LOG_VERBOSE, "omxapp", ##__VA_ARGS__) + +// encoder: lossey codec using hardware hevc + +static void wait_for_state(EncoderState *s, OMX_STATETYPE state) { + pthread_mutex_lock(&s->state_lock); + while (s->state != state) { + pthread_cond_wait(&s->state_cv, &s->state_lock); + } + pthread_mutex_unlock(&s->state_lock); +} + +static OMX_ERRORTYPE event_handler(OMX_HANDLETYPE component, OMX_PTR app_data, OMX_EVENTTYPE event, + OMX_U32 data1, OMX_U32 data2, OMX_PTR event_data) { + EncoderState *s = app_data; + + switch (event) { + case OMX_EventCmdComplete: + assert(data1 == OMX_CommandStateSet); + LOG("set state event 0x%x", data2); + pthread_mutex_lock(&s->state_lock); + s->state = data2; + pthread_cond_broadcast(&s->state_cv); + pthread_mutex_unlock(&s->state_lock); + break; + case OMX_EventError: + LOGE("OMX error 0x%08x", data1); + // assert(false); + break; + default: + LOGE("unhandled event %d", event); + assert(false); + break; + } + + pthread_mutex_unlock(&s->state_lock); + + return OMX_ErrorNone; +} + +static OMX_ERRORTYPE empty_buffer_done(OMX_HANDLETYPE component, OMX_PTR app_data, + OMX_BUFFERHEADERTYPE *buffer) { + EncoderState *s = app_data; + + // printf("empty_buffer_done\n"); + + queue_push(&s->free_in, (void*)buffer); + + return OMX_ErrorNone; +} + + +static OMX_ERRORTYPE fill_buffer_done(OMX_HANDLETYPE component, OMX_PTR app_data, + OMX_BUFFERHEADERTYPE *buffer) { + EncoderState *s = app_data; + + // printf("fill_buffer_done\n"); + + queue_push(&s->done_out, (void*)buffer); + + return OMX_ErrorNone; +} + +static OMX_CALLBACKTYPE omx_callbacks = { + .EventHandler = event_handler, + .EmptyBufferDone = empty_buffer_done, + .FillBufferDone = fill_buffer_done, +}; + +#define PORT_INDEX_IN 0 +#define PORT_INDEX_OUT 1 + +static const char* omx_color_fomat_name(uint32_t format) { + switch (format) { + case OMX_COLOR_FormatUnused: return "OMX_COLOR_FormatUnused"; + case OMX_COLOR_FormatMonochrome: return "OMX_COLOR_FormatMonochrome"; + case OMX_COLOR_Format8bitRGB332: return "OMX_COLOR_Format8bitRGB332"; + case OMX_COLOR_Format12bitRGB444: return "OMX_COLOR_Format12bitRGB444"; + case OMX_COLOR_Format16bitARGB4444: return "OMX_COLOR_Format16bitARGB4444"; + case OMX_COLOR_Format16bitARGB1555: return "OMX_COLOR_Format16bitARGB1555"; + case OMX_COLOR_Format16bitRGB565: return "OMX_COLOR_Format16bitRGB565"; + case OMX_COLOR_Format16bitBGR565: return "OMX_COLOR_Format16bitBGR565"; + case OMX_COLOR_Format18bitRGB666: return "OMX_COLOR_Format18bitRGB666"; + case OMX_COLOR_Format18bitARGB1665: return "OMX_COLOR_Format18bitARGB1665"; + case OMX_COLOR_Format19bitARGB1666: return "OMX_COLOR_Format19bitARGB1666"; + case OMX_COLOR_Format24bitRGB888: return "OMX_COLOR_Format24bitRGB888"; + case OMX_COLOR_Format24bitBGR888: return "OMX_COLOR_Format24bitBGR888"; + case OMX_COLOR_Format24bitARGB1887: return "OMX_COLOR_Format24bitARGB1887"; + case OMX_COLOR_Format25bitARGB1888: return "OMX_COLOR_Format25bitARGB1888"; + case OMX_COLOR_Format32bitBGRA8888: return "OMX_COLOR_Format32bitBGRA8888"; + case OMX_COLOR_Format32bitARGB8888: return "OMX_COLOR_Format32bitARGB8888"; + case OMX_COLOR_FormatYUV411Planar: return "OMX_COLOR_FormatYUV411Planar"; + case OMX_COLOR_FormatYUV411PackedPlanar: return "OMX_COLOR_FormatYUV411PackedPlanar"; + case OMX_COLOR_FormatYUV420Planar: return "OMX_COLOR_FormatYUV420Planar"; + case OMX_COLOR_FormatYUV420PackedPlanar: return "OMX_COLOR_FormatYUV420PackedPlanar"; + case OMX_COLOR_FormatYUV420SemiPlanar: return "OMX_COLOR_FormatYUV420SemiPlanar"; + case OMX_COLOR_FormatYUV422Planar: return "OMX_COLOR_FormatYUV422Planar"; + case OMX_COLOR_FormatYUV422PackedPlanar: return "OMX_COLOR_FormatYUV422PackedPlanar"; + case OMX_COLOR_FormatYUV422SemiPlanar: return "OMX_COLOR_FormatYUV422SemiPlanar"; + case OMX_COLOR_FormatYCbYCr: return "OMX_COLOR_FormatYCbYCr"; + case OMX_COLOR_FormatYCrYCb: return "OMX_COLOR_FormatYCrYCb"; + case OMX_COLOR_FormatCbYCrY: return "OMX_COLOR_FormatCbYCrY"; + case OMX_COLOR_FormatCrYCbY: return "OMX_COLOR_FormatCrYCbY"; + case OMX_COLOR_FormatYUV444Interleaved: return "OMX_COLOR_FormatYUV444Interleaved"; + case OMX_COLOR_FormatRawBayer8bit: return "OMX_COLOR_FormatRawBayer8bit"; + case OMX_COLOR_FormatRawBayer10bit: return "OMX_COLOR_FormatRawBayer10bit"; + case OMX_COLOR_FormatRawBayer8bitcompressed: return "OMX_COLOR_FormatRawBayer8bitcompressed"; + case OMX_COLOR_FormatL2: return "OMX_COLOR_FormatL2"; + case OMX_COLOR_FormatL4: return "OMX_COLOR_FormatL4"; + case OMX_COLOR_FormatL8: return "OMX_COLOR_FormatL8"; + case OMX_COLOR_FormatL16: return "OMX_COLOR_FormatL16"; + case OMX_COLOR_FormatL24: return "OMX_COLOR_FormatL24"; + case OMX_COLOR_FormatL32: return "OMX_COLOR_FormatL32"; + case OMX_COLOR_FormatYUV420PackedSemiPlanar: return "OMX_COLOR_FormatYUV420PackedSemiPlanar"; + case OMX_COLOR_FormatYUV422PackedSemiPlanar: return "OMX_COLOR_FormatYUV422PackedSemiPlanar"; + case OMX_COLOR_Format18BitBGR666: return "OMX_COLOR_Format18BitBGR666"; + case OMX_COLOR_Format24BitARGB6666: return "OMX_COLOR_Format24BitARGB6666"; + case OMX_COLOR_Format24BitABGR6666: return "OMX_COLOR_Format24BitABGR6666"; + + case OMX_COLOR_FormatAndroidOpaque: return "OMX_COLOR_FormatAndroidOpaque"; + case OMX_TI_COLOR_FormatYUV420PackedSemiPlanar: return "OMX_TI_COLOR_FormatYUV420PackedSemiPlanar"; + case OMX_QCOM_COLOR_FormatYVU420SemiPlanar: return "OMX_QCOM_COLOR_FormatYVU420SemiPlanar"; + case OMX_QCOM_COLOR_FormatYUV420PackedSemiPlanar64x32Tile2m8ka: return "OMX_QCOM_COLOR_FormatYUV420PackedSemiPlanar64x32Tile2m8ka"; + case OMX_SEC_COLOR_FormatNV12Tiled: return "OMX_SEC_COLOR_FormatNV12Tiled"; + case OMX_QCOM_COLOR_FormatYUV420PackedSemiPlanar32m: return "OMX_QCOM_COLOR_FormatYUV420PackedSemiPlanar32m"; + + // case QOMX_COLOR_FormatYVU420SemiPlanar: return "QOMX_COLOR_FormatYVU420SemiPlanar"; + case QOMX_COLOR_FormatYVU420PackedSemiPlanar32m4ka: return "QOMX_COLOR_FormatYVU420PackedSemiPlanar32m4ka"; + case QOMX_COLOR_FormatYUV420PackedSemiPlanar16m2ka: return "QOMX_COLOR_FormatYUV420PackedSemiPlanar16m2ka"; + // case QOMX_COLOR_FormatYUV420PackedSemiPlanar64x32Tile2m8ka: return "QOMX_COLOR_FormatYUV420PackedSemiPlanar64x32Tile2m8ka"; + // case QOMX_COLOR_FORMATYUV420PackedSemiPlanar32m: return "QOMX_COLOR_FORMATYUV420PackedSemiPlanar32m"; + case QOMX_COLOR_FORMATYUV420PackedSemiPlanar32mMultiView: return "QOMX_COLOR_FORMATYUV420PackedSemiPlanar32mMultiView"; + case QOMX_COLOR_FORMATYUV420PackedSemiPlanar32mCompressed: return "QOMX_COLOR_FORMATYUV420PackedSemiPlanar32mCompressed"; + case QOMX_COLOR_Format32bitRGBA8888: return "QOMX_COLOR_Format32bitRGBA8888"; + case QOMX_COLOR_Format32bitRGBA8888Compressed: return "QOMX_COLOR_Format32bitRGBA8888Compressed"; + + default: + return "unkn"; + } +} + + +void encoder_init(EncoderState *s, const char* filename, int width, int height, int fps, int bitrate) { + int err; + + memset(s, 0, sizeof(*s)); + s->filename = filename; + s->width = width; + s->height = height; + s->fps = fps; + mutex_init_reentrant(&s->lock); + + s->segment = -1; + + s->state = OMX_StateLoaded; + + s->codec_config = NULL; + + queue_init(&s->free_in); + queue_init(&s->done_out); + + pthread_mutex_init(&s->state_lock, NULL); + pthread_cond_init(&s->state_cv, NULL); + + err = OMX_GetHandle(&s->handle, (OMX_STRING)"OMX.qcom.video.encoder.hevc", + s, &omx_callbacks); + // err = OMX_GetHandle(&s->handle, (OMX_STRING)"OMX.qcom.video.encoder.avc", + // s, &omx_callbacks); + assert(err == OMX_ErrorNone); + // printf("handle: %p\n", s->handle); + + // setup input port + + OMX_PARAM_PORTDEFINITIONTYPE in_port = {0}; + in_port.nSize = sizeof(in_port); + in_port.nPortIndex = (OMX_U32) PORT_INDEX_IN; + err = OMX_GetParameter(s->handle, OMX_IndexParamPortDefinition, + (OMX_PTR) &in_port); + assert(err == OMX_ErrorNone); + + + in_port.format.video.nFrameWidth = s->width; + in_port.format.video.nFrameHeight = s->height; + in_port.format.video.nStride = VENUS_Y_STRIDE(COLOR_FMT_NV12, s->width); + in_port.format.video.nSliceHeight = s->height; + // in_port.nBufferSize = (s->width * s->height * 3) / 2; + in_port.nBufferSize = VENUS_BUFFER_SIZE(COLOR_FMT_NV12, s->width, s->height); + in_port.format.video.xFramerate = (s->fps * 65536); + in_port.format.video.eCompressionFormat = OMX_VIDEO_CodingUnused; + // in_port.format.video.eColorFormat = OMX_COLOR_FormatYUV420SemiPlanar; + in_port.format.video.eColorFormat = QOMX_COLOR_FORMATYUV420PackedSemiPlanar32m; + + err = OMX_SetParameter(s->handle, OMX_IndexParamPortDefinition, + (OMX_PTR) &in_port); + assert(err == OMX_ErrorNone); + + + err = OMX_GetParameter(s->handle, OMX_IndexParamPortDefinition, + (OMX_PTR) &in_port); + assert(err == OMX_ErrorNone); + s->num_in_bufs = in_port.nBufferCountActual; + + // printf("in width: %d, stride: %d\n", + // in_port.format.video.nFrameWidth, in_port.format.video.nStride); + + // setup output port + + OMX_PARAM_PORTDEFINITIONTYPE out_port = {0}; + out_port.nSize = sizeof(out_port); + out_port.nPortIndex = (OMX_U32) PORT_INDEX_OUT; + err = OMX_GetParameter(s->handle, OMX_IndexParamPortDefinition, + (OMX_PTR)&out_port); + assert(err == OMX_ErrorNone); + + out_port.format.video.nFrameWidth = s->width; + out_port.format.video.nFrameHeight = s->height; + out_port.format.video.xFramerate = 0; + out_port.format.video.nBitrate = bitrate; + out_port.format.video.eCompressionFormat = OMX_VIDEO_CodingHEVC; + // out_port.format.video.eCompressionFormat = OMX_VIDEO_CodingAVC; + out_port.format.video.eColorFormat = OMX_COLOR_FormatUnused; + + err = OMX_SetParameter(s->handle, OMX_IndexParamPortDefinition, + (OMX_PTR) &out_port); + assert(err == OMX_ErrorNone); + + + err = OMX_GetParameter(s->handle, OMX_IndexParamPortDefinition, + (OMX_PTR) &out_port); + assert(err == OMX_ErrorNone); + s->num_out_bufs = out_port.nBufferCountActual; + + // printf("out buf num %d\n", out_port.nBufferSize); + + + // setup HEVC + + OMX_VIDEO_PARAM_HEVCTYPE hecv_type = {0}; + hecv_type.nSize = sizeof(hecv_type); + hecv_type.nPortIndex = (OMX_U32) PORT_INDEX_OUT; + err = OMX_GetParameter(s->handle, (OMX_INDEXTYPE)OMX_IndexParamVideoHevc, + (OMX_PTR) &hecv_type); + assert(err == OMX_ErrorNone); + + hecv_type.eProfile = OMX_VIDEO_HEVCProfileMain; + hecv_type.eLevel = OMX_VIDEO_HEVCHighTierLevel5; + + err = OMX_SetParameter(s->handle, (OMX_INDEXTYPE)OMX_IndexParamVideoHevc, + (OMX_PTR) &hecv_type); + assert(err == OMX_ErrorNone); + + + OMX_VIDEO_PARAM_BITRATETYPE bitrate_type = {0}; + bitrate_type.nSize = sizeof(bitrate_type); + bitrate_type.nPortIndex = (OMX_U32) PORT_INDEX_OUT; + err = OMX_GetParameter(s->handle, OMX_IndexParamVideoBitrate, + (OMX_PTR) &bitrate_type); + assert(err == OMX_ErrorNone); + + bitrate_type.eControlRate = OMX_Video_ControlRateVariable; + bitrate_type.nTargetBitrate = bitrate; + + err = OMX_SetParameter(s->handle, OMX_IndexParamVideoBitrate, + (OMX_PTR) &bitrate_type); + assert(err == OMX_ErrorNone); + + +#if 0 + // setup h264 + OMX_VIDEO_PARAM_BITRATETYPE bitrate_type = {0}; + bitrate_type.nSize = sizeof(bitrate_type); + bitrate_type.nPortIndex = (OMX_U32) PORT_INDEX_OUT; + err = OMX_GetParameter(s->handle, OMX_IndexParamVideoBitrate, + (OMX_PTR) &bitrate_type); + assert(err == OMX_ErrorNone); + + bitrate_type.eControlRate = OMX_Video_ControlRateVariable; + bitrate_type.nTargetBitrate = 2000000; + + err = OMX_SetParameter(s->handle, OMX_IndexParamVideoBitrate, + (OMX_PTR) &bitrate_type); + assert(err == OMX_ErrorNone); + + + OMX_VIDEO_PARAM_AVCTYPE avc = { 0 }; + avc.nSize = sizeof(avc); + avc.nPortIndex = (OMX_U32) PORT_INDEX_OUT; + err = OMX_GetParameter(s->handle, OMX_IndexParamVideoAvc, &avc); + assert(err == OMX_ErrorNone); + + avc.nBFrames = 0; + avc.nPFrames = 20;//avctx->gop_size - 1; + + avc.eProfile = OMX_VIDEO_AVCProfileBaseline; + avc.eLevel = OMX_VIDEO_AVCLevel31; + + avc.nAllowedPictureTypes |= OMX_VIDEO_PictureTypeB; + avc.eLoopFilterMode = OMX_VIDEO_AVCLoopFilterEnable; + + err = OMX_SetParameter(s->handle, OMX_IndexParamVideoAvc, &avc); + assert(err == OMX_ErrorNone); +#endif + + + // for (int i = 0; ; i++) { + // OMX_VIDEO_PARAM_PORTFORMATTYPE video_port_format = {0}; + // video_port_format.nSize = sizeof(video_port_format); + // video_port_format.nIndex = i; + // video_port_format.nPortIndex = PORT_INDEX_IN; + // if (OMX_GetParameter(s->handle, OMX_IndexParamVideoPortFormat, &video_port_format) != OMX_ErrorNone) + // break; + // printf("in %d: compression 0x%x format 0x%x %s\n", i, + // video_port_format.eCompressionFormat, video_port_format.eColorFormat, + // omx_color_fomat_name(video_port_format.eColorFormat)); + // } + + // for (int i=0; i<32; i++) { + // OMX_VIDEO_PARAM_PROFILELEVELTYPE params = {0}; + // params.nSize = sizeof(params); + // params.nPortIndex = PORT_INDEX_OUT; + // params.nProfileIndex = i; + // if (OMX_GetParameter(s->handle, OMX_IndexParamVideoProfileLevelQuerySupported, ¶ms) != OMX_ErrorNone) + // break; + // printf("profile %d level 0x%x\n", params.eProfile, params.eLevel); + // } + + err = OMX_SendCommand(s->handle, OMX_CommandStateSet, OMX_StateIdle, NULL); + assert(err == OMX_ErrorNone); + + s->in_buf_headers = calloc(s->num_in_bufs, sizeof(OMX_BUFFERHEADERTYPE*)); + for (int i=0; inum_in_bufs; i++) { + err = OMX_AllocateBuffer(s->handle, &s->in_buf_headers[i], PORT_INDEX_IN, s, + in_port.nBufferSize); + assert(err == OMX_ErrorNone); + } + + s->out_buf_headers = calloc(s->num_out_bufs, sizeof(OMX_BUFFERHEADERTYPE*)); + for (int i=0; inum_out_bufs; i++) { + err = OMX_AllocateBuffer(s->handle, &s->out_buf_headers[i], PORT_INDEX_OUT, s, + out_port.nBufferSize); + assert(err == OMX_ErrorNone); + } + + wait_for_state(s, OMX_StateIdle); + + err = OMX_SendCommand(s->handle, OMX_CommandStateSet, OMX_StateExecuting, NULL); + assert(err == OMX_ErrorNone); + + wait_for_state(s, OMX_StateExecuting); + + // give omx all the output buffers + for (int i = 0; i < s->num_out_bufs; i++) { + // printf("fill %p\n", s->out_buf_headers[i]); + err = OMX_FillThisBuffer(s->handle, s->out_buf_headers[i]); + assert(err == OMX_ErrorNone); + } + + // fill the input free queue + for (int i = 0; i < s->num_in_bufs; i++) { + queue_push(&s->free_in, (void*)s->in_buf_headers[i]); + } +} + +static void handle_out_buf(EncoderState *s, OMX_BUFFERHEADERTYPE *out_buf) { + int err; + + uint8_t *buf_data = out_buf->pBuffer + out_buf->nOffset; + + if (out_buf->nFlags & OMX_BUFFERFLAG_CODECCONFIG) { + if (s->codec_config_len < out_buf->nFilledLen) { + s->codec_config = realloc(s->codec_config, out_buf->nFilledLen); + } + s->codec_config_len = out_buf->nFilledLen; + memcpy(s->codec_config, buf_data, out_buf->nFilledLen); + } + + if (s->stream_sock_raw) { + uint64_t current_time = nanos_since_boot(); + uint64_t diff = current_time - out_buf->nTimeStamp*1000LL; + double msdiff = (double) diff / 1000000.0; + // printf("encoded latency to tsEof: %f\n", msdiff); + zmq_send(s->stream_sock_raw, &out_buf->nTimeStamp, sizeof(out_buf->nTimeStamp), ZMQ_SNDMORE); + zmq_send(s->stream_sock_raw, buf_data, out_buf->nFilledLen, 0); + } + + if (s->of) { + // printf("write %d flags 0x%x\n", out_buf->nFilledLen, out_buf->nFlags); + fwrite(buf_data, out_buf->nFilledLen, 1, s->of); + } + + // give omx back the buffer + err = OMX_FillThisBuffer(s->handle, out_buf); + assert(err == OMX_ErrorNone); +} + +int encoder_encode_frame(EncoderState *s, uint64_t ts, + const uint8_t *y_ptr, const uint8_t *u_ptr, const uint8_t *v_ptr, + int *frame_segment, VIPCBufExtra *extra) { + int err; + + pthread_mutex_lock(&s->lock); + + if (s->opening) { + encoder_open(s, s->next_path); + s->opening = false; + } + + if (!s->open) { + pthread_mutex_unlock(&s->lock); + return -1; + } + + // this sometimes freezes... put it outside the encoder lock so we can still trigger rotates... + // THIS IS A REALLY BAD IDEA, but apparently the race has to happen 30 times to trigger this + pthread_mutex_unlock(&s->lock); + OMX_BUFFERHEADERTYPE* in_buf = queue_pop(&s->free_in); + pthread_mutex_lock(&s->lock); + + if (s->rotating) { + encoder_close(s); + encoder_open(s, s->next_path); + s->segment = s->next_segment; + s->rotating = false; + } + + int ret = s->counter; + + uint8_t *in_buf_ptr = in_buf->pBuffer; + // printf("in_buf ptr %p\n", in_buf_ptr); + + uint8_t *in_y_ptr = in_buf_ptr; + int in_y_stride = VENUS_Y_STRIDE(COLOR_FMT_NV12, s->width); + int in_uv_stride = VENUS_UV_STRIDE(COLOR_FMT_NV12, s->width); + // uint8_t *in_uv_ptr = in_buf_ptr + (s->width * s->height); + uint8_t *in_uv_ptr = in_buf_ptr + (in_y_stride * VENUS_Y_SCANLINES(COLOR_FMT_NV12, s->height)); + + err = I420ToNV12(y_ptr, s->width, + u_ptr, s->width/2, + v_ptr, s->width/2, + in_y_ptr, in_y_stride, + in_uv_ptr, in_uv_stride, + s->width, s->height); + assert(err == 0); + + // in_buf->nFilledLen = (s->width*s->height) + (s->width*s->height/2); + in_buf->nFilledLen = VENUS_BUFFER_SIZE(COLOR_FMT_NV12, s->width, s->height); + in_buf->nFlags = OMX_BUFFERFLAG_ENDOFFRAME; + in_buf->nOffset = 0; + in_buf->nTimeStamp = extra->timestamp_eof/1000LL; + + err = OMX_EmptyThisBuffer(s->handle, in_buf); + assert(err == OMX_ErrorNone); + + // pump output + while (true) { + OMX_BUFFERHEADERTYPE *out_buf = queue_try_pop(&s->done_out); + if (!out_buf) { + break; + } + handle_out_buf(s, out_buf); + } + + s->dirty = true; + + s->counter++; + + if (frame_segment) { + *frame_segment = s->segment; + } + + if (s->closing) { + encoder_close(s); + s->closing = false; + } + + pthread_mutex_unlock(&s->lock); + return ret; +} + +void encoder_open(EncoderState *s, const char* path) { + int err; + + pthread_mutex_lock(&s->lock); + + snprintf(s->vid_path, sizeof(s->vid_path), "%s/%s.hevc", path, s->filename); + s->of = fopen(s->vid_path, "wb"); + assert(s->of); + + if (s->codec_config_len > 0) { + fwrite(s->codec_config, s->codec_config_len, 1, s->of); + } + + // create camera lock file + snprintf(s->lock_path, sizeof(s->lock_path), "%s/%s.lock", path, s->filename); + int lock_fd = open(s->lock_path, O_RDWR | O_CREAT, 0777); + assert(lock_fd >= 0); + close(lock_fd); + + s->open = true; + s->counter = 0; + + pthread_mutex_unlock(&s->lock); +} + +void encoder_close(EncoderState *s) { + int err; + + pthread_mutex_lock(&s->lock); + + if (s->open) { + if (s->dirty) { + // drain output only if there could be frames in the encoder + + OMX_BUFFERHEADERTYPE* in_buf = queue_pop(&s->free_in); + in_buf->nFilledLen = 0; + in_buf->nOffset = 0; + in_buf->nFlags = OMX_BUFFERFLAG_EOS; + in_buf->nTimeStamp = 0; + + err = OMX_EmptyThisBuffer(s->handle, in_buf); + assert(err == OMX_ErrorNone); + + while (true) { + OMX_BUFFERHEADERTYPE *out_buf = queue_pop(&s->done_out); + + handle_out_buf(s, out_buf); + + if (out_buf->nFlags & OMX_BUFFERFLAG_EOS) { + break; + } + } + s->dirty = false; + } + + fclose(s->of); + unlink(s->lock_path); + } + s->open = false; + + pthread_mutex_unlock(&s->lock); +} + +void encoder_rotate(EncoderState *s, const char* new_path, int new_segment) { + pthread_mutex_lock(&s->lock); + snprintf(s->next_path, sizeof(s->next_path), "%s", new_path); + s->next_segment = new_segment; + if (s->open) { + if (s->next_segment == -1) { + s->closing = true; + } else { + s->rotating = true; + } + } else { + s->segment = s->next_segment; + s->opening = true; + } + pthread_mutex_unlock(&s->lock); +} + +void encoder_destroy(EncoderState *s) { + int err; + + assert(!s->open); + + err = OMX_SendCommand(s->handle, OMX_CommandStateSet, OMX_StateIdle, NULL); + assert(err == OMX_ErrorNone); + + wait_for_state(s, OMX_StateIdle); + + err = OMX_SendCommand(s->handle, OMX_CommandStateSet, OMX_StateLoaded, NULL); + assert(err == OMX_ErrorNone); + + for (int i=0; inum_in_bufs; i++) { + err = OMX_FreeBuffer(s->handle, PORT_INDEX_IN, s->in_buf_headers[i]); + assert(err == OMX_ErrorNone); + } + free(s->in_buf_headers); + + for (int i=0; inum_out_bufs; i++) { + err = OMX_FreeBuffer(s->handle, PORT_INDEX_OUT, s->out_buf_headers[i]); + assert(err == OMX_ErrorNone); + } + free(s->out_buf_headers); + + wait_for_state(s, OMX_StateLoaded); + + err = OMX_FreeHandle(s->handle); + assert(err == OMX_ErrorNone); +} + +#if 0 + +// cd one/selfdrive/visiond +// clang +// -fPIC -pie +// -std=gnu11 -O2 -g +// -o encoder +// -I ~/one/selfdrive +// -I ~/one/phonelibs/openmax/include +// -I ~/one/phonelibs/libyuv/include +// -lOmxVenc -lOmxCore -llog +// encoder.c +// buffering.c +// -L ~/one/phonelibs/libyuv/lib -l:libyuv.a + +int main() { + int err; + + EncoderState state; + EncoderState *s = &state; + memset(s, 0, sizeof(*s)); + + int w = 1164; + int h = 874; + + encoder_init(s, w, h, 20); + printf("inited\n"); + + encoder_open(s, "/sdcard/t1"); + + // uint8_t *tmpy = malloc(640*480); + // uint8_t *tmpu = malloc((640/2)*(480/2)); + // uint8_t *tmpv = malloc((640/2)*(480/2)); + + // memset(tmpy, 0, 640*480); + // // memset(tmpu, 0xff, (640/2)*(480/2)); + // memset(tmpv, 0, (640/2)*(480/2)); + +// #if 0 + // FILE *infile = fopen("/sdcard/camera_t2.yuv", "rb"); + uint8_t *inbuf = malloc(w*h*3/2); + memset(inbuf, 0, w*h*3/2); + + for (int i=0; i<20*3+5; i++) { + + // fread(inbuf, w*h*3/2, 1, infile); + + uint8_t *tmpy = inbuf; + uint8_t *tmpu = inbuf + w*h; + uint8_t *tmpv = inbuf + w*h + (w/2)*(h/2); + + for (int y=0; yof); + // s->of = fopen("/sdcard/tmpout2.hevc", "wb"); + // if (s->codec_config) { + // fwrite(s->codec_config, s->codec_config_len, 1, s->of); + // } + // encoder_open(s, "/sdcard/t1"); + + encoder_rotate(s, "/sdcard/t2"); + + for (int i=0; i<20*3+5; i++) { + + // fread(inbuf, w*h*3/2, 1, infile); + + uint8_t *tmpy = inbuf; + uint8_t *tmpu = inbuf + w*h; + uint8_t *tmpv = inbuf + w*h + (w/2)*(h/2); + + for (int y=0; y +#include +#include + +#include + +#include + +#include "common/cqueue.h" +#include "common/visionipc.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct EncoderState { + pthread_mutex_t lock; + int width, height, fps; + const char* path; + char vid_path[1024]; + char lock_path[1024]; + bool open; + bool dirty; + int counter; + int segment; + + bool rotating; + bool closing; + bool opening; + char next_path[1024]; + int next_segment; + + const char* filename; + FILE *of; + + size_t codec_config_len; + uint8_t *codec_config; + + pthread_mutex_t state_lock; + pthread_cond_t state_cv; + OMX_STATETYPE state; + + OMX_HANDLETYPE handle; + + int num_in_bufs; + OMX_BUFFERHEADERTYPE** in_buf_headers; + + int num_out_bufs; + OMX_BUFFERHEADERTYPE** out_buf_headers; + + Queue free_in; + Queue done_out; + + void *stream_sock_raw; +} EncoderState; + +void encoder_init(EncoderState *s, const char* filename, int width, int height, int fps, int bitrate); +int encoder_encode_frame(EncoderState *s, uint64_t ts, + const uint8_t *y_ptr, const uint8_t *u_ptr, const uint8_t *v_ptr, + int *frame_segment, VIPCBufExtra *extra); +void encoder_open(EncoderState *s, const char* path); +void encoder_rotate(EncoderState *s, const char* new_path, int new_segment); +void encoder_close(EncoderState *s); +void encoder_destroy(EncoderState *s); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/selfdrive/loggerd/frame_logger.h b/selfdrive/loggerd/frame_logger.h new file mode 100644 index 0000000000..bfc0681b75 --- /dev/null +++ b/selfdrive/loggerd/frame_logger.h @@ -0,0 +1,81 @@ +#ifndef FRAMELOGGER_H +#define FRAMELOGGER_H + +#include + +#include +#include + +class FrameLogger { +public: + virtual ~FrameLogger() {} + + virtual void Open(const std::string &path) = 0; + virtual void Close() = 0; + + int LogFrame(uint64_t ts, const uint8_t *y_ptr, const uint8_t *u_ptr, const uint8_t *v_ptr, int *frame_segment) { + std::lock_guard guard(lock); + + if (opening) { + Open(next_path); + opening = false; + } + + if (!is_open) return -1; + + if (rotating) { + Close(); + Open(next_path); + segment = next_segment; + rotating = false; + } + + int ret = ProcessFrame(ts, y_ptr, u_ptr, v_ptr); + + if (ret >= 0 && frame_segment) { + *frame_segment = segment; + } + + if (closing) { + Close(); + closing = false; + } + + return ret; + } + + void Rotate(const std::string &new_path, int new_segment) { + std::lock_guard guard(lock); + + next_path = new_path; + next_segment = new_segment; + if (is_open) { + if (next_segment == -1) { + closing = true; + } else { + rotating = true; + } + } else { + segment = next_segment; + opening = true; + } + } + +protected: + + virtual int ProcessFrame(uint64_t ts, const uint8_t *y_ptr, const uint8_t *u_ptr, const uint8_t *v_ptr) = 0; + + std::recursive_mutex lock; + + bool is_open = false; + int segment = -1; + + std::string vid_path, lock_path; + +private: + int next_segment = -1; + bool opening = false, closing = false, rotating = false; + std::string next_path; +}; + +#endif diff --git a/selfdrive/loggerd/include/msm_media_info.h b/selfdrive/loggerd/include/msm_media_info.h new file mode 100644 index 0000000000..39dceb2c49 --- /dev/null +++ b/selfdrive/loggerd/include/msm_media_info.h @@ -0,0 +1,819 @@ +#ifndef __MEDIA_INFO_H__ +#define __MEDIA_INFO_H__ + +#ifndef MSM_MEDIA_ALIGN +#define MSM_MEDIA_ALIGN(__sz, __align) (((__sz) + (__align-1)) & (~(__align-1))) +#endif + +#ifndef MSM_MEDIA_ROUNDUP +#define MSM_MEDIA_ROUNDUP(__sz, __r) (((__sz) + ((__r) - 1)) / (__r)) +#endif + +#ifndef MSM_MEDIA_MAX +#define MSM_MEDIA_MAX(__a, __b) ((__a) > (__b)?(__a):(__b)) +#endif + +enum color_fmts { + /* Venus NV12: + * YUV 4:2:0 image with a plane of 8 bit Y samples followed + * by an interleaved U/V plane containing 8 bit 2x2 subsampled + * colour difference samples. + * + * <-------- Y/UV_Stride --------> + * <------- Width -------> + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . ^ ^ + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . | | + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . Height | + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . | Y_Scanlines + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . | | + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . | | + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . | | + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . V | + * . . . . . . . . . . . . . . . . | + * . . . . . . . . . . . . . . . . | + * . . . . . . . . . . . . . . . . | + * . . . . . . . . . . . . . . . . V + * U V U V U V U V U V U V . . . . ^ + * U V U V U V U V U V U V . . . . | + * U V U V U V U V U V U V . . . . | + * U V U V U V U V U V U V . . . . UV_Scanlines + * . . . . . . . . . . . . . . . . | + * . . . . . . . . . . . . . . . . V + * . . . . . . . . . . . . . . . . --> Buffer size alignment + * + * Y_Stride : Width aligned to 128 + * UV_Stride : Width aligned to 128 + * Y_Scanlines: Height aligned to 32 + * UV_Scanlines: Height/2 aligned to 16 + * Extradata: Arbitrary (software-imposed) padding + * Total size = align((Y_Stride * Y_Scanlines + * + UV_Stride * UV_Scanlines + * + max(Extradata, Y_Stride * 8), 4096) + */ + COLOR_FMT_NV12, + + /* Venus NV21: + * YUV 4:2:0 image with a plane of 8 bit Y samples followed + * by an interleaved V/U plane containing 8 bit 2x2 subsampled + * colour difference samples. + * + * <-------- Y/UV_Stride --------> + * <------- Width -------> + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . ^ ^ + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . | | + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . Height | + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . | Y_Scanlines + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . | | + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . | | + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . | | + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . V | + * . . . . . . . . . . . . . . . . | + * . . . . . . . . . . . . . . . . | + * . . . . . . . . . . . . . . . . | + * . . . . . . . . . . . . . . . . V + * V U V U V U V U V U V U . . . . ^ + * V U V U V U V U V U V U . . . . | + * V U V U V U V U V U V U . . . . | + * V U V U V U V U V U V U . . . . UV_Scanlines + * . . . . . . . . . . . . . . . . | + * . . . . . . . . . . . . . . . . V + * . . . . . . . . . . . . . . . . --> Padding & Buffer size alignment + * + * Y_Stride : Width aligned to 128 + * UV_Stride : Width aligned to 128 + * Y_Scanlines: Height aligned to 32 + * UV_Scanlines: Height/2 aligned to 16 + * Extradata: Arbitrary (software-imposed) padding + * Total size = align((Y_Stride * Y_Scanlines + * + UV_Stride * UV_Scanlines + * + max(Extradata, Y_Stride * 8), 4096) + */ + COLOR_FMT_NV21, + /* Venus NV12_MVTB: + * Two YUV 4:2:0 images/views one after the other + * in a top-bottom layout, same as NV12 + * with a plane of 8 bit Y samples followed + * by an interleaved U/V plane containing 8 bit 2x2 subsampled + * colour difference samples. + * + * + * <-------- Y/UV_Stride --------> + * <------- Width -------> + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . ^ ^ ^ + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . | | | + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . Height | | + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . | Y_Scanlines | + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . | | | + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . | | | + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . | | | + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . V | | + * . . . . . . . . . . . . . . . . | View_1 + * . . . . . . . . . . . . . . . . | | + * . . . . . . . . . . . . . . . . | | + * . . . . . . . . . . . . . . . . V | + * U V U V U V U V U V U V . . . . ^ | + * U V U V U V U V U V U V . . . . | | + * U V U V U V U V U V U V . . . . | | + * U V U V U V U V U V U V . . . . UV_Scanlines | + * . . . . . . . . . . . . . . . . | | + * . . . . . . . . . . . . . . . . V V + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . ^ ^ ^ + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . | | | + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . Height | | + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . | Y_Scanlines | + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . | | | + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . | | | + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . | | | + * Y Y Y Y Y Y Y Y Y Y Y Y . . . . V | | + * . . . . . . . . . . . . . . . . | View_2 + * . . . . . . . . . . . . . . . . | | + * . . . . . . . . . . . . . . . . | | + * . . . . . . . . . . . . . . . . V | + * U V U V U V U V U V U V . . . . ^ | + * U V U V U V U V U V U V . . . . | | + * U V U V U V U V U V U V . . . . | | + * U V U V U V U V U V U V . . . . UV_Scanlines | + * . . . . . . . . . . . . . . . . | | + * . . . . . . . . . . . . . . . . V V + * . . . . . . . . . . . . . . . . --> Buffer size alignment + * + * Y_Stride : Width aligned to 128 + * UV_Stride : Width aligned to 128 + * Y_Scanlines: Height aligned to 32 + * UV_Scanlines: Height/2 aligned to 16 + * View_1 begin at: 0 (zero) + * View_2 begin at: Y_Stride * Y_Scanlines + UV_Stride * UV_Scanlines + * Extradata: Arbitrary (software-imposed) padding + * Total size = align((2*(Y_Stride * Y_Scanlines) + * + 2*(UV_Stride * UV_Scanlines) + Extradata), 4096) + */ + COLOR_FMT_NV12_MVTB, + /* Venus NV12 UBWC: + * Compressed Macro-tile format for NV12. + * Contains 4 planes in the following order - + * (A) Y_Meta_Plane + * (B) Y_UBWC_Plane + * (C) UV_Meta_Plane + * (D) UV_UBWC_Plane + * + * Y_Meta_Plane consists of meta information to decode compressed + * tile data in Y_UBWC_Plane. + * Y_UBWC_Plane consists of Y data in compressed macro-tile format. + * UBWC decoder block will use the Y_Meta_Plane data together with + * Y_UBWC_Plane data to produce loss-less uncompressed 8 bit Y samples. + * + * UV_Meta_Plane consists of meta information to decode compressed + * tile data in UV_UBWC_Plane. + * UV_UBWC_Plane consists of UV data in compressed macro-tile format. + * UBWC decoder block will use UV_Meta_Plane data together with + * UV_UBWC_Plane data to produce loss-less uncompressed 8 bit 2x2 + * subsampled color difference samples. + * + * Each tile in Y_UBWC_Plane/UV_UBWC_Plane is independently decodable + * and randomly accessible. There is no dependency between tiles. + * + * <----- Y_Meta_Stride ----> + * <-------- Width ------> + * M M M M M M M M M M M M . . ^ ^ + * M M M M M M M M M M M M . . | | + * M M M M M M M M M M M M . . Height | + * M M M M M M M M M M M M . . | Meta_Y_Scanlines + * M M M M M M M M M M M M . . | | + * M M M M M M M M M M M M . . | | + * M M M M M M M M M M M M . . | | + * M M M M M M M M M M M M . . V | + * . . . . . . . . . . . . . . | + * . . . . . . . . . . . . . . | + * . . . . . . . . . . . . . . -------> Buffer size aligned to 4k + * . . . . . . . . . . . . . . V + * <--Compressed tile Y Stride---> + * <------- Width -------> + * Y* Y* Y* Y* Y* Y* Y* Y* . . . . ^ ^ + * Y* Y* Y* Y* Y* Y* Y* Y* . . . . | | + * Y* Y* Y* Y* Y* Y* Y* Y* . . . . Height | + * Y* Y* Y* Y* Y* Y* Y* Y* . . . . | Macro_tile_Y_Scanlines + * Y* Y* Y* Y* Y* Y* Y* Y* . . . . | | + * Y* Y* Y* Y* Y* Y* Y* Y* . . . . | | + * Y* Y* Y* Y* Y* Y* Y* Y* . . . . | | + * Y* Y* Y* Y* Y* Y* Y* Y* . . . . V | + * . . . . . . . . . . . . . . . . | + * . . . . . . . . . . . . . . . . | + * . . . . . . . . . . . . . . . . -------> Buffer size aligned to 4k + * . . . . . . . . . . . . . . . . V + * <----- UV_Meta_Stride ----> + * M M M M M M M M M M M M . . ^ + * M M M M M M M M M M M M . . | + * M M M M M M M M M M M M . . | + * M M M M M M M M M M M M . . M_UV_Scanlines + * . . . . . . . . . . . . . . | + * . . . . . . . . . . . . . . V + * . . . . . . . . . . . . . . -------> Buffer size aligned to 4k + * <--Compressed tile UV Stride---> + * U* V* U* V* U* V* U* V* . . . . ^ + * U* V* U* V* U* V* U* V* . . . . | + * U* V* U* V* U* V* U* V* . . . . | + * U* V* U* V* U* V* U* V* . . . . UV_Scanlines + * . . . . . . . . . . . . . . . . | + * . . . . . . . . . . . . . . . . V + * . . . . . . . . . . . . . . . . -------> Buffer size aligned to 4k + * + * Y_Stride = align(Width, 128) + * UV_Stride = align(Width, 128) + * Y_Scanlines = align(Height, 32) + * UV_Scanlines = align(Height/2, 16) + * Y_UBWC_Plane_size = align(Y_Stride * Y_Scanlines, 4096) + * UV_UBWC_Plane_size = align(UV_Stride * UV_Scanlines, 4096) + * Y_Meta_Stride = align(roundup(Width, Y_TileWidth), 64) + * Y_Meta_Scanlines = align(roundup(Height, Y_TileHeight), 16) + * Y_Meta_Plane_size = align(Y_Meta_Stride * Y_Meta_Scanlines, 4096) + * UV_Meta_Stride = align(roundup(Width, UV_TileWidth), 64) + * UV_Meta_Scanlines = align(roundup(Height, UV_TileHeight), 16) + * UV_Meta_Plane_size = align(UV_Meta_Stride * UV_Meta_Scanlines, 4096) + * Extradata = 8k + * + * Total size = align( Y_UBWC_Plane_size + UV_UBWC_Plane_size + + * Y_Meta_Plane_size + UV_Meta_Plane_size + * + max(Extradata, Y_Stride * 48), 4096) + */ + COLOR_FMT_NV12_UBWC, + /* Venus NV12 10-bit UBWC: + * Compressed Macro-tile format for NV12. + * Contains 4 planes in the following order - + * (A) Y_Meta_Plane + * (B) Y_UBWC_Plane + * (C) UV_Meta_Plane + * (D) UV_UBWC_Plane + * + * Y_Meta_Plane consists of meta information to decode compressed + * tile data in Y_UBWC_Plane. + * Y_UBWC_Plane consists of Y data in compressed macro-tile format. + * UBWC decoder block will use the Y_Meta_Plane data together with + * Y_UBWC_Plane data to produce loss-less uncompressed 10 bit Y samples. + * + * UV_Meta_Plane consists of meta information to decode compressed + * tile data in UV_UBWC_Plane. + * UV_UBWC_Plane consists of UV data in compressed macro-tile format. + * UBWC decoder block will use UV_Meta_Plane data together with + * UV_UBWC_Plane data to produce loss-less uncompressed 10 bit 2x2 + * subsampled color difference samples. + * + * Each tile in Y_UBWC_Plane/UV_UBWC_Plane is independently decodable + * and randomly accessible. There is no dependency between tiles. + * + * <----- Y_Meta_Stride -----> + * <-------- Width ------> + * M M M M M M M M M M M M . . ^ ^ + * M M M M M M M M M M M M . . | | + * M M M M M M M M M M M M . . Height | + * M M M M M M M M M M M M . . | Meta_Y_Scanlines + * M M M M M M M M M M M M . . | | + * M M M M M M M M M M M M . . | | + * M M M M M M M M M M M M . . | | + * M M M M M M M M M M M M . . V | + * . . . . . . . . . . . . . . | + * . . . . . . . . . . . . . . | + * . . . . . . . . . . . . . . -------> Buffer size aligned to 4k + * . . . . . . . . . . . . . . V + * <--Compressed tile Y Stride---> + * <------- Width -------> + * Y* Y* Y* Y* Y* Y* Y* Y* . . . . ^ ^ + * Y* Y* Y* Y* Y* Y* Y* Y* . . . . | | + * Y* Y* Y* Y* Y* Y* Y* Y* . . . . Height | + * Y* Y* Y* Y* Y* Y* Y* Y* . . . . | Macro_tile_Y_Scanlines + * Y* Y* Y* Y* Y* Y* Y* Y* . . . . | | + * Y* Y* Y* Y* Y* Y* Y* Y* . . . . | | + * Y* Y* Y* Y* Y* Y* Y* Y* . . . . | | + * Y* Y* Y* Y* Y* Y* Y* Y* . . . . V | + * . . . . . . . . . . . . . . . . | + * . . . . . . . . . . . . . . . . | + * . . . . . . . . . . . . . . . . -------> Buffer size aligned to 4k + * . . . . . . . . . . . . . . . . V + * <----- UV_Meta_Stride ----> + * M M M M M M M M M M M M . . ^ + * M M M M M M M M M M M M . . | + * M M M M M M M M M M M M . . | + * M M M M M M M M M M M M . . M_UV_Scanlines + * . . . . . . . . . . . . . . | + * . . . . . . . . . . . . . . V + * . . . . . . . . . . . . . . -------> Buffer size aligned to 4k + * <--Compressed tile UV Stride---> + * U* V* U* V* U* V* U* V* . . . . ^ + * U* V* U* V* U* V* U* V* . . . . | + * U* V* U* V* U* V* U* V* . . . . | + * U* V* U* V* U* V* U* V* . . . . UV_Scanlines + * . . . . . . . . . . . . . . . . | + * . . . . . . . . . . . . . . . . V + * . . . . . . . . . . . . . . . . -------> Buffer size aligned to 4k + * + * + * Y_Stride = align(Width * 4/3, 128) + * UV_Stride = align(Width * 4/3, 128) + * Y_Scanlines = align(Height, 32) + * UV_Scanlines = align(Height/2, 16) + * Y_UBWC_Plane_Size = align(Y_Stride * Y_Scanlines, 4096) + * UV_UBWC_Plane_Size = align(UV_Stride * UV_Scanlines, 4096) + * Y_Meta_Stride = align(roundup(Width, Y_TileWidth), 64) + * Y_Meta_Scanlines = align(roundup(Height, Y_TileHeight), 16) + * Y_Meta_Plane_size = align(Y_Meta_Stride * Y_Meta_Scanlines, 4096) + * UV_Meta_Stride = align(roundup(Width, UV_TileWidth), 64) + * UV_Meta_Scanlines = align(roundup(Height, UV_TileHeight), 16) + * UV_Meta_Plane_size = align(UV_Meta_Stride * UV_Meta_Scanlines, 4096) + * Extradata = 8k + * + * Total size = align(Y_UBWC_Plane_size + UV_UBWC_Plane_size + + * Y_Meta_Plane_size + UV_Meta_Plane_size + * + max(Extradata, Y_Stride * 48), 4096) + */ + COLOR_FMT_NV12_BPP10_UBWC, + /* Venus RGBA8888 format: + * Contains 1 plane in the following order - + * (A) RGBA plane + * + * <-------- RGB_Stride --------> + * <------- Width -------> + * R R R R R R R R R R R R . . . . ^ ^ + * R R R R R R R R R R R R . . . . | | + * R R R R R R R R R R R R . . . . Height | + * R R R R R R R R R R R R . . . . | RGB_Scanlines + * R R R R R R R R R R R R . . . . | | + * R R R R R R R R R R R R . . . . | | + * R R R R R R R R R R R R . . . . | | + * R R R R R R R R R R R R . . . . V | + * . . . . . . . . . . . . . . . . | + * . . . . . . . . . . . . . . . . | + * . . . . . . . . . . . . . . . . | + * . . . . . . . . . . . . . . . . V + * + * RGB_Stride = align(Width * 4, 128) + * RGB_Scanlines = align(Height, 32) + * RGB_Plane_size = align(RGB_Stride * RGB_Scanlines, 4096) + * Extradata = 8k + * + * Total size = align(RGB_Plane_size + Extradata, 4096) + */ + COLOR_FMT_RGBA8888, + /* Venus RGBA8888 UBWC format: + * Contains 2 planes in the following order - + * (A) Meta plane + * (B) RGBA plane + * + * <--- RGB_Meta_Stride ----> + * <-------- Width ------> + * M M M M M M M M M M M M . . ^ ^ + * M M M M M M M M M M M M . . | | + * M M M M M M M M M M M M . . Height | + * M M M M M M M M M M M M . . | Meta_RGB_Scanlines + * M M M M M M M M M M M M . . | | + * M M M M M M M M M M M M . . | | + * M M M M M M M M M M M M . . | | + * M M M M M M M M M M M M . . V | + * . . . . . . . . . . . . . . | + * . . . . . . . . . . . . . . | + * . . . . . . . . . . . . . . -------> Buffer size aligned to 4k + * . . . . . . . . . . . . . . V + * <-------- RGB_Stride --------> + * <------- Width -------> + * R R R R R R R R R R R R . . . . ^ ^ + * R R R R R R R R R R R R . . . . | | + * R R R R R R R R R R R R . . . . Height | + * R R R R R R R R R R R R . . . . | RGB_Scanlines + * R R R R R R R R R R R R . . . . | | + * R R R R R R R R R R R R . . . . | | + * R R R R R R R R R R R R . . . . | | + * R R R R R R R R R R R R . . . . V | + * . . . . . . . . . . . . . . . . | + * . . . . . . . . . . . . . . . . | + * . . . . . . . . . . . . . . . . -------> Buffer size aligned to 4k + * . . . . . . . . . . . . . . . . V + * + * RGB_Stride = align(Width * 4, 128) + * RGB_Scanlines = align(Height, 32) + * RGB_Plane_size = align(RGB_Stride * RGB_Scanlines, 4096) + * RGB_Meta_Stride = align(roundup(Width, RGB_TileWidth), 64) + * RGB_Meta_Scanline = align(roundup(Height, RGB_TileHeight), 16) + * RGB_Meta_Plane_size = align(RGB_Meta_Stride * + * RGB_Meta_Scanlines, 4096) + * Extradata = 8k + * + * Total size = align(RGB_Meta_Plane_size + RGB_Plane_size + + * Extradata, 4096) + */ + COLOR_FMT_RGBA8888_UBWC, +}; + +static inline unsigned int VENUS_EXTRADATA_SIZE(int width, int height) +{ + (void)height; + (void)width; + + /* + * In the future, calculate the size based on the w/h but just + * hardcode it for now since 16K satisfies all current usecases. + */ + return 16 * 1024; +} + +static inline unsigned int VENUS_Y_STRIDE(int color_fmt, int width) +{ + unsigned int alignment, stride = 0; + if (!width) + goto invalid_input; + + switch (color_fmt) { + case COLOR_FMT_NV21: + case COLOR_FMT_NV12: + case COLOR_FMT_NV12_MVTB: + case COLOR_FMT_NV12_UBWC: + alignment = 128; + stride = MSM_MEDIA_ALIGN(width, alignment); + break; + case COLOR_FMT_NV12_BPP10_UBWC: + alignment = 256; + stride = MSM_MEDIA_ALIGN(width, 192); + stride = MSM_MEDIA_ALIGN(stride * 4/3, alignment); + break; + default: + break; + } +invalid_input: + return stride; +} + +static inline unsigned int VENUS_UV_STRIDE(int color_fmt, int width) +{ + unsigned int alignment, stride = 0; + if (!width) + goto invalid_input; + + switch (color_fmt) { + case COLOR_FMT_NV21: + case COLOR_FMT_NV12: + case COLOR_FMT_NV12_MVTB: + case COLOR_FMT_NV12_UBWC: + alignment = 128; + stride = MSM_MEDIA_ALIGN(width, alignment); + break; + case COLOR_FMT_NV12_BPP10_UBWC: + alignment = 256; + stride = MSM_MEDIA_ALIGN(width, 192); + stride = MSM_MEDIA_ALIGN(stride * 4/3, alignment); + break; + default: + break; + } +invalid_input: + return stride; +} + +static inline unsigned int VENUS_Y_SCANLINES(int color_fmt, int height) +{ + unsigned int alignment, sclines = 0; + if (!height) + goto invalid_input; + + switch (color_fmt) { + case COLOR_FMT_NV21: + case COLOR_FMT_NV12: + case COLOR_FMT_NV12_MVTB: + case COLOR_FMT_NV12_UBWC: + alignment = 32; + break; + case COLOR_FMT_NV12_BPP10_UBWC: + alignment = 16; + break; + default: + return 0; + } + sclines = MSM_MEDIA_ALIGN(height, alignment); +invalid_input: + return sclines; +} + +static inline unsigned int VENUS_UV_SCANLINES(int color_fmt, int height) +{ + unsigned int alignment, sclines = 0; + if (!height) + goto invalid_input; + + switch (color_fmt) { + case COLOR_FMT_NV21: + case COLOR_FMT_NV12: + case COLOR_FMT_NV12_MVTB: + case COLOR_FMT_NV12_BPP10_UBWC: + alignment = 16; + break; + case COLOR_FMT_NV12_UBWC: + alignment = 32; + break; + default: + goto invalid_input; + } + + sclines = MSM_MEDIA_ALIGN(height / 2, alignment); + +invalid_input: + return sclines; +} + +static inline unsigned int VENUS_Y_META_STRIDE(int color_fmt, int width) +{ + int y_tile_width = 0, y_meta_stride = 0; + + if (!width) + goto invalid_input; + + switch (color_fmt) { + case COLOR_FMT_NV12_UBWC: + y_tile_width = 32; + break; + case COLOR_FMT_NV12_BPP10_UBWC: + y_tile_width = 48; + break; + default: + goto invalid_input; + } + + y_meta_stride = MSM_MEDIA_ROUNDUP(width, y_tile_width); + y_meta_stride = MSM_MEDIA_ALIGN(y_meta_stride, 64); + +invalid_input: + return y_meta_stride; +} + +static inline unsigned int VENUS_Y_META_SCANLINES(int color_fmt, int height) +{ + int y_tile_height = 0, y_meta_scanlines = 0; + + if (!height) + goto invalid_input; + + switch (color_fmt) { + case COLOR_FMT_NV12_UBWC: + y_tile_height = 8; + break; + case COLOR_FMT_NV12_BPP10_UBWC: + y_tile_height = 4; + break; + default: + goto invalid_input; + } + + y_meta_scanlines = MSM_MEDIA_ROUNDUP(height, y_tile_height); + y_meta_scanlines = MSM_MEDIA_ALIGN(y_meta_scanlines, 16); + +invalid_input: + return y_meta_scanlines; +} + +static inline unsigned int VENUS_UV_META_STRIDE(int color_fmt, int width) +{ + int uv_tile_width = 0, uv_meta_stride = 0; + + if (!width) + goto invalid_input; + + switch (color_fmt) { + case COLOR_FMT_NV12_UBWC: + uv_tile_width = 16; + break; + case COLOR_FMT_NV12_BPP10_UBWC: + uv_tile_width = 24; + break; + default: + goto invalid_input; + } + + uv_meta_stride = MSM_MEDIA_ROUNDUP(width / 2, uv_tile_width); + uv_meta_stride = MSM_MEDIA_ALIGN(uv_meta_stride, 64); + +invalid_input: + return uv_meta_stride; +} + +static inline unsigned int VENUS_UV_META_SCANLINES(int color_fmt, int height) +{ + int uv_tile_height = 0, uv_meta_scanlines = 0; + + if (!height) + goto invalid_input; + + switch (color_fmt) { + case COLOR_FMT_NV12_UBWC: + uv_tile_height = 8; + break; + case COLOR_FMT_NV12_BPP10_UBWC: + uv_tile_height = 4; + break; + default: + goto invalid_input; + } + + uv_meta_scanlines = MSM_MEDIA_ROUNDUP(height / 2, uv_tile_height); + uv_meta_scanlines = MSM_MEDIA_ALIGN(uv_meta_scanlines, 16); + +invalid_input: + return uv_meta_scanlines; +} + +static inline unsigned int VENUS_RGB_STRIDE(int color_fmt, int width) +{ + unsigned int alignment = 0, stride = 0; + if (!width) + goto invalid_input; + + switch (color_fmt) { + case COLOR_FMT_RGBA8888: + alignment = 128; + break; + case COLOR_FMT_RGBA8888_UBWC: + alignment = 256; + break; + default: + goto invalid_input; + } + + stride = MSM_MEDIA_ALIGN(width * 4, alignment); + +invalid_input: + return stride; +} + +static inline unsigned int VENUS_RGB_SCANLINES(int color_fmt, int height) +{ + unsigned int alignment = 0, scanlines = 0; + + if (!height) + goto invalid_input; + + switch (color_fmt) { + case COLOR_FMT_RGBA8888: + alignment = 32; + break; + case COLOR_FMT_RGBA8888_UBWC: + alignment = 16; + break; + default: + goto invalid_input; + } + + scanlines = MSM_MEDIA_ALIGN(height, alignment); + +invalid_input: + return scanlines; +} + +static inline unsigned int VENUS_RGB_META_STRIDE(int color_fmt, int width) +{ + int rgb_tile_width = 0, rgb_meta_stride = 0; + + if (!width) + goto invalid_input; + + switch (color_fmt) { + case COLOR_FMT_RGBA8888_UBWC: + rgb_tile_width = 16; + break; + default: + goto invalid_input; + } + + rgb_meta_stride = MSM_MEDIA_ROUNDUP(width, rgb_tile_width); + rgb_meta_stride = MSM_MEDIA_ALIGN(rgb_meta_stride, 64); + +invalid_input: + return rgb_meta_stride; +} + +static inline unsigned int VENUS_RGB_META_SCANLINES(int color_fmt, int height) +{ + int rgb_tile_height = 0, rgb_meta_scanlines = 0; + + if (!height) + goto invalid_input; + + switch (color_fmt) { + case COLOR_FMT_RGBA8888_UBWC: + rgb_tile_height = 4; + break; + default: + goto invalid_input; + } + + rgb_meta_scanlines = MSM_MEDIA_ROUNDUP(height, rgb_tile_height); + rgb_meta_scanlines = MSM_MEDIA_ALIGN(rgb_meta_scanlines, 16); + +invalid_input: + return rgb_meta_scanlines; +} + +static inline unsigned int VENUS_BUFFER_SIZE( + int color_fmt, int width, int height) +{ + const unsigned int extra_size = VENUS_EXTRADATA_SIZE(width, height); + unsigned int uv_alignment = 0, size = 0; + unsigned int y_plane, uv_plane, y_stride, + uv_stride, y_sclines, uv_sclines; + unsigned int y_ubwc_plane = 0, uv_ubwc_plane = 0; + unsigned int y_meta_stride = 0, y_meta_scanlines = 0; + unsigned int uv_meta_stride = 0, uv_meta_scanlines = 0; + unsigned int y_meta_plane = 0, uv_meta_plane = 0; + unsigned int rgb_stride = 0, rgb_scanlines = 0; + unsigned int rgb_plane = 0, rgb_ubwc_plane = 0, rgb_meta_plane = 0; + unsigned int rgb_meta_stride = 0, rgb_meta_scanlines = 0; + + if (!width || !height) + goto invalid_input; + + y_stride = VENUS_Y_STRIDE(color_fmt, width); + uv_stride = VENUS_UV_STRIDE(color_fmt, width); + y_sclines = VENUS_Y_SCANLINES(color_fmt, height); + uv_sclines = VENUS_UV_SCANLINES(color_fmt, height); + rgb_stride = VENUS_RGB_STRIDE(color_fmt, width); + rgb_scanlines = VENUS_RGB_SCANLINES(color_fmt, height); + + switch (color_fmt) { + case COLOR_FMT_NV21: + case COLOR_FMT_NV12: + uv_alignment = 4096; + y_plane = y_stride * y_sclines; + uv_plane = uv_stride * uv_sclines + uv_alignment; + size = y_plane + uv_plane + + MSM_MEDIA_MAX(extra_size, 8 * y_stride); + size = MSM_MEDIA_ALIGN(size, 4096); + break; + case COLOR_FMT_NV12_MVTB: + uv_alignment = 4096; + y_plane = y_stride * y_sclines; + uv_plane = uv_stride * uv_sclines + uv_alignment; + size = y_plane + uv_plane; + size = 2 * size + extra_size; + size = MSM_MEDIA_ALIGN(size, 4096); + break; + case COLOR_FMT_NV12_UBWC: + case COLOR_FMT_NV12_BPP10_UBWC: + y_ubwc_plane = MSM_MEDIA_ALIGN(y_stride * y_sclines, 4096); + uv_ubwc_plane = MSM_MEDIA_ALIGN(uv_stride * uv_sclines, 4096); + y_meta_stride = VENUS_Y_META_STRIDE(color_fmt, width); + y_meta_scanlines = VENUS_Y_META_SCANLINES(color_fmt, height); + y_meta_plane = MSM_MEDIA_ALIGN( + y_meta_stride * y_meta_scanlines, 4096); + uv_meta_stride = VENUS_UV_META_STRIDE(color_fmt, width); + uv_meta_scanlines = VENUS_UV_META_SCANLINES(color_fmt, height); + uv_meta_plane = MSM_MEDIA_ALIGN(uv_meta_stride * + uv_meta_scanlines, 4096); + + size = y_ubwc_plane + uv_ubwc_plane + y_meta_plane + + uv_meta_plane + + MSM_MEDIA_MAX(extra_size + 8192, 48 * y_stride); + size = MSM_MEDIA_ALIGN(size, 4096); + break; + case COLOR_FMT_RGBA8888: + rgb_plane = MSM_MEDIA_ALIGN(rgb_stride * rgb_scanlines, 4096); + size = rgb_plane; + size = MSM_MEDIA_ALIGN(size, 4096); + break; + case COLOR_FMT_RGBA8888_UBWC: + rgb_ubwc_plane = MSM_MEDIA_ALIGN(rgb_stride * rgb_scanlines, + 4096); + rgb_meta_stride = VENUS_RGB_META_STRIDE(color_fmt, width); + rgb_meta_scanlines = VENUS_RGB_META_SCANLINES(color_fmt, + height); + rgb_meta_plane = MSM_MEDIA_ALIGN(rgb_meta_stride * + rgb_meta_scanlines, 4096); + size = rgb_ubwc_plane + rgb_meta_plane; + size = MSM_MEDIA_ALIGN(size, 4096); + break; + default: + break; + } +invalid_input: + return size; +} + +static inline unsigned int VENUS_VIEW2_OFFSET( + int color_fmt, int width, int height) +{ + unsigned int offset = 0; + unsigned int y_plane, uv_plane, y_stride, + uv_stride, y_sclines, uv_sclines; + if (!width || !height) + goto invalid_input; + + y_stride = VENUS_Y_STRIDE(color_fmt, width); + uv_stride = VENUS_UV_STRIDE(color_fmt, width); + y_sclines = VENUS_Y_SCANLINES(color_fmt, height); + uv_sclines = VENUS_UV_SCANLINES(color_fmt, height); + switch (color_fmt) { + case COLOR_FMT_NV12_MVTB: + y_plane = y_stride * y_sclines; + uv_plane = uv_stride * uv_sclines; + offset = y_plane + uv_plane; + break; + default: + break; + } +invalid_input: + return offset; +} + +#endif diff --git a/selfdrive/loggerd/logger.c b/selfdrive/loggerd/logger.c new file mode 100644 index 0000000000..7dfb610bad --- /dev/null +++ b/selfdrive/loggerd/logger.c @@ -0,0 +1,217 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include "common/swaglog.h" + +#include "logger.h" + +static int mkpath(char* file_path) { + assert(file_path && *file_path); + char* p; + for (p=strchr(file_path+1, '/'); p; p=strchr(p+1, '/')) { + *p = '\0'; + if (mkdir(file_path, 0777)==-1) { + if (errno != EEXIST) { + *p = '/'; + return -1; + } + } + *p = '/'; + } + return 0; +} + +void logger_init(LoggerState *s, const char* log_name, const uint8_t* init_data, size_t init_data_len, bool has_qlog) { + memset(s, 0, sizeof(*s)); + if (init_data) { + s->init_data = (uint8_t*)malloc(init_data_len); + assert(s->init_data); + memcpy(s->init_data, init_data, init_data_len); + s->init_data_len = init_data_len; + } + + umask(0); + + pthread_mutex_init(&s->lock, NULL); + + s->part = -1; + s->has_qlog = has_qlog; + + time_t rawtime = time(NULL); + struct tm timeinfo; + localtime_r(&rawtime, &timeinfo); + + strftime(s->route_name, sizeof(s->route_name), + "%Y-%m-%d--%H-%M-%S", &timeinfo); + snprintf(s->log_name, sizeof(s->log_name), "%s", log_name); +} + +static LoggerHandle* logger_open(LoggerState *s, const char* root_path) { + int err; + + LoggerHandle *h = NULL; + for (int i=0; ihandles[i].refcnt == 0) { + h = &s->handles[i]; + break; + } + } + assert(h); + + snprintf(h->segment_path, sizeof(h->segment_path), + "%s/%s--%d", root_path, s->route_name, s->part); + + snprintf(h->log_path, sizeof(h->log_path), "%s/%s.bz2", h->segment_path, s->log_name); + snprintf(h->qlog_path, sizeof(h->qlog_path), "%s/qlog.bz2", h->segment_path); + snprintf(h->lock_path, sizeof(h->lock_path), "%s.lock", h->log_path); + + err = mkpath(h->log_path); + if (err) return NULL; + + FILE* lock_file = fopen(h->lock_path, "wb"); + if (lock_file == NULL) return NULL; + fclose(lock_file); + + h->log_file = fopen(h->log_path, "wb"); + if (h->log_file == NULL) goto fail; + + if (s->has_qlog) { + h->qlog_file = fopen(h->qlog_path, "wb"); + if (h->qlog_file == NULL) goto fail; + } + + int bzerror; + h->bz_file = BZ2_bzWriteOpen(&bzerror, h->log_file, 9, 0, 30); + if (bzerror != BZ_OK) goto fail; + + if (s->has_qlog) { + h->bz_qlog = BZ2_bzWriteOpen(&bzerror, h->qlog_file, 9, 0, 30); + if (bzerror != BZ_OK) goto fail; + } + + if (s->init_data) { + BZ2_bzWrite(&bzerror, h->bz_file, s->init_data, s->init_data_len); + if (bzerror != BZ_OK) goto fail; + + if (s->has_qlog) { + // init data goes in the qlog too + BZ2_bzWrite(&bzerror, h->bz_qlog, s->init_data, s->init_data_len); + if (bzerror != BZ_OK) goto fail; + } + } + + pthread_mutex_init(&h->lock, NULL); + h->refcnt++; + return h; +fail: + LOGE("logger failed to open files"); + if (h->qlog_file) fclose(h->qlog_file); + if (h->log_file) fclose(h->log_file); + return NULL; +} + +int logger_next(LoggerState *s, const char* root_path, + char* out_segment_path, size_t out_segment_path_len, + int* out_part) { + pthread_mutex_lock(&s->lock); + s->part++; + + LoggerHandle* next_h = logger_open(s, root_path); + if (!next_h) { + pthread_mutex_unlock(&s->lock); + return -1; + } + + if (s->cur_handle) { + lh_close(s->cur_handle); + } + s->cur_handle = next_h; + + if (out_segment_path) { + snprintf(out_segment_path, out_segment_path_len, "%s", next_h->segment_path); + } + if (out_part) { + *out_part = s->part; + } + + pthread_mutex_unlock(&s->lock); + return 0; +} + +LoggerHandle* logger_get_handle(LoggerState *s) { + pthread_mutex_lock(&s->lock); + LoggerHandle* h = s->cur_handle; + if (h) { + pthread_mutex_lock(&h->lock); + h->refcnt++; + pthread_mutex_unlock(&h->lock); + } + pthread_mutex_unlock(&s->lock); + return h; +} + +void logger_log(LoggerState *s, uint8_t* data, size_t data_size, bool in_qlog) { + pthread_mutex_lock(&s->lock); + if (s->cur_handle) { + lh_log(s->cur_handle, data, data_size, in_qlog); + } + pthread_mutex_unlock(&s->lock); +} + +void logger_close(LoggerState *s) { + pthread_mutex_lock(&s->lock); + free(s->init_data); + if (s->cur_handle) { + lh_close(s->cur_handle); + } + pthread_mutex_unlock(&s->lock); +} + +void lh_log(LoggerHandle* h, uint8_t* data, size_t data_size, bool in_qlog) { + pthread_mutex_lock(&h->lock); + assert(h->refcnt > 0); + int bzerror; + BZ2_bzWrite(&bzerror, h->bz_file, data, data_size); + + if (in_qlog && h->bz_qlog != NULL) { + BZ2_bzWrite(&bzerror, h->bz_qlog, data, data_size); + } + pthread_mutex_unlock(&h->lock); +} + +void lh_close(LoggerHandle* h) { + pthread_mutex_lock(&h->lock); + assert(h->refcnt > 0); + h->refcnt--; + if (h->refcnt == 0) { + if (h->bz_file){ + int bzerror; + BZ2_bzWriteClose(&bzerror, h->bz_file, 0, NULL, NULL); + h->bz_file = NULL; + } + if (h->bz_qlog){ + int bzerror; + BZ2_bzWriteClose(&bzerror, h->bz_qlog, 0, NULL, NULL); + h->bz_qlog = NULL; + } + if (h->qlog_file) fclose(h->qlog_file); + fclose(h->log_file); + unlink(h->lock_path); + pthread_mutex_unlock(&h->lock); + pthread_mutex_destroy(&h->lock); + return; + } + pthread_mutex_unlock(&h->lock); +} diff --git a/selfdrive/loggerd/logger.h b/selfdrive/loggerd/logger.h new file mode 100644 index 0000000000..ab8798481c --- /dev/null +++ b/selfdrive/loggerd/logger.h @@ -0,0 +1,59 @@ +#ifndef LOGGER_H +#define LOGGER_H + +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define LOGGER_MAX_HANDLES 16 + +typedef struct LoggerHandle { + pthread_mutex_t lock; + int refcnt; + char segment_path[4096]; + char log_path[4096]; + char lock_path[4096]; + FILE* log_file; + BZFILE* bz_file; + + FILE* qlog_file; + char qlog_path[4096]; + BZFILE* bz_qlog; +} LoggerHandle; + +typedef struct LoggerState { + pthread_mutex_t lock; + + uint8_t* init_data; + size_t init_data_len; + + int part; + char route_name[64]; + char log_name[64]; + bool has_qlog; + + LoggerHandle handles[LOGGER_MAX_HANDLES]; + LoggerHandle* cur_handle; +} LoggerState; + +void logger_init(LoggerState *s, const char* log_name, const uint8_t* init_data, size_t init_data_len, bool has_qlog); +int logger_next(LoggerState *s, const char* root_path, + char* out_segment_path, size_t out_segment_path_len, + int* out_part); +LoggerHandle* logger_get_handle(LoggerState *s); +void logger_close(LoggerState *s); +void logger_log(LoggerState *s, uint8_t* data, size_t data_size, bool in_qlog); + +void lh_log(LoggerHandle* h, uint8_t* data, size_t data_size, bool in_qlog); +void lh_close(LoggerHandle* h); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/selfdrive/loggerd/loggerd b/selfdrive/loggerd/loggerd deleted file mode 100755 index e93c68c5a3..0000000000 --- a/selfdrive/loggerd/loggerd +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f340b8fa3d09329639271febcec3ba0c372e540a98ef47f7454811ddd575c253 -size 1703704 diff --git a/selfdrive/loggerd/loggerd.cc b/selfdrive/loggerd/loggerd.cc new file mode 100644 index 0000000000..db59780f0b --- /dev/null +++ b/selfdrive/loggerd/loggerd.cc @@ -0,0 +1,770 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include "common/version.h" +#include "common/timing.h" +#include "common/params.h" +#include "common/swaglog.h" +#include "common/visionipc.h" +#include "common/utilpp.h" +#include "common/util.h" + +#include "logger.h" + + +#ifndef DISABLE_ENCODER +#include "encoder.h" +#include "raw_logger.h" +#endif + +#include "cereal/gen/cpp/log.capnp.h" + +#define CAMERA_FPS 20 +#define SEGMENT_LENGTH 60 +#define LOG_ROOT "/data/media/0/realdata" +#define ENABLE_LIDAR 0 + +#define RAW_CLIP_LENGTH 100 // 5 seconds at 20fps +#define RAW_CLIP_FREQUENCY (randrange(61, 8*60)) // once every ~4 minutes + +namespace { + +double randrange(double a, double b) { + static std::mt19937 gen(millis_since_boot()); + + std::uniform_real_distribution<> dist(a, b); + return dist(gen); +} + + +volatile int do_exit = 0; +static void set_do_exit(int sig) { + do_exit = 1; +} +struct LoggerdState { + void *ctx; + LoggerState logger; + + std::mutex lock; + std::condition_variable cv; + char segment_path[4096]; + uint32_t last_frame_id; + uint32_t rotate_last_frame_id; + int rotate_segment; +}; +LoggerdState s; + +#ifndef DISABLE_ENCODER +void encoder_thread(bool is_streaming, bool raw_clips, bool front) { + int err; + + if (front) { + char *value; + const int result = read_db_value(NULL, "RecordFront", &value, NULL); + if (result != 0) return; + if (value[0] != '1') { free(value); return; } + free(value); + LOGW("recording front camera"); + + set_thread_name("FrontCameraEncoder"); + } else { + set_thread_name("RearCameraEncoder"); + } + + VisionStream stream; + + bool encoder_inited = false; + EncoderState encoder; + + int encoder_segment = -1; + int cnt = 0; + + void *idx_sock = zmq_socket(s.ctx, ZMQ_PUB); + assert(idx_sock); + zmq_bind(idx_sock, front ? "tcp://*:8061" : "tcp://*:8015"); + + LoggerHandle *lh = NULL; + + while (!do_exit) { + VisionStreamBufs buf_info; + if (front) { + err = visionstream_init(&stream, VISION_STREAM_YUV_FRONT, false, &buf_info); + } else { + err = visionstream_init(&stream, VISION_STREAM_YUV, false, &buf_info); + } + if (err != 0) { + LOGD("visionstream connect fail"); + usleep(100000); + continue; + } + + if (!encoder_inited) { + LOGD("encoder init %dx%d", buf_info.width, buf_info.height); + encoder_init(&encoder, front ? "dcamera" : "fcamera", buf_info.width, buf_info.height, CAMERA_FPS, front ? 1000000 : 5000000); + encoder_inited = true; + if (is_streaming) { + encoder.stream_sock_raw = zmq_socket(s.ctx, ZMQ_PUB); + assert(encoder.stream_sock_raw); + zmq_bind(encoder.stream_sock_raw, "tcp://*:9002"); + } + } + + // dont log a raw clip in the first minute + double rawlogger_start_time = seconds_since_boot()+RAW_CLIP_FREQUENCY; + int rawlogger_clip_cnt = 0; + RawLogger *rawlogger = NULL; + + if (raw_clips) { + rawlogger = new RawLogger("prcamera", buf_info.width, buf_info.height, CAMERA_FPS); + } + + while (!do_exit) { + VIPCBufExtra extra; + VIPCBuf* buf = visionstream_get(&stream, &extra); + if (buf == NULL) { + LOG("visionstream get failed"); + break; + } + + uint64_t current_time = nanos_since_boot(); + uint64_t diff = current_time - extra.timestamp_eof; + double msdiff = (double) diff / 1000000.0; + // printf("logger latency to tsEof: %f\n", msdiff); + + uint8_t *y = (uint8_t*)buf->addr; + uint8_t *u = y + (buf_info.width*buf_info.height); + uint8_t *v = u + (buf_info.width/2)*(buf_info.height/2); + + { + bool should_rotate = false; + std::unique_lock lk(s.lock); + if (!front) { + // wait if log camera is older on back camera + while ( extra.frame_id > s.last_frame_id //if the log camera is older, wait for it to catch up. + && (extra.frame_id-s.last_frame_id) < 8 // but if its too old then there probably was a discontinuity (visiond restarted) + && !do_exit) { + s.cv.wait(lk); + } + should_rotate = extra.frame_id > s.rotate_last_frame_id && encoder_segment < s.rotate_segment; + } else { + // front camera is best effort + should_rotate = encoder_segment < s.rotate_segment; + } + if (do_exit) break; + + // rotate the encoder if the logger is on a newer segment + if (should_rotate) { + LOG("rotate encoder to %s", s.segment_path); + + encoder_rotate(&encoder, s.segment_path, s.rotate_segment); + + if (raw_clips) { + rawlogger->Rotate(s.segment_path, s.rotate_segment); + } + + encoder_segment = s.rotate_segment; + if (lh) { + lh_close(lh); + } + lh = logger_get_handle(&s.logger); + } + } + + { + // encode hevc + int out_segment = -1; + int out_id = encoder_encode_frame(&encoder, cnt*50000ULL, + y, u, v, &out_segment, &extra); + + // publish encode index + capnp::MallocMessageBuilder msg; + cereal::Event::Builder event = msg.initRoot(); + event.setLogMonoTime(nanos_since_boot()); + auto eidx = event.initEncodeIdx(); + eidx.setFrameId(extra.frame_id); + eidx.setType(front ? cereal::EncodeIndex::Type::FRONT : cereal::EncodeIndex::Type::FULL_H_E_V_C); + eidx.setEncodeId(cnt); + eidx.setSegmentNum(out_segment); + eidx.setSegmentId(out_id); + + auto words = capnp::messageToFlatArray(msg); + auto bytes = words.asBytes(); + if (zmq_send(idx_sock, bytes.begin(), bytes.size(), 0) < 0) { + printf("err sending encodeIdx pkt: %s\n", strerror(errno)); + } + if (lh) { + lh_log(lh, bytes.begin(), bytes.size(), false); + } + } + + if (raw_clips) { + double ts = seconds_since_boot(); + if (ts > rawlogger_start_time) { + // encode raw if in clip + int out_segment = -1; + int out_id = rawlogger->LogFrame(cnt, y, u, v, &out_segment); + + if (rawlogger_clip_cnt == 0) { + LOG("starting raw clip in seg %d", out_segment); + } + + // publish encode index + capnp::MallocMessageBuilder msg; + cereal::Event::Builder event = msg.initRoot(); + event.setLogMonoTime(nanos_since_boot()); + auto eidx = event.initEncodeIdx(); + eidx.setFrameId(extra.frame_id); + eidx.setType(cereal::EncodeIndex::Type::FULL_LOSSLESS_CLIP); + eidx.setEncodeId(cnt); + eidx.setSegmentNum(out_segment); + eidx.setSegmentId(out_id); + + auto words = capnp::messageToFlatArray(msg); + auto bytes = words.asBytes(); + if (lh) { + lh_log(lh, bytes.begin(), bytes.size(), false); + } + + // close rawlogger if clip ended + rawlogger_clip_cnt++; + if (rawlogger_clip_cnt >= RAW_CLIP_LENGTH) { + rawlogger->Close(); + + rawlogger_clip_cnt = 0; + rawlogger_start_time = ts+RAW_CLIP_FREQUENCY; + + LOG("ending raw clip in seg %d, next in %.1f sec", out_segment, rawlogger_start_time-ts); + } + } + } + + cnt++; + } + + if (lh) { + lh_close(lh); + lh = NULL; + } + + if (raw_clips) { + rawlogger->Close(); + delete rawlogger; + } + + visionstream_destroy(&stream); + } + + if (encoder_inited) { + LOG("encoder destroy"); + encoder_close(&encoder); + encoder_destroy(&encoder); + } +} +#endif + +#if ENABLE_LIDAR + +#include +#include +#include +#include + +#define VELODYNE_DATA_PORT 2368 +#define VELODYNE_TELEMETRY_PORT 8308 + +#define MAX_LIDAR_PACKET 2048 + +int lidar_thread() { + // increase kernel max buffer size + system("sysctl -w net.core.rmem_max=26214400"); + set_thread_name("lidar"); + + int sock; + if ((sock = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { + perror("cannot create socket"); + return -1; + } + + int a = 26214400; + if (setsockopt(sock, SOL_SOCKET, SO_RCVBUF, &a, sizeof(int)) == -1) { + perror("cannot set socket opts"); + return -1; + } + + struct sockaddr_in addr; + memset(&addr, 0, sizeof(struct sockaddr_in)); + addr.sin_family = AF_INET; + addr.sin_port = htons(VELODYNE_DATA_PORT); + inet_aton("192.168.5.11", &(addr.sin_addr)); + + if (bind(sock, (struct sockaddr *) &addr, sizeof(addr)) < 0) { + perror("cannot bind LIDAR socket"); + return -1; + } + + capnp::byte buf[MAX_LIDAR_PACKET]; + + while (!do_exit) { + // receive message + struct sockaddr from; + socklen_t fromlen = sizeof(from); + int cnt = recvfrom(sock, (void *)buf, MAX_LIDAR_PACKET, 0, &from, &fromlen); + if (cnt <= 0) { + printf("bug in lidar recieve!\n"); + continue; + } + + // create message for log + capnp::MallocMessageBuilder msg; + auto event = msg.initRoot(); + event.setLogMonoTime(nanos_since_boot()); + auto lidar_pts = event.initLidarPts(); + + // copy in the buffer + // TODO: can we remove this copy? does it matter? + kj::ArrayPtr bufferPtr = kj::arrayPtr(buf, cnt); + lidar_pts.setPkt(bufferPtr); + + // log it + auto words = capnp::messageToFlatArray(msg); + auto bytes = words.asBytes(); + logger_log(&s.logger, bytes.begin(), bytes.size()); + } + return 0; +} +#endif + +} + +void append_property(const char* key, const char* value, void *cookie) { + std::vector > *properties = + (std::vector > *)cookie; + + properties->push_back(std::make_pair(std::string(key), std::string(value))); +} + +kj::Array gen_init_data() { + capnp::MallocMessageBuilder msg; + auto event = msg.initRoot(); + event.setLogMonoTime(nanos_since_boot()); + auto init = event.initInitData(); + + init.setDeviceType(cereal::InitData::DeviceType::NEO); + init.setVersion(capnp::Text::Reader(COMMA_VERSION)); + + std::ifstream cmdline_stream("/proc/cmdline"); + std::vector kernel_args; + std::string buf; + while (cmdline_stream >> buf) { + kernel_args.push_back(buf); + } + + auto lkernel_args = init.initKernelArgs(kernel_args.size()); + for (int i=0; i > properties; + property_list(append_property, (void*)&properties); + + auto lentries = init.initAndroidProperties().initEntries(properties.size()); + for (int i=0; i params; + read_db_all(NULL, ¶ms); + auto lparams = init.initParams().initEntries(params.size()); + int i = 0; + for (auto& kv : params) { + auto lentry = lparams[i]; + lentry.setKey(kv.first); + lentry.setValue(kv.second); + i++; + } + } + + + auto words = capnp::messageToFlatArray(msg); + + if (git_commit) { + free((void*)git_commit); + } + + if (git_branch) { + free((void*)git_branch); + } + + if (git_remote) { + free((void*)git_remote); + } + + if (passive) { + free((void*)passive); + } + + return words; +} + +static int clear_locks_fn(const char* fpath, const struct stat *sb, int tyupeflag) { + const char* dot = strrchr(fpath, '.'); + if (dot && strcmp(dot, ".lock") == 0) { + unlink(fpath); + } + return 0; +} + +static void clear_locks() { + ftw(LOG_ROOT, clear_locks_fn, 16); +} + +static void bootlog() { + int err; + + { + auto words = gen_init_data(); + auto bytes = words.asBytes(); + logger_init(&s.logger, "bootlog", bytes.begin(), bytes.size(), false); + } + + err = logger_next(&s.logger, LOG_ROOT, s.segment_path, sizeof(s.segment_path), &s.rotate_segment); + assert(err == 0); + LOGW("bootlog to %s", s.segment_path); + + { + capnp::MallocMessageBuilder msg; + auto event = msg.initRoot(); + event.setLogMonoTime(nanos_since_boot()); + + auto boot = event.initBoot(); + + boot.setWallTimeNanos(nanos_since_epoch()); + + std::string lastKmsg = util::read_file("/sys/fs/pstore/console-ramoops"); + boot.setLastKmsg(capnp::Data::Reader((const kj::byte*)lastKmsg.data(), lastKmsg.size())); + + std::string lastPmsg = util::read_file("/sys/fs/pstore/pmsg-ramoops-0"); + boot.setLastPmsg(capnp::Data::Reader((const kj::byte*)lastPmsg.data(), lastPmsg.size())); + + auto words = capnp::messageToFlatArray(msg); + auto bytes = words.asBytes(); + logger_log(&s.logger, bytes.begin(), bytes.size(), false); + } + + logger_close(&s.logger); +} + +int main(int argc, char** argv) { + int err; + + if (argc > 1 && strcmp(argv[1], "--bootlog") == 0) { + bootlog(); + return 0; + } + + setpriority(PRIO_PROCESS, 0, -12); + + clear_locks(); + + signal(SIGINT, (sighandler_t)set_do_exit); + signal(SIGTERM, (sighandler_t)set_do_exit); + + s.ctx = zmq_ctx_new(); + assert(s.ctx); + + std::set ts_replace_sock; + + std::string exe_dir = util::dir_name(util::readlink("/proc/self/exe")); + std::string service_list_path = exe_dir + "/../service_list.yaml"; + + // subscribe to all services + + void *frame_sock = NULL; + + // zmq_poll is slow because it has to be careful because the signaling + // fd is edge-triggered. we can be faster by knowing that we're not messing with it + // other than draining and polling + std::vector polls; + std::vector socks; + + std::map qlog_counter; + std::map qlog_freqs; + + YAML::Node service_list = YAML::LoadFile(service_list_path); + for (const auto& it : service_list) { + auto name = it.first.as(); + int port = it.second[0].as(); + bool should_log = it.second[1].as(); + int qlog_freq = it.second[3] ? it.second[3].as() : 0; + + if (should_log) { + void* sock = zmq_socket(s.ctx, ZMQ_SUB); + zmq_setsockopt(sock, ZMQ_SUBSCRIBE, "", 0); + + // make zmq will do exponential backoff from 100ms to 500ms for socket reconnects + int reconnect_ivl = 500; + zmq_setsockopt(sock, ZMQ_RECONNECT_IVL_MAX, &reconnect_ivl, sizeof(reconnect_ivl)); + + std::stringstream ss; + ss << "tcp://"; + if (it.second[4]) { + ss << it.second[4].as(); + ts_replace_sock.insert(sock); + } else{ + ss << "127.0.0.1"; + } + ss << ":" << port; + + zmq_connect(sock, ss.str().c_str()); + + struct pollfd pfd = {0}; + size_t fd_size = sizeof(pfd.fd); + err = zmq_getsockopt(sock, ZMQ_FD, &pfd.fd, &fd_size); + assert(err == 0); + pfd.events = POLLIN; + polls.push_back(pfd); + socks.push_back(sock); + + if (name == "frame") { + LOGD("found frame sock at port %d", port); + frame_sock = sock; + } + + qlog_counter[sock] = (qlog_freq == 0) ? -1 : 0; + qlog_freqs[sock] = qlog_freq; + } + } + + + { + auto words = gen_init_data(); + auto bytes = words.asBytes(); + logger_init(&s.logger, "rlog", bytes.begin(), bytes.size(), true); + } + + bool is_streaming = false; + bool is_logging = true; + + if (argc > 1 && strcmp(argv[1], "--stream") == 0) { + is_streaming = true; + } else if (argc > 1 && strcmp(argv[1], "--only-stream") == 0) { + is_streaming = true; + is_logging = false; + } + + if (is_logging) { + err = logger_next(&s.logger, LOG_ROOT, s.segment_path, sizeof(s.segment_path), &s.rotate_segment); + assert(err == 0); + LOGW("logging to %s", s.segment_path); + } + + double start_ts = seconds_since_boot(); + double last_rotate_ts = start_ts; + +#ifndef DISABLE_ENCODER + // rear camera + std::thread encoder_thread_handle(encoder_thread, is_streaming, false, false); + + // front camera + std::thread front_encoder_thread_handle(encoder_thread, false, false, true); +#endif + +#if ENABLE_LIDAR + std::thread lidar_thread_handle(lidar_thread); +#endif + + uint64_t msg_count = 0; + uint64_t bytes_count = 0; + + while (!do_exit) { + // err = zmq_poll(polls.data(), polls.size(), 100 * 1000); + err = poll(polls.data(), polls.size(), 100*1000); + if (err < 0) break; + + for (int i=0; i((len / sizeof(capnp::word)) + 1); + memcpy(amsg.begin(), data, len); + + // track camera frames to sync to encoder + capnp::FlatArrayMessageReader cmsg(amsg); + cereal::Event::Reader event = cmsg.getRoot(); + if (event.isFrame()) { + std::unique_lock lk(s.lock); + s.last_frame_id = event.getFrame().getFrameId(); + lk.unlock(); + s.cv.notify_all(); + } + } + + if (ts_replace_sock.find(socks[i]) != ts_replace_sock.end()) { + // get new time + uint64_t current_time = nanos_since_boot(); + + // read out the current message + /*auto amsg = kj::heapArray((len / sizeof(capnp::word)) + 1); + memcpy(amsg.begin(), data, len); + capnp::FlatArrayMessageReader cmsg(amsg); + cereal::Event::Reader revent = cmsg.getRoot(); + + // create a copy, ugh + capnp::MallocMessageBuilder msg; + msg.setRoot(revent); + + // replace the timestamp with the current timestamp on the phone + cereal::Event::Builder event = msg.getRoot(); + + // test it's correct + auto twords = capnp::messageToFlatArray(msg); + auto tbytes = twords.asBytes(); + assert(memcmp(data, tbytes.begin(), len) == 0); + + // modify it + event.setLogMonoTime(current_time); + + // put it back + auto words = capnp::messageToFlatArray(msg); + auto bytes = words.asBytes(); + memcpy(data, bytes.begin(), len);*/ + + // binary patching HACK! + assert(memcmp(data+0xC, "\x02\x00\x01\x00", 4) == 0); + memcpy(data+0x10, ¤t_time, sizeof(current_time)); + } + + logger_log(&s.logger, data, len, qlog_counter[socks[i]] == 0); + zmq_msg_close(&msg); + + if (qlog_counter[socks[i]] != -1) { + //printf("%p: %d/%d\n", socks[i], qlog_counter[socks[i]], qlog_freqs[socks[i]]); + qlog_counter[socks[i]]++; + qlog_counter[socks[i]] %= qlog_freqs[socks[i]]; + } + + bytes_count += len; + msg_count++; + } + } + + double ts = seconds_since_boot(); + if (ts - last_rotate_ts > SEGMENT_LENGTH) { + // rotate the log + + last_rotate_ts += SEGMENT_LENGTH; + + std::lock_guard guard(s.lock); + s.rotate_last_frame_id = s.last_frame_id; + + if (is_logging) { + err = logger_next(&s.logger, LOG_ROOT, s.segment_path, sizeof(s.segment_path), &s.rotate_segment); + assert(err == 0); + LOGW("rotated to %s", s.segment_path); + } + } + + if ((msg_count%1000) == 0) { + LOGD("%lu messages, %.2f msg/sec, %.2f KB/sec", msg_count, msg_count*1.0/(ts-start_ts), bytes_count*0.001/(ts-start_ts)); + } + } + + LOGW("joining threads"); + s.cv.notify_all(); + +#ifndef DISABLE_ENCODER + front_encoder_thread_handle.join(); + encoder_thread_handle.join(); + LOGW("encoder joined"); +#endif + +#if ENABLE_LIDAR + lidar_thread_handle.join(); + LOGW("lidar joined"); +#endif + + logger_close(&s.logger); + + return 0; +} diff --git a/selfdrive/loggerd/raw_logger.cc b/selfdrive/loggerd/raw_logger.cc new file mode 100644 index 0000000000..37b3f28428 --- /dev/null +++ b/selfdrive/loggerd/raw_logger.cc @@ -0,0 +1,163 @@ +#include +#include +#include + +#include +#include + +#define __STDC_CONSTANT_MACROS + +extern "C" { +#include +#include +#include +} + +#include "common/swaglog.h" +#include "common/utilpp.h" + +#include "raw_logger.h" + +RawLogger::RawLogger(const std::string &afilename, int awidth, int aheight, int afps) + : filename(afilename), + width(awidth), + height(aheight), + fps(afps) { + + int err = 0; + + av_register_all(); + codec = avcodec_find_encoder(AV_CODEC_ID_FFVHUFF); + // codec = avcodec_find_encoder(AV_CODEC_ID_FFV1); + assert(codec); + + codec_ctx = avcodec_alloc_context3(codec); + assert(codec_ctx); + codec_ctx->width = width; + codec_ctx->height = height; + codec_ctx->pix_fmt = AV_PIX_FMT_YUV420P; + + // codec_ctx->thread_count = 2; + + // ffv1enc doesn't respect AV_PICTURE_TYPE_I. make every frame a key frame for now. + // codec_ctx->gop_size = 0; + + codec_ctx->time_base = (AVRational){ 1, fps }; + + err = avcodec_open2(codec_ctx, codec, NULL); + assert(err >= 0); + + frame = av_frame_alloc(); + assert(frame); + frame->format = codec_ctx->pix_fmt; + frame->width = width; + frame->height = height; + frame->linesize[0] = width; + frame->linesize[1] = width/2; + frame->linesize[2] = width/2; +} + +RawLogger::~RawLogger() { + av_frame_free(&frame); + avcodec_close(codec_ctx); + av_free(codec_ctx); +} + +void RawLogger::Open(const std::string &path) { + int err = 0; + + std::lock_guard guard(lock); + + vid_path = util::string_format("%s/%s.mkv", path.c_str(), filename.c_str()); + + // create camera lock file + lock_path = util::string_format("%s/%s.lock", path.c_str(), filename.c_str()); + + LOG("open %s\n", lock_path.c_str()); + + int lock_fd = open(lock_path.c_str(), O_RDWR | O_CREAT, 0777); + assert(lock_fd >= 0); + close(lock_fd); + + format_ctx = NULL; + avformat_alloc_output_context2(&format_ctx, NULL, NULL, vid_path.c_str()); + assert(format_ctx); + + stream = avformat_new_stream(format_ctx, codec); + // AVStream *stream = avformat_new_stream(format_ctx, NULL); + assert(stream); + stream->id = 0; + stream->time_base = (AVRational){ 1, fps }; + // codec_ctx->time_base = stream->time_base; + + err = avcodec_parameters_from_context(stream->codecpar, codec_ctx); + assert(err >= 0); + + err = avio_open(&format_ctx->pb, vid_path.c_str(), AVIO_FLAG_WRITE); + assert(err >= 0); + + err = avformat_write_header(format_ctx, NULL); + assert(err >= 0); + + is_open = true; + counter = 0; +} + +void RawLogger::Close() { + int err = 0; + + std::lock_guard guard(lock); + + if (!is_open) return; + + err = av_write_trailer(format_ctx); + assert(err == 0); + + avcodec_close(stream->codec); + + err = avio_closep(&format_ctx->pb); + assert(err == 0); + + avformat_free_context(format_ctx); + format_ctx = NULL; + + unlink(lock_path.c_str()); + is_open = false; +} + +int RawLogger::ProcessFrame(uint64_t ts, const uint8_t *y_ptr, const uint8_t *u_ptr, const uint8_t *v_ptr) { + int err = 0; + + AVPacket pkt; + av_init_packet(&pkt); + pkt.data = NULL; + pkt.size = 0; + + frame->data[0] = (uint8_t*)y_ptr; + frame->data[1] = (uint8_t*)u_ptr; + frame->data[2] = (uint8_t*)v_ptr; + frame->pts = ts; + + int ret = counter; + + int got_output = 0; + err = avcodec_encode_video2(codec_ctx, &pkt, frame, &got_output); + if (err) { + LOGE("encoding error\n"); + ret = -1; + } else if (got_output) { + + av_packet_rescale_ts(&pkt, codec_ctx->time_base, stream->time_base); + pkt.stream_index = 0; + + err = av_interleaved_write_frame(format_ctx, &pkt); + if (err < 0) { + LOGE("encoder writer error\n"); + ret = -1; + } else { + counter++; + } + } + + return ret; +} diff --git a/selfdrive/loggerd/raw_logger.h b/selfdrive/loggerd/raw_logger.h new file mode 100644 index 0000000000..249be40db8 --- /dev/null +++ b/selfdrive/loggerd/raw_logger.h @@ -0,0 +1,43 @@ +#ifndef FFV1LOGGER_H +#define FFV1LOGGER_H + +#include +#include + +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +#include "frame_logger.h" + +class RawLogger : public FrameLogger { +public: + RawLogger(const std::string &filename, int awidth, int aheight, int afps); + ~RawLogger(); + + int ProcessFrame(uint64_t ts, const uint8_t *y_ptr, const uint8_t *u_ptr, const uint8_t *v_ptr); + void Open(const std::string &path); + void Close(); + +private: + std::string filename; + int width, height, fps; + int counter = 0; + + AVCodec *codec = NULL; + AVCodecContext *codec_ctx = NULL; + + AVStream *stream = NULL; + AVFormatContext *format_ctx = NULL; + + AVFrame *frame = NULL; +}; + +#endif diff --git a/selfdrive/loggerd/tests/test_deleter.py b/selfdrive/loggerd/tests/test_deleter.py index d804b6f6ff..6e62db600f 100644 --- a/selfdrive/loggerd/tests/test_deleter.py +++ b/selfdrive/loggerd/tests/test_deleter.py @@ -44,7 +44,7 @@ class TestDeleter(UploaderTestCase): with Timeout(5, "Timeout waiting for file to be deleted"): while os.path.exists(f_path): - time.sleep(0.5) + time.sleep(0.01) self.join_thread() self.assertFalse(os.path.exists(f_path), "File not deleted") @@ -60,7 +60,7 @@ class TestDeleter(UploaderTestCase): with Timeout(5, "Timeout waiting for file to be deleted"): while os.path.exists(f_path_1) and os.path.exists(f_path_2): - time.sleep(0.5) + time.sleep(0.01) self.join_thread() @@ -79,7 +79,7 @@ class TestDeleter(UploaderTestCase): try: with Timeout(2, "Timeout waiting for file to be deleted"): while os.path.exists(f_path): - time.sleep(0.5) + time.sleep(0.01) except TimeoutException: pass finally: @@ -95,7 +95,7 @@ class TestDeleter(UploaderTestCase): try: with Timeout(2, "Timeout waiting for file to be deleted"): while os.path.exists(f_path): - time.sleep(0.5) + time.sleep(0.01) except TimeoutException: pass finally: diff --git a/selfdrive/loggerd/uploader.py b/selfdrive/loggerd/uploader.py index d65a2d5613..7cad71bf7d 100644 --- a/selfdrive/loggerd/uploader.py +++ b/selfdrive/loggerd/uploader.py @@ -139,30 +139,29 @@ class Uploader(object): total_size += os.stat(fn).st_size return dict(name_counts), total_size - def next_file_to_compress(self): + def next_file_to_upload(self, with_raw): + # try to upload qlog files first for name, key, fn in self.gen_upload_files(): - if name.endswith("log"): + if name == "qlog.bz2": return (key, fn, 0) - return None - def next_file_to_upload(self, with_video): - # try to upload log files first - for name, key, fn in self.gen_upload_files(): - if name == "rlog.bz2": - return (key, fn, 0) + if with_raw: + # then upload log files + for name, key, fn in self.gen_upload_files(): + if name == "rlog.bz2": + return (key, fn, 1) - if with_video: - # then upload compressed rear and front camera files + # then upload rear and front camera files for name, key, fn in self.gen_upload_files(): if name == "fcamera.hevc": - return (key, fn, 1) - elif name == "dcamera.hevc": return (key, fn, 2) + elif name == "dcamera.hevc": + return (key, fn, 3) # then upload other files for name, key, fn in self.gen_upload_files(): if not name.endswith('.lock') and not name.endswith(".tmp"): - return (key, fn, 3) + return (key, fn, 4) return None @@ -199,21 +198,6 @@ class Uploader(object): return self.last_resp - def compress(self, key, fn): - # write out the bz2 compress - if fn.endswith("log"): - ext = ".bz2" - cloudlog.info("compressing %r to %r", fn, fn+ext) - if os.system("nice -n 19 bzip2 -c %s > %s.tmp && mv %s.tmp %s%s && rm %s" % (fn, fn, fn, fn, ext, fn)) != 0: - cloudlog.exception("upload: bzip2 compression failed") - return False - - # assuming file is named properly - key += ext - fn += ext - - return (key, fn) - def upload(self, key, fn): try: sz = os.path.getsize(fn) @@ -234,7 +218,13 @@ class Uploader(object): stat = self.normal_upload(key, fn) if stat is not None and stat.status_code in (200, 201): cloudlog.event("upload_success", key=key, fn=fn, sz=sz) - os.unlink(fn) # delete the file + + # delete the file + try: + os.unlink(fn) + except OSError: + cloudlog.exception("delete_failed", stat=stat, exc=self.last_exc, key=key, fn=fn, sz=sz) + success = True else: cloudlog.event("upload_failed", stat=stat, exc=self.last_exc, key=key, fn=fn, sz=sz) @@ -260,6 +250,7 @@ def uploader_fn(exit_event): backoff = 0.1 while True: + allow_raw_upload = (params.get("IsUploadRawEnabled") != "0") allow_cellular = (params.get("IsUploadVideoOverCellularEnabled") != "0") on_hotspot = is_on_hotspot() on_wifi = is_on_wifi() @@ -268,17 +259,7 @@ def uploader_fn(exit_event): if exit_event.is_set(): return - d = uploader.next_file_to_compress() - if d is not None: - key, fn, _ = d - uploader.compress(key, fn) - continue - - if not should_upload: - time.sleep(5) - continue - - d = uploader.next_file_to_upload(with_video=True) + d = uploader.next_file_to_upload(with_raw=allow_raw_upload and should_upload) if d is None: time.sleep(5) continue diff --git a/selfdrive/logmessaged.py b/selfdrive/logmessaged.py index fb4a2bedf0..c2c583dfc5 100755 --- a/selfdrive/logmessaged.py +++ b/selfdrive/logmessaged.py @@ -4,19 +4,19 @@ from logentries import LogentriesHandler from selfdrive.services import service_list import selfdrive.messaging as messaging -def main(gctx): +def main(gctx=None): # setup logentries. we forward log messages to it le_token = "e8549616-0798-4d7e-a2ca-2513ae81fa17" le_handler = LogentriesHandler(le_token, use_tls=False, verbose=False) le_level = 20 #logging.INFO - ctx = zmq.Context() + ctx = zmq.Context().instance() sock = ctx.socket(zmq.PULL) sock.bind("ipc:///tmp/logmessage") # and we publish them - pub_sock = messaging.pub_sock(ctx, service_list['logMessage'].port) + pub_sock = messaging.pub_sock(service_list['logMessage'].port) while True: dat = ''.join(sock.recv_multipart()) @@ -37,4 +37,4 @@ def main(gctx): pub_sock.send(msg.to_bytes()) if __name__ == "__main__": - main(None) + main() diff --git a/selfdrive/manager.py b/selfdrive/manager.py index 30e413c30b..c3be2c094d 100755 --- a/selfdrive/manager.py +++ b/selfdrive/manager.py @@ -41,8 +41,14 @@ def unblock_stdout(): os._exit(os.wait()[1]) if __name__ == "__main__": - neos_update_required = os.path.isfile("/init.qcom.rc") \ - and (not os.path.isfile("/VERSION") or int(open("/VERSION").read()) < 9) + is_neos = os.path.isfile("/init.qcom.rc") + neos_update_required = False + + if is_neos: + version = int(open("/VERSION").read()) if os.path.isfile("/VERSION") else 0 + revision = int(open("/REVISION").read()) if version >= 10 else 0 # Revision only present in NEOS 10 and up + neos_update_required = version < 10 or (version == 10 and revision != 3) + if neos_update_required: # update continue.sh before updating NEOS if os.path.isfile(os.path.join(BASEDIR, "scripts", "continue.sh")): @@ -52,7 +58,9 @@ if __name__ == "__main__": # run the updater print("Starting NEOS updater") subprocess.check_call(["git", "clean", "-xdf"], cwd=BASEDIR) - os.system(os.path.join(BASEDIR, "installer", "updater", "updater")) + updater_dir = os.path.join(BASEDIR, "installer", "updater") + manifest_path = os.path.realpath(os.path.join(updater_dir, "update.json")) + os.system(os.path.join(updater_dir, "updater") + " file://" + manifest_path) raise Exception("NEOS outdated") elif os.path.isdir("/data/neoupdate"): from shutil import rmtree @@ -68,7 +76,6 @@ import subprocess import traceback from multiprocessing import Process -import zmq from setproctitle import setproctitle #pylint: disable=no-name-in-module from common.params import Params @@ -102,10 +109,10 @@ managed_processes = { "pandad": "selfdrive.pandad", "ui": ("selfdrive/ui", ["./start.py"]), "calibrationd": "selfdrive.locationd.calibrationd", - "locationd": "selfdrive.locationd.locationd_local", + "params_learner": ("selfdrive/locationd", ["./params_learner"]), "visiond": ("selfdrive/visiond", ["./visiond"]), - "sensord": ("selfdrive/sensord", ["./sensord"]), - "gpsd": ("selfdrive/sensord", ["./gpsd"]), + "sensord": ("selfdrive/sensord", ["./start_sensord.py"]), + "gpsd": ("selfdrive/sensord", ["./start_gpsd.py"]), "updated": "selfdrive.updated", "athena": "selfdrive.athena.athenad", } @@ -139,7 +146,7 @@ car_started_processes = [ 'sensord', 'radard', 'calibrationd', - 'locationd', + 'params_learner', 'visiond', 'proclogd', 'ubloxd', @@ -157,7 +164,7 @@ def register_managed_process(name, desc, car_started=False): persistent_processes.append(name) # ****************** process management functions ****************** -def launcher(proc, gctx): +def launcher(proc): try: # import the process mod = importlib.import_module(proc) @@ -165,8 +172,12 @@ def launcher(proc, gctx): # rename the process setproctitle(proc) + # terminate the zmq context since we forked + import zmq + zmq.Context.instance().term() + # exec the process - mod.main(gctx) + mod.main() except KeyboardInterrupt: cloudlog.warning("child %s got SIGINT" % proc) except Exception: @@ -190,7 +201,7 @@ def start_managed_process(name): proc = managed_processes[name] if isinstance(proc, str): cloudlog.info("starting python %s" % proc) - running[name] = Process(name=name, target=launcher, args=(proc, gctx)) + running[name] = Process(name=name, target=launcher, args=(proc,)) else: pdir, pargs = proc cwd = os.path.join(BASEDIR, pdir) @@ -262,8 +273,6 @@ def cleanup_all_processes(signal, frame): # ****************** run loop ****************** def manager_init(should_register=True): - global gctx - if should_register: reg_res = register() if reg_res: @@ -291,9 +300,6 @@ def manager_init(should_register=True): except OSError: pass - # set gctx - gctx = {} - def system(cmd): try: cloudlog.info("running %s" % cmd) @@ -307,8 +313,7 @@ def system(cmd): def manager_thread(): # now loop - context = zmq.Context() - thermal_sock = messaging.sub_sock(context, service_list['thermal'].port) + thermal_sock = messaging.sub_sock(service_list['thermal'].port) cloudlog.info("manager start") cloudlog.info({"environ": os.environ}) @@ -479,6 +484,8 @@ def main(): params.put("IsFcwEnabled", "1") if params.get("HasAcceptedTerms") is None: params.put("HasAcceptedTerms", "0") + if params.get("IsUploadRawEnabled") is None: + params.put("IsUploadRawEnabled", "1") if params.get("IsUploadVideoOverCellularEnabled") is None: params.put("IsUploadVideoOverCellularEnabled", "1") if params.get("IsDriverMonitoringEnabled") is None: diff --git a/selfdrive/messaging.py b/selfdrive/messaging.py index 4811f93454..4e78f66c81 100644 --- a/selfdrive/messaging.py +++ b/selfdrive/messaging.py @@ -1,19 +1,23 @@ import zmq from cereal import log -from common import realtime +from common.realtime import sec_since_boot +from selfdrive.services import service_list def new_message(): dat = log.Event.new_message() - dat.logMonoTime = int(realtime.sec_since_boot() * 1e9) + dat.logMonoTime = int(sec_since_boot() * 1e9) + dat.valid = True return dat -def pub_sock(context, port, addr="*"): +def pub_sock(port, addr="*"): + context = zmq.Context.instance() sock = context.socket(zmq.PUB) sock.bind("tcp://%s:%d" % (addr, port)) return sock -def sub_sock(context, port, poller=None, addr="127.0.0.1", conflate=False): +def sub_sock(port, poller=None, addr="127.0.0.1", conflate=False): + context = zmq.Context.instance() sock = context.socket(zmq.SUB) if conflate: sock.setsockopt(zmq.CONFLATE, 1) @@ -61,3 +65,68 @@ def recv_one_or_none(sock): return log.Event.from_bytes(sock.recv(zmq.NOBLOCK)) except zmq.error.Again: return None + + +class SubMaster(): + def __init__(self, services, addr="127.0.0.1"): + self.poller = zmq.Poller() + self.frame = -1 + self.updated = {s : False for s in services} + self.rcv_time = {s : 0. for s in services} + self.rcv_frame = {s : 0 for s in services} + self.alive = {s : False for s in services} + self.sock = {} + self.freq = {} + self.data = {} + self.logMonoTime = {} + self.valid = {} + for s in services: + # TODO: get address automatically from service_list + self.sock[s] = sub_sock(service_list[s].port, poller=self.poller, addr=addr, conflate=True) + self.freq[s] = service_list[s].frequency + data = new_message() + data.init(s) + self.data[s] = getattr(data, s) + self.logMonoTime[s] = data.logMonoTime + self.valid[s] = data.valid + + def __getitem__(self, s): + return self.data[s] + + def update(self, timeout=-1): + # TODO: add optional input that specify the service to wait for + self.frame += 1 + self.updated = dict.fromkeys(self.updated, False) + cur_time = sec_since_boot() + for sock, _ in self.poller.poll(timeout): + msg = recv_one(sock) + s = msg.which() + self.updated[s] = True + self.rcv_time[s] = cur_time + self.rcv_frame[s] = self.frame + self.data[s] = getattr(msg, s) + self.logMonoTime[s] = msg.logMonoTime + self.valid[s] = msg.valid + + for s in self.data: + # arbitrary small number to avoid float comparison. If freq is 0, we can skip the check + if self.freq[s] > 1e-5: + # alive if delay is within 10x the expected frequency + self.alive[s] = (cur_time - self.rcv_time[s]) < (10. / self.freq[s]) + else: + self.alive[s] = True + + def all_alive(self, service_list=None): + if service_list is None: # check all + service_list = self.alive.keys() + return all(self.alive[s] for s in service_list) + + def all_valid(self, service_list=None): + if service_list is None: # check all + service_list = self.valid.keys() + return all(self.valid[s] for s in service_list) + + def all_alive_and_valid(self, service_list=None): + if service_list is None: # check all + service_list = self.alive.keys() + return self.all_alive(service_list=service_list) and self.all_valid(service_list=service_list) diff --git a/selfdrive/pandad.py b/selfdrive/pandad.py old mode 100644 new mode 100755 index 981546ccf9..09f2e717f9 --- a/selfdrive/pandad.py +++ b/selfdrive/pandad.py @@ -1,14 +1,76 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # simple boardd wrapper that updates the panda first import os -from panda import ensure_st_up_to_date +import time + +from selfdrive.swaglog import cloudlog +from panda import Panda, PandaDFU, BASEDIR + + +def update_panda(): + with open(os.path.join(BASEDIR, "VERSION")) as f: + repo_version = f.read() + repo_version += "-EON" if os.path.isfile('/EON') else "-DEV" + + panda = None + panda_dfu = None + + cloudlog.info("Connecting to panda") + + while True: + # break on normal mode Panda + panda_list = Panda.list() + if len(panda_list) > 0: + cloudlog.info("Panda found, connecting") + panda = Panda(panda_list[0]) + break + + # flash on DFU mode Panda + panda_dfu = PandaDFU.list() + if len(panda_dfu) > 0: + cloudlog.info("Panda in DFU mode found, flashing recovery") + panda_dfu = PandaDFU(panda_dfu[0]) + panda_dfu.recover() + + print "waiting for board..." + time.sleep(1) + + current_version = "bootstub" if panda.bootstub else str(panda.get_version()) + cloudlog.info("Panda connected, version: %s, expected %s" % (current_version, repo_version)) + + if panda.bootstub or not current_version.startswith(repo_version): + cloudlog.info("Panda firmware out of date, update required") + + signed_fn = os.path.join(BASEDIR, "board", "obj", "panda.bin.signed") + if os.path.exists(signed_fn): + cloudlog.info("Flashing signed firmware") + panda.flash(fn=signed_fn) + else: + cloudlog.info("Building and flashing unsigned firmware") + panda.flash() + + cloudlog.info("Done flashing") + + if panda.bootstub: + cloudlog.info("Flashed firmware not booting, flashing development bootloader") + panda.recover() + cloudlog.info("Done flashing bootloader") + + if panda.bootstub: + cloudlog.info("Panda still not booting, exiting") + raise AssertionError + + version = str(panda.get_version()) + if not version.startswith(repo_version): + cloudlog.info("Version mismatch after flashing, exiting") + raise AssertionError + def main(gctx=None): - ensure_st_up_to_date() + update_panda() os.chdir("boardd") os.execvp("./boardd", ["./boardd"]) if __name__ == "__main__": main() - diff --git a/selfdrive/proclogd/Makefile b/selfdrive/proclogd/Makefile index a7cd3682b2..9939a715f3 100644 --- a/selfdrive/proclogd/Makefile +++ b/selfdrive/proclogd/Makefile @@ -1,3 +1,5 @@ +ARCH := $(shell uname -m) + CC = clang CXX = clang++ @@ -13,10 +15,15 @@ WARN_FLAGS = -Werror=implicit-function-declaration \ CFLAGS = -std=gnu11 -g -fPIC -O2 $(WARN_FLAGS) CXXFLAGS = -std=c++11 -g -fPIC -O2 $(WARN_FLAGS) -ZMQ_FLAGS = -I$(PHONELIBS)/zmq/aarch64/include -ZMQ_LIBS = -L$(PHONELIBS)/zmq/aarch64/lib \ - -l:libczmq.a -l:libzmq.a \ - -lgnustl_shared +ZMQ_LIBS = -l:libczmq.a -l:libzmq.a + +ifeq ($(ARCH),aarch64) +CFLAGS += -mcpu=cortex-a57 +CXXFLAGS += -mcpu=cortex-a57 +ZMQ_LIBS += -lgnustl_shared +endif + +#ZMQ_FLAGS = -I$(PHONELIBS)/zmq/aarch64/include .PHONY: all all: proclogd diff --git a/selfdrive/registration.py b/selfdrive/registration.py index 9e4c89b4cd..9f68998499 100644 --- a/selfdrive/registration.py +++ b/selfdrive/registration.py @@ -2,7 +2,6 @@ import os import json import subprocess import struct -import jwt from datetime import datetime, timedelta from selfdrive.swaglog import cloudlog @@ -66,7 +65,8 @@ def register(): if not os.path.isfile("/persist/comma/id_rsa.pub"): cloudlog.warning("generating your personal RSA key") mkdirs_exists_ok("/persist/comma") - assert os.system("echo -e 'y\n' | ssh-keygen -t rsa -b 2048 -f /persist/comma/id_rsa.tmp -N ''") == 0 + assert os.system("openssl genrsa -out /persist/comma/id_rsa.tmp 2048") == 0 + assert os.system("openssl rsa -in /persist/comma/id_rsa.tmp -pubout -out /persist/comma/id_rsa.tmp.pub") == 0 os.rename("/persist/comma/id_rsa.tmp", "/persist/comma/id_rsa") os.rename("/persist/comma/id_rsa.tmp.pub", "/persist/comma/id_rsa.pub") @@ -76,6 +76,9 @@ def register(): # create registration token # in the future, this key will make JWTs directly private_key = open("/persist/comma/id_rsa").read() + + # late import + import jwt register_token = jwt.encode({'register':True, 'exp': datetime.utcnow() + timedelta(hours=1)}, private_key, algorithm='RS256') try: diff --git a/selfdrive/sensord/build_from_src.mk b/selfdrive/sensord/build_from_src.mk new file mode 100644 index 0000000000..8c71f5f96d --- /dev/null +++ b/selfdrive/sensord/build_from_src.mk @@ -0,0 +1,88 @@ +CC = clang +CXX = clang++ + +PHONELIBS = ../../phonelibs +BASEDIR = ../.. + +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) \ + -I$(PHONELIBS)/android_frameworks_native/include \ + -I$(PHONELIBS)/android_system_core/include \ + -I$(PHONELIBS)/android_hardware_libhardware/include +CXXFLAGS = -std=c++11 -g -fPIC -O2 $(WARN_FLAGS) \ + -I$(PHONELIBS)/android_frameworks_native/include \ + -I$(PHONELIBS)/android_system_core/include \ + -I$(PHONELIBS)/android_hardware_libhardware/include + +ZMQ_LIBS = -l:libczmq.a -l:libzmq.a -llog -luuid -lgnustl_shared + +ifeq ($(ARCH),aarch64) +CFLAGS += -mcpu=cortex-a57 +CXXFLAGS += -mcpu=cortex-a57 +endif + + +JSON_FLAGS = -I$(PHONELIBS)/json/src + +DIAG_LIBS = -L/system/vendor/lib64 -ldiag -ltime_genoff + +.PHONY: all +all: sensord gpsd + +include ../common/cereal.mk + +SENSORD_OBJS = sensors.o \ + ../common/swaglog.o \ + $(PHONELIBS)/json/src/json.o + +GPSD_OBJS = gpsd.o \ + rawgps.o \ + ../common/swaglog.o \ + $(PHONELIBS)/json/src/json.o + +DEPS := $(SENSORD_OBJS:.o=.d) $(GPSD_OBJS:.o=.d) + +sensord: $(SENSORD_OBJS) + @echo "[ LINK ] $@" + $(CXX) -fPIC -o '$@' $^ \ + $(CEREAL_LIBS) \ + $(ZMQ_LIBS) \ + -lhardware + +gpsd: $(GPSD_OBJS) + @echo "[ LINK ] $@" + $(CXX) -fPIC -o '$@' $^ \ + $(CEREAL_LIBS) \ + $(ZMQ_LIBS) \ + $(DIAG_LIBS) \ + -lhardware + +%.o: %.cc + @echo "[ CXX ] $@" + $(CXX) $(CXXFLAGS) \ + $(CEREAL_CXXFLAGS) \ + $(ZMQ_FLAGS) \ + $(JSON_FLAGS) \ + -I../ \ + -I../../ \ + -c -o '$@' '$<' + + +%.o: %.c + @echo "[ CC ] $@" + $(CC) $(CFLAGS) \ + $(JSON_FLAGS) \ + -I../ \ + -I../../ \ + -c -o '$@' '$<' + +.PHONY: clean +clean: + rm -f sensord gpsd $(OBJS) $(DEPS) + +-include $(DEPS) diff --git a/selfdrive/sensord/gpsd b/selfdrive/sensord/gpsd deleted file mode 100755 index 03be64d098..0000000000 --- a/selfdrive/sensord/gpsd +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9ba2abd00e366eafd598ef10054783de945fb21f22d4c2780e1e4c20d28cdc93 -size 1171544 diff --git a/selfdrive/sensord/gpsd.cc b/selfdrive/sensord/gpsd.cc new file mode 100644 index 0000000000..6bf7a6a9e1 --- /dev/null +++ b/selfdrive/sensord/gpsd.cc @@ -0,0 +1,268 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include + +#include + +#include + +#include "common/timing.h" +#include "common/swaglog.h" + +#include "cereal/gen/cpp/log.capnp.h" + +#include "rawgps.h" + +volatile int do_exit = 0; + +namespace { + +pthread_t clock_thread_handle; + +// zmq output +void *gps_context; +void *gps_publisher; +void *gps_location_publisher; + +const GpsInterface* gGpsInterface = NULL; +const AGpsInterface* gAGpsInterface = NULL; + +void set_do_exit(int sig) { + do_exit = 1; +} + +void nmea_callback(GpsUtcTime timestamp, const char* nmea, int length) { + + uint64_t log_time = nanos_since_boot(); + uint64_t log_time_wall = nanos_since_epoch(); + + capnp::MallocMessageBuilder msg; + cereal::Event::Builder event = msg.initRoot(); + event.setLogMonoTime(log_time); + + auto nmeaData = event.initGpsNMEA(); + nmeaData.setTimestamp(timestamp); + nmeaData.setLocalWallTime(log_time_wall); + nmeaData.setNmea(nmea); + + auto words = capnp::messageToFlatArray(msg); + auto bytes = words.asBytes(); + // printf("gps send %d\n", bytes.size()); + zmq_send(gps_publisher, bytes.begin(), bytes.size(), 0); +} + +void location_callback(GpsLocation* location) { + //printf("got location callback\n"); + uint64_t log_time = nanos_since_boot(); + + capnp::MallocMessageBuilder msg; + cereal::Event::Builder event = msg.initRoot(); + event.setLogMonoTime(log_time); + + auto locationData = event.initGpsLocation(); + locationData.setFlags(location->flags); + locationData.setLatitude(location->latitude); + locationData.setLongitude(location->longitude); + locationData.setAltitude(location->altitude); + locationData.setSpeed(location->speed); + locationData.setBearing(location->bearing); + locationData.setAccuracy(location->accuracy); + locationData.setTimestamp(location->timestamp); + locationData.setSource(cereal::GpsLocationData::SensorSource::ANDROID); + + auto words = capnp::messageToFlatArray(msg); + auto bytes = words.asBytes(); + zmq_send(gps_location_publisher, bytes.begin(), bytes.size(), 0); +} + +pthread_t create_thread_callback(const char* name, void (*start)(void *), void* arg) { + LOG("creating thread: %s", name); + pthread_t thread; + pthread_attr_t attr; + int err; + + err = pthread_attr_init(&attr); + err = pthread_create(&thread, &attr, (void*(*)(void*))start, arg); + + return thread; +} + +GpsCallbacks gps_callbacks = { + sizeof(GpsCallbacks), + location_callback, + NULL, + NULL, + nmea_callback, + NULL, + NULL, + NULL, + create_thread_callback, +}; + +void agps_status_cb(AGpsStatus *status) { + switch (status->status) { + case GPS_REQUEST_AGPS_DATA_CONN: + fprintf(stdout, "*** data_conn_open\n"); + gAGpsInterface->data_conn_open("internet"); + break; + case GPS_RELEASE_AGPS_DATA_CONN: + fprintf(stdout, "*** data_conn_closed\n"); + gAGpsInterface->data_conn_closed(); + break; + } +} + +AGpsCallbacks agps_callbacks = { + agps_status_cb, + create_thread_callback, +}; + + + +void gps_init() { + LOG("*** init GPS"); + hw_module_t* module = NULL; + hw_get_module(GPS_HARDWARE_MODULE_ID, (hw_module_t const**)&module); + assert(module); + + static hw_device_t* device = NULL; + module->methods->open(module, GPS_HARDWARE_MODULE_ID, &device); + assert(device); + + // ** get gps interface ** + gps_device_t* gps_device = (gps_device_t *)device; + gGpsInterface = gps_device->get_gps_interface(gps_device); + assert(gGpsInterface); + + gAGpsInterface = (const AGpsInterface*)gGpsInterface->get_extension(AGPS_INTERFACE); + assert(gAGpsInterface); + + + gGpsInterface->init(&gps_callbacks); + gAGpsInterface->init(&agps_callbacks); + gAGpsInterface->set_server(AGPS_TYPE_SUPL, "supl.google.com", 7276); + + // gGpsInterface->delete_aiding_data(GPS_DELETE_ALL); + gGpsInterface->start(); + gGpsInterface->set_position_mode(GPS_POSITION_MODE_MS_BASED, + GPS_POSITION_RECURRENCE_PERIODIC, + 100, 0, 0); + + gps_context = zmq_ctx_new(); + gps_publisher = zmq_socket(gps_context, ZMQ_PUB); + zmq_bind(gps_publisher, "tcp://*:8004"); + + gps_location_publisher = zmq_socket(gps_context, ZMQ_PUB); + zmq_bind(gps_location_publisher, "tcp://*:8026"); +} + +void gps_destroy() { + gGpsInterface->stop(); + gGpsInterface->cleanup(); +} + + +int64_t arm_cntpct() { + int64_t v; + asm volatile("mrs %0, cntpct_el0" : "=r"(v)); + return v; +} + +// TODO: move this out of here +void* clock_thread(void* args) { + int err = 0; + + void* clock_publisher = zmq_socket(gps_context, ZMQ_PUB); + zmq_bind(clock_publisher, "tcp://*:8034"); + + int timerfd = timerfd_create(CLOCK_BOOTTIME, 0); + assert(timerfd >= 0); + + struct itimerspec spec = {0}; + spec.it_interval.tv_sec = 1; + spec.it_interval.tv_nsec = 0; + spec.it_value.tv_sec = 1; + spec.it_value.tv_nsec = 0; + + err = timerfd_settime(timerfd, 0, &spec, 0); + assert(err == 0); + + uint64_t expirations = 0; + while ((err = read(timerfd, &expirations, sizeof(expirations)))) { + if (err < 0) break; + + if (do_exit) break; + + uint64_t boottime = nanos_since_boot(); + uint64_t monotonic = nanos_monotonic(); + uint64_t monotonic_raw = nanos_monotonic_raw(); + uint64_t wall_time = nanos_since_epoch(); + + uint64_t modem_uptime_v = arm_cntpct() / 19200ULL; // 19.2 mhz clock + + capnp::MallocMessageBuilder msg; + cereal::Event::Builder event = msg.initRoot(); + event.setLogMonoTime(boottime); + auto clocks = event.initClocks(); + + clocks.setBootTimeNanos(boottime); + clocks.setMonotonicNanos(monotonic); + clocks.setMonotonicRawNanos(monotonic_raw); + clocks.setWallTimeNanos(wall_time); + clocks.setModemUptimeMillis(modem_uptime_v); + + auto words = capnp::messageToFlatArray(msg); + auto bytes = words.asBytes(); + zmq_send(clock_publisher, bytes.begin(), bytes.size(), 0); + } + + close(timerfd); + zmq_close(clock_publisher); + + return NULL; +} + + +} + +int main() { + int err = 0; + setpriority(PRIO_PROCESS, 0, -13); + + signal(SIGINT, (sighandler_t)set_do_exit); + signal(SIGTERM, (sighandler_t)set_do_exit); + + gps_init(); + + rawgps_init(); + + err = pthread_create(&clock_thread_handle, NULL, + clock_thread, NULL); + assert(err == 0); + + while(!do_exit) pause(); + + err = pthread_join(clock_thread_handle, NULL); + assert(err == 0); + + rawgps_destroy(); + + gps_destroy(); + + return 0; +} diff --git a/selfdrive/sensord/libdiag.h b/selfdrive/sensord/libdiag.h new file mode 100644 index 0000000000..ab3ee91b14 --- /dev/null +++ b/selfdrive/sensord/libdiag.h @@ -0,0 +1,40 @@ +#ifndef LIBDIAG_H +#define LIBDIAG_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define DIAG_MAX_RX_PKT_SIZ 4096 + +bool Diag_LSM_Init(uint8_t* pIEnv); +bool Diag_LSM_DeInit(void); + +// DCI + +#define DIAG_CON_APSS 0x001 +#define DIAG_CON_MPSS 0x002 +#define DIAG_CON_LPASS 0x004 +#define DIAG_CON_WCNSS 0x008 + +enum { + DIAG_DCI_NO_ERROR = 1001, +} diag_dci_error_type; + +int diag_register_dci_client(int*, uint16_t*, int, void*); +int diag_log_stream_config(int client_id, int set_mask, uint16_t log_codes_array[], int num_codes); +int diag_register_dci_stream(void (*func_ptr_logs)(unsigned char *ptr, int len), void (*func_ptr_events)(unsigned char *ptr, int len)); +int diag_release_dci_client(int*); + +int diag_send_dci_async_req(int client_id, unsigned char buf[], int bytes, unsigned char *rsp_ptr, int rsp_len, + void (*func_ptr)(unsigned char *ptr, int len, void *data_ptr), void *data_ptr); + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/selfdrive/sensord/rawgps.cc b/selfdrive/sensord/rawgps.cc new file mode 100644 index 0000000000..91e5562c7d --- /dev/null +++ b/selfdrive/sensord/rawgps.cc @@ -0,0 +1,1189 @@ +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "cereal/gen/cpp/log.capnp.h" + +#include "common/timing.h" +#include "common/util.h" +#include "common/swaglog.h" + +#include "libdiag.h" + +extern volatile int do_exit; + +#define NV_GNSS_OEM_FEATURE_MASK 7165 +# define NV_GNSS_OEM_FEATURE_MASK_OEMDRE 1 +#define NV_CGPS_DPO_CONTROL 5596 + +#define DIAG_NV_READ_F 38 +#define DIAG_NV_WRITE_F 39 + +#define DIAG_SUBSYS_CMD 75 +#define DIAG_SUBSYS_CMD_VER_2 128 + +#define DIAG_SUBSYS_GPS 13 +#define DIAG_SUBSYS_FS 19 + +#define CGPS_DIAG_PDAPI_CMD 100 +#define CGPS_OEM_CONTROL 202 + +#define GPSDIAG_OEMFEATURE_DRE 1 +#define GPSDIAG_OEM_DRE_ON 1 + +#define FEATURE_OEMDRE_NOT_SUPPORTED 1 +#define FEATURE_OEMDRE_ON 2 +#define FEATURE_OEMDRE_ALREADY_ON 4 + +#define TM_DIAG_NAV_CONFIG_CMD 0x6E + +#define EFS2_DIAG_SYNC_NO_WAIT 48 + +struct __attribute__((packed)) NvPacket { + uint8_t cmd_code; + uint16_t nv_id; + uint8_t data[128]; + uint16_t status; +}; + +enum NvStatus { + NV_DONE, + NV_BUSY, + NV_FULL, + NV_FAIL, + NV_NOTACTIVE, + NV_BADPARAM, + NV_READONLY, + NV_BADRG, + NV_NOMEM, + NV_NOTALLOC, +}; + +struct __attribute__((packed)) Efs2DiagSyncReq { + uint8_t cmd_code; + uint8_t subsys_id; + uint16_t subsys_cmd_code; + uint16_t sequence_num; + char path[8]; +}; + + +struct __attribute__((packed)) Efs2DiagSyncResp { + uint8_t cmd_code; + uint8_t subsys_id; + uint16_t subsys_cmd_code; + uint16_t sequence_num; + uint32_t sync_token; + int32_t diag_errno; +}; + + + +struct __attribute__((packed)) GpsOemControlReq { + uint8_t cmd_code; + uint8_t subsys_id; + uint16_t subsys_cmd_code; + uint8_t gps_cmd_code; + uint8_t version; + + uint32_t oem_feature; + uint32_t oem_command; + uint32_t reserved[2]; +}; + + +struct __attribute__((packed)) GpsOemControlResp { + uint8_t cmd_code; + uint8_t subsys_id; + uint16_t subsys_cmd_code; + uint8_t gps_cmd_code; + uint8_t version; + + uint32_t oem_feature; + uint32_t oem_command; + uint32_t resp_result; + uint32_t reserved[2]; +}; + +struct __attribute__((packed)) GpsNavConfigReq { + uint8_t cmd_code; + uint8_t subsys_id; + uint16_t subsys_cmd_code; + uint32_t subsys_status; + uint16_t subsys_delayed_resp_id; + uint16_t subsys_rsp_cnt; + + uint8_t desired_config; +}; + +struct __attribute__((packed)) GpsNavConfigResp { + uint8_t cmd_code; + uint8_t subsys_id; + uint16_t subsys_cmd_code; + uint32_t subsys_status; + uint16_t subsys_delayed_resp_id; + uint16_t subsys_rsp_cnt; + + uint8_t supported_config; + uint8_t actual_config; +}; + + +#define LOG_GNSS_POSITION_REPORT 0x1476 +#define LOG_GNSS_GPS_MEASUREMENT_REPORT 0x1477 +#define LOG_GNSS_CLOCK_REPORT 0x1478 +#define LOG_GNSS_GLONASS_MEASUREMENT_REPORT 0x1480 +#define LOG_GNSS_BDS_MEASUREMENT_REPORT 0x1756 +#define LOG_GNSS_GAL_MEASUREMENT_REPORT 0x1886 + +#define LOG_GNSS_OEMDRE_MEASUREMENMT_REPORT 0x14DE +#define LOG_GNSS_OEMDRE_SVPOLY_REPORT 0x14E1 + +#define LOG_GNSS_ME_DPO_STATUS 0x1838 +#define LOG_GNSS_CD_DB_REPORT 0x147B +#define LOG_GNSS_PRX_RF_HW_STATUS_REPORT 0x147E +#define LOG_CGPS_SLOW_CLOCK_CLIB_REPORT 0x1488 +#define LOG_GNSS_CONFIGURATION_STATE 0x1516 + +struct __attribute__((packed)) log_header_type { + uint16_t len; + uint16_t code; + uint64_t ts; +}; + + + +enum SVObservationStates { + SV_IDLE, + SV_SEARCH, + SV_SEACH_VERIFY, + SV_BIT_EDGE, + SV_TRACK_VERIFY, + SV_TRACK, + SV_RESTART, + SV_DPO, + SV_GLO_10ms_BE, + SV_GLO_10ms_AT, +}; + +struct __attribute__((packed)) GNSSGpsMeasurementReportv0_SV{ + uint8_t sv_id; + uint8_t observation_state; // SVObservationStates + uint8_t observations; + uint8_t good_observations; + uint16_t parity_error_count; + uint8_t filter_stages; + uint16_t carrier_noise; + int16_t latency; + uint8_t predetect_interval; + uint16_t postdetections; + uint32_t unfiltered_measurement_integral; + float unfiltered_measurement_fraction; + float unfiltered_time_uncertainty; + float unfiltered_speed; + float unfiltered_speed_uncertainty; + uint32_t measurement_status; + uint8_t misc_status; + uint32_t multipath_estimate; + float azimuth; + float elevation; + int32_t carrier_phase_cycles_integral; + uint16_t carrier_phase_cycles_fraction; + float fine_speed; + float fine_speed_uncertainty; + uint8_t cycle_slip_count; + uint32_t pad; +}; + +_Static_assert(sizeof(GNSSGpsMeasurementReportv0_SV) == 70, "error"); + +struct __attribute__((packed)) GNSSGpsMeasurementReportv0{ + log_header_type header; + uint8_t version; + uint32_t f_count; + uint16_t week; + uint32_t milliseconds; + float time_bias; + float clock_time_uncertainty; + float clock_frequency_bias; + float clock_frequency_uncertainty; + uint8_t sv_count; + GNSSGpsMeasurementReportv0_SV sv[]; +}; + + + +struct __attribute__((packed)) GNSSGlonassMeasurementReportv0_SV { + uint8_t sv_id; + int8_t frequency_index; + uint8_t observation_state; // SVObservationStates + uint8_t observations; + uint8_t good_observations; + uint8_t hemming_error_count; + uint8_t filter_stages; + uint16_t carrier_noise; + int16_t latency; + uint8_t predetect_interval; + uint16_t postdetections; + uint32_t unfiltered_measurement_integral; + float unfiltered_measurement_fraction; + float unfiltered_time_uncertainty; + float unfiltered_speed; + float unfiltered_speed_uncertainty; + uint32_t measurement_status; + uint8_t misc_status; + uint32_t multipath_estimate; + float azimuth; + float elevation; + int32_t carrier_phase_cycles_integral; + uint16_t carrier_phase_cycles_fraction; + float fine_speed; + float fine_speed_uncertainty; + uint8_t cycle_slip_count; + uint32_t pad; +}; + +_Static_assert(sizeof(GNSSGlonassMeasurementReportv0_SV) == 70, "error"); + +struct __attribute__((packed)) GNSSGlonassMeasurementReportv0 { + log_header_type header; + uint8_t version; + uint32_t f_count; + uint8_t glonass_cycle_number; + uint16_t glonass_number_of_days; + uint32_t milliseconds; + float time_bias; + float clock_time_uncertainty; + float clock_frequency_bias; + float clock_frequency_uncertainty; + uint8_t sv_count; + GNSSGlonassMeasurementReportv0_SV sv[]; +}; + + +struct __attribute__((packed)) GNSSClockReportv2 { + log_header_type header; + uint8_t version; + uint16_t valid_flags; + + uint32_t f_count; + + uint16_t gps_week; + uint32_t gps_milliseconds; + float gps_time_bias; + float gps_clock_time_uncertainty; + uint8_t gps_clock_source; + + uint8_t glonass_year; + uint16_t glonass_day; + uint32_t glonass_milliseconds; + float glonass_time_bias; + float glonass_clock_time_uncertainty; + uint8_t glonass_clock_source; + + uint16_t bds_week; + uint32_t bds_milliseconds; + float bds_time_bias; + float bds_clock_time_uncertainty; + uint8_t bds_clock_source; + + uint16_t gal_week; + uint32_t gal_milliseconds; + float gal_time_bias; + float gal_clock_time_uncertainty; + uint8_t gal_clock_source; + + float clock_frequency_bias; + float clock_frequency_uncertainty; + uint8_t frequency_source; + uint8_t gps_leap_seconds; + uint8_t gps_leap_seconds_uncertainty; + uint8_t gps_leap_seconds_source; + + float gps_to_glonass_time_bias_milliseconds; + float gps_to_glonass_time_bias_milliseconds_uncertainty; + float gps_to_bds_time_bias_milliseconds; + float gps_to_bds_time_bias_milliseconds_uncertainty; + float bds_to_glo_time_bias_milliseconds; + float bds_to_glo_time_bias_milliseconds_uncertainty; + float gps_to_gal_time_bias_milliseconds; + float gps_to_gal_time_bias_milliseconds_uncertainty; + float gal_to_glo_time_bias_milliseconds; + float gal_to_glo_time_bias_milliseconds_uncertainty; + float gal_to_bds_time_bias_milliseconds; + float gal_to_bds_time_bias_milliseconds_uncertainty; + + uint32_t system_rtc_time; + uint32_t f_count_offset; + uint32_t lpm_rtc_count; + uint32_t clock_resets; + + uint32_t reserved[3]; + +}; + + +enum GNSSMeasurementSource { + SOURCE_GPS, + SOURCE_GLONASS, + SOURCE_BEIDOU, +}; + +struct __attribute__((packed)) GNSSOemdreMeasurement { + uint8_t sv_id; + uint8_t unkn; + int8_t glonass_frequency_index; + uint32_t observation_state; + uint8_t observations; + uint8_t good_observations; + uint8_t filter_stages; + uint8_t predetect_interval; + uint8_t cycle_slip_count; + uint16_t postdetections; + + uint32_t measurement_status; + uint32_t measurement_status2; + + uint16_t carrier_noise; + uint16_t rf_loss; + int16_t latency; + + float filtered_measurement_fraction; + uint32_t filtered_measurement_integral; + float filtered_time_uncertainty; + float filtered_speed; + float filtered_speed_uncertainty; + + float unfiltered_measurement_fraction; + uint32_t unfiltered_measurement_integral; + float unfiltered_time_uncertainty; + float unfiltered_speed; + float unfiltered_speed_uncertainty; + + uint8_t multipath_estimate_valid; + uint32_t multipath_estimate; + uint8_t direction_valid; + float azimuth; + float elevation; + float doppler_acceleration; + float fine_speed; + float fine_speed_uncertainty; + + uint64_t carrier_phase; + uint32_t f_count; + + uint16_t parity_error_count; + uint8_t good_parity; + +}; + +_Static_assert(sizeof(GNSSOemdreMeasurement) == 109, "error"); + +struct __attribute__((packed)) GNSSOemdreMeasurementReportv2 { + log_header_type header; + uint8_t version; + uint8_t reason; + uint8_t sv_count; + uint8_t seq_num; + uint8_t seq_max; + uint16_t rf_loss; + + uint8_t system_rtc_valid; + uint32_t f_count; + uint32_t clock_resets; + uint64_t system_rtc_time; + + uint8_t gps_leap_seconds; + uint8_t gps_leap_seconds_uncertainty; + float gps_to_glonass_time_bias_milliseconds; + float gps_to_glonass_time_bias_milliseconds_uncertainty; + + uint16_t gps_week; + uint32_t gps_milliseconds; + uint32_t gps_time_bias; + uint32_t gps_clock_time_uncertainty; + uint8_t gps_clock_source; + + uint8_t glonass_clock_source; + uint8_t glonass_year; + uint16_t glonass_day; + uint32_t glonass_milliseconds; + float glonass_time_bias; + float glonass_clock_time_uncertainty; + + float clock_frequency_bias; + float clock_frequency_uncertainty; + uint8_t frequency_source; + + uint32_t cdma_clock_info[5]; + + uint8_t source; + + GNSSOemdreMeasurement measurements[16]; + +}; + +_Static_assert(sizeof(GNSSOemdreMeasurementReportv2) == 1851, "error"); + + +struct __attribute__((packed)) GNSSOemdreSVPolyReportv2 { + log_header_type header; + uint8_t version; + uint16_t sv_id; + int8_t frequency_index; + uint8_t flags; + uint16_t iode; + double t0; + double xyz0[3]; + double xyzN[9]; + float other[4]; + float position_uncertainty; + float iono_delay; + float iono_dot; + float sbas_iono_delay; + float sbas_iono_dot; + float tropo_delay; + float elevation; + float elevation_dot; + float elevation_uncertainty; + double velocity_coeff[12]; +}; + +_Static_assert(sizeof(GNSSOemdreSVPolyReportv2) == 271, "error"); + + +static void* rawgps_context; +static void *rawgps_publisher; +static int client_id = 0; + +static void hexdump(uint8_t* d, size_t len) { + for (int i=0; i= sizeof(log_header_type)+1); + log_header_type* log_header = (log_header_type*)ptr; + uint8_t* log_data = ptr + sizeof(log_header_type); + +#ifdef RAWGPS_TEST + printf("%04x\n", log_header->code); +#endif + + capnp::MallocMessageBuilder msg; + cereal::Event::Builder event = msg.initRoot(); + event.setLogMonoTime(nanos_since_boot()); + auto qcomGnss = event.initQcomGnss(); + qcomGnss.setLogTs(log_header->ts); + + switch (log_header->code) { + + case LOG_GNSS_CLOCK_REPORT: { + uint8_t version = log_data[0]; + assert(version == 2); + + assert(len >= sizeof(GNSSClockReportv2)); + const GNSSClockReportv2* report = (const GNSSClockReportv2*)ptr; + + auto lreport = qcomGnss.initClockReport(); + lreport.setHasFCount(report->valid_flags & (1 << 0)); + lreport.setFCount(report->f_count); + + lreport.setHasGpsWeek(report->valid_flags & (1 << 2)); + lreport.setGpsWeek(report->gps_week); + lreport.setHasGpsMilliseconds(report->valid_flags & (1 << 1)); + lreport.setGpsMilliseconds(report->gps_milliseconds); + lreport.setGpsTimeBias(report->gps_time_bias); + lreport.setGpsClockTimeUncertainty(report->gps_clock_time_uncertainty); + lreport.setGpsClockSource(report->gps_clock_source); + + lreport.setHasGlonassYear(report->valid_flags & (1 << 6)); + lreport.setGlonassYear(report->glonass_year); + lreport.setHasGlonassDay(report->valid_flags & (1 << 5)); + lreport.setGlonassDay(report->glonass_day); + lreport.setHasGlonassMilliseconds(report->valid_flags & (1 << 4)); + lreport.setGlonassMilliseconds(report->glonass_milliseconds); + lreport.setGlonassTimeBias(report->glonass_time_bias); + lreport.setGlonassClockTimeUncertainty(report->glonass_clock_time_uncertainty); + lreport.setGlonassClockSource(report->glonass_clock_source); + + lreport.setBdsWeek(report->bds_week); + lreport.setBdsMilliseconds(report->bds_milliseconds); + lreport.setBdsTimeBias(report->bds_time_bias); + lreport.setBdsClockTimeUncertainty(report->bds_clock_time_uncertainty); + lreport.setBdsClockSource(report->bds_clock_source); + + lreport.setGalWeek(report->gal_week); + lreport.setGalMilliseconds(report->gal_milliseconds); + lreport.setGalTimeBias(report->gal_time_bias); + lreport.setGalClockTimeUncertainty(report->gal_clock_time_uncertainty); + lreport.setGalClockSource(report->gal_clock_source); + + lreport.setClockFrequencyBias(report->clock_frequency_bias); + lreport.setClockFrequencyUncertainty(report->clock_frequency_uncertainty); + lreport.setFrequencySource(report->frequency_source); + lreport.setGpsLeapSeconds(report->gps_leap_seconds); + lreport.setGpsLeapSecondsUncertainty(report->gps_leap_seconds_uncertainty); + lreport.setGpsLeapSecondsSource(report->gps_leap_seconds_source); + + lreport.setGpsToGlonassTimeBiasMilliseconds(report->gps_to_glonass_time_bias_milliseconds); + lreport.setGpsToGlonassTimeBiasMillisecondsUncertainty(report->gps_to_glonass_time_bias_milliseconds_uncertainty); + lreport.setGpsToBdsTimeBiasMilliseconds(report->gps_to_bds_time_bias_milliseconds); + lreport.setGpsToBdsTimeBiasMillisecondsUncertainty(report->gps_to_bds_time_bias_milliseconds_uncertainty); + lreport.setBdsToGloTimeBiasMilliseconds(report->bds_to_glo_time_bias_milliseconds); + lreport.setBdsToGloTimeBiasMillisecondsUncertainty(report->bds_to_glo_time_bias_milliseconds_uncertainty); + lreport.setGpsToGalTimeBiasMilliseconds(report->gps_to_gal_time_bias_milliseconds); + lreport.setGpsToGalTimeBiasMillisecondsUncertainty(report->gps_to_gal_time_bias_milliseconds_uncertainty); + lreport.setGalToGloTimeBiasMilliseconds(report->gal_to_glo_time_bias_milliseconds); + lreport.setGalToGloTimeBiasMillisecondsUncertainty(report->gal_to_glo_time_bias_milliseconds_uncertainty); + lreport.setGalToBdsTimeBiasMilliseconds(report->gal_to_bds_time_bias_milliseconds); + lreport.setGalToBdsTimeBiasMillisecondsUncertainty(report->gal_to_bds_time_bias_milliseconds_uncertainty); + + lreport.setHasRtcTime(report->valid_flags & (1 << 3)); + lreport.setSystemRtcTime(report->system_rtc_time); + lreport.setFCountOffset(report->f_count_offset); + lreport.setLpmRtcCount(report->lpm_rtc_count); + lreport.setClockResets(report->clock_resets); + + break; + } + case LOG_GNSS_GPS_MEASUREMENT_REPORT: { + uint8_t version = log_data[0]; + assert(version == 0); + + assert(len >= sizeof(GNSSGpsMeasurementReportv0)); + const GNSSGpsMeasurementReportv0* report = (const GNSSGpsMeasurementReportv0*)ptr; + assert(len >= sizeof(sizeof(GNSSGpsMeasurementReportv0))+sizeof(GNSSGpsMeasurementReportv0_SV) * report->sv_count); + + auto lreport = qcomGnss.initMeasurementReport(); + lreport.setSource(cereal::QcomGnss::MeasurementSource::GPS); + lreport.setFCount(report->f_count); + lreport.setGpsWeek(report->week); + lreport.setMilliseconds(report->milliseconds); + lreport.setTimeBias(report->time_bias); + lreport.setClockTimeUncertainty(report->clock_time_uncertainty); + lreport.setClockFrequencyBias(report->clock_frequency_bias); + lreport.setClockFrequencyUncertainty(report->clock_frequency_uncertainty); + + auto lsvs = lreport.initSv(report->sv_count); + for (int i=0; isv_count; i++) { + auto lsv = lsvs[i]; + const GNSSGpsMeasurementReportv0_SV *sv = &report->sv[i]; + + lsv.setSvId(sv->sv_id); + lsv.setObservationState(cereal::QcomGnss::SVObservationState(sv->observation_state)); + lsv.setObservations(sv->observations); + lsv.setGoodObservations(sv->good_observations); + lsv.setGpsParityErrorCount(sv->parity_error_count); + lsv.setFilterStages(sv->filter_stages); + lsv.setCarrierNoise(sv->carrier_noise); + lsv.setLatency(sv->latency); + lsv.setPredetectInterval(sv->predetect_interval); + lsv.setPostdetections(sv->postdetections); + lsv.setUnfilteredMeasurementIntegral(sv->unfiltered_measurement_integral); + lsv.setUnfilteredMeasurementFraction(sv->unfiltered_measurement_fraction); + lsv.setUnfilteredTimeUncertainty(sv->unfiltered_time_uncertainty); + lsv.setUnfilteredSpeed(sv->unfiltered_speed); + lsv.setUnfilteredSpeedUncertainty(sv->unfiltered_speed_uncertainty); + + lsv.setMultipathEstimate(sv->multipath_estimate); + lsv.setAzimuth(sv->azimuth); + lsv.setElevation(sv->elevation); + lsv.setCarrierPhaseCyclesIntegral(sv->carrier_phase_cycles_integral); + lsv.setCarrierPhaseCyclesFraction(sv->carrier_phase_cycles_fraction); + lsv.setFineSpeed(sv->fine_speed); + lsv.setFineSpeedUncertainty(sv->fine_speed_uncertainty); + lsv.setCycleSlipCount(sv->cycle_slip_count); + + auto status = lsv.initMeasurementStatus(); + parse_measurement_status_common(sv->measurement_status, status); + + status.setGpsRoundRobinRxDiversity(sv->measurement_status & (1 << 18)); + status.setGpsRxDiversity(sv->measurement_status & (1 << 19)); + status.setGpsLowBandwidthRxDiversityCombined(sv->measurement_status & (1 << 20)); + status.setGpsHighBandwidthNu4(sv->measurement_status & (1 << 21)); + status.setGpsHighBandwidthNu8(sv->measurement_status & (1 << 22)); + status.setGpsHighBandwidthUniform(sv->measurement_status & (1 << 23)); + + status.setMultipathEstimateIsValid(sv->misc_status & (1 << 0)); + status.setDirectionIsValid(sv->misc_status & (1 << 1)); + +#ifdef RAWGPS_TEST + // if (sv->measurement_status & (1 << 27)) printf("%d\n", sv->unfiltered_measurement_integral); + printf("GPS %03d %d %d 0x%08X o: %02x go: %02x fs: %02x cn: %02x pd: %02x cs: %02x po: %02x ms: %08x ms2: %08x me: %08x az: %08x el: %08x fc: %08x\n", + sv->sv_id, + !!(sv->measurement_status & (1 << 27)), + sv->unfiltered_measurement_integral, sv->unfiltered_measurement_integral, + sv->observations, + sv->good_observations, + sv->filter_stages, + sv->carrier_noise, + sv->predetect_interval, + sv->cycle_slip_count, + sv->postdetections, + sv->measurement_status, + sv->misc_status, + sv->multipath_estimate, + *(uint32_t*)&sv->azimuth, + *(uint32_t*)&sv->elevation, + report->f_count + ); +#endif + + } + + break; + } + case LOG_GNSS_GLONASS_MEASUREMENT_REPORT: { + uint8_t version = log_data[0]; + assert(version == 0); + + assert(len >= sizeof(GNSSGlonassMeasurementReportv0)); + const GNSSGlonassMeasurementReportv0* report = (const GNSSGlonassMeasurementReportv0*)ptr; + + auto lreport = qcomGnss.initMeasurementReport(); + lreport.setSource(cereal::QcomGnss::MeasurementSource::GLONASS); + lreport.setFCount(report->f_count); + lreport.setGlonassCycleNumber(report->glonass_cycle_number); + lreport.setGlonassNumberOfDays(report->glonass_number_of_days); + lreport.setMilliseconds(report->milliseconds); + lreport.setTimeBias(report->time_bias); + lreport.setClockTimeUncertainty(report->clock_time_uncertainty); + lreport.setClockFrequencyBias(report->clock_frequency_bias); + lreport.setClockFrequencyUncertainty(report->clock_frequency_uncertainty); + + auto lsvs = lreport.initSv(report->sv_count); + for (int i=0; isv_count; i++) { + auto lsv = lsvs[i]; + const GNSSGlonassMeasurementReportv0_SV *sv = &report->sv[i]; + + lsv.setSvId(sv->sv_id); + lsv.setObservationState(cereal::QcomGnss::SVObservationState(sv->observation_state)); + lsv.setObservations(sv->observations); + lsv.setGoodObservations(sv->good_observations); + lsv.setGlonassFrequencyIndex(sv->frequency_index); + lsv.setGlonassHemmingErrorCount(sv->hemming_error_count); + lsv.setFilterStages(sv->filter_stages); + lsv.setCarrierNoise(sv->carrier_noise); + lsv.setLatency(sv->latency); + lsv.setPredetectInterval(sv->predetect_interval); + lsv.setPostdetections(sv->postdetections); + lsv.setUnfilteredMeasurementIntegral(sv->unfiltered_measurement_integral); + lsv.setUnfilteredMeasurementFraction(sv->unfiltered_measurement_fraction); + lsv.setUnfilteredTimeUncertainty(sv->unfiltered_time_uncertainty); + lsv.setUnfilteredSpeed(sv->unfiltered_speed); + lsv.setUnfilteredSpeedUncertainty(sv->unfiltered_speed_uncertainty); + + lsv.setMultipathEstimate(sv->multipath_estimate); + lsv.setAzimuth(sv->azimuth); + lsv.setElevation(sv->elevation); + lsv.setCarrierPhaseCyclesIntegral(sv->carrier_phase_cycles_integral); + lsv.setCarrierPhaseCyclesFraction(sv->carrier_phase_cycles_fraction); + lsv.setFineSpeed(sv->fine_speed); + lsv.setFineSpeedUncertainty(sv->fine_speed_uncertainty); + lsv.setCycleSlipCount(sv->cycle_slip_count); + + auto status = lsv.initMeasurementStatus(); + parse_measurement_status_common(sv->measurement_status, status); + + status.setGlonassMeanderBitEdgeValid(sv->measurement_status & (1 << 16)); + status.setGlonassTimeMarkValid(sv->measurement_status & (1 << 17)); + + status.setMultipathEstimateIsValid(sv->misc_status & (1 << 0)); + status.setDirectionIsValid(sv->misc_status & (1 << 1)); + + +#ifdef RAWGPS_TEST + // if (sv->measurement_status & (1 << 27)) printf("%d\n", sv->unfiltered_measurement_integral); + printf("GLO %03d %02x %d %d 0x%08X o: %02x go: %02x fs: %02x cn: %02x pd: %02x cs: %02x po: %02x ms: %08x ms2: %08x me: %08x az: %08x el: %08x fc: %08x\n", + sv->sv_id, sv->frequency_index & 0xff, + !!(sv->measurement_status & (1 << 27)), + sv->unfiltered_measurement_integral, sv->unfiltered_measurement_integral, + sv->observations, + sv->good_observations, + sv->filter_stages, + sv->carrier_noise, + sv->predetect_interval, + sv->cycle_slip_count, + sv->postdetections, + sv->measurement_status, + sv->misc_status, + sv->multipath_estimate, + *(uint32_t*)&sv->azimuth, + *(uint32_t*)&sv->elevation, + report->f_count + ); +#endif + + } + break; + } + case LOG_GNSS_OEMDRE_MEASUREMENMT_REPORT: { + // hexdump(ptr, len); + + uint8_t version = log_data[0]; + assert(version == 2); + + assert(len >= sizeof(GNSSOemdreMeasurementReportv2)); + const GNSSOemdreMeasurementReportv2* report = (const GNSSOemdreMeasurementReportv2*)ptr; + + + auto lreport = qcomGnss.initDrMeasurementReport(); + + lreport.setReason(report->reason); + lreport.setSeqNum(report->seq_num); + lreport.setSeqMax(report->seq_max); + lreport.setRfLoss(report->rf_loss); + lreport.setSystemRtcValid(report->system_rtc_valid); + lreport.setFCount(report->f_count); + lreport.setClockResets(report->clock_resets); + lreport.setSystemRtcTime(report->system_rtc_time); + + lreport.setGpsLeapSeconds(report->gps_leap_seconds); + lreport.setGpsLeapSecondsUncertainty(report->gps_leap_seconds_uncertainty); + lreport.setGpsToGlonassTimeBiasMilliseconds(report->gps_to_glonass_time_bias_milliseconds); + lreport.setGpsToGlonassTimeBiasMillisecondsUncertainty(report->gps_to_glonass_time_bias_milliseconds_uncertainty); + + lreport.setGpsWeek(report->gps_week); + lreport.setGpsMilliseconds(report->gps_milliseconds); + lreport.setGpsTimeBiasMs(report->gps_time_bias); + lreport.setGpsClockTimeUncertaintyMs(report->gps_clock_time_uncertainty); + lreport.setGpsClockSource(report->gps_clock_source); + + lreport.setGlonassClockSource(report->glonass_clock_source); + lreport.setGlonassYear(report->glonass_year); + lreport.setGlonassDay(report->glonass_day); + lreport.setGlonassMilliseconds(report->glonass_milliseconds); + lreport.setGlonassTimeBias(report->glonass_time_bias); + lreport.setGlonassClockTimeUncertainty(report->glonass_clock_time_uncertainty); + + lreport.setClockFrequencyBias(report->clock_frequency_bias); + lreport.setClockFrequencyUncertainty(report->clock_frequency_uncertainty); + lreport.setFrequencySource(report->frequency_source); + + lreport.setSource(cereal::QcomGnss::MeasurementSource(report->source)); + + auto lsvs = lreport.initSv(report->sv_count); + + // for (int i=0; isv_count; i++) { + // GNSSOemdreMeasurement *sv = &report->gps[i]; + // if (!(sv->measurement_status & (1 << 27))) continue; + // printf("oemdre %03d %d %f\n", sv->sv_id, sv->unfiltered_measurement_integral, sv->unfiltered_measurement_fraction); + // } + for (int i=0; isv_count; i++) { + auto lsv = lsvs[i]; + const GNSSOemdreMeasurement *sv = &report->measurements[i]; + + lsv.setSvId(sv->sv_id); + lsv.setGlonassFrequencyIndex(sv->glonass_frequency_index); + lsv.setObservationState(cereal::QcomGnss::SVObservationState(sv->observation_state)); + lsv.setObservations(sv->observations); + lsv.setGoodObservations(sv->good_observations); + lsv.setFilterStages(sv->filter_stages); + lsv.setPredetectInterval(sv->predetect_interval); + lsv.setCycleSlipCount(sv->cycle_slip_count); + lsv.setPostdetections(sv->postdetections); + + auto status = lsv.initMeasurementStatus(); + parse_measurement_status_common(sv->measurement_status, status); + + status.setMultipathEstimateIsValid(sv->multipath_estimate_valid); + status.setDirectionIsValid(sv->direction_valid); + + lsv.setCarrierNoise(sv->carrier_noise); + lsv.setRfLoss(sv->rf_loss); + lsv.setLatency(sv->latency); + + lsv.setFilteredMeasurementFraction(sv->filtered_measurement_fraction); + lsv.setFilteredMeasurementIntegral(sv->filtered_measurement_integral); + lsv.setFilteredTimeUncertainty(sv->filtered_time_uncertainty); + lsv.setFilteredSpeed(sv->filtered_speed); + lsv.setFilteredSpeedUncertainty(sv->filtered_speed_uncertainty); + + lsv.setUnfilteredMeasurementFraction(sv->unfiltered_measurement_fraction); + lsv.setUnfilteredMeasurementIntegral(sv->unfiltered_measurement_integral); + lsv.setUnfilteredTimeUncertainty(sv->unfiltered_time_uncertainty); + lsv.setUnfilteredSpeed(sv->unfiltered_speed); + lsv.setUnfilteredSpeedUncertainty(sv->unfiltered_speed_uncertainty); + + lsv.setMultipathEstimate(sv->multipath_estimate); + lsv.setAzimuth(sv->azimuth); + lsv.setElevation(sv->elevation); + lsv.setDopplerAcceleration(sv->doppler_acceleration); + lsv.setFineSpeed(sv->fine_speed); + lsv.setFineSpeedUncertainty(sv->fine_speed_uncertainty); + + lsv.setCarrierPhase(sv->carrier_phase); + lsv.setFCount(sv->f_count); + + lsv.setParityErrorCount(sv->parity_error_count); + lsv.setGoodParity(sv->good_parity); + + } + break; + } + case LOG_GNSS_OEMDRE_SVPOLY_REPORT: { + uint8_t version = log_data[0]; + assert(version == 2); + + assert(len >= sizeof(GNSSOemdreSVPolyReportv2)); + const GNSSOemdreSVPolyReportv2* report = (const GNSSOemdreSVPolyReportv2*)ptr; + + auto lreport = qcomGnss.initDrSvPoly(); + + lreport.setSvId(report->sv_id); + lreport.setFrequencyIndex(report->frequency_index); + + lreport.setHasPosition(report->flags & 1); + lreport.setHasIono(report->flags & 2); + lreport.setHasTropo(report->flags & 4); + lreport.setHasElevation(report->flags & 8); + lreport.setPolyFromXtra(report->flags & 16); + lreport.setHasSbasIono(report->flags & 32); + + lreport.setIode(report->iode); + lreport.setT0(report->t0); + + kj::ArrayPtr xyz0(report->xyz0, 3); + lreport.setXyz0(xyz0); + + kj::ArrayPtr xyzN(report->xyzN, 9); + lreport.setXyzN(xyzN); + + kj::ArrayPtr other(report->other, 4); + lreport.setOther(other); + + lreport.setPositionUncertainty(report->position_uncertainty); + lreport.setIonoDelay(report->iono_delay); + lreport.setIonoDot(report->iono_dot); + lreport.setSbasIonoDelay(report->sbas_iono_delay); + lreport.setSbasIonoDot(report->sbas_iono_dot); + lreport.setTropoDelay(report->tropo_delay); + lreport.setElevation(report->elevation); + lreport.setElevationDot(report->elevation_dot); + lreport.setElevationUncertainty(report->elevation_uncertainty); + + kj::ArrayPtr velocity_coeff(report->velocity_coeff, 12); + lreport.setVelocityCoeff(velocity_coeff); + + break; + } + default: + // printf("%04x\n", log_header->code); + // hexdump(ptr, len); + + qcomGnss.setRawLog(kj::arrayPtr(ptr, len)); + + break; + } + + auto words = capnp::messageToFlatArray(msg); + auto bytes = words.asBytes(); + zmq_send(rawgps_publisher, bytes.begin(), bytes.size(), 0); +} + +static void handle_event(unsigned char *ptr, int len) { + // printf("EVENT\n"); +} + +static uint16_t log_codes[] = { + LOG_GNSS_CLOCK_REPORT, + LOG_GNSS_GPS_MEASUREMENT_REPORT, + LOG_GNSS_GLONASS_MEASUREMENT_REPORT, + LOG_GNSS_OEMDRE_MEASUREMENMT_REPORT, + LOG_GNSS_OEMDRE_SVPOLY_REPORT, + + // unparsed: + LOG_GNSS_POSITION_REPORT, + + LOG_GNSS_BDS_MEASUREMENT_REPORT, // these are missing by might as well try to catch them anyway + LOG_GNSS_GAL_MEASUREMENT_REPORT, + + LOG_GNSS_ME_DPO_STATUS, + LOG_GNSS_CD_DB_REPORT, + LOG_GNSS_PRX_RF_HW_STATUS_REPORT, + LOG_CGPS_SLOW_CLOCK_CLIB_REPORT, + LOG_GNSS_CONFIGURATION_STATE, +}; + + +struct SendDiagSyncState { + sem_t sem; + int len; +}; + +static void diag_send_sync_cb(unsigned char *ptr, int len, void *data_ptr) { + SendDiagSyncState *s = (SendDiagSyncState*)data_ptr; + s->len = len; + sem_post(&s->sem); +} + +static int diag_send_sync(int client_id, unsigned char* req_pkt, size_t pkt_len, + unsigned char* res_pkt, size_t res_pkt_size) { + + SendDiagSyncState s = {0}; + sem_init(&s.sem, 0, 0); + + int err = diag_send_dci_async_req(client_id, req_pkt, pkt_len, res_pkt, res_pkt_size, + diag_send_sync_cb, &s); + assert(err == DIAG_DCI_NO_ERROR); + + sem_wait(&s.sem); + return s.len; +} + +static int oemdre_on(int client_id) { + // enable OEM DR + unsigned char res_pkt[DIAG_MAX_RX_PKT_SIZ]; + + GpsOemControlReq req_pkt = { + .cmd_code = DIAG_SUBSYS_CMD, + .subsys_id = DIAG_SUBSYS_GPS, + .subsys_cmd_code = CGPS_DIAG_PDAPI_CMD, + .gps_cmd_code = CGPS_OEM_CONTROL, + .version = 1, + + .oem_feature = GPSDIAG_OEMFEATURE_DRE, + .oem_command = GPSDIAG_OEM_DRE_ON, + }; + + int res_len = diag_send_sync(client_id, (unsigned char*)&req_pkt, sizeof(req_pkt), + res_pkt, sizeof(res_pkt)); + GpsOemControlResp *resp = (GpsOemControlResp*)res_pkt; + + if (res_len != sizeof(GpsOemControlResp) + || resp->cmd_code != DIAG_SUBSYS_CMD + || resp->subsys_id != DIAG_SUBSYS_GPS + || resp->subsys_cmd_code != CGPS_DIAG_PDAPI_CMD + || resp->gps_cmd_code != CGPS_OEM_CONTROL + || resp->oem_feature != GPSDIAG_OEMFEATURE_DRE + || resp->oem_command != GPSDIAG_OEM_DRE_ON) { + LOGW("oemdre_on: bad response!"); + return -1; + } + + return resp->resp_result; +} + +static void efs_sync(int client_id) { + unsigned char res_pkt[DIAG_MAX_RX_PKT_SIZ]; + + Efs2DiagSyncReq req_pkt = { + .cmd_code = DIAG_SUBSYS_CMD, + .subsys_id = DIAG_SUBSYS_FS, + .subsys_cmd_code = EFS2_DIAG_SYNC_NO_WAIT, + .sequence_num = (uint16_t)(rand() % 100), + }; + req_pkt.path[0] = '/'; + req_pkt.path[1] = 0; + + int res_len = diag_send_sync(client_id, (unsigned char*)&req_pkt, sizeof(req_pkt), + res_pkt, sizeof(res_pkt)); + Efs2DiagSyncResp *resp = (Efs2DiagSyncResp*)res_pkt; + + if (res_len != sizeof(Efs2DiagSyncResp) + || resp->cmd_code != DIAG_SUBSYS_CMD + || resp->subsys_id != DIAG_SUBSYS_FS + || resp->subsys_cmd_code != EFS2_DIAG_SYNC_NO_WAIT) { + LOGW("efs_sync: bad response!"); + return; + } + if (resp->diag_errno != 0) { + LOGW("efs_sync: error %d", resp->diag_errno); + } +} + +static uint32_t nv_read_u32(int client_id, uint16_t nv_id) { + NvPacket req = { + .cmd_code = DIAG_NV_READ_F, + .nv_id = nv_id, + }; + NvPacket resp = {0}; + + int res_len = diag_send_sync(client_id, (unsigned char*)&req, sizeof(req), + (unsigned char*)&resp, sizeof(resp)); + + // hexdump((uint8_t*)&resp, res_len); + + if (resp.cmd_code != DIAG_NV_READ_F + || resp.nv_id != nv_id) { + LOGW("nv_read_u32: diag command failed"); + return 0; + } + + if (resp.status != NV_DONE) { + LOGW("nv_read_u32: read failed: %d", resp.status); + return 0; + } + return *(uint32_t*)resp.data; +} + +static bool nv_write_u32(int client_id, uint16_t nv_id, uint32_t val) { + NvPacket req = { + .cmd_code = DIAG_NV_WRITE_F, + .nv_id = nv_id, + }; + *(uint32_t*)req.data = val; + + NvPacket resp = {0}; + int res_len = diag_send_sync(client_id, (unsigned char*)&req, sizeof(req), + (unsigned char*)&resp, sizeof(resp)); + + // hexdump((uint8_t*)&resp, res_len); + + if (resp.cmd_code != DIAG_NV_WRITE_F + || resp.nv_id != nv_id) { + LOGW("nv_write_u32: diag command failed"); + return false; + } + + if (resp.status != NV_DONE) { + LOGW("nv_write_u32: write failed: %d", resp.status); + return false; + } + + return true; +} + +static void nav_config(int client_id, uint8_t config) { + unsigned char res_pkt[DIAG_MAX_RX_PKT_SIZ]; + + GpsNavConfigReq req_pkt = { + .cmd_code = DIAG_SUBSYS_CMD_VER_2, + .subsys_id = DIAG_SUBSYS_GPS, + .subsys_cmd_code = TM_DIAG_NAV_CONFIG_CMD, + .desired_config = config, + }; + + int res_len = diag_send_sync(client_id, (unsigned char*)&req_pkt, sizeof(req_pkt), + res_pkt, sizeof(res_pkt)); + GpsNavConfigResp *resp = (GpsNavConfigResp*)res_pkt; + + if (res_len != sizeof(GpsNavConfigResp) + || resp->cmd_code != DIAG_SUBSYS_CMD_VER_2 + || resp->subsys_id != DIAG_SUBSYS_GPS + || resp->subsys_cmd_code != TM_DIAG_NAV_CONFIG_CMD) { + LOGW("nav_config: bad response!"); + return; + } + LOG("nav config: %04x %04x", resp->supported_config, resp->actual_config); +} + +void rawgps_init() { + int err; + + + rawgps_context = zmq_ctx_new(); + rawgps_publisher = zmq_socket(rawgps_context, ZMQ_PUB); + zmq_bind(rawgps_publisher, "tcp://*:8029"); + + + bool init_success = Diag_LSM_Init(NULL); + assert(init_success); + + uint16_t list = DIAG_CON_APSS | DIAG_CON_MPSS; + int signal_type = SIGCONT; + err = diag_register_dci_client(&client_id, &list, 0, &signal_type); + assert(err == DIAG_DCI_NO_ERROR); + + { + uint32_t oem_features = nv_read_u32(client_id, NV_GNSS_OEM_FEATURE_MASK); + LOG("oem features: %08x", oem_features); + + if (!(oem_features & NV_GNSS_OEM_FEATURE_MASK_OEMDRE)) { + LOG("OEMDRE feature disabled, enabling..."); + nv_write_u32(client_id, NV_GNSS_OEM_FEATURE_MASK, NV_GNSS_OEM_FEATURE_MASK_OEMDRE); + efs_sync(client_id); + } + + int oemdre_status = oemdre_on(client_id); + LOG("oemdre status: %d", oemdre_status); + } + + { + // make sure GNSS duty cycling is off + uint32_t dpo = nv_read_u32(client_id, NV_CGPS_DPO_CONTROL); + LOG("dpo: %d", dpo); + if (dpo != 0) { + nv_write_u32(client_id, NV_CGPS_DPO_CONTROL, 0); + efs_sync(client_id); + } + } + + // enable beidou + // nav_config(client_id, 0x13); // 0b10011 + + err = diag_register_dci_stream(handle_log, handle_event); + assert(err == DIAG_DCI_NO_ERROR); + + err = diag_log_stream_config(client_id, true, log_codes, ARRAYSIZE(log_codes)); + assert(err == DIAG_DCI_NO_ERROR); +} + +void rawgps_destroy() { + + int err; + + err = diag_log_stream_config(client_id, false, log_codes, ARRAYSIZE(log_codes)); + assert(err == DIAG_DCI_NO_ERROR); + + err = diag_release_dci_client(&client_id); + assert(err == DIAG_DCI_NO_ERROR); + + Diag_LSM_DeInit(); + + zmq_close(rawgps_publisher); + zmq_term(rawgps_context); + +} + + +#ifdef RAWGPS_TEST +int main() { + int err = 0; + rawgps_init(); + + while(1) { + usleep(100000); + } + + rawgps_destroy(); + return 0; +} +#endif \ No newline at end of file diff --git a/selfdrive/sensord/rawgps.h b/selfdrive/sensord/rawgps.h new file mode 100644 index 0000000000..13d23cd28c --- /dev/null +++ b/selfdrive/sensord/rawgps.h @@ -0,0 +1,7 @@ +#ifndef RAWGPS_H +#define RAWGPS_H + +void rawgps_init(); +void rawgps_destroy(); + +#endif diff --git a/selfdrive/sensord/sensord b/selfdrive/sensord/sensord deleted file mode 100755 index 4294a0649b..0000000000 --- a/selfdrive/sensord/sensord +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:010fbcc81ddc121424d688568d98bbcbe1f5671ce8af21dba424b89d84e3b214 -size 1159016 diff --git a/selfdrive/sensord/sensors.cc b/selfdrive/sensord/sensors.cc new file mode 100644 index 0000000000..5717458f72 --- /dev/null +++ b/selfdrive/sensord/sensors.cc @@ -0,0 +1,232 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include + +#include + +#include + +#include "common/timing.h" +#include "common/swaglog.h" + +#include "cereal/gen/cpp/log.capnp.h" + +#define SENSOR_ACCELEROMETER 1 +#define SENSOR_MAGNETOMETER 2 +#define SENSOR_GYRO 4 + +// ACCELEROMETER_UNCALIBRATED is only in Android O +// https://developer.android.com/reference/android/hardware/Sensor.html#STRING_TYPE_ACCELEROMETER_UNCALIBRATED +#define SENSOR_MAGNETOMETER_UNCALIBRATED 3 +#define SENSOR_GYRO_UNCALIBRATED 5 + +#define SENSOR_PROXIMITY 6 +#define SENSOR_LIGHT 7 + +volatile int do_exit = 0; + +namespace { + +void set_do_exit(int sig) { + do_exit = 1; +} + +void sigpipe_handler(int sig) { + LOGE("SIGPIPE received"); +} + + +void sensor_loop() { + LOG("*** sensor loop"); + struct sensors_poll_device_t* device; + struct sensors_module_t* module; + + hw_get_module(SENSORS_HARDWARE_MODULE_ID, (hw_module_t const**)&module); + sensors_open(&module->common, &device); + + // required + struct sensor_t const* list; + int count = module->get_sensors_list(module, &list); + LOG("%d sensors found", count); + + if (getenv("SENSOR_TEST")) { + exit(count); + } + + for (int i = 0; i < count; i++) { + LOGD("sensor %4d: %4d %60s %d-%ld us", i, list[i].handle, list[i].name, list[i].minDelay, list[i].maxDelay); + } + + device->activate(device, SENSOR_MAGNETOMETER_UNCALIBRATED, 0); + device->activate(device, SENSOR_GYRO_UNCALIBRATED, 0); + device->activate(device, SENSOR_ACCELEROMETER, 0); + device->activate(device, SENSOR_MAGNETOMETER, 0); + device->activate(device, SENSOR_GYRO, 0); + device->activate(device, SENSOR_PROXIMITY, 0); + device->activate(device, SENSOR_LIGHT, 0); + + device->activate(device, SENSOR_MAGNETOMETER_UNCALIBRATED, 1); + device->activate(device, SENSOR_GYRO_UNCALIBRATED, 1); + device->activate(device, SENSOR_ACCELEROMETER, 1); + device->activate(device, SENSOR_MAGNETOMETER, 1); + device->activate(device, SENSOR_GYRO, 1); + device->activate(device, SENSOR_PROXIMITY, 1); + device->activate(device, SENSOR_LIGHT, 1); + + device->setDelay(device, SENSOR_GYRO_UNCALIBRATED, ms2ns(10)); + device->setDelay(device, SENSOR_MAGNETOMETER_UNCALIBRATED, ms2ns(100)); + device->setDelay(device, SENSOR_ACCELEROMETER, ms2ns(10)); + device->setDelay(device, SENSOR_GYRO, ms2ns(10)); + device->setDelay(device, SENSOR_MAGNETOMETER, ms2ns(100)); + device->setDelay(device, SENSOR_PROXIMITY, ms2ns(100)); + device->setDelay(device, SENSOR_LIGHT, ms2ns(100)); + + static const size_t numEvents = 16; + sensors_event_t buffer[numEvents]; + + auto sensor_events_sock = zsock_new_pub("@tcp://*:8003"); + assert(sensor_events_sock); + auto sensor_events_sock_raw = zsock_resolve(sensor_events_sock); + + while (!do_exit) { + int n = device->poll(device, buffer, numEvents); + if (n == 0) continue; + if (n < 0) { + LOG("sensor_loop poll failed: %d", n); + continue; + } + + int log_events = 0; + for (int i=0; i < n; i++) { + switch (buffer[i].type) { + case SENSOR_TYPE_ACCELEROMETER: + case SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED: + case SENSOR_TYPE_MAGNETIC_FIELD: + case SENSOR_TYPE_GYROSCOPE_UNCALIBRATED: + case SENSOR_TYPE_GYROSCOPE: + case SENSOR_TYPE_PROXIMITY: + case SENSOR_TYPE_LIGHT: + log_events++; + break; + default: + continue; + } + } + + uint64_t log_time = nanos_since_boot(); + + capnp::MallocMessageBuilder msg; + cereal::Event::Builder event = msg.initRoot(); + event.setLogMonoTime(log_time); + + auto sensor_events = event.initSensorEvents(log_events); + + int log_i = 0; + for (int i = 0; i < n; i++) { + + const sensors_event_t& data = buffer[i]; + + switch (data.type) { + case SENSOR_TYPE_ACCELEROMETER: + case SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED: + case SENSOR_TYPE_MAGNETIC_FIELD: + case SENSOR_TYPE_GYROSCOPE_UNCALIBRATED: + case SENSOR_TYPE_GYROSCOPE: + case SENSOR_TYPE_PROXIMITY: + case SENSOR_TYPE_LIGHT: + break; + default: + continue; + } + + auto log_event = sensor_events[log_i]; + + log_event.setSource(cereal::SensorEventData::SensorSource::ANDROID); + log_event.setVersion(data.version); + log_event.setSensor(data.sensor); + log_event.setType(data.type); + log_event.setTimestamp(data.timestamp); + + switch (data.type) { + case SENSOR_TYPE_ACCELEROMETER: { + auto svec = log_event.initAcceleration(); + kj::ArrayPtr vs(&data.acceleration.v[0], 3); + svec.setV(vs); + svec.setStatus(data.acceleration.status); + break; + } + case SENSOR_TYPE_MAGNETIC_FIELD_UNCALIBRATED: { + auto svec = log_event.initMagneticUncalibrated(); + // assuming the uncalib and bias floats are contiguous in memory + kj::ArrayPtr vs(&data.uncalibrated_magnetic.uncalib[0], 6); + svec.setV(vs); + break; + } + case SENSOR_TYPE_MAGNETIC_FIELD: { + auto svec = log_event.initMagnetic(); + kj::ArrayPtr vs(&data.magnetic.v[0], 3); + svec.setV(vs); + svec.setStatus(data.magnetic.status); + break; + } + case SENSOR_TYPE_GYROSCOPE_UNCALIBRATED: { + auto svec = log_event.initGyroUncalibrated(); + // assuming the uncalib and bias floats are contiguous in memory + kj::ArrayPtr vs(&data.uncalibrated_gyro.uncalib[0], 6); + svec.setV(vs); + break; + } + case SENSOR_TYPE_GYROSCOPE: { + auto svec = log_event.initGyro(); + kj::ArrayPtr vs(&data.gyro.v[0], 3); + svec.setV(vs); + svec.setStatus(data.gyro.status); + break; + } + case SENSOR_TYPE_PROXIMITY: { + log_event.setProximity(data.distance); + break; + } + case SENSOR_TYPE_LIGHT: + log_event.setLight(data.light); + break; + } + + log_i++; + } + + auto words = capnp::messageToFlatArray(msg); + auto bytes = words.asBytes(); + zmq_send(sensor_events_sock_raw, bytes.begin(), bytes.size(), ZMQ_DONTWAIT); + + } + LOG("bye"); +} + +} + +int main(int argc, char *argv[]) { + setpriority(PRIO_PROCESS, 0, -13); + signal(SIGINT, (sighandler_t)set_do_exit); + signal(SIGTERM, (sighandler_t)set_do_exit); + signal(SIGPIPE, (sighandler_t)sigpipe_handler); + + sensor_loop(); + + return 0; +} diff --git a/selfdrive/sensord/start_gpsd.py b/selfdrive/sensord/start_gpsd.py new file mode 100755 index 0000000000..ada2687158 --- /dev/null +++ b/selfdrive/sensord/start_gpsd.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python2 +import os + +assert os.system("make") == 0 +os.environ['LD_LIBRARY_PATH'] = "/system/lib64:" + os.environ['LD_LIBRARY_PATH'] +os.execv("./gpsd", ["gpsd"]) diff --git a/selfdrive/sensord/start_sensord.py b/selfdrive/sensord/start_sensord.py new file mode 100755 index 0000000000..d6d6564113 --- /dev/null +++ b/selfdrive/sensord/start_sensord.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python2 +import os + +assert os.system("make") == 0 +os.environ['LD_LIBRARY_PATH'] = "/system/lib64:" + os.environ['LD_LIBRARY_PATH'] +os.execv("./sensord", ["sensord"]) diff --git a/selfdrive/service_list.yaml b/selfdrive/service_list.yaml index d18eaf6137..9d141c88d1 100644 --- a/selfdrive/service_list.yaml +++ b/selfdrive/service_list.yaml @@ -2,119 +2,135 @@ # LogRotate: 8001 is a PUSH PULL socket between loggerd and visiond -# all ZMQ pub sub: +# all ZMQ pub sub: port, should_log, frequency, (qlog_decimation) # frame syncing packet -frame: [8002, true] +frame: [8002, true, 20., 1] # accel, gyro, and compass -sensorEvents: [8003, true] +sensorEvents: [8003, true, 100., 100] # GPS data, also global timestamp -gpsNMEA: [8004, true] +gpsNMEA: [8004, true, 9.] # 9 msgs each sec # CPU+MEM+GPU+BAT temps -thermal: [8005, true] +thermal: [8005, true, 1., 1] # List(CanData), list of can messages -can: [8006, true] -controlsState: [8007, true] - -# random events we want to log - -#liveEvent: [8008, true] -model: [8009, true] -features: [8010, true] -health: [8011, true] -radarState: [8012, true] -#liveUI: [8014, true] -encodeIdx: [8015, true] -liveTracks: [8016, true] -sendcan: [8017, true] -logMessage: [8018, true] -liveCalibration: [8019, true] -androidLog: [8020, true] -carState: [8021, true] +can: [8006, true, 100.] +controlsState: [8007, true, 100., 100] +#liveEvent: [8008, true, 0.] +model: [8009, true, 20.] +features: [8010, true, 0.] +health: [8011, true, 1., 1] +radarState: [8012, true, 20.] +#liveUI: [8014, true, 0.] +encodeIdx: [8015, true, 20.] +liveTracks: [8016, true, 20.] +sendcan: [8017, true, 100.] +logMessage: [8018, true, 0.] +liveCalibration: [8019, true, 5.] +androidLog: [8020, true, 0.] +carState: [8021, true, 100., 10] # 8022 is reserved for sshd -carControl: [8023, true] -plan: [8024, true] -liveLocation: [8025, true] -gpsLocation: [8026, true] -ethernetData: [8027, true] -navUpdate: [8028, true] -qcomGnss: [8029, true] -lidarPts: [8030, true] -procLog: [8031, true] -gpsLocationExternal: [8032, true] -ubloxGnss: [8033, true] -clocks: [8034, true] -liveMpc: [8035, true] -liveLongitudinalMpc: [8036, true] -plusFrame: [8037, false] -navStatus: [8038, true] -gpsLocationTrimble: [8039, true] -trimbleGnss: [8041, true] -ubloxRaw: [8042, true] -gpsPlannerPoints: [8043, true] -gpsPlannerPlan: [8044, true] -applanixRaw: [8046, true] -orbLocation: [8047, true] -trafficEvents: [8048, true] -liveLocationTiming: [8049, true] -orbslamCorrection: [8050, true] -liveLocationCorrected: [8051, true] -orbObservation: [8052, true] -applanixLocation: [8053, true] -liveLocationKalman: [8054, true] -uiNavigationEvent: [8055, true] -orbOdometry: [8057, true] -orbFeatures: [8058, false] -orbKeyFrame: [8059, true] -uiLayoutState: [8060, true] -frontEncodeIdx: [8061, true] -orbFeaturesSummary: [8062, true] -driverMonitoring: [8063, true] -liveParameters: [8064, true] -liveMapData: [8065, true] -cameraOdometry: [8066, true] -pathPlan: [8067, true] -kalmanOdometry: [8068, true] - -testModel: [8040, false] -testLiveLocation: [8045, false] -testJoystick: [8056, false] +carControl: [8023, true, 100., 10] +plan: [8024, true, 20.] +liveLocation: [8025, true, 0.] +gpsLocation: [8026, true, 1., 1] +ethernetData: [8027, true, 0.] +navUpdate: [8028, true, 0.] +qcomGnss: [8029, true, 0.] +lidarPts: [8030, true, 0.] +procLog: [8031, true, 0.5] +gpsLocationExternal: [8032, true, 10., 1] +ubloxGnss: [8033, true, 10.] +clocks: [8034, true, 1.] +liveMpc: [8035, false, 20.] +liveLongitudinalMpc: [8036, false, 20.] +plusFrame: [8037, false, 0.] +navStatus: [8038, true, 0.] +gpsLocationTrimble: [8039, true, 0.] +trimbleGnss: [8041, true, 0.] +ubloxRaw: [8042, true, 20.] +gpsPlannerPoints: [8043, true, 0.] +gpsPlannerPlan: [8044, true, 0.] +applanixRaw: [8046, true, 0.] +orbLocation: [8047, true, 0.] +trafficEvents: [8048, true, 0.] +liveLocationTiming: [8049, true, 0.] +orbslamCorrection: [8050, true, 0.] +liveLocationCorrected: [8051, true, 0.] +orbObservation: [8052, true, 0.] +applanixLocation: [8053, true, 0.] +liveLocationKalman: [8054, true, 0.] +uiNavigationEvent: [8055, true, 0.] +orbOdometry: [8057, true, 0.] +orbFeatures: [8058, false, 0.] +orbKeyFrame: [8059, true, 0.] +uiLayoutState: [8060, true, 0.] +frontEncodeIdx: [8061, true, 5.] +orbFeaturesSummary: [8062, true, 0.] +driverMonitoring: [8063, true, 5., 1] +liveParameters: [8064, true, 10.] +liveMapData: [8065, true, 0.] +cameraOdometry: [8066, true, 5.] +pathPlan: [8067, true, 20.] +kalmanOdometry: [8068, true, 0.] +thumbnail: [8069, true, 0.2, 1] +carEvents: [8070, true, 1., 1] +carParams: [8071, true, 0.02, 1] + +testModel: [8040, false, 0.] +testLiveLocation: [8045, false, 0.] +testJoystick: [8056, false, 0.] # 8080 is reserved for slave testing daemon # 8762 is reserved for logserver # manager -- base process to manage starting and stopping of all others -# subscribes: health -# publishes: thermal +# subscribes: thermal # **** processes that communicate with the outside world **** +# thermald -- decides when to start and stop onroad +# subscribes: health, location +# publishes: thermal + # boardd -- communicates with the car # subscribes: sendcan -# publishes: can, health, ubloxRaw +# publishes: can, health, ubloxRaw + +# sensord -- publishes IMU and Magnetometer +# publishes: sensorEvents -# sensord -- publishes the IMU and GPS -# publishes: sensorEvents, gpsNMEA +# gpsd -- publishes EON's gps +# publishes: gpsNMEA # visiond -- talks to the cameras, runs the model, saves the videos -# subscribes: liveCalibration, sensorEvents, controlsState -# publishes: frame, encodeIdx, model, liveCalibration +# publishes: frame, model, driverMonitoring, cameraOdometry, thumbnail # **** stateful data transformers **** # plannerd -- decides where to drive the car -# subscribes: carState, model, radarState -# publishes: plan +# subscribes: carState, model, radarState, controlsState, liveParameters +# publishes: plan, pathPlan, liveMpc, liveLongitudinalMpc -# controlsd -- actually drives the car -# subscribes: can, thermal, plan -# publishes: carState, carControl, sendcan, controlsState +# controlsd -- drives the car by sending CAN messages to panda +# subscribes: can, thermal, health, plan, pathPlan, driverMonitoring, liveCalibration +# publishes: carState, carControl, sendcan, controlsState, carEvents, carParams # radard -- processes the radar and vision data -# blocks: CarParams -# subscribes: can, controlsState, model +# subscribes: can, controlsState, model, liveParameters # publishes: radarState, liveTracks +# params_learner -- learns vehicle params by observing the vehicle dynamics +# subscribes: controlsState, sensorEvents, cameraOdometry +# publishes: liveParameters + +# calibrationd -- reads posenet and applies a temporal filter on the frame region to look at +# subscribes: cameraOdometry +# publishes: liveCalibration + +# ubloxd -- read raw ublox data and converts them in readable format +# subscribes: ubloxRaw +# publishes: ubloxGnss + # **** LOGGING SERVICE **** # loggerd @@ -123,11 +139,14 @@ testJoystick: [8056, false] # **** NON VITAL SERVICES **** # ui -# subscribes: controlsState, radarState, liveCalibration, model, (raw frames) +# subscribes: thermal, model, controlsState, uiLayout, liveCalibration, radarState, liveMpc, plusFrame, liveMapData # uploader # communicates through file system with loggerd +# deleter +# communicates through file system with loggerd and uploader + # logmessaged -- central logging service, can log to cloud # publishes: logMessage @@ -138,3 +157,7 @@ testJoystick: [8056, false] # publishes: procLog # tombstoned -- reports native crashes + +# athenad -- on request, open a sub socket and return the value + +# updated -- waits for network access and tries to update every hour diff --git a/selfdrive/services.py b/selfdrive/services.py index bd804afe79..18d43ff76a 100644 --- a/selfdrive/services.py +++ b/selfdrive/services.py @@ -2,13 +2,14 @@ import os import yaml class Service(object): - def __init__(self, port, should_log): + def __init__(self, port, should_log, frequency): self.port = port self.should_log = should_log + self.frequency = frequency service_list_path = os.path.join(os.path.dirname(__file__), "service_list.yaml") service_list = {} with open(service_list_path, "r") as f: - for k, v in yaml.load(f).items(): - service_list[k] = Service(v[0], v[1]) + for k, v in yaml.safe_load(f).items(): + service_list[k] = Service(v[0], v[1], v[2]) diff --git a/selfdrive/test/plant/plant.py b/selfdrive/test/plant/plant.py index abe021cd83..e39bafd792 100755 --- a/selfdrive/test/plant/plant.py +++ b/selfdrive/test/plant/plant.py @@ -2,7 +2,6 @@ import os import struct from collections import namedtuple -import zmq import numpy as np from opendbc import DBC_PATH @@ -93,13 +92,16 @@ class Plant(object): self.rate = rate if not Plant.messaging_initialized: - context = zmq.Context() - Plant.logcan = messaging.pub_sock(context, service_list['can'].port) - Plant.sendcan = messaging.sub_sock(context, service_list['sendcan'].port) - Plant.model = messaging.pub_sock(context, service_list['model'].port) - Plant.cal = messaging.pub_sock(context, service_list['liveCalibration'].port) - Plant.controls_state = messaging.sub_sock(context, service_list['controlsState'].port) - Plant.plan = messaging.sub_sock(context, service_list['plan'].port) + Plant.logcan = messaging.pub_sock(service_list['can'].port) + Plant.sendcan = messaging.sub_sock(service_list['sendcan'].port) + Plant.model = messaging.pub_sock(service_list['model'].port) + Plant.live_params = messaging.pub_sock(service_list['liveParameters'].port) + Plant.health = messaging.pub_sock(service_list['health'].port) + Plant.thermal = messaging.pub_sock(service_list['thermal'].port) + Plant.driverMonitoring = messaging.pub_sock(service_list['driverMonitoring'].port) + Plant.cal = messaging.pub_sock(service_list['liveCalibration'].port) + Plant.controls_state = messaging.sub_sock(service_list['controlsState'].port) + Plant.plan = messaging.sub_sock(service_list['plan'].port) Plant.messaging_initialized = True self.angle_steer = 0. @@ -135,6 +137,7 @@ class Plant(object): def close(self): Plant.logcan.close() Plant.model.close() + Plant.live_params.close() def speed_sensor(self, speed): if speed<0.3: @@ -322,6 +325,31 @@ class Plant(object): Plant.logcan.send(can_list_to_can_capnp(can_msgs)) + # Fake sockets that controlsd subscribes to + live_parameters = messaging.new_message() + live_parameters.init('liveParameters') + live_parameters.liveParameters.valid = True + live_parameters.liveParameters.sensorValid = True + live_parameters.liveParameters.steerRatio = CP.steerRatio + live_parameters.liveParameters.stiffnessFactor = 1.0 + Plant.live_params.send(live_parameters.to_bytes()) + + driver_monitoring = messaging.new_message() + driver_monitoring.init('driverMonitoring') + driver_monitoring.driverMonitoring.descriptor = [0.] * 7 + Plant.driverMonitoring.send(driver_monitoring.to_bytes()) + + health = messaging.new_message() + health.init('health') + health.health.controlsAllowed = True + Plant.health.send(health.to_bytes()) + + thermal = messaging.new_message() + thermal.init('thermal') + thermal.thermal.freeSpace = 1. + thermal.thermal.batteryPercent = 100 + Plant.thermal.send(thermal.to_bytes()) + # ******** publish a fake model going straight and fake calibration ******** # note that this is worst case for MPC, since model will delay long mpc by one time step if publish_model and self.rk.frame % 5 == 0: diff --git a/selfdrive/test/test_fingerprints.py b/selfdrive/test/test_fingerprints.py index b247b4ca1d..721ea163fc 100755 --- a/selfdrive/test/test_fingerprints.py +++ b/selfdrive/test/test_fingerprints.py @@ -21,9 +21,9 @@ def _get_fingerprints(): def check_fingerprint_consistency(f1, f2): # return false if it finds a fingerprint fully included in another - # max message worth checking is 1900, as above that they usually come too infrequently and not + # max message worth checking is 1800, as above that they usually come too infrequently and not # usable for fingerprinting - max_msg = 1900 + max_msg = 1800 is_f1_in_f2 = True for k in f1: diff --git a/selfdrive/thermald.py b/selfdrive/thermald.py index e3c02dc062..ef75cfffd9 100755 --- a/selfdrive/thermald.py +++ b/selfdrive/thermald.py @@ -1,6 +1,5 @@ #!/usr/bin/env python2.7 import os -import zmq from smbus2 import SMBus from cereal import log from selfdrive.version import training_version @@ -128,10 +127,9 @@ def thermald_thread(): BATT_PERC_OFF = 10 if LEON else 3 # now loop - context = zmq.Context() - thermal_sock = messaging.pub_sock(context, service_list['thermal'].port) - health_sock = messaging.sub_sock(context, service_list['health'].port) - location_sock = messaging.sub_sock(context, service_list['gpsLocation'].port) + thermal_sock = messaging.pub_sock(service_list['thermal'].port) + health_sock = messaging.sub_sock(service_list['health'].port) + location_sock = messaging.sub_sock(service_list['gpsLocation'].port) fan_speed = 0 count = 0 diff --git a/selfdrive/tombstoned.py b/selfdrive/tombstoned.py index 3d7061c6a6..3af76818d4 100644 --- a/selfdrive/tombstoned.py +++ b/selfdrive/tombstoned.py @@ -101,7 +101,7 @@ def report_tombstone(fn, client): cloudlog.error({'tombstone': message}) -def main(gctx): +def main(gctx=None): initial_tombstones = set(get_tombstones()) client = Client('https://d3b175702f62402c91ade04d1c547e68:b20d68c813c74f63a7cdf9c4039d8f56@sentry.io/157615', @@ -119,4 +119,4 @@ def main(gctx): time.sleep(5) if __name__ == "__main__": - main(None) + main() diff --git a/selfdrive/ui/Makefile b/selfdrive/ui/Makefile index a2d857a28d..c6cce40a5e 100644 --- a/selfdrive/ui/Makefile +++ b/selfdrive/ui/Makefile @@ -13,13 +13,9 @@ WARN_FLAGS = -Werror=implicit-function-declaration \ CFLAGS = -std=gnu11 -fPIC -O2 $(WARN_FLAGS) CXXFLAGS = -std=c++11 -fPIC -O2 $(WARN_FLAGS) -ZMQ_FLAGS = -I$(PHONELIBS)/zmq/aarch64/include -ZMQ_LIBS = -L$(PHONELIBS)/zmq/aarch64/lib \ - -l:libczmq.a -l:libzmq.a \ - -lgnustl_shared +ZMQ_LIBS = -l:libczmq.a -l:libzmq.a -lgnustl_shared -CEREAL_CFLAGS = -I$(PHONELIBS)/capnp-c/include -CEREAL_LIBS = -L$(PHONELIBS)/capnp-c/aarch64/lib -l:libcapn.a +CEREAL_LIBS = -l:libcapn.a CEREAL_OBJS = ../../cereal/gen/c/log.capnp.o NANOVG_FLAGS = -I$(PHONELIBS)/nanovg @@ -32,10 +28,23 @@ OPENGL_LIBS = -lGLESv3 OPENSL_LIBS = -lOpenSLES +UUID_LIBS = -luuid + FRAMEBUFFER_LIBS = -lutils -lgui -lEGL -CFLAGS += -DQCOM -CXXFLAGS += -DQCOM +CFLAGS += -DQCOM \ + -I$(PHONELIBS)/android_frameworks_native/include \ + -I$(PHONELIBS)/android_system_core/include \ + -I$(PHONELIBS)/android_hardware_libhardware/include +CXXFLAGS += -DQCOM \ + -I$(PHONELIBS)/android_frameworks_native/include \ + -I$(PHONELIBS)/android_system_core/include \ + -I$(PHONELIBS)/android_hardware_libhardware/include + +ifeq ($(ARCH),aarch64) +CFLAGS += -mcpu=cortex-a57 +CXXFLAGS += -mcpu=cortex-a57 +endif OBJS = slplay.o \ ui.o \ @@ -68,6 +77,7 @@ ui: $(OBJS) $(OPENGL_LIBS) \ $(OPENCL_LIBS) \ ${OPENSL_LIBS} \ + ${UUID_LIBS} \ -Wl,-rpath=/system/lib64,-rpath=/system/comma/usr/lib \ -lcutils -lm -llog -lui -ladreno_utils diff --git a/selfdrive/ui/spinner/spinner b/selfdrive/ui/spinner/spinner index 392b5bccf2..79f3206a7a 100755 --- a/selfdrive/ui/spinner/spinner +++ b/selfdrive/ui/spinner/spinner @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e34e6c5cf0e3e26b5a666ebcfb6353cd0cee2d760625b5b69cb938d81fbf01b1 -size 205408 +oid sha256:11953df252f1cd63d7cd2101508b89c96f5de073b3181c4262f1a26d3c871ca1 +size 239976 diff --git a/selfdrive/ui/spinner/spinner.c b/selfdrive/ui/spinner/spinner.c index 477cfe1cf3..ad74251502 100644 --- a/selfdrive/ui/spinner/spinner.c +++ b/selfdrive/ui/spinner/spinner.c @@ -6,6 +6,7 @@ #include #include +#include #include #include "nanovg.h" diff --git a/selfdrive/ui/start.py b/selfdrive/ui/start.py index 08bd6217eb..e3e629b545 100755 --- a/selfdrive/ui/start.py +++ b/selfdrive/ui/start.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 import os assert os.system("make") == 0 diff --git a/selfdrive/ui/ui.c b/selfdrive/ui/ui.c index b6a97724cc..6e24c9220b 100644 --- a/selfdrive/ui/ui.c +++ b/selfdrive/ui/ui.c @@ -458,6 +458,7 @@ sound_file* get_sound_file_by_name(const char* name) { return NULL; } + void ui_sound_init(char **error) { slplay_setup(error); if (*error) return; @@ -1567,10 +1568,15 @@ static PathData read_path(cereal_ModelData_PathData_ptr pathp) { ret.prob = pathd.prob; ret.std = pathd.std; - capn_list32 pointl = pathd.points; - capn_resolve(&pointl.p); - for (int i = 0; i < 50; i++) { - ret.points[i] = capn_to_f32(capn_get32(pointl, i)); + capn_list32 polyp = pathd.poly; + capn_resolve(&polyp.p); + for (int i = 0; i < POLYFIT_DEGREE; i++) { + ret.poly[i] = capn_to_f32(capn_get32(polyp, i)); + } + + // Compute points locations + for (int i = 0; i < MODEL_PATH_DISTANCE; i++) { + ret.points[i] = ret.poly[0] * (i*i*i) + ret.poly[1] * (i*i)+ ret.poly[2] * i + ret.poly[3]; } return ret; @@ -1603,6 +1609,216 @@ static void update_status(UIState *s, int status) { } } + +void handle_message(UIState *s, void *which) { + int err; + zmq_msg_t msg; + err = zmq_msg_init(&msg); + assert(err == 0); + err = zmq_msg_recv(&msg, which, 0); + assert(err >= 0); + + struct capn ctx; + capn_init_mem(&ctx, zmq_msg_data(&msg), zmq_msg_size(&msg), 0); + + cereal_Event_ptr eventp; + eventp.p = capn_getp(capn_root(&ctx), 0, 1); + struct cereal_Event eventd; + cereal_read_Event(&eventd, eventp); + double t = millis_since_boot(); + if (eventd.which == cereal_Event_controlsState) { + struct cereal_ControlsState datad; + cereal_read_ControlsState(&datad, eventd.controlsState); + + if (datad.vCruise != s->scene.v_cruise) { + s->scene.v_cruise_update_ts = eventd.logMonoTime; + } + s->scene.v_cruise = datad.vCruise; + s->scene.v_ego = datad.vEgo; + s->scene.curvature = datad.curvature; + s->scene.engaged = datad.enabled; + s->scene.engageable = datad.engageable; + s->scene.gps_planner_active = datad.gpsPlannerActive; + s->scene.monitoring_active = datad.driverMonitoringOn; + + s->scene.frontview = datad.rearViewCam; + + s->scene.v_curvature = datad.vCurvature; + s->scene.decel_for_turn = datad.decelForTurn; + + if (datad.alertSound.str && datad.alertSound.str[0] != '\0' && strcmp(s->alert_type, datad.alertType.str) != 0) { + char* error = NULL; + if (s->alert_sound[0] != '\0') { + sound_file* active_sound = get_sound_file_by_name(s->alert_sound); + slplay_stop_uri(active_sound->uri, &error); + if (error) { + LOGW("error stopping active sound %s", error); + } + } + + sound_file* sound = get_sound_file_by_name(datad.alertSound.str); + slplay_play(sound->uri, sound->loop, &error); + if(error) { + LOGW("error playing sound: %s", error); + } + + snprintf(s->alert_sound, sizeof(s->alert_sound), "%s", datad.alertSound.str); + snprintf(s->alert_type, sizeof(s->alert_type), "%s", datad.alertType.str); + } else if ((!datad.alertSound.str || datad.alertSound.str[0] == '\0') && s->alert_sound[0] != '\0') { + sound_file* sound = get_sound_file_by_name(s->alert_sound); + + char* error = NULL; + + slplay_stop_uri(sound->uri, &error); + if(error) { + LOGW("error stopping sound: %s", error); + } + s->alert_type[0] = '\0'; + s->alert_sound[0] = '\0'; + } + + if (datad.alertText1.str) { + snprintf(s->scene.alert_text1, sizeof(s->scene.alert_text1), "%s", datad.alertText1.str); + } else { + s->scene.alert_text1[0] = '\0'; + } + if (datad.alertText2.str) { + snprintf(s->scene.alert_text2, sizeof(s->scene.alert_text2), "%s", datad.alertText2.str); + } else { + s->scene.alert_text2[0] = '\0'; + } + s->scene.awareness_status = datad.awarenessStatus; + + s->scene.alert_ts = eventd.logMonoTime; + + s->scene.alert_size = datad.alertSize; + if (datad.alertSize == cereal_ControlsState_AlertSize_none) { + s->alert_size = ALERTSIZE_NONE; + } else if (datad.alertSize == cereal_ControlsState_AlertSize_small) { + s->alert_size = ALERTSIZE_SMALL; + } else if (datad.alertSize == cereal_ControlsState_AlertSize_mid) { + s->alert_size = ALERTSIZE_MID; + } else if (datad.alertSize == cereal_ControlsState_AlertSize_full) { + s->alert_size = ALERTSIZE_FULL; + } + + if (datad.alertStatus == cereal_ControlsState_AlertStatus_userPrompt) { + update_status(s, STATUS_WARNING); + } else if (datad.alertStatus == cereal_ControlsState_AlertStatus_critical) { + update_status(s, STATUS_ALERT); + } else if (datad.enabled) { + update_status(s, STATUS_ENGAGED); + } else { + update_status(s, STATUS_DISENGAGED); + } + + s->scene.alert_blinkingrate = datad.alertBlinkingRate; + if (datad.alertBlinkingRate > 0.) { + if (s->alert_blinked) { + if (s->alert_blinking_alpha > 0.0 && s->alert_blinking_alpha < 1.0) { + s->alert_blinking_alpha += (0.05*datad.alertBlinkingRate); + } else { + s->alert_blinked = false; + } + } else { + if (s->alert_blinking_alpha > 0.25) { + s->alert_blinking_alpha -= (0.05*datad.alertBlinkingRate); + } else { + s->alert_blinking_alpha += 0.25; + s->alert_blinked = true; + } + } + } + } else if (eventd.which == cereal_Event_radarState) { + struct cereal_RadarState datad; + cereal_read_RadarState(&datad, eventd.radarState); + struct cereal_RadarState_LeadData leaddatad; + cereal_read_RadarState_LeadData(&leaddatad, datad.leadOne); + s->scene.lead_status = leaddatad.status; + s->scene.lead_d_rel = leaddatad.dRel; + s->scene.lead_y_rel = leaddatad.yRel; + s->scene.lead_v_rel = leaddatad.vRel; + s->livempc_or_radarstate_changed = true; + } else if (eventd.which == cereal_Event_liveCalibration) { + s->scene.world_objects_visible = true; + struct cereal_LiveCalibrationData datad; + cereal_read_LiveCalibrationData(&datad, eventd.liveCalibration); + + // should we still even have this? + capn_list32 warpl = datad.warpMatrix2; + capn_resolve(&warpl.p); // is this a bug? + for (int i = 0; i < 3 * 3; i++) { + s->scene.warp_matrix.v[i] = capn_to_f32(capn_get32(warpl, i)); + } + + capn_list32 extrinsicl = datad.extrinsicMatrix; + capn_resolve(&extrinsicl.p); // is this a bug? + for (int i = 0; i < 3 * 4; i++) { + s->scene.extrinsic_matrix.v[i] = + capn_to_f32(capn_get32(extrinsicl, i)); + } + } else if (eventd.which == cereal_Event_model) { + s->scene.model_ts = eventd.logMonoTime; + s->scene.model = read_model(eventd.model); + s->model_changed = true; + } else if (eventd.which == cereal_Event_liveMpc) { + struct cereal_LiveMpcData datad; + cereal_read_LiveMpcData(&datad, eventd.liveMpc); + + capn_list32 x_list = datad.x; + capn_resolve(&x_list.p); + + for (int i = 0; i < 50; i++){ + s->scene.mpc_x[i] = capn_to_f32(capn_get32(x_list, i)); + } + + capn_list32 y_list = datad.y; + capn_resolve(&y_list.p); + + for (int i = 0; i < 50; i++){ + s->scene.mpc_y[i] = capn_to_f32(capn_get32(y_list, i)); + } + s->livempc_or_radarstate_changed = true; + } else if (eventd.which == cereal_Event_thermal) { + struct cereal_ThermalData datad; + cereal_read_ThermalData(&datad, eventd.thermal); + + if (!datad.started) { + update_status(s, STATUS_STOPPED); + } else if (s->status == STATUS_STOPPED) { + // car is started but controls doesn't have fingerprint yet + update_status(s, STATUS_DISENGAGED); + } + + s->scene.started_ts = datad.startedTs; + } else if (eventd.which == cereal_Event_uiLayoutState) { + struct cereal_UiLayoutState datad; + cereal_read_UiLayoutState(&datad, eventd.uiLayoutState); + s->scene.uilayout_sidebarcollapsed = datad.sidebarCollapsed; + s->scene.uilayout_mapenabled = datad.mapEnabled; + + bool hasSidebar = !s->scene.uilayout_sidebarcollapsed; + bool mapEnabled = s->scene.uilayout_mapenabled; + if (mapEnabled) { + s->scene.ui_viz_rx = hasSidebar ? (box_x+nav_w) : (box_x+nav_w-(bdr_s*4)); + s->scene.ui_viz_rw = hasSidebar ? (box_w-nav_w) : (box_w-nav_w+(bdr_s*4)); + s->scene.ui_viz_ro = -(sbr_w + 4*bdr_s); + } else { + s->scene.ui_viz_rx = hasSidebar ? box_x : (box_x-sbr_w+bdr_s*2); + s->scene.ui_viz_rw = hasSidebar ? box_w : (box_w+sbr_w-(bdr_s*2)); + s->scene.ui_viz_ro = hasSidebar ? -(sbr_w - 6*bdr_s) : 0; + } + } else if (eventd.which == cereal_Event_liveMapData) { + struct cereal_LiveMapData datad; + cereal_read_LiveMapData(&datad, eventd.liveMapData); + s->scene.speedlimit = datad.speedLimit; + s->scene.speedlimit_valid = datad.speedLimitValid; + s->scene.map_valid = datad.mapValid; + } + capn_free(&ctx); + zmq_msg_close(&msg); +} + static void ui_update(UIState *s) { int err; @@ -1798,222 +2014,11 @@ static void ui_update(UIState *s) { } else { // zmq messages - void* which = NULL; for (int i=0; i= 0); - - struct capn ctx; - capn_init_mem(&ctx, zmq_msg_data(&msg), zmq_msg_size(&msg), 0); - - cereal_Event_ptr eventp; - eventp.p = capn_getp(capn_root(&ctx), 0, 1); - struct cereal_Event eventd; - cereal_read_Event(&eventd, eventp); - double t = millis_since_boot(); - if (eventd.which == cereal_Event_controlsState) { - struct cereal_ControlsState datad; - cereal_read_ControlsState(&datad, eventd.controlsState); - - if (datad.vCruise != s->scene.v_cruise) { - s->scene.v_cruise_update_ts = eventd.logMonoTime; - } - s->scene.v_cruise = datad.vCruise; - s->scene.v_ego = datad.vEgo; - s->scene.curvature = datad.curvature; - s->scene.engaged = datad.enabled; - s->scene.engageable = datad.engageable; - s->scene.gps_planner_active = datad.gpsPlannerActive; - s->scene.monitoring_active = datad.driverMonitoringOn; - - s->scene.frontview = datad.rearViewCam; - - s->scene.v_curvature = datad.vCurvature; - s->scene.decel_for_turn = datad.decelForTurn; - - if (datad.alertSound.str && datad.alertSound.str[0] != '\0' && strcmp(s->alert_type, datad.alertType.str) != 0) { - char* error = NULL; - if (s->alert_sound[0] != '\0') { - sound_file* active_sound = get_sound_file_by_name(s->alert_sound); - slplay_stop_uri(active_sound->uri, &error); - if (error) { - LOGW("error stopping active sound %s", error); - } - } - - sound_file* sound = get_sound_file_by_name(datad.alertSound.str); - slplay_play(sound->uri, sound->loop, &error); - if(error) { - LOGW("error playing sound: %s", error); - } - - snprintf(s->alert_sound, sizeof(s->alert_sound), "%s", datad.alertSound.str); - snprintf(s->alert_type, sizeof(s->alert_type), "%s", datad.alertType.str); - } else if ((!datad.alertSound.str || datad.alertSound.str[0] == '\0') && s->alert_sound[0] != '\0') { - sound_file* sound = get_sound_file_by_name(s->alert_sound); - - char* error = NULL; - - slplay_stop_uri(sound->uri, &error); - if(error) { - LOGW("error stopping sound: %s", error); - } - s->alert_type[0] = '\0'; - s->alert_sound[0] = '\0'; - } - - if (datad.alertText1.str) { - snprintf(s->scene.alert_text1, sizeof(s->scene.alert_text1), "%s", datad.alertText1.str); - } else { - s->scene.alert_text1[0] = '\0'; - } - if (datad.alertText2.str) { - snprintf(s->scene.alert_text2, sizeof(s->scene.alert_text2), "%s", datad.alertText2.str); - } else { - s->scene.alert_text2[0] = '\0'; - } - s->scene.awareness_status = datad.awarenessStatus; - - s->scene.alert_ts = eventd.logMonoTime; - - s->scene.alert_size = datad.alertSize; - if (datad.alertSize == cereal_ControlsState_AlertSize_none) { - s->alert_size = ALERTSIZE_NONE; - } else if (datad.alertSize == cereal_ControlsState_AlertSize_small) { - s->alert_size = ALERTSIZE_SMALL; - } else if (datad.alertSize == cereal_ControlsState_AlertSize_mid) { - s->alert_size = ALERTSIZE_MID; - } else if (datad.alertSize == cereal_ControlsState_AlertSize_full) { - s->alert_size = ALERTSIZE_FULL; - } - - if (datad.alertStatus == cereal_ControlsState_AlertStatus_userPrompt) { - update_status(s, STATUS_WARNING); - } else if (datad.alertStatus == cereal_ControlsState_AlertStatus_critical) { - update_status(s, STATUS_ALERT); - } else if (datad.enabled) { - update_status(s, STATUS_ENGAGED); - } else { - update_status(s, STATUS_DISENGAGED); - } - - s->scene.alert_blinkingrate = datad.alertBlinkingRate; - if (datad.alertBlinkingRate > 0.) { - if (s->alert_blinked) { - if (s->alert_blinking_alpha > 0.0 && s->alert_blinking_alpha < 1.0) { - s->alert_blinking_alpha += (0.05*datad.alertBlinkingRate); - } else { - s->alert_blinked = false; - } - } else { - if (s->alert_blinking_alpha > 0.25) { - s->alert_blinking_alpha -= (0.05*datad.alertBlinkingRate); - } else { - s->alert_blinking_alpha += 0.25; - s->alert_blinked = true; - } - } - } - } else if (eventd.which == cereal_Event_radarState) { - struct cereal_RadarState datad; - cereal_read_RadarState(&datad, eventd.radarState); - struct cereal_RadarState_LeadData leaddatad; - cereal_read_RadarState_LeadData(&leaddatad, datad.leadOne); - s->scene.lead_status = leaddatad.status; - s->scene.lead_d_rel = leaddatad.dRel; - s->scene.lead_y_rel = leaddatad.yRel; - s->scene.lead_v_rel = leaddatad.vRel; - s->livempc_or_radarstate_changed = true; - } else if (eventd.which == cereal_Event_liveCalibration) { - s->scene.world_objects_visible = true; - struct cereal_LiveCalibrationData datad; - cereal_read_LiveCalibrationData(&datad, eventd.liveCalibration); - - // should we still even have this? - capn_list32 warpl = datad.warpMatrix2; - capn_resolve(&warpl.p); // is this a bug? - for (int i = 0; i < 3 * 3; i++) { - s->scene.warp_matrix.v[i] = capn_to_f32(capn_get32(warpl, i)); - } - - capn_list32 extrinsicl = datad.extrinsicMatrix; - capn_resolve(&extrinsicl.p); // is this a bug? - for (int i = 0; i < 3 * 4; i++) { - s->scene.extrinsic_matrix.v[i] = - capn_to_f32(capn_get32(extrinsicl, i)); - } - } else if (eventd.which == cereal_Event_model) { - s->scene.model_ts = eventd.logMonoTime; - s->scene.model = read_model(eventd.model); - s->model_changed = true; - } else if (eventd.which == cereal_Event_liveMpc) { - struct cereal_LiveMpcData datad; - cereal_read_LiveMpcData(&datad, eventd.liveMpc); - - capn_list32 x_list = datad.x; - capn_resolve(&x_list.p); - - for (int i = 0; i < 50; i++){ - s->scene.mpc_x[i] = capn_to_f32(capn_get32(x_list, i)); + handle_message(s, polls[i].socket); } - - capn_list32 y_list = datad.y; - capn_resolve(&y_list.p); - - for (int i = 0; i < 50; i++){ - s->scene.mpc_y[i] = capn_to_f32(capn_get32(y_list, i)); - } - s->livempc_or_radarstate_changed = true; - } else if (eventd.which == cereal_Event_thermal) { - struct cereal_ThermalData datad; - cereal_read_ThermalData(&datad, eventd.thermal); - - if (!datad.started) { - update_status(s, STATUS_STOPPED); - } else if (s->status == STATUS_STOPPED) { - // car is started but controls doesn't have fingerprint yet - update_status(s, STATUS_DISENGAGED); - } - - s->scene.started_ts = datad.startedTs; - } else if (eventd.which == cereal_Event_uiLayoutState) { - struct cereal_UiLayoutState datad; - cereal_read_UiLayoutState(&datad, eventd.uiLayoutState); - s->scene.uilayout_sidebarcollapsed = datad.sidebarCollapsed; - s->scene.uilayout_mapenabled = datad.mapEnabled; - - bool hasSidebar = !s->scene.uilayout_sidebarcollapsed; - bool mapEnabled = s->scene.uilayout_mapenabled; - if (mapEnabled) { - s->scene.ui_viz_rx = hasSidebar ? (box_x+nav_w) : (box_x+nav_w-(bdr_s*4)); - s->scene.ui_viz_rw = hasSidebar ? (box_w-nav_w) : (box_w-nav_w+(bdr_s*4)); - s->scene.ui_viz_ro = -(sbr_w + 4*bdr_s); - } else { - s->scene.ui_viz_rx = hasSidebar ? box_x : (box_x-sbr_w+bdr_s*2); - s->scene.ui_viz_rw = hasSidebar ? box_w : (box_w+sbr_w-(bdr_s*2)); - s->scene.ui_viz_ro = hasSidebar ? -(sbr_w - 6*bdr_s) : 0; - } - } else if (eventd.which == cereal_Event_liveMapData) { - struct cereal_LiveMapData datad; - cereal_read_LiveMapData(&datad, eventd.liveMapData); - s->scene.speedlimit = datad.speedLimit; - s->scene.speedlimit_valid = datad.speedLimitValid; - s->scene.map_valid = datad.mapValid; } - capn_free(&ctx); - zmq_msg_close(&msg); } } } @@ -2191,6 +2196,8 @@ int is_leon() { return strstr(str, "letv") != NULL; } + + int main(int argc, char* argv[]) { int err; setpriority(PRIO_PROCESS, 0, -14); @@ -2231,8 +2238,8 @@ int main(int argc, char* argv[]) { // light sensor scaling params const int LEON = is_leon(); - const float BRIGHTNESS_B = LEON? 10.0 : 5.0; - const float BRIGHTNESS_M = LEON? 2.6 : 1.3; + const float BRIGHTNESS_B = LEON ? 10.0 : 5.0; + const float BRIGHTNESS_M = LEON ? 2.6 : 1.3; float smooth_brightness = BRIGHTNESS_B; @@ -2253,8 +2260,9 @@ int main(int argc, char* argv[]) { // light sensor is only exposed on EONs float clipped_brightness = (s->light_sensor*BRIGHTNESS_M) + BRIGHTNESS_B; - if (clipped_brightness > 255) clipped_brightness = 255; + if (clipped_brightness > 512) clipped_brightness = 512; smooth_brightness = clipped_brightness * 0.01 + smooth_brightness * 0.99; + if (smooth_brightness > 255) smooth_brightness = 255; set_brightness(s, (int)smooth_brightness); if (!s->vision_connected) { diff --git a/selfdrive/visiond/SConscript b/selfdrive/visiond/SConscript deleted file mode 100644 index e55fbd94d9..0000000000 --- a/selfdrive/visiond/SConscript +++ /dev/null @@ -1,17 +0,0 @@ -Import('env') -lenv = env.Clone() -lenv['CPPPATH'] += ['include'] -lenv['LIBPATH'] += ['/system/vendor/lib64'] -lenv['CFLAGS'] += ' -DQCOM' -lenv['CXXFLAGS'] += ' -DQCOM -U __ANDROID__' -lenv.Program(['visiond.cc', 'model.c', 'transform.c', 'loadyuv.c', 'buffering.c', 'efd.c', - 'yuvmodel.c', 'temporalmodel.c', 'monitoring.c', 'monitoringmodel.c', 'clutil.c', - 'camera_qcom.c', 'visionbuf_ion.c'], - LIBS=['zmq', 'czmq', 'capnp', 'capnp_c', 'kj', 'yaml-cpp', 'z', 'curl', - 'gsl', 'CB', 'OpenCL', - 'opencv_video', 'opencv_imgproc', 'opencv_core', - 'gnustl_shared', 'log', 'cutils', - 'yuv', - 'common', 'cereal', - ]) - diff --git a/selfdrive/visiond/build_from_src.mk b/selfdrive/visiond/build_from_src.mk index c9394f34a8..d9d320cf3b 100644 --- a/selfdrive/visiond/build_from_src.mk +++ b/selfdrive/visiond/build_from_src.mk @@ -12,13 +12,13 @@ WARN_FLAGS = -Werror=implicit-function-declaration \ -Werror=format-extra-args \ -Wno-deprecated-declarations -CFLAGS = -std=gnu11 -fPIC -O2 $(WARN_FLAGS) -CXXFLAGS = -std=c++14 -fPIC -O2 $(WARN_FLAGS) +CFLAGS = -I. -std=gnu11 -fPIC -O2 $(WARN_FLAGS) +CXXFLAGS = -I. -std=c++14 -fPIC -O2 $(WARN_FLAGS) -#ifneq ($(RELEASE),1) -#CFLAGS += -g -#CXXFLAGS += -g -#endif +ifeq ($(ARCH),aarch64) +CFLAGS += -mcpu=cortex-a57 +CXXFLAGS += -mcpu=cortex-a57 +endif JSON_FLAGS = -I$(PHONELIBS)/json/src JSON11_FLAGS = -I$(PHONELIBS)/json11/ @@ -38,45 +38,53 @@ ifeq ($(UNAME_S),Darwin) $(PHONELIBS)/zmq/mac/lib/libzmq.a OPENCL_LIBS = -framework OpenCL + + PLATFORM_OBJS = cameras/camera_fake.o \ + ../common/visionbuf_cl.o else - LIBYUV_FLAGS = -I$(PHONELIBS)/libyuv/x64/include + # assume x86_64 linux + LIBYUV_FLAGS = -I$(PHONELIBS)/libyuv/include LIBYUV_LIBS = $(PHONELIBS)/libyuv/x64/lib/libyuv.a - ZMQ_FLAGS = -I$(EXTERNAL)/zmq/include - ZMQ_LIBS = -L$(EXTERNAL)/zmq/lib \ - -l:libczmq.a -l:libzmq.a + ZMQ_FLAGS = -I$(PHONELIBS)/zmq/aarch64/include + ZMQ_LIBS = -l:libczmq.a -l:libzmq.a -lsodium OPENCL_LIBS = -lOpenCL -endif + UUID_LIBS = -luuid + + TF_FLAGS = -I$(EXTERNAL)/tensorflow/include + TF_LIBS = -L$(EXTERNAL)/tensorflow/lib -ltensorflow \ + -Wl,-rpath $(EXTERNAL)/tensorflow/lib + + SNPE_FLAGS = -I$(PHONELIBS)/snpe/include/ + SNPE_LIBS = -L$(PHONELIBS)/snpe/x86_64-linux-clang/ \ + -lSNPE -lsymphony-cpu \ + -Wl,-rpath $(PHONELIBS)/snpe/x86_64-linux-clang/ + + CFLAGS += -g + CXXFLAGS += -g -I../common - CURL_FLAGS = -I/usr/include/curl - CURL_LIBS = -lcurl -lz + PLATFORM_OBJS = cameras/camera_frame_stream.o \ + ../common/visionbuf_cl.o \ + ../common/visionimg.o \ + runners/tfmodel.o +endif SSL_FLAGS = -I/usr/include/openssl/ SSL_LIBS = -lssl -lcrypto - OPENCV_FLAGS = - OPENCV_LIBS = -lopencv_video \ - -lopencv_imgproc \ - -lopencv_core \ - -lopencv_highgui OTHER_LIBS = -lz -lm -lpthread - PLATFORM_OBJS = camera_fake.o \ - ../common/visionbuf_cl.o - CFLAGS += -D_GNU_SOURCE \ -DCLU_NO_CACHE + OBJS = visiond.o else # assume phone LIBYUV_FLAGS = -I$(PHONELIBS)/libyuv/include LIBYUV_LIBS = $(PHONELIBS)/libyuv/lib/libyuv.a - ZMQ_FLAGS = -I$(PHONELIBS)/zmq/aarch64/include - ZMQ_LIBS = -L$(PHONELIBS)/zmq/aarch64/lib \ - -l:libczmq.a -l:libzmq.a \ - -lgnustl_shared + ZMQ_LIBS = -l:libczmq.a -l:libzmq.a -lgnustl_shared CURL_FLAGS = -I$(PHONELIBS)/curl/include CURL_LIBS = $(PHONELIBS)/curl/lib/libcurl.a \ @@ -89,27 +97,31 @@ else OPENCL_FLAGS = -I$(PHONELIBS)/opencl/include OPENCL_LIBS = -lgsl -lCB -lOpenCL - OPENCV_FLAGS = -I/usr/local/sdk/native/jni/include - OPENCV_LIBS = -L/usr/local/sdk/native/libs \ - -l:libopencv_video.a \ - -l:libopencv_imgproc.a \ - -l:libopencv_core.a - OPENGL_LIBS = -lGLESv3 -lEGL + UUID_LIBS = -luuid SNPE_FLAGS = -I$(PHONELIBS)/snpe/include/ SNPE_LIBS = -lSNPE -lsymphony-cpu -lsymphonypower OTHER_LIBS = -lz -lcutils -lm -llog -lui -ladreno_utils - PLATFORM_OBJS = camera_qcom.o \ - ../common/visionbuf_ion.o - - CFLAGS += -DQCOM - CXXFLAGS += -DQCOM + PLATFORM_OBJS = cameras/camera_qcom.o \ + ../common/visionbuf_ion.o \ + ../common/visionimg.o + + CFLAGS += -DQCOM \ + -I$(PHONELIBS)/android_system_core/include \ + -I$(PHONELIBS)/android_frameworks_native/include \ + -I$(PHONELIBS)/android_hardware_libhardware/include \ + -I$(PHONELIBS)/linux/include + CXXFLAGS += -DQCOM \ + -I$(PHONELIBS)/android_system_core/include \ + -I$(PHONELIBS)/android_frameworks_native/include \ + -I$(PHONELIBS)/android_hardware_libhardware/include \ + -I$(PHONELIBS)/linux/include + OBJS = visiond.o endif -OBJS = visiond.o OUTPUT = visiond .PHONY: all @@ -121,58 +133,26 @@ OBJS += $(PLATFORM_OBJS) \ ../common/swaglog.o \ ../common/ipc.o \ ../common/visionipc.o \ - ../common/visionimg.o \ ../common/util.o \ ../common/params.o \ ../common/efd.o \ ../common/buffering.o \ - transform.o \ - loadyuv.o \ - rgb_to_yuv.o \ - commonmodel.o \ - snpemodel.o \ - monitoring.o \ - model.o \ + transforms/transform.o \ + transforms/loadyuv.o \ + transforms/rgb_to_yuv.o \ + models/commonmodel.o \ + runners/snpemodel.o \ + models/posenet.o \ + models/monitoring.o \ + models/driving.o \ clutil.o \ $(PHONELIBS)/json/src/json.o \ $(PHONELIBS)/json11/json11.o \ $(CEREAL_OBJS) -#MODEL_DATA = ../../models/driving_bigmodel.dlc ../../models/monitoring_model.dlc -MODEL_DATA = ../../models/driving_model.dlc ../../models/monitoring_model.dlc ../../models/posenet.dlc -MODEL_OBJS = $(MODEL_DATA:.dlc=.o) -OBJS += $(MODEL_OBJS) - -ifeq ($(RELEASE),1) -CFLAGS += -DCLU_NO_SRC -CXXFLAGS += -DCLU_NO_SRC -CLCACHE_FILES = $(wildcard /tmp/clcache/*.clb) -CLCACHE_OBJS += $(CLCACHE_FILES:.clb=.o) -OBJS += $(CLCACHE_OBJS) - -clutil.o: clcache_bins.h -clcache_bins.h: $(CLCACHE_FILES) /tmp/clcache/index.cli - rm -f '$@' - for hash in $(basename $(notdir $(CLCACHE_FILES))) ; do \ - echo "extern const uint8_t clb_$$hash[] asm(\"_binary_$${hash}_clb_start\");" ; \ - echo "extern const uint8_t clb_$${hash}_end[] asm(\"_binary_$${hash}_clb_end\");" ; \ - done >> '$@' - echo "static const CLUProgramIndex clu_index[] = {" >> '$@' - while read idx_hash code_hash; do \ - echo "{ 0x$$idx_hash, clb_$${code_hash}, clb_$${code_hash}_end }," ; \ - done < /tmp/clcache/index.cli >> '$@' - echo "};" >> '$@' - -$(CLCACHE_OBJS): %.o: %.clb - @echo "[ bin2o ] $@" - cd '$(dir $<)' && ld -r -b binary '$(notdir $<)' -o '$(abspath $@)' - -LDFLAGS += -s -endif - DEPS := $(OBJS:.o=.d) -rgb_to_yuv_test: rgb_to_yuv_test.o clutil.o rgb_to_yuv.o ../common/util.o +rgb_to_yuv_test: transforms/rgb_to_yuv_test.o clutil.o transforms/rgb_to_yuv.o ../common/util.o @echo "[ LINK ] $@" $(CXX) -fPIC -o '$@' $^ \ $(LIBYUV_LIBS) \ @@ -187,16 +167,18 @@ $(OUTPUT): $(OBJS) $(CXX) -fPIC -o '$@' $^ \ $(LDFLAGS) \ $(LIBYUV_LIBS) \ - $(OPENCV_LIBS) \ $(OPENGL_LIBS) \ $(CEREAL_LIBS) \ $(ZMQ_LIBS) \ + -ljpeg \ -L/usr/lib \ -L/system/vendor/lib64 \ $(OPENCL_LIBS) \ $(CURL_LIBS) \ $(SSL_LIBS) \ + $(TF_LIBS) \ $(SNPE_LIBS) \ + $(UUID_LIBS) \ $(OTHER_LIBS) $(MODEL_OBJS): %.o: %.dlc @@ -207,11 +189,12 @@ $(MODEL_OBJS): %.o: %.dlc @echo "[ CXX ] $@" $(CXX) $(CXXFLAGS) -MMD \ -Iinclude -I.. -I../.. \ - $(OPENCV_FLAGS) $(EIGEN_FLAGS) \ + $(EIGEN_FLAGS) \ $(ZMQ_FLAGS) \ $(CEREAL_CXXFLAGS) \ $(OPENCL_FLAGS) \ $(LIBYUV_FLAGS) \ + $(TF_FLAGS) \ $(SNPE_FLAGS) \ $(JSON_FLAGS) \ $(JSON11_FLAGS) $(CURL_FLAGS) \ diff --git a/selfdrive/visiond/camera_fake.cc b/selfdrive/visiond/camera_fake.cc deleted file mode 100644 index 5b7c9cb7b9..0000000000 --- a/selfdrive/visiond/camera_fake.cc +++ /dev/null @@ -1,267 +0,0 @@ -#include "camera_fake.h" - -#include -#include -#include - -#include -#include -#include -#include "cereal/gen/cpp/log.capnp.h" - -#include "common/util.h" -#include "common/timing.h" -#include "common/swaglog.h" -#include "buffering.h" - -extern volatile int do_exit; - -#define FRAME_WIDTH 1164 -#define FRAME_HEIGHT 874 - -namespace { -void camera_open(CameraState *s, VisionBuf *camera_bufs, bool rear) { - assert(camera_bufs); - s->camera_bufs = camera_bufs; -} - -void camera_close(CameraState *s) { - tbuffer_stop(&s->camera_tb); -} - -void camera_release_buffer(void *cookie, int buf_idx) { - CameraState *s = static_cast(cookie); -} - -void camera_init(CameraState *s, int camera_id, unsigned int fps) { - assert(camera_id < ARRAYSIZE(cameras_supported)); - s->ci = cameras_supported[camera_id]; - assert(s->ci.frame_width != 0); - - s->frame_size = s->ci.frame_height * s->ci.frame_stride; - s->fps = fps; - - tbuffer_init2(&s->camera_tb, FRAME_BUF_COUNT, "frame", camera_release_buffer, - s); -} - - -void run_simulator(DualCameraState *s) { - int err = 0; - - zsock_t *frame_sock = zsock_new_sub(">tcp://127.0.0.1:9003", ""); - assert(frame_sock); - void *frame_sock_raw = zsock_resolve(frame_sock); - - CameraState *const rear_camera = &s->rear; - - auto *tb = &rear_camera->camera_tb; - - while (!do_exit) { - const int buf_idx = tbuffer_select(tb); - - auto *buf = &rear_camera->camera_bufs[buf_idx]; - - zmq_msg_t t_msg; - err = zmq_msg_init(&t_msg); - assert(err == 0); - - zmq_msg_t frame_msg; - err = zmq_msg_init(&frame_msg); - assert(err == 0); - - // recv multipart (t, frame) - err = zmq_msg_recv(&t_msg, frame_sock_raw, 0); - assert(err != -1); - err = zmq_msg_recv(&frame_msg, frame_sock_raw, 0); - assert(err != -1); - - assert(zmq_msg_size(&t_msg) >= 8); - uint8_t* dat = (uint8_t*)zmq_msg_data(&t_msg); - float t = *(float*)&dat[0]; - uint32_t frame = *(uint32_t*)&dat[4]; - - rear_camera->camera_bufs_metadata[buf_idx] = { - .frame_id = frame, - .timestamp_eof = nanos_since_boot(), - .frame_length = 0, - .integ_lines = 0, - .global_gain = 0, - }; - - - assert(zmq_msg_size(&frame_msg) == rear_camera->frame_size); - - err = libyuv::RAWToRGB24((const uint8_t*)zmq_msg_data(&frame_msg), rear_camera->ci.frame_width*3, - (uint8_t*)buf->addr, rear_camera->ci.frame_stride, - rear_camera->ci.frame_width, rear_camera->ci.frame_height); - assert(err == 0); - - visionbuf_sync(buf, VISIONBUF_SYNC_TO_DEVICE); - tbuffer_dispatch(tb, buf_idx); - - err = zmq_msg_close(&frame_msg); - assert(err == 0); - err = zmq_msg_close(&t_msg); - assert(err == 0); - } - - zsock_destroy(&frame_sock); -} - -void run_unlogger(DualCameraState *s) { - zsock_t *frame_sock = zsock_new_sub(NULL, ""); - assert(frame_sock); - int err = zsock_connect(frame_sock, - "ipc:///tmp/9464f05d-9d88-4fc9-aa17-c75352d9590d"); - assert(err == 0); - void *frame_sock_raw = zsock_resolve(frame_sock); - - CameraState *const rear_camera = &s->rear; - auto frame_data = std::vector{}; - - auto *tb = &rear_camera->camera_tb; - - while (!do_exit) { - // Handle rear camera only. - zmq_msg_t msg; - int rc = zmq_msg_init(&msg); - assert(rc == 0); - rc = zmq_msg_recv(&msg, frame_sock_raw, 0); - if (rc == -1) { - if (do_exit) { - break; - } else { - fprintf(stderr, "Could not recv frame message: %d\n", errno); - } - } - assert(rc != -1); - - const size_t msg_size_words = zmq_msg_size(&msg) / sizeof(capnp::word); - assert(msg_size_words * sizeof(capnp::word) == zmq_msg_size(&msg)); - - if (frame_data.size() < msg_size_words) { - frame_data = std::vector{msg_size_words}; - } - std::memcpy(frame_data.data(), zmq_msg_data(&msg), - msg_size_words * sizeof(*frame_data.data())); - zmq_msg_close(&msg); - - capnp::FlatArrayMessageReader message{ - kj::arrayPtr(frame_data.data(), msg_size_words), {}}; - - const auto &event = message.getRoot(); - assert(event.which() == cereal::Event::FRAME); - const auto reader = event.getFrame(); - assert(reader.hasImage()); - const auto yuv_image = reader.getImage(); - - // Copy camera data to buffer. - const size_t width = rear_camera->ci.frame_width; - const size_t height = rear_camera->ci.frame_height; - - const size_t y_len = width * height; - const uint8_t *const y = yuv_image.begin(); - const uint8_t *const u = y + y_len; - const uint8_t *const v = u + y_len / 4; - - assert(yuv_image.size() == y_len * 3 / 2); - - const int buf_idx = tbuffer_select(tb); - rear_camera->camera_bufs_metadata[buf_idx] = { - .frame_id = reader.getFrameId(), - .timestamp_eof = reader.getTimestampEof(), - .frame_length = static_cast(reader.getFrameLength()), - .integ_lines = static_cast(reader.getIntegLines()), - .global_gain = static_cast(reader.getGlobalGain()), - }; - - auto *buf = &rear_camera->camera_bufs[buf_idx]; - uint8_t *const rgb = static_cast(buf->addr); - - // Convert to RGB. - const int result = libyuv::I420ToRGB24(y, width, u, width / 2, v, width / 2, - rgb, width * 3, width, height); - assert(result == 0); - - visionbuf_sync(buf, VISIONBUF_SYNC_TO_DEVICE); - - // HACK(mgraczyk): Do not drop frames. - while (*(volatile int*)&tb->pending_idx != -1) { - usleep(20000); - } - tbuffer_dispatch(tb, buf_idx); - } - - zsock_destroy(&frame_sock); -} - -} // namespace - -CameraInfo cameras_supported[CAMERA_ID_MAX] = { - [CAMERA_ID_IMX298] = { - .frame_width = FRAME_WIDTH, - .frame_height = FRAME_HEIGHT, - .frame_stride = FRAME_WIDTH*3, - .bayer = false, - .bayer_flip = false, - }, -}; - -void cameras_init(DualCameraState *s) { - memset(s, 0, sizeof(*s)); - - camera_init(&s->rear, CAMERA_ID_IMX298, 20); - camera_init(&s->front, CAMERA_ID_IMX298, 20); - - if (getenv("SIMULATOR2")) { - // simulator camera is flipped vertically - s->rear.transform = (mat3){{ - 1.0, 0.0, 0.0, - 0.0, -1.0, s->rear.ci.frame_height - 1.0f, - 0.0, 0.0, 1.0, - }}; - } else { - // assume the input is upside-down - s->rear.transform = (mat3){{ - -1.0, 0.0, s->rear.ci.frame_width - 1.0f, - 0.0, -1.0, s->rear.ci.frame_height - 1.0f, - 0.0, 0.0, 1.0, - }}; - } -} - -void cameras_open(DualCameraState *s, VisionBuf *camera_bufs_rear, - VisionBuf *camera_bufs_focus, VisionBuf *camera_bufs_stats, - VisionBuf *camera_bufs_front) { - assert(camera_bufs_rear); - assert(camera_bufs_front); - int err; - - // LOG("*** open front ***"); - camera_open(&s->front, camera_bufs_front, false); - - // LOG("*** open rear ***"); - camera_open(&s->rear, camera_bufs_rear, true); -} - -void cameras_close(DualCameraState *s) { - camera_close(&s->rear); - camera_close(&s->front); -} - -void camera_autoexposure(CameraState *s, float grey_frac) {} - - -void cameras_run(DualCameraState *s) { - set_thread_name("fake_camera"); - - if (getenv("SIMULATOR2")) { - run_simulator(s); - } else { - run_unlogger(s); - } - - cameras_close(s); - -} diff --git a/selfdrive/visiond/camera_fake.h b/selfdrive/visiond/camera_fake.h deleted file mode 100644 index 04ad01a6d0..0000000000 --- a/selfdrive/visiond/camera_fake.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef FAKE_CAMERA_H -#define FAKE_CAMERA_H - -#include - -#include "common/mat.h" - -#include "buffering.h" -#include "common/visionbuf.h" -#include "camera_common.h" - -#define FRAME_BUF_COUNT 4 - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct CameraState { - int camera_id; - CameraInfo ci; - int frame_size; - - VisionBuf *camera_bufs; - FrameMetadata camera_bufs_metadata[FRAME_BUF_COUNT]; - TBuffer camera_tb; - - int fps; - float digital_gain; - - mat3 transform; -} CameraState; - - -typedef struct DualCameraState { - int ispif_fd; - - CameraState rear; - CameraState front; -} DualCameraState; - -void cameras_init(DualCameraState *s); -void cameras_open(DualCameraState *s, VisionBuf *camera_bufs_rear, VisionBuf *camera_bufs_focus, VisionBuf *camera_bufs_stats, VisionBuf *camera_bufs_front); -void cameras_run(DualCameraState *s); -void cameras_close(DualCameraState *s); - -void camera_autoexposure(CameraState *s, float grey_frac); - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif diff --git a/selfdrive/visiond/camera_common.h b/selfdrive/visiond/cameras/camera_common.h similarity index 100% rename from selfdrive/visiond/camera_common.h rename to selfdrive/visiond/cameras/camera_common.h diff --git a/selfdrive/visiond/camera_qcom.c b/selfdrive/visiond/cameras/camera_qcom.c similarity index 100% rename from selfdrive/visiond/camera_qcom.c rename to selfdrive/visiond/cameras/camera_qcom.c diff --git a/selfdrive/visiond/camera_qcom.h b/selfdrive/visiond/cameras/camera_qcom.h similarity index 100% rename from selfdrive/visiond/camera_qcom.h rename to selfdrive/visiond/cameras/camera_qcom.h diff --git a/selfdrive/visiond/debayer.cl b/selfdrive/visiond/cameras/debayer.cl similarity index 100% rename from selfdrive/visiond/debayer.cl rename to selfdrive/visiond/cameras/debayer.cl diff --git a/selfdrive/visiond/sensor_i2c.h b/selfdrive/visiond/cameras/sensor_i2c.h similarity index 100% rename from selfdrive/visiond/sensor_i2c.h rename to selfdrive/visiond/cameras/sensor_i2c.h diff --git a/selfdrive/visiond/constants.py b/selfdrive/visiond/constants.py index 878478e9cf..56c4b76a3a 100644 --- a/selfdrive/visiond/constants.py +++ b/selfdrive/visiond/constants.py @@ -1,2 +1,3 @@ MAX_DISTANCE = 140. LANE_OFFSET = 1.8 +MAX_REL_V = 10. diff --git a/selfdrive/visiond/model.cc b/selfdrive/visiond/model.cc deleted file mode 100644 index 2fbb4f3c92..0000000000 --- a/selfdrive/visiond/model.cc +++ /dev/null @@ -1,97 +0,0 @@ -#include "common/timing.h" -#include "model.h" - -#ifdef BIGMODEL - #define MODEL_WIDTH 864 - #define MODEL_HEIGHT 288 - #define MODEL_NAME "driving_bigmodel_dlc" -#else - #define MODEL_WIDTH 320 - #define MODEL_HEIGHT 160 - #define MODEL_NAME "driving_model_dlc" -#endif - -#define OUTPUT_SIZE 161 - -#ifdef TEMPORAL - #define TEMPORAL_SIZE 512 -#else - #define TEMPORAL_SIZE 0 -#endif - -extern const uint8_t driving_model_data[] asm("_binary_" MODEL_NAME "_start"); -extern const uint8_t driving_model_end[] asm("_binary_" MODEL_NAME "_end"); -const size_t driving_model_size = driving_model_end - driving_model_data; - -void model_init(ModelState* s, cl_device_id device_id, cl_context context, int temporal) { - model_input_init(&s->in, MODEL_WIDTH, MODEL_HEIGHT, device_id, context); - const int output_size = OUTPUT_SIZE + TEMPORAL_SIZE; - s->output = (float*)malloc(output_size * sizeof(float)); - memset(s->output, 0, output_size * sizeof(float)); - s->m = new SNPEModel(driving_model_data, driving_model_size, s->output, output_size); -#ifdef TEMPORAL - assert(temporal); - s->m->addRecurrent(&s->output[OUTPUT_SIZE], TEMPORAL_SIZE); -#else - assert(!temporal); -#endif -} - -ModelData model_eval_frame(ModelState* s, cl_command_queue q, - cl_mem yuv_cl, int width, int height, - mat3 transform, void* sock) { - struct { - float *path; - float *left_lane; - float *right_lane; - float *lead; - } net_outputs = {NULL}; - - //for (int i = 0; i < OUTPUT_SIZE + TEMPORAL_SIZE; i++) { printf("%f ", s->output[i]); } printf("\n"); - - float *net_input_buf = model_input_prepare(&s->in, q, yuv_cl, width, height, transform); - s->m->execute(net_input_buf); - - // net outputs - net_outputs.path = &s->output[0]; - net_outputs.left_lane = &s->output[51]; - net_outputs.right_lane = &s->output[51+53]; - net_outputs.lead = &s->output[51+53+53]; - - ModelData model = {0}; - - for (int i=0; i 0. ? model.lead.dist : 0.; - - model.lead.std = max_dist * sqrt(2.) / net_outputs.lead[1]; - softmax(&net_outputs.lead[2], softmax_buff, 2); - model.lead.prob = softmax_buff[0]; - - return model; -} - -void model_free(ModelState* s) { - free(s->output); - model_input_free(&s->in); - delete s->m; -} - diff --git a/selfdrive/visiond/commonmodel.c b/selfdrive/visiond/models/commonmodel.c similarity index 92% rename from selfdrive/visiond/commonmodel.c rename to selfdrive/visiond/models/commonmodel.c index 595d2609e7..c2bb657bb5 100644 --- a/selfdrive/visiond/commonmodel.c +++ b/selfdrive/visiond/models/commonmodel.c @@ -59,6 +59,14 @@ void model_input_free(ModelInput* s) { } +float sigmoid(float input) { + return 1 / (1 + expf(-input)); +} + +float softplus(float input) { + return log1p(expf(input)); +} + void softmax(const float* input, float* output, size_t len) { float max_val = -FLT_MAX; for(int i = 0; i < len; i++) { @@ -85,16 +93,16 @@ void softmax(const float* input, float* output, size_t len) { static cereal_ModelData_PathData_ptr path_to_cereal(struct capn_segment *cs, const PathData data) { - capn_list32 points_ptr = capn_new_list32(cs, MODEL_PATH_DISTANCE); - for (int i=0; i +#include +#include +#include + +#ifdef QCOM + #include +#else + #include +#endif + +#include "common/timing.h" +#include "driving.h" + +#ifdef MEDMODEL + #define MODEL_WIDTH 512 + #define MODEL_HEIGHT 256 + #define MODEL_NAME "driving_model_dlc" +#else + #define MODEL_WIDTH 320 + #define MODEL_HEIGHT 160 + #define MODEL_NAME "driving_model_dlc" +#endif + +#define OUTPUT_SIZE (200 + 2*201 + 26) +#define LEAD_MDN_N 5 + +#ifdef TEMPORAL + #define TEMPORAL_SIZE 512 +#else + #define TEMPORAL_SIZE 0 +#endif + +Eigen::Matrix vander; + +void model_init(ModelState* s, cl_device_id device_id, cl_context context, int temporal) { + model_input_init(&s->in, MODEL_WIDTH, MODEL_HEIGHT, device_id, context); + const int output_size = OUTPUT_SIZE + TEMPORAL_SIZE; + s->output = (float*)malloc(output_size * sizeof(float)); + memset(s->output, 0, output_size * sizeof(float)); + s->m = new DefaultRunModel("../../models/driving_model.dlc", s->output, output_size); +#ifdef TEMPORAL + assert(temporal); + s->m->addRecurrent(&s->output[OUTPUT_SIZE], TEMPORAL_SIZE); +#endif + + // Build Vandermonde matrix + for(int i = 0; i < MODEL_PATH_DISTANCE; i++) { + for(int j = 0; j < POLYFIT_DEGREE; j++) { + vander(i, j) = pow(i, POLYFIT_DEGREE-j-1); + } + } +} + +ModelData model_eval_frame(ModelState* s, cl_command_queue q, + cl_mem yuv_cl, int width, int height, + mat3 transform, void* sock) { + struct { + float *path; + float *left_lane; + float *right_lane; + float *lead; + } net_outputs = {NULL}; + + //for (int i = 0; i < OUTPUT_SIZE + TEMPORAL_SIZE; i++) { printf("%f ", s->output[i]); } printf("\n"); + + float *net_input_buf = model_input_prepare(&s->in, q, yuv_cl, width, height, transform); + + //printf("readinggggg \n"); + //FILE *f = fopen("goof_frame", "r"); + //fread(net_input_buf, sizeof(float), MODEL_HEIGHT*MODEL_WIDTH*3/2, f); + //fclose(f); + //sleep(1); + //printf("done \n"); + s->m->execute(net_input_buf); + + // net outputs + net_outputs.path = &s->output[0]; + net_outputs.left_lane = &s->output[MODEL_PATH_DISTANCE*2]; + net_outputs.right_lane = &s->output[MODEL_PATH_DISTANCE*2 + MODEL_PATH_DISTANCE*2 + 1]; + net_outputs.lead = &s->output[MODEL_PATH_DISTANCE*2 + (MODEL_PATH_DISTANCE*2 + 1)*2]; + + ModelData model = {0}; + + for (int i=0; i net_outputs.lead[mdn_max_idx*5 + 4]) { + mdn_max_idx = i; + } + } + model.lead.prob = sigmoid(net_outputs.lead[LEAD_MDN_N*5]); + model.lead.dist = net_outputs.lead[mdn_max_idx*5] * max_dist; + model.lead.std = softplus(net_outputs.lead[mdn_max_idx*5 + 2]) * max_dist; + model.lead.rel_v = net_outputs.lead[mdn_max_idx*5 + 1] * max_rel_vel; + model.lead.rel_v_std = softplus(net_outputs.lead[mdn_max_idx*5 + 3]) * max_rel_vel; + return model; +} + +void model_free(ModelState* s) { + free(s->output); + model_input_free(&s->in); + delete s->m; +} + +void poly_fit(float *in_pts, float *in_stds, float *out) { + // References to inputs + Eigen::Map > pts(in_pts, MODEL_PATH_DISTANCE); + Eigen::Map > std(in_stds, MODEL_PATH_DISTANCE); + Eigen::Map > p(out, POLYFIT_DEGREE); + + // Build Least Squares equations + Eigen::Matrix lhs = vander.array().colwise() / std.array(); + Eigen::Matrix rhs = pts.array() / std.array(); + + // Solve inplace + Eigen::ColPivHouseholderQR > qr(lhs); + p = qr.solve(rhs); +} diff --git a/selfdrive/visiond/model.h b/selfdrive/visiond/models/driving.h similarity index 82% rename from selfdrive/visiond/model.h rename to selfdrive/visiond/models/driving.h index 06a65f8539..2afb205217 100644 --- a/selfdrive/visiond/model.h +++ b/selfdrive/visiond/models/driving.h @@ -2,19 +2,19 @@ #define MODEL_H // gate this here -//#define BIGMODEL +#define MEDMODEL #define TEMPORAL #include "common/mat.h" #include "common/modeldata.h" #include "commonmodel.h" -#include "snpemodel.h" +#include "runners/run.h" typedef struct ModelState { ModelInput in; float *output; - SNPEModel *m; + RunModel *m; } ModelState; void model_init(ModelState* s, cl_device_id device_id, @@ -23,5 +23,6 @@ ModelData model_eval_frame(ModelState* s, cl_command_queue q, cl_mem yuv_cl, int width, int height, mat3 transform, void* sock); void model_free(ModelState* s); +void poly_fit(float *in_pts, float *in_stds, float *out); #endif diff --git a/selfdrive/visiond/monitoring.cc b/selfdrive/visiond/models/monitoring.cc similarity index 80% rename from selfdrive/visiond/monitoring.cc rename to selfdrive/visiond/models/monitoring.cc index 921473108c..7b151d0c41 100644 --- a/selfdrive/visiond/monitoring.cc +++ b/selfdrive/visiond/models/monitoring.cc @@ -1,16 +1,13 @@ +#include #include "monitoring.h" #include "common/mat.h" #define MODEL_WIDTH 320 #define MODEL_HEIGHT 160 -extern const uint8_t monitoring_model_data[] asm("_binary_monitoring_model_dlc_start"); -extern const uint8_t monitoring_model_end[] asm("_binary_monitoring_model_dlc_end"); -const size_t monitoring_model_size = monitoring_model_end - monitoring_model_data; - void monitoring_init(MonitoringState* s, cl_device_id device_id, cl_context context) { model_input_init(&s->in, MODEL_WIDTH, MODEL_HEIGHT, device_id, context); - s->m = new SNPEModel(monitoring_model_data, monitoring_model_size, (float*)&s->output, OUTPUT_SIZE); + s->m = new SNPEModel("../../models/monitoring_model.dlc", (float*)&s->output, OUTPUT_SIZE); } MonitoringResult monitoring_eval_frame(MonitoringState* s, cl_command_queue q, diff --git a/selfdrive/visiond/monitoring.h b/selfdrive/visiond/models/monitoring.h similarity index 93% rename from selfdrive/visiond/monitoring.h rename to selfdrive/visiond/models/monitoring.h index 1e9e25018e..f9f4516bd8 100644 --- a/selfdrive/visiond/monitoring.h +++ b/selfdrive/visiond/models/monitoring.h @@ -2,7 +2,7 @@ #define MONITORING_H #include "commonmodel.h" -#include "snpemodel.h" +#include "runners/run.h" #ifdef __cplusplus extern "C" { @@ -17,7 +17,7 @@ typedef struct MonitoringResult { typedef struct MonitoringState { ModelInput in; - SNPEModel *m; + RunModel *m; float output[OUTPUT_SIZE]; } MonitoringState; diff --git a/selfdrive/visiond/models/posenet.cc b/selfdrive/visiond/models/posenet.cc new file mode 100644 index 0000000000..d1c8d80544 --- /dev/null +++ b/selfdrive/visiond/models/posenet.cc @@ -0,0 +1,58 @@ +#include +#include +#include "posenet.h" + +void posenet_init(PosenetState *s) { + s->input = (float*)malloc(2*200*532*sizeof(float)); + s->m = new DefaultRunModel("../../models/posenet.dlc", s->output, sizeof(s->output)/sizeof(float)); +} + +void posenet_push(PosenetState *s, uint8_t *yuv_ptr_y, int yuv_width) { + // move second frame to first frame + memmove(&s->input[0], &s->input[1], sizeof(float)*(200*532*2 - 1)); + + // fill posenet input + float a; + // posenet uses a half resolution cropped frame + // with upper left corner: [50, 237] and + // bottom right corner: [1114, 637] + // So the resulting crop is 532 X 200 + for (int y=237; y<637; y+=2) { + int yy = (y-237)/2; + for (int x = 50; x < 1114; x+=2) { + int xx = (x-50)/2; + a = 0; + a += yuv_ptr_y[yuv_width*(y+0) + (x+1)]; + a += yuv_ptr_y[yuv_width*(y+1) + (x+1)]; + a += yuv_ptr_y[yuv_width*(y+0) + (x+0)]; + a += yuv_ptr_y[yuv_width*(y+1) + (x+0)]; + // The posenet takes a normalized image input + // like the driving model so [0,255] is remapped + // to [-1,1] + s->input[(yy*532+xx)*2 + 1] = (a/512.0 - 1.0); + } + } +} + +void posenet_eval(PosenetState *s) { + s->m->execute(s->input); + + // fix stddevs + for (int i = 6; i < 12; i++) { + s->output[i] = log1p(exp(s->output[i])) + 1e-6; + } + // to radians + for (int i = 3; i < 6; i++) { + s->output[i] = M_PI * s->output[i] / 180.0; + } + // to radians + for (int i = 9; i < 12; i++) { + s->output[i] = M_PI * s->output[i] / 180.0; + } +} + +void posenet_free(PosenetState *s) { + delete s->m; + free(s->input); +} + diff --git a/selfdrive/visiond/models/posenet.h b/selfdrive/visiond/models/posenet.h new file mode 100644 index 0000000000..2e6571a1d4 --- /dev/null +++ b/selfdrive/visiond/models/posenet.h @@ -0,0 +1,27 @@ +#ifndef POSENET_H +#define POSENET_H + +#include +#include "runners/run.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct PosenetState { + float output[12]; + float *input; + RunModel *m; +} PosenetState; + +void posenet_init(PosenetState *s); +void posenet_push(PosenetState *s, uint8_t *yuv_ptr_y, int yuv_width); +void posenet_eval(PosenetState *s); +void posenet_free(PosenetState *s); + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/selfdrive/visiond/runners/run.h b/selfdrive/visiond/runners/run.h new file mode 100644 index 0000000000..d92519daf1 --- /dev/null +++ b/selfdrive/visiond/runners/run.h @@ -0,0 +1,14 @@ +#ifndef RUN_H +#define RUN_H + +#include "runmodel.h" +#include "snpemodel.h" + +#ifdef QCOM + #define DefaultRunModel SNPEModel +#else + #include "tfmodel.h" + #define DefaultRunModel TFModel +#endif + +#endif diff --git a/selfdrive/visiond/runners/runmodel.h b/selfdrive/visiond/runners/runmodel.h new file mode 100644 index 0000000000..245f4c8df2 --- /dev/null +++ b/selfdrive/visiond/runners/runmodel.h @@ -0,0 +1,11 @@ +#ifndef RUNMODEL_H +#define RUNMODEL_H + +class RunModel { +public: + virtual void addRecurrent(float *state, int state_size) {} + virtual void execute(float *net_input_buf) {} +}; + +#endif + diff --git a/selfdrive/visiond/snpemodel.cc b/selfdrive/visiond/runners/snpemodel.cc similarity index 87% rename from selfdrive/visiond/snpemodel.cc rename to selfdrive/visiond/runners/snpemodel.cc index ae7b7f10a1..15b3bcc317 100644 --- a/selfdrive/visiond/snpemodel.cc +++ b/selfdrive/visiond/runners/snpemodel.cc @@ -1,3 +1,6 @@ +#include +#include +#include "common/util.h" #include "snpemodel.h" void PrintErrorStringAndExit() { @@ -6,22 +9,34 @@ void PrintErrorStringAndExit() { std::exit(EXIT_FAILURE); } -SNPEModel::SNPEModel(const uint8_t *model_data, const size_t model_size, float *output, size_t output_size) { +SNPEModel::SNPEModel(const char *path, float *output, size_t output_size) { +#ifdef QCOM assert(zdl::SNPE::SNPEFactory::isRuntimeAvailable(zdl::DlSystem::Runtime_t::GPU)); +#endif + size_t model_size; + model_data = (uint8_t *)read_file(path, &model_size); + assert(model_data); // load model std::unique_ptr container = zdl::DlContainer::IDlContainer::open(model_data, model_size); if (!container) { PrintErrorStringAndExit(); } - printf("loaded model with size: %d\n", model_size); + printf("loaded model with size: %u\n", model_size); // create model runner zdl::SNPE::SNPEBuilder snpeBuilder(container.get()); while (!snpe) { +#ifdef QCOM snpe = snpeBuilder.setOutputLayers({}) .setRuntimeProcessor(zdl::DlSystem::Runtime_t::GPU) .setUseUserSuppliedBuffers(true) .setPerformanceProfile(zdl::DlSystem::PerformanceProfile_t::HIGH_PERFORMANCE) .build(); +#else + snpe = snpeBuilder.setOutputLayers({}) + .setUseUserSuppliedBuffers(true) + .setPerformanceProfile(zdl::DlSystem::PerformanceProfile_t::HIGH_PERFORMANCE) + .build(); +#endif if (!snpe) std::cerr << zdl::DlSystem::getLastErrorString() << std::endl; } diff --git a/selfdrive/visiond/snpemodel.h b/selfdrive/visiond/runners/snpemodel.h similarity index 80% rename from selfdrive/visiond/snpemodel.h rename to selfdrive/visiond/runners/snpemodel.h index a7fc6083db..0a6e030f47 100644 --- a/selfdrive/visiond/snpemodel.h +++ b/selfdrive/visiond/runners/snpemodel.h @@ -11,12 +11,19 @@ #include #include -class SNPEModel { +#include "runmodel.h" + +class SNPEModel : public RunModel { public: - SNPEModel(const uint8_t *model_data, const size_t model_size, float *output, size_t output_size); + SNPEModel(const char *path, float *output, size_t output_size); + ~SNPEModel() { + if (model_data) free(model_data); + } void addRecurrent(float *state, int state_size); void execute(float *net_input_buf); private: + uint8_t *model_data = NULL; + // snpe model stuff std::unique_ptr snpe; diff --git a/selfdrive/visiond/loadyuv.c b/selfdrive/visiond/transforms/loadyuv.c similarity index 96% rename from selfdrive/visiond/loadyuv.c rename to selfdrive/visiond/transforms/loadyuv.c index 2b50fb9d2a..2518145100 100644 --- a/selfdrive/visiond/loadyuv.c +++ b/selfdrive/visiond/transforms/loadyuv.c @@ -17,7 +17,7 @@ void loadyuv_init(LoadYUVState* s, cl_context ctx, cl_device_id device_id, int w "-cl-fast-relaxed-math -cl-denorms-are-zero " "-DTRANSFORMED_WIDTH=%d -DTRANSFORMED_HEIGHT=%d", width, height); - cl_program prg = CLU_LOAD_FROM_FILE(ctx, device_id, "loadyuv.cl", args); + cl_program prg = CLU_LOAD_FROM_FILE(ctx, device_id, "transforms/loadyuv.cl", args); s->loadys_krnl = clCreateKernel(prg, "loadys", &err); assert(err == 0); diff --git a/selfdrive/visiond/loadyuv.cl b/selfdrive/visiond/transforms/loadyuv.cl similarity index 100% rename from selfdrive/visiond/loadyuv.cl rename to selfdrive/visiond/transforms/loadyuv.cl diff --git a/selfdrive/visiond/loadyuv.h b/selfdrive/visiond/transforms/loadyuv.h similarity index 100% rename from selfdrive/visiond/loadyuv.h rename to selfdrive/visiond/transforms/loadyuv.h diff --git a/selfdrive/visiond/rgb_to_yuv.c b/selfdrive/visiond/transforms/rgb_to_yuv.c similarity index 94% rename from selfdrive/visiond/rgb_to_yuv.c rename to selfdrive/visiond/transforms/rgb_to_yuv.c index 0ce3d5a027..2626e6eebe 100644 --- a/selfdrive/visiond/rgb_to_yuv.c +++ b/selfdrive/visiond/transforms/rgb_to_yuv.c @@ -20,7 +20,7 @@ void rgb_to_yuv_init(RGBToYUVState* s, cl_context ctx, cl_device_id device_id, i #endif "-DWIDTH=%d -DHEIGHT=%d -DUV_WIDTH=%d -DUV_HEIGHT=%d -DRGB_STRIDE=%d -DRGB_SIZE=%d", width, height, width/ 2, height / 2, rgb_stride, width * height); - cl_program prg = CLU_LOAD_FROM_FILE(ctx, device_id, "rgb_to_yuv.cl", args); + cl_program prg = CLU_LOAD_FROM_FILE(ctx, device_id, "transforms/rgb_to_yuv.cl", args); s->rgb_to_yuv_krnl = clCreateKernel(prg, "rgb_to_yuv", &err); assert(err == 0); diff --git a/selfdrive/visiond/rgb_to_yuv.cl b/selfdrive/visiond/transforms/rgb_to_yuv.cl similarity index 100% rename from selfdrive/visiond/rgb_to_yuv.cl rename to selfdrive/visiond/transforms/rgb_to_yuv.cl diff --git a/selfdrive/visiond/rgb_to_yuv.h b/selfdrive/visiond/transforms/rgb_to_yuv.h similarity index 100% rename from selfdrive/visiond/rgb_to_yuv.h rename to selfdrive/visiond/transforms/rgb_to_yuv.h diff --git a/selfdrive/visiond/rgb_to_yuv_test.cc b/selfdrive/visiond/transforms/rgb_to_yuv_test.cc similarity index 100% rename from selfdrive/visiond/rgb_to_yuv_test.cc rename to selfdrive/visiond/transforms/rgb_to_yuv_test.cc diff --git a/selfdrive/visiond/transform.c b/selfdrive/visiond/transforms/transform.c similarity index 99% rename from selfdrive/visiond/transform.c rename to selfdrive/visiond/transforms/transform.c index 5f3d7ad5a1..0b4150ddb2 100644 --- a/selfdrive/visiond/transform.c +++ b/selfdrive/visiond/transforms/transform.c @@ -9,7 +9,7 @@ void transform_init(Transform* s, cl_context ctx, cl_device_id device_id) { int err = 0; memset(s, 0, sizeof(*s)); - cl_program prg = CLU_LOAD_FROM_FILE(ctx, device_id, "transform.cl", ""); + cl_program prg = CLU_LOAD_FROM_FILE(ctx, device_id, "transforms/transform.cl", ""); s->krnl = clCreateKernel(prg, "warpPerspective", &err); assert(err == 0); diff --git a/selfdrive/visiond/transform.cl b/selfdrive/visiond/transforms/transform.cl similarity index 100% rename from selfdrive/visiond/transform.cl rename to selfdrive/visiond/transforms/transform.cl diff --git a/selfdrive/visiond/transform.h b/selfdrive/visiond/transforms/transform.h similarity index 100% rename from selfdrive/visiond/transform.h rename to selfdrive/visiond/transforms/transform.h diff --git a/selfdrive/visiond/visiond.cc b/selfdrive/visiond/visiond.cc index 77a7e5f485..530fd68f91 100644 --- a/selfdrive/visiond/visiond.cc +++ b/selfdrive/visiond/visiond.cc @@ -24,6 +24,7 @@ #include #include #include +#include #include "common/version.h" #include "common/util.h" @@ -39,14 +40,17 @@ #include "bufs.h" #ifdef QCOM -#include "camera_qcom.h" +#include "cameras/camera_qcom.h" #else -#include "camera_fake.h" +#include "cameras/camera_frame_stream.h" #endif -#include "model.h" -#include "monitoring.h" -#include "rgb_to_yuv.h" +// 3 models +#include "models/driving.h" +#include "models/monitoring.h" +#include "models/posenet.h" + +#include "transforms/rgb_to_yuv.h" #include "cereal/gen/cpp/log.capnp.h" @@ -152,6 +156,8 @@ struct VisionState { zsock_t *monitoring_sock; void* monitoring_sock_raw; + PosenetState posenet; + // Protected by transform_lock. bool run_model; mat3 cur_transform; @@ -174,6 +180,9 @@ struct VisionState { zsock_t *posenet_sock; void* posenet_sock_raw; + zsock_t *thumbnail_sock; + void* thumbnail_sock_raw; + pthread_mutex_t clients_lock; VisionClientState clients[MAX_CLIENTS]; @@ -218,7 +227,7 @@ cl_program build_debayer_program(VisionState *s, frame_width, frame_height, frame_stride, rgb_width, rgb_height, rgb_stride, bayer_flip, hdr); - return CLU_LOAD_FROM_FILE(s->context, s->device_id, "debayer.cl", args); + return CLU_LOAD_FROM_FILE(s->context, s->device_id, "cameras/debayer.cl", args); } void cl_init(VisionState *s) { @@ -247,45 +256,6 @@ void cl_free(VisionState *s) { assert(err == 0); } -////////// - -#if 0 -// from libadreno_utils.so -extern "C" void compute_aligned_width_and_height(int width, - int height, - int bpp, - int tile_mode, - int raster_mode, - int padding_threshold, - int *aligned_w, - int *aligned_h); - -// TODO: move to visionbuf -void alloc_rgb888_bufs_cl(cl_device_id device_id, cl_context ctx, - int width, int height, int count, - int *out_stride, size_t *out_size, - VisionBuf *out_bufs, cl_mem *out_cl) { - - int aligned_w = 0, aligned_h = 0; -#ifdef QCOM - compute_aligned_width_and_height(ALIGN(width, 32), ALIGN(height, 32), 3, 0, 0, 512, &aligned_w, &aligned_h); -#else - aligned_w = width; aligned_h = height; -#endif - - int stride = aligned_w * 3; - size_t size = aligned_w * aligned_h * 3; - - for (int i=0; iui_tb, UI_BUF_COUNT, "rgb"); - assert(s->cameras.front.ci.bayer); + //assert(s->cameras.front.ci.bayer); s->rgb_front_width = s->cameras.front.ci.frame_width/2; s->rgb_front_height = s->cameras.front.ci.frame_height/2; @@ -375,36 +345,27 @@ void init_buffers(VisionState *s) { s->yuv_transform = s->cameras.rear.transform; } - // build all the camera debayer programs - for (int i=0; icameras.rear.ci.bayer) { + s->prg_debayer_rear = build_debayer_program(s, s->cameras.rear.ci.frame_width, s->cameras.rear.ci.frame_height, + s->cameras.rear.ci.frame_stride, + s->rgb_width, s->rgb_height, s->rgb_stride, + s->cameras.rear.ci.bayer_flip, s->cameras.rear.ci.hdr); + s->krnl_debayer_rear = clCreateKernel(s->prg_debayer_rear, "debayer10", &err); + assert(err == 0); } - s->prg_debayer_rear = build_debayer_program(s, s->cameras.rear.ci.frame_width, s->cameras.rear.ci.frame_height, - s->cameras.rear.ci.frame_stride, - s->rgb_width, s->rgb_height, s->rgb_stride, - s->cameras.rear.ci.bayer_flip, s->cameras.rear.ci.hdr); + if (s->cameras.front.ci.bayer) { + s->prg_debayer_front = build_debayer_program(s, s->cameras.front.ci.frame_width, s->cameras.front.ci.frame_height, + s->cameras.front.ci.frame_stride, + s->rgb_front_width, s->rgb_front_height, s->rgb_front_stride, + s->cameras.front.ci.bayer_flip, s->cameras.front.ci.hdr); - s->prg_debayer_front = build_debayer_program(s, s->cameras.front.ci.frame_width, s->cameras.front.ci.frame_height, - s->cameras.front.ci.frame_stride, - s->rgb_front_width, s->rgb_front_height, s->rgb_front_stride, - s->cameras.front.ci.bayer_flip, s->cameras.front.ci.hdr); - - s->krnl_debayer_rear = clCreateKernel(s->prg_debayer_rear, "debayer10", &err); - assert(err == 0); - s->krnl_debayer_front = clCreateKernel(s->prg_debayer_front, "debayer10", &err); - assert(err == 0); + s->krnl_debayer_front = clCreateKernel(s->prg_debayer_front, "debayer10", &err); + assert(err == 0); + } rgb_to_yuv_init(&s->rgb_to_yuv_state, s->context, s->device_id, s->yuv_width, s->yuv_height, s->rgb_stride); rgb_to_yuv_init(&s->front_rgb_to_yuv_state, s->context, s->device_id, s->yuv_front_width, s->yuv_front_height, s->rgb_front_stride); - } void free_buffers(VisionState *s) { @@ -755,11 +716,6 @@ void* monitoring_thread(void *arg) { MonitoringResult res = monitoring_eval_frame(&s->monitoring, q, s->yuv_front_cl[buf_idx], s->yuv_front_width, s->yuv_front_height); - // for (int i=0; i<6; i++) { - // printf("%f ", res.vs[i]); - // } - // printf("\n"); - // send driver monitoring packet { capnp::MallocMessageBuilder msg; @@ -899,15 +855,6 @@ void* frontview_thread(void *arg) { return NULL; } -#define POSENET - -#ifdef POSENET -#include "snpemodel.h" -extern const uint8_t posenet_model_data[] asm("_binary_posenet_dlc_start"); -extern const uint8_t posenet_model_end[] asm("_binary_posenet_dlc_end"); -const size_t posenet_model_size = posenet_model_end - posenet_model_data; -#endif - void* processing_thread(void *arg) { int err; VisionState *s = (VisionState*)arg; @@ -938,14 +885,6 @@ void* processing_thread(void *arg) { FILE *dump_rgb_file = fopen("/sdcard/dump.rgb", "wb"); #endif -#ifdef POSENET - int posenet_counter = 0; - float pose_output[12]; - float *posenet_input = (float*)malloc(2*200*532*sizeof(float)); - SNPEModel *posenet = new SNPEModel(posenet_model_data, posenet_model_size, - pose_output, sizeof(pose_output)/sizeof(float)); -#endif - // init the net LOG("processing start!"); @@ -1048,6 +987,7 @@ void* processing_thread(void *arg) { model_publish(model_sock_raw, frame_id, model_transform, s->model_bufs[ui_idx]); } + // send frame event { capnp::MallocMessageBuilder msg; @@ -1066,6 +1006,7 @@ void* processing_thread(void *arg) { framed.setLensErr(frame_data.lens_err); framed.setLensTruePos(frame_data.lens_true_pos); + #ifndef QCOM framed.setImage(kj::arrayPtr((const uint8_t*)s->yuv_ion[yuv_idx].addr, s->yuv_buf_size)); #endif @@ -1073,68 +1014,23 @@ void* processing_thread(void *arg) { kj::ArrayPtr transform_vs(&s->yuv_transform.v[0], 9); framed.setTransform(transform_vs); - auto words = capnp::messageToFlatArray(msg); - auto bytes = words.asBytes(); - zmq_send(s->recorder_sock_raw, bytes.begin(), bytes.size(), ZMQ_DONTWAIT); + if (s->recorder_sock_raw != NULL) { + auto words = capnp::messageToFlatArray(msg); + auto bytes = words.asBytes(); + zmq_send(s->recorder_sock_raw, bytes.begin(), bytes.size(), ZMQ_DONTWAIT); + } } - -#ifdef POSENET + // push the frame to the posenet + // TODO: This doesn't always have to run double pt1 = 0, pt2 = 0, pt3 = 0; pt1 = millis_since_boot(); - - // move second frame to first frame - memmove(&posenet_input[0], &posenet_input[1], sizeof(float)*(200*532*2 - 1)); - - // fill posenet input - float a; - // posenet uses a half resolution cropped frame - // with upper left corner: [50, 237] and - // bottom right corner: [1114, 637] - // So the resulting crop is 532 X 200 - for (int y=237; y<637; y+=2) { - int yy = (y-237)/2; - for (int x = 50; x < 1114; x+=2) { - int xx = (x-50)/2; - a = 0; - a += yuv_ptr_y[s->yuv_width*(y+0) + (x+1)]; - a += yuv_ptr_y[s->yuv_width*(y+1) + (x+1)]; - a += yuv_ptr_y[s->yuv_width*(y+0) + (x+0)]; - a += yuv_ptr_y[s->yuv_width*(y+1) + (x+0)]; - // The posenet takes a normalized image input - // like the driving model so [0,255] is remapped - // to [-1,1] - posenet_input[(yy*532+xx)*2 + 1] = (a/512.0 - 1.0); - } - } - //FILE *fp; - //fp = fopen( "testing" , "r" ); - //fread(posenet_input , sizeof(float) , 200*532*2 , fp); - //fclose(fp); - //sleep(5); - + posenet_push(&s->posenet, yuv_ptr_y, s->yuv_width); pt2 = millis_since_boot(); - posenet_counter++; - - if (posenet_counter % 5 == 0){ - // run posenet - //printf("avg %f\n", pose_output[0]); - posenet->execute(posenet_input); - - - // fix stddevs - for (int i = 6; i < 12; i++) { - pose_output[i] = log1p(exp(pose_output[i])) + 1e-6; - } - // to radians - for (int i = 3; i < 6; i++) { - pose_output[i] = M_PI * pose_output[i] / 180.0; - } - // to radians - for (int i = 9; i < 12; i++) { - pose_output[i] = M_PI * pose_output[i] / 180.0; - } + // posenet runs every 5 + if (cnt % 5 == 0) { + posenet_eval(&s->posenet); // send posenet event { @@ -1143,13 +1039,13 @@ void* processing_thread(void *arg) { event.setLogMonoTime(nanos_since_boot()); auto posenetd = event.initCameraOdometry(); - kj::ArrayPtr trans_vs(&pose_output[0], 3); + kj::ArrayPtr trans_vs(&s->posenet.output[0], 3); posenetd.setTrans(trans_vs); - kj::ArrayPtr rot_vs(&pose_output[3], 3); + kj::ArrayPtr rot_vs(&s->posenet.output[3], 3); posenetd.setRot(rot_vs); - kj::ArrayPtr trans_std_vs(&pose_output[6], 3); + kj::ArrayPtr trans_std_vs(&s->posenet.output[6], 3); posenetd.setTransStd(trans_std_vs); - kj::ArrayPtr rot_std_vs(&pose_output[9], 3); + kj::ArrayPtr rot_std_vs(&s->posenet.output[9], 3); posenetd.setRotStd(rot_std_vs); auto words = capnp::messageToFlatArray(msg); @@ -1157,10 +1053,69 @@ void* processing_thread(void *arg) { zmq_send(s->posenet_sock_raw, bytes.begin(), bytes.size(), ZMQ_DONTWAIT); } pt3 = millis_since_boot(); - //LOGD("pre: %.2fms | posenet: %.2fms", (pt2-pt1), (pt3-pt1)); + LOGD("pre: %.2fms | posenet: %.2fms", (pt2-pt1), (pt3-pt1)); } -#endif + // one thumbnail per 5 seconds (instead of %5 == 0 posenet) + if (cnt % 100 == 3) { + uint8_t* thumbnail_buffer = NULL; + uint64_t thumbnail_len = 0; + + unsigned char *row = (unsigned char *)malloc(s->rgb_width/2*3); + mt1 = millis_since_boot(); + + struct jpeg_compress_struct cinfo; + struct jpeg_error_mgr jerr; + + cinfo.err = jpeg_std_error(&jerr); + jpeg_create_compress(&cinfo); + jpeg_mem_dest(&cinfo, &thumbnail_buffer, &thumbnail_len); + + cinfo.image_width = s->rgb_width / 2; + cinfo.image_height = s->rgb_height / 2; + cinfo.input_components = 3; + cinfo.in_color_space = JCS_RGB; + + jpeg_set_defaults(&cinfo); + jpeg_set_quality(&cinfo, 50, true); + jpeg_start_compress(&cinfo, true); + + JSAMPROW row_pointer[1]; + for (int i = 0; i < s->rgb_height; i+=2) { + for (int j = 0; j < s->rgb_width*3; j+=6) { + for (int k = 0; k < 3; k++) { + uint16_t dat = 0; + dat += bgr_ptr[s->rgb_stride*i + j + k]; + dat += bgr_ptr[s->rgb_stride*i + j+3 + k]; + dat += bgr_ptr[s->rgb_stride*(i+1) + j + k]; + dat += bgr_ptr[s->rgb_stride*(i+1) + j+3 + k]; + row[(j/2) + (2-k)] = dat/4; + } + } + row_pointer[0] = row; + jpeg_write_scanlines(&cinfo, row_pointer, 1); + } + free(row); + jpeg_finish_compress(&cinfo); + + mt2 = millis_since_boot(); + //printf("jpeg produced %lu bytes in %f\n", thumbnail_len, mt2-mt1); + + capnp::MallocMessageBuilder msg; + cereal::Event::Builder event = msg.initRoot(); + event.setLogMonoTime(nanos_since_boot()); + + auto thumbnaild = event.initThumbnail(); + thumbnaild.setFrameId(frame_data.frame_id); + thumbnaild.setTimestampEof(frame_data.timestamp_eof); + thumbnaild.setThumbnail(kj::arrayPtr((const uint8_t*)thumbnail_buffer, thumbnail_len)); + + auto words = capnp::messageToFlatArray(msg); + auto bytes = words.asBytes(); + zmq_send(s->thumbnail_sock_raw, bytes.begin(), bytes.size(), ZMQ_DONTWAIT); + + free(thumbnail_buffer); + } tbuffer_dispatch(&s->ui_tb, ui_idx); @@ -1206,8 +1161,8 @@ void* processing_thread(void *arg) { double t5 = millis_since_boot(); - /*LOGD("queued: %.2fms, yuv: %.2f, model: %.2fms | processing: %.3fms", - (t2-t1), (yt2-yt1), (mt2-mt1), (t5-t1));*/ + LOGD("queued: %.2fms, yuv: %.2f, model: %.2fms | processing: %.3fms", + (t2-t1), (yt2-yt1), (mt2-mt1), (t5-t1)); } #ifdef DUMP_RGB @@ -1258,7 +1213,7 @@ void* live_thread(void *arg) { if (event.isLiveCalibration()) { pthread_mutex_lock(&s->transform_lock); -#ifdef BIGMODEL +#ifdef MEDMODEL auto wm2 = event.getLiveCalibration().getWarpMatrixBig(); #else auto wm2 = event.getLiveCalibration().getWarpMatrix2(); @@ -1304,11 +1259,12 @@ void party(VisionState *s, bool nomodel) { processing_thread, s); assert(err == 0); - +#ifdef QCOM pthread_t frontview_thread_handle; err = pthread_create(&frontview_thread_handle, NULL, frontview_thread, s); assert(err == 0); +#endif pthread_t monitoring_thread_handle; err = pthread_create(&monitoring_thread_handle, NULL, monitoring_thread, s); @@ -1332,9 +1288,11 @@ void party(VisionState *s, bool nomodel) { zsock_signal(s->terminate_pub, 0); +#ifdef QCOM LOG("joining frontview_thread"); err = pthread_join(frontview_thread_handle, NULL); assert(err == 0); +#endif #ifndef __APPLE__ LOG("joining visionserver_thread"); @@ -1355,9 +1313,6 @@ void party(VisionState *s, bool nomodel) { } -// TODO: make a version of visiond that runs on pc using streamed video from EON. -// BOUNTY: free EON+panda+giraffe - int main(int argc, char **argv) { int err; @@ -1388,6 +1343,7 @@ int main(int argc, char **argv) { model_init(&s->model, s->device_id, s->context, true); monitoring_init(&s->monitoring, s->device_id, s->context); + posenet_init(&s->posenet); // s->zctx = zctx_shadow_zmq_ctx(zsys_init()); @@ -1404,9 +1360,11 @@ int main(int argc, char **argv) { init_buffers(s); - s->recorder_sock = zsock_new_pub("@tcp://*:8002"); - assert(s->recorder_sock); - s->recorder_sock_raw = zsock_resolve(s->recorder_sock); + #ifdef QCOM + s->recorder_sock = zsock_new_pub("@tcp://*:8002"); + assert(s->recorder_sock); + s->recorder_sock_raw = zsock_resolve(s->recorder_sock); + #endif s->monitoring_sock = zsock_new_pub("@tcp://*:8063"); assert(s->monitoring_sock); @@ -1416,6 +1374,10 @@ int main(int argc, char **argv) { assert(s->posenet_sock); s->posenet_sock_raw = zsock_resolve(s->posenet_sock); + s->thumbnail_sock = zsock_new_pub("@tcp://*:8069"); + assert(s->thumbnail_sock); + s->thumbnail_sock_raw = zsock_resolve(s->thumbnail_sock); + cameras_open(&s->cameras, &s->camera_bufs[0], &s->focus_bufs[0], &s->stats_bufs[0], &s->front_camera_bufs[0]); if (test_run) { @@ -1425,6 +1387,8 @@ int main(int argc, char **argv) { zsock_destroy(&s->recorder_sock); zsock_destroy(&s->monitoring_sock); + zsock_destroy(&s->posenet_sock); + zsock_destroy(&s->thumbnail_sock); // zctx_destroy(&s->zctx); model_free(&s->model);