When we tried to send the PTZ command to the camera, the call is getting blocked randomly. After that, the stop commands are failing as well.
double pan = 0.0, tilt = 0.0, zoom = 0.0, panSpeed = 0.5, tiltSpeed = 0.5, zoomSpeed = 0.5;
switch (action)
{
case "Z+":
zoom = 1.0;
break;
case "Z-":
zoom = -1.0;
break;
case "R":
pan = 1.0;
break;
case "L":
pan = -1.0;
break;
case "U":
tilt = -1.0;
break;
case "D":
tilt = 1.0;
break;
case "STOP":
zoom = 0.0;
pan = 0.0;
tilt = 0.0;
break;
}
PTZMoveStartCommandData2 data = new PTZMoveStartCommandData2()
{
Pan = pan,
Tilt = tilt,
Zoom = zoom,
PanSpeed = panSpeed,
TiltSpeed = tiltSpeed,
ZoomSpeed = zoomSpeed
};
EnvironmentManager.Instance.SendMessage(
new Message(MessageId.Control.PTZMoveStartCommand, data), \_camera.FQID);
What has to do to make it work properly? Any way to debug why it hangs?