34_ESPEasy.pm: removed trailing white spaces

git-svn-id: https://svn.fhem.de/fhem/trunk@14415 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
dev0
2017-05-30 10:54:48 +00:00
parent 722ef3cc41
commit 95d43fceb4

View File

@@ -440,7 +440,6 @@ sub ESPEasy_Set($$@)
"parameter(s)\n"."Usage: 'set $name $ESPEasy_setCmdsUsage{$cmd}'"; "parameter(s)\n"."Usage: 'set $name $ESPEasy_setCmdsUsage{$cmd}'";
} }
#Lights Plugin #Lights Plugin
if (defined AttrVal($name,"mapLightCmds",undef) && $cmd =~ m/^(ct|pct|rgb|on|off|toggle)$/i) { if (defined AttrVal($name,"mapLightCmds",undef) && $cmd =~ m/^(ct|pct|rgb|on|off|toggle)$/i) {
unshift @params, $cmd; unshift @params, $cmd;
@@ -796,22 +795,22 @@ sub ESPEasy_Notify($$)
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
sub ESPEasy_Rename() { sub ESPEasy_Rename() {
my ($new,$old) = @_; my ($new,$old) = @_;
my $i = 0; my $i = 0;
my $type = $defs{"$new"}->{TYPE}; my $type = $defs{"$new"}->{TYPE};
my $name = $defs{"$new"}->{NAME}; my $name = $defs{"$new"}->{NAME};
my $subtype = $defs{"$new"}->{SUBTYPE}; my $subtype = $defs{"$new"}->{SUBTYPE};
my @am; my @am;
# copy values from old to new device # copy values from old to new device
setKeyValue($type."_".$new."-user",getKeyValue($type."_".$old."-user")); setKeyValue($type."_".$new."-user",getKeyValue($type."_".$old."-user"));
setKeyValue($type."_".$new."-pass",getKeyValue($type."_".$old."-pass")); setKeyValue($type."_".$new."-pass",getKeyValue($type."_".$old."-pass"));
setKeyValue($type."_".$new."-firstrun",getKeyValue($type."_".$old."-firstrun")); setKeyValue($type."_".$new."-firstrun",getKeyValue($type."_".$old."-firstrun"));
# delete old entries # delete old entries
setKeyValue($type."_".$old."-user",undef); setKeyValue($type."_".$old."-user",undef);
setKeyValue($type."_".$old."-pass",undef); setKeyValue($type."_".$old."-pass",undef);
setKeyValue($type."_".$old."-firstrun",undef); setKeyValue($type."_".$old."-firstrun",undef);
# replace IDENT in devices if bridge name changed # replace IDENT in devices if bridge name changed
if ($subtype eq "bridge") { if ($subtype eq "bridge") {
@@ -845,7 +844,7 @@ sub ESPEasy_Rename() {
."Don't forget to save chages."; ."Don't forget to save chages.";
} }
return undef; return undef;
} }
@@ -1383,8 +1382,7 @@ sub ESPEasy_httpReqParse($$$)
# 10 = SENSOR_TYPE_SWITCH # 10 = SENSOR_TYPE_SWITCH
my $vType = (defined $res->{plugin} && $res->{plugin} eq "1") ? "10" : "0"; my $vType = (defined $res->{plugin} && $res->{plugin} eq "1") ? "10" : "0";
if (defined $res->{plugin} && $res->{plugin} eq "123") { if (defined $res->{plugin} && $res->{plugin} eq "123") {
# Lights plugin # Lights plugin (eq 123)
# Log 1, Dumper $res;
foreach (keys %{ $res }) { foreach (keys %{ $res }) {
push @values, "r||$_||".$res->{$_}."||".$vType push @values, "r||$_||".$res->{$_}."||".$vType
if $res->{$_} ne "" && $_ ne "plugin"; if $res->{$_} ne "" && $_ ne "plugin";
@@ -1528,7 +1526,6 @@ sub ESPEasy_resetTimer($;$)
$sig = "" if !$sig; $sig = "" if !$sig;
if ($init_done == 1) { if ($init_done == 1) {
#Log3 $name, 5, "$type $name: RemoveInternalTimer ESPEasy_statusRequest";
RemoveInternalTimer($hash, "ESPEasy_statusRequest"); RemoveInternalTimer($hash, "ESPEasy_statusRequest");
} }
@@ -1889,12 +1886,10 @@ sub ESPEasy_setCT($$@)
my $wwcwMaxBri = AttrVal($name,"wwcwMaxBri",0); my $wwcwMaxBri = AttrVal($name,"wwcwMaxBri",0);
my ($fww,$fcw) = ESPEasy_ct2wwcw($ct, $ctWW, $ctCW, $wwcwMaxBri, $ctWW_lim, $ctCW_lim); my ($fww,$fcw) = ESPEasy_ct2wwcw($ct, $ctWW, $ctCW, $wwcwMaxBri, $ctWW_lim, $ctCW_lim);
#my ($fww,$fcw) = ESPEasy_ct2wwcw($ct, $ctWW, $ctCW);
ESPEasy_Set($hash, $name, "pwm", ($gww, int $pct*10.23*$fww)); ESPEasy_Set($hash, $name, "pwm", ($gww, int $pct*10.23*$fww));
ESPEasy_Set($hash, $name, "pwm", ($gcw, int $pct*10.23*$fcw)); ESPEasy_Set($hash, $name, "pwm", ($gcw, int $pct*10.23*$fcw));
return undef; return undef;
} }
@@ -2073,9 +2068,8 @@ sub ESPEasy_urlEncodeDisplayText($$@)
# collect all texts parameters # collect all texts parameters
for (my $i=$pp-1; $i<$c; $i++) { for (my $i=$pp-1; $i<$c; $i++) {
$params[$i] =~ s/,/./g; # comma is http url parameter splitter $params[$i] =~ s/,/./g; # comma is http url parameter splitter
#$params[$i] =~ s/[\x00-\x1F\x7F-\xFF]//g; # remove non-printable chrs push @t, $params[$i];
push( @t, $params[$i] )
} }
my $text = join(" ", @t); my $text = join(" ", @t);
@@ -2108,8 +2102,8 @@ sub ESPEasy_loadRequiredModules($)
$hash->{helper}{pm}{$_} = 0; $hash->{helper}{pm}{$_} = 0;
if ($init_done || $hash->{SUBTYPE} eq "bridge") { if ($init_done || $hash->{SUBTYPE} eq "bridge") {
my ($name,$type) = ($hash->{NAME},$hash->{TYPE}); my ($name,$type) = ($hash->{NAME},$hash->{TYPE});
Log3 $name, 1, "$type $name: WARNING: Perl module $_ is not installed. " Log3 $name, 1, "$type $name: WARNING: Perl module $_ is not installed. "
. "Reduced functionality!"; . "Reduced functionality!";
Log3 $name, 2, "$type $name: $@" if $init_done; Log3 $name, 2, "$type $name: $@" if $init_done;
} }
} }