2005-12-16 18:05:29 +08:00
|
|
|
#!/usr/bin/perl -wT
|
|
|
|
#
|
|
|
|
# ==========================================================================
|
|
|
|
#
|
|
|
|
# ZoneMinder Axis HTTP API v2 Control Script, $Date$, $Revision$
|
2006-01-17 19:32:47 +08:00
|
|
|
# Copyright (C) 2003, 2004, 2005, 2006 Philip Coombes
|
2005-12-16 18:05:29 +08:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
#
|
|
|
|
# ==========================================================================
|
|
|
|
#
|
|
|
|
# This script continuously monitors the recorded events for the given
|
|
|
|
# monitor and applies any filters which would delete and/or upload
|
|
|
|
# matching events
|
|
|
|
#
|
|
|
|
use strict;
|
|
|
|
|
|
|
|
# ==========================================================================
|
|
|
|
#
|
|
|
|
# These are the elements you can edit to suit your installation
|
|
|
|
#
|
|
|
|
# ==========================================================================
|
|
|
|
|
2005-12-16 21:16:37 +08:00
|
|
|
use constant DBG_ID => "zmctrl-axis"; # Tag that appears in debug to identify source
|
2005-12-16 20:17:10 +08:00
|
|
|
use constant DBG_LEVEL => 0; # 0 is errors, warnings and info only, > 0 for debug
|
2005-12-16 18:05:29 +08:00
|
|
|
|
|
|
|
# ==========================================================================
|
|
|
|
|
|
|
|
use ZoneMinder;
|
|
|
|
use Getopt::Long;
|
|
|
|
use Device::SerialPort;
|
|
|
|
|
|
|
|
$| = 1;
|
|
|
|
|
|
|
|
$ENV{PATH} = '/bin:/usr/bin';
|
|
|
|
$ENV{SHELL} = '/bin/sh' if exists $ENV{SHELL};
|
|
|
|
delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
|
|
|
|
|
|
|
|
sub Usage
|
|
|
|
{
|
|
|
|
print( "
|
|
|
|
Usage: zmcontrol-axis-v2.pl <various options>
|
|
|
|
");
|
|
|
|
exit( -1 );
|
|
|
|
}
|
|
|
|
|
2006-01-12 07:55:22 +08:00
|
|
|
zmDbgInit( DBG_ID, level=>DBG_LEVEL );
|
2005-12-21 01:03:33 +08:00
|
|
|
|
2005-12-16 18:05:29 +08:00
|
|
|
my $arg_string = join( " ", @ARGV );
|
|
|
|
|
|
|
|
my $address;
|
|
|
|
my $command;
|
|
|
|
my ( $speed, $step );
|
|
|
|
my ( $xcoord, $ycoord );
|
|
|
|
my ( $width, $height );
|
|
|
|
my ( $panspeed, $tiltspeed );
|
|
|
|
my ( $panstep, $tiltstep );
|
|
|
|
my $preset;
|
|
|
|
|
|
|
|
if ( !GetOptions(
|
|
|
|
'address=s'=>\$address,
|
|
|
|
'command=s'=>\$command,
|
|
|
|
'speed=i'=>\$speed,
|
|
|
|
'step=i'=>\$step,
|
|
|
|
'xcoord=i'=>\$xcoord,
|
|
|
|
'ycoord=i'=>\$ycoord,
|
|
|
|
'width=i'=>\$width,
|
|
|
|
'height=i'=>\$height,
|
|
|
|
'panspeed=i'=>\$panspeed,
|
|
|
|
'tiltspeed=i'=>\$tiltspeed,
|
|
|
|
'panstep=i'=>\$panstep,
|
|
|
|
'tiltstep=i'=>\$tiltstep,
|
|
|
|
'preset=i'=>\$preset
|
|
|
|
)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
Usage();
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( !$address )
|
|
|
|
{
|
|
|
|
Usage();
|
|
|
|
}
|
|
|
|
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( $arg_string."\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
|
|
|
|
srand( time() );
|
|
|
|
|
|
|
|
sub printMsg
|
|
|
|
{
|
|
|
|
my $msg = shift;
|
|
|
|
my $msg_len = length($msg);
|
|
|
|
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( $msg."[".$msg_len."]\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
sub sendCmd
|
|
|
|
{
|
|
|
|
my $cmd = shift;
|
|
|
|
|
|
|
|
my $result = undef;
|
|
|
|
|
|
|
|
printMsg( $cmd, "Tx" );
|
|
|
|
|
|
|
|
use LWP::UserAgent;
|
|
|
|
my $ua = LWP::UserAgent->new;
|
|
|
|
$ua->agent( "ZoneMinder Control Agent/".ZM_VERSION );
|
|
|
|
|
|
|
|
#print( "http://$address/$cmd\n" );
|
|
|
|
my $req = HTTP::Request->new( GET=>"http://$address/$cmd" );
|
|
|
|
my $res = $ua->request($req);
|
|
|
|
|
|
|
|
if ( $res->is_success )
|
|
|
|
{
|
|
|
|
$result = !undef;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2005-12-16 20:17:10 +08:00
|
|
|
Error( "Error check failed: '".$res->status_line()."'\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
return( $result );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub cameraReset
|
|
|
|
{
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Camera Reset\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "nphRestart?PAGE=Restart&Restart=OK";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub moveUp
|
|
|
|
{
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Move Up\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?move=up";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub moveDown
|
|
|
|
{
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Move Down\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?move=down";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub moveLeft
|
|
|
|
{
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Move Left\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?move=left";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub moveRight
|
|
|
|
{
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Move Right\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?move=right";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub moveUpRight
|
|
|
|
{
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Move Up/Right\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?move=upright";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub moveUpLeft
|
|
|
|
{
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Move Up/Left\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?move=upleft";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub moveDownRight
|
|
|
|
{
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Move Down/Right\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?move=downright";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub moveDownLeft
|
|
|
|
{
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Move Down/Left\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?move=downleft";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub moveMap
|
|
|
|
{
|
|
|
|
my ( $xcoord, $ycoord, $width, $height ) = @_;
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Move Map to $xcoord,$ycoord\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?center=$xcoord,$ycoord&imagewidth=$width&imageheight=$height";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub stepUp
|
|
|
|
{
|
|
|
|
my $step = shift;
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Step Up $step\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?rtilt=$step";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub stepDown
|
|
|
|
{
|
|
|
|
my $step = shift;
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Step Down $step\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?rtilt=-$step";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub stepLeft
|
|
|
|
{
|
|
|
|
my $step = shift;
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Step Left $step\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?rpan=-$step";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub stepRight
|
|
|
|
{
|
|
|
|
my $step = shift;
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Step Right $step\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?rpan=$step";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub stepUpRight
|
|
|
|
{
|
|
|
|
my $panstep = shift;
|
|
|
|
my $tiltstep = shift;
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Step Up/Right $tiltstep/$panstep\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?rpan=$panstep&rtilt=$tiltstep";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub stepUpLeft
|
|
|
|
{
|
|
|
|
my $panstep = shift;
|
|
|
|
my $tiltstep = shift;
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Step Up/Left $tiltstep/$panstep\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?rpan=-$panstep&rtilt=$tiltstep";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub stepDownRight
|
|
|
|
{
|
|
|
|
my $panstep = shift;
|
|
|
|
my $tiltstep = shift;
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Step Down/Right $tiltstep/$panstep\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?rpan=$panstep&rtilt=-$tiltstep";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub stepDownLeft
|
|
|
|
{
|
|
|
|
my $panstep = shift;
|
|
|
|
my $tiltstep = shift;
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Step Down/Left $tiltstep/$panstep\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?rpan=-$panstep&rtilt=-$tiltstep";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub zoomTele
|
|
|
|
{
|
|
|
|
my $step = shift;
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Zoom Tele\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?rzoom=$step";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub zoomWide
|
|
|
|
{
|
|
|
|
my $step = shift;
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Zoom Wide\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?rzoom=-$step";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub focusNear
|
|
|
|
{
|
|
|
|
my $step = shift;
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Focus Near\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?rfocus=-$step";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub focusFar
|
|
|
|
{
|
|
|
|
my $step = shift;
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Focus Far\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?rfocus=$step";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub focusAuto
|
|
|
|
{
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Focus Auto\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?autofocus=on";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub focusMan
|
|
|
|
{
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Focus Manual\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?autofocus=off";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub irisOpen
|
|
|
|
{
|
|
|
|
my $step = shift;
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Iris Open\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?riris=$step";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub irisClose
|
|
|
|
{
|
|
|
|
my $step = shift;
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Iris Close\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?riris=-$step";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub irisAuto
|
|
|
|
{
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Iris Auto\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?autoiris=on";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub irisMan
|
|
|
|
{
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Iris Manual\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?autoiris=off";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub presetClear
|
|
|
|
{
|
|
|
|
my $preset = shift || 1;
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Clear Preset $preset\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "nphPresetNameCheck?Data=$preset";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub presetSet
|
|
|
|
{
|
|
|
|
my $preset = shift || 1;
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Set Preset $preset\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?setserverpresetno=$preset";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub presetGoto
|
|
|
|
{
|
|
|
|
my $preset = shift || 1;
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Goto Preset $preset\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?gotoserverpresetno=$preset";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
sub presetHome
|
|
|
|
{
|
2006-01-02 04:30:15 +08:00
|
|
|
Debug( "Home Preset\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
my $cmd = "/axis-cgi/com/ptz.cgi?move=home";
|
|
|
|
sendCmd( $cmd );
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( $command eq "move_con_up" )
|
|
|
|
{
|
|
|
|
moveUp();
|
|
|
|
}
|
|
|
|
elsif ( $command eq "move_con_down" )
|
|
|
|
{
|
|
|
|
moveDown();
|
|
|
|
}
|
|
|
|
elsif ( $command eq "move_con_left" )
|
|
|
|
{
|
|
|
|
moveLeft();
|
|
|
|
}
|
|
|
|
elsif ( $command eq "move_con_right" )
|
|
|
|
{
|
|
|
|
moveRight();
|
|
|
|
}
|
|
|
|
elsif ( $command eq "move_con_upleft" )
|
|
|
|
{
|
|
|
|
moveUpLeft();
|
|
|
|
}
|
|
|
|
elsif ( $command eq "move_con_upright" )
|
|
|
|
{
|
|
|
|
moveUpRight();
|
|
|
|
}
|
|
|
|
elsif ( $command eq "move_con_downleft" )
|
|
|
|
{
|
|
|
|
moveDownLeft();
|
|
|
|
}
|
|
|
|
elsif ( $command eq "move_con_downright" )
|
|
|
|
{
|
|
|
|
moveDownLeft();
|
|
|
|
}
|
|
|
|
elsif ( $command eq "move_map" )
|
|
|
|
{
|
|
|
|
moveMap( $xcoord, $ycoord, $width, $height );
|
|
|
|
}
|
|
|
|
elsif ( $command eq "move_rel_up" )
|
|
|
|
{
|
|
|
|
stepUp( $tiltstep );
|
|
|
|
}
|
|
|
|
elsif ( $command eq "move_rel_down" )
|
|
|
|
{
|
|
|
|
stepDown( $tiltstep );
|
|
|
|
}
|
|
|
|
elsif ( $command eq "move_rel_left" )
|
|
|
|
{
|
|
|
|
stepLeft( $panstep );
|
|
|
|
}
|
|
|
|
elsif ( $command eq "move_rel_right" )
|
|
|
|
{
|
|
|
|
stepRight( $panstep );
|
|
|
|
}
|
|
|
|
elsif ( $command eq "move_rel_upleft" )
|
|
|
|
{
|
|
|
|
stepUpLeft( $panstep, $tiltstep );
|
|
|
|
}
|
|
|
|
elsif ( $command eq "move_rel_upright" )
|
|
|
|
{
|
|
|
|
stepUpRight( $panstep, $tiltstep );
|
|
|
|
}
|
|
|
|
elsif ( $command eq "move_rel_downleft" )
|
|
|
|
{
|
|
|
|
stepDownLeft( $panstep, $tiltstep );
|
|
|
|
}
|
|
|
|
elsif ( $command eq "move_rel_downright" )
|
|
|
|
{
|
|
|
|
stepDownRight( $panstep, $tiltstep );
|
|
|
|
}
|
|
|
|
elsif ( $command eq "zoom_rel_tele" )
|
|
|
|
{
|
|
|
|
zoomTele( $step );
|
|
|
|
}
|
|
|
|
elsif ( $command eq "zoom_rel_wide" )
|
|
|
|
{
|
|
|
|
zoomWide( $step );
|
|
|
|
}
|
|
|
|
elsif ( $command eq "focus_rel_near" )
|
|
|
|
{
|
|
|
|
focusNear( $step );
|
|
|
|
}
|
|
|
|
elsif ( $command eq "focus_rel_far" )
|
|
|
|
{
|
|
|
|
focusFar( $step );
|
|
|
|
}
|
|
|
|
elsif ( $command eq "focus_auto" )
|
|
|
|
{
|
|
|
|
focusAuto();
|
|
|
|
}
|
|
|
|
elsif ( $command eq "focus_man" )
|
|
|
|
{
|
|
|
|
focusMan();
|
|
|
|
}
|
|
|
|
elsif ( $command eq "iris_rel_open" )
|
|
|
|
{
|
|
|
|
irisOpen( $step );
|
|
|
|
}
|
|
|
|
elsif ( $command eq "iris_rel_close" )
|
|
|
|
{
|
|
|
|
irisClose( $step );
|
|
|
|
}
|
|
|
|
elsif ( $command eq "iris_auto" )
|
|
|
|
{
|
|
|
|
irisAuto();
|
|
|
|
}
|
|
|
|
elsif ( $command eq "iris_man" )
|
|
|
|
{
|
|
|
|
irisMan();
|
|
|
|
}
|
|
|
|
elsif ( $command eq "preset_home" )
|
|
|
|
{
|
|
|
|
presetHome();
|
|
|
|
}
|
|
|
|
elsif ( $command eq "preset_set" )
|
|
|
|
{
|
|
|
|
presetSet( $preset );
|
|
|
|
}
|
|
|
|
elsif ( $command eq "preset_goto" )
|
|
|
|
{
|
|
|
|
presetGoto( $preset );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2005-12-16 20:17:10 +08:00
|
|
|
Error( "Can't handle command $command\n" );
|
2005-12-16 18:05:29 +08:00
|
|
|
}
|