celadonremote 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/celadonremote-0.0.1.gem +0 -0
- data/lib/celadonremote/receiver.rb +5 -1
- data/lib/celadonremote/version.rb +1 -1
- data/testing.rb +14 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f5e1378c73c344184874764fe7a1350fe05411d4e7e0cd25a60c9b7b037a8f6
|
4
|
+
data.tar.gz: dab1af3687745384b4fa395390d436ff753738f74887a5fa8de4f93d15e337ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 829ff1b1dc95f4aff78d18eefbbefa726b8cb6d82f40ba454af53f38052c1401b40f2b87f4aa1ade3694b745776f2d6e25908a6fbc7d5663b19fa945d33d7ad3
|
7
|
+
data.tar.gz: 334bef8dff113aa5981f85aa4aed54ee4cadd5fe5fa9fbb663600cb4b0a00bfa09791a2e781cdd22e0d5a08ae218861e278085352d7ca78200f7dddda07e7cc0
|
Binary file
|
@@ -15,20 +15,24 @@ module CeladonRemote
|
|
15
15
|
def start_listener(allow_hold:false)
|
16
16
|
prev_line = ""
|
17
17
|
|
18
|
+
h = 0
|
19
|
+
|
18
20
|
loop do
|
19
21
|
l=@ser.readline(@eol)
|
20
22
|
|
21
23
|
if allow_hold && l.start_with?(@eot)
|
22
24
|
code = prev_line[@code]
|
25
|
+
h = h+1
|
23
26
|
elsif l.start_with?(@eot)
|
24
27
|
next
|
25
28
|
else
|
26
29
|
code = l[@code]
|
30
|
+
h = 0
|
27
31
|
prev_line = l
|
28
32
|
end
|
29
33
|
|
30
34
|
if @codes[code]
|
31
|
-
@codes[code].call
|
35
|
+
@codes[code].call(h)
|
32
36
|
end
|
33
37
|
end
|
34
38
|
end
|
data/testing.rb
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: celadonremote
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthias Lee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: serialport
|
@@ -30,10 +30,12 @@ executables: []
|
|
30
30
|
extensions: []
|
31
31
|
extra_rdoc_files: []
|
32
32
|
files:
|
33
|
+
- celadonremote-0.0.1.gem
|
33
34
|
- celadonremote.gemspec
|
34
35
|
- lib/celadonremote.rb
|
35
36
|
- lib/celadonremote/receiver.rb
|
36
37
|
- lib/celadonremote/version.rb
|
38
|
+
- testing.rb
|
37
39
|
homepage:
|
38
40
|
licenses: []
|
39
41
|
metadata: {}
|