修复兼容接口云台控制

This commit is contained in:
648540858 2021-11-30 10:16:09 +08:00
parent 9d189c97cd
commit d77382348d

View File

@ -41,10 +41,15 @@ public class ApiControlController {
@RequestParam(required = false)Integer speed){ @RequestParam(required = false)Integer speed){
if (logger.isDebugEnabled()) { if (logger.isDebugEnabled()) {
logger.debug(String.format("模拟接口> 设备云台控制 API调用deviceId%s channelId%s command%d speed%d ", logger.debug("模拟接口> 设备云台控制 API调用deviceId{} channelId{} command{} speed{} ",
serial, code, command, speed)); serial, code, command, speed);
} }
Device device = storager.queryVideoDevice(serial); Device device = storager.queryVideoDevice(serial);
if (device == null) {
JSONObject result = new JSONObject();
result.put("error","device[ " + serial + " ]未找到");
return result;
}
int cmdCode = 0; int cmdCode = 0;
switch (command){ switch (command){
case "left": case "left":