diff --git a/.github/workflows/selfdrive_tests.yaml b/.github/workflows/selfdrive_tests.yaml index 5bd9acc200..fedeaa734b 100644 --- a/.github/workflows/selfdrive_tests.yaml +++ b/.github/workflows/selfdrive_tests.yaml @@ -310,7 +310,7 @@ jobs: ./selfdrive/loggerd/tests/test_logger &&\ ./system/proclogd/tests/test_proclog && \ ./selfdrive/ui/replay/tests/test_replay && \ - ./selfdrive/camerad/test/ae_gray_test && \ + ./system/camerad/test/ae_gray_test && \ coverage xml" - name: "Upload coverage to Codecov" uses: codecov/codecov-action@v2 diff --git a/Jenkinsfile b/Jenkinsfile index 279716d7cf..dba1f257d6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -139,8 +139,8 @@ pipeline { steps { phone_steps("tici-party", [ ["build", "cd selfdrive/manager && ./build.py"], - ["test camerad", "python selfdrive/camerad/test/test_camerad.py"], - ["test exposure", "python selfdrive/camerad/test/test_exposure.py"], + ["test camerad", "python system/camerad/test/test_camerad.py"], + ["test exposure", "python system/camerad/test/test_exposure.py"], ]) } } diff --git a/SConstruct b/SConstruct index b5c4edc99b..b243a4dc45 100644 --- a/SConstruct +++ b/SConstruct @@ -94,7 +94,7 @@ if arch == "larch64": "/usr/lib/aarch64-linux-gnu" ] cpppath += [ - "#selfdrive/camerad/include", + "#system/camerad/include", ] cflags = ["-DQCOM2", "-mcpu=cortex-a57"] cxxflags = ["-DQCOM2", "-mcpu=cortex-a57"] @@ -379,6 +379,7 @@ SConscript(['rednose/SConscript']) # Build system services SConscript([ + 'system/camerad/SConscript', 'system/clocksd/SConscript', 'system/proclogd/SConscript', ]) @@ -396,7 +397,6 @@ SConscript(['third_party/SConscript']) SConscript(['common/kalman/SConscript']) SConscript(['common/transformations/SConscript']) -SConscript(['selfdrive/camerad/SConscript']) SConscript(['selfdrive/modeld/SConscript']) SConscript(['selfdrive/controls/lib/cluster/SConscript']) diff --git a/docs/c_docs.rst b/docs/c_docs.rst index 218cd5a7d9..4e1e8a247a 100644 --- a/docs/c_docs.rst +++ b/docs/c_docs.rst @@ -28,11 +28,11 @@ selfdrive camerad ^^^^^^^ .. autodoxygenindex:: - :project: selfdrive_camerad_cameras + :project: system_camerad_cameras .. autodoxygenindex:: - :project: selfdrive_camerad_transforms + :project: system_camerad_transforms .. autodoxygenindex:: - :project: selfdrive_camerad_imgproc + :project: system_camerad_imgproc locationd ^^^^^^^^^ diff --git a/release/files_common b/release/files_common index e84c668732..ecb71b4e69 100644 --- a/release/files_common +++ b/release/files_common @@ -182,6 +182,7 @@ selfdrive/controls/lib/longitudinal_mpc_lib/.gitignore selfdrive/controls/lib/lateral_mpc_lib/* selfdrive/controls/lib/longitudinal_mpc_lib/* +selfdrive/hardware system/hardware/__init__.py system/hardware/base.h system/hardware/base.py @@ -298,24 +299,24 @@ selfdrive/ui/replay/*.h selfdrive/ui/qt/maps/*.cc selfdrive/ui/qt/maps/*.h -selfdrive/camerad/SConscript -selfdrive/camerad/main.cc +system/camerad/SConscript +system/camerad/main.cc -selfdrive/camerad/snapshot/* -selfdrive/camerad/include/* -selfdrive/camerad/cameras/camera_common.h -selfdrive/camerad/cameras/camera_common.cc -selfdrive/camerad/cameras/sensor2_i2c.h +system/camerad/snapshot/* +system/camerad/include/* +system/camerad/cameras/camera_common.h +system/camerad/cameras/camera_common.cc +system/camerad/cameras/sensor2_i2c.h -selfdrive/camerad/transforms/rgb_to_yuv.cc -selfdrive/camerad/transforms/rgb_to_yuv.h -selfdrive/camerad/transforms/rgb_to_yuv.cl -selfdrive/camerad/transforms/rgb_to_yuv_test.cc +system/camerad/transforms/rgb_to_yuv.cc +system/camerad/transforms/rgb_to_yuv.h +system/camerad/transforms/rgb_to_yuv.cl +system/camerad/transforms/rgb_to_yuv_test.cc -selfdrive/camerad/imgproc/conv.cl -selfdrive/camerad/imgproc/pool.cl -selfdrive/camerad/imgproc/utils.cc -selfdrive/camerad/imgproc/utils.h +system/camerad/imgproc/conv.cl +system/camerad/imgproc/pool.cl +system/camerad/imgproc/utils.cc +system/camerad/imgproc/utils.h selfdrive/manager/__init__.py selfdrive/manager/build.py diff --git a/release/files_tici b/release/files_tici index 485a898799..f8c0a27959 100644 --- a/release/files_tici +++ b/release/files_tici @@ -7,9 +7,9 @@ system/timezoned.py selfdrive/assets/navigation/* selfdrive/assets/training_wide/* -selfdrive/camerad/cameras/camera_qcom2.cc -selfdrive/camerad/cameras/camera_qcom2.h -selfdrive/camerad/cameras/real_debayer.cl +system/camerad/cameras/camera_qcom2.cc +system/camerad/cameras/camera_qcom2.h +system/camerad/cameras/real_debayer.cl selfdrive/ui/qt/spinner_larch64 selfdrive/ui/qt/text_larch64 diff --git a/selfdrive/athena/athenad.py b/selfdrive/athena/athenad.py index 26220dfa99..b0e138c495 100755 --- a/selfdrive/athena/athenad.py +++ b/selfdrive/athena/athenad.py @@ -493,7 +493,7 @@ def getNetworks(): @dispatcher.add_method def takeSnapshot(): - from selfdrive.camerad.snapshot.snapshot import jpeg_write, snapshot + from system.camerad.snapshot.snapshot import jpeg_write, snapshot ret = snapshot() if ret is not None: def b64jpeg(x): diff --git a/selfdrive/loggerd/encoder/encoder.h b/selfdrive/loggerd/encoder/encoder.h index 312b68ba19..21ef65cf12 100644 --- a/selfdrive/loggerd/encoder/encoder.h +++ b/selfdrive/loggerd/encoder/encoder.h @@ -8,7 +8,7 @@ #include "cereal/visionipc/visionipc.h" #include "common/queue.h" #include "selfdrive/loggerd/video_writer.h" -#include "selfdrive/camerad/cameras/camera_common.h" +#include "system/camerad/cameras/camera_common.h" #define V4L2_BUF_FLAG_KEYFRAME 8 diff --git a/selfdrive/loggerd/loggerd.h b/selfdrive/loggerd/loggerd.h index 7e13e90e63..2c4990086a 100644 --- a/selfdrive/loggerd/loggerd.h +++ b/selfdrive/loggerd/loggerd.h @@ -15,7 +15,7 @@ #include "cereal/services.h" #include "cereal/visionipc/visionipc.h" #include "cereal/visionipc/visionipc_client.h" -#include "selfdrive/camerad/cameras/camera_common.h" +#include "system/camerad/cameras/camera_common.h" #include "common/params.h" #include "common/swaglog.h" #include "common/timing.h" diff --git a/selfdrive/manager/process_config.py b/selfdrive/manager/process_config.py index a9a5c78a7f..7e4029664d 100644 --- a/selfdrive/manager/process_config.py +++ b/selfdrive/manager/process_config.py @@ -18,6 +18,8 @@ def logging(started, params, CP: car.CarParams) -> bool: return started and run procs = [ + # due to qualcomm kernel bugs SIGKILLing camerad sometimes causes page table corruption + NativeProcess("camerad", "system/camerad", ["./camerad"], unkillable=True, callback=driverview), NativeProcess("clocksd", "system/clocksd", ["./clocksd"]), NativeProcess("logcatd", "system/logcatd", ["./logcatd"]), NativeProcess("proclogd", "system/proclogd", ["./proclogd"]), @@ -25,8 +27,6 @@ procs = [ PythonProcess("timezoned", "system.timezoned", enabled=not PC, offroad=True), DaemonProcess("manage_athenad", "selfdrive.athena.manage_athenad", "AthenadPid"), - # due to qualcomm kernel bugs SIGKILLing camerad sometimes causes page table corruption - NativeProcess("camerad", "selfdrive/camerad", ["./camerad"], unkillable=True, callback=driverview), NativeProcess("dmonitoringmodeld", "selfdrive/modeld", ["./dmonitoringmodeld"], enabled=(not PC or WEBCAM), callback=driverview), NativeProcess("encoderd", "selfdrive/loggerd", ["./encoderd"]), NativeProcess("loggerd", "selfdrive/loggerd", ["./loggerd"], onroad=False, callback=logging), diff --git a/selfdrive/test/process_replay/test_debayer.py b/selfdrive/test/process_replay/test_debayer.py index eff77fc479..1b3e0f112e 100755 --- a/selfdrive/test/process_replay/test_debayer.py +++ b/selfdrive/test/process_replay/test_debayer.py @@ -10,7 +10,7 @@ from system.hardware import PC, TICI from common.basedir import BASEDIR from selfdrive.test.openpilotci import BASE_URL, get_url from system.version import get_commit -from selfdrive.camerad.snapshot.snapshot import yuv_to_rgb +from system.camerad.snapshot.snapshot import yuv_to_rgb from tools.lib.logreader import LogReader from tools.lib.filereader import FileReader @@ -62,7 +62,7 @@ def unbzip_frames(url): def init_kernels(frame_offset=0): ctx = cl.create_some_context(interactive=False) - with open(os.path.join(BASEDIR, 'selfdrive/camerad/cameras/real_debayer.cl')) as f: + with open(os.path.join(BASEDIR, 'system/camerad/cameras/real_debayer.cl')) as f: build_args = ' -cl-fast-relaxed-math -cl-denorms-are-zero -cl-single-precision-constant' + \ f' -DFRAME_STRIDE={FRAME_STRIDE} -DRGB_WIDTH={FRAME_WIDTH} -DRGB_HEIGHT={FRAME_HEIGHT} -DFRAME_OFFSET={frame_offset} -DCAM_NUM=0' if PC: diff --git a/selfdrive/ui/qt/widgets/cameraview.h b/selfdrive/ui/qt/widgets/cameraview.h index ddc3fc253b..42e9043602 100644 --- a/selfdrive/ui/qt/widgets/cameraview.h +++ b/selfdrive/ui/qt/widgets/cameraview.h @@ -17,7 +17,7 @@ #endif #include "cereal/visionipc/visionipc_client.h" -#include "selfdrive/camerad/cameras/camera_common.h" +#include "system/camerad/cameras/camera_common.h" #include "selfdrive/ui/ui.h" const int FRAME_BUFFER_SIZE = 5; diff --git a/selfdrive/ui/replay/logreader.h b/selfdrive/ui/replay/logreader.h index 7ada20605e..b4a38a5721 100644 --- a/selfdrive/ui/replay/logreader.h +++ b/selfdrive/ui/replay/logreader.h @@ -6,7 +6,7 @@ #endif #include "cereal/gen/cpp/log.capnp.h" -#include "selfdrive/camerad/cameras/camera_common.h" +#include "system/camerad/cameras/camera_common.h" #include "selfdrive/ui/replay/filereader.h" const CameraType ALL_CAMERAS[] = {RoadCam, DriverCam, WideRoadCam}; diff --git a/selfdrive/camerad/SConscript b/system/camerad/SConscript similarity index 100% rename from selfdrive/camerad/SConscript rename to system/camerad/SConscript diff --git a/selfdrive/camerad/__init__.py b/system/camerad/__init__.py similarity index 100% rename from selfdrive/camerad/__init__.py rename to system/camerad/__init__.py diff --git a/selfdrive/camerad/cameras/camera_common.cc b/system/camerad/cameras/camera_common.cc similarity index 98% rename from selfdrive/camerad/cameras/camera_common.cc rename to system/camerad/cameras/camera_common.cc index a94cfedf1a..34dde9389c 100644 --- a/selfdrive/camerad/cameras/camera_common.cc +++ b/system/camerad/cameras/camera_common.cc @@ -1,4 +1,4 @@ -#include "selfdrive/camerad/cameras/camera_common.h" +#include "system/camerad/cameras/camera_common.h" #include @@ -10,7 +10,7 @@ #include "libyuv.h" #include -#include "selfdrive/camerad/imgproc/utils.h" +#include "system/camerad/imgproc/utils.h" #include "common/clutil.h" #include "common/modeldata.h" #include "common/swaglog.h" @@ -20,9 +20,9 @@ #ifdef QCOM2 #include "CL/cl_ext_qcom.h" -#include "selfdrive/camerad/cameras/camera_qcom2.h" +#include "system/camerad/cameras/camera_qcom2.h" #else -#include "selfdrive/camerad/test/camera_test.h" +#include "system/camerad/test/camera_test.h" #endif ExitHandler do_exit; diff --git a/selfdrive/camerad/cameras/camera_common.h b/system/camerad/cameras/camera_common.h similarity index 98% rename from selfdrive/camerad/cameras/camera_common.h rename to system/camerad/cameras/camera_common.h index e9c7ccd757..6b483372bb 100644 --- a/selfdrive/camerad/cameras/camera_common.h +++ b/system/camerad/cameras/camera_common.h @@ -9,7 +9,7 @@ #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 "system/camerad/transforms/rgb_to_yuv.h" #include "common/mat.h" #include "common/queue.h" #include "common/swaglog.h" diff --git a/selfdrive/camerad/cameras/camera_qcom2.cc b/system/camerad/cameras/camera_qcom2.cc similarity index 99% rename from selfdrive/camerad/cameras/camera_qcom2.cc rename to system/camerad/cameras/camera_qcom2.cc index c1ffc1275a..f001009b9a 100644 --- a/selfdrive/camerad/cameras/camera_qcom2.cc +++ b/system/camerad/cameras/camera_qcom2.cc @@ -1,4 +1,4 @@ -#include "selfdrive/camerad/cameras/camera_qcom2.h" +#include "system/camerad/cameras/camera_qcom2.h" #include #include @@ -20,7 +20,7 @@ #include "media/cam_sensor_cmn_header.h" #include "media/cam_sync.h" #include "common/swaglog.h" -#include "selfdrive/camerad/cameras/sensor2_i2c.h" +#include "system/camerad/cameras/sensor2_i2c.h" // For debugging: // echo "4294967295" > /sys/module/cam_debug_util/parameters/debug_mdl diff --git a/selfdrive/camerad/cameras/camera_qcom2.h b/system/camerad/cameras/camera_qcom2.h similarity index 98% rename from selfdrive/camerad/cameras/camera_qcom2.h rename to system/camerad/cameras/camera_qcom2.h index 88766a68e9..57fef8d49a 100644 --- a/selfdrive/camerad/cameras/camera_qcom2.h +++ b/system/camerad/cameras/camera_qcom2.h @@ -6,7 +6,7 @@ #include -#include "selfdrive/camerad/cameras/camera_common.h" +#include "system/camerad/cameras/camera_common.h" #include "common/util.h" #define FRAME_BUF_COUNT 4 diff --git a/selfdrive/camerad/cameras/real_debayer.cl b/system/camerad/cameras/real_debayer.cl similarity index 100% rename from selfdrive/camerad/cameras/real_debayer.cl rename to system/camerad/cameras/real_debayer.cl diff --git a/selfdrive/camerad/cameras/sensor2_i2c.h b/system/camerad/cameras/sensor2_i2c.h similarity index 100% rename from selfdrive/camerad/cameras/sensor2_i2c.h rename to system/camerad/cameras/sensor2_i2c.h diff --git a/selfdrive/camerad/imgproc/conv.cl b/system/camerad/imgproc/conv.cl similarity index 100% rename from selfdrive/camerad/imgproc/conv.cl rename to system/camerad/imgproc/conv.cl diff --git a/selfdrive/camerad/imgproc/pool.cl b/system/camerad/imgproc/pool.cl similarity index 100% rename from selfdrive/camerad/imgproc/pool.cl rename to system/camerad/imgproc/pool.cl diff --git a/selfdrive/camerad/imgproc/utils.cc b/system/camerad/imgproc/utils.cc similarity index 98% rename from selfdrive/camerad/imgproc/utils.cc rename to system/camerad/imgproc/utils.cc index a88b8f4bb1..a7bbeb9e86 100644 --- a/selfdrive/camerad/imgproc/utils.cc +++ b/system/camerad/imgproc/utils.cc @@ -1,4 +1,4 @@ -#include "selfdrive/camerad/imgproc/utils.h" +#include "system/camerad/imgproc/utils.h" #include #include diff --git a/selfdrive/camerad/imgproc/utils.h b/system/camerad/imgproc/utils.h similarity index 100% rename from selfdrive/camerad/imgproc/utils.h rename to system/camerad/imgproc/utils.h diff --git a/selfdrive/camerad/include/media/cam_cpas.h b/system/camerad/include/media/cam_cpas.h similarity index 100% rename from selfdrive/camerad/include/media/cam_cpas.h rename to system/camerad/include/media/cam_cpas.h diff --git a/selfdrive/camerad/include/media/cam_defs.h b/system/camerad/include/media/cam_defs.h similarity index 100% rename from selfdrive/camerad/include/media/cam_defs.h rename to system/camerad/include/media/cam_defs.h diff --git a/selfdrive/camerad/include/media/cam_fd.h b/system/camerad/include/media/cam_fd.h similarity index 100% rename from selfdrive/camerad/include/media/cam_fd.h rename to system/camerad/include/media/cam_fd.h diff --git a/selfdrive/camerad/include/media/cam_icp.h b/system/camerad/include/media/cam_icp.h similarity index 100% rename from selfdrive/camerad/include/media/cam_icp.h rename to system/camerad/include/media/cam_icp.h diff --git a/selfdrive/camerad/include/media/cam_isp.h b/system/camerad/include/media/cam_isp.h similarity index 100% rename from selfdrive/camerad/include/media/cam_isp.h rename to system/camerad/include/media/cam_isp.h diff --git a/selfdrive/camerad/include/media/cam_isp_ife.h b/system/camerad/include/media/cam_isp_ife.h similarity index 100% rename from selfdrive/camerad/include/media/cam_isp_ife.h rename to system/camerad/include/media/cam_isp_ife.h diff --git a/selfdrive/camerad/include/media/cam_isp_vfe.h b/system/camerad/include/media/cam_isp_vfe.h similarity index 100% rename from selfdrive/camerad/include/media/cam_isp_vfe.h rename to system/camerad/include/media/cam_isp_vfe.h diff --git a/selfdrive/camerad/include/media/cam_jpeg.h b/system/camerad/include/media/cam_jpeg.h similarity index 100% rename from selfdrive/camerad/include/media/cam_jpeg.h rename to system/camerad/include/media/cam_jpeg.h diff --git a/selfdrive/camerad/include/media/cam_lrme.h b/system/camerad/include/media/cam_lrme.h similarity index 100% rename from selfdrive/camerad/include/media/cam_lrme.h rename to system/camerad/include/media/cam_lrme.h diff --git a/selfdrive/camerad/include/media/cam_req_mgr.h b/system/camerad/include/media/cam_req_mgr.h similarity index 100% rename from selfdrive/camerad/include/media/cam_req_mgr.h rename to system/camerad/include/media/cam_req_mgr.h diff --git a/selfdrive/camerad/include/media/cam_sensor.h b/system/camerad/include/media/cam_sensor.h similarity index 100% rename from selfdrive/camerad/include/media/cam_sensor.h rename to system/camerad/include/media/cam_sensor.h diff --git a/selfdrive/camerad/include/media/cam_sensor_cmn_header.h b/system/camerad/include/media/cam_sensor_cmn_header.h similarity index 100% rename from selfdrive/camerad/include/media/cam_sensor_cmn_header.h rename to system/camerad/include/media/cam_sensor_cmn_header.h diff --git a/selfdrive/camerad/include/media/cam_sync.h b/system/camerad/include/media/cam_sync.h similarity index 100% rename from selfdrive/camerad/include/media/cam_sync.h rename to system/camerad/include/media/cam_sync.h diff --git a/selfdrive/camerad/include/msm_cam_sensor.h b/system/camerad/include/msm_cam_sensor.h similarity index 100% rename from selfdrive/camerad/include/msm_cam_sensor.h rename to system/camerad/include/msm_cam_sensor.h diff --git a/selfdrive/camerad/include/msm_camsensor_sdk.h b/system/camerad/include/msm_camsensor_sdk.h similarity index 100% rename from selfdrive/camerad/include/msm_camsensor_sdk.h rename to system/camerad/include/msm_camsensor_sdk.h diff --git a/selfdrive/camerad/include/msmb_camera.h b/system/camerad/include/msmb_camera.h similarity index 100% rename from selfdrive/camerad/include/msmb_camera.h rename to system/camerad/include/msmb_camera.h diff --git a/selfdrive/camerad/include/msmb_isp.h b/system/camerad/include/msmb_isp.h similarity index 100% rename from selfdrive/camerad/include/msmb_isp.h rename to system/camerad/include/msmb_isp.h diff --git a/selfdrive/camerad/include/msmb_ispif.h b/system/camerad/include/msmb_ispif.h similarity index 100% rename from selfdrive/camerad/include/msmb_ispif.h rename to system/camerad/include/msmb_ispif.h diff --git a/selfdrive/camerad/main.cc b/system/camerad/main.cc similarity index 89% rename from selfdrive/camerad/main.cc rename to system/camerad/main.cc index 32899a8547..c1f38f2224 100644 --- a/selfdrive/camerad/main.cc +++ b/system/camerad/main.cc @@ -1,4 +1,4 @@ -#include "selfdrive/camerad/cameras/camera_common.h" +#include "system/camerad/cameras/camera_common.h" #include diff --git a/selfdrive/camerad/snapshot/__init__.py b/system/camerad/snapshot/__init__.py similarity index 100% rename from selfdrive/camerad/snapshot/__init__.py rename to system/camerad/snapshot/__init__.py diff --git a/selfdrive/camerad/snapshot/snapshot.py b/system/camerad/snapshot/snapshot.py similarity index 98% rename from selfdrive/camerad/snapshot/snapshot.py rename to system/camerad/snapshot/snapshot.py index fa88849b69..9a81937eec 100755 --- a/selfdrive/camerad/snapshot/snapshot.py +++ b/system/camerad/snapshot/snapshot.py @@ -13,7 +13,7 @@ from system.hardware import PC from selfdrive.controls.lib.alertmanager import set_offroad_alert from selfdrive.manager.process_config import managed_processes -LM_THRESH = 120 # defined in selfdrive/camerad/imgproc/utils.h +LM_THRESH = 120 # defined in system/camerad/imgproc/utils.h VISION_STREAMS = { "roadCameraState": VisionStreamType.VISION_STREAM_ROAD, diff --git a/selfdrive/camerad/test/.gitignore b/system/camerad/test/.gitignore similarity index 100% rename from selfdrive/camerad/test/.gitignore rename to system/camerad/test/.gitignore diff --git a/selfdrive/camerad/test/ae_gray_test.cc b/system/camerad/test/ae_gray_test.cc similarity index 97% rename from selfdrive/camerad/test/ae_gray_test.cc rename to system/camerad/test/ae_gray_test.cc index 69ef2ac6de..aabd7534ee 100644 --- a/selfdrive/camerad/test/ae_gray_test.cc +++ b/system/camerad/test/ae_gray_test.cc @@ -8,7 +8,7 @@ #include #include "common/util.h" -#include "selfdrive/camerad/cameras/camera_common.h" +#include "system/camerad/cameras/camera_common.h" int main() { // set up fake camerabuf diff --git a/selfdrive/camerad/test/ae_gray_test.h b/system/camerad/test/ae_gray_test.h similarity index 100% rename from selfdrive/camerad/test/ae_gray_test.h rename to system/camerad/test/ae_gray_test.h diff --git a/selfdrive/camerad/test/camera_test.h b/system/camerad/test/camera_test.h similarity index 100% rename from selfdrive/camerad/test/camera_test.h rename to system/camerad/test/camera_test.h diff --git a/selfdrive/camerad/test/check_skips.py b/system/camerad/test/check_skips.py similarity index 100% rename from selfdrive/camerad/test/check_skips.py rename to system/camerad/test/check_skips.py diff --git a/selfdrive/camerad/test/frame_test.py b/system/camerad/test/frame_test.py similarity index 100% rename from selfdrive/camerad/test/frame_test.py rename to system/camerad/test/frame_test.py diff --git a/selfdrive/camerad/test/get_thumbnails_for_segment.py b/system/camerad/test/get_thumbnails_for_segment.py similarity index 100% rename from selfdrive/camerad/test/get_thumbnails_for_segment.py rename to system/camerad/test/get_thumbnails_for_segment.py diff --git a/selfdrive/camerad/test/stress_restart.sh b/system/camerad/test/stress_restart.sh similarity index 100% rename from selfdrive/camerad/test/stress_restart.sh rename to system/camerad/test/stress_restart.sh diff --git a/selfdrive/camerad/test/test_camerad.py b/system/camerad/test/test_camerad.py similarity index 100% rename from selfdrive/camerad/test/test_camerad.py rename to system/camerad/test/test_camerad.py diff --git a/selfdrive/camerad/test/test_exposure.py b/system/camerad/test/test_exposure.py similarity index 96% rename from selfdrive/camerad/test/test_exposure.py rename to system/camerad/test/test_exposure.py index f42d0bfbe3..8cce7e7ffa 100755 --- a/selfdrive/camerad/test/test_exposure.py +++ b/system/camerad/test/test_exposure.py @@ -4,7 +4,7 @@ import unittest import numpy as np from selfdrive.test.helpers import with_processes -from selfdrive.camerad.snapshot.snapshot import get_snapshots +from system.camerad.snapshot.snapshot import get_snapshots from system.hardware import TICI diff --git a/selfdrive/camerad/transforms/rgb_to_yuv.cc b/system/camerad/transforms/rgb_to_yuv.cc similarity index 96% rename from selfdrive/camerad/transforms/rgb_to_yuv.cc rename to system/camerad/transforms/rgb_to_yuv.cc index 63e032e2dc..5e51579cf9 100644 --- a/selfdrive/camerad/transforms/rgb_to_yuv.cc +++ b/system/camerad/transforms/rgb_to_yuv.cc @@ -1,4 +1,4 @@ -#include "selfdrive/camerad/transforms/rgb_to_yuv.h" +#include "system/camerad/transforms/rgb_to_yuv.h" #include #include diff --git a/selfdrive/camerad/transforms/rgb_to_yuv.cl b/system/camerad/transforms/rgb_to_yuv.cl similarity index 100% rename from selfdrive/camerad/transforms/rgb_to_yuv.cl rename to system/camerad/transforms/rgb_to_yuv.cl diff --git a/selfdrive/camerad/transforms/rgb_to_yuv.h b/system/camerad/transforms/rgb_to_yuv.h similarity index 100% rename from selfdrive/camerad/transforms/rgb_to_yuv.h rename to system/camerad/transforms/rgb_to_yuv.h diff --git a/selfdrive/camerad/transforms/rgb_to_yuv_test.cc b/system/camerad/transforms/rgb_to_yuv_test.cc similarity index 99% rename from selfdrive/camerad/transforms/rgb_to_yuv_test.cc rename to system/camerad/transforms/rgb_to_yuv_test.cc index c960d168de..2f909e3b73 100644 --- a/selfdrive/camerad/transforms/rgb_to_yuv_test.cc +++ b/system/camerad/transforms/rgb_to_yuv_test.cc @@ -30,7 +30,7 @@ #include #include "libyuv.h" -#include "selfdrive/camerad/transforms/rgb_to_yuv.h" +#include "system/camerad/transforms/rgb_to_yuv.h" #include "common/clutil.h" static inline double millis_since_boot() { diff --git a/tools/webcam/README.md b/tools/webcam/README.md index 48e5accb2a..1e07bdbbe6 100644 --- a/tools/webcam/README.md +++ b/tools/webcam/README.md @@ -23,14 +23,14 @@ git clone https://github.com/commaai/openpilot.git ``` cd ~/openpilot ``` -- check out selfdrive/camerad/cameras/camera_webcam.cc lines 72 and 146 before building if any camera is upside down +- check out system/camerad/cameras/camera_webcam.cc lines 72 and 146 before building if any camera is upside down ``` USE_WEBCAM=1 scons -j$(nproc) ``` ## Connect the hardware - Connect the road facing camera first, then the driver facing camera -- (default indexes are 1 and 2; can be modified in selfdrive/camerad/cameras/camera_webcam.cc) +- (default indexes are 1 and 2; can be modified in system/camerad/cameras/camera_webcam.cc) - Connect your computer to panda ## GO