DTux
/
dtux__moha
Archived
1
0
Fork 0

added mvmt detection of store for vibration

This commit is contained in:
Daniel Tartavel 2022-09-21 14:34:22 +02:00
parent b726173b4b
commit 619d238a8e
1 changed files with 6 additions and 3 deletions

View File

@ -51,9 +51,9 @@ class rdc_store extends hook
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__);
}
if (array_key_exists("moving", $storeDevice->properties))
@ -200,7 +200,10 @@ class rdc_store extends hook
{
$this->setTo($tmpStore, AUTO);
}*/
$this->maxLevel -= 20;
if ($moving = "STOP")
{
$this->maxLevel -= 20;
}
default:
break;
}