Esempio n. 1
0
        public void MarkMotion(DateTimeOffset time)
        {
            CheckTurnOffTimeOut(time);
            LastMotion.SetTime(time);
            SetProbability(Probability.Full);
            CheckAutoIncrementForOnePerson(time);

            _TurnOffTimeOut.IncrementCounter();
        }
Esempio n. 2
0
        public async Task MarkMotion(DateTimeOffset time)
        {
            CheckTurnOffTimeOut(time);
            LastMotion.SetTime(time);
            await SetProbability(Probability.Full).ConfigureAwait(false);

            CheckAutoIncrementForOnePerson(time);

            _TurnOffTimeOut.IncrementCounter();
        }
Esempio n. 3
0
        private void DecrementNumberOfPersons()
        {
            if (NumberOfPersonsInArea > 0)
            {
                NumberOfPersonsInArea--;

                if (NumberOfPersonsInArea == 0)
                {
                    LastMotion.UnConfuze();
                }
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Take action when there is a move in the room
        /// </summary>
        /// <param name="motionTime"></param>
        /// <returns></returns>
        public async Task MarkMotion(DateTimeOffset motionTime)
        {
            TryTuneTurnOffTimeOut(motionTime);
            LastMotion.SetTime(motionTime);
            await SetProbability(Probability.Full);

            CheckAutoIncrementForOnePerson(motionTime);

            _turnOffTimeOut.Increment();

            Debug.WriteLine($"New timeline: {_turnOffTimeOut.Value.Seconds}s");
        }