lib/fusuma/plugin/detectors/hold_detector.rb in fusuma-3.6.0 vs lib/fusuma/plugin/detectors/hold_detector.rb in fusuma-3.6.1

- old
+ new

@@ -10,14 +10,14 @@ class HoldDetector < Detector SOURCES = %w[gesture timer].freeze BUFFER_TYPE = "gesture" GESTURE_RECORD_TYPE = "hold" - BASE_THERESHOLD = 0.7 + BASE_THRESHOLD = 0.7 def initialize(*args) - super(*args) + super @timer = Inputs::TimerInput.instance end # @param buffers [Array<Buffers::Buffer>] # @return [Events::Event] if event is detected @@ -132,10 +132,10 @@ @threshold[index.cache_key] ||= begin keys_specific = Config::Index.new [*index.keys, "threshold"] keys_global = Config::Index.new ["threshold", type] config_value = Config.search(keys_specific) || Config.search(keys_global) || 1 - BASE_THERESHOLD * config_value + BASE_THRESHOLD * config_value end end end end end