HikRobot HD Zoom Camera Module Technical Manual
be sent. (
Assume that the speed dome ID is 3.)
The sent data is 0xA0 0x03 0xC0 0xC1 0x41 0x56 0x56 0x43.
0xA0 --- Command Header
0x03 --- Speed Dome Address
0xC0 --- Command No.
0xC1 --- X-axis value of the center coordinate. -63 is 0xC1.
0x41 --- Y-axis value of the center coordinate.
0x56 --- Height
0x56 --- Width
0x43 --- XOR of the data
ii.
Click to Zoom-out Command Data Form (0xC1)
Command
Header
Speed
Dome
Address
Command
No.
X-axis
Y-axis
Width
Height
Checksum
Description
A0
ID
C1
Byte 1
Byte 2
Byte 3
Byte 4
Sum
Drag the mouse to the
position (x, y), and zoom
out the selected area (the
center is (x,y), the width is
w and the height is h) to a
certain ratio decided by
the speed dome.
Note:
The standard PELCO-P protocol is 0xA0-ID-D1-D2-D3-D4-0x AF-CRC, eight bytes in total.
The click to zoom-out command replaces C1, and 0xAF with Byte 4.
Command Header: 0xAF (one byte).
Speed Dome Address: Stands for speed dome ID (one byte).
Command: 0xC1 (one byte).
X-axis: The x position of the selected area center which ranges from -127 to +127 (one byte).
Y-axis: The y position of the selected area center which ranges from -127 to +127 (one byte).
See graph in Figure 3.3: Coordinate of the screen center is (0, 0). There are positive and negative values
of x-axis and y-axis. The right direction is the positive direction of x-axis and the upward direction is the
positive direction of y-axis. The coordinate value of positive direction is positive and the coordinate
value of negative direction is negative.
Width: The width of the selected area (one byte). The value ranges from 0 to 254.
Height: The height of the selected area (one byte). The value ranges from 0 to 254.
Checksum: XOR of the data (one byte). Refer the appendix for details.
unsigned char i;
unsigned char cTemp=PIT_Data[1];
for(i=2;i<7;i++)
{
cTemp = cTemp^PIT_Data[i];// XOR
}
For example, to zoom out the selected area in figure 3.4 to a certain ratio, the following command