mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 03:06:37 +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_getWeatherHorizon($);
|
||||
sub Twilight_GetUpdate($);
|
||||
sub Twilight_my_gmt_offset();
|
||||
sub Twilight_midnight_seconds();
|
||||
|
||||
@ -84,9 +83,9 @@ sub Twilight_Get($@)
|
||||
my ($hash, @a) = @_;
|
||||
return "argument is missing" if(int(@a) != 2);
|
||||
|
||||
$hash->{LOCAL} = 1;
|
||||
Twilight_GetUpdate($hash);
|
||||
delete $hash->{LOCAL};
|
||||
#$hash->{LOCAL} = 1;
|
||||
#Twilight_GetUpdate($hash);
|
||||
#delete $hash->{LOCAL};
|
||||
my $reading= $a[1];
|
||||
my $value;
|
||||
|
||||
@ -451,11 +450,8 @@ sub Twilight_sunpos($)
|
||||
$dSeconds = 0;
|
||||
|
||||
############################
|
||||
# If set in global, use longitude/latitude
|
||||
# from global, otherwise set Frankfurt/Germany as
|
||||
# default
|
||||
my $dLongitude = AttrVal("global", "longitude", "8.686");
|
||||
my $dLatitude = AttrVal("global", "latitude", "50.112");
|
||||
my $dLongitude = $hash->{LONGITUDE};
|
||||
my $dLatitude = $hash->{LATITUDE};
|
||||
Log 5, "Compute sunpos for latitude $dLatitude , longitude $dLongitude";
|
||||
|
||||
my $pi=3.14159265358979323846;
|
||||
|
Loading…
x
Reference in New Issue
Block a user