Update of /cvsroot/robotflow/RobotFlow/Devices/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6664/src
Modified Files:
SNCRZ30.cc
Log Message:
Added RelZoom
Index: SNCRZ30.cc
===================================================================
RCS file: /cvsroot/robotflow/RobotFlow/Devices/src/SNCRZ30.cc,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** SNCRZ30.cc 26 Aug 2004 13:34:48 -0000 1.15
--- SNCRZ30.cc 26 Aug 2004 13:49:41 -0000 1.16
***************
*** 49,52 ****
--- 49,60 ----
* @input_description Absolute Tilt of the camera -300 to +300. (1/10 of degrees)
*
+ * @input_name ZOOM_ABS_POS
+ * @input_type int
+ * @input_description Absolute Zoom of the camera 1 (1X) to 24 (24X) [0-0x4000]
+ *
+ * @input_name ZOOM_REL_POS
+ * @input_type int
+ * @input_description Relative Zoom of the camera 1 (1X) to 24 (24X) [0-0x4000]
+ *
* @parameter_name PAN_SPEED
* @parameter_type int
***************
*** 73,81 ****
* @parameter_value false
* @parameter_description Wait for camera reply on commands
! *
! * @input_name ZOOM
! * @input_type int
! * @input_description Absolute Zoom of the camera 1 (1X) to 24 (24X)
! *
* @output_name PAN_POSITION
* @output_type int
--- 81,85 ----
* @parameter_value false
* @parameter_description Wait for camera reply on commands
!
* @output_name PAN_POSITION
* @output_type int
***************
*** 111,115 ****
m_panRelInID = addInput("PAN_REL_POS");
m_tiltRelInID = addInput("TILT_REL_POS");
! m_zoomInID = addInput("ZOOM");
//outputs
--- 115,120 ----
m_panRelInID = addInput("PAN_REL_POS");
m_tiltRelInID = addInput("TILT_REL_POS");
! m_zoomAbsInID = addInput("ZOOM_ABS_POS");
! m_zoomRelInID = addInput("ZOOM_REL_POS");
//outputs
***************
*** 183,190 ****
ObjectRef AbsPanValue = getInput(m_panAbsInID,count);
ObjectRef AbsTiltValue = getInput(m_tiltAbsInID,count);
! ObjectRef ZoomValue = getInput(m_zoomInID,count);
ObjectRef RelPanValue = getInput(m_panRelInID,count);
ObjectRef RelTiltValue = getInput(m_tiltRelInID,count);
!
//process relative commands
if (!RelPanValue->isNil() && !RelTiltValue->isNil()) {
--- 188,196 ----
ObjectRef AbsPanValue = getInput(m_panAbsInID,count);
ObjectRef AbsTiltValue = getInput(m_tiltAbsInID,count);
! ObjectRef AbsZoomValue = getInput(m_zoomAbsInID,count);
ObjectRef RelPanValue = getInput(m_panRelInID,count);
ObjectRef RelTiltValue = getInput(m_tiltRelInID,count);
! ObjectRef RelZoomValue = getInput(m_zoomRelInID,count);
!
//process relative commands
if (!RelPanValue->isNil() && !RelTiltValue->isNil()) {
***************
*** 230,238 ****
}
//process zoom commands
! if (!ZoomValue->isNil()) {
! RCPtr<Int> zoom = ZoomValue;
send_zoom_position(*zoom);
m_currentZoom = *zoom;
}
//limit pan,tilt,zoom
m_currentPan = max(min(m_currentPan,1700), -1700);
--- 236,251 ----
}
//process zoom commands
! if (!AbsZoomValue->isNil()) {
! RCPtr<Int> zoom = AbsZoomValue;
send_zoom_position(*zoom);
m_currentZoom = *zoom;
}
+
+ if (!RelZoomValue->isNil()) {
+ RCPtr<Int> zoom = RelZoomValue;
+ m_currentZoom += *zoom;
+ send_zoom_position(m_currentZoom);
+ }
+
//limit pan,tilt,zoom
m_currentPan = max(min(m_currentPan,1700), -1700);
|