artoo 1.8.1 → 1.8.2
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/.travis.yml +4 -0
- data/LICENSE +1 -1
- data/README.md +9 -9
- data/lib/artoo/adaptors/io/digital_pin.rb +7 -2
- data/lib/artoo/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82705548d90a15dc980dc9e5eed54acd2435f199
|
4
|
+
data.tar.gz: 284c6b441b82d1a1f40fc009389b123ca404d816
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34c566e7692524de1acb4917533dfe37469dd31f8bbb84016f2d48dca557df8a4fc45ae995368843aa3606779497800e0002a14aec94dde1617e6308e0baeab9
|
7
|
+
data.tar.gz: 11d3c64fb42b856bdae9450decdc414113f9b2a2539590a05cd6138e55f4562161648c2ad515a1653899d4d107788a672f547b63b54d6b1fc082af970d651938
|
data/.travis.yml
CHANGED
data/LICENSE
CHANGED
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-
|
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(
|
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
|
data/lib/artoo/version.rb
CHANGED
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.
|
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:
|
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.
|
288
|
+
rubygems_version: 2.4.8
|
289
289
|
signing_key:
|
290
290
|
specification_version: 4
|
291
291
|
summary: Ruby-based microframework for robotics
|