Basic Features

Last Updated on : 2024-06-25 03:46:38download

The basic features of pan-tilt-zoom (PTZ) control include key control and self-check.

  • Self-check: The essential feature of a PTZ module. The PTZ module performs a self-check on the PTZ coordinate for calibration. Self-check is the most important feature of a PTZ camera.
  • Key control: The use of a virtual keypad on the mobile app to control the movement of the camera’s motor.

How it works

The PTZ module has two important threads:

  • Movement management thread: manages the movement of the PTZ and priority switching.

  • Message processing thread: handles the exchange of commands between the PTZ component and the external program.

    Basic Features

Self-check

Drive the motor to move in the direction of self-check at the maximum step size to reach the limit position, and then reset the current coordinates to zero.

Basic Features
  • Cameras with an infinite position structure require a limit switch for self-check. Drive the motor to move in the direction of self-check until reaching the limit switch, then reset the current coordinates to zero. After the self-check, the camera returns to the position before the self-check.

  • If this is the first self-check after power on, the camera returns to the position before power off.

  • If this is the first self-check after pairing, the camera returns to the home position (horizontal and vertical intermediate position).

  • The following snippet shows the function to customize the self-check.

    /**
    * @brief
    * @param[in] TY_SYS_PTZ_CHECK_MODE_E Self-check mode
    * @param[in] TY_SYS_PTZ_POS_TYPE_E The position the camera returns to after a patrol.
    * @retval void
    * @attention None.
    */
    static void __ptz_check(TY_SYS_PTZ_CHECK_MODE_E mode, TY_SYS_PTZ_POS_TYPE_E back_type)
    

Key control

Basic Features

The user controls the keypad on the mobile app to send a DP command to the camera, which then moves accordingly.

The camera does not respond to key control in the following two cases:

  • The camera is performing a self-check.
  • The camera rotates to the maximum position.