birdbrain 0.9.0 → 0.9.1
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.
- checksums.yaml +4 -4
- data/lib/birdbrain/birdbrain_finch.rb +3 -3
- data/lib/birdbrain/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebef39d5adda74362cc84dcc0e11402873b063e0b73e97ef365098d2705d1dc8
|
4
|
+
data.tar.gz: 4fa86ffb6e3805942a2ba173034043225767c94600a10341dc083d740ec225a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a17c59a131790c6cd95332e292815b1768123bc9b444d478f347ecea123b911405a0c0216859f4af4e256fc661cfc93a4714640792038a2c8a0bd04d4af72da
|
7
|
+
data.tar.gz: c1653974c3353f0e6b8bc696302c5afe5a46c91b912dd59492d2d4c0aadabd78bd8e2f03dd9715dca1b495966c8f3ecde716079eee296a5a808ba1cf4c157af3
|
@@ -96,7 +96,7 @@ class BirdbrainFinch < BirdbrainMicrobit
|
|
96
96
|
end
|
97
97
|
|
98
98
|
def tail(port, r_intensity, g_intensity, b_intensity)
|
99
|
-
return unless connected_and_valid?(port, VALID_TAIL_PORTS)
|
99
|
+
return nil unless connected_and_valid?(port, VALID_TAIL_PORTS)
|
100
100
|
|
101
101
|
if port.to_s == 'all'
|
102
102
|
(2..5).each { |each_port| BirdbrainHummingbirdOutput.tri_led(device, each_port, r_intensity, g_intensity, b_intensity) }
|
@@ -135,7 +135,7 @@ class BirdbrainFinch < BirdbrainMicrobit
|
|
135
135
|
end
|
136
136
|
|
137
137
|
def move(direction, distance, speed, wait_to_finish_movement = true)
|
138
|
-
return
|
138
|
+
return nil unless connected_and_valid?(direction, VALID_MOVE_DIRECTION)
|
139
139
|
|
140
140
|
unless (response = BirdbrainFinchOutput.move(device, direction, distance, speed))
|
141
141
|
return response
|
@@ -147,7 +147,7 @@ class BirdbrainFinch < BirdbrainMicrobit
|
|
147
147
|
end
|
148
148
|
|
149
149
|
def turn(direction, angle, speed, wait_to_finish_movement = true)
|
150
|
-
return
|
150
|
+
return nil unless connected_and_valid?(direction, VALID_TURN_DIRECTION)
|
151
151
|
|
152
152
|
unless (response = BirdbrainFinchOutput.turn(device, direction, angle, speed))
|
153
153
|
return response
|
data/lib/birdbrain/version.rb
CHANGED