green_eye_monitor 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/CHANGELOG.md +5 -0
- data/exe/green_eye_monitor +2 -1
- data/green_eye_monitor.gemspec +2 -2
- data/lib/green_eye_monitor/client.rb +3 -1
- data/lib/green_eye_monitor/version.rb +1 -1
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 09b0535de2863db3b5f87effe6df03574c05e175
|
4
|
+
data.tar.gz: 1ed78d617dd877f19d8290e50154fa467fa51135
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 016f16ef7c22fa7cf21f091c8f99f26f8d03235e3f279e1b2a11a8965a354bddaca570c5b83d68b1a6cab6d991bc33bc0dd2d6cd0dfe70dc0b9975bb0683350b
|
7
|
+
data.tar.gz: 39d715c5f09ec09f91eea866f7b0ff5c98b5b7ad072197a62a8751f8119231e64e0a7627fbe17ef993f7f562c24fc17f19f1a2968c5ca97daea026dec6919f8b
|
data/CHANGELOG.md
CHANGED
data/exe/green_eye_monitor
CHANGED
@@ -9,13 +9,14 @@ require 'awesome_print'
|
|
9
9
|
|
10
10
|
opts = Slop.parse do |o|
|
11
11
|
o.bool '-d', '--debug', 'enable debug mode'
|
12
|
+
o.string '--port', 'serial port', default: '/dev/ttyUSB1'
|
12
13
|
o.on '--version', 'print the version' do
|
13
14
|
puts Slop::VERSION
|
14
15
|
exit
|
15
16
|
end
|
16
17
|
end
|
17
18
|
|
18
|
-
client = GreenEyeMonitor::Client.new(:baud => 115_200, :debug => opts[:debug])
|
19
|
+
client = GreenEyeMonitor::Client.new(:baud => 115_200, :serial_port => opts[:port], :debug => opts[:debug])
|
19
20
|
|
20
21
|
# client.packet_format = :bin48_net_time
|
21
22
|
# client.enable_realtime
|
data/green_eye_monitor.gemspec
CHANGED
@@ -23,8 +23,8 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.add_dependency 'slop'
|
24
24
|
spec.add_dependency 'awesome_print'
|
25
25
|
|
26
|
-
spec.add_development_dependency 'bundler'
|
27
|
-
spec.add_development_dependency 'rake'
|
26
|
+
spec.add_development_dependency 'bundler'
|
27
|
+
spec.add_development_dependency 'rake'
|
28
28
|
spec.add_development_dependency 'rspec'
|
29
29
|
spec.add_development_dependency 'rubocop'
|
30
30
|
spec.add_development_dependency 'rubocop-rspec'
|
@@ -64,7 +64,7 @@ module GreenEyeMonitor
|
|
64
64
|
command.strip!
|
65
65
|
command = old_command if command.empty?
|
66
66
|
write(command)
|
67
|
-
puts read
|
67
|
+
puts read(:length => 100)
|
68
68
|
old_command = command
|
69
69
|
end
|
70
70
|
end
|
@@ -254,6 +254,8 @@ module GreenEyeMonitor
|
|
254
254
|
elsif options[:length]
|
255
255
|
data = @serial.read(options[:length])
|
256
256
|
raise(Errors::TooShort, "Data too short #{data.inspect}") if data.size != options[:length]
|
257
|
+
elsif options[:all]
|
258
|
+
data = @serial.read(1_000)
|
257
259
|
else
|
258
260
|
raise('Unsupported options')
|
259
261
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: green_eye_monitor
|
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
|
- John Ferlito
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: serialport
|
@@ -70,30 +70,30 @@ dependencies:
|
|
70
70
|
name: bundler
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rake
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rspec
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -216,7 +216,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
216
216
|
version: '0'
|
217
217
|
requirements: []
|
218
218
|
rubyforge_project:
|
219
|
-
rubygems_version: 2.
|
219
|
+
rubygems_version: 2.5.1
|
220
220
|
signing_key:
|
221
221
|
specification_version: 4
|
222
222
|
summary: Library to speak to Brultech GEM energy consumption monitor over a serial
|