camerad: build camerad on PC (#25726)
* compile camerad on PC
* scons cleanup
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 29f9c536b4
taco
parent
246f03e72b
commit
fad0bdf23c
6 changed files with 20 additions and 54 deletions
@ -1,22 +1,18 @@ |
|||||||
Import('env', 'arch', 'cereal', 'messaging', 'common', 'gpucommon', 'visionipc') |
Import('env', 'arch', 'cereal', 'messaging', 'common', 'gpucommon', 'visionipc') |
||||||
|
|
||||||
libs = ['m', 'pthread', common, 'jpeg', 'OpenCL', 'yuv', cereal, messaging, 'zmq', 'capnp', 'kj', visionipc, gpucommon] |
libs = ['m', 'pthread', common, 'jpeg', 'OpenCL', 'yuv', cereal, messaging, 'zmq', 'capnp', 'kj', visionipc, gpucommon, 'atomic'] |
||||||
|
|
||||||
cameras = [] |
cenv = env.Clone() |
||||||
if arch == "larch64": |
cenv['CPPPATH'].append('include/') |
||||||
libs += ['atomic'] |
|
||||||
cameras = ['cameras/camera_qcom2.cc'] |
|
||||||
|
|
||||||
env.Program('camerad', [ |
camera_obj = cenv.Object(['cameras/camera_qcom2.cc', 'cameras/camera_common.cc', 'cameras/camera_util.cc']) |
||||||
'main.cc', |
cenv.Program('camerad', [ |
||||||
'cameras/camera_common.cc', |
'main.cc', |
||||||
'cameras/camera_util.cc', |
camera_obj, |
||||||
'imgproc/utils.cc', |
], LIBS=libs) |
||||||
cameras, |
|
||||||
], LIBS=libs) |
|
||||||
|
|
||||||
if GetOption("test") and arch == "x86_64": |
if GetOption("test") and arch == "x86_64": |
||||||
env.Program('test/ae_gray_test', [ |
cenv.Program('test/ae_gray_test', [ |
||||||
'test/ae_gray_test.cc', |
'test/ae_gray_test.cc', |
||||||
'cameras/camera_common.cc', |
camera_obj, |
||||||
], LIBS=libs) |
], LIBS=libs) |
||||||
|
@ -1,27 +0,0 @@ |
|||||||
// TODO: cleanup AE tests
|
|
||||||
// needed by camera_common.cc
|
|
||||||
void camera_autoexposure(CameraState *s, float grey_frac) {} |
|
||||||
void cameras_init(VisionIpcServer *v, MultiCameraState *s, cl_device_id device_id, cl_context ctx) {} |
|
||||||
void cameras_open(MultiCameraState *s) {} |
|
||||||
void cameras_run(MultiCameraState *s) {} |
|
||||||
|
|
||||||
typedef struct CameraState { |
|
||||||
int camera_num; |
|
||||||
CameraInfo ci; |
|
||||||
|
|
||||||
int fps; |
|
||||||
float digital_gain = 0; |
|
||||||
|
|
||||||
int camera_id; |
|
||||||
|
|
||||||
CameraBuf buf; |
|
||||||
} CameraState; |
|
||||||
|
|
||||||
typedef struct MultiCameraState { |
|
||||||
CameraState road_cam; |
|
||||||
CameraState driver_cam; |
|
||||||
|
|
||||||
PubMaster *pm = nullptr; |
|
||||||
} MultiCameraState; |
|
||||||
|
|
||||||
|
|
Loading…
Reference in new issue