added mvmt detection of store for vibration
This commit is contained in:
parent
b726173b4b
commit
619d238a8e
@ -51,9 +51,9 @@ class rdc_store extends hook
|
|||||||
|
|
||||||
if ($this->active == true)
|
if ($this->active == true)
|
||||||
{
|
{
|
||||||
if (array_key_exists("vibration", $indexDevices[RDC_store_vibration]->properties))
|
if (array_key_exists("vibration", $indexDevices[RDC_STORE_VIBRATION]->properties))
|
||||||
{
|
{
|
||||||
$lastVibration = $mohaDB->moyenne($indexDevices[RDC_store_vibration], "vibration", 5);
|
$lastVibration = $mohaDB->moyenne($indexDevices[RDC_STORE_VIBRATION], "vibration", 5);
|
||||||
logger(DEBUG, "Last vibration inferior to 5 minutes" . bool2string($lastVibration ), __FILE__ . ":" . __LINE__);
|
logger(DEBUG, "Last vibration inferior to 5 minutes" . bool2string($lastVibration ), __FILE__ . ":" . __LINE__);
|
||||||
}
|
}
|
||||||
if (array_key_exists("moving", $storeDevice->properties))
|
if (array_key_exists("moving", $storeDevice->properties))
|
||||||
@ -200,7 +200,10 @@ class rdc_store extends hook
|
|||||||
{
|
{
|
||||||
$this->setTo($tmpStore, AUTO);
|
$this->setTo($tmpStore, AUTO);
|
||||||
}*/
|
}*/
|
||||||
$this->maxLevel -= 20;
|
if ($moving = "STOP")
|
||||||
|
{
|
||||||
|
$this->maxLevel -= 20;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user