#ifndef _DNMSLAVE_H_
#define _DNMSLAVE_H_
 
 
#ifdef __cplusplus
extern "C" {
#endif
 
typedef struct CAM_stServCtrlCamera
{
 
    MTH_tdxReal m_xHorizontalAngle;
 
    MTH_tdxReal m_xVerticalAngle;
 
	MTH_tdxReal m_xDistance;
    
 
} CAM_tdstServCtrlCamera;
 
#define CAM_M_xGetServCtrlCameraHorizontal(_p_stServCtrlCamera) ((_p_stServCtrlCamera)->m_xHorizontalAngle) 
#define CAM_M_xGetServCtrlCameraVertical(_p_stServCtrlCamera) ((_p_stServCtrlCamera)->m_xVerticalAngle) 
#define CAM_M_xGetServCtrlCameraDistance(_p_stServCtrlCamera) ((_p_stServCtrlCamera)->m_xDistance) 
 
#define CAM_M_vSetServCtrlCameraHorizontal(_p_stServCtrlCamera,xVal) ((_p_stServCtrlCamera)->m_xHorizontalAngle = xVal) 
#define CAM_M_vSetServCtrlCameraVertical(_p_stServCtrlCamera,xVal) ((_p_stServCtrlCamera)->m_xVerticalAngle = xVal) 
#define CAm_M_vSetServCtrlCameraDistance(_p_stServCtrlCamera,xVal) ((_p_stServCtrlCamera)->m_xDistance = xVal) 
 
/*
*=====================================================================================================
*	general function for Servo Control
*	
*=====================================================================================================
*/
MTH_tdxReal CAM_fn_xServoControlMechanics
(
	MTH_tdxReal	_xVal,
	MTH_tdxReal _xMax,
	MTH_tdxReal _xDT
);
 
/*
*=====================================================================================================
*	Shifting's Servo Control
*	
*=====================================================================================================
*/
void CAM_fn_vServShifting
(
	DNM_tdstVector		*_p_stShiftingResult,
	MTH_tdxReal			_xSpeed,
	MTH_tdxReal			_xDT,
	MTH_tdstVector		*_p_stShifting
);
 
 
#ifdef __cplusplus
}
#endif
 
#endif
