2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-22 02:10:32 +00:00

49_SSCam: contrib 9.3.0

git-svn-id: https://svn.fhem.de/fhem/trunk@22239 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2020-06-23 11:38:46 +00:00
parent 5f92ed7cb5
commit 74463bfe77

View File

@ -3991,7 +3991,7 @@ sub SSCam_getptzlistpreset {
Log3($name, 4, "$name - Retrieval of Presets for $camname can't be executed - $camname is not a PTZ-Camera"); Log3($name, 4, "$name - Retrieval of Presets for $camname can't be executed - $camname is not a PTZ-Camera");
return; return;
} }
if (ReadingsVal("$name", "CapPTZTilt", "") eq "false" | !SSCam_IsCapPTZPan($hash)) { if(!SSCam_IsCapPTZTilt($hash) | !SSCam_IsCapPTZPan($hash)) {
Log3($name, 4, "$name - Retrieval of Presets for $camname can't be executed - $camname has no capability to tilt/pan"); Log3($name, 4, "$name - Retrieval of Presets for $camname can't be executed - $camname has no capability to tilt/pan");
return; return;
} }
@ -4023,7 +4023,7 @@ sub SSCam_getptzlistpatrol {
Log3($name, 4, "$name - Retrieval of Patrols for $camname can't be executed - $camname is not a PTZ-Camera"); Log3($name, 4, "$name - Retrieval of Patrols for $camname can't be executed - $camname is not a PTZ-Camera");
return; return;
} }
if (ReadingsVal("$name", "CapPTZTilt", "") eq "false" | !SSCam_IsCapPTZPan($hash)) { if(!SSCam_IsCapPTZTilt($hash) | !SSCam_IsCapPTZPan($hash)) {
Log3($name, 4, "$name - Retrieval of Patrols for $camname can't be executed - $camname has no capability to tilt/pan"); Log3($name, 4, "$name - Retrieval of Patrols for $camname can't be executed - $camname has no capability to tilt/pan");
return; return;
} }
@ -7167,15 +7167,23 @@ sub SSCam_IsCapZoom {
return $cap; return $cap;
} }
sub SSCam_IsCapPTZPan { # PTZ Eigenschaft sub SSCam_IsCapPTZPan { # PTZ Pan Eigenschaft
my $hash = shift; my $hash = shift;
my $name = $hash->{NAME}; my $name = $hash->{NAME};
return 1;
my $cap = ReadingsVal($name, "CapPTZPan", "false") ne "false" ? 1 : 0; my $cap = ReadingsVal($name, "CapPTZPan", "false") ne "false" ? 1 : 0;
return $cap; return $cap;
} }
sub SSCam_IsCapPTZTilt { # PTZ Tilt Eigenschaft
my $hash = shift;
my $name = $hash->{NAME};
my $cap = ReadingsVal($name, "CapPTZTilt", "false") ne "false" ? 1 : 0;
return $cap;
}
############################################################################### ###############################################################################
# JSON Boolean Test und Mapping # JSON Boolean Test und Mapping
############################################################################### ###############################################################################