SDK 的 Bug 修复
This commit is contained in:
@@ -42,7 +42,7 @@ public class CamerasController : ControllerBase
|
||||
d.RealFps,
|
||||
d.TotalFrames,
|
||||
d.IsPhysicalOnline,
|
||||
d.IsOnline,
|
||||
d.IsActived,
|
||||
d.IsRunning,
|
||||
d.Width,
|
||||
d.Height,
|
||||
@@ -532,7 +532,7 @@ public class CamerasController : ControllerBase
|
||||
if (device == null) return NotFound(new { error = "Device not found" });
|
||||
|
||||
// 依然是两道防线:先检查在线,再检查能力
|
||||
if (!device.IsOnline) return BadRequest(new { error = "Device is offline" });
|
||||
if (!device.IsActived) return BadRequest(new { error = "Device is offline" });
|
||||
|
||||
if (device is IRebootFeature rebootFeature)
|
||||
{
|
||||
@@ -559,7 +559,7 @@ public class CamerasController : ControllerBase
|
||||
{
|
||||
var device = _manager.GetDevice(id);
|
||||
if (device == null) return NotFound();
|
||||
if (!device.IsOnline) return BadRequest("Device offline");
|
||||
if (!device.IsActived) return BadRequest("Device offline");
|
||||
|
||||
if (device is IPtzFeature ptz)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user