change version and code style

This commit is contained in:
Marko Oldenburg 2018-11-28 13:11:32 +01:00
parent 372e11598c
commit 7feef51543

View File

@ -229,7 +229,9 @@ sub Define($$) {
; # es wird geprüft ob bereits eine Instanz unseres Modules existiert,wenn ja wird abgebrochen ; # es wird geprüft ob bereits eine Instanz unseres Modules existiert,wenn ja wird abgebrochen
return 'too few parameters: define <name> ShuttersControl' if ( @a != 2 ); return 'too few parameters: define <name> ShuttersControl' if ( @a != 2 );
return return
'Cannot define ShuttersControl device. Perl modul ' . ${missingModul} . 'is missing.' 'Cannot define ShuttersControl device. Perl modul '
. ${missingModul}
. 'is missing.'
if ($missingModul) if ($missingModul)
; # Abbruch wenn benötigte Hilfsmodule nicht vorhanden sind / vorerst unwichtig ; # Abbruch wenn benötigte Hilfsmodule nicht vorhanden sind / vorerst unwichtig
@ -789,8 +791,10 @@ sub EventProcessingWindowRec($@) {
$shutters->setShuttersDev($shuttersDev); $shutters->setShuttersDev($shuttersDev);
#### Hardware Lock der Rollläden #### Hardware Lock der Rollläden
$shutters->setHardLockOut('off') if ( $1 eq 'closed' and $shutters->getShuttersPlace eq 'terrace' ); $shutters->setHardLockOut('off')
$shutters->setHardLockOut('on') if ( $1 eq 'open' and $shutters->getShuttersPlace eq 'terrace' ); if ( $1 eq 'closed' and $shutters->getShuttersPlace eq 'terrace' );
$shutters->setHardLockOut('on')
if ( $1 eq 'open' and $shutters->getShuttersPlace eq 'terrace' );
$shutters->setNoOffset(1); $shutters->setNoOffset(1);
@ -825,10 +829,12 @@ sub EventProcessingWindowRec($@) {
and $shutters->getStatus != $shutters->getOpenPos and $shutters->getStatus != $shutters->getOpenPos
and ( $homemode ne 'asleep' and ( $homemode ne 'asleep'
or $homemode ne 'gotosleep' or $homemode ne 'gotosleep'
or $homemode eq 'none' ) ) or $homemode eq 'none' )
)
{ {
$shutters->setLastDrive('window day closed'); $shutters->setLastDrive('window day closed');
ShuttersCommandSet( $hash, $shuttersDev,$shutters->getLastPos ); ShuttersCommandSet( $hash, $shuttersDev,
$shutters->getLastPos );
} }
elsif (not IsDay( $hash, $shuttersDev ) elsif (not IsDay( $hash, $shuttersDev )
@ -836,7 +842,8 @@ sub EventProcessingWindowRec($@) {
or $homemode eq 'gotosleep' ) or $homemode eq 'gotosleep' )
{ {
$shutters->setLastDrive('window night closed'); $shutters->setLastDrive('window night closed');
ShuttersCommandSet( $hash, $shuttersDev,$shutters->getClosedPos ); ShuttersCommandSet( $hash, $shuttersDev,
$shutters->getClosedPos );
} }
} }
} }
@ -1066,7 +1073,9 @@ sub EventProcessingResidents($@) {
{ {
$shutters->setLastDrive('selfeDefense inactive'); $shutters->setLastDrive('selfeDefense inactive');
$shutters->setDriveCmd( $shutters->getLastPos ); $shutters->setDriveCmd( $shutters->getLastPos );
$shutters->setHardLockOut('on') if ( CheckIfShuttersWindowRecOpen($shuttersDev) == 2 and $shutters->getShuttersPlace eq 'terrace' ); $shutters->setHardLockOut('on')
if ( CheckIfShuttersWindowRecOpen($shuttersDev) == 2
and $shutters->getShuttersPlace eq 'terrace' );
} }
elsif ( elsif (
$shutters->getStatus == $shutters->getClosedPos $shutters->getStatus == $shutters->getClosedPos
@ -1313,7 +1322,6 @@ sub ShadingProcessing($@) {
) = @_; ) = @_;
my $name = $hash->{NAME}; my $name = $hash->{NAME};
# Log3( $name, 1, # Log3( $name, 1,
# "AutoShuttersControl ($name) - Shading Processing, Rollladen: " . $shuttersDev . " Azimuth: " . $azimuth . " Elevation: " . $elevation . " Brightness: " . $brightness . " OutTemp: " . $outTemp # "AutoShuttersControl ($name) - Shading Processing, Rollladen: " . $shuttersDev . " Azimuth: " . $azimuth . " Elevation: " . $elevation . " Brightness: " . $brightness . " OutTemp: " . $outTemp
# ); # );
@ -1331,7 +1339,6 @@ sub ShadingProcessing($@) {
# Log3( $name, 1, # Log3( $name, 1,
# "AutoShuttersControl ($name) - Shading Processing hinter dem return"); # "AutoShuttersControl ($name) - Shading Processing hinter dem return");
} }
sub EventProcessingPartyMode($) { sub EventProcessingPartyMode($) {
@ -2328,10 +2335,12 @@ sub setHardLockOut {
CommandSet( undef, $self->{shuttersDev} . ' inhibit ' . $cmd ) CommandSet( undef, $self->{shuttersDev} . ' inhibit ' . $cmd )
if ( $shutters->getLockOutCmd eq 'inhibit' ); if ( $shutters->getLockOutCmd eq 'inhibit' );
CommandSet( undef, CommandSet( undef,
$self->{shuttersDev} . ' ' . ( $cmd eq 'on' ? 'blocked' : 'unblocked' ) ) $self->{shuttersDev} . ' '
. ( $cmd eq 'on' ? 'blocked' : 'unblocked' ) )
if ( $shutters->getLockOutCmd eq 'blocked' ); if ( $shutters->getLockOutCmd eq 'blocked' );
CommandSet( undef, CommandSet( undef,
$self->{shuttersDev} . ' ' . ( $cmd eq 'on' ? 'protectionOn' : 'protectionOff' ) ) $self->{shuttersDev} . ' '
. ( $cmd eq 'on' ? 'protectionOn' : 'protectionOff' ) )
if ( $shutters->getLockOutCmd eq 'protection' ); if ( $shutters->getLockOutCmd eq 'protection' );
} }
return 0; return 0;