From 55d6df24cf2c4e172f53469cc52fbd67425358fe Mon Sep 17 00:00:00 2001 From: Girts Linde Date: Sun, 29 May 2016 11:37:47 -0700 Subject: [PATCH] add flip params --- cfg/Camera.cfg | 2 ++ src/raspicam_node.cpp | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cfg/Camera.cfg b/cfg/Camera.cfg index 28151c6..c6a89e0 100755 --- a/cfg/Camera.cfg +++ b/cfg/Camera.cfg @@ -12,6 +12,8 @@ gen.add("saturation", int_t, 0, "Saturation", 0, 0, gen.add("ISO", int_t, 0, "ISO", 400, 100, 1600) gen.add("exposureCompensation", int_t, 0, "exposureCompensation", 0, -10, 10) gen.add("videoStabilisation", bool_t, 0, "videoStabilisation", False) +gen.add("vFlip", bool_t, 0, "vFlip", False) +gen.add("hFlip", bool_t, 0, "hFlip", False) gen.add("zoom", double_t, 0, "Digital zoom", 1.0, 1.0, 4.0) diff --git a/src/raspicam_node.cpp b/src/raspicam_node.cpp index 0265dd1..c2d7161 100644 --- a/src/raspicam_node.cpp +++ b/src/raspicam_node.cpp @@ -838,9 +838,11 @@ bool serv_publish_image_once(std_srvs::Empty::Request&, std_srvs::Empty::Respons void reconfigure_callback(raspicam::CameraConfig &config, uint32_t level) { ROS_INFO("Reconfigure Request: contrast %d, sharpness %d, brightness %d, saturation %d, ISO %d, exposureCompensation %d," - " videoStabilisation %d, zoom %.2f, exposure_mode %s, awb_mode %s", + " videoStabilisation %d, vFlip %d, hFlip %d," + " zoom %.2f, exposure_mode %s, awb_mode %s", config.contrast, config.sharpness, config.brightness, config.saturation, config.ISO, config.exposureCompensation, config.videoStabilisation, + config.vFlip, config.hFlip, config.zoom, config.exposure_mode.c_str(), config.awb_mode.c_str()); @@ -874,6 +876,7 @@ void reconfigure_callback(raspicam::CameraConfig &config, uint32_t level) { raspicamcontrol_set_ISO(state_srv.camera_component, config.ISO); raspicamcontrol_set_exposure_compensation(state_srv.camera_component, config.exposureCompensation); raspicamcontrol_set_video_stabilisation(state_srv.camera_component, config.videoStabilisation); + raspicamcontrol_set_flips(state_srv.camera_component, config.hFlip, config.vFlip); ROS_INFO("Reconfigure done"); }