AutomowerConnect(Device): switch to library use

git-svn-id: https://svn.fhem.de/fhem/trunk@27182 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Ellert
2023-02-05 16:30:17 +00:00
parent f36df5e210
commit 0fed19904c
2 changed files with 6 additions and 6 deletions

View File

@@ -298,7 +298,7 @@ sub AlignArray {
my @searchposlon = ($hash->{helper}{searchpos}[0]{longitude}, $hash->{helper}{searchpos}[1]{longitude});
my @searchposlat = ($hash->{helper}{searchpos}[0]{latitude}, $hash->{helper}{searchpos}[1]{latitude});
my $maxLength = $hash->{helper}{$activity}{maxLength};
for ( $i = 0; $i < $poslen-3; $i++ ) { # 3 due to 2 alignment data sets at the end
for ( $i = 0; $i < $poslen-2; $i++ ) { # 2 due to 2 alignment data sets at the end
if ( $searchposlon[ 0 ] == $hash->{helper}{mower}{attributes}{positions}[ $i ]{longitude}
&& $searchposlat[ 0 ] == $hash->{helper}{mower}{attributes}{positions}[ $i ]{latitude}
&& $searchposlon[ 1 ] == $hash->{helper}{mower}{attributes}{positions}[ $i+1 ]{longitude}
@@ -306,9 +306,9 @@ sub AlignArray {
# timediff per step
my $dt = 0;
$dt = int(($hash->{helper}{mower}{attributes}{metadata}{statusTimestamp} - $hash->{helper}{$arrayName}[0]{statusTimestamp})/$i) if ( $i && @{ $hash->{helper}{$arrayName} } );
for ($k=$i-1;$k>-1;$k--) {
}
for ($k=$i-1;$k>-1;$k--) {
if ( @{ $hash->{helper}{$arrayName} } ) {