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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 49944f9d1bdf045a0c29cb82042fd0f1d78ac208
4
- data.tar.gz: 25c5297b71b127635107095dd416cf387cba174a
3
+ metadata.gz: 9a53543d5ddf5e419ce50b8fe96107d4f54b7574
4
+ data.tar.gz: 2badc2608d013ccc5f51523bb073ba38fa2da788
5
5
  SHA512:
6
- metadata.gz: 4385eb8f5c8adb748e7e1fbfdd51c7f6a5bc2900738337d11fc96a7456b611ed6789ebbac3da0b5f650fcb22b2cf2832dee35be5b343bd257259b3ea0d582b98
7
- data.tar.gz: 5083923876f177bb07525aeb7e57e9ed3ee139ad17721f44da31d9a0bafc38e0d3106ae88c19377769c26c9db27ef443d6ecaef2a81b0d61fb26a4b5008b300b
6
+ metadata.gz: 3f9881d5b36c1ee87129a517f7487ad23af3ed2d28779e1d529e87f7aee3a1c1b93ca46af3c1f1bb1b27a795ad5997abb6f401f906d6b0f15100b26a5e4bb377
7
+ data.tar.gz: af31cbaf470651b135ba04460c7ed641bde0218418bdaad2efcc3eeede0e6c0f73ab4c7311f3713d28514b68a2344c47ad47f1b61cf2a779d468c46e23b42cd6
checksums.yaml.gz.sig CHANGED
Binary file
@@ -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(external: nil)
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
- mct = MorseCodeTranslator.new @notifier, topic: @topic
92
- mcl = MorseCodeListener.new notifier: mct
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.0
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-19 00:00:00.000000000 Z
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