debug rdc_store et rdc_wc_eclairage\nmise en page constant.php
This commit is contained in:
@ -42,6 +42,7 @@ class rdc_store extends hook
|
||||
$r = 100;
|
||||
$moving = "STOP";
|
||||
$motorReversal = false;
|
||||
$store2level = false;
|
||||
|
||||
if (array_key_exists("moving", $storeDevice->properties))
|
||||
{
|
||||
@ -102,15 +103,6 @@ class rdc_store extends hook
|
||||
if ($this->maxLevel != 0 and $salon_lux > 100)
|
||||
{
|
||||
$store2level = $this->storeLevel + 15;
|
||||
if ( $store2level > $this->maxLevel )
|
||||
{
|
||||
logger(DEBUG, "store2level > maxLevel", __FILE__ . ":" . __LINE__);
|
||||
$this->set($this->maxLevel);
|
||||
}else
|
||||
{
|
||||
logger(DEBUG, "store2level <= maxLevel", __FILE__ . ":" . __LINE__);
|
||||
$this->set($store2level);
|
||||
}
|
||||
}
|
||||
}elseif ($exterieurLuxMoyen < 5000 and $salon_lux < 450)
|
||||
{
|
||||
@ -172,7 +164,7 @@ class rdc_store extends hook
|
||||
}elseif ($rafale != 0)
|
||||
{
|
||||
//calcul du maxlevel par rapport a la vitesse des rafales
|
||||
$r = round(($rafale-20)/5, 0, PHP_ROUND_HALF_UP)*10;
|
||||
$r = round(($rafale-30)/4, 0, PHP_ROUND_HALF_UP)*10;
|
||||
if ($r < 0) $r = 0;
|
||||
if ($motorReversal)
|
||||
{
|
||||
@ -200,6 +192,17 @@ class rdc_store extends hook
|
||||
if ($this->storeLevel > $this->maxLevel)
|
||||
{
|
||||
$this->set($this->maxLevel);
|
||||
}elseif ($store2level !== false) //$store2level = false then no change on store position
|
||||
{
|
||||
if ( $store2level > $this->maxLevel )
|
||||
{
|
||||
logger(DEBUG, "store2level > maxLevel", __FILE__ . ":" . __LINE__);
|
||||
$this->set($this->maxLevel);
|
||||
}else
|
||||
{
|
||||
logger(DEBUG, "store2level <= maxLevel", __FILE__ . ":" . __LINE__);
|
||||
$this->set($store2level);
|
||||
}
|
||||
}
|
||||
}else
|
||||
{
|
||||
|
Reference in New Issue
Block a user