mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-23 20:52:13 +00:00
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:
parent
d5581c5265
commit
6e90a5c2f9
@ -550,8 +550,8 @@ sub getMowerResponse {
|
|||||||
my $storediff = $hash->{helper}{mower}{attributes}{metadata}{statusTimestamp} - $hash->{helper}{mowerold}{attributes}{metadata}{statusTimestamp};
|
my $storediff = $hash->{helper}{mower}{attributes}{metadata}{statusTimestamp} - $hash->{helper}{mowerold}{attributes}{metadata}{statusTimestamp};
|
||||||
if ($storediff) {
|
if ($storediff) {
|
||||||
|
|
||||||
# ::FHEM::Devices::AMConnect::Common::AlignArray( $hash );
|
::FHEM::Devices::AMConnect::Common::AlignArray( $hash ); #release
|
||||||
AlignArray( $hash );
|
# AlignArray( $hash ); # developement
|
||||||
::FHEM::Devices::AMConnect::Common::FW_detailFn_Update ($hash) if (AttrVal($name,'showMap',1));
|
::FHEM::Devices::AMConnect::Common::FW_detailFn_Update ($hash) if (AttrVal($name,'showMap',1));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -298,7 +298,7 @@ sub AlignArray {
|
|||||||
my @searchposlon = ($hash->{helper}{searchpos}[0]{longitude}, $hash->{helper}{searchpos}[1]{longitude});
|
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 @searchposlat = ($hash->{helper}{searchpos}[0]{latitude}, $hash->{helper}{searchpos}[1]{latitude});
|
||||||
my $maxLength = $hash->{helper}{$activity}{maxLength};
|
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}
|
if ( $searchposlon[ 0 ] == $hash->{helper}{mower}{attributes}{positions}[ $i ]{longitude}
|
||||||
&& $searchposlat[ 0 ] == $hash->{helper}{mower}{attributes}{positions}[ $i ]{latitude}
|
&& $searchposlat[ 0 ] == $hash->{helper}{mower}{attributes}{positions}[ $i ]{latitude}
|
||||||
&& $searchposlon[ 1 ] == $hash->{helper}{mower}{attributes}{positions}[ $i+1 ]{longitude}
|
&& $searchposlon[ 1 ] == $hash->{helper}{mower}{attributes}{positions}[ $i+1 ]{longitude}
|
||||||
@ -306,9 +306,9 @@ sub AlignArray {
|
|||||||
# timediff per step
|
# timediff per step
|
||||||
my $dt = 0;
|
my $dt = 0;
|
||||||
$dt = int(($hash->{helper}{mower}{attributes}{metadata}{statusTimestamp} - $hash->{helper}{$arrayName}[0]{statusTimestamp})/$i) if ( $i && @{ $hash->{helper}{$arrayName} } );
|
$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--) {
|
for ($k=$i-1;$k>-1;$k--) {
|
||||||
|
|
||||||
if ( @{ $hash->{helper}{$arrayName} } ) {
|
if ( @{ $hash->{helper}{$arrayName} } ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user