xinput_wrapperplus 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec734043c5d8c8572b0d5da6a555637b5c486c8526e69b80bef1591b4b77fe9b
4
- data.tar.gz: 49366c4e05296bfe79deb135eaac2e49544e03dcbbab386252c48cd59d057572
3
+ metadata.gz: 17f7c9962bda5c450ccf2255914fcc3d578f4bfd1881c4297b728764afcaeb0d
4
+ data.tar.gz: f9e67bdc4325d252e5dacb74b75c2c0ebae60252d52c2900e577c2d0cadc0e23
5
5
  SHA512:
6
- metadata.gz: 138bacf2e34aa013c374afe6932d554b88e57d45c7fe1b6268727435a82950fda96232165952fbaeccf5a507848942c2d880602afdb4dd123f88e8b0683aff6c
7
- data.tar.gz: 901bf06e728f93af941487a998f7aa28ba3696063b240ecc5e0a13fec63ea712b0b1eba89a80b6294caa982a89ebbbcdecf46445d238e52fbc370685b8808c31
6
+ metadata.gz: 5352fc684255d867db2432619244b302e6a34a98acc536402a4da073b3ee660667caf33c307fdfffc860dd886f2cca6f6168c4d78978d541c5689e427f4b37e4
7
+ data.tar.gz: 170ed7c1a421a4f0a0c1ac1b86d7b2cec01ff72169d48725eb8e2051e3dbb5aa80e353e33ec6965e82b81a203dce4f6b83f80b56627b2c8c0780dbbdd77e8d19
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -9,18 +9,22 @@ require 'xinput_wrapper'
9
9
 
10
10
  class XInputWrapperPlus < XInputWrapper
11
11
 
12
- def initialize(device: '3', host: 'sps', port: '59000',
12
+ def initialize(host: 'sps', port: '59000',
13
13
  topic: 'input', verbose: true, lookup: {},
14
14
  debug: false, capture_all: false, keys: [],
15
- keypress_detection: true)
15
+ keypress_detection: true, motion_detection: true)
16
16
 
17
- super(device: device, verbose: verbose, lookup: lookup,
17
+ puts 'before super'
18
+ super(verbose: verbose, lookup: lookup,
18
19
  debug: debug, keys: keys)
20
+ puts 'after super'
19
21
 
20
22
  @topic, @capture_all = topic, capture_all
21
23
  @keypress_detection = keypress_detection
22
-
24
+ @motion_detection = motion_detection
25
+
23
26
  @sps = SPSPub.new host: host, port: port
27
+
24
28
  @sk = SecretKnock.new short_delay: 0.25, long_delay: 0.5,
25
29
  external: self, verbose: verbose, debug: debug
26
30
  @sk.detect timeout: 0.7
@@ -86,6 +90,11 @@ class XInputWrapperPlus < XInputWrapper
86
90
  puts "on_mousemove() x: %s y: %s" % [x, y]
87
91
  end
88
92
 
93
+ if @motion_detection and (Time.now > @t2 + 30) then
94
+ message 'motion detected', nil
95
+ @t2 = Time.now
96
+ end
97
+ =begin
89
98
  @timer.exit if @timer
90
99
 
91
100
  @a << [x,y]
@@ -100,7 +109,7 @@ class XInputWrapperPlus < XInputWrapper
100
109
  @a = []
101
110
 
102
111
  end
103
-
112
+ =end
104
113
 
105
114
  end
106
115
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xinput_wrapperplus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -35,7 +35,7 @@ cert_chain:
35
35
  MAr0EaAbP4GPbdRnYZObrq03xJQOARWVRbH726l6usXEpiepoBKFXfqGNXX6DDt/
36
36
  2f3lRa47HGk7I26OxNboAPZQ
37
37
  -----END CERTIFICATE-----
38
- date: 2020-08-27 00:00:00.000000000 Z
38
+ date: 2020-08-28 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: sps-pub
metadata.gz.sig CHANGED
Binary file