rpi_pinin_msgout 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/rpi_pinin_msgout.rb +7 -21
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a53543d5ddf5e419ce50b8fe96107d4f54b7574
|
4
|
+
data.tar.gz: 2badc2608d013ccc5f51523bb073ba38fa2da788
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f9881d5b36c1ee87129a517f7487ad23af3ed2d28779e1d529e87f7aee3a1c1b93ca46af3c1f1bb1b27a795ad5997abb6f401f906d6b0f15100b26a5e4bb377
|
7
|
+
data.tar.gz: af31cbaf470651b135ba04460c7ed641bde0218418bdaad2efcc3eeede0e6c0f73ab4c7311f3713d28514b68a2344c47ad47f1b61cf2a779d468c46e23b42cd6
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/rpi_pinin_msgout.rb
CHANGED
@@ -33,23 +33,6 @@ class SecretKnockNotifier
|
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
|
-
class MorseCodeTranslator < MorseCode
|
37
|
-
|
38
|
-
def initialize(notifier, topic: 'morsecode')
|
39
|
-
|
40
|
-
super()
|
41
|
-
@notifier, @topic = notifier, topic
|
42
|
-
|
43
|
-
end
|
44
|
-
|
45
|
-
def message(s)
|
46
|
-
|
47
|
-
@input_string = s
|
48
|
-
@notifier.notice "%s: %s" % [@topic, self.to_s]
|
49
|
-
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
36
|
|
54
37
|
class RPiPinInMsgOut < RPiPinIn
|
55
38
|
|
@@ -68,7 +51,7 @@ class RPiPinInMsgOut < RPiPinIn
|
|
68
51
|
|
69
52
|
end
|
70
53
|
|
71
|
-
def capture(
|
54
|
+
def capture()
|
72
55
|
|
73
56
|
if @mode == :default then
|
74
57
|
|
@@ -87,9 +70,12 @@ class RPiPinInMsgOut < RPiPinIn
|
|
87
70
|
setup { sk.knock }
|
88
71
|
|
89
72
|
elsif @mode == :morsecode
|
90
|
-
|
91
|
-
|
92
|
-
|
73
|
+
|
74
|
+
on_message = -> (mc) do
|
75
|
+
@notifier.notice "%s: %s" % [@topic, MorseCode.new(mc).to_s]
|
76
|
+
end
|
77
|
+
|
78
|
+
mcl = MorseCodeListener.new &on_message
|
93
79
|
|
94
80
|
button_setup(external: mcl)
|
95
81
|
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rpi_pinin_msgout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
55qRY75k9VJA2GfpeY0Nw/6IyHSZ2JFdwtTDZPKQpT69gVGu7XJlquG9lUMQaNc+
|
32
32
|
2CuqDKVQmWkNHg==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2016-04-
|
34
|
+
date: 2016-04-21 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rpi_pinin
|
metadata.gz.sig
CHANGED
Binary file
|