Skip to content

Commit

Permalink
add flip params
Browse files Browse the repository at this point in the history
  • Loading branch information
girtslinde committed May 29, 2016
1 parent 01b26db commit 55d6df2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cfg/Camera.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
5 changes: 4 additions & 1 deletion src/raspicam_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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");
}
Expand Down

0 comments on commit 55d6df2

Please sign in to comment.