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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/arduino/status.rb +3 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: caf76751695f80320148ccda60a2b7f5f90d99ce
4
- data.tar.gz: df0cb1eed0147a30522799aa64f1ddedb599b773
3
+ metadata.gz: afc6e55de74753b25d80ecb3b1ad5ffab421dee2
4
+ data.tar.gz: 24fcba6046ace193dc977be60e22240c65837c35
5
5
  SHA512:
6
- metadata.gz: 18dffa6b60f61e21f179f770e61d92b75df8a249c7f35afc324a24341571b0b3f82bfcf369579e459315ae88117a71465ca7a8c305cc48701dc76d59ed4c943b
7
- data.tar.gz: b77c02b6530fe4aa310149d8ce66591c353165708dbe85ebe194df89ee0e2dc7e8aae70a8c34cc5f39d2b0a93761a4600f37db3aa911f7072930bcf42af102e5
6
+ metadata.gz: 5ff97f82563c17b7bbf2eb59a480a0cca3404d715dd9dd7cd6732f8cce52627b613209b62190de03f62bd8849f8bfae2d5eb10e3184aab349d7fda90c75e63d0
7
+ data.tar.gz: 48dba271d062b49875e2a79b1b8cad54097bf411fdac2fd223ff221e4d4820bc20ea5bef3fcc650c04f142621700e5d34a2904748e0dc6c467b56a117c3c1da2
@@ -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.to_s)] = val
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.0
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-04 00:00:00.000000000 Z
12
+ date: 2015-08-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler