41 if (lockout_remaining_ > 0) {
45 if (logical_state == stable_) {
51 if (counter_ >= threshold_) {
53 stable_ = logical_state;
56 if (stable_ && !was && lockout_remaining_ == 0) {
58 lockout_remaining_ = lockout_time_;
59 }
else if (!stable_ && was) {