|
|
|
|
@ -321,7 +321,7 @@ public class PtzControlModule {
|
|
|
|
|
* 旋转360度
|
|
|
|
|
* @param cameraId
|
|
|
|
|
*/
|
|
|
|
|
public static void turn360(Integer cameraId){
|
|
|
|
|
public static void turn360C8(Integer cameraId,Integer ptzId){
|
|
|
|
|
Thread thread = new Thread(new Runnable() {
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
@ -335,11 +335,9 @@ public class PtzControlModule {
|
|
|
|
|
ptzLocationInfo.read();
|
|
|
|
|
|
|
|
|
|
if (bRet) {
|
|
|
|
|
System.out.println("xParam:" + ptzLocationInfo.nPTZPan); // 云台水平运动位置,有效范围:[0,3600]
|
|
|
|
|
System.out.println("yParam:" + ptzLocationInfo.nPTZTilt); // 云台垂直运动位置,有效范围:[-1800,1800]
|
|
|
|
|
System.out.println("zoomParam:" + ptzLocationInfo.nPTZZoom);
|
|
|
|
|
log.debug("xParam:{}",ptzLocationInfo.nPTZPan);
|
|
|
|
|
int qq = (ptzLocationInfo.nPTZPan + 1799) % 3600;
|
|
|
|
|
System.out.println(qq);
|
|
|
|
|
log.debug("xParam turn to:{}",qq);
|
|
|
|
|
toPtzSlow(cameraId,qq);
|
|
|
|
|
try {
|
|
|
|
|
Thread.sleep(5000);
|
|
|
|
|
@ -347,14 +345,20 @@ public class PtzControlModule {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
qq = (qq + 1799) % 3600;
|
|
|
|
|
System.out.println(qq);
|
|
|
|
|
log.debug("xParam turn to:{}",qq);
|
|
|
|
|
toPtzSlow(cameraId,qq);
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
Thread.sleep(5000);
|
|
|
|
|
} catch (InterruptedException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
if(ptzId != null){
|
|
|
|
|
log.info(" turn C8");
|
|
|
|
|
toPtz(ptzId,cameraId);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
System.err.println( " { error code: ( 0x80000000|" + (LoginModule.netsdk.CLIENT_GetLastError() & 0x7fffffff) +" ). 参考 LastError.java }");
|
|
|
|
|
|
|
|
|
|
log.error( " { error code: ( 0x80000000|" + (LoginModule.netsdk.CLIENT_GetLastError() & 0x7fffffff) +" ). 参考 LastError.java }");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
thread.start();
|
|
|
|
|
|