|
@@ -39,8 +39,7 @@ public:
|
|
|
_currentMotionState = motionDetected;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- if (_currentMotionState && millis() >= _motionDetectedTime + _triggerDuration){
|
|
|
+ if (_currentMotionState && millis() - _motionDetectedTime >= _triggerDuration){
|
|
|
_stopCallback();
|
|
|
_currentMotionState = false;
|
|
|
}
|