completing improvements
git-svn-id: file:///home/jan/tmp/wetterstation/trunk@34 dd492736-c11a-0410-ad51-8c26713eaf7f
This commit is contained in:
parent
74f5960ecc
commit
1eb9283ddf
|
|
@ -59,15 +59,15 @@ class Hum{
|
|||
/* momentanen Durchschnittswert bestimmen */
|
||||
function _fetchAverage($sensId, $table, &$connection){
|
||||
$avData = array('average'=>0, 'count'=>0); /* Array initialisieren */
|
||||
$i = 3; /* Laufvariable */
|
||||
$i = 1; /* Laufvariable */
|
||||
while($avData['count']<5){ /* Schleife prüft, in welchem Interval 5 Werte zusammenkommen */
|
||||
$avData = $this->_getAverage($sensId, $table, &$connection, ($i*15)." minutes"); /* Holt Werte mit gegebenem Interval */
|
||||
$i++; /* Laufvariable erhöhen */
|
||||
$avData = $this->_getAverage($sensId, $table, &$connection, ($i*15)." minutes"); /* Holt Werte mit gegebenem Interval */
|
||||
}
|
||||
|
||||
/* Werte den Klassenvariablen zuordnen */
|
||||
$this->avVal = $avData['average'];
|
||||
$this->avInter = $i*10;
|
||||
$this->avInter = $i*15;
|
||||
}
|
||||
|
||||
/* Bestimmt die Tendenz */
|
||||
|
|
|
|||
|
|
@ -58,15 +58,15 @@ class Press{
|
|||
/* momentanen Durchschnittswert bestimmen */
|
||||
function _fetchAverage($sensId, $table, &$connection){
|
||||
$avData = array('average'=>0, 'count'=>0); /* Array initialisieren */
|
||||
$i = 3; /* Laufvariable */
|
||||
$i = 1; /* Laufvariable */
|
||||
while($avData['count']<5){ /* Schleife prüft, in welchem Interval 5 Werte zusammenkommen */
|
||||
$avData = $this->_getAverage($sensId, $table, &$connection, ($i*15)." minutes"); /* Holt Werte mit gegebenem Interval */
|
||||
$i++; /* Laufvariable erhöhen */
|
||||
$avData = $this->_getAverage($sensId, $table, &$connection, ($i*15)." minutes"); /* Holt Werte mit gegebenem Interval */
|
||||
}
|
||||
|
||||
/* Werte den Klassenvariablen zuordnen */
|
||||
$this->avVal = $avData['average'];
|
||||
$this->avInter = $i*10;
|
||||
$this->avInter = $i*15;
|
||||
}
|
||||
|
||||
/* Bestimmt die Tendenz */
|
||||
|
|
|
|||
|
|
@ -58,15 +58,15 @@ class Temp{
|
|||
/* momentanen Durchschnittswert bestimmen */
|
||||
function _fetchAverage($sensId, $table, &$connection){
|
||||
$avData = array('average'=>0, 'count'=>0); /* Array initialisieren */
|
||||
$i = 3; /* Laufvariable */
|
||||
$i = 1; /* Laufvariable */
|
||||
while($avData['count']<5){ /* Schleife prüft, in welchem Interval 5 Werte zusammenkommen */
|
||||
$avData = $this->_getAverage($sensId, $table, &$connection, ($i*15)." minutes"); /* Holt Werte mit gegebenem Interval */
|
||||
$i++; /* Laufvariable erhöhen */
|
||||
$avData = $this->_getAverage($sensId, $table, &$connection, ($i*15)." minutes"); /* Holt Werte mit gegebenem Interval */
|
||||
}
|
||||
|
||||
/* Werte den Klassenvariablen zuordnen */
|
||||
$this->avVal = $avData['average'];
|
||||
$this->avInter = $i*10;
|
||||
$this->avInter = $i*15;
|
||||
}
|
||||
|
||||
/* Bestimmt die Tendenz */
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ class Parser{
|
|||
}
|
||||
|
||||
|
||||
/* File Parsen */
|
||||
function parseContent($fileName, & $callingObject, $filePart=null){
|
||||
$fileArray = file($fileName); /* File als Array einlesen */
|
||||
if($filePart != null){
|
||||
|
|
|
|||
Loading…
Reference in New Issue