rpi_pinin_msgout-test 0.1.0
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 +7 -0
- checksums.yaml.gz.sig +3 -0
- data/lib/rpi_pinin_msgout-test.rb +53 -0
- data.tar.gz.sig +0 -0
- metadata +88 -0
- metadata.gz.sig +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 83539fb2c45cb8c2949ac565427a18efd113a3b3
|
4
|
+
data.tar.gz: 1d0e2395a46c10fbbb43b77be0b9c432c63909d7
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1e7c7eb9213d2cdd768ffcb88dd9c5e50431131bef7636ba390041fe9b655b6846841019f2a100d063d1fcac79b5ce27a8d2c6f0d1ebb7b62c51a3b02889e769
|
7
|
+
data.tar.gz: cf30a8def794634985bda0e3cf49203b2f101675562e50f1429bb0b065cc2928ca5c21e2e215f2d3b878ec60599d00bf930869b8faf603dc891d72e9a9ee2046
|
checksums.yaml.gz.sig
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# file: rpi_pinin_msgout-test.rb
|
4
|
+
|
5
|
+
require 'io/console'
|
6
|
+
require 'rpi_pinin_msgout'
|
7
|
+
require 'chronic_duration'
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
class RPiPinInMsgOutTest < RPiPinInMsgOut
|
12
|
+
|
13
|
+
# duration: Used by sample mode
|
14
|
+
|
15
|
+
def initialize(id, pull: nil, mode: :default, verbose: true,
|
16
|
+
subtopic: 'sensor', device_id: 'pi', notifier: Echo.new,
|
17
|
+
duration: '5 seconds', index: 0, capture_rate: 0.5,
|
18
|
+
descriptor: 'detected')
|
19
|
+
|
20
|
+
@mode, @verbose, @notifier, @duration = mode, verbose, notifier, duration
|
21
|
+
@capture_rate, @descriptor = capture_rate, descriptor
|
22
|
+
@topic = [device_id, subtopic, index].join('/')
|
23
|
+
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
def setup()
|
29
|
+
|
30
|
+
t0 = Time.now + 1
|
31
|
+
|
32
|
+
#self.watch_high do
|
33
|
+
while (c = $stdin.getch ) == ' ' do
|
34
|
+
|
35
|
+
# ignore any movements that happened a short time ago e.g. 250
|
36
|
+
# milliseconds ago since the last movement
|
37
|
+
if t0 + @capture_rate < Time.now then
|
38
|
+
|
39
|
+
puts Time.now.to_s if @verbose
|
40
|
+
|
41
|
+
yield()
|
42
|
+
|
43
|
+
t0 = Time.now
|
44
|
+
|
45
|
+
else
|
46
|
+
#puts 'ignoring ...'
|
47
|
+
end
|
48
|
+
|
49
|
+
end # /watch_high
|
50
|
+
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
data.tar.gz.sig
ADDED
Binary file
|
metadata
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rpi_pinin_msgout-test
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- James Robertson
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
|
14
|
+
YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
|
15
|
+
8ixkARkWAmV1MB4XDTE2MDQxOTEyMjUwN1oXDTE3MDQxOTEyMjUwN1owSDESMBAG
|
16
|
+
A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
|
17
|
+
EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQY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SZ6YGIFw==
|
33
|
+
-----END CERTIFICATE-----
|
34
|
+
date: 2016-04-19 00:00:00.000000000 Z
|
35
|
+
dependencies:
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: rpi_pinin_msgout
|
38
|
+
requirement: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - "~>"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '0.2'
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 0.2.0
|
46
|
+
type: :runtime
|
47
|
+
prerelease: false
|
48
|
+
version_requirements: !ruby/object:Gem::Requirement
|
49
|
+
requirements:
|
50
|
+
- - "~>"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '0.2'
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: 0.2.0
|
56
|
+
description:
|
57
|
+
email: james@r0bertson.co.uk
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- lib/rpi_pinin_msgout-test.rb
|
63
|
+
homepage: https://github.com/jrobertson/rpi_pinin_msgout-test
|
64
|
+
licenses:
|
65
|
+
- MIT
|
66
|
+
metadata: {}
|
67
|
+
post_install_message:
|
68
|
+
rdoc_options: []
|
69
|
+
require_paths:
|
70
|
+
- lib
|
71
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
|
+
requirements:
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
version: '0'
|
81
|
+
requirements: []
|
82
|
+
rubyforge_project:
|
83
|
+
rubygems_version: 2.4.8
|
84
|
+
signing_key:
|
85
|
+
specification_version: 4
|
86
|
+
summary: Tests the rpi_pinin_msgout gem by simulating the triggering of a pin high event
|
87
|
+
using the keyboard's spacebar key.
|
88
|
+
test_files: []
|
metadata.gz.sig
ADDED
Binary file
|