From 31c2f52e48de139c5f6b5dd751f6e9576c4d17cc Mon Sep 17 00:00:00 2001 From: shanyuanzz <46706605+shanyuanzz@users.noreply.github.com> Date: Sun, 28 May 2023 13:39:16 +0800 Subject: [PATCH 1/3] Update SIPCommander.java MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add by 白米粥 1.修正云台控制的zoom的speedbug。 解决当zoom时speed为1-FH时速度变化为1-FH,而10H~FFH以上时是以首位速度进行变化,变化速率过于不一致。 修改后1-FH的速度均以1的速率进行缩放变倍。 --- .../iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java index a9b64ca2..ee9b61af 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java @@ -146,6 +146,10 @@ public class SIPCommander implements ISIPCommander { builder.append(strTmp, 0, 2); strTmp = String.format("%02X", parameter2); builder.append(strTmp, 0, 2); + if ((combineCode2 > 0) && (combineCode2 <16)) + { + combineCode2 = 16; + } strTmp = String.format("%X", combineCode2); builder.append(strTmp, 0, 1).append("0"); //计算校验码 From 6d52e1539f6c33d5b625ff7fd56bccf8b76971b3 Mon Sep 17 00:00:00 2001 From: shanyuanzz <46706605+shanyuanzz@users.noreply.github.com> Date: Sun, 28 May 2023 13:48:55 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BC=98=E5=8C=96zoom=E4=BD=8E=E5=80=8D?= =?UTF-8?q?=E9=80=9F=E4=B8=8B=E7=9A=84=E5=8F=98=E5=80=8D=E9=80=9F=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 优化zoom低倍速下的变倍速率 --- .../iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java index ee9b61af..8960e2c7 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java @@ -146,6 +146,7 @@ public class SIPCommander implements ISIPCommander { builder.append(strTmp, 0, 2); strTmp = String.format("%02X", parameter2); builder.append(strTmp, 0, 2); + //优化zoom变倍速率 if ((combineCode2 > 0) && (combineCode2 <16)) { combineCode2 = 16; From 5ebd788cef062b343ff214a7ff9022fb2ba178d1 Mon Sep 17 00:00:00 2001 From: shanyuanzz <46706605+shanyuanzz@users.noreply.github.com> Date: Sun, 28 May 2023 14:01:51 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BD=8E=E5=80=8D?= =?UTF-8?q?=E9=80=9F=E4=B8=8Bzoom=E5=8F=98=E5=80=8D=E9=80=9F=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.优化zoom缩放在1-FH低倍速下的变倍速率。 避免变倍速率过大或者某些相机无法变倍的问题。 --- .../java/com/genersoft/iot/vmp/gb28181/utils/SipUtils.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/utils/SipUtils.java b/src/main/java/com/genersoft/iot/vmp/gb28181/utils/SipUtils.java index d6037a11..a7ce8c0b 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/utils/SipUtils.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/utils/SipUtils.java @@ -113,6 +113,12 @@ public class SipUtils { strTmp = String.format("%02X", moveSpeed); builder.append(strTmp, 0, 2); builder.append(strTmp, 0, 2); + + //优化zoom低倍速下的变倍速率 + if ((zoomSpeed > 0) && (zoomSpeed <16)) + { + zoomSpeed = 16; + } strTmp = String.format("%X", zoomSpeed); builder.append(strTmp, 0, 1).append("0"); //计算校验码