diff --git a/.github/workflows/selfdrive_tests.yaml b/.github/workflows/selfdrive_tests.yaml index 144718df60..d5030230a9 100644 --- a/.github/workflows/selfdrive_tests.yaml +++ b/.github/workflows/selfdrive_tests.yaml @@ -291,9 +291,9 @@ jobs: $UNIT_TEST selfdrive/hardware/tici && \ $UNIT_TEST selfdrive/modeld && \ $UNIT_TEST tools/lib/tests && \ + ./common/tests/test_util && \ + ./common/tests/test_swaglog && \ ./selfdrive/boardd/tests/test_boardd_usbprotocol && \ - ./selfdrive/common/tests/test_util && \ - ./selfdrive/common/tests/test_swaglog && \ ./selfdrive/loggerd/tests/test_logger &&\ ./selfdrive/proclogd/tests/test_proclog && \ ./selfdrive/ui/replay/tests/test_replay && \ diff --git a/SConstruct b/SConstruct index 520716859a..a1284ec2e4 100644 --- a/SConstruct +++ b/SConstruct @@ -130,7 +130,7 @@ else: "#third_party/libyuv/x64/lib", "#third_party/mapbox-gl-native-qt/x86_64", "#cereal", - "#selfdrive/common", + "#common", "/usr/lib", "/usr/local/lib", ] @@ -138,7 +138,7 @@ else: rpath += [ Dir("#third_party/snpe/x86_64-linux-clang").abspath, Dir("#cereal").abspath, - Dir("#selfdrive/common").abspath + Dir("#common").abspath ] if GetOption('asan'): @@ -156,8 +156,8 @@ if arch != "Darwin": ldflags += ["-Wl,--as-needed", "-Wl,--no-undefined"] # Enable swaglog include in submodules -cflags += ['-DSWAGLOG="\\"selfdrive/common/swaglog.h\\""'] -cxxflags += ['-DSWAGLOG="\\"selfdrive/common/swaglog.h\\""'] +cflags += ['-DSWAGLOG="\\"common/swaglog.h\\""'] +cxxflags += ['-DSWAGLOG="\\"common/swaglog.h\\""'] env = Environment( ENV=lenv, @@ -212,7 +212,7 @@ env = Environment( "#third_party", "#opendbc/can", "#selfdrive/boardd", - "#selfdrive/common", + "#common", ], CYTHONCFILESUFFIX=".cpp", COMPILATIONDB_USE_ABSPATH=True, @@ -330,7 +330,7 @@ if GetOption("clazy"): Export('env', 'qt_env', 'arch', 'real_arch', 'SHARED', 'USE_WEBCAM') -SConscript(['selfdrive/common/SConscript']) +SConscript(['common/SConscript']) Import('_common', '_gpucommon', '_gpu_libs') if SHARED: @@ -384,7 +384,6 @@ SConscript(['opendbc/can/SConscript']) SConscript(['third_party/SConscript']) -SConscript(['common/SConscript']) SConscript(['common/kalman/SConscript']) SConscript(['common/transformations/SConscript']) diff --git a/common/SConscript b/common/SConscript index a41fc8b7eb..575bdfa65c 100644 --- a/common/SConscript +++ b/common/SConscript @@ -1,4 +1,39 @@ -Import('envCython', 'common') +Import('env', 'envCython', 'arch', 'SHARED') +if SHARED: + fxn = env.SharedLibrary +else: + fxn = env.Library + +common_libs = [ + 'params.cc', + 'statlog.cc', + 'swaglog.cc', + 'util.cc', + 'gpio.cc', + 'i2c.cc', + 'watchdog.cc', +] + +_common = fxn('common', common_libs, LIBS="json11") + +files = [ + 'clutil.cc', + 'visionimg.cc', +] + +if arch == "larch64": + _gpu_libs = ["GLESv2"] +else: + _gpu_libs = ["GL"] + +_gpucommon = fxn('gpucommon', files, LIBS=_gpu_libs) +Export('_common', '_gpucommon', '_gpu_libs') + +if GetOption('test'): + env.Program('tests/test_util', ['tests/test_util.cc'], LIBS=[_common]) + env.Program('tests/test_swaglog', ['tests/test_swaglog.cc'], LIBS=[_common, 'json11', 'zmq', 'pthread']) + +# Cython envCython.Program('clock.so', 'clock.pyx') -envCython.Program('params_pyx.so', 'params_pyx.pyx', LIBS=envCython['LIBS'] + [common, 'zmq']) +envCython.Program('params_pyx.so', 'params_pyx.pyx', LIBS=envCython['LIBS'] + [_common, 'zmq', 'json11']) diff --git a/selfdrive/common/clutil.cc b/common/clutil.cc similarity index 99% rename from selfdrive/common/clutil.cc rename to common/clutil.cc index 4e952a2a88..b8f9fde4cf 100644 --- a/selfdrive/common/clutil.cc +++ b/common/clutil.cc @@ -1,10 +1,10 @@ -#include "selfdrive/common/clutil.h" +#include "common/clutil.h" #include #include #include -#include "selfdrive/common/util.h" +#include "common/util.h" namespace { // helper functions diff --git a/selfdrive/common/clutil.h b/common/clutil.h similarity index 100% rename from selfdrive/common/clutil.h rename to common/clutil.h diff --git a/selfdrive/common/gpio.cc b/common/gpio.cc similarity index 92% rename from selfdrive/common/gpio.cc rename to common/gpio.cc index 033d6da4f7..73ff1b3f52 100644 --- a/selfdrive/common/gpio.cc +++ b/common/gpio.cc @@ -1,11 +1,11 @@ -#include "selfdrive/common/gpio.h" +#include "common/gpio.h" #include #include #include -#include "selfdrive/common/util.h" +#include "common/util.h" // We assume that all pins have already been exported on boot, // and that we have permission to write to them. diff --git a/selfdrive/common/gpio.h b/common/gpio.h similarity index 100% rename from selfdrive/common/gpio.h rename to common/gpio.h diff --git a/selfdrive/common/i2c.cc b/common/i2c.cc similarity index 92% rename from selfdrive/common/i2c.cc rename to common/i2c.cc index 5e6488fabf..eb10cd64bb 100644 --- a/selfdrive/common/i2c.cc +++ b/common/i2c.cc @@ -1,4 +1,4 @@ -#include "selfdrive/common/i2c.h" +#include "common/i2c.h" #include #include @@ -8,9 +8,9 @@ #include #include -#include "selfdrive/common/util.h" -#include "selfdrive/common/swaglog.h" -#include "selfdrive/common/util.h" +#include "common/util.h" +#include "common/swaglog.h" +#include "common/util.h" #define UNUSED(x) (void)(x) diff --git a/selfdrive/common/i2c.h b/common/i2c.h similarity index 100% rename from selfdrive/common/i2c.h rename to common/i2c.h diff --git a/selfdrive/common/mat.h b/common/mat.h similarity index 100% rename from selfdrive/common/mat.h rename to common/mat.h diff --git a/selfdrive/common/modeldata.h b/common/modeldata.h similarity index 98% rename from selfdrive/common/modeldata.h rename to common/modeldata.h index 6b30e60506..4b776ef945 100644 --- a/selfdrive/common/modeldata.h +++ b/common/modeldata.h @@ -1,7 +1,7 @@ #pragma once #include -#include "selfdrive/common/mat.h" +#include "common/mat.h" #include "selfdrive/hardware/hw.h" const int TRAJECTORY_SIZE = 33; diff --git a/selfdrive/common/params.cc b/common/params.cc similarity index 98% rename from selfdrive/common/params.cc rename to common/params.cc index f6d7adfd4e..4b62fc97a4 100644 --- a/selfdrive/common/params.cc +++ b/common/params.cc @@ -1,4 +1,4 @@ -#include "selfdrive/common/params.h" +#include "common/params.h" #include #include @@ -6,8 +6,8 @@ #include #include -#include "selfdrive/common/swaglog.h" -#include "selfdrive/common/util.h" +#include "common/swaglog.h" +#include "common/util.h" #include "selfdrive/hardware/hw.h" namespace { diff --git a/selfdrive/common/params.h b/common/params.h similarity index 100% rename from selfdrive/common/params.h rename to common/params.h diff --git a/common/params_pyx.pyx b/common/params_pyx.pyx index a64ab58e97..b3b8248529 100755 --- a/common/params_pyx.pyx +++ b/common/params_pyx.pyx @@ -4,7 +4,7 @@ from libcpp cimport bool from libcpp.string cimport string import threading -cdef extern from "selfdrive/common/params.h": +cdef extern from "common/params.h": cpdef enum ParamKeyType: PERSISTENT CLEAR_ON_MANAGER_START diff --git a/selfdrive/common/queue.h b/common/queue.h similarity index 100% rename from selfdrive/common/queue.h rename to common/queue.h diff --git a/selfdrive/common/statlog.cc b/common/statlog.cc similarity index 93% rename from selfdrive/common/statlog.cc rename to common/statlog.cc index 54463e9816..26945882d9 100644 --- a/selfdrive/common/statlog.cc +++ b/common/statlog.cc @@ -2,8 +2,8 @@ #define _GNU_SOURCE #endif -#include "selfdrive/common/statlog.h" -#include "selfdrive/common/util.h" +#include "common/statlog.h" +#include "common/util.h" #include #include diff --git a/selfdrive/common/statlog.h b/common/statlog.h similarity index 100% rename from selfdrive/common/statlog.h rename to common/statlog.h diff --git a/selfdrive/common/swaglog.cc b/common/swaglog.cc similarity index 97% rename from selfdrive/common/swaglog.cc rename to common/swaglog.cc index 21115da10f..f0d0f0f508 100644 --- a/selfdrive/common/swaglog.cc +++ b/common/swaglog.cc @@ -2,7 +2,7 @@ #define _GNU_SOURCE #endif -#include "selfdrive/common/swaglog.h" +#include "common/swaglog.h" #include #include @@ -13,8 +13,8 @@ #include #include "json11.hpp" -#include "selfdrive/common/util.h" -#include "selfdrive/common/version.h" +#include "common/util.h" +#include "common/version.h" #include "selfdrive/hardware/hw.h" class SwaglogState : public LogState { diff --git a/selfdrive/common/swaglog.h b/common/swaglog.h similarity index 98% rename from selfdrive/common/swaglog.h rename to common/swaglog.h index edae9fdc34..68b05ed2e9 100644 --- a/selfdrive/common/swaglog.h +++ b/common/swaglog.h @@ -1,6 +1,6 @@ #pragma once -#include "selfdrive/common/timing.h" +#include "common/timing.h" #define CLOUDLOG_DEBUG 10 #define CLOUDLOG_INFO 20 diff --git a/common/tests/.gitignore b/common/tests/.gitignore new file mode 100644 index 0000000000..1350b3b825 --- /dev/null +++ b/common/tests/.gitignore @@ -0,0 +1,2 @@ +test_util +test_swaglog diff --git a/selfdrive/common/tests/test_swaglog.cc b/common/tests/test_swaglog.cc similarity index 95% rename from selfdrive/common/tests/test_swaglog.cc rename to common/tests/test_swaglog.cc index 47c5504638..a95ae45e03 100644 --- a/selfdrive/common/tests/test_swaglog.cc +++ b/common/tests/test_swaglog.cc @@ -4,9 +4,9 @@ #include "catch2/catch.hpp" #include "json11.hpp" -#include "selfdrive/common/swaglog.h" -#include "selfdrive/common/util.h" -#include "selfdrive/common/version.h" +#include "common/swaglog.h" +#include "common/util.h" +#include "common/version.h" #include "selfdrive/hardware/hw.h" const char *SWAGLOG_ADDR = "ipc:///tmp/logmessage"; diff --git a/selfdrive/common/tests/test_util.cc b/common/tests/test_util.cc similarity index 99% rename from selfdrive/common/tests/test_util.cc rename to common/tests/test_util.cc index 06317accd0..62e73275d4 100644 --- a/selfdrive/common/tests/test_util.cc +++ b/common/tests/test_util.cc @@ -10,7 +10,7 @@ #define CATCH_CONFIG_MAIN #include "catch2/catch.hpp" -#include "selfdrive/common/util.h" +#include "common/util.h" std::string random_bytes(int size) { std::random_device rd; diff --git a/selfdrive/common/timing.h b/common/timing.h similarity index 100% rename from selfdrive/common/timing.h rename to common/timing.h diff --git a/selfdrive/common/util.cc b/common/util.cc similarity index 99% rename from selfdrive/common/util.cc rename to common/util.cc index 534a7f4456..92add63997 100644 --- a/selfdrive/common/util.cc +++ b/common/util.cc @@ -1,4 +1,4 @@ -#include "selfdrive/common/util.h" +#include "common/util.h" #include #include diff --git a/selfdrive/common/util.h b/common/util.h similarity index 100% rename from selfdrive/common/util.h rename to common/util.h diff --git a/selfdrive/common/version.h b/common/version.h similarity index 100% rename from selfdrive/common/version.h rename to common/version.h diff --git a/selfdrive/common/visionimg.cc b/common/visionimg.cc similarity index 90% rename from selfdrive/common/visionimg.cc rename to common/visionimg.cc index b67f0e202d..1009767e0d 100644 --- a/selfdrive/common/visionimg.cc +++ b/common/visionimg.cc @@ -1,4 +1,4 @@ -#include "selfdrive/common/visionimg.h" +#include "common/visionimg.h" #include diff --git a/selfdrive/common/visionimg.h b/common/visionimg.h similarity index 100% rename from selfdrive/common/visionimg.h rename to common/visionimg.h diff --git a/selfdrive/common/watchdog.cc b/common/watchdog.cc similarity index 71% rename from selfdrive/common/watchdog.cc rename to common/watchdog.cc index c937103a5d..5a10207828 100644 --- a/selfdrive/common/watchdog.cc +++ b/common/watchdog.cc @@ -1,6 +1,6 @@ -#include "selfdrive/common/watchdog.h" -#include "selfdrive/common/timing.h" -#include "selfdrive/common/util.h" +#include "common/watchdog.h" +#include "common/timing.h" +#include "common/util.h" const std::string watchdog_fn_prefix = "/dev/shm/wd_"; // + diff --git a/selfdrive/common/watchdog.h b/common/watchdog.h similarity index 100% rename from selfdrive/common/watchdog.h rename to common/watchdog.h diff --git a/docs/c_docs.rst b/docs/c_docs.rst index 6cf5f268c5..db7100ab27 100644 --- a/docs/c_docs.rst +++ b/docs/c_docs.rst @@ -86,7 +86,7 @@ modeld common ^^^^^^ .. autodoxygenindex:: - :project: selfdrive_common + :project: common sensorsd ^^^^^^^^ diff --git a/release/build_devel.sh b/release/build_devel.sh index d2411da697..9d8b06451b 100755 --- a/release/build_devel.sh +++ b/release/build_devel.sh @@ -58,7 +58,7 @@ rm -f panda/board/obj/panda.bin.signed # include source commit hash and build date in commit GIT_HASH=$(git --git-dir=$SOURCE_DIR/.git rev-parse HEAD) DATETIME=$(date '+%Y-%m-%dT%H:%M:%S') -VERSION=$(cat $SOURCE_DIR/selfdrive/common/version.h | awk -F\" '{print $2}') +VERSION=$(cat $SOURCE_DIR/common/version.h | awk -F\" '{print $2}') echo "[-] committing version $VERSION T=$SECONDS" git add -f . diff --git a/release/build_release.sh b/release/build_release.sh index f16bc14170..b5e15e05c6 100755 --- a/release/build_release.sh +++ b/release/build_release.sh @@ -41,8 +41,8 @@ cd $BUILD_DIR rm -f panda/board/obj/panda.bin.signed -VERSION=$(cat selfdrive/common/version.h | awk -F[\"-] '{print $2}') -echo "#define COMMA_VERSION \"$VERSION-release\"" > selfdrive/common/version.h +VERSION=$(cat common/version.h | awk -F[\"-] '{print $2}') +echo "#define COMMA_VERSION \"$VERSION-release\"" > common/version.h echo "[-] committing version $VERSION T=$SECONDS" git add -f . diff --git a/release/files_common b/release/files_common index 72902cb94c..b9f5c5746d 100644 --- a/release/files_common +++ b/release/files_common @@ -125,34 +125,34 @@ selfdrive/clocksd/clocksd.cc selfdrive/debug/*.py -selfdrive/common/SConscript -selfdrive/common/version.h - -selfdrive/common/swaglog.h -selfdrive/common/swaglog.cc -selfdrive/common/statlog.h -selfdrive/common/statlog.cc -selfdrive/common/util.cc -selfdrive/common/util.h -selfdrive/common/queue.h -selfdrive/common/clutil.cc -selfdrive/common/clutil.h -selfdrive/common/params.h -selfdrive/common/params.cc -selfdrive/common/watchdog.cc -selfdrive/common/watchdog.h - -selfdrive/common/modeldata.h -selfdrive/common/mat.h -selfdrive/common/timing.h - -selfdrive/common/visionimg.cc -selfdrive/common/visionimg.h - -selfdrive/common/gpio.cc -selfdrive/common/gpio.h -selfdrive/common/i2c.cc -selfdrive/common/i2c.h +common/SConscript +common/version.h + +common/swaglog.h +common/swaglog.cc +common/statlog.h +common/statlog.cc +common/util.cc +common/util.h +common/queue.h +common/clutil.cc +common/clutil.h +common/params.h +common/params.cc +common/watchdog.cc +common/watchdog.h + +common/modeldata.h +common/mat.h +common/timing.h + +common/visionimg.cc +common/visionimg.h + +common/gpio.cc +common/gpio.h +common/i2c.cc +common/i2c.h selfdrive/controls/__init__.py diff --git a/scripts/waste.c b/scripts/waste.c index 62233b7fc4..2e492916a7 100644 --- a/scripts/waste.c +++ b/scripts/waste.c @@ -11,7 +11,7 @@ #include #include #include -#include "../selfdrive/common/timing.h" +#include "../common/timing.h" int get_nprocs(void); double *ttime, *oout; diff --git a/selfdrive/boardd/boardd.cc b/selfdrive/boardd/boardd.cc index 1154318428..2622f7eba1 100644 --- a/selfdrive/boardd/boardd.cc +++ b/selfdrive/boardd/boardd.cc @@ -23,10 +23,10 @@ #include "cereal/gen/cpp/car.capnp.h" #include "cereal/messaging/messaging.h" -#include "selfdrive/common/params.h" -#include "selfdrive/common/swaglog.h" -#include "selfdrive/common/timing.h" -#include "selfdrive/common/util.h" +#include "common/params.h" +#include "common/swaglog.h" +#include "common/timing.h" +#include "common/util.h" #include "selfdrive/hardware/hw.h" #include "selfdrive/boardd/pigeon.h" diff --git a/selfdrive/boardd/main.cc b/selfdrive/boardd/main.cc index d802e42f86..b151832b72 100644 --- a/selfdrive/boardd/main.cc +++ b/selfdrive/boardd/main.cc @@ -1,8 +1,8 @@ #include #include "selfdrive/boardd/boardd.h" -#include "selfdrive/common/swaglog.h" -#include "selfdrive/common/util.h" +#include "common/swaglog.h" +#include "common/util.h" #include "selfdrive/hardware/hw.h" int main(int argc, char *argv[]) { diff --git a/selfdrive/boardd/panda.cc b/selfdrive/boardd/panda.cc index 536cbd5b7e..d90c4cdab2 100644 --- a/selfdrive/boardd/panda.cc +++ b/selfdrive/boardd/panda.cc @@ -8,9 +8,9 @@ #include "cereal/messaging/messaging.h" #include "panda/board/dlc_to_len.h" -#include "selfdrive/common/gpio.h" -#include "selfdrive/common/swaglog.h" -#include "selfdrive/common/util.h" +#include "common/gpio.h" +#include "common/swaglog.h" +#include "common/util.h" static int init_usb_ctx(libusb_context **context) { assert(context != nullptr); diff --git a/selfdrive/boardd/pigeon.cc b/selfdrive/boardd/pigeon.cc index 912f4b03e7..d23ff90d3d 100644 --- a/selfdrive/boardd/pigeon.cc +++ b/selfdrive/boardd/pigeon.cc @@ -8,9 +8,9 @@ #include #include -#include "selfdrive/common/gpio.h" -#include "selfdrive/common/swaglog.h" -#include "selfdrive/common/util.h" +#include "common/gpio.h" +#include "common/swaglog.h" +#include "common/util.h" #include "selfdrive/locationd/ublox_msg.h" // Termios on macos doesn't define all baud rate constants diff --git a/selfdrive/boardd/tests/test_boardd b/selfdrive/boardd/tests/test_boardd index 105bd5a96c..7edc3ae541 100755 --- a/selfdrive/boardd/tests/test_boardd +++ b/selfdrive/boardd/tests/test_boardd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b5c0b301b3fc7c0f4718409ed68033eb870f127489e9d834aa9dbd23ed7eb91b -size 13919544 +oid sha256:94b727526c3de262610943263cafe99a32658ffbade853854a699c991c3337b7 +size 13919474 diff --git a/selfdrive/camerad/cameras/camera_common.cc b/selfdrive/camerad/cameras/camera_common.cc index bba65f170e..e2ec10bcb0 100644 --- a/selfdrive/camerad/cameras/camera_common.cc +++ b/selfdrive/camerad/cameras/camera_common.cc @@ -11,10 +11,10 @@ #include #include "selfdrive/camerad/imgproc/utils.h" -#include "selfdrive/common/clutil.h" -#include "selfdrive/common/modeldata.h" -#include "selfdrive/common/swaglog.h" -#include "selfdrive/common/util.h" +#include "common/clutil.h" +#include "common/modeldata.h" +#include "common/swaglog.h" +#include "common/util.h" #include "selfdrive/hardware/hw.h" #if QCOM2 diff --git a/selfdrive/camerad/cameras/camera_common.h b/selfdrive/camerad/cameras/camera_common.h index 8c836e0bb8..85c55f4b03 100644 --- a/selfdrive/camerad/cameras/camera_common.h +++ b/selfdrive/camerad/cameras/camera_common.h @@ -10,10 +10,10 @@ #include "cereal/visionipc/visionipc.h" #include "cereal/visionipc/visionipc_server.h" #include "selfdrive/camerad/transforms/rgb_to_yuv.h" -#include "selfdrive/common/mat.h" -#include "selfdrive/common/queue.h" -#include "selfdrive/common/swaglog.h" -#include "selfdrive/common/visionimg.h" +#include "common/mat.h" +#include "common/queue.h" +#include "common/swaglog.h" +#include "common/visionimg.h" #include "selfdrive/hardware/hw.h" #define CAMERA_ID_IMX298 0 diff --git a/selfdrive/camerad/cameras/camera_qcom2.cc b/selfdrive/camerad/cameras/camera_qcom2.cc index 45f414cc7e..597085dd28 100644 --- a/selfdrive/camerad/cameras/camera_qcom2.cc +++ b/selfdrive/camerad/cameras/camera_qcom2.cc @@ -19,7 +19,7 @@ #include "media/cam_sensor.h" #include "media/cam_sensor_cmn_header.h" #include "media/cam_sync.h" -#include "selfdrive/common/swaglog.h" +#include "common/swaglog.h" #include "selfdrive/camerad/cameras/sensor2_i2c.h" // For debugging: diff --git a/selfdrive/camerad/cameras/camera_qcom2.h b/selfdrive/camerad/cameras/camera_qcom2.h index e0553f000e..d869620e9a 100644 --- a/selfdrive/camerad/cameras/camera_qcom2.h +++ b/selfdrive/camerad/cameras/camera_qcom2.h @@ -7,7 +7,7 @@ #include #include "selfdrive/camerad/cameras/camera_common.h" -#include "selfdrive/common/util.h" +#include "common/util.h" #define FRAME_BUF_COUNT 4 diff --git a/selfdrive/camerad/cameras/camera_replay.cc b/selfdrive/camerad/cameras/camera_replay.cc index 56bda697c9..e18d6a487e 100644 --- a/selfdrive/camerad/cameras/camera_replay.cc +++ b/selfdrive/camerad/cameras/camera_replay.cc @@ -3,8 +3,8 @@ #include #include -#include "selfdrive/common/clutil.h" -#include "selfdrive/common/util.h" +#include "common/clutil.h" +#include "common/util.h" extern ExitHandler do_exit; diff --git a/selfdrive/camerad/cameras/camera_webcam.cc b/selfdrive/camerad/cameras/camera_webcam.cc index 6001f9fd3b..b0906ce887 100644 --- a/selfdrive/camerad/cameras/camera_webcam.cc +++ b/selfdrive/camerad/cameras/camera_webcam.cc @@ -13,10 +13,10 @@ #include #pragma clang diagnostic pop -#include "selfdrive/common/clutil.h" -#include "selfdrive/common/swaglog.h" -#include "selfdrive/common/timing.h" -#include "selfdrive/common/util.h" +#include "common/clutil.h" +#include "common/swaglog.h" +#include "common/timing.h" +#include "common/util.h" // id of the video capturing device const int ROAD_CAMERA_ID = util::getenv("ROADCAM_ID", 1); diff --git a/selfdrive/camerad/imgproc/utils.h b/selfdrive/camerad/imgproc/utils.h index b735975b3e..94323b15c5 100644 --- a/selfdrive/camerad/imgproc/utils.h +++ b/selfdrive/camerad/imgproc/utils.h @@ -4,7 +4,7 @@ #include #include -#include "selfdrive/common/clutil.h" +#include "common/clutil.h" #define NUM_SEGMENTS_X 8 #define NUM_SEGMENTS_Y 6 diff --git a/selfdrive/camerad/main.cc b/selfdrive/camerad/main.cc index 58edaedd9b..f59e03f8fa 100644 --- a/selfdrive/camerad/main.cc +++ b/selfdrive/camerad/main.cc @@ -2,8 +2,8 @@ #include -#include "selfdrive/common/params.h" -#include "selfdrive/common/util.h" +#include "common/params.h" +#include "common/util.h" #include "selfdrive/hardware/hw.h" int main(int argc, char *argv[]) { diff --git a/selfdrive/camerad/test/ae_gray_test.cc b/selfdrive/camerad/test/ae_gray_test.cc index 358d93d759..b7759d8e1a 100644 --- a/selfdrive/camerad/test/ae_gray_test.cc +++ b/selfdrive/camerad/test/ae_gray_test.cc @@ -7,7 +7,7 @@ #include #include -#include "selfdrive/common/util.h" +#include "common/util.h" #include "selfdrive/camerad/cameras/camera_common.h" // needed by camera_common.cc diff --git a/selfdrive/camerad/transforms/rgb_to_yuv.h b/selfdrive/camerad/transforms/rgb_to_yuv.h index 3bb50669ef..e1de180d40 100644 --- a/selfdrive/camerad/transforms/rgb_to_yuv.h +++ b/selfdrive/camerad/transforms/rgb_to_yuv.h @@ -1,6 +1,6 @@ #pragma once -#include "selfdrive/common/clutil.h" +#include "common/clutil.h" class Rgb2Yuv { public: diff --git a/selfdrive/camerad/transforms/rgb_to_yuv_test.cc b/selfdrive/camerad/transforms/rgb_to_yuv_test.cc index 74db2bc1c2..c960d168de 100644 --- a/selfdrive/camerad/transforms/rgb_to_yuv_test.cc +++ b/selfdrive/camerad/transforms/rgb_to_yuv_test.cc @@ -31,7 +31,7 @@ #include "libyuv.h" #include "selfdrive/camerad/transforms/rgb_to_yuv.h" -#include "selfdrive/common/clutil.h" +#include "common/clutil.h" static inline double millis_since_boot() { struct timespec t; diff --git a/selfdrive/clocksd/clocksd.cc b/selfdrive/clocksd/clocksd.cc index a6a92fc058..a5912cf51a 100644 --- a/selfdrive/clocksd/clocksd.cc +++ b/selfdrive/clocksd/clocksd.cc @@ -16,8 +16,8 @@ #include #include "cereal/messaging/messaging.h" -#include "selfdrive/common/timing.h" -#include "selfdrive/common/util.h" +#include "common/timing.h" +#include "common/util.h" ExitHandler do_exit; diff --git a/selfdrive/common/SConscript b/selfdrive/common/SConscript deleted file mode 100644 index e53cb7615d..0000000000 --- a/selfdrive/common/SConscript +++ /dev/null @@ -1,35 +0,0 @@ -Import('env', 'arch', 'SHARED') - -if SHARED: - fxn = env.SharedLibrary -else: - fxn = env.Library - -common_libs = [ - 'params.cc', - 'statlog.cc', - 'swaglog.cc', - 'util.cc', - 'gpio.cc', - 'i2c.cc', - 'watchdog.cc', -] - -_common = fxn('common', common_libs, LIBS="json11") - -files = [ - 'clutil.cc', - 'visionimg.cc', -] - -if arch == "larch64": - _gpu_libs = ["GLESv2"] -else: - _gpu_libs = ["GL"] - -_gpucommon = fxn('gpucommon', files, LIBS=_gpu_libs) -Export('_common', '_gpucommon', '_gpu_libs') - -if GetOption('test'): - env.Program('tests/test_util', ['tests/test_util.cc'], LIBS=[_common]) - env.Program('tests/test_swaglog', ['tests/test_swaglog.cc'], LIBS=[_common, 'json11', 'zmq', 'pthread']) diff --git a/selfdrive/hardware/hw.h b/selfdrive/hardware/hw.h index b221b63db2..5f178ec0f9 100644 --- a/selfdrive/hardware/hw.h +++ b/selfdrive/hardware/hw.h @@ -1,7 +1,7 @@ #pragma once #include "selfdrive/hardware/base.h" -#include "selfdrive/common/util.h" +#include "common/util.h" #if QCOM2 #include "selfdrive/hardware/tici/hardware.h" diff --git a/selfdrive/hardware/tici/hardware.h b/selfdrive/hardware/tici/hardware.h index c37dbb0a36..ec53e9ae8f 100644 --- a/selfdrive/hardware/tici/hardware.h +++ b/selfdrive/hardware/tici/hardware.h @@ -3,8 +3,8 @@ #include #include -#include "selfdrive/common/params.h" -#include "selfdrive/common/util.h" +#include "common/params.h" +#include "common/util.h" #include "selfdrive/hardware/base.h" class HardwareTici : public HardwareNone { diff --git a/selfdrive/locationd/locationd.h b/selfdrive/locationd/locationd.h index 2ab3ba56ad..7c0cb6b7fe 100755 --- a/selfdrive/locationd/locationd.h +++ b/selfdrive/locationd/locationd.h @@ -8,10 +8,10 @@ #include "cereal/messaging/messaging.h" #include "common/transformations/coordinates.hpp" #include "common/transformations/orientation.hpp" -#include "selfdrive/common/params.h" -#include "selfdrive/common/swaglog.h" -#include "selfdrive/common/timing.h" -#include "selfdrive/common/util.h" +#include "common/params.h" +#include "common/swaglog.h" +#include "common/timing.h" +#include "common/util.h" #include "selfdrive/sensord/sensors/constants.h" #define VISION_DECIMATION 2 diff --git a/selfdrive/locationd/ublox_msg.cc b/selfdrive/locationd/ublox_msg.cc index 9e32c7b070..c9833410e7 100644 --- a/selfdrive/locationd/ublox_msg.cc +++ b/selfdrive/locationd/ublox_msg.cc @@ -10,7 +10,7 @@ #include #include -#include "selfdrive/common/swaglog.h" +#include "common/swaglog.h" const double gpsPi = 3.1415926535898; #define UBLOX_MSG_SIZE(hdr) (*(uint16_t *)&hdr[4]) diff --git a/selfdrive/locationd/ublox_msg.h b/selfdrive/locationd/ublox_msg.h index da1c180c0b..542e72816b 100644 --- a/selfdrive/locationd/ublox_msg.h +++ b/selfdrive/locationd/ublox_msg.h @@ -8,7 +8,7 @@ #include #include "cereal/messaging/messaging.h" -#include "selfdrive/common/util.h" +#include "common/util.h" #include "selfdrive/locationd/generated/gps.h" #include "selfdrive/locationd/generated/ubx.h" diff --git a/selfdrive/locationd/ubloxd.cc b/selfdrive/locationd/ubloxd.cc index ae07284c8e..d9b3e7647d 100644 --- a/selfdrive/locationd/ubloxd.cc +++ b/selfdrive/locationd/ubloxd.cc @@ -3,8 +3,8 @@ #include #include "cereal/messaging/messaging.h" -#include "selfdrive/common/swaglog.h" -#include "selfdrive/common/util.h" +#include "common/swaglog.h" +#include "common/util.h" #include "selfdrive/locationd/ublox_msg.h" ExitHandler do_exit; diff --git a/selfdrive/logcatd/logcatd_systemd.cc b/selfdrive/logcatd/logcatd_systemd.cc index dabb11adcb..70467a9c15 100644 --- a/selfdrive/logcatd/logcatd_systemd.cc +++ b/selfdrive/logcatd/logcatd_systemd.cc @@ -8,8 +8,8 @@ #include "json11.hpp" #include "cereal/messaging/messaging.h" -#include "selfdrive/common/timing.h" -#include "selfdrive/common/util.h" +#include "common/timing.h" +#include "common/util.h" ExitHandler do_exit; int main(int argc, char *argv[]) { diff --git a/selfdrive/loggerd/bootlog.cc b/selfdrive/loggerd/bootlog.cc index e8fc955263..eee6b86720 100644 --- a/selfdrive/loggerd/bootlog.cc +++ b/selfdrive/loggerd/bootlog.cc @@ -2,7 +2,7 @@ #include #include "cereal/messaging/messaging.h" -#include "selfdrive/common/swaglog.h" +#include "common/swaglog.h" #include "selfdrive/loggerd/logger.h" diff --git a/selfdrive/loggerd/encoder/encoder.h b/selfdrive/loggerd/encoder/encoder.h index 94c9c551d9..9792d61c46 100644 --- a/selfdrive/loggerd/encoder/encoder.h +++ b/selfdrive/loggerd/encoder/encoder.h @@ -6,7 +6,7 @@ #include "cereal/messaging/messaging.h" #include "cereal/visionipc/visionipc.h" -#include "selfdrive/common/queue.h" +#include "common/queue.h" #include "selfdrive/loggerd/video_writer.h" #include "selfdrive/camerad/cameras/camera_common.h" diff --git a/selfdrive/loggerd/encoder/ffmpeg_encoder.cc b/selfdrive/loggerd/encoder/ffmpeg_encoder.cc index 7011f43a23..a2b14ef3fd 100644 --- a/selfdrive/loggerd/encoder/ffmpeg_encoder.cc +++ b/selfdrive/loggerd/encoder/ffmpeg_encoder.cc @@ -19,8 +19,8 @@ extern "C" { #include } -#include "selfdrive/common/swaglog.h" -#include "selfdrive/common/util.h" +#include "common/swaglog.h" +#include "common/util.h" const int env_debug_encoder = (getenv("DEBUG_ENCODER") != NULL) ? atoi(getenv("DEBUG_ENCODER")) : 0; diff --git a/selfdrive/loggerd/encoder/v4l_encoder.cc b/selfdrive/loggerd/encoder/v4l_encoder.cc index 9ed1f80453..5fb9cc8de7 100644 --- a/selfdrive/loggerd/encoder/v4l_encoder.cc +++ b/selfdrive/loggerd/encoder/v4l_encoder.cc @@ -3,8 +3,8 @@ #include #include "selfdrive/loggerd/encoder/v4l_encoder.h" -#include "selfdrive/common/util.h" -#include "selfdrive/common/timing.h" +#include "common/util.h" +#include "common/timing.h" #include "libyuv.h" #include "msm_media_info.h" diff --git a/selfdrive/loggerd/encoder/v4l_encoder.h b/selfdrive/loggerd/encoder/v4l_encoder.h index 2f62e334fc..9f267cfb03 100644 --- a/selfdrive/loggerd/encoder/v4l_encoder.h +++ b/selfdrive/loggerd/encoder/v4l_encoder.h @@ -1,6 +1,6 @@ #pragma once -#include "selfdrive/common/queue.h" +#include "common/queue.h" #include "selfdrive/loggerd/encoder/encoder.h" #define BUF_IN_COUNT 7 diff --git a/selfdrive/loggerd/logger.cc b/selfdrive/loggerd/logger.cc index f8af20a406..d8a409e93e 100644 --- a/selfdrive/loggerd/logger.cc +++ b/selfdrive/loggerd/logger.cc @@ -15,9 +15,9 @@ #include #include -#include "selfdrive/common/params.h" -#include "selfdrive/common/swaglog.h" -#include "selfdrive/common/version.h" +#include "common/params.h" +#include "common/swaglog.h" +#include "common/version.h" // ***** logging helpers ***** diff --git a/selfdrive/loggerd/logger.h b/selfdrive/loggerd/logger.h index 288b884dd2..ca08e64717 100644 --- a/selfdrive/loggerd/logger.h +++ b/selfdrive/loggerd/logger.h @@ -11,8 +11,8 @@ #include #include "cereal/messaging/messaging.h" -#include "selfdrive/common/util.h" -#include "selfdrive/common/swaglog.h" +#include "common/util.h" +#include "common/swaglog.h" #include "selfdrive/hardware/hw.h" const std::string LOG_ROOT = Path::log_root(); diff --git a/selfdrive/loggerd/loggerd.h b/selfdrive/loggerd/loggerd.h index 98e3deee00..21aa66ea12 100644 --- a/selfdrive/loggerd/loggerd.h +++ b/selfdrive/loggerd/loggerd.h @@ -16,10 +16,10 @@ #include "cereal/visionipc/visionipc.h" #include "cereal/visionipc/visionipc_client.h" #include "selfdrive/camerad/cameras/camera_common.h" -#include "selfdrive/common/params.h" -#include "selfdrive/common/swaglog.h" -#include "selfdrive/common/timing.h" -#include "selfdrive/common/util.h" +#include "common/params.h" +#include "common/swaglog.h" +#include "common/timing.h" +#include "common/util.h" #include "selfdrive/hardware/hw.h" #include "selfdrive/loggerd/encoder/encoder.h" diff --git a/selfdrive/loggerd/tests/test_logger.cc b/selfdrive/loggerd/tests/test_logger.cc index 2513e507a0..11a50fa2e7 100644 --- a/selfdrive/loggerd/tests/test_logger.cc +++ b/selfdrive/loggerd/tests/test_logger.cc @@ -7,7 +7,7 @@ #include "catch2/catch.hpp" #include "cereal/messaging/messaging.h" -#include "selfdrive/common/util.h" +#include "common/util.h" #include "selfdrive/loggerd/logger.h" #include "selfdrive/ui/replay/util.h" diff --git a/selfdrive/loggerd/video_writer.cc b/selfdrive/loggerd/video_writer.cc index 24ea98eb30..a4f0734fc9 100644 --- a/selfdrive/loggerd/video_writer.cc +++ b/selfdrive/loggerd/video_writer.cc @@ -2,8 +2,8 @@ #include #include "selfdrive/loggerd/video_writer.h" -#include "selfdrive/common/swaglog.h" -#include "selfdrive/common/util.h" +#include "common/swaglog.h" +#include "common/util.h" VideoWriter::VideoWriter(const char *path, const char *filename, bool remuxing, int width, int height, int fps, cereal::EncodeIndex::Type codec) : remuxing(remuxing) { diff --git a/selfdrive/modeld/dmonitoringmodeld.cc b/selfdrive/modeld/dmonitoringmodeld.cc index 8016180f40..61f3343c8d 100644 --- a/selfdrive/modeld/dmonitoringmodeld.cc +++ b/selfdrive/modeld/dmonitoringmodeld.cc @@ -5,8 +5,8 @@ #include #include "cereal/visionipc/visionipc_client.h" -#include "selfdrive/common/swaglog.h" -#include "selfdrive/common/util.h" +#include "common/swaglog.h" +#include "common/util.h" #include "selfdrive/modeld/models/dmonitoring.h" ExitHandler do_exit; diff --git a/selfdrive/modeld/modeld.cc b/selfdrive/modeld/modeld.cc index 6ee07b3d02..03d0ec4325 100644 --- a/selfdrive/modeld/modeld.cc +++ b/selfdrive/modeld/modeld.cc @@ -7,10 +7,10 @@ #include "cereal/messaging/messaging.h" #include "cereal/visionipc/visionipc_client.h" -#include "selfdrive/common/clutil.h" -#include "selfdrive/common/params.h" -#include "selfdrive/common/swaglog.h" -#include "selfdrive/common/util.h" +#include "common/clutil.h" +#include "common/params.h" +#include "common/swaglog.h" +#include "common/util.h" #include "selfdrive/hardware/hw.h" #include "selfdrive/modeld/models/driving.h" diff --git a/selfdrive/modeld/models/commonmodel.cc b/selfdrive/modeld/models/commonmodel.cc index a075c08deb..bc013395df 100644 --- a/selfdrive/modeld/models/commonmodel.cc +++ b/selfdrive/modeld/models/commonmodel.cc @@ -5,9 +5,9 @@ #include #include -#include "selfdrive/common/clutil.h" -#include "selfdrive/common/mat.h" -#include "selfdrive/common/timing.h" +#include "common/clutil.h" +#include "common/mat.h" +#include "common/timing.h" ModelFrame::ModelFrame(cl_device_id device_id, cl_context context) { input_frames = std::make_unique(buf_size); diff --git a/selfdrive/modeld/models/commonmodel.h b/selfdrive/modeld/models/commonmodel.h index 182e8978b7..059a85e7dd 100644 --- a/selfdrive/modeld/models/commonmodel.h +++ b/selfdrive/modeld/models/commonmodel.h @@ -12,7 +12,7 @@ #include #endif -#include "selfdrive/common/mat.h" +#include "common/mat.h" #include "selfdrive/modeld/transforms/loadyuv.h" #include "selfdrive/modeld/transforms/transform.h" diff --git a/selfdrive/modeld/models/dmonitoring.cc b/selfdrive/modeld/models/dmonitoring.cc index 63c06b1550..4792806c8b 100644 --- a/selfdrive/modeld/models/dmonitoring.cc +++ b/selfdrive/modeld/models/dmonitoring.cc @@ -2,10 +2,10 @@ #include "libyuv.h" -#include "selfdrive/common/mat.h" -#include "selfdrive/common/modeldata.h" -#include "selfdrive/common/params.h" -#include "selfdrive/common/timing.h" +#include "common/mat.h" +#include "common/modeldata.h" +#include "common/params.h" +#include "common/timing.h" #include "selfdrive/hardware/hw.h" #include "selfdrive/modeld/models/dmonitoring.h" diff --git a/selfdrive/modeld/models/dmonitoring.h b/selfdrive/modeld/models/dmonitoring.h index b233056862..db4e2ef72a 100644 --- a/selfdrive/modeld/models/dmonitoring.h +++ b/selfdrive/modeld/models/dmonitoring.h @@ -3,7 +3,7 @@ #include #include "cereal/messaging/messaging.h" -#include "selfdrive/common/util.h" +#include "common/util.h" #include "selfdrive/modeld/models/commonmodel.h" #include "selfdrive/modeld/runners/run.h" diff --git a/selfdrive/modeld/models/driving.cc b/selfdrive/modeld/models/driving.cc index e0421e8cca..b601c4898b 100644 --- a/selfdrive/modeld/models/driving.cc +++ b/selfdrive/modeld/models/driving.cc @@ -8,10 +8,10 @@ #include -#include "selfdrive/common/clutil.h" -#include "selfdrive/common/params.h" -#include "selfdrive/common/timing.h" -#include "selfdrive/common/swaglog.h" +#include "common/clutil.h" +#include "common/params.h" +#include "common/timing.h" +#include "common/swaglog.h" constexpr float FCW_THRESHOLD_5MS2_HIGH = 0.15; constexpr float FCW_THRESHOLD_5MS2_LOW = 0.05; diff --git a/selfdrive/modeld/models/driving.h b/selfdrive/modeld/models/driving.h index 47dec0d9d7..97e65fbc0e 100644 --- a/selfdrive/modeld/models/driving.h +++ b/selfdrive/modeld/models/driving.h @@ -10,9 +10,9 @@ #include "cereal/messaging/messaging.h" #include "cereal/visionipc/visionipc_client.h" -#include "selfdrive/common/mat.h" -#include "selfdrive/common/modeldata.h" -#include "selfdrive/common/util.h" +#include "common/mat.h" +#include "common/modeldata.h" +#include "common/util.h" #include "selfdrive/modeld/models/commonmodel.h" #include "selfdrive/modeld/runners/run.h" diff --git a/selfdrive/modeld/runners/onnxmodel.cc b/selfdrive/modeld/runners/onnxmodel.cc index 9ba08570e3..9b4d6fd015 100644 --- a/selfdrive/modeld/runners/onnxmodel.cc +++ b/selfdrive/modeld/runners/onnxmodel.cc @@ -11,8 +11,8 @@ #include #include -#include "selfdrive/common/swaglog.h" -#include "selfdrive/common/util.h" +#include "common/swaglog.h" +#include "common/util.h" ONNXModel::ONNXModel(const char *path, float *_output, size_t _output_size, int runtime, bool _use_extra) { LOGD("loading model %s", path); diff --git a/selfdrive/modeld/runners/snpemodel.cc b/selfdrive/modeld/runners/snpemodel.cc index d8ed708fa8..1861494d59 100644 --- a/selfdrive/modeld/runners/snpemodel.cc +++ b/selfdrive/modeld/runners/snpemodel.cc @@ -6,8 +6,8 @@ #include #include -#include "selfdrive/common/util.h" -#include "selfdrive/common/timing.h" +#include "common/util.h" +#include "common/timing.h" void PrintErrorStringAndExit() { std::cerr << zdl::DlSystem::getLastErrorString() << std::endl; diff --git a/selfdrive/modeld/thneed/optimizer.cc b/selfdrive/modeld/thneed/optimizer.cc index b516b5fa50..03d20ff386 100644 --- a/selfdrive/modeld/thneed/optimizer.cc +++ b/selfdrive/modeld/thneed/optimizer.cc @@ -4,8 +4,8 @@ #include #include "thneed.h" -#include "selfdrive/common/util.h" -#include "selfdrive/common/clutil.h" +#include "common/util.h" +#include "common/clutil.h" extern map g_program_source; diff --git a/selfdrive/modeld/thneed/serialize.cc b/selfdrive/modeld/thneed/serialize.cc index 89b761b9d2..136576fe1c 100644 --- a/selfdrive/modeld/thneed/serialize.cc +++ b/selfdrive/modeld/thneed/serialize.cc @@ -2,8 +2,8 @@ #include #include "json11.hpp" -#include "selfdrive/common/util.h" -#include "selfdrive/common/clutil.h" +#include "common/util.h" +#include "common/clutil.h" #include "selfdrive/modeld/thneed/thneed.h" using namespace json11; diff --git a/selfdrive/modeld/thneed/thneed.cc b/selfdrive/modeld/thneed/thneed.cc index 90b1200a1a..d673c4f56f 100644 --- a/selfdrive/modeld/thneed/thneed.cc +++ b/selfdrive/modeld/thneed/thneed.cc @@ -9,8 +9,8 @@ #include #include -#include "selfdrive/common/clutil.h" -#include "selfdrive/common/timing.h" +#include "common/clutil.h" +#include "common/timing.h" Thneed *g_thneed = NULL; int g_fd = -1; diff --git a/selfdrive/modeld/transforms/loadyuv.h b/selfdrive/modeld/transforms/loadyuv.h index a3161b2935..7d27ef5d46 100644 --- a/selfdrive/modeld/transforms/loadyuv.h +++ b/selfdrive/modeld/transforms/loadyuv.h @@ -1,6 +1,6 @@ #pragma once -#include "selfdrive/common/clutil.h" +#include "common/clutil.h" typedef struct { int width, height; diff --git a/selfdrive/modeld/transforms/transform.cc b/selfdrive/modeld/transforms/transform.cc index 5f4929bab3..8929f56a9e 100644 --- a/selfdrive/modeld/transforms/transform.cc +++ b/selfdrive/modeld/transforms/transform.cc @@ -3,7 +3,7 @@ #include #include -#include "selfdrive/common/clutil.h" +#include "common/clutil.h" void transform_init(Transform* s, cl_context ctx, cl_device_id device_id) { memset(s, 0, sizeof(*s)); diff --git a/selfdrive/modeld/transforms/transform.h b/selfdrive/modeld/transforms/transform.h index f34613684c..a1629a517e 100644 --- a/selfdrive/modeld/transforms/transform.h +++ b/selfdrive/modeld/transforms/transform.h @@ -7,7 +7,7 @@ #include #endif -#include "selfdrive/common/mat.h" +#include "common/mat.h" typedef struct { cl_kernel krnl; diff --git a/selfdrive/proclogd/main.cc b/selfdrive/proclogd/main.cc index 4e31597c2b..288238dc9a 100644 --- a/selfdrive/proclogd/main.cc +++ b/selfdrive/proclogd/main.cc @@ -1,7 +1,7 @@ #include -#include "selfdrive/common/util.h" +#include "common/util.h" #include "selfdrive/proclogd/proclog.h" ExitHandler do_exit; diff --git a/selfdrive/proclogd/proclog.cc b/selfdrive/proclogd/proclog.cc index 26fc1d94d0..215d9e9df0 100644 --- a/selfdrive/proclogd/proclog.cc +++ b/selfdrive/proclogd/proclog.cc @@ -7,8 +7,8 @@ #include #include -#include "selfdrive/common/swaglog.h" -#include "selfdrive/common/util.h" +#include "common/swaglog.h" +#include "common/util.h" namespace Parser { diff --git a/selfdrive/proclogd/tests/test_proclog.cc b/selfdrive/proclogd/tests/test_proclog.cc index 88a09dd03b..3e346988c6 100644 --- a/selfdrive/proclogd/tests/test_proclog.cc +++ b/selfdrive/proclogd/tests/test_proclog.cc @@ -1,6 +1,6 @@ #define CATCH_CONFIG_MAIN #include "catch2/catch.hpp" -#include "selfdrive/common/util.h" +#include "common/util.h" #include "selfdrive/proclogd/proclog.h" const std::string allowed_states = "RSDTZtWXxKWPI"; diff --git a/selfdrive/sensord/sensors/bmx055_accel.cc b/selfdrive/sensord/sensors/bmx055_accel.cc index f5d68bdee5..d17e3fe617 100644 --- a/selfdrive/sensord/sensors/bmx055_accel.cc +++ b/selfdrive/sensord/sensors/bmx055_accel.cc @@ -2,8 +2,8 @@ #include -#include "selfdrive/common/swaglog.h" -#include "selfdrive/common/timing.h" +#include "common/swaglog.h" +#include "common/timing.h" BMX055_Accel::BMX055_Accel(I2CBus *bus) : I2CSensor(bus) {} diff --git a/selfdrive/sensord/sensors/bmx055_gyro.cc b/selfdrive/sensord/sensors/bmx055_gyro.cc index f0e3034e3f..74b22d8fef 100644 --- a/selfdrive/sensord/sensors/bmx055_gyro.cc +++ b/selfdrive/sensord/sensors/bmx055_gyro.cc @@ -3,7 +3,7 @@ #include #include -#include "selfdrive/common/swaglog.h" +#include "common/swaglog.h" #define DEG2RAD(x) ((x) * M_PI / 180.0) diff --git a/selfdrive/sensord/sensors/bmx055_magn.cc b/selfdrive/sensord/sensors/bmx055_magn.cc index 29e0d809d8..a2c793eff6 100644 --- a/selfdrive/sensord/sensors/bmx055_magn.cc +++ b/selfdrive/sensord/sensors/bmx055_magn.cc @@ -6,8 +6,8 @@ #include #include -#include "selfdrive/common/swaglog.h" -#include "selfdrive/common/util.h" +#include "common/swaglog.h" +#include "common/util.h" static int16_t compensate_x(trim_data_t trim_data, int16_t mag_data_x, uint16_t data_rhall) { uint16_t process_comp_x0 = data_rhall; diff --git a/selfdrive/sensord/sensors/bmx055_temp.cc b/selfdrive/sensord/sensors/bmx055_temp.cc index 339a987ce0..85bdea9e61 100644 --- a/selfdrive/sensord/sensors/bmx055_temp.cc +++ b/selfdrive/sensord/sensors/bmx055_temp.cc @@ -3,8 +3,8 @@ #include #include "selfdrive/sensord/sensors/bmx055_accel.h" -#include "selfdrive/common/swaglog.h" -#include "selfdrive/common/timing.h" +#include "common/swaglog.h" +#include "common/timing.h" BMX055_Temp::BMX055_Temp(I2CBus *bus) : I2CSensor(bus) {} diff --git a/selfdrive/sensord/sensors/i2c_sensor.h b/selfdrive/sensord/sensors/i2c_sensor.h index 83c66eac87..7832475a98 100644 --- a/selfdrive/sensord/sensors/i2c_sensor.h +++ b/selfdrive/sensord/sensors/i2c_sensor.h @@ -3,7 +3,7 @@ #include #include "cereal/gen/cpp/log.capnp.h" -#include "selfdrive/common/i2c.h" +#include "common/i2c.h" #include "selfdrive/sensord/sensors/constants.h" #include "selfdrive/sensord/sensors/sensor.h" diff --git a/selfdrive/sensord/sensors/light_sensor.cc b/selfdrive/sensord/sensors/light_sensor.cc index 4d00d37bda..4497343684 100644 --- a/selfdrive/sensord/sensors/light_sensor.cc +++ b/selfdrive/sensord/sensors/light_sensor.cc @@ -2,7 +2,7 @@ #include -#include "selfdrive/common/timing.h" +#include "common/timing.h" #include "selfdrive/sensord/sensors/constants.h" void LightSensor::get_event(cereal::SensorEventData::Builder &event) { diff --git a/selfdrive/sensord/sensors/lsm6ds3_accel.cc b/selfdrive/sensord/sensors/lsm6ds3_accel.cc index 83222858e7..bcac7de9f7 100644 --- a/selfdrive/sensord/sensors/lsm6ds3_accel.cc +++ b/selfdrive/sensord/sensors/lsm6ds3_accel.cc @@ -2,8 +2,8 @@ #include -#include "selfdrive/common/swaglog.h" -#include "selfdrive/common/timing.h" +#include "common/swaglog.h" +#include "common/timing.h" LSM6DS3_Accel::LSM6DS3_Accel(I2CBus *bus) : I2CSensor(bus) {} diff --git a/selfdrive/sensord/sensors/lsm6ds3_gyro.cc b/selfdrive/sensord/sensors/lsm6ds3_gyro.cc index 6732ead0f1..c7711d34e3 100644 --- a/selfdrive/sensord/sensors/lsm6ds3_gyro.cc +++ b/selfdrive/sensord/sensors/lsm6ds3_gyro.cc @@ -3,8 +3,8 @@ #include #include -#include "selfdrive/common/swaglog.h" -#include "selfdrive/common/timing.h" +#include "common/swaglog.h" +#include "common/timing.h" #define DEG2RAD(x) ((x) * M_PI / 180.0) diff --git a/selfdrive/sensord/sensors/lsm6ds3_temp.cc b/selfdrive/sensord/sensors/lsm6ds3_temp.cc index 6b093fce05..1dd179d69e 100644 --- a/selfdrive/sensord/sensors/lsm6ds3_temp.cc +++ b/selfdrive/sensord/sensors/lsm6ds3_temp.cc @@ -2,8 +2,8 @@ #include -#include "selfdrive/common/swaglog.h" -#include "selfdrive/common/timing.h" +#include "common/swaglog.h" +#include "common/timing.h" LSM6DS3_Temp::LSM6DS3_Temp(I2CBus *bus) : I2CSensor(bus) {} diff --git a/selfdrive/sensord/sensors/mmc5603nj_magn.cc b/selfdrive/sensord/sensors/mmc5603nj_magn.cc index 68878867e4..7c654ce7a3 100644 --- a/selfdrive/sensord/sensors/mmc5603nj_magn.cc +++ b/selfdrive/sensord/sensors/mmc5603nj_magn.cc @@ -2,8 +2,8 @@ #include -#include "selfdrive/common/swaglog.h" -#include "selfdrive/common/timing.h" +#include "common/swaglog.h" +#include "common/timing.h" MMC5603NJ_Magn::MMC5603NJ_Magn(I2CBus *bus) : I2CSensor(bus) {} diff --git a/selfdrive/sensord/sensors_qcom2.cc b/selfdrive/sensord/sensors_qcom2.cc index c3e5bbcdfa..65fe43f65f 100644 --- a/selfdrive/sensord/sensors_qcom2.cc +++ b/selfdrive/sensord/sensors_qcom2.cc @@ -5,10 +5,10 @@ #include #include "cereal/messaging/messaging.h" -#include "selfdrive/common/i2c.h" -#include "selfdrive/common/swaglog.h" -#include "selfdrive/common/timing.h" -#include "selfdrive/common/util.h" +#include "common/i2c.h" +#include "common/swaglog.h" +#include "common/timing.h" +#include "common/util.h" #include "selfdrive/sensord/sensors/bmx055_accel.h" #include "selfdrive/sensord/sensors/bmx055_gyro.h" #include "selfdrive/sensord/sensors/bmx055_magn.h" diff --git a/selfdrive/ui/navd/main.cc b/selfdrive/ui/navd/main.cc index 7ae0393a47..fe354b7b7d 100644 --- a/selfdrive/ui/navd/main.cc +++ b/selfdrive/ui/navd/main.cc @@ -9,7 +9,7 @@ #include "selfdrive/ui/navd/route_engine.h" #include "selfdrive/ui/navd/map_renderer.h" #include "selfdrive/hardware/hw.h" -#include "selfdrive/common/params.h" +#include "common/params.h" void sigHandler(int s) { qInfo() << "Shutting down"; diff --git a/selfdrive/ui/navd/map_renderer.cc b/selfdrive/ui/navd/map_renderer.cc index 1d78d68dfe..8d2a8810c9 100644 --- a/selfdrive/ui/navd/map_renderer.cc +++ b/selfdrive/ui/navd/map_renderer.cc @@ -5,7 +5,7 @@ #include #include "selfdrive/ui/qt/maps/map_helpers.h" -#include "selfdrive/common/timing.h" +#include "common/timing.h" const float ZOOM = 13.5; // Don't go below 13 or features will start to disappear const int WIDTH = 256; diff --git a/selfdrive/ui/navd/route_engine.cc b/selfdrive/ui/navd/route_engine.cc index afa6c02e86..577f267c9b 100644 --- a/selfdrive/ui/navd/route_engine.cc +++ b/selfdrive/ui/navd/route_engine.cc @@ -6,7 +6,7 @@ #include "selfdrive/ui/qt/maps/map_helpers.h" #include "selfdrive/ui/qt/api.h" -#include "selfdrive/common/params.h" +#include "common/params.h" const qreal REROUTE_DISTANCE = 25; const float MANEUVER_TRANSITION_THRESHOLD = 10; diff --git a/selfdrive/ui/qt/api.cc b/selfdrive/ui/qt/api.cc index 79e9506598..94beb12186 100644 --- a/selfdrive/ui/qt/api.cc +++ b/selfdrive/ui/qt/api.cc @@ -12,8 +12,8 @@ #include #include -#include "selfdrive/common/params.h" -#include "selfdrive/common/util.h" +#include "common/params.h" +#include "common/util.h" #include "selfdrive/hardware/hw.h" #include "selfdrive/ui/qt/util.h" diff --git a/selfdrive/ui/qt/api.h b/selfdrive/ui/qt/api.h index 5963d1cf44..ad64d7e722 100644 --- a/selfdrive/ui/qt/api.h +++ b/selfdrive/ui/qt/api.h @@ -5,7 +5,7 @@ #include #include -#include "selfdrive/common/util.h" +#include "common/util.h" namespace CommaApi { diff --git a/selfdrive/ui/qt/body.cc b/selfdrive/ui/qt/body.cc index 7ca064a6cf..f2628d304f 100644 --- a/selfdrive/ui/qt/body.cc +++ b/selfdrive/ui/qt/body.cc @@ -6,8 +6,8 @@ #include #include -#include "selfdrive/common/params.h" -#include "selfdrive/common/timing.h" +#include "common/params.h" +#include "common/timing.h" RecordButton::RecordButton(QWidget *parent) : QPushButton(parent) { setCheckable(true); diff --git a/selfdrive/ui/qt/body.h b/selfdrive/ui/qt/body.h index 6555487bf1..567a54d49b 100644 --- a/selfdrive/ui/qt/body.h +++ b/selfdrive/ui/qt/body.h @@ -4,7 +4,7 @@ #include #include -#include "selfdrive/common/util.h" +#include "common/util.h" #include "selfdrive/ui/ui.h" class RecordButton : public QPushButton { diff --git a/selfdrive/ui/qt/home.cc b/selfdrive/ui/qt/home.cc index fbd458cc02..e522d6160d 100644 --- a/selfdrive/ui/qt/home.cc +++ b/selfdrive/ui/qt/home.cc @@ -5,7 +5,7 @@ #include #include -#include "selfdrive/common/params.h" +#include "common/params.h" #include "selfdrive/ui/qt/util.h" #include "selfdrive/ui/qt/widgets/drive_stats.h" #include "selfdrive/ui/qt/widgets/prime.h" diff --git a/selfdrive/ui/qt/maps/map.cc b/selfdrive/ui/qt/maps/map.cc index 055f93b291..8e5a02f8a0 100644 --- a/selfdrive/ui/qt/maps/map.cc +++ b/selfdrive/ui/qt/maps/map.cc @@ -6,7 +6,7 @@ #include #include -#include "selfdrive/common/swaglog.h" +#include "common/swaglog.h" #include "selfdrive/ui/ui.h" #include "selfdrive/ui/qt/util.h" #include "selfdrive/ui/qt/maps/map_helpers.h" diff --git a/selfdrive/ui/qt/maps/map.h b/selfdrive/ui/qt/maps/map.h index c62089cb25..01a13f3b7c 100644 --- a/selfdrive/ui/qt/maps/map.h +++ b/selfdrive/ui/qt/maps/map.h @@ -18,8 +18,8 @@ #include #include -#include "selfdrive/common/params.h" -#include "selfdrive/common/util.h" +#include "common/params.h" +#include "common/util.h" #include "cereal/messaging/messaging.h" class MapInstructions : public QWidget { diff --git a/selfdrive/ui/qt/maps/map_helpers.cc b/selfdrive/ui/qt/maps/map_helpers.cc index f0545924c0..be1098994b 100644 --- a/selfdrive/ui/qt/maps/map_helpers.cc +++ b/selfdrive/ui/qt/maps/map_helpers.cc @@ -3,7 +3,7 @@ #include #include -#include "selfdrive/common/params.h" +#include "common/params.h" #include "selfdrive/hardware/hw.h" #include "selfdrive/ui/qt/api.h" diff --git a/selfdrive/ui/qt/maps/map_helpers.h b/selfdrive/ui/qt/maps/map_helpers.h index 1c8cacbebc..cda4cd1cfb 100644 --- a/selfdrive/ui/qt/maps/map_helpers.h +++ b/selfdrive/ui/qt/maps/map_helpers.h @@ -5,7 +5,7 @@ #include #include -#include "selfdrive/common/util.h" +#include "common/util.h" #include "common/transformations/coordinates.hpp" #include "common/transformations/orientation.hpp" #include "cereal/messaging/messaging.h" diff --git a/selfdrive/ui/qt/maps/map_settings.cc b/selfdrive/ui/qt/maps/map_settings.cc index 1e3a99e31a..674c7fa7cb 100644 --- a/selfdrive/ui/qt/maps/map_settings.cc +++ b/selfdrive/ui/qt/maps/map_settings.cc @@ -2,7 +2,7 @@ #include -#include "selfdrive/common/util.h" +#include "common/util.h" #include "selfdrive/ui/qt/util.h" #include "selfdrive/ui/qt/request_repeater.h" #include "selfdrive/ui/qt/widgets/controls.h" diff --git a/selfdrive/ui/qt/maps/map_settings.h b/selfdrive/ui/qt/maps/map_settings.h index 03720edee7..962d127679 100644 --- a/selfdrive/ui/qt/maps/map_settings.h +++ b/selfdrive/ui/qt/maps/map_settings.h @@ -8,7 +8,7 @@ #include #include -#include "selfdrive/common/params.h" +#include "common/params.h" #include "selfdrive/ui/qt/widgets/controls.h" class MapPanel : public QWidget { diff --git a/selfdrive/ui/qt/offroad/driverview.h b/selfdrive/ui/qt/offroad/driverview.h index 4d4a4358ef..5d090ad772 100644 --- a/selfdrive/ui/qt/offroad/driverview.h +++ b/selfdrive/ui/qt/offroad/driverview.h @@ -4,7 +4,7 @@ #include -#include "selfdrive/common/util.h" +#include "common/util.h" #include "selfdrive/ui/qt/widgets/cameraview.h" class DriverViewScene : public QWidget { diff --git a/selfdrive/ui/qt/offroad/onboarding.cc b/selfdrive/ui/qt/offroad/onboarding.cc index 8e7601ca8a..d32cc26e43 100644 --- a/selfdrive/ui/qt/offroad/onboarding.cc +++ b/selfdrive/ui/qt/offroad/onboarding.cc @@ -6,8 +6,8 @@ #include #include -#include "selfdrive/common/util.h" -#include "selfdrive/common/params.h" +#include "common/util.h" +#include "common/params.h" #include "selfdrive/ui/qt/util.h" #include "selfdrive/ui/qt/widgets/input.h" diff --git a/selfdrive/ui/qt/offroad/onboarding.h b/selfdrive/ui/qt/offroad/onboarding.h index 904aec4ade..48f4094899 100644 --- a/selfdrive/ui/qt/offroad/onboarding.h +++ b/selfdrive/ui/qt/offroad/onboarding.h @@ -7,7 +7,7 @@ #include #include -#include "selfdrive/common/params.h" +#include "common/params.h" #include "selfdrive/ui/qt/qt_window.h" class TrainingGuide : public QFrame { diff --git a/selfdrive/ui/qt/offroad/settings.cc b/selfdrive/ui/qt/offroad/settings.cc index ec686ba1f0..00e120d867 100644 --- a/selfdrive/ui/qt/offroad/settings.cc +++ b/selfdrive/ui/qt/offroad/settings.cc @@ -12,8 +12,8 @@ #include "selfdrive/ui/qt/maps/map_settings.h" #endif -#include "selfdrive/common/params.h" -#include "selfdrive/common/util.h" +#include "common/params.h" +#include "common/util.h" #include "selfdrive/hardware/hw.h" #include "selfdrive/ui/qt/widgets/controls.h" #include "selfdrive/ui/qt/widgets/input.h" diff --git a/selfdrive/ui/qt/offroad/wifiManager.cc b/selfdrive/ui/qt/offroad/wifiManager.cc index 1628f35d99..124138eea4 100644 --- a/selfdrive/ui/qt/offroad/wifiManager.cc +++ b/selfdrive/ui/qt/offroad/wifiManager.cc @@ -3,8 +3,8 @@ #include "selfdrive/ui/ui.h" #include "selfdrive/ui/qt/widgets/prime.h" -#include "selfdrive/common/params.h" -#include "selfdrive/common/swaglog.h" +#include "common/params.h" +#include "common/swaglog.h" #include "selfdrive/ui/qt/util.h" bool compare_by_strength(const Network &a, const Network &b) { diff --git a/selfdrive/ui/qt/onroad.cc b/selfdrive/ui/qt/onroad.cc index 098747946f..91e2a76f02 100644 --- a/selfdrive/ui/qt/onroad.cc +++ b/selfdrive/ui/qt/onroad.cc @@ -4,7 +4,7 @@ #include -#include "selfdrive/common/timing.h" +#include "common/timing.h" #include "selfdrive/ui/qt/util.h" #ifdef ENABLE_MAPS #include "selfdrive/ui/qt/maps/map.h" diff --git a/selfdrive/ui/qt/onroad.h b/selfdrive/ui/qt/onroad.h index f4c62d1c7d..6ca2b3c738 100644 --- a/selfdrive/ui/qt/onroad.h +++ b/selfdrive/ui/qt/onroad.h @@ -3,7 +3,7 @@ #include #include -#include "selfdrive/common/util.h" +#include "common/util.h" #include "selfdrive/ui/qt/widgets/cameraview.h" #include "selfdrive/ui/ui.h" diff --git a/selfdrive/ui/qt/request_repeater.h b/selfdrive/ui/qt/request_repeater.h index fa80100d22..c0e2758273 100644 --- a/selfdrive/ui/qt/request_repeater.h +++ b/selfdrive/ui/qt/request_repeater.h @@ -1,6 +1,6 @@ #pragma once -#include "selfdrive/common/util.h" +#include "common/util.h" #include "selfdrive/ui/qt/api.h" #include "selfdrive/ui/ui.h" diff --git a/selfdrive/ui/qt/setup/setup.cc b/selfdrive/ui/qt/setup/setup.cc index 17304665c7..0da1752fed 100644 --- a/selfdrive/ui/qt/setup/setup.cc +++ b/selfdrive/ui/qt/setup/setup.cc @@ -10,7 +10,7 @@ #include -#include "selfdrive/common/util.h" +#include "common/util.h" #include "selfdrive/hardware/hw.h" #include "selfdrive/ui/qt/api.h" #include "selfdrive/ui/qt/qt_window.h" diff --git a/selfdrive/ui/qt/sidebar.h b/selfdrive/ui/qt/sidebar.h index 5d1b921750..ab3e990e61 100644 --- a/selfdrive/ui/qt/sidebar.h +++ b/selfdrive/ui/qt/sidebar.h @@ -3,7 +3,7 @@ #include #include -#include "selfdrive/common/params.h" +#include "common/params.h" #include "selfdrive/ui/ui.h" typedef QPair ItemStatus; diff --git a/selfdrive/ui/qt/util.cc b/selfdrive/ui/qt/util.cc index e38052ea59..7ce7a267df 100644 --- a/selfdrive/ui/qt/util.cc +++ b/selfdrive/ui/qt/util.cc @@ -4,8 +4,8 @@ #include #include -#include "selfdrive/common/params.h" -#include "selfdrive/common/swaglog.h" +#include "common/params.h" +#include "common/swaglog.h" #include "selfdrive/hardware/hw.h" QString getVersion() { diff --git a/selfdrive/ui/qt/widgets/controls.h b/selfdrive/ui/qt/widgets/controls.h index 024cefbb70..b6684e28b2 100644 --- a/selfdrive/ui/qt/widgets/controls.h +++ b/selfdrive/ui/qt/widgets/controls.h @@ -6,7 +6,7 @@ #include #include -#include "selfdrive/common/params.h" +#include "common/params.h" #include "selfdrive/ui/qt/widgets/toggle.h" QFrame *horizontal_line(QWidget *parent = nullptr); diff --git a/selfdrive/ui/qt/widgets/drive_stats.cc b/selfdrive/ui/qt/widgets/drive_stats.cc index f4c8f502a3..61d47db1c3 100644 --- a/selfdrive/ui/qt/widgets/drive_stats.cc +++ b/selfdrive/ui/qt/widgets/drive_stats.cc @@ -5,7 +5,7 @@ #include #include -#include "selfdrive/common/params.h" +#include "common/params.h" #include "selfdrive/ui/qt/request_repeater.h" #include "selfdrive/ui/qt/util.h" diff --git a/selfdrive/ui/qt/widgets/offroad_alerts.cc b/selfdrive/ui/qt/widgets/offroad_alerts.cc index 2d7ae39c36..53f7eb677c 100644 --- a/selfdrive/ui/qt/widgets/offroad_alerts.cc +++ b/selfdrive/ui/qt/widgets/offroad_alerts.cc @@ -4,7 +4,7 @@ #include #include -#include "selfdrive/common/util.h" +#include "common/util.h" #include "selfdrive/hardware/hw.h" #include "selfdrive/ui/qt/widgets/scrollview.h" diff --git a/selfdrive/ui/qt/widgets/offroad_alerts.h b/selfdrive/ui/qt/widgets/offroad_alerts.h index 4110bdaa4e..69c12b0602 100644 --- a/selfdrive/ui/qt/widgets/offroad_alerts.h +++ b/selfdrive/ui/qt/widgets/offroad_alerts.h @@ -6,7 +6,7 @@ #include #include -#include "selfdrive/common/params.h" +#include "common/params.h" class AbstractAlert : public QFrame { Q_OBJECT diff --git a/selfdrive/ui/qt/widgets/ssh_keys.cc b/selfdrive/ui/qt/widgets/ssh_keys.cc index 7630e65731..46ccf6aee3 100644 --- a/selfdrive/ui/qt/widgets/ssh_keys.cc +++ b/selfdrive/ui/qt/widgets/ssh_keys.cc @@ -1,6 +1,6 @@ #include "selfdrive/ui/qt/widgets/ssh_keys.h" -#include "selfdrive/common/params.h" +#include "common/params.h" #include "selfdrive/ui/qt/api.h" #include "selfdrive/ui/qt/widgets/input.h" diff --git a/selfdrive/ui/replay/camera.h b/selfdrive/ui/replay/camera.h index 84f0172d5b..7f078511cf 100644 --- a/selfdrive/ui/replay/camera.h +++ b/selfdrive/ui/replay/camera.h @@ -2,7 +2,7 @@ #include #include "cereal/visionipc/visionipc_server.h" -#include "selfdrive/common/queue.h" +#include "common/queue.h" #include "selfdrive/ui/replay/framereader.h" #include "selfdrive/ui/replay/logreader.h" diff --git a/selfdrive/ui/replay/consoleui.cc b/selfdrive/ui/replay/consoleui.cc index fbbc4c15f8..05eb09c9ed 100644 --- a/selfdrive/ui/replay/consoleui.cc +++ b/selfdrive/ui/replay/consoleui.cc @@ -3,7 +3,7 @@ #include #include -#include "selfdrive/common/version.h" +#include "common/version.h" namespace { diff --git a/selfdrive/ui/replay/filereader.cc b/selfdrive/ui/replay/filereader.cc index b57a62d501..5f862bec35 100644 --- a/selfdrive/ui/replay/filereader.cc +++ b/selfdrive/ui/replay/filereader.cc @@ -2,7 +2,7 @@ #include -#include "selfdrive/common/util.h" +#include "common/util.h" #include "selfdrive/ui/replay/util.h" std::string cacheFilePath(const std::string &url) { diff --git a/selfdrive/ui/replay/replay.cc b/selfdrive/ui/replay/replay.cc index 1c8de6bf94..5365724241 100644 --- a/selfdrive/ui/replay/replay.cc +++ b/selfdrive/ui/replay/replay.cc @@ -5,8 +5,8 @@ #include #include "cereal/services.h" -#include "selfdrive/common/params.h" -#include "selfdrive/common/timing.h" +#include "common/params.h" +#include "common/timing.h" #include "selfdrive/hardware/hw.h" #include "selfdrive/ui/replay/util.h" diff --git a/selfdrive/ui/replay/tests/test_replay.cc b/selfdrive/ui/replay/tests/test_replay.cc index e80c526079..bf984f5f3d 100644 --- a/selfdrive/ui/replay/tests/test_replay.cc +++ b/selfdrive/ui/replay/tests/test_replay.cc @@ -5,7 +5,7 @@ #include #include "catch2/catch.hpp" -#include "selfdrive/common/util.h" +#include "common/util.h" #include "selfdrive/ui/replay/replay.h" #include "selfdrive/ui/replay/util.h" diff --git a/selfdrive/ui/replay/util.cc b/selfdrive/ui/replay/util.cc index f52e5efab0..099219ccde 100644 --- a/selfdrive/ui/replay/util.cc +++ b/selfdrive/ui/replay/util.cc @@ -12,8 +12,8 @@ #include #include -#include "selfdrive/common/timing.h" -#include "selfdrive/common/util.h" +#include "common/timing.h" +#include "common/util.h" ReplayMessageHandler message_handler = nullptr; DownloadProgressHandler download_progress_handler = nullptr; diff --git a/selfdrive/ui/soundd/sound.cc b/selfdrive/ui/soundd/sound.cc index f303aa92bf..6830450d8f 100644 --- a/selfdrive/ui/soundd/sound.cc +++ b/selfdrive/ui/soundd/sound.cc @@ -7,7 +7,7 @@ #include #include "cereal/messaging/messaging.h" -#include "selfdrive/common/util.h" +#include "common/util.h" // TODO: detect when we can't play sounds // TODO: detect when we can't display the UI diff --git a/selfdrive/ui/ui.cc b/selfdrive/ui/ui.cc index ab99b8fc24..985b0259d2 100644 --- a/selfdrive/ui/ui.cc +++ b/selfdrive/ui/ui.cc @@ -6,10 +6,10 @@ #include #include "common/transformations/orientation.hpp" -#include "selfdrive/common/params.h" -#include "selfdrive/common/swaglog.h" -#include "selfdrive/common/util.h" -#include "selfdrive/common/watchdog.h" +#include "common/params.h" +#include "common/swaglog.h" +#include "common/util.h" +#include "common/watchdog.h" #include "selfdrive/hardware/hw.h" #define BACKLIGHT_DT 0.05 diff --git a/selfdrive/ui/ui.h b/selfdrive/ui/ui.h index e3415b8830..51a1f6e21f 100644 --- a/selfdrive/ui/ui.h +++ b/selfdrive/ui/ui.h @@ -11,9 +11,9 @@ #include #include "cereal/messaging/messaging.h" -#include "selfdrive/common/modeldata.h" -#include "selfdrive/common/params.h" -#include "selfdrive/common/timing.h" +#include "common/modeldata.h" +#include "common/params.h" +#include "common/timing.h" const int bdr_s = 30; const int header_h = 420; diff --git a/selfdrive/version.py b/selfdrive/version.py index f944e870ae..08ab097344 100644 --- a/selfdrive/version.py +++ b/selfdrive/version.py @@ -68,7 +68,7 @@ def get_normalized_origin(default: Optional[str] = None) -> Optional[str]: @cache def get_version() -> str: - with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "common", "version.h")) as _versionf: + with open(os.path.join(BASEDIR, "common", "version.h")) as _versionf: version = _versionf.read().split('"')[1] return version