birdbrain 0.9.5 → 0.9.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/birdbrain/birdbrain_device.rb +5 -5
- data/lib/birdbrain/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c19db414d18dc4c867da7c20996eac4776988a6d2cec9f647b0421331f497533
|
4
|
+
data.tar.gz: b1a327063e601aa60b6d52d14ac9839763a77605e8a8b026e73e413864247293
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: caf7ad0fd88ed312cef45ad0c57e5cf2dd1fa475a5fcb9af17c4ff548b6f56107333202246509cfdcd8658128566a433c8bd38333aaca81b1835be89b120b040
|
7
|
+
data.tar.gz: a7da2556c64c151423cc04fa108a3d6fc9cb5dc72aef2998c86c04bb94f0cb595c4b97132bd5ef491bf3b2c71763e8e0bc3f1116811acc2b8b28e3a780365041
|
@@ -18,16 +18,16 @@ class BirdbrainDevice
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def self.connect(device = DEFAULT_DEVICE, raise_exception_if_no_connection = false)
|
21
|
+
device_object = new(device)
|
22
|
+
|
21
23
|
raise(BirdbrainException, 'Missing device name') if device.nil?
|
22
24
|
raise(BirdbrainException, "Invalid device name: #{device}") unless VALID_DEVICES.include?(device)
|
23
25
|
|
24
|
-
|
25
|
-
|
26
|
-
device.connect
|
26
|
+
device_object.connect
|
27
27
|
|
28
|
-
raise(BirdbrainException, 'No connection') if raise_exception_if_no_connection && !
|
28
|
+
raise(BirdbrainException, 'No connection') if raise_exception_if_no_connection && !device_object.connected?
|
29
29
|
|
30
|
-
|
30
|
+
device_object
|
31
31
|
end
|
32
32
|
|
33
33
|
def remap_device(device = DEFAULT_DEVICE)
|
data/lib/birdbrain/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: birdbrain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- fmorton
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02-
|
11
|
+
date: 2021-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This Ruby library allows students to use Ruby to read sensors and set
|
14
14
|
motors and LEDs with the Birdbrain Technologies Hummingbird Bit and Finch 2. To
|