farmbot-serial 0.7.6 → 0.7.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 401a1c1137c965d0ec54830d394d7ad3f832e57a
4
- data.tar.gz: b4e397128ef3aecfdfe4b0268f4e7e485248c59a
3
+ metadata.gz: 5cfa534d5bd13bbb21b9f9b866c77a5be3d9d390
4
+ data.tar.gz: 378570f4addbbd5dea9a9ab29657b9d35adc4a2c
5
5
  SHA512:
6
- metadata.gz: 9c8234d5dc44d3b9445c34e0128e7ca38d81b408bf04a957d0ccfd7464c9b1acf1c22e844ec691e1559ce24d38c916eda0124721e283f9804f3f55d9652c3802
7
- data.tar.gz: 1eb264d3282a76da3cb5123dd9a411b684c0682dabf4f61d24cf986a06a59a4e4db1fdaed56d8ad6b78d885a8a8c9af5171d704f53bb47bca861176333a55288
6
+ metadata.gz: 77b4a4989520295d8532a6c796924db54dbdea094d7fb7545e5a93896c195d285294414a16286ce7feef4bd14a2e705ac63bee79009b0dd978f76a7beb88b157
7
+ data.tar.gz: c0b6fdd7eb5095f291d53277b80177cd6325f0a06b1d2d1fa411c3555bcf5918747164a687d8d194c82a3db00e9d0a74eb07b03d0917749d092dbb9078a809bf
@@ -107,11 +107,19 @@ module FB
107
107
  raise "Not yet implemented. TODO: This method."
108
108
  end
109
109
 
110
+ def wait(ms)
111
+ if (ms.is_a?(Integer))
112
+ write { "F44 P13 T#{ ms } M0 v1" }
113
+ else
114
+ raise BadNumericValue, "Expected sleep command to receive an integer."
115
+ end
116
+ end
117
+
110
118
  private
111
119
 
112
120
  class InvalidAxisEntry < Exception; end
113
121
  class BadBooleanValue < Exception; end
114
-
122
+ class BadNumericValue < Exception; end
115
123
  # The Arduino uses a different parameter number for each axis. Ex:
116
124
  # MOVEMENT_TIMEOUT_X is 11 and MOVEMENT_TIMEOUT_Y is 12. To keep things dry,
117
125
  # this method will lookup the correct paramater numer based on the axis
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.7.6
4
+ version: 0.7.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-10-07 00:00:00.000000000 Z
12
+ date: 2016-05-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -178,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
178
  version: '0'
179
179
  requirements: []
180
180
  rubyforge_project:
181
- rubygems_version: 2.4.8
181
+ rubygems_version: 2.5.1
182
182
  signing_key:
183
183
  specification_version: 4
184
184
  summary: Serial library for Farmbot