1. NVR Status 但对象初始化失败时返回false

This commit is contained in:
kunmeng
2025-05-21 09:40:32 +08:00
parent 311e694a89
commit 77bb351161
2 changed files with 3 additions and 1 deletions

View File

@@ -423,7 +423,6 @@ func verify(data []byte) (byte, error) {
for i := 1; i < 6; i++ {
sum += int(data[i])
}
// 取模并转换为16进制
checksum := sum % 0x100
return byte(checksum), nil

3
Nvr.go
View File

@@ -167,6 +167,9 @@ func (this *Nvr) Logout() error {
}
func (this *Nvr) Status() bool {
if this == nil {
return false
}
return Core.NET_DVR_RemoteControl(this.userId)
}