|
From: <mc...@us...> - 2013-07-23 06:36:47
|
Revision: 1828
http://sourceforge.net/p/openautomation/code/1828
Author: mclb
Date: 2013-07-23 06:36:45 +0000 (Tue, 23 Jul 2013)
Log Message:
-----------
Kleine Korrekturen
Modified Paths:
--------------
wiregate/plugin/generic/beschattung_doit.pl
wiregate/plugin/generic/beschattung_freigabe.pl
Modified: wiregate/plugin/generic/beschattung_doit.pl
===================================================================
--- wiregate/plugin/generic/beschattung_doit.pl 2013-07-22 21:08:00 UTC (rev 1827)
+++ wiregate/plugin/generic/beschattung_doit.pl 2013-07-23 06:36:45 UTC (rev 1828)
@@ -32,6 +32,7 @@
# 20130506 - mclb - Aufteilen in 2 Plugins - 1. Freigabe, 2. Ausf\xFChrung
# 20130620 - mclb - Azimuth und Elevation werden jetzt \xFCber GAs empfangen, nicht mehr direkt vom plugin_info gelesen.
# Somit er\xFCbrigt sich auch der zyklische Aufruf jede Minute.
+# 20130723 - mclb - Beseitigung einer \xFCberfl\xFCssigen if-Abfrage
#
#############################################################################
#
@@ -398,25 +399,23 @@
# Lamellennachf\xFChrung
- if ($gv_minuten % 5 == 0) {
- if ($gs_raffstore->{lamellenNachfuehrung} ne NACHF_AUS) {
- if ($gs_raffstore->{lamellenNachfuehrung} eq NACHF_100) {
- # Somit wird auf jeden Fall ganz zu gemacht.
- $gv_lamellePos = 0;
- $gv_lamellePosNeu = 100;
- } else {
- $gv_lamellePosNeu = (90 - $plugin_info{$plugname.'_elevation'})/90*100;
- # Faktor f\xFCr die Abweichung der Sonne von der Ausrichtung des Fensters miteinbeziehen
- $gv_lamellePosNeu = $gv_lamellePosNeu * (1 - (abs($plugin_info{$plugname.'_azimuth'} - $gs_raffstore->{ausrichtung}) * 0.01));
- # Der Wert f\xFCr den Lamellenwinkel muss immer zwischen 0 und 100 sein! Alles dar\xFCber hinaus wird fix auf 0 bzw. 100 gesetzt.
- if ($gv_lamellePosNeu < 0) { $gv_lamellePosNeu = 0; }
- if ($gv_lamellePosNeu > 100) { $gv_lamellePosNeu = 100; }
- }
- # Nicht wegen jeder Kleinigkeit gleich nachstellen, erst nach einer gewissen Mindest\xE4nderung.
- if (abs($gv_lamellePos - $gv_lamellePosNeu) > 5) {
- knx_write($gs_raffstore->{gaLamellePos},$gv_lamellePosNeu,5.001);
- }
+ if ($gs_raffstore->{lamellenNachfuehrung} ne NACHF_AUS) {
+ if ($gs_raffstore->{lamellenNachfuehrung} eq NACHF_100) {
+ # Somit wird auf jeden Fall ganz zu gemacht.
+ $gv_lamellePos = 0;
+ $gv_lamellePosNeu = 100;
+ } else {
+ $gv_lamellePosNeu = (90 - $plugin_info{$plugname.'_elevation'})/90*100;
+ # Faktor f\xFCr die Abweichung der Sonne von der Ausrichtung des Fensters miteinbeziehen
+ $gv_lamellePosNeu = $gv_lamellePosNeu * (1 - (abs($plugin_info{$plugname.'_azimuth'} - $gs_raffstore->{ausrichtung}) * 0.01));
+ # Der Wert f\xFCr den Lamellenwinkel muss immer zwischen 0 und 100 sein! Alles dar\xFCber hinaus wird fix auf 0 bzw. 100 gesetzt.
+ if ($gv_lamellePosNeu < 0) { $gv_lamellePosNeu = 0; }
+ if ($gv_lamellePosNeu > 100) { $gv_lamellePosNeu = 100; }
}
+ # Nicht wegen jeder Kleinigkeit gleich nachstellen, erst nach einer gewissen Mindest\xE4nderung.
+ if (abs($gv_lamellePos - $gv_lamellePosNeu) > 5) {
+ knx_write($gs_raffstore->{gaLamellePos},$gv_lamellePosNeu,5.001);
+ }
}
} else {
# Keine Beschattung aufgrund der Ausrichtung
Modified: wiregate/plugin/generic/beschattung_freigabe.pl
===================================================================
--- wiregate/plugin/generic/beschattung_freigabe.pl 2013-07-22 21:08:00 UTC (rev 1827)
+++ wiregate/plugin/generic/beschattung_freigabe.pl 2013-07-23 06:36:45 UTC (rev 1828)
@@ -10,6 +10,7 @@
# 20130506 - mclb - Erstellung
# 20130617 - mclb - Sonnenstand wird nun mittels GAs erhalten
# Somit k\xF6nnen nun die Werte z.B. einer Wetterstation verwendet werden.
+# 20130723 - mclb - Beseitigung einer falschen Klammerung
#
#############################################################################
#
@@ -147,8 +148,8 @@
}
# Evtl. Sperre setzen, falls noch nicht existent
if (!exists $plugin_info{$plugname.'_sperre'}) {
+ $plugin_info{$plugname.'_sperre'} = SPERRE_INAKTIV;
}
- $plugin_info{$plugname.'_sperre'} = SPERRE_INAKTIV;
# Evtl. Werte initialisieren, falls es sie noch nicht gibt.
if (!exists $plugin_info{$plugname.'_beschattungEin'}) {
$plugin_info{$plugname.'_beschattungEin'} = BESCHATTUNG_AUS;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|