feat: add zoom_in and zoom_out commands to PTZ command map
note: the `API.md` said it's `zoom_in` and `zoom_out` with underscore, while the go ptzCmdMap said it's `zoomin` and `zoomout` with underscore; I choose to support both (or unify them?)
This commit is contained in:
@ -15,6 +15,8 @@ var (
|
|||||||
"upleft": 10,
|
"upleft": 10,
|
||||||
"zoomin": 16,
|
"zoomin": 16,
|
||||||
"zoomout": 32,
|
"zoomout": 32,
|
||||||
|
"zoom_in": 16,
|
||||||
|
"zoom_out": 32,
|
||||||
}
|
}
|
||||||
|
|
||||||
ptzSpeedMap = map[string]uint8{
|
ptzSpeedMap = map[string]uint8{
|
||||||
|
|||||||
@ -159,7 +159,7 @@ func TestPTZCmdMap(t *testing.T) {
|
|||||||
// 验证所有预定义的命令都存在
|
// 验证所有预定义的命令都存在
|
||||||
expectedCommands := []string{
|
expectedCommands := []string{
|
||||||
"stop", "right", "left", "down", "downright", "downleft",
|
"stop", "right", "left", "down", "downright", "downleft",
|
||||||
"up", "upright", "upleft", "zoomin", "zoomout",
|
"up", "upright", "upleft", "zoomin", "zoomout", "zoom_in", "zoom_out",
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, cmd := range expectedCommands {
|
for _, cmd := range expectedCommands {
|
||||||
|
|||||||
Reference in New Issue
Block a user