farmbot-serial 0.2.6 → 0.2.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7ddadfc1f32971a705b3cf66865bab78406aa157
4
- data.tar.gz: 1207f59ca88959e5550f9250a8996986e2fa2a3a
3
+ metadata.gz: d753b8fc68043b95909c16c91852b39fa7536ea9
4
+ data.tar.gz: 05eb278c7655f6e631a52b428d3bba354b5885e0
5
5
  SHA512:
6
- metadata.gz: 80a4798b8e1246e042418eec9f2fda0c66554a085c56c181376c5a524344722ee4831d4388b9cb561822cf0648e0c6ec874ce573b2c27bd33d1958aa482089d1
7
- data.tar.gz: ee836a94a58df2bdecedfbe88604b4282c3264eaf7b126e7a8242e5858ab9ce2d59f17ced6bb82263035ad3a126eaa86b07720b086ea1ea813382f0a46b62951
6
+ metadata.gz: 3226279c9a81b5bdf7e70747b02a9339b4bed2a9742e4a32130948adbaa70b31666b181fe96ebc77e11e6c2532780801b46ae91666bca5b4830a8d164a9743e3
7
+ data.tar.gz: 1d517d85eb5b53fa3d67bc845999299f936d0e007a84511a3eb64ef9effe7d7bb39990812fd8c96c5862c37ba53a9e9b8d8c7795e073e7b5036e5676b58a5b77
@@ -18,12 +18,11 @@ module FB
18
18
  end
19
19
 
20
20
  def move_relative(x: 0, y: 0, z: 0, s: 100)
21
- x += (bot.current_position.x || 0)
22
- y += (bot.current_position.y || 0)
23
- z += (bot.current_position.z || 0)
24
- write do
25
- FB::Gcode.new { "G00 X#{[x, 0].max} Y#{[y, 0].max} Z#{[z, 0].max}" }
26
- end
21
+ x = [(bot.current_position.x + (x || 0)), 0].max
22
+ y = [(bot.current_position.y + (y || 0)), 0].max
23
+ z = [(bot.current_position.z + (z || 0)), 0].max
24
+
25
+ write { FB::Gcode.new { "G00 X#{x} Y#{y} Z#{z}" } }
27
26
  end
28
27
 
29
28
  def move_absolute(x: 0, y: 0, z: 0, s: 100)
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.2.6
4
+ version: 0.2.7
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-04-20 00:00:00.000000000 Z
12
+ date: 2015-04-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler