Cleanup selfdrive/ includes (#20822)
* cleanup include path * continue * format includes * fix testraw.cc * remove include path from SConstruct * regroup * rebase master * almost done * apply review * rename FileReader.xx to filereader.xx * rename Unlogger.x->unlogger.x * rename FrameReader.xx -> framereader.xx * apply reviews * ui.h * continue * fix framebuffer.cc build error:mv util.h up * full path to msm_media_info * fix qcom2 camerad Co-authored-by: Comma Device <device@comma.ai>pull/20863/head
parent
9c60d8a7cb
commit
7222d0f20d
12
SConstruct
12
SConstruct
|
@ -83,6 +83,9 @@ if arch == "aarch64" or arch == "larch64":
|
|||
"#phonelibs/libyuv/larch64/lib",
|
||||
"/usr/lib/aarch64-linux-gnu"
|
||||
]
|
||||
cpppath += [
|
||||
"#selfdrive/camerad/include",
|
||||
]
|
||||
cflags = ["-DQCOM2", "-mcpu=cortex-a57"]
|
||||
cxxflags = ["-DQCOM2", "-mcpu=cortex-a57"]
|
||||
rpath = ["/usr/local/lib"]
|
||||
|
@ -175,7 +178,6 @@ env = Environment(
|
|||
|
||||
CPPPATH=cpppath + [
|
||||
"#",
|
||||
"#selfdrive",
|
||||
"#phonelibs/catch2/include",
|
||||
"#phonelibs/bzip2",
|
||||
"#phonelibs/libyuv/include",
|
||||
|
@ -191,14 +193,6 @@ env = Environment(
|
|||
"#phonelibs/nanovg",
|
||||
"#phonelibs/qrcode",
|
||||
"#phonelibs",
|
||||
"#selfdrive/boardd",
|
||||
"#selfdrive/common",
|
||||
"#selfdrive/camerad",
|
||||
"#selfdrive/camerad/include",
|
||||
"#selfdrive/loggerd/include",
|
||||
"#selfdrive/modeld",
|
||||
"#selfdrive/sensord",
|
||||
"#selfdrive/ui",
|
||||
"#cereal",
|
||||
"#cereal/messaging",
|
||||
"#cereal/visionipc",
|
||||
|
|
|
@ -1,23 +1,22 @@
|
|||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <pthread.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <math.h>
|
||||
#include <unistd.h>
|
||||
#include <assert.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include <sys/wait.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <GLES3/gl3.h>
|
||||
#include <EGL/egl.h>
|
||||
#include <EGL/eglext.h>
|
||||
#include <GLES3/gl3.h>
|
||||
|
||||
#include "common/util.h"
|
||||
#include "common/mat.h"
|
||||
#include "common/glutil.h"
|
||||
#include "common/framebuffer.h"
|
||||
#include "common/spinner.h"
|
||||
#include "selfdrive/common/framebuffer.h"
|
||||
#include "selfdrive/common/glutil.h"
|
||||
#include "selfdrive/common/mat.h"
|
||||
#include "selfdrive/common/spinner.h"
|
||||
#include "selfdrive/common/util.h"
|
||||
|
||||
#ifndef BRAND
|
||||
#define BRAND openpilot
|
||||
|
|
|
@ -1,37 +1,33 @@
|
|||
#include <sys/stat.h>
|
||||
#include <sys/statvfs.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <cassert>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/statvfs.h>
|
||||
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <mutex>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
|
||||
#include <curl/curl.h>
|
||||
#include <openssl/sha.h>
|
||||
|
||||
#include <GLES3/gl3.h>
|
||||
#include <EGL/egl.h>
|
||||
#include <EGL/eglext.h>
|
||||
|
||||
#include <GLES3/gl3.h>
|
||||
#include "nanovg.h"
|
||||
#define NANOVG_GLES3_IMPLEMENTATION
|
||||
#include "json11.hpp"
|
||||
#include "nanovg_gl.h"
|
||||
#include "nanovg_gl_utils.h"
|
||||
|
||||
#include "json11.hpp"
|
||||
|
||||
#include "common/framebuffer.h"
|
||||
#include "common/touch.h"
|
||||
#include "common/util.h"
|
||||
#include "selfdrive/common/framebuffer.h"
|
||||
#include "selfdrive/common/touch.h"
|
||||
#include "selfdrive/common/util.h"
|
||||
|
||||
#define USER_AGENT "NEOSUpdater-0.2"
|
||||
|
||||
|
|
|
@ -1,36 +1,35 @@
|
|||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sched.h>
|
||||
#include <errno.h>
|
||||
#include <sched.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <ctime>
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include <bitset>
|
||||
#include <thread>
|
||||
#include <atomic>
|
||||
#include <bitset>
|
||||
#include <cassert>
|
||||
#include <ctime>
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
#include <unordered_map>
|
||||
|
||||
#include <libusb-1.0/libusb.h>
|
||||
|
||||
#include "cereal/gen/cpp/car.capnp.h"
|
||||
|
||||
#include "common/util.h"
|
||||
#include "common/params.h"
|
||||
#include "common/swaglog.h"
|
||||
#include "common/timing.h"
|
||||
#include "messaging.h"
|
||||
#include "locationd/ublox_msg.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 "selfdrive/hardware/hw.h"
|
||||
#include "selfdrive/locationd/ublox_msg.h"
|
||||
|
||||
#include "panda.h"
|
||||
#include "pigeon.h"
|
||||
#include "selfdrive/boardd/panda.h"
|
||||
#include "selfdrive/boardd/pigeon.h"
|
||||
|
||||
#define MAX_IR_POWER 0.5f
|
||||
#define MIN_IR_POWER 0.0f
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "messaging.h"
|
||||
#include "cereal/messaging/messaging.h"
|
||||
|
||||
typedef struct {
|
||||
long address;
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
#include <stdexcept>
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include "selfdrive/boardd/panda.h"
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include "common/swaglog.h"
|
||||
#include "common/gpio.h"
|
||||
#include "common/util.h"
|
||||
#include "messaging.h"
|
||||
#include "panda.h"
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
#include <vector>
|
||||
|
||||
#include "cereal/messaging/messaging.h"
|
||||
#include "selfdrive/common/gpio.h"
|
||||
#include "selfdrive/common/swaglog.h"
|
||||
#include "selfdrive/common/util.h"
|
||||
|
||||
Panda::Panda(){
|
||||
// init libusb
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
#pragma once
|
||||
|
||||
#include <ctime>
|
||||
#include <cstdint>
|
||||
#include <pthread.h>
|
||||
|
||||
#include <atomic>
|
||||
#include <cstdint>
|
||||
#include <ctime>
|
||||
#include <mutex>
|
||||
#include <vector>
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
#include <libusb-1.0/libusb.h>
|
||||
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
#include <cassert>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include "selfdrive/boardd/pigeon.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <termios.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "common/swaglog.h"
|
||||
#include "common/gpio.h"
|
||||
#include "common/util.h"
|
||||
#include <cassert>
|
||||
|
||||
#include "pigeon.h"
|
||||
#include "selfdrive/common/gpio.h"
|
||||
#include "selfdrive/common/swaglog.h"
|
||||
#include "selfdrive/common/util.h"
|
||||
|
||||
// Termios on macos doesn't define all baud rate constants
|
||||
#ifndef B460800
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
#pragma once
|
||||
#include <string>
|
||||
|
||||
#include <termios.h>
|
||||
|
||||
#include <atomic>
|
||||
#include <string>
|
||||
|
||||
#include "panda.h"
|
||||
#include "selfdrive/boardd/panda.h"
|
||||
|
||||
class Pigeon {
|
||||
public:
|
||||
|
|
|
@ -1,31 +1,32 @@
|
|||
#include <thread>
|
||||
#include <chrono>
|
||||
#include <stdio.h>
|
||||
#include "selfdrive/camerad/cameras/camera_common.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
|
||||
#if defined(QCOM) && !defined(QCOM_REPLAY)
|
||||
#include "cameras/camera_qcom.h"
|
||||
#elif QCOM2
|
||||
#include "cameras/camera_qcom2.h"
|
||||
#elif WEBCAM
|
||||
#include "cameras/camera_webcam.h"
|
||||
#else
|
||||
#include "cameras/camera_frame_stream.h"
|
||||
#endif
|
||||
|
||||
#include "camera_common.h"
|
||||
#include <libyuv.h>
|
||||
#include "libyuv.h"
|
||||
#include <jpeglib.h>
|
||||
|
||||
#include "clutil.h"
|
||||
#include "common/params.h"
|
||||
#include "common/swaglog.h"
|
||||
#include "common/util.h"
|
||||
#include "modeldata.h"
|
||||
#include "imgproc/utils.h"
|
||||
#include "selfdrive/camerad/imgproc/utils.h"
|
||||
#include "selfdrive/common/clutil.h"
|
||||
#include "selfdrive/common/modeldata.h"
|
||||
#include "selfdrive/common/params.h"
|
||||
#include "selfdrive/common/swaglog.h"
|
||||
#include "selfdrive/common/util.h"
|
||||
#include "selfdrive/hardware/hw.h"
|
||||
|
||||
#if defined(QCOM) && !defined(QCOM_REPLAY)
|
||||
#include "selfdrive/camerad/cameras/camera_qcom.h"
|
||||
#elif QCOM2
|
||||
#include "selfdrive/camerad/cameras/camera_qcom2.h"
|
||||
#elif WEBCAM
|
||||
#include "selfdrive/camerad/cameras/camera_webcam.h"
|
||||
#else
|
||||
#include "selfdrive/camerad/cameras/camera_frame_stream.h"
|
||||
#endif
|
||||
|
||||
static cl_program build_debayer_program(cl_device_id device_id, cl_context context, const CameraInfo *ci, const CameraBuf *b, const CameraState *s) {
|
||||
char args[4096];
|
||||
snprintf(args, sizeof(args),
|
||||
|
|
|
@ -1,20 +1,21 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <memory>
|
||||
#include <thread>
|
||||
#include "common/mat.h"
|
||||
#include "common/swaglog.h"
|
||||
#include "common/queue.h"
|
||||
#include "visionbuf.h"
|
||||
#include "common/visionimg.h"
|
||||
#include "messaging.h"
|
||||
#include "transforms/rgb_to_yuv.h"
|
||||
|
||||
#include "visionipc.h"
|
||||
#include "visionipc_server.h"
|
||||
#include "cereal/messaging/messaging.h"
|
||||
#include "cereal/visionipc/visionbuf.h"
|
||||
#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"
|
||||
|
||||
#define CAMERA_ID_IMX298 0
|
||||
#define CAMERA_ID_IMX179 1
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#include "camera_frame_stream.h"
|
||||
#include "selfdrive/camerad/cameras/camera_frame_stream.h"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <cassert>
|
||||
|
||||
#include <capnp/dynamic.h>
|
||||
|
||||
#include "messaging.h"
|
||||
#include "common/util.h"
|
||||
#include "cereal/messaging/messaging.h"
|
||||
#include "selfdrive/common/util.h"
|
||||
|
||||
#define FRAME_WIDTH 1164
|
||||
#define FRAME_HEIGHT 874
|
||||
|
|
|
@ -1,32 +1,31 @@
|
|||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
#include "selfdrive/camerad/cameras/camera_qcom.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <math.h>
|
||||
#include <poll.h>
|
||||
#include <pthread.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <atomic>
|
||||
#include <algorithm>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <linux/media.h>
|
||||
#include <algorithm>
|
||||
#include <atomic>
|
||||
|
||||
#include <cutils/properties.h>
|
||||
#include <linux/media.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include "msmb_isp.h"
|
||||
#include "msmb_ispif.h"
|
||||
#include "msmb_camera.h"
|
||||
#include "msm_cam_sensor.h"
|
||||
|
||||
#include "common/util.h"
|
||||
#include "common/timing.h"
|
||||
#include "common/swaglog.h"
|
||||
#include "common/params.h"
|
||||
#include "clutil.h"
|
||||
|
||||
#include "sensor_i2c.h"
|
||||
#include "camera_qcom.h"
|
||||
#include "selfdrive/camerad/cameras/sensor_i2c.h"
|
||||
#include "selfdrive/camerad/include/msm_cam_sensor.h"
|
||||
#include "selfdrive/camerad/include/msmb_camera.h"
|
||||
#include "selfdrive/camerad/include/msmb_isp.h"
|
||||
#include "selfdrive/camerad/include/msmb_ispif.h"
|
||||
#include "selfdrive/common/clutil.h"
|
||||
#include "selfdrive/common/params.h"
|
||||
#include "selfdrive/common/swaglog.h"
|
||||
#include "selfdrive/common/timing.h"
|
||||
#include "selfdrive/common/util.h"
|
||||
|
||||
// leeco actuator (DW9800W H-Bridge Driver IC)
|
||||
// from sniff
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <pthread.h>
|
||||
#include <memory>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <atomic>
|
||||
#include "messaging.h"
|
||||
#include <memory>
|
||||
|
||||
#include "msmb_isp.h"
|
||||
#include "msmb_ispif.h"
|
||||
#include "msmb_camera.h"
|
||||
#include "msm_cam_sensor.h"
|
||||
|
||||
#include "visionbuf.h"
|
||||
|
||||
#include "common/mat.h"
|
||||
#include "common/util.h"
|
||||
#include "imgproc/utils.h"
|
||||
|
||||
#include "camera_common.h"
|
||||
#include "cereal/messaging/messaging.h"
|
||||
#include "cereal/visionipc/visionbuf.h"
|
||||
#include "selfdrive/camerad/cameras/camera_common.h"
|
||||
#include "selfdrive/camerad/imgproc/utils.h"
|
||||
#include "selfdrive/camerad/include/msm_cam_sensor.h"
|
||||
#include "selfdrive/camerad/include/msmb_camera.h"
|
||||
#include "selfdrive/camerad/include/msmb_isp.h"
|
||||
#include "selfdrive/camerad/include/msmb_ispif.h"
|
||||
#include "selfdrive/common/mat.h"
|
||||
#include "selfdrive/common/util.h"
|
||||
|
||||
#define FRAME_BUF_COUNT 4
|
||||
#define METADATA_BUF_COUNT 4
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
@ -11,19 +10,17 @@
|
|||
#include <math.h>
|
||||
#include <atomic>
|
||||
|
||||
#include "common/util.h"
|
||||
#include "common/swaglog.h"
|
||||
#include "camera_qcom2.h"
|
||||
|
||||
#include "media/cam_defs.h"
|
||||
#include "media/cam_isp.h"
|
||||
#include "media/cam_isp_ife.h"
|
||||
#include "media/cam_sensor_cmn_header.h"
|
||||
#include "media/cam_sensor.h"
|
||||
#include "media/cam_sync.h"
|
||||
|
||||
#include "sensor2_i2c.h"
|
||||
|
||||
#include "selfdrive/common/swaglog.h"
|
||||
#include "selfdrive/camerad/cameras/camera_qcom2.h"
|
||||
|
||||
#define FRAME_WIDTH 1928
|
||||
#define FRAME_HEIGHT 1208
|
||||
//#define FRAME_STRIDE 1936 // for 8 bit output
|
||||
|
|
|
@ -4,9 +4,10 @@
|
|||
#include <stdbool.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include "common/util.h"
|
||||
#include "camera_common.h"
|
||||
#include "media/cam_req_mgr.h"
|
||||
#include <media/cam_req_mgr.h>
|
||||
|
||||
#include "selfdrive/camerad/cameras/camera_common.h"
|
||||
#include "selfdrive/common/util.h"
|
||||
|
||||
#define FRAME_BUF_COUNT 4
|
||||
|
||||
|
|
|
@ -1,23 +1,22 @@
|
|||
#include "camera_webcam.h"
|
||||
#include "selfdrive/camerad/cameras/camera_webcam.h"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include "common/util.h"
|
||||
#include "common/timing.h"
|
||||
#include "common/clutil.h"
|
||||
#include "common/swaglog.h"
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wundefined-inline"
|
||||
#include <opencv2/opencv.hpp>
|
||||
#include <opencv2/highgui.hpp>
|
||||
#include <opencv2/core.hpp>
|
||||
#include <opencv2/highgui.hpp>
|
||||
#include <opencv2/opencv.hpp>
|
||||
#include <opencv2/videoio.hpp>
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
#include "selfdrive/common/clutil.h"
|
||||
#include "selfdrive/common/swaglog.h"
|
||||
#include "selfdrive/common/timing.h"
|
||||
#include "selfdrive/common/util.h"
|
||||
|
||||
// id of the video capturing device
|
||||
const int ROAD_CAMERA_ID = getenv("ROADCAM_ID") ? atoi(getenv("ROADCAM_ID")) : 1;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <CL/cl.h>
|
||||
#endif
|
||||
|
||||
#include "camera_common.h"
|
||||
#include "selfdrive/camerad/cameras/camera_common.h"
|
||||
|
||||
#define FRAME_BUF_COUNT 16
|
||||
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
#include "utils.h"
|
||||
#include "selfdrive/camerad/imgproc/utils.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <vector>
|
||||
#include "clutil.h"
|
||||
|
||||
#include "selfdrive/common/clutil.h"
|
||||
|
||||
#define NUM_SEGMENTS_X 8
|
||||
#define NUM_SEGMENTS_Y 6
|
||||
|
|
|
@ -1,29 +1,30 @@
|
|||
#include <thread>
|
||||
#include <stdio.h>
|
||||
#include <poll.h>
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
#include <poll.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/socket.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <thread>
|
||||
|
||||
#include "libyuv.h"
|
||||
|
||||
#include "cereal/visionipc/visionipc_server.h"
|
||||
#include "selfdrive/common/clutil.h"
|
||||
#include "selfdrive/common/params.h"
|
||||
#include "selfdrive/common/swaglog.h"
|
||||
#include "selfdrive/common/util.h"
|
||||
#include "selfdrive/hardware/hw.h"
|
||||
|
||||
#if defined(QCOM) && !defined(QCOM_REPLAY)
|
||||
#include "cameras/camera_qcom.h"
|
||||
#include "selfdrive/camerad/cameras/camera_qcom.h"
|
||||
#elif QCOM2
|
||||
#include "cameras/camera_qcom2.h"
|
||||
#include "selfdrive/camerad/cameras/camera_qcom2.h"
|
||||
#elif WEBCAM
|
||||
#include "cameras/camera_webcam.h"
|
||||
#include "selfdrive/camerad/cameras/camera_webcam.h"
|
||||
#else
|
||||
#include "cameras/camera_frame_stream.h"
|
||||
#include "selfdrive/camerad/cameras/camera_frame_stream.h"
|
||||
#endif
|
||||
|
||||
#include <libyuv.h>
|
||||
|
||||
#include "clutil.h"
|
||||
#include "common/params.h"
|
||||
#include "common/swaglog.h"
|
||||
#include "common/util.h"
|
||||
#include "visionipc_server.h"
|
||||
#include "selfdrive/hardware/hw.h"
|
||||
|
||||
ExitHandler do_exit;
|
||||
|
||||
void party(cl_device_id device_id, cl_context context) {
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
// unittest for set_exposure_target
|
||||
|
||||
#include "ae_gray_test.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <cstring>
|
||||
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
#include "selfdrive/camerad/cameras/camera_common.h"
|
||||
#include "selfdrive/camerad/test/ae_gray_test.h"
|
||||
|
||||
void camera_autoexposure(CameraState *s, float grey_frac) {}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "rgb_to_yuv.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
Rgb2Yuv::Rgb2Yuv(cl_context ctx, cl_device_id device_id, int width, int height, int rgb_stride) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "common/clutil.h"
|
||||
#include "selfdrive/common/clutil.h"
|
||||
|
||||
class Rgb2Yuv {
|
||||
public:
|
||||
|
|
|
@ -1,18 +1,19 @@
|
|||
#include <memory.h>
|
||||
#include <iostream>
|
||||
#include <fcntl.h>
|
||||
#include <getopt.h>
|
||||
#include <math.h>
|
||||
#include <fstream>
|
||||
#include <cstdlib>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <iomanip>
|
||||
#include <thread>
|
||||
#include <fcntl.h>
|
||||
#include <memory.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
|
||||
#ifdef ANDROID
|
||||
|
||||
|
@ -26,13 +27,11 @@
|
|||
|
||||
#endif
|
||||
|
||||
#include <libyuv.h>
|
||||
|
||||
#include <CL/cl.h>
|
||||
|
||||
#include "clutil.h"
|
||||
#include "rgb_to_yuv.h"
|
||||
|
||||
#include "libyuv.h"
|
||||
#include "selfdrive/camerad/transforms/rgb_to_yuv.h"
|
||||
#include "selfdrive/common/clutil.h"
|
||||
|
||||
static inline double millis_since_boot() {
|
||||
struct timespec t;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
// Apple doesn't have timerfd
|
||||
#ifdef __APPLE__
|
||||
|
@ -14,9 +14,9 @@
|
|||
#include <cassert>
|
||||
#include <chrono>
|
||||
|
||||
#include "messaging.h"
|
||||
#include "common/timing.h"
|
||||
#include "common/util.h"
|
||||
#include "cereal/messaging/messaging.h"
|
||||
#include "selfdrive/common/timing.h"
|
||||
#include "selfdrive/common/util.h"
|
||||
|
||||
ExitHandler do_exit;
|
||||
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
#include "clutil.h"
|
||||
#include "selfdrive/common/clutil.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <inttypes.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <memory>
|
||||
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include "util.h"
|
||||
|
||||
#include "selfdrive/common/util.h"
|
||||
|
||||
namespace { // helper functions
|
||||
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
#include "framebuffer.h"
|
||||
#include "util.h"
|
||||
#include "selfdrive/common/framebuffer.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <cassert>
|
||||
|
||||
#include "selfdrive/common/util.h"
|
||||
|
||||
#include <ui/DisplayInfo.h>
|
||||
|
||||
#include <gui/ISurfaceComposer.h>
|
||||
#include <gui/Surface.h>
|
||||
#include <gui/SurfaceComposerClient.h>
|
||||
|
||||
|
||||
#include <GLES2/gl2.h>
|
||||
#include <EGL/eglext.h>
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
#include "hardware/hwcomposer_defs.h"
|
||||
|
||||
bool set_brightness(int brightness);
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <string>
|
||||
#include "selfdrive/common/glutil.h"
|
||||
|
||||
#include "glutil.h"
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
static GLuint load_shader(GLenum shaderType, const char *src) {
|
||||
GLint status = 0, len = 0;
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
#pragma once
|
||||
|
||||
#include <map>
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <OpenGL/gl3.h>
|
||||
#else
|
||||
#include <GLES3/gl3.h>
|
||||
#endif
|
||||
#include <map>
|
||||
|
||||
class GLShader {
|
||||
public:
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
#include "gpio.h"
|
||||
#include "util.h"
|
||||
#include "selfdrive/common/gpio.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "selfdrive/common/util.h"
|
||||
|
||||
// We assume that all pins have already been exported on boot,
|
||||
// and that we have permission to write to them.
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
#include "i2c.h"
|
||||
#include "selfdrive/common/i2c.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <unistd.h>
|
||||
#include <stdexcept>
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include "common/swaglog.h"
|
||||
|
||||
#include "selfdrive/common/swaglog.h"
|
||||
|
||||
#define UNUSED(x) (void)(x)
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ const double X_IDXS[TRAJECTORY_SIZE] = { 0. , 0.1875, 0.75 , 1.6875,
|
|||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include "common/mat.h"
|
||||
#include "selfdrive/common/mat.h"
|
||||
#include "selfdrive/hardware/hw.h"
|
||||
const mat3 fcam_intrinsic_matrix =
|
||||
Hardware::TICI() ? (mat3){{2648.0, 0.0, 1928.0 / 2,
|
||||
|
|
|
@ -1,22 +1,25 @@
|
|||
#include "common/params.h"
|
||||
#include "selfdrive/common/params.h"
|
||||
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif // _GNU_SOURCE
|
||||
|
||||
#include <dirent.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <dirent.h>
|
||||
#include <string.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/stat.h>
|
||||
#include <mutex>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <csignal>
|
||||
#include <string.h>
|
||||
#include <mutex>
|
||||
#include <unordered_map>
|
||||
#include "common/util.h"
|
||||
#include "common/swaglog.h"
|
||||
|
||||
#include "selfdrive/common/swaglog.h"
|
||||
#include "selfdrive/common/util.h"
|
||||
#include "selfdrive/hardware/hw.h"
|
||||
|
||||
// keep trying if x gets interrupted by a signal
|
||||
#define HANDLE_EINTR(x) \
|
||||
({ \
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
#define ERR_NO_VALUE -33
|
||||
|
||||
|
|
|
@ -2,19 +2,19 @@
|
|||
#define _GNU_SOURCE
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include <string.h>
|
||||
#include "swaglog.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <mutex>
|
||||
#include <zmq.h>
|
||||
#include <string>
|
||||
|
||||
#include <zmq.h>
|
||||
#include "json11.hpp"
|
||||
|
||||
#include "common/util.h"
|
||||
#include "common/version.h"
|
||||
#include "selfdrive/common/util.h"
|
||||
#include "selfdrive/common/version.h"
|
||||
#include "selfdrive/hardware/hw.h"
|
||||
#include "swaglog.h"
|
||||
|
||||
class LogState {
|
||||
public:
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#ifndef COMMON_TIMING_H
|
||||
#define COMMON_TIMING_H
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
|
@ -50,5 +49,3 @@ static inline uint64_t nanos_monotonic_raw() {
|
|||
clock_gettime(CLOCK_MONOTONIC_RAW, &t);
|
||||
return t.tv_sec * 1000000000ULL + t.tv_nsec;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
#include "selfdrive/common/touch.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
#include <linux/input.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/poll.h>
|
||||
#include <linux/input.h>
|
||||
|
||||
#include "touch.h"
|
||||
#include <unistd.h>
|
||||
|
||||
/* this macro is used to tell if "bit" is set in "array"
|
||||
* it selects a byte from the array, and does a boolean AND
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
#include <errno.h>
|
||||
#include <sstream>
|
||||
#include "selfdrive/common/util.h"
|
||||
|
||||
#include "common/util.h"
|
||||
#include <errno.h>
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#ifdef __linux__
|
||||
#include <sys/prctl.h>
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
#pragma once
|
||||
|
||||
#include <cstdio>
|
||||
#include <csignal>
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include <atomic>
|
||||
#include <fstream>
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
#include <algorithm>
|
||||
#include <atomic>
|
||||
#include <cassert>
|
||||
#include <chrono>
|
||||
#include <csignal>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <fstream>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
|
||||
#ifndef sighandler_t
|
||||
typedef void (*sighandler_t)(int sig);
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
#include "selfdrive/common/visionimg.h"
|
||||
|
||||
#include <cassert>
|
||||
#include "common/visionimg.h"
|
||||
|
||||
#ifdef QCOM
|
||||
#include <gralloc_priv.h>
|
||||
#include <system/graphics.h>
|
||||
#include <ui/GraphicBuffer.h>
|
||||
#include <ui/PixelFormat.h>
|
||||
#include <gralloc_priv.h>
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GLES2/gl2ext.h>
|
||||
using namespace android;
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
#include <string>
|
||||
#include <cstdint>
|
||||
#include "selfdrive/common/watchdog.h"
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include "common/timing.h"
|
||||
#include "common/util.h"
|
||||
#include "common/watchdog.h"
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
#include "selfdrive/common/timing.h"
|
||||
#include "selfdrive/common/util.h"
|
||||
|
||||
const std::string watchdog_fn_prefix = "/dev/shm/wd_"; // + <pid>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include <math.h>
|
||||
#include <acado_code_generation.hpp>
|
||||
#include "common/modeldata.h"
|
||||
#include "selfdrive/common/modeldata.h"
|
||||
|
||||
#define deg2rad(d) (d/180.0*M_PI)
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#include <cstdlib>
|
||||
#include <fstream>
|
||||
|
||||
|
||||
// no-op base hw class
|
||||
class HardwareNone {
|
||||
public:
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#pragma once
|
||||
|
||||
#include <cstdlib>
|
||||
#include <fstream>
|
||||
|
||||
#include <gui/ISurfaceComposer.h>
|
||||
#include <gui/SurfaceComposerClient.h>
|
||||
#include <hardware/hwcomposer_defs.h>
|
||||
|
||||
#include <cstdlib>
|
||||
#include <fstream>
|
||||
|
||||
#include "selfdrive/common/util.h"
|
||||
#include "selfdrive/hardware/base.h"
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
#include <cstdlib>
|
||||
#include <fstream>
|
||||
|
||||
#include "selfdrive/common/util.h"
|
||||
#include "selfdrive/common/params.h"
|
||||
#include "selfdrive/common/util.h"
|
||||
#include "selfdrive/hardware/base.h"
|
||||
|
||||
class HardwareTici : public HardwareNone {
|
||||
|
|
|
@ -1,21 +1,22 @@
|
|||
#pragma once
|
||||
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <memory>
|
||||
|
||||
#include <eigen3/Eigen/Dense>
|
||||
#include <fstream>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "messaging.h"
|
||||
#include "common/params.h"
|
||||
#include "common/util.h"
|
||||
#include "common/swaglog.h"
|
||||
#include "common/timing.h"
|
||||
#include "cereal/messaging/messaging.h"
|
||||
#include "common/transformations/coordinates.hpp"
|
||||
#include "common/transformations/orientation.hpp"
|
||||
#include "selfdrive/sensord/sensors/constants.h"
|
||||
#include "selfdrive/common/params.h"
|
||||
#include "selfdrive/common/swaglog.h"
|
||||
#include "selfdrive/common/timing.h"
|
||||
#include "selfdrive/common/util.h"
|
||||
|
||||
#include "models/live_kf.h"
|
||||
#include "selfdrive/sensord/sensors/constants.h"
|
||||
#define VISION_DECIMATION 2
|
||||
#define SENSOR_DECIMATION 10
|
||||
#include "selfdrive/locationd/models/live_kf.h"
|
||||
|
||||
#define POSENET_STD_HIST_HALF 20
|
||||
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
#include "ublox_msg.h"
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <chrono>
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <unistd.h>
|
||||
#include <cmath>
|
||||
#include <ctime>
|
||||
#include <chrono>
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "common/swaglog.h"
|
||||
|
||||
#include "ublox_msg.h"
|
||||
#include "selfdrive/common/swaglog.h"
|
||||
|
||||
const double gpsPi = 3.1415926535898;
|
||||
#define UBLOX_MSG_SIZE(hdr) (*(uint16_t *)&hdr[4])
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "messaging.h"
|
||||
#include "generated/ubx.h"
|
||||
#include "generated/gps.h"
|
||||
#include "cereal/messaging/messaging.h"
|
||||
#include "selfdrive/locationd/generated/gps.h"
|
||||
#include "selfdrive/locationd/generated/ubx.h"
|
||||
|
||||
// protocol constants
|
||||
namespace ublox {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#include "messaging.h"
|
||||
#include "common/util.h"
|
||||
#include "common/swaglog.h"
|
||||
#include <kaitai/kaitaistream.h>
|
||||
|
||||
#include "ublox_msg.h"
|
||||
#include "kaitai/kaitaistream.h"
|
||||
#include "cereal/messaging/messaging.h"
|
||||
#include "selfdrive/common/swaglog.h"
|
||||
#include "selfdrive/common/util.h"
|
||||
#include "selfdrive/locationd/ublox_msg.h"
|
||||
|
||||
ExitHandler do_exit;
|
||||
using namespace ublox;
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
#include <log/logger.h>
|
||||
#include <log/logprint.h>
|
||||
|
||||
#include "common/util.h"
|
||||
#include "messaging.h"
|
||||
#include "cereal/messaging/messaging.h"
|
||||
#include "selfdrive/common/util.h"
|
||||
|
||||
int main() {
|
||||
setpriority(PRIO_PROCESS, 0, -15);
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
#include <iostream>
|
||||
#include <cassert>
|
||||
#include <csignal>
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
#include "json11.hpp"
|
||||
#include <systemd/sd-journal.h>
|
||||
|
||||
#include "common/timing.h"
|
||||
#include "common/util.h"
|
||||
#include "messaging.h"
|
||||
#include <cassert>
|
||||
#include <csignal>
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#include "json11.hpp"
|
||||
|
||||
#include "cereal/messaging/messaging.h"
|
||||
#include "selfdrive/common/timing.h"
|
||||
#include "selfdrive/common/util.h"
|
||||
|
||||
ExitHandler do_exit;
|
||||
int main(int argc, char *argv[]) {
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
#include <assert.h>
|
||||
|
||||
#include <string>
|
||||
#include "common/swaglog.h"
|
||||
#include "logger.h"
|
||||
#include "messaging.h"
|
||||
|
||||
#include "cereal/messaging/messaging.h"
|
||||
#include "selfdrive/common/swaglog.h"
|
||||
#include "selfdrive/loggerd/logger.h"
|
||||
|
||||
static kj::Array<capnp::word> build_boot_log() {
|
||||
MessageBuilder msg;
|
||||
|
|
|
@ -1,28 +1,27 @@
|
|||
#include "selfdrive/loggerd/logger.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <time.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <streambuf>
|
||||
#ifdef QCOM
|
||||
#include <cutils/properties.h>
|
||||
#endif
|
||||
|
||||
#include "common/swaglog.h"
|
||||
#include "common/params.h"
|
||||
#include "common/version.h"
|
||||
#include "messaging.h"
|
||||
#include "selfdrive/hardware/hw.h"
|
||||
#include "logger.h"
|
||||
|
||||
#include "cereal/messaging/messaging.h"
|
||||
#include "selfdrive/common/params.h"
|
||||
#include "selfdrive/common/swaglog.h"
|
||||
#include "selfdrive/common/version.h"
|
||||
|
||||
// ***** logging helpers *****
|
||||
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <pthread.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <bzlib.h>
|
||||
#include <kj/array.h>
|
||||
#include <capnp/serialize.h>
|
||||
#include "common/util.h"
|
||||
#include <kj/array.h>
|
||||
|
||||
#include "selfdrive/common/util.h"
|
||||
#include "selfdrive/common/swaglog.h"
|
||||
#include "selfdrive/hardware/hw.h"
|
||||
|
||||
const std::string LOG_ROOT =
|
||||
|
|
|
@ -1,41 +1,40 @@
|
|||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstdint>
|
||||
#include <cassert>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <ftw.h>
|
||||
#include <inttypes.h>
|
||||
#include <pthread.h>
|
||||
#include <string.h>
|
||||
#include <sys/resource.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <atomic>
|
||||
#include <cassert>
|
||||
#include <condition_variable>
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <mutex>
|
||||
#include <random>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <mutex>
|
||||
#include <condition_variable>
|
||||
#include <atomic>
|
||||
#include <random>
|
||||
|
||||
#include <ftw.h>
|
||||
|
||||
#include "common/timing.h"
|
||||
#include "common/params.h"
|
||||
#include "common/swaglog.h"
|
||||
#include "common/util.h"
|
||||
#include "camerad/cameras/camera_common.h"
|
||||
#include "logger.h"
|
||||
#include "messaging.h"
|
||||
#include "services.h"
|
||||
#include "cereal/messaging/messaging.h"
|
||||
#include "cereal/services.h"
|
||||
#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 "selfdrive/hardware/hw.h"
|
||||
#include "visionipc.h"
|
||||
#include "visionipc_client.h"
|
||||
|
||||
#include "encoder.h"
|
||||
#include "selfdrive/loggerd/encoder.h"
|
||||
#include "selfdrive/loggerd/logger.h"
|
||||
#if defined(QCOM) || defined(QCOM2)
|
||||
#include "omx_encoder.h"
|
||||
#include "selfdrive/loggerd/omx_encoder.h"
|
||||
#define Encoder OmxEncoder
|
||||
#else
|
||||
#include "raw_logger.h"
|
||||
#include "selfdrive/loggerd/raw_logger.h"
|
||||
#define Encoder RawLogger
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,25 +1,24 @@
|
|||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include "selfdrive/loggerd/omx_encoder.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <unistd.h>
|
||||
#include <assert.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <OMX_Component.h>
|
||||
#include <OMX_IndexExt.h>
|
||||
#include <OMX_VideoExt.h>
|
||||
#include <OMX_QCOMExtns.h>
|
||||
#include <OMX_VideoExt.h>
|
||||
#include "libyuv.h"
|
||||
|
||||
#include <libyuv.h>
|
||||
#include <msm_media_info.h>
|
||||
|
||||
#include "common/util.h"
|
||||
#include "common/swaglog.h"
|
||||
|
||||
#include "omx_encoder.h"
|
||||
#include "selfdrive/common/swaglog.h"
|
||||
#include "selfdrive/common/util.h"
|
||||
#include "selfdrive/loggerd/include/msm_media_info.h"
|
||||
|
||||
// Check the OMX error code and assert if an error occurred.
|
||||
#define OMX_CHECK(_expr) \
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <vector>
|
||||
#include <OMX_Component.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <OMX_Component.h>
|
||||
extern "C" {
|
||||
#include <libavformat/avformat.h>
|
||||
}
|
||||
|
||||
#include "encoder.h"
|
||||
#include "common/queue.h"
|
||||
#include "selfdrive/common/queue.h"
|
||||
#include "selfdrive/loggerd/encoder.h"
|
||||
|
||||
// OmxEncoder, lossey codec using hardware hevc
|
||||
class OmxEncoder : public VideoEncoder {
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cassert>
|
||||
#include "selfdrive/loggerd/raw_logger.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
#define __STDC_CONSTANT_MACROS
|
||||
|
||||
extern "C" {
|
||||
#include <libavutil/imgutils.h>
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavformat/avformat.h>
|
||||
#include <libavutil/imgutils.h>
|
||||
}
|
||||
|
||||
#include "common/swaglog.h"
|
||||
#include "common/util.h"
|
||||
|
||||
#include "raw_logger.h"
|
||||
#include "selfdrive/common/swaglog.h"
|
||||
#include "selfdrive/common/util.h"
|
||||
|
||||
RawLogger::RawLogger(const char* filename, int width, int height, int fps,
|
||||
int bitrate, bool h265, bool downscale)
|
||||
|
|
|
@ -2,17 +2,16 @@
|
|||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
extern "C" {
|
||||
#include <libavutil/imgutils.h>
|
||||
#include <libavcodec/avcodec.h>
|
||||
#include <libavformat/avformat.h>
|
||||
#include <libavutil/imgutils.h>
|
||||
}
|
||||
|
||||
#include "encoder.h"
|
||||
#include "selfdrive/loggerd/encoder.h"
|
||||
|
||||
class RawLogger : public VideoEncoder {
|
||||
public:
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <zmq.h>
|
||||
|
||||
#include "common/visionipc.h"
|
||||
#include "common/timing.h"
|
||||
#include "common/util.h"
|
||||
#include "RawLogger.h"
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "selfdrive/common/timing.h"
|
||||
#include "selfdrive/common/util.h"
|
||||
#include "selfdrive/common/visionipc.h"
|
||||
#include "selfdrive/loggerd/raw_logger.h"
|
||||
|
||||
int main() {
|
||||
int err;
|
||||
|
|
|
@ -1,16 +1,12 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/resource.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "visionipc_client.h"
|
||||
#include "common/swaglog.h"
|
||||
#include "common/util.h"
|
||||
|
||||
#include "models/dmonitoring.h"
|
||||
|
||||
#ifndef PATH_MAX
|
||||
#include <linux/limits.h>
|
||||
#endif
|
||||
#include "cereal/visionipc/visionipc_client.h"
|
||||
#include "selfdrive/common/swaglog.h"
|
||||
#include "selfdrive/common/util.h"
|
||||
#include "selfdrive/modeld/models/dmonitoring.h"
|
||||
|
||||
ExitHandler do_exit;
|
||||
|
||||
|
|
|
@ -1,16 +1,18 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <mutex>
|
||||
|
||||
#include <eigen3/Eigen/Dense>
|
||||
|
||||
#include "visionipc_client.h"
|
||||
#include "common/swaglog.h"
|
||||
#include "common/clutil.h"
|
||||
#include "common/util.h"
|
||||
#include "common/params.h"
|
||||
#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 "selfdrive/hardware/hw.h"
|
||||
#include "models/driving.h"
|
||||
#include "messaging.h"
|
||||
#include "selfdrive/modeld/models/driving.h"
|
||||
|
||||
ExitHandler do_exit;
|
||||
// globals
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
#include "commonmodel.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include "commonmodel.h"
|
||||
#include "common/clutil.h"
|
||||
#include "common/mat.h"
|
||||
#include "common/timing.h"
|
||||
|
||||
#include "selfdrive/common/clutil.h"
|
||||
#include "selfdrive/common/mat.h"
|
||||
#include "selfdrive/common/timing.h"
|
||||
|
||||
void frame_init(ModelFrame* frame, int width, int height,
|
||||
cl_device_id device_id, cl_context context) {
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#include <float.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
|
||||
#ifdef __APPLE__
|
||||
#include <OpenCL/cl.h>
|
||||
|
@ -6,11 +10,9 @@
|
|||
#include <CL/cl.h>
|
||||
#endif
|
||||
|
||||
#include <float.h>
|
||||
#include <stdlib.h>
|
||||
#include "common/mat.h"
|
||||
#include "transforms/transform.h"
|
||||
#include "transforms/loadyuv.h"
|
||||
#include "selfdrive/common/mat.h"
|
||||
#include "selfdrive/modeld/transforms/loadyuv.h"
|
||||
#include "selfdrive/modeld/transforms/transform.h"
|
||||
|
||||
const bool send_raw_pred = getenv("SEND_RAW_PRED") != NULL;
|
||||
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
#include <string.h>
|
||||
#include <libyuv.h>
|
||||
#include "selfdrive/hardware/hw.h"
|
||||
#include "dmonitoring.h"
|
||||
#include "common/mat.h"
|
||||
#include "common/timing.h"
|
||||
#include "common/params.h"
|
||||
#include "selfdrive/modeld/models/dmonitoring.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "libyuv.h"
|
||||
|
||||
#include "selfdrive/common/mat.h"
|
||||
#include "selfdrive/common/params.h"
|
||||
#include "selfdrive/common/timing.h"
|
||||
#include "selfdrive/hardware/hw.h"
|
||||
|
||||
#define MODEL_WIDTH 320
|
||||
#define MODEL_HEIGHT 640
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include "common/util.h"
|
||||
#include "commonmodel.h"
|
||||
#include "runners/run.h"
|
||||
#include "messaging.h"
|
||||
|
||||
#include "cereal/messaging/messaging.h"
|
||||
#include "selfdrive/common/util.h"
|
||||
#include "selfdrive/modeld/models/commonmodel.h"
|
||||
#include "selfdrive/modeld/runners/run.h"
|
||||
|
||||
#define OUTPUT_SIZE 38
|
||||
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
|
||||
#include <string.h>
|
||||
#include "driving.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <eigen3/Eigen/Dense>
|
||||
|
||||
#include "common/timing.h"
|
||||
#include "common/params.h"
|
||||
#include "driving.h"
|
||||
#include "clutil.h"
|
||||
#include "selfdrive/common/clutil.h"
|
||||
#include "selfdrive/common/params.h"
|
||||
#include "selfdrive/common/timing.h"
|
||||
|
||||
constexpr int DESIRE_PRED_SIZE = 32;
|
||||
constexpr int OTHER_META_SIZE = 4;
|
||||
|
|
|
@ -5,15 +5,14 @@
|
|||
#define DESIRE
|
||||
#define TRAFFIC_CONVENTION
|
||||
|
||||
#include "common/mat.h"
|
||||
#include "common/util.h"
|
||||
#include "common/modeldata.h"
|
||||
|
||||
#include "commonmodel.h"
|
||||
#include "runners/run.h"
|
||||
|
||||
#include <memory>
|
||||
#include "messaging.h"
|
||||
|
||||
#include "cereal/messaging/messaging.h"
|
||||
#include "selfdrive/common/mat.h"
|
||||
#include "selfdrive/common/modeldata.h"
|
||||
#include "selfdrive/common/util.h"
|
||||
#include "selfdrive/modeld/models/commonmodel.h"
|
||||
#include "selfdrive/modeld/runners/run.h"
|
||||
|
||||
constexpr int DESIRE_LEN = 8;
|
||||
constexpr int TRAFFIC_CONVENTION_LEN = 2;
|
||||
|
|
|
@ -1,16 +1,18 @@
|
|||
#include "onnxmodel.h"
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
#include <string.h>
|
||||
|
||||
#include <poll.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdexcept>
|
||||
#include "common/util.h"
|
||||
#include "common/swaglog.h"
|
||||
#include <cassert>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
#include "selfdrive/common/swaglog.h"
|
||||
#include "selfdrive/common/util.h"
|
||||
|
||||
ONNXModel::ONNXModel(const char *path, float *_output, size_t _output_size, int runtime) {
|
||||
output = _output;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#ifndef ONNXMODEL_H
|
||||
#define ONNXMODEL_H
|
||||
#pragma once
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "runmodel.h"
|
||||
|
||||
#include "selfdrive/modeld/runners/runmodel.h"
|
||||
|
||||
class ONNXModel : public RunModel {
|
||||
public:
|
||||
|
@ -32,5 +32,3 @@ private:
|
|||
int pipeout[2];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
#ifndef RUNMODEL_H
|
||||
#define RUNMODEL_H
|
||||
|
||||
#pragma once
|
||||
class RunModel {
|
||||
public:
|
||||
virtual void addRecurrent(float *state, int state_size) {}
|
||||
|
@ -9,5 +7,3 @@ public:
|
|||
virtual void execute(float *net_input_buf, int buf_size) {}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
#pragma clang diagnostic ignored "-Wexceptions"
|
||||
|
||||
#include <cassert>
|
||||
#include <string.h>
|
||||
#include "selfdrive/modeld/runners/snpemodel.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "common/util.h"
|
||||
#include "snpemodel.h"
|
||||
#include <string.h>
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include "selfdrive/common/util.h"
|
||||
|
||||
void PrintErrorStringAndExit() {
|
||||
std::cerr << zdl::DlSystem::getLastErrorString() << std::endl;
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
#ifndef SNPEMODEL_H
|
||||
#define SNPEMODEL_H
|
||||
#pragma once
|
||||
|
||||
#include <SNPE/SNPE.hpp>
|
||||
#include <SNPE/SNPEBuilder.hpp>
|
||||
#include <SNPE/SNPEFactory.hpp>
|
||||
#include <DlContainer/IDlContainer.hpp>
|
||||
#include <DlSystem/DlError.hpp>
|
||||
#include <DlSystem/ITensor.hpp>
|
||||
#include <DlSystem/ITensorFactory.hpp>
|
||||
#include <DlSystem/IUserBuffer.hpp>
|
||||
#include <DlSystem/IUserBufferFactory.hpp>
|
||||
#include <SNPE/SNPE.hpp>
|
||||
#include <SNPE/SNPEBuilder.hpp>
|
||||
#include <SNPE/SNPEFactory.hpp>
|
||||
|
||||
#include "runmodel.h"
|
||||
|
||||
|
@ -18,7 +17,7 @@
|
|||
#define USE_DSP_RUNTIME 2
|
||||
|
||||
#ifdef USE_THNEED
|
||||
#include "thneed/thneed.h"
|
||||
#include "selfdrive/modeld/thneed/thneed.h"
|
||||
#endif
|
||||
|
||||
class SNPEModel : public RunModel {
|
||||
|
@ -63,6 +62,3 @@ private:
|
|||
float *desire;
|
||||
std::unique_ptr<zdl::DlSystem::IUserBuffer> desireBuffer;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "thneedmodel.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
ThneedModel::ThneedModel(const char *path, float *loutput, size_t loutput_size, int runtime) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "runmodel.h"
|
||||
#include "thneed/thneed.h"
|
||||
#include "selfdrive/modeld/runners/runmodel.h"
|
||||
#include "selfdrive/modeld/thneed/thneed.h"
|
||||
|
||||
class ThneedModel : public RunModel {
|
||||
public:
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <string.h>
|
||||
#include "thneed.h"
|
||||
#include "../runners/snpemodel.h"
|
||||
|
||||
#include "selfdrive/modeld/runners/snpemodel.h"
|
||||
#include "selfdrive/modeld/thneed/thneed.h"
|
||||
|
||||
#define TEMPORAL_SIZE 512
|
||||
#define DESIRE_LEN 8
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
#include <set>
|
||||
#include <assert.h>
|
||||
#include "thneed.h"
|
||||
|
||||
#include <set>
|
||||
|
||||
#include "json11.hpp"
|
||||
#include "selfdrive/modeld/thneed/thneed.h"
|
||||
using namespace json11;
|
||||
|
||||
extern map<cl_program, string> g_program_source;
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
#include <cassert>
|
||||
#include <sys/mman.h>
|
||||
#include "selfdrive/modeld/thneed/thneed.h"
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include "common/timing.h"
|
||||
#include "common/clutil.h"
|
||||
#include "thneed.h"
|
||||
|
||||
#include "selfdrive/common/clutil.h"
|
||||
#include "selfdrive/common/timing.h"
|
||||
|
||||
//#define RUN_DISASSEMBLER
|
||||
//#define RUN_OPTIMIZER
|
||||
|
|
|
@ -4,13 +4,15 @@
|
|||
#define __user __attribute__(())
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <CL/cl.h>
|
||||
#include <stdint.h>
|
||||
#include "include/msm_kgsl.h"
|
||||
#include <vector>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <CL/cl.h>
|
||||
#include <vector>
|
||||
|
||||
#include "selfdrive/modeld/thneed/include/msm_kgsl.h"
|
||||
|
||||
#define THNEED_RECORD 1
|
||||
#define THNEED_DEBUG 2
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include "loadyuv.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
void loadyuv_init(LoadYUVState* s, cl_context ctx, cl_device_id device_id, int width, int height) {
|
||||
memset(s, 0, sizeof(*s));
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
|
||||
#include <inttypes.h>
|
||||
#include <stdbool.h>
|
||||
#include "clutil.h"
|
||||
|
||||
#include "selfdrive/common/clutil.h"
|
||||
|
||||
typedef struct {
|
||||
int width, height;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "clutil.h"
|
||||
|
||||
#include "transform.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "selfdrive/common/clutil.h"
|
||||
|
||||
void transform_init(Transform* s, cl_context ctx, cl_device_id device_id) {
|
||||
memset(s, 0, sizeof(*s));
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include <CL/cl.h>
|
||||
#endif
|
||||
|
||||
#include "common/mat.h"
|
||||
#include "selfdrive/common/mat.h"
|
||||
|
||||
typedef struct {
|
||||
cl_kernel krnl;
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
#include <CL/cl.h>
|
||||
#endif
|
||||
|
||||
#include "clutil.h"
|
||||
#include "transforms/transform.h"
|
||||
#include "selfdrive/common/clutil.h"
|
||||
#include "selfdrive/modeld/transforms/transform.h"
|
||||
|
||||
typedef struct {
|
||||
int disable_model;
|
||||
|
|
|
@ -1,24 +1,22 @@
|
|||
#include <unistd.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <climits>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <climits>
|
||||
#include <cassert>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <sstream>
|
||||
#include <fstream>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
|
||||
#include "messaging.h"
|
||||
|
||||
#include "common/timing.h"
|
||||
#include "common/util.h"
|
||||
#include "cereal/messaging/messaging.h"
|
||||
#include "selfdrive/common/timing.h"
|
||||
#include "selfdrive/common/util.h"
|
||||
|
||||
ExitHandler do_exit;
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#ifndef LIBDIAG_H
|
||||
#define LIBDIAG_H
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
@ -36,5 +35,3 @@ int diag_send_dci_async_req(int client_id, unsigned char buf[], int bytes, unsig
|
|||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#include <cassert>
|
||||
#include "common/swaglog.h"
|
||||
#include "common/timing.h"
|
||||
|
||||
#include "bmx055_accel.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include "selfdrive/common/swaglog.h"
|
||||
#include "selfdrive/common/timing.h"
|
||||
|
||||
BMX055_Accel::BMX055_Accel(I2CBus *bus) : I2CSensor(bus) {}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "sensors/i2c_sensor.h"
|
||||
#include "selfdrive/sensord/sensors/i2c_sensor.h"
|
||||
|
||||
// Address of the chip on the bus
|
||||
#define BMX055_ACCEL_I2C_ADDR 0x18
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
#include "bmx055_gyro.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
#include "common/swaglog.h"
|
||||
|
||||
#include "bmx055_gyro.h"
|
||||
#include "selfdrive/common/swaglog.h"
|
||||
|
||||
#define DEG2RAD(x) ((x) * M_PI / 180.0)
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "sensors/i2c_sensor.h"
|
||||
#include "selfdrive/sensord/sensors/i2c_sensor.h"
|
||||
|
||||
// Address of the chip on the bus
|
||||
#define BMX055_GYRO_I2C_ADDR 0x68
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
#include <cassert>
|
||||
#include <cstdio>
|
||||
#include <algorithm>
|
||||
#include "bmx055_magn.h"
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include "common/swaglog.h"
|
||||
#include "common/util.h"
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstdio>
|
||||
|
||||
#include "bmx055_magn.h"
|
||||
#include "selfdrive/common/swaglog.h"
|
||||
#include "selfdrive/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;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
#include <tuple>
|
||||
|
||||
#include "sensors/i2c_sensor.h"
|
||||
#include "selfdrive/sensord/sensors/i2c_sensor.h"
|
||||
|
||||
// Address of the chip on the bus
|
||||
#define BMX055_MAGN_I2C_ADDR 0x10
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#include <cassert>
|
||||
#include "common/swaglog.h"
|
||||
#include "common/timing.h"
|
||||
|
||||
#include "bmx055_temp.h"
|
||||
#include "bmx055_accel.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include "selfdrive/sensord/sensors/bmx055_accel.h"
|
||||
#include "selfdrive/common/swaglog.h"
|
||||
#include "selfdrive/common/timing.h"
|
||||
|
||||
BMX055_Temp::BMX055_Temp(I2CBus *bus) : I2CSensor(bus) {}
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "sensors/i2c_sensor.h"
|
||||
#include "sensors/bmx055_accel.h"
|
||||
|
||||
#include "selfdrive/sensord/sensors/bmx055_accel.h"
|
||||
#include "selfdrive/sensord/sensors/i2c_sensor.h"
|
||||
|
||||
class BMX055_Temp : public I2CSensor {
|
||||
uint8_t get_device_address() {return BMX055_ACCEL_I2C_ADDR;}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#include "file_sensor.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include "file_sensor.h"
|
||||
|
||||
FileSensor::FileSensor(std::string filename) : file(filename) {
|
||||
}
|
||||
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
#include <string>
|
||||
|
||||
#include "cereal/gen/cpp/log.capnp.h"
|
||||
#include "sensors/sensor.h"
|
||||
|
||||
#include "selfdrive/sensord/sensors/sensor.h"
|
||||
|
||||
class FileSensor : public Sensor {
|
||||
protected:
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <iostream>
|
||||
#include "i2c_sensor.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
int16_t read_12_bit(uint8_t lsb, uint8_t msb){
|
||||
uint16_t combined = (uint16_t(msb) << 8) | uint16_t(lsb & 0xF0);
|
||||
return int16_t(combined) / (1 << 4);
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#include "cereal/gen/cpp/log.capnp.h"
|
||||
#include "common/i2c.h"
|
||||
#include "sensors/sensor.h"
|
||||
#include "sensors/constants.h"
|
||||
#include "selfdrive/common/i2c.h"
|
||||
#include "selfdrive/sensord/sensors/constants.h"
|
||||
#include "selfdrive/sensord/sensors/sensor.h"
|
||||
|
||||
int16_t read_12_bit(uint8_t lsb, uint8_t msb);
|
||||
int16_t read_16_bit(uint8_t lsb, uint8_t msb);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue