BBB 0.0.7 → 0.0.8
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.
- data/lib/BBB/components/analog_component.rb +1 -1
- data/lib/BBB/gpio/pin_converter.rb +4 -2
- data/lib/BBB/version.rb +1 -1
- metadata +3 -3
@@ -11,14 +11,16 @@ module BBB
|
|
11
11
|
# Currently only converts IO::DigitalPins
|
12
12
|
#
|
13
13
|
def convert(pin, opts={})
|
14
|
+
opts = {:mock=>mock}.merge(opts)
|
15
|
+
|
14
16
|
base_class = pin.class.to_s.split("::").last
|
15
17
|
if GPIO.const_defined?(base_class)
|
16
18
|
klass = GPIO::const_get(base_class.to_sym)
|
19
|
+
return klass.new(pin.position, pin.mode, opts)
|
17
20
|
elsif ADC.const_defined?(base_class)
|
18
21
|
klass = ADC::const_get(base_class.to_sym)
|
22
|
+
return klass.new(pin.position, opts)
|
19
23
|
end
|
20
|
-
opts = {:mock=>mock}.merge(opts)
|
21
|
-
return klass.new(pin.position, pin.mode, opts)
|
22
24
|
end
|
23
25
|
|
24
26
|
end
|
data/lib/BBB/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: BBB
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -144,7 +144,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
144
144
|
version: '0'
|
145
145
|
segments:
|
146
146
|
- 0
|
147
|
-
hash: -
|
147
|
+
hash: -825880762915958157
|
148
148
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
149
149
|
none: false
|
150
150
|
requirements:
|
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
153
153
|
version: '0'
|
154
154
|
segments:
|
155
155
|
- 0
|
156
|
-
hash: -
|
156
|
+
hash: -825880762915958157
|
157
157
|
requirements: []
|
158
158
|
rubyforge_project:
|
159
159
|
rubygems_version: 1.8.25
|