Skip to content
Snippets Groups Projects
Commit e93697b5 authored by root's avatar root
Browse files

add new parameters in cfg

parent 5ef11b9b
No related branches found
No related tags found
No related merge requests found
......@@ -19,19 +19,19 @@ catkin_package(
LIBRARIES libuvc_camera_nodelet
)
include_directories(include ${Boost_INCLUDE_DIR} ${catkin_INCLUDE_DIRS} ${libuvc_INCLUDE_DIRS})
include_directories(include ${libuvc_INCLUDE_DIRS} ${Boost_INCLUDE_DIR} ${catkin_INCLUDE_DIRS})
link_directories(${catkin_LINK_DIRS})
find_package(Boost REQUIRED COMPONENTS thread)
include_directories(${Boost_INCLUDE_DIRS})
add_executable(camera_node src/main.cpp src/camera_driver.cpp)
target_link_libraries(camera_node ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${libuvc_LIBRARIES})
target_link_libraries(camera_node ${libuvc_LIBRARIES} ${Boost_LIBRARIES} ${catkin_LIBRARIES})
add_dependencies(camera_node ${PROJECT_NAME}_gencfg)
add_library(libuvc_camera_nodelet src/nodelet.cpp src/camera_driver.cpp)
add_dependencies(libuvc_camera_nodelet ${libuvc_camera_EXPORTED_TARGETS})
target_link_libraries(libuvc_camera_nodelet ${Boost_LIBRARIES} ${catkin_LIBRARIES} ${libuvc_LIBRARIES})
target_link_libraries(libuvc_camera_nodelet ${libuvc_LIBRARIES} ${Boost_LIBRARIES} ${catkin_LIBRARIES})
add_dependencies(libuvc_camera_nodelet ${PROJECT_NAME}_gencfg)
install(TARGETS camera_node libuvc_camera_nodelet
......
......@@ -124,9 +124,12 @@ void CameraDriver::ReconfigureCallback(UVCCameraConfig &new_config, uint32_t lev
PARAM_INT(auto_exposure, ae_mode, 1 << new_config.auto_exposure);
PARAM_INT(auto_exposure_priority, ae_priority, new_config.auto_exposure_priority);
PARAM_INT(exposure_absolute, exposure_abs, new_config.exposure_absolute * 10000);
// TODO: iris_absolute
PARAM_INT(auto_focus, focus_auto, new_config.auto_focus ? 1 : 0);
PARAM_INT(focus_absolute, focus_abs, new_config.focus_absolute);
PARAM_INT(gain, gain, new_config.gain);
PARAM_INT(iris_absolute, iris_abs, new_config.iris_absolute);
PARAM_INT(brightness, brightness, new_config.brightness);
if (new_config.pan_absolute != config_.pan_absolute || new_config.tilt_absolute != config_.tilt_absolute) {
if (uvc_set_pantilt_abs(devh_, new_config.pan_absolute, new_config.tilt_absolute)) {
......@@ -138,9 +141,7 @@ void CameraDriver::ReconfigureCallback(UVCCameraConfig &new_config, uint32_t lev
// TODO: roll_absolute
// TODO: privacy
// TODO: backlight_compensation
// TODO: brightness
// TODO: contrast
// TODO: gain
// TODO: power_line_frequency
// TODO: auto_hue
// TODO: saturation
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment