code style

This commit is contained in:
Marko Oldenburg
2019-05-03 08:57:35 +02:00
parent 54926ed6df
commit f0eecafb56

View File

@@ -1235,8 +1235,7 @@ sub EventProcessingRain($@) {
if ( $val > $triggerMax if ( $val > $triggerMax
and $shutters->getStatus != $closedPos and $shutters->getStatus != $closedPos
and IsAfterShuttersManualBlocking($shuttersDev) and IsAfterShuttersManualBlocking($shuttersDev)
and $shutters->getRainProtectionStatus eq 'unprotection' and $shutters->getRainProtectionStatus eq 'unprotection' )
)
{ {
$shutters->setLastDrive('rain protection'); $shutters->setLastDrive('rain protection');
$shutters->setDriveCmd($closedPos); $shutters->setDriveCmd($closedPos);
@@ -1245,8 +1244,7 @@ sub EventProcessingRain($@) {
elsif ( ( $val == 0 or $val < $triggerMax ) elsif ( ( $val == 0 or $val < $triggerMax )
and $shutters->getStatus == $closedPos and $shutters->getStatus == $closedPos
and IsAfterShuttersManualBlocking($shuttersDev) and IsAfterShuttersManualBlocking($shuttersDev)
and $shutters->getRainProtectionStatus eq 'protection' and $shutters->getRainProtectionStatus eq 'protection' )
)
{ {
$shutters->setLastDrive('rain un-protection'); $shutters->setLastDrive('rain un-protection');
$shutters->setDriveCmd( $shutters->getLastPos ); $shutters->setDriveCmd( $shutters->getLastPos );
@@ -3674,19 +3672,24 @@ sub getIfInShading {
sub getWindProtectionStatus { # Werte protection, unprotection sub getWindProtectionStatus { # Werte protection, unprotection
my $self = shift; my $self = shift;
return ( defined( $self->{ $self->{shuttersDev} }->{ASC_WindParameters}) return (
and defined( $self->{ $self->{shuttersDev} }->{ASC_WindParameters} )
defined( $self->{ $self->{shuttersDev} }->{ASC_WindParameters}->{VAL}) and defined(
? $self->{ $self->{shuttersDev} }->{ASC_WindParameters}->{VAL} : 'unprotection' ); $self->{ $self->{shuttersDev} }->{ASC_WindParameters}->{VAL}
)
? $self->{ $self->{shuttersDev} }->{ASC_WindParameters}->{VAL}
: 'unprotection'
);
} }
sub getRainProtectionStatus { # Werte protection, unprotection sub getRainProtectionStatus { # Werte protection, unprotection
my $self = shift; my $self = shift;
return ( defined( $self->{ $self->{shuttersDev} }->{RainProtection}) return ( defined( $self->{ $self->{shuttersDev} }->{RainProtection} )
and and
defined( $self->{ $self->{shuttersDev} }->{RainProtection}->{VAL}) defined( $self->{ $self->{shuttersDev} }->{RainProtection}->{VAL} )
? $self->{ $self->{shuttersDev} }->{RainProtection}->{VAL} : 'unprotection' ); ? $self->{ $self->{shuttersDev} }->{RainProtection}->{VAL}
: 'unprotection' );
} }
sub getShadingStatusTimestamp { sub getShadingStatusTimestamp {