Merge pull request #869 from shanyuanzz/wvp-28181-2.0

优化低倍速下云台控制的zoom缩放速率变化问题。
pull/872/head
648540858 2023-05-29 09:14:56 +08:00 committed by GitHub
commit 5632718d6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -146,6 +146,11 @@ public class SIPCommander implements ISIPCommander {
builder.append(strTmp, 0, 2); builder.append(strTmp, 0, 2);
strTmp = String.format("%02X", parameter2); strTmp = String.format("%02X", parameter2);
builder.append(strTmp, 0, 2); builder.append(strTmp, 0, 2);
//优化zoom变倍速率
if ((combineCode2 > 0) && (combineCode2 <16))
{
combineCode2 = 16;
}
strTmp = String.format("%X", combineCode2); strTmp = String.format("%X", combineCode2);
builder.append(strTmp, 0, 1).append("0"); builder.append(strTmp, 0, 1).append("0");
//计算校验码 //计算校验码

View File

@ -113,6 +113,12 @@ public class SipUtils {
strTmp = String.format("%02X", moveSpeed); strTmp = String.format("%02X", moveSpeed);
builder.append(strTmp, 0, 2); builder.append(strTmp, 0, 2);
builder.append(strTmp, 0, 2); builder.append(strTmp, 0, 2);
//优化zoom低倍速下的变倍速率
if ((zoomSpeed > 0) && (zoomSpeed <16))
{
zoomSpeed = 16;
}
strTmp = String.format("%X", zoomSpeed); strTmp = String.format("%X", zoomSpeed);
builder.append(strTmp, 0, 1).append("0"); builder.append(strTmp, 0, 1).append("0");
//计算校验码 //计算校验码