mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
95_Astro: v2.0.1 with minor bugfix
git-svn-id: https://svn.fhem.de/fhem/trunk@19670 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
f2094cbf5f
commit
564eb716a3
@ -38,7 +38,7 @@ use utf8;
|
||||
|
||||
use Encode;
|
||||
use FHEM::Meta;
|
||||
use GPUtils qw(GP_Import);
|
||||
use GPUtils qw(GP_Import GP_Export);
|
||||
use Math::Trig;
|
||||
use Time::HiRes qw(gettimeofday);
|
||||
use Time::Local;
|
||||
@ -687,7 +687,7 @@ BEGIN {
|
||||
}
|
||||
|
||||
#-- Export to main context with different name
|
||||
_Export(
|
||||
GP_Export(
|
||||
qw(
|
||||
Get
|
||||
Initialize
|
||||
@ -760,6 +760,7 @@ sub Define ($@) {
|
||||
if ( $init_done && !defined( $hash->{OLDDEF} ) ) {
|
||||
$attr{$name}{icon} = 'telescope';
|
||||
$attr{$name}{recomputeAt} = 'NewDay,SunRise,SunSet,AstroTwilightEvening,AstroTwilightMorning,CivilTwilightEvening,CivilTwilightMorning,CustomTwilightEvening,CustomTwilightMorning';
|
||||
$hash->{RECOMPUTEAT} = $attr{$name}{recomputeAt};
|
||||
}
|
||||
|
||||
return undef;
|
||||
@ -970,22 +971,6 @@ sub _tzoffset($) {
|
||||
return (($local - $utc)/36);
|
||||
}
|
||||
|
||||
########################################################################################################
|
||||
#
|
||||
# _Export - Export references to main context using a different naming schema
|
||||
#
|
||||
########################################################################################################
|
||||
|
||||
sub _Export {
|
||||
no strict qw/refs/; ## no critic
|
||||
my $pkg = caller(0);
|
||||
my $main = $pkg;
|
||||
$main =~ s/^(?:.+::)?([^:]+)$/main::$1\_/g;
|
||||
foreach (@_) {
|
||||
*{ $main . $_ } = *{ $pkg . '::' . $_ };
|
||||
}
|
||||
}
|
||||
|
||||
########################################################################################################
|
||||
#
|
||||
# _LoadOptionalPackages - Load Perl packages that may not be installed
|
||||
@ -2919,7 +2904,7 @@ sub Get($@) {
|
||||
=end html_DE
|
||||
=for :application/json;q=META.json 95_Astro.pm
|
||||
{
|
||||
"version": "v2.0.0",
|
||||
"version": "v2.0.1",
|
||||
"author": [
|
||||
"Prof. Dr. Peter A. Henning <>",
|
||||
"Julian Pawlowski <>",
|
||||
|
Loading…
x
Reference in New Issue
Block a user