farmbot-serial 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/arduino/outgoing_handler.rb +9 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6cb4643e76ded7ebfa9d5a162ac7054aa5b073a
|
4
|
+
data.tar.gz: 3ec3133a071facfc6b30c294d0028d4c2aac55a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f4e9a3c086c1be7805b9f7a8bba936fb167c5dccb92b22ed6f065b9be4dd68e4680139a82f09c3eb8099af2ebb62d6643fc1ef8ad64d83134b562354e26f182
|
7
|
+
data.tar.gz: 541032dd5e2dd8462da5e1d0eba48e8ec7b555604d90b228fd64ec5a90f59fba7ed356ad04794e51b99ad3e96b27c1e0caf6431d9716a978b286e7dc888a4d04
|
@@ -18,11 +18,14 @@ module FB
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def move_relative(x: 0, y: 0, z: 0, s: 100)
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
21
|
+
write FB::Gcode.new do
|
22
|
+
# TODO: At some point, I will need to figure out why this is double
|
23
|
+
# firing. In the meantime, the fix is to use `||=` instead of `=`
|
24
|
+
x1 ||= [(bot.current_position.x + (x || 0)), 0].max
|
25
|
+
y1 ||= [(bot.current_position.y + (y || 0)), 0].max
|
26
|
+
z1 ||= [(bot.current_position.z + (z || 0)), 0].max
|
27
|
+
"G00 X#{x1} Y#{y1} Z#{z1}"
|
28
|
+
end
|
26
29
|
end
|
27
30
|
|
28
31
|
def move_absolute(x: 0, y: 0, z: 0, s: 100)
|
@@ -65,8 +68,7 @@ module FB
|
|
65
68
|
private
|
66
69
|
|
67
70
|
def write(str = "\n")
|
68
|
-
bot.write( block_given? ? yield :
|
71
|
+
bot.write( block_given? ? yield : str )
|
69
72
|
end
|
70
73
|
end
|
71
74
|
end
|
72
|
-
|