mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
- bug in Twilight_Get repaired
- longitude and latitude now taken from TW definition git-svn-id: https://svn.fhem.de/fhem/trunk@3718 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
dff76274ec
commit
aa1c74d247
@ -37,7 +37,6 @@ use Math::Trig;
|
|||||||
|
|
||||||
sub Twilight_calc($$$$$$$);
|
sub Twilight_calc($$$$$$$);
|
||||||
sub Twilight_getWeatherHorizon($);
|
sub Twilight_getWeatherHorizon($);
|
||||||
sub Twilight_GetUpdate($);
|
|
||||||
sub Twilight_my_gmt_offset();
|
sub Twilight_my_gmt_offset();
|
||||||
sub Twilight_midnight_seconds();
|
sub Twilight_midnight_seconds();
|
||||||
|
|
||||||
@ -84,9 +83,9 @@ sub Twilight_Get($@)
|
|||||||
my ($hash, @a) = @_;
|
my ($hash, @a) = @_;
|
||||||
return "argument is missing" if(int(@a) != 2);
|
return "argument is missing" if(int(@a) != 2);
|
||||||
|
|
||||||
$hash->{LOCAL} = 1;
|
#$hash->{LOCAL} = 1;
|
||||||
Twilight_GetUpdate($hash);
|
#Twilight_GetUpdate($hash);
|
||||||
delete $hash->{LOCAL};
|
#delete $hash->{LOCAL};
|
||||||
my $reading= $a[1];
|
my $reading= $a[1];
|
||||||
my $value;
|
my $value;
|
||||||
|
|
||||||
@ -451,11 +450,8 @@ sub Twilight_sunpos($)
|
|||||||
$dSeconds = 0;
|
$dSeconds = 0;
|
||||||
|
|
||||||
############################
|
############################
|
||||||
# If set in global, use longitude/latitude
|
my $dLongitude = $hash->{LONGITUDE};
|
||||||
# from global, otherwise set Frankfurt/Germany as
|
my $dLatitude = $hash->{LATITUDE};
|
||||||
# default
|
|
||||||
my $dLongitude = AttrVal("global", "longitude", "8.686");
|
|
||||||
my $dLatitude = AttrVal("global", "latitude", "50.112");
|
|
||||||
Log 5, "Compute sunpos for latitude $dLatitude , longitude $dLongitude";
|
Log 5, "Compute sunpos for latitude $dLatitude , longitude $dLongitude";
|
||||||
|
|
||||||
my $pi=3.14159265358979323846;
|
my $pi=3.14159265358979323846;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user