From 595830135bb79c8b23eb8339ae768ca7b6a822f8 Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Mon, 11 Jan 2021 06:57:32 +0800 Subject: [PATCH] merge utilpp.h into util.h (#19710) --- common/params_pxd.pxd | 2 +- installer/updater/updater.cc | 2 +- release/files_common | 4 +- selfdrive/boardd/boardd.cc | 1 - selfdrive/boardd/panda.cc | 2 +- selfdrive/boardd/pigeon.cc | 2 +- selfdrive/camerad/cameras/camera_common.cc | 1 - .../camerad/cameras/camera_frame_stream.cc | 1 - selfdrive/camerad/cameras/camera_qcom.cc | 1 - selfdrive/camerad/cameras/camera_qcom.h | 2 +- selfdrive/camerad/cameras/camera_qcom2.cc | 1 - selfdrive/camerad/cameras/camera_webcam.cc | 1 - selfdrive/camerad/main.cc | 1 - selfdrive/clocksd/clocksd.cc | 1 - selfdrive/common/SConscript | 2 +- selfdrive/common/clutil.cc | 1 - selfdrive/common/params.cc | 1 - selfdrive/common/test_params.c | 2 +- selfdrive/common/{util.c => util.cc} | 0 selfdrive/common/util.h | 128 +++++++++++++++--- selfdrive/common/utilpp.h | 112 --------------- selfdrive/locationd/ubloxd_main.cc | 1 - selfdrive/logcatd/logcatd_android.cc | 2 +- selfdrive/logcatd/logcatd_systemd.cc | 2 +- selfdrive/loggerd/loggerd.cc | 1 - selfdrive/loggerd/raw_logger.cc | 2 +- selfdrive/loggerd/tests/testraw.cc | 2 +- selfdrive/modeld/dmonitoringmodeld.cc | 2 +- selfdrive/modeld/modeld.cc | 2 +- selfdrive/modeld/runners/onnxmodel.cc | 1 - selfdrive/proclogd/proclogd.cc | 1 - selfdrive/sensord/gpsd.cc | 2 +- selfdrive/sensord/sensors/bmx055_magn.cc | 2 +- selfdrive/sensord/sensors_qcom.cc | 2 +- selfdrive/sensord/sensors_qcom2.cc | 2 +- selfdrive/ui/android/ui.cc | 1 - selfdrive/ui/qt/offroad/settings.cc | 2 +- selfdrive/ui/qt/widgets/drive_stats.cc | 2 +- selfdrive/ui/ui.cc | 1 - 39 files changed, 127 insertions(+), 171 deletions(-) rename selfdrive/common/{util.c => util.cc} (100%) delete mode 100644 selfdrive/common/utilpp.h diff --git a/common/params_pxd.pxd b/common/params_pxd.pxd index e437a09b..9faa117c 100644 --- a/common/params_pxd.pxd +++ b/common/params_pxd.pxd @@ -4,7 +4,7 @@ from libcpp cimport bool cdef extern from "selfdrive/common/params.cc": pass -cdef extern from "selfdrive/common/util.c": +cdef extern from "selfdrive/common/util.cc": pass cdef extern from "selfdrive/common/params.h": diff --git a/installer/updater/updater.cc b/installer/updater/updater.cc index 24e47439..63cae4e1 100644 --- a/installer/updater/updater.cc +++ b/installer/updater/updater.cc @@ -30,7 +30,7 @@ #include "common/framebuffer.h" #include "common/touch.h" -#include "common/utilpp.h" +#include "common/util.h" #define USER_AGENT "NEOSUpdater-0.2" diff --git a/release/files_common b/release/files_common index 23a6142b..9ad4c627 100644 --- a/release/files_common +++ b/release/files_common @@ -190,7 +190,8 @@ selfdrive/common/glutil.[c,h] selfdrive/common/touch.[c,h] selfdrive/common/swaglog.h selfdrive/common/swaglog.cc -selfdrive/common/util.[c,h] +selfdrive/common/util.cc +selfdrive/common/util.h selfdrive/common/cqueue.[c,h] selfdrive/common/clutil.cc selfdrive/common/clutil.h @@ -201,7 +202,6 @@ selfdrive/common/mutex.h selfdrive/common/modeldata.h selfdrive/common/mat.h selfdrive/common/timing.h -selfdrive/common/utilpp.h selfdrive/common/visionimg.cc selfdrive/common/visionimg.h diff --git a/selfdrive/boardd/boardd.cc b/selfdrive/boardd/boardd.cc index 8a37d585..795bf3bf 100644 --- a/selfdrive/boardd/boardd.cc +++ b/selfdrive/boardd/boardd.cc @@ -21,7 +21,6 @@ #include "cereal/gen/cpp/car.capnp.h" #include "common/util.h" -#include "common/utilpp.h" #include "common/params.h" #include "common/swaglog.h" #include "common/timing.h" diff --git a/selfdrive/boardd/panda.cc b/selfdrive/boardd/panda.cc index 0eea2b49..c79d2864 100644 --- a/selfdrive/boardd/panda.cc +++ b/selfdrive/boardd/panda.cc @@ -6,7 +6,7 @@ #include "common/swaglog.h" #include "common/gpio.h" -#include "common/utilpp.h" +#include "common/util.h" #include "panda.h" #ifdef QCOM2 diff --git a/selfdrive/boardd/pigeon.cc b/selfdrive/boardd/pigeon.cc index 5446840f..136521c6 100644 --- a/selfdrive/boardd/pigeon.cc +++ b/selfdrive/boardd/pigeon.cc @@ -6,7 +6,7 @@ #include "common/swaglog.h" #include "common/gpio.h" -#include "common/utilpp.h" +#include "common/util.h" #include "pigeon.h" diff --git a/selfdrive/camerad/cameras/camera_common.cc b/selfdrive/camerad/cameras/camera_common.cc index 8712c0cf..b42a6550 100644 --- a/selfdrive/camerad/cameras/camera_common.cc +++ b/selfdrive/camerad/cameras/camera_common.cc @@ -22,7 +22,6 @@ #include "common/params.h" #include "common/swaglog.h" #include "common/util.h" -#include "common/utilpp.h" #include "imgproc/utils.h" const int env_xmin = getenv("XMIN") ? atoi(getenv("XMIN")) : 0; diff --git a/selfdrive/camerad/cameras/camera_frame_stream.cc b/selfdrive/camerad/cameras/camera_frame_stream.cc index 2bd5fc40..548a2a24 100644 --- a/selfdrive/camerad/cameras/camera_frame_stream.cc +++ b/selfdrive/camerad/cameras/camera_frame_stream.cc @@ -8,7 +8,6 @@ #include "messaging.hpp" #include "common/util.h" -#include "common/utilpp.h" #include "common/timing.h" #include "common/swaglog.h" diff --git a/selfdrive/camerad/cameras/camera_qcom.cc b/selfdrive/camerad/cameras/camera_qcom.cc index 6b310418..eba62ec2 100644 --- a/selfdrive/camerad/cameras/camera_qcom.cc +++ b/selfdrive/camerad/cameras/camera_qcom.cc @@ -20,7 +20,6 @@ #include "msm_cam_sensor.h" #include "common/util.h" -#include "common/utilpp.h" #include "common/timing.h" #include "common/swaglog.h" #include "common/params.h" diff --git a/selfdrive/camerad/cameras/camera_qcom.h b/selfdrive/camerad/cameras/camera_qcom.h index f89e85c1..01264a34 100644 --- a/selfdrive/camerad/cameras/camera_qcom.h +++ b/selfdrive/camerad/cameras/camera_qcom.h @@ -15,7 +15,7 @@ #include "visionbuf.h" #include "common/mat.h" -#include "common/utilpp.h" +#include "common/util.h" #include "camera_common.h" diff --git a/selfdrive/camerad/cameras/camera_qcom2.cc b/selfdrive/camerad/cameras/camera_qcom2.cc index a22c1cca..cfff9895 100644 --- a/selfdrive/camerad/cameras/camera_qcom2.cc +++ b/selfdrive/camerad/cameras/camera_qcom2.cc @@ -12,7 +12,6 @@ #include #include "common/util.h" -#include "common/utilpp.h" #include "common/swaglog.h" #include "camera_qcom2.h" diff --git a/selfdrive/camerad/cameras/camera_webcam.cc b/selfdrive/camerad/cameras/camera_webcam.cc index feb1d2dd..1b016c2a 100644 --- a/selfdrive/camerad/cameras/camera_webcam.cc +++ b/selfdrive/camerad/cameras/camera_webcam.cc @@ -6,7 +6,6 @@ #include #include "common/util.h" -#include "common/utilpp.h" #include "common/timing.h" #include "common/clutil.h" #include "common/swaglog.h" diff --git a/selfdrive/camerad/main.cc b/selfdrive/camerad/main.cc index 75a1bdf9..0f4ada79 100644 --- a/selfdrive/camerad/main.cc +++ b/selfdrive/camerad/main.cc @@ -21,7 +21,6 @@ #include "common/params.h" #include "common/swaglog.h" #include "common/util.h" -#include "common/utilpp.h" #include "visionipc_server.h" ExitHandler do_exit; diff --git a/selfdrive/clocksd/clocksd.cc b/selfdrive/clocksd/clocksd.cc index 1f8986ed..9bd7e917 100644 --- a/selfdrive/clocksd/clocksd.cc +++ b/selfdrive/clocksd/clocksd.cc @@ -17,7 +17,6 @@ #include "messaging.hpp" #include "common/timing.h" #include "common/util.h" -#include "common/utilpp.h" ExitHandler do_exit; diff --git a/selfdrive/common/SConscript b/selfdrive/common/SConscript index db88ba64..d980d98b 100644 --- a/selfdrive/common/SConscript +++ b/selfdrive/common/SConscript @@ -5,7 +5,7 @@ if SHARED: else: fxn = env.Library -common_libs = ['params.cc', 'swaglog.cc', 'cqueue.c', 'util.c', 'gpio.cc', 'i2c.cc'] +common_libs = ['params.cc', 'swaglog.cc', 'cqueue.c', 'util.cc', 'gpio.cc', 'i2c.cc'] _common = fxn('common', common_libs, LIBS="json11") diff --git a/selfdrive/common/clutil.cc b/selfdrive/common/clutil.cc index 45767fc5..c6a2b49d 100644 --- a/selfdrive/common/clutil.cc +++ b/selfdrive/common/clutil.cc @@ -7,7 +7,6 @@ #include #include #include "util.h" -#include "utilpp.h" namespace { // helper functions diff --git a/selfdrive/common/params.cc b/selfdrive/common/params.cc index 9f4c2009..930f3f0d 100644 --- a/selfdrive/common/params.cc +++ b/selfdrive/common/params.cc @@ -18,7 +18,6 @@ #include #include "common/util.h" -#include "common/utilpp.h" #if defined(QCOM) || defined(QCOM2) diff --git a/selfdrive/common/test_params.c b/selfdrive/common/test_params.c index 0d562835..51aff9d4 100644 --- a/selfdrive/common/test_params.c +++ b/selfdrive/common/test_params.c @@ -59,6 +59,6 @@ int main(int argc, const char* argv[]) { } // BUILD: -// $ gcc -I$HOME/one selfdrive/common/test_params.c selfdrive/common/params.c selfdrive/common/util.c -o ./test_params +// $ gcc -I$HOME/one selfdrive/common/test_params.c selfdrive/common/params.c selfdrive/common/util.cc -o ./test_params // $ seq 0 100000 | xargs -P20 -I{} ./test_params write /data/params DongleId {} && sleep 0.1 & // $ while ./test_params read /data/params DongleId; do sleep 0.05; done diff --git a/selfdrive/common/util.c b/selfdrive/common/util.cc similarity index 100% rename from selfdrive/common/util.c rename to selfdrive/common/util.cc diff --git a/selfdrive/common/util.h b/selfdrive/common/util.h index aa2f8d50..96b3d6d5 100644 --- a/selfdrive/common/util.h +++ b/selfdrive/common/util.h @@ -1,20 +1,18 @@ -#ifndef COMMON_UTIL_H -#define COMMON_UTIL_H +#pragma once #include +#include +#include +#include +#include +#include +#include +#include +#include +#include -#ifndef __cplusplus - -#define min(a,b) \ - ({ __typeof__ (a) _a = (a); \ - __typeof__ (b) _b = (b); \ - _a < _b ? _a : _b; }) - -#define max(a,b) \ - ({ __typeof__ (a) _a = (a); \ - __typeof__ (b) _b = (b); \ - _a > _b ? _a : _b; }) - +#ifndef sighandler_t +typedef void (*sighandler_t)(int sig); #endif #define ARRAYSIZE(x) (sizeof(x)/sizeof(x[0])) @@ -22,10 +20,6 @@ #undef ALIGN #define ALIGN(x, align) (((x) + (align)-1) & ~((align)-1)) -#ifdef __cplusplus -extern "C" { -#endif - // Reads a file into a newly allocated buffer. // // Returns NULL on failure, otherwise the NULL-terminated file contents. @@ -38,8 +32,98 @@ void set_thread_name(const char* name); int set_realtime_priority(int level); int set_core_affinity(int core); -#ifdef __cplusplus -} -#endif +namespace util { -#endif +inline bool starts_with(std::string s, std::string prefix) { + return s.compare(0, prefix.size(), prefix) == 0; +} + +template +inline std::string string_format( const std::string& format, Args ... args ) { + size_t size = snprintf( nullptr, 0, format.c_str(), args ... ) + 1; + std::unique_ptr buf( new char[ size ] ); + snprintf( buf.get(), size, format.c_str(), args ... ); + return std::string( buf.get(), buf.get() + size - 1 ); +} + +inline std::string read_file(std::string fn) { + std::ifstream t(fn); + std::stringstream buffer; + buffer << t.rdbuf(); + return buffer.str(); +} + +inline std::string tohex(const uint8_t* buf, size_t buf_size) { + std::unique_ptr hexbuf(new char[buf_size*2+1]); + for (size_t i=0; i < buf_size; i++) { + sprintf(&hexbuf[i*2], "%02x", buf[i]); + } + hexbuf[buf_size*2] = 0; + return std::string(hexbuf.get(), hexbuf.get() + buf_size*2); +} + +inline std::string base_name(std::string const & path) { + size_t pos = path.find_last_of("/"); + if (pos == std::string::npos) return path; + return path.substr(pos + 1); +} + +inline std::string dir_name(std::string const & path) { + size_t pos = path.find_last_of("/"); + if (pos == std::string::npos) return ""; + return path.substr(0, pos); +} + +inline std::string readlink(std::string path) { + char buff[4096]; + ssize_t len = ::readlink(path.c_str(), buff, sizeof(buff)-1); + if (len != -1) { + buff[len] = '\0'; + return std::string(buff); + } + return ""; +} + +inline std::string getenv_default(const char* env_var, const char * suffix, const char* default_val) { + const char* env_val = getenv(env_var); + if (env_val != NULL){ + return std::string(env_val) + std::string(suffix); + } else { + return std::string(default_val); + } +} + +inline void sleep_for(const int milliseconds) { + std::this_thread::sleep_for(std::chrono::milliseconds(milliseconds)); +} +} + +class ExitHandler { +public: + ExitHandler() { + std::signal(SIGINT, (sighandler_t)set_do_exit); + std::signal(SIGTERM, (sighandler_t)set_do_exit); + }; + inline operator bool() { return do_exit; } + inline ExitHandler& operator=(bool v) { + do_exit = v; + return *this; + } +private: + static void set_do_exit(int sig) { do_exit = true; } + inline static std::atomic do_exit = false; +}; + +struct unique_fd { + unique_fd(int fd = -1) : fd_(fd) {} + unique_fd& operator=(unique_fd&& uf) { + fd_ = uf.fd_; + uf.fd_ = -1; + return *this; + } + ~unique_fd() { + if (fd_ != -1) close(fd_); + } + operator int() const { return fd_; } + int fd_; +}; diff --git a/selfdrive/common/utilpp.h b/selfdrive/common/utilpp.h deleted file mode 100644 index 574413a9..00000000 --- a/selfdrive/common/utilpp.h +++ /dev/null @@ -1,112 +0,0 @@ -#pragma once - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef sighandler_t -typedef void (*sighandler_t)(int sig); -#endif - -namespace util { - -inline bool starts_with(std::string s, std::string prefix) { - return s.compare(0, prefix.size(), prefix) == 0; -} - -template -inline std::string string_format( const std::string& format, Args ... args ) { - size_t size = snprintf( nullptr, 0, format.c_str(), args ... ) + 1; - std::unique_ptr buf( new char[ size ] ); - snprintf( buf.get(), size, format.c_str(), args ... ); - return std::string( buf.get(), buf.get() + size - 1 ); -} - -inline std::string read_file(std::string fn) { - std::ifstream t(fn); - std::stringstream buffer; - buffer << t.rdbuf(); - return buffer.str(); -} - -inline std::string tohex(const uint8_t* buf, size_t buf_size) { - std::unique_ptr hexbuf(new char[buf_size*2+1]); - for (size_t i=0; i < buf_size; i++) { - sprintf(&hexbuf[i*2], "%02x", buf[i]); - } - hexbuf[buf_size*2] = 0; - return std::string(hexbuf.get(), hexbuf.get() + buf_size*2); -} - -inline std::string base_name(std::string const & path) { - size_t pos = path.find_last_of("/"); - if (pos == std::string::npos) return path; - return path.substr(pos + 1); -} - -inline std::string dir_name(std::string const & path) { - size_t pos = path.find_last_of("/"); - if (pos == std::string::npos) return ""; - return path.substr(0, pos); -} - -inline std::string readlink(std::string path) { - char buff[4096]; - ssize_t len = ::readlink(path.c_str(), buff, sizeof(buff)-1); - if (len != -1) { - buff[len] = '\0'; - return std::string(buff); - } - return ""; -} - -inline std::string getenv_default(const char* env_var, const char * suffix, const char* default_val) { - const char* env_val = getenv(env_var); - if (env_val != NULL){ - return std::string(env_val) + std::string(suffix); - } else { - return std::string(default_val); - } -} - -inline void sleep_for(const int milliseconds) { - std::this_thread::sleep_for(std::chrono::milliseconds(milliseconds)); -} -} - -class ExitHandler { -public: - ExitHandler() { - std::signal(SIGINT, (sighandler_t)set_do_exit); - std::signal(SIGTERM, (sighandler_t)set_do_exit); - }; - inline operator bool() { return do_exit; } - inline ExitHandler& operator=(bool v) { - do_exit = v; - return *this; - } -private: - static void set_do_exit(int sig) { do_exit = true; } - inline static std::atomic do_exit = false; -}; - -struct unique_fd { - unique_fd(int fd = -1) : fd_(fd) {} - unique_fd& operator=(unique_fd&& uf) { - fd_ = uf.fd_; - uf.fd_ = -1; - return *this; - } - ~unique_fd() { - if (fd_ != -1) close(fd_); - } - operator int() const { return fd_; } - int fd_; -}; diff --git a/selfdrive/locationd/ubloxd_main.cc b/selfdrive/locationd/ubloxd_main.cc index ec145e6b..e72ca58f 100644 --- a/selfdrive/locationd/ubloxd_main.cc +++ b/selfdrive/locationd/ubloxd_main.cc @@ -13,7 +13,6 @@ #include "messaging.hpp" #include "common/util.h" -#include "common/utilpp.h" #include "common/params.h" #include "common/swaglog.h" #include "common/timing.h" diff --git a/selfdrive/logcatd/logcatd_android.cc b/selfdrive/logcatd/logcatd_android.cc index fa32831b..5cda4b64 100644 --- a/selfdrive/logcatd/logcatd_android.cc +++ b/selfdrive/logcatd/logcatd_android.cc @@ -10,7 +10,7 @@ #include #include "common/timing.h" -#include "common/utilpp.h" +#include "common/util.h" #include "messaging.hpp" diff --git a/selfdrive/logcatd/logcatd_systemd.cc b/selfdrive/logcatd/logcatd_systemd.cc index 644fc2c5..abe3121a 100644 --- a/selfdrive/logcatd/logcatd_systemd.cc +++ b/selfdrive/logcatd/logcatd_systemd.cc @@ -8,7 +8,7 @@ #include #include "common/timing.h" -#include "common/utilpp.h" +#include "common/util.h" #include "messaging.hpp" ExitHandler do_exit; diff --git a/selfdrive/loggerd/loggerd.cc b/selfdrive/loggerd/loggerd.cc index 79f85896..a9c3e959 100644 --- a/selfdrive/loggerd/loggerd.cc +++ b/selfdrive/loggerd/loggerd.cc @@ -28,7 +28,6 @@ #include "common/timing.h" #include "common/params.h" #include "common/swaglog.h" -#include "common/utilpp.h" #include "common/util.h" #include "camerad/cameras/camera_common.h" #include "logger.h" diff --git a/selfdrive/loggerd/raw_logger.cc b/selfdrive/loggerd/raw_logger.cc index d9fc289d..720b1fbd 100644 --- a/selfdrive/loggerd/raw_logger.cc +++ b/selfdrive/loggerd/raw_logger.cc @@ -16,7 +16,7 @@ extern "C" { } #include "common/swaglog.h" -#include "common/utilpp.h" +#include "common/util.h" #include "raw_logger.h" diff --git a/selfdrive/loggerd/tests/testraw.cc b/selfdrive/loggerd/tests/testraw.cc index 671d4c37..e4f11919 100644 --- a/selfdrive/loggerd/tests/testraw.cc +++ b/selfdrive/loggerd/tests/testraw.cc @@ -6,7 +6,7 @@ #include "common/visionipc.h" #include "common/timing.h" -#include "common/utilpp.h" +#include "common/util.h" #include "RawLogger.h" int main() { diff --git a/selfdrive/modeld/dmonitoringmodeld.cc b/selfdrive/modeld/dmonitoringmodeld.cc index 5375358f..18016699 100644 --- a/selfdrive/modeld/dmonitoringmodeld.cc +++ b/selfdrive/modeld/dmonitoringmodeld.cc @@ -7,7 +7,7 @@ #include "visionbuf.h" #include "visionipc_client.h" #include "common/swaglog.h" -#include "common/utilpp.h" +#include "common/util.h" #include "models/dmonitoring.h" diff --git a/selfdrive/modeld/modeld.cc b/selfdrive/modeld/modeld.cc index ef440440..bf9492bb 100644 --- a/selfdrive/modeld/modeld.cc +++ b/selfdrive/modeld/modeld.cc @@ -7,7 +7,7 @@ #include "visionipc_client.h" #include "common/swaglog.h" #include "common/clutil.h" -#include "common/utilpp.h" +#include "common/util.h" #include "models/driving.h" #include "messaging.hpp" diff --git a/selfdrive/modeld/runners/onnxmodel.cc b/selfdrive/modeld/runners/onnxmodel.cc index 9ec053ad..4b89be4d 100644 --- a/selfdrive/modeld/runners/onnxmodel.cc +++ b/selfdrive/modeld/runners/onnxmodel.cc @@ -8,7 +8,6 @@ #include #include #include "common/util.h" -#include "common/utilpp.h" #include "common/swaglog.h" #include diff --git a/selfdrive/proclogd/proclogd.cc b/selfdrive/proclogd/proclogd.cc index 050c47ab..66f2f502 100644 --- a/selfdrive/proclogd/proclogd.cc +++ b/selfdrive/proclogd/proclogd.cc @@ -17,7 +17,6 @@ #include "common/timing.h" #include "common/util.h" -#include "common/utilpp.h" ExitHandler do_exit; diff --git a/selfdrive/sensord/gpsd.cc b/selfdrive/sensord/gpsd.cc index 83ecbf34..7b892350 100644 --- a/selfdrive/sensord/gpsd.cc +++ b/selfdrive/sensord/gpsd.cc @@ -17,7 +17,7 @@ #include "messaging.hpp" #include "common/timing.h" -#include "common/utilpp.h" +#include "common/util.h" #include "common/swaglog.h" ExitHandler do_exit; diff --git a/selfdrive/sensord/sensors/bmx055_magn.cc b/selfdrive/sensord/sensors/bmx055_magn.cc index 885fceeb..3834c06b 100644 --- a/selfdrive/sensord/sensors/bmx055_magn.cc +++ b/selfdrive/sensord/sensors/bmx055_magn.cc @@ -3,7 +3,7 @@ #include #include "common/swaglog.h" -#include "common/utilpp.h" +#include "common/util.h" #include "bmx055_magn.hpp" diff --git a/selfdrive/sensord/sensors_qcom.cc b/selfdrive/sensord/sensors_qcom.cc index 763826cf..a4ebf8bf 100644 --- a/selfdrive/sensord/sensors_qcom.cc +++ b/selfdrive/sensord/sensors_qcom.cc @@ -18,7 +18,7 @@ #include "messaging.hpp" #include "common/timing.h" -#include "common/utilpp.h" +#include "common/util.h" #include "common/swaglog.h" // ACCELEROMETER_UNCALIBRATED is only in Android O diff --git a/selfdrive/sensord/sensors_qcom2.cc b/selfdrive/sensord/sensors_qcom2.cc index 7fe84403..1cc685fe 100644 --- a/selfdrive/sensord/sensors_qcom2.cc +++ b/selfdrive/sensord/sensors_qcom2.cc @@ -6,7 +6,7 @@ #include "messaging.hpp" #include "common/i2c.h" #include "common/timing.h" -#include "common/utilpp.h" +#include "common/util.h" #include "common/swaglog.h" #include "sensors/sensor.hpp" diff --git a/selfdrive/ui/android/ui.cc b/selfdrive/ui/android/ui.cc index 44a8d7cc..837937b3 100644 --- a/selfdrive/ui/android/ui.cc +++ b/selfdrive/ui/android/ui.cc @@ -6,7 +6,6 @@ #include #include "common/util.h" -#include "common/utilpp.h" #include "common/params.h" #include "common/touch.h" #include "common/swaglog.h" diff --git a/selfdrive/ui/qt/offroad/settings.cc b/selfdrive/ui/qt/offroad/settings.cc index 0b5a62e9..91785c68 100644 --- a/selfdrive/ui/qt/offroad/settings.cc +++ b/selfdrive/ui/qt/offroad/settings.cc @@ -16,7 +16,7 @@ #include "widgets/offroad_alerts.hpp" #include "common/params.h" -#include "common/utilpp.h" +#include "common/util.h" ParamsToggle::ParamsToggle(QString param, QString title, QString description, QString icon_path, QWidget *parent): QFrame(parent) , param(param) { diff --git a/selfdrive/ui/qt/widgets/drive_stats.cc b/selfdrive/ui/qt/widgets/drive_stats.cc index 8e94415a..e9929083 100644 --- a/selfdrive/ui/qt/widgets/drive_stats.cc +++ b/selfdrive/ui/qt/widgets/drive_stats.cc @@ -17,7 +17,7 @@ #include "drive_stats.hpp" #include "common/params.h" -#include "common/utilpp.h" +#include "common/util.h" constexpr double MILE_TO_KM = 1.60934; diff --git a/selfdrive/ui/ui.cc b/selfdrive/ui/ui.cc index 55f11f44..2647c264 100644 --- a/selfdrive/ui/ui.cc +++ b/selfdrive/ui/ui.cc @@ -12,7 +12,6 @@ #include "common/util.h" #include "common/swaglog.h" #include "common/visionimg.h" -#include "common/utilpp.h" #include "ui.hpp" #include "paint.hpp"