artoo 1.8.1 → 1.8.2

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: 2bd5f19df7614902b2db851504c69b84c62802bf
4
- data.tar.gz: 553d99621d690f7dd34c6d44f3f5e00558a80ac4
3
+ metadata.gz: 82705548d90a15dc980dc9e5eed54acd2435f199
4
+ data.tar.gz: 284c6b441b82d1a1f40fc009389b123ca404d816
5
5
  SHA512:
6
- metadata.gz: 846e9655c178b18fa55325cf11f8d857683a1fedd4951844c242a64f7193ce239a2947e04d87abe3ed14dc3df63e7fe066b5067071f7c5fec28810dbb278aa2c
7
- data.tar.gz: 5a5adc204d4196683e0ceb275d395d39d91ee77b48cd6e940e6ee8b86c8c7fd9cfce8752a3e3cf404e5b4708261480a61d4d6da3f5f35932fe96b127a626a86f
6
+ metadata.gz: 34c566e7692524de1acb4917533dfe37469dd31f8bbb84016f2d48dca557df8a4fc45ae995368843aa3606779497800e0002a14aec94dde1617e6308e0baeab9
7
+ data.tar.gz: 11d3c64fb42b856bdae9450decdc414113f9b2a2539590a05cd6138e55f4562161648c2ad515a1653899d4d107788a672f547b63b54d6b1fc082af970d651938
@@ -15,6 +15,10 @@ matrix:
15
15
  - rvm: jruby-head
16
16
  - rvm: rbx
17
17
 
18
+ before_install:
19
+ - gem update --system 2.4.8
20
+ - gem --version
21
+
18
22
  branches:
19
23
  except:
20
24
  - artoo.io
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012-2014 The Hybrid Group
1
+ Copyright (c) 2012-2016 The Hybrid Group
2
2
 
3
3
  Licensed under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License.
data/README.md CHANGED
@@ -37,11 +37,11 @@ require 'artoo'
37
37
 
38
38
  connection :ardrone, :adaptor => :ardrone
39
39
  device :drone, :driver => :ardrone
40
-
40
+
41
41
  work do
42
42
  drone.start
43
43
  drone.take_off
44
-
44
+
45
45
  after(25.seconds) { drone.hover.land }
46
46
  after(30.seconds) { drone.stop }
47
47
  end
@@ -59,7 +59,7 @@ SPHEROS = ["4567", "4568", "4569", "4570", "4571"]
59
59
  class SpheroRobot < Artoo::Robot
60
60
  connection :sphero, :adaptor => :sphero
61
61
  device :sphero, :driver => :sphero
62
-
62
+
63
63
  work do
64
64
  every(3.seconds) do
65
65
  sphero.roll 90, rand(360)
@@ -69,8 +69,8 @@ end
69
69
 
70
70
  robots = []
71
71
  SPHEROS.each {|p|
72
- robots << SpheroRobot.new(:connections =>
73
- {:sphero =>
72
+ robots << SpheroRobot.new(:connections =>
73
+ {:sphero =>
74
74
  {:port => p}})
75
75
  }
76
76
 
@@ -87,7 +87,7 @@ rvm get head && rvm install rbx-2.1.1 --1.9
87
87
 
88
88
  Artoo is conceptualy influenced by [Sinatra](https://github.com/sinatra/sinatra) as well as borrowing some code from it.
89
89
 
90
- Artoo provides a robust actor-based messaging architecture, that can support fully multi-threaded operation and high-concurrency, as long as it is supported by the Ruby version in which it is executing. This means you will need to use JRuby or Rubinius for maximum concurrency.
90
+ Artoo provides a robust actor-based messaging architecture, that can support fully multi-threaded operation and high-concurrency, as long as it is supported by the Ruby version in which it is executing. This means you will need to use JRuby or Rubinius for maximum concurrency.
91
91
 
92
92
  To a large extent, this is due to being built on top of [Celluloid](https://github.com/celluloid/celluloid), [Celluloid::IO](https://github.com/celluloid/celluloid-io), and [Reel](https://github.com/celluloid/reel).
93
93
 
@@ -133,7 +133,7 @@ gem install artoo-joystick
133
133
  gem install artoo-ardrone
134
134
  ```
135
135
 
136
- If you will be using socket to serial commuication (required if you will use JRuby or Rubinius), you are ready to start programming your hardware.
136
+ If you will be using socket to serial commuication (required if you will use JRuby or Rubinius), you are ready to start programming your hardware.
137
137
 
138
138
  If you want to connect via serial port directly, and are using MRI, install the hybridgroup-serialport gem:
139
139
 
@@ -263,7 +263,7 @@ Commands:
263
263
  Artoo includes a console based on [Pry](http://pryrepl.org/) to allow you to interactively debug and control your robot.
264
264
 
265
265
  ```
266
- $ artoo console ./examples/hello.rb
266
+ $ artoo console ./examples/hello.rb
267
267
  run robi ./examples/hello.rb from "."
268
268
  I, [2013-07-03T17:11:35.793913 #5527] INFO -- : Registering connection 'loop'...
269
269
  I, [2013-07-03T17:11:35.794939 #5527] INFO -- : Preparing work...
@@ -332,4 +332,4 @@ Need more help? Just want to say "Hello"? Come visit us on IRC freenode #artoo
332
332
  * For git help see [progit](http://git-scm.com/book) which is an awesome (and free) book on git
333
333
 
334
334
 
335
- (c) 2012-2015 The Hybrid Group
335
+ (c) 2012-2016 The Hybrid Group
@@ -14,7 +14,7 @@ module Artoo
14
14
  @pin_num = pin_num
15
15
 
16
16
  File.open("#{ GPIO_PATH }/export", "w") { |f| f.write("#{ pin_num }") }
17
-
17
+ File.close
18
18
  # Sets the pin for read or write
19
19
  set_mode(mode)
20
20
  end
@@ -56,8 +56,11 @@ module Artoo
56
56
  end
57
57
  end
58
58
 
59
- def set_pin(mode:, direction:)
59
+ def set_pin(settings)
60
+ mode = settings[:mode]
61
+ direction = settings[:direction]
60
62
  File.open("#{ GPIO_PATH }/gpio#{ pin_num }/direction", "w") { |f| f.write(direction) }
63
+ File.close
61
64
  @pin_file = File.open("#{ GPIO_PATH }/gpio#{ pin_num }/value", mode)
62
65
  end
63
66
 
@@ -83,6 +86,8 @@ module Artoo
83
86
  def close
84
87
  off! if @mode == 'w'
85
88
  File.open("#{ GPIO_PATH }/unexport", "w") { |f| f.write("#{pin_num}") }
89
+ File.close
90
+ @pin_file.close
86
91
  end
87
92
  end
88
93
  end
@@ -1,5 +1,5 @@
1
1
  module Artoo
2
2
  unless const_defined?('VERSION')
3
- VERSION = "1.8.1"
3
+ VERSION = "1.8.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: artoo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.1
4
+ version: 1.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ron Evans
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2015-05-23 00:00:00.000000000 Z
15
+ date: 2016-02-15 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: celluloid
@@ -285,7 +285,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
285
285
  version: '0'
286
286
  requirements: []
287
287
  rubyforge_project: artoo
288
- rubygems_version: 2.2.2
288
+ rubygems_version: 2.4.8
289
289
  signing_key:
290
290
  specification_version: 4
291
291
  summary: Ruby-based microframework for robotics