farmbot-serial 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/arduino/status.rb +3 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afc6e55de74753b25d80ecb3b1ad5ffab421dee2
|
4
|
+
data.tar.gz: 24fcba6046ace193dc977be60e22240c65837c35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ff97f82563c17b7bbf2eb59a480a0cca3404d715dd9dd7cd6732f8cce52627b613209b62190de03f62bd8849f8bfae2d5eb10e3184aab349d7fda90c75e63d0
|
7
|
+
data.tar.gz: 48dba271d062b49875e2a79b1b8cad54097bf411fdac2fd223ff221e4d4820bc20ea5bef3fcc650c04f142621700e5d34a2904748e0dc6c467b56a117c3c1da2
|
data/lib/arduino/status.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'ostruct'
|
1
2
|
module FB
|
2
3
|
class Status
|
3
4
|
# Map of informational status and default values for status within Arduino.
|
@@ -48,12 +49,12 @@ module FB
|
|
48
49
|
|
49
50
|
def set(key, val)
|
50
51
|
transaction do |info|
|
51
|
-
info[Gcode::PARAMETER_DICTIONARY.fetch(key, key.
|
52
|
+
info[Gcode::PARAMETER_DICTIONARY.fetch(key, "PIN_#{key}".to_sym)] = val
|
52
53
|
end
|
53
54
|
end
|
54
55
|
|
55
56
|
def pin(num)
|
56
|
-
case get(num)
|
57
|
+
case get("PIN_#{num}")
|
57
58
|
when false, 0, :off then :off
|
58
59
|
when true, 1, :on then :on
|
59
60
|
else; :unknown
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: farmbot-serial
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tim Evers
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-08-
|
12
|
+
date: 2015-08-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|