From f35d4a4dbbd1a234e33a8cec9bac0d5d1b69c5b7 Mon Sep 17 00:00:00 2001 From: Robert Jacobson Date: Wed, 3 Aug 2022 09:57:57 -0400 Subject: [PATCH] Make zoom buttons work for Axis P5655-E --- .../lib/ZoneMinder/Control/AxisV2.pm | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Control/AxisV2.pm b/scripts/ZoneMinder/lib/ZoneMinder/Control/AxisV2.pm index e50449927..8292de593 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/Control/AxisV2.pm +++ b/scripts/ZoneMinder/lib/ZoneMinder/Control/AxisV2.pm @@ -303,6 +303,44 @@ sub moveRelDownLeft { $self->sendCmd($cmd); } +sub zoomConTele { + my $self = shift; + my $params = shift; + my $speed = 20; + Debug('Zoom ConTele'); + my $cmd = "/axis-cgi/com/ptz.cgi?continuouszoommove=$speed"; + $self->sendCmd($cmd); +} + +sub zoomConWide { + my $self = shift; + my $params = shift; + #my $step = $self->getParam($params, 'step'); + my $speed = -20; + Debug('Zoom ConWide'); + my $cmd = "/axis-cgi/com/ptz.cgi?continuouszoommove=$speed"; + $self->sendCmd($cmd); +} + +sub zoomStop { + my $self = shift; + my $params = shift; + my $speed = 0; + Debug('Zoom Stop'); + my $cmd = "/axis-cgi/com/ptz.cgi?continuouszoommove=$speed"; + $self->sendCmd($cmd); +} + +sub moveStop { + my $self = shift; + my $params = shift; + my $speed = 0; + Debug('Move Stop'); + my $cmd = "/axis-cgi/com/ptz.cgi?continuouspantiltmove=$speed,$speed"; + my $cmd = "/axis-cgi/com/ptz.cgi?continuouszoommove=$speed"; + $self->sendCmd($cmd); +} + sub zoomRelTele { my $self = shift; my $params = shift;