artoo-i2c 0.1.0 → 0.2.0

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: 4cbcce1b971789149a5c60a19eda4815953dfe64
4
- data.tar.gz: dc0751e660ab95ec064f43a3cfb287496d5d0f9a
3
+ metadata.gz: 0582d27c4ceebb4b1687cf8ae5f589cf972e56b7
4
+ data.tar.gz: 7a53c411482222f54a6dad5ce71b6fbc1fcc48f3
5
5
  SHA512:
6
- metadata.gz: 4b95adae7a7963f80e0b33eb3143ea0b974f0fbd11d0a3a141c955025bcc1a2fa202df444c85ebdf33726391db688d080937ac235077cd9f904068a384080e4c
7
- data.tar.gz: a813c3e6d6c46b25206c0791de84559799f9759aa54a1854d6f063d78be8c67e43089d69e9079bb5a9525af6a942f8ae03fd33f8947fb2a5a0217741126dd5f0
6
+ metadata.gz: b866d14e76888a06f0ec313b0f246d419296cfdf0c76ef36ed4ef75fddef48d88ceb857d6fc1f1b86fb5b9213079315e92d3c0df54d2102c70a45cf4ed0de634
7
+ data.tar.gz: 89dd064469eab872cd301d71d17aab52498fdfcaddb874c2298de008cac466c0877a6634eeb0193de55c60d08f61cecd5c180c861998d4c1896a995ef30b090b
data/Gemfile.lock CHANGED
@@ -1,19 +1,19 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- artoo-i2c (0.1.0)
5
- artoo (~> 1.1.0)
4
+ artoo-i2c (0.2.0)
5
+ artoo (~> 1.2.0)
6
6
 
7
7
  GEM
8
8
  remote: http://rubygems.org/
9
9
  specs:
10
- artoo (1.1.0)
10
+ artoo (1.2.0)
11
11
  celluloid (~> 0.15.0)
12
12
  celluloid-io (~> 0.15.0)
13
13
  multi_json (~> 1.6)
14
14
  pry (~> 0.9)
15
15
  rake (~> 10.0)
16
- reel (~> 0.4.0.pre)
16
+ reel (~> 0.4.0)
17
17
  thor (~> 0.18.1)
18
18
  celluloid (0.15.1)
19
19
  timers (~> 1.1.0)
@@ -21,7 +21,7 @@ GEM
21
21
  celluloid (>= 0.15.0)
22
22
  nio4r (>= 0.5.0)
23
23
  coderay (1.0.9)
24
- http (0.5.0.pre)
24
+ http (0.5.0)
25
25
  http_parser.rb
26
26
  http_parser.rb (0.6.0.beta.2)
27
27
  metaclass (0.0.1)
@@ -37,10 +37,10 @@ GEM
37
37
  method_source (~> 0.8)
38
38
  slop (~> 3.4)
39
39
  rake (10.1.0)
40
- reel (0.4.0.pre5)
41
- celluloid (>= 0.15.0)
40
+ reel (0.4.0)
41
+ celluloid (>= 0.15.1)
42
42
  celluloid-io (>= 0.15.0)
43
- http (>= 0.5.0.pre)
43
+ http (>= 0.5.0)
44
44
  http_parser.rb (>= 0.6.0.beta.2)
45
45
  websocket_parser (>= 0.1.4)
46
46
  slop (3.4.6)
data/artoo-i2c.gemspec CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
21
21
  s.require_paths = ["lib"]
22
22
 
23
- s.add_runtime_dependency 'artoo', '~> 1.1.0'
23
+ s.add_runtime_dependency 'artoo', '~> 1.2.0'
24
24
  s.add_development_dependency 'minitest', '~> 5.0'
25
25
  s.add_development_dependency 'minitest-happy'
26
26
  s.add_development_dependency 'mocha', '~> 0.14.0'
@@ -1,5 +1,5 @@
1
1
  module Artoo
2
2
  module I2c
3
- VERSION = '0.1.0'
3
+ VERSION = '0.2.0'
4
4
  end
5
5
  end
@@ -22,7 +22,7 @@ module Artoo
22
22
 
23
23
  every(interval) do
24
24
  connection.i2c_write(0x40, 0x00)
25
- connection.i2c_write(0x00, 0x00)
25
+ connection.i2c_write(0x00)
26
26
  new_value = connection.i2c_read(6)
27
27
 
28
28
  update(new_value) if !new_value.nil?
@@ -77,7 +77,7 @@ module Artoo
77
77
  end
78
78
 
79
79
  def get_value(value, index)
80
- value[:data][index]
80
+ value[index]
81
81
  end
82
82
 
83
83
  def generate_bool(value)
@@ -25,13 +25,13 @@ describe Artoo::Drivers::Wiidriver do
25
25
  @driver.calculate_joystick_value(:test_axis, :test_origin).must_equal 3
26
26
  end
27
27
 
28
- it 'Artoo::Drivers::Wiidriver#encrypted?' do
29
- value = {:data => [0, 0, 0, 0, 0, 0]}
28
+ it 'Artoo::Drivers::Wiidriver#encrypted? when all same' do
29
+ value = [0, 0, 0, 0, 0, 0]
30
30
  @driver.encrypted?(value).must_equal true
31
31
  end
32
32
 
33
- it 'Artoo::Drivers::Wiidriver#encrypted?' do
34
- value = {:data => [1, 2, 3, 4, 5, 6]}
33
+ it 'not Artoo::Drivers::Wiidriver#encrypted? with all different data' do
34
+ value = [1, 2, 3, 4, 5, 6]
35
35
  @driver.encrypted?(value).must_equal false
36
36
  end
37
37
 
@@ -42,7 +42,7 @@ describe Artoo::Drivers::Wiidriver do
42
42
  end
43
43
 
44
44
  it 'Artoo::Drivers::Wiidriver#get_value' do
45
- value = {:data => [1, 2, 3, 4, 5, 6], :other_data => [10, 20, 30, 40, 50, 60]}
45
+ value = [1, 2, 3, 4, 5, 6]
46
46
  @driver.get_value(value, 1).must_equal 2
47
47
  @driver.get_value(value, 5).must_equal 6
48
48
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: artoo-i2c
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ron Evans
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-11 00:00:00.000000000 Z
12
+ date: 2013-09-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: artoo
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - ~>
19
19
  - !ruby/object:Gem::Version
20
- version: 1.1.0
20
+ version: 1.2.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ~>
26
26
  - !ruby/object:Gem::Version
27
- version: 1.1.0
27
+ version: 1.2.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: minitest
30
30
  requirement: !ruby/object:Gem::Requirement