增加光圈速度范围判断

pull/1742/head
claire 2025-01-02 14:20:04 +08:00
parent daeb48f62a
commit d7ebe93337
1 changed files with 6 additions and 0 deletions

View File

@ -163,6 +163,12 @@ public class PtzController {
log.debug("设备光圈控制 API调用deviceId{} channelId{} command{} speed{} ",deviceId, channelId, command, speed);
}
if (speed == null) {
speed = 100;
}else if (speed < 0 || speed > 255) {
throw new ControllerException(ErrorCode.ERROR100.getCode(), "speed 为 0-255的数字");
}
int cmdCode = 0x40;
switch (command){
case "in":