Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Set autofocus when video camera is armed.

    Code Block
    OnEvent("CAM","1","ARM")
    {
        DoReact("TELEMETRY","1", "AUTOFOCUS_ON");
    }
  2. Rotate video camera to position specified in the first preset while enabling relay.

    Code Block
    OnEvent("GRELE","1","ON")
    {
        telemetry_id= GetObjectParam("CAM","1","parent_id");
        DoReact("TELEMETRY","telemetry_id","SETUP","GO_preset<1>");
    }
  3. Record the patrol route for Camera 1 corresponding to the PTZ device 1.1. The route consists of two points, such that to go from point 1 to point 2, you need to rotate the camera to the left at speed of 6 for 2 seconds. Patrolling must be performed at speed of 10. The time at each point of the route is 25 seconds. It is supposed that when the program is started, the camera is set to the position corresponding to the first point of the route.

    Code Block
    OnEvent("MACRO","1","RUN")
    {
        DoReact("TELEMETRY","1.1","PATROL_LEARN","cam<1>,preset<1>,tel_prior<1>,dwell<25>,speed<10>,flush_tour<0>");
        Wait(2);
        DoReact("TELEMETRY","1.1","LEFT","speed<6>,tel_prior<1>");
        Wait(2);
        DoReact("TELEMETRY","1.1","STOP","speed<6>,tel_prior<1>");
        Wait(2);
        DoReact("TELEMETRY","1.1","PATROL_LEARN","cam<1>,preset<2>,tel_prior<1>,dwell<25>,speed<10>,flush_tour<1>");
    }