1
0
This commit is contained in:
Daniel Tartavel 2022-09-23 00:25:48 +02:00
parent 619d238a8e
commit 9d20399d76
2 changed files with 37 additions and 24 deletions

22
configVent.php Normal file
View File

@ -0,0 +1,22 @@
<?php
$directionVent = array(
array("N", "Nord", "0"),
array("NNE", "NordNordEst", "22,5"),
array("NE", "NordEst", "45"),
array("ENE", "EstNordEst", "67,5"),
array("E", "Est", "90"),
array("ESE", "EstSudEst", "112,5"),
array("SE", "SudEst", "135"),
array("SSE", "SudSudEst", "157,5"),
array("S", "Sud", "180"),
array("SSO", "SudSudOuest", "202,5"),
array("SO", "SudOuest", "225"),
array("OSO", "OuestSudOuest", "247,5"),
array("O", "Ouest", "270"),
array("ONO", "OuestNordOuest", "292,5"),
array("NO", "NordOuest", "315"),
array("NNO", "NordNordOuest", "337,5")
)
?>

View File

@ -200,10 +200,15 @@ class rdc_store extends hook
{
$this->setTo($tmpStore, AUTO);
}*/
if ($moving = "STOP")
logger(DEBUG, "CASE: vibration:" . bool2string($value), __FILE__ . ":" . __LINE__);
if ($moving == "STOP")
{
$this->maxLevel -= 20;
}else
{
logger(DEBUG, "Store is moving so maxLevel not changed " . $moving, __FILE__ . ":" . __LINE__);
}
default:
break;
}
@ -212,39 +217,25 @@ class rdc_store extends hook
$this->maxLevel = 0;
}
logger(DEBUG, "maxLevel = " . $this->maxLevel . ' result => $r = ' . $r, __FILE__ . ":" . __LINE__);
if ($this->storeLevel > $this->maxLevel)
if ($store2level !== false) //$store2level = false then no change on store position
{
$this->setTo($this->maxLevel, AUTO);
}elseif ($store2level !== false) //$store2level = false then no change on store position
{
if ( $store2level > $this->maxLevel )
{
logger(DEBUG, "store2level > maxLevel", __FILE__ . ":" . __LINE__);
$this->setTo($this->maxLevel, AUTO);
}else
{
logger(DEBUG, "store2level <= maxLevel", __FILE__ . ":" . __LINE__);
logger(DEBUG, "setting stor 2 store2level", __FILE__ . ":" . __LINE__);
$this->setTo($store2level, AUTO);
}
}else
{
logger(DEBUG, _("Store is Moving ") . $moving, __FILE__ . ":" . __LINE__);
}
}
}
private function setTo($level, $method)
{
logger(DEBUG, "function 'set' to level : " . $level, __FILE__ . ":" . __LINE__);
if ($level <= 100)
if ($level > $this->maxLevel)
{
logger(DEBUG, "Open store :" . $level, __FILE__ . ":" . __LINE__);
$level = $this->maxLevel;
}elseif ($level <= 100)
{
logger(DEBUG, "Setting store position to:" . $level, __FILE__ . ":" . __LINE__);
$this->send($level, $method);
}//else
/*{
logger(DEBUG, "store is already at level" . $this->storeLevel . " so < at " . $level, __FILE__ . ":" . __LINE__);
}*/
}
}
private function close ($reason)