mirror of
https://github.com/langhuihui/monibuca.git
synced 2025-09-26 23:05:55 +08:00
bugfix:PTZ Move中,Xaddr的XAddr构建bug。
bugfix:onvif的PTZ的文档中的move方法,JSON结构错误,导致无法反序列化,另外不写Space参数,如果加了这个参数,海康会报错。
This commit is contained in:
@@ -930,14 +930,14 @@ POST /onvif/api/ptz
|
||||
|
||||
```json
|
||||
{
|
||||
"PanTilt": {
|
||||
"X": 1,
|
||||
"Y": 1,
|
||||
"Space": "http://www.onvif.org/ver10/tptz/ZoomSpaces/VelocityGenericSpace"
|
||||
},
|
||||
"Zoom": {
|
||||
"X": 1,
|
||||
"Space": "http://www.onvif.org/ver10/tptz/ZoomSpaces/VelocityGenericSpace"
|
||||
"Move":{
|
||||
"PanTilt": {
|
||||
"X": 1,
|
||||
"Y": 1
|
||||
},
|
||||
"Zoom": {
|
||||
"X": 1
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
@@ -253,7 +253,7 @@ func (d *DeviceStatus) SetPtzPreset(name string, presetToken string) (*onvifType
|
||||
// PtzMove PTZ移动控制
|
||||
func (d *DeviceStatus) PtzMove(mode int, move ptz.Vector, speed ptz.Speed) error {
|
||||
dev, err := donvif.NewDevice(donvif.DeviceParams{
|
||||
Xaddr: fmt.Sprintf("http://%s/onvif/device_service", d.IP),
|
||||
Xaddr: fmt.Sprintf("%s:%s", d.IP, d.Port),
|
||||
Username: d.Username,
|
||||
Password: d.Password,
|
||||
})
|
||||
|
Reference in New Issue
Block a user