diff --git a/hooks/scripts/rdc_store.php b/hooks/scripts/rdc_store.php index f00b044..f79aa5a 100644 --- a/hooks/scripts/rdc_store.php +++ b/hooks/scripts/rdc_store.php @@ -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; }