apa102_rbpi 1.0.0 → 1.0.1

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: 40336d05916f6d9efd8ed00b90b0e0c470bf3f90
4
- data.tar.gz: cdc426844412559ffd66de9a3c744105c938a766
3
+ metadata.gz: c45c70969c9ca54e9ea97767122830cd10e63608
4
+ data.tar.gz: fcad57631c27c9b9bbbb0523bc39a5c847cd5175
5
5
  SHA512:
6
- metadata.gz: a73f59c02624d41198d4cda1b8cb1250bd8659c2a69c2e5a47b3c5d66930892a296f72ffc0c3c38c1fed6c32b6226b3547c09d061b130ff8693c15cbdfbc2a9b
7
- data.tar.gz: b9f570c6e1feefa82b0e0eaf2f400016f352fd8a7a244d448c224fa2c0c629c5f6a3a7de685e162090d77496628d6c6503b50381d72eec04fed2bdf8da66e05a
6
+ metadata.gz: d333ca8227c94a6254571ebc8f3e94b3e268882d66fd8e8298494885f4179adc645f1565c752b56b37767a1f9a8e151227821144fe8932f7b306993450fb3145
7
+ data.tar.gz: 8dffec1f2cfd910843233e8bebba50569c429aa307c5bd8f72cb60eeda98bffedd4298823d46e4d5f2d9897733084abc281a01e656813990f187accabeb6cca4
data/AUTHORS ADDED
@@ -0,0 +1,3 @@
1
+ Eric Stiens <estiens@gmail.com>
2
+ Matthew Leung <leung.mattp@gmail.com>
3
+ Zach Kemp <zvkemp@gmail.com>
data/CHANGELOG.md CHANGED
@@ -1,14 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.1
4
+ - Fix bug with `set` not being required
5
+ - Add `set_all_pixels` functionality to strip
6
+
3
7
  ## 1.0.0
4
8
  - Add multistrip support
5
9
  - Add simulation support
6
10
  - Remake base objects, add cleaner configuration
7
11
 
8
12
  ## 0.2.0
9
- -Set pi_piper as regular dependency
10
- -Added some utility functions
11
- -Use set_pixel instead of set_pixel_color
13
+ - Set pi_piper as regular dependency
14
+ - Added some utility functions
15
+ - Use set_pixel instead of set_pixel_color
12
16
 
13
17
  ## 0.1.0
14
18
 
@@ -1,6 +1,8 @@
1
1
  module Apa102Rbpi
2
2
  class Strip
3
3
 
4
+ require 'set'
5
+
4
6
  attr_reader :mirrors, :head, :tail, :num_leds
5
7
  attr_accessor :led_frame_rgb_offsets, :brightness
6
8
 
@@ -85,9 +87,20 @@ module Apa102Rbpi
85
87
  show!
86
88
  end
87
89
 
90
+ def set_all_pixels(color, brightness = @brightness)
91
+ @num_leds.times do |led_idx|
92
+ set_pixel(led_idx, color, brightness)
93
+ end
94
+ end
95
+
96
+ def set_all_pixels!(color, brightness = @brightness)
97
+ set_all_pixels(color, brightness)
98
+ show!
99
+ end
100
+
88
101
  def clear
89
- @num_leds.times do |l|
90
- set_pixel(l, 0)
102
+ @num_leds.times do |led_idx|
103
+ set_pixel(led_idx, 0)
91
104
  end
92
105
  end
93
106
 
@@ -100,9 +113,10 @@ module Apa102Rbpi
100
113
  (brightness & 0b00011111) | 0b11100000
101
114
  end
102
115
 
116
+ private
117
+
103
118
  def base
104
119
  Apa102Rbpi.base
105
120
  end
106
121
  end
107
122
  end
108
-
@@ -1,3 +1,3 @@
1
1
  module Apa102Rbpi
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apa102_rbpi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - matl33t
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-06-06 00:00:00.000000000 Z
11
+ date: 2016-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -75,6 +75,7 @@ extra_rdoc_files: []
75
75
  files:
76
76
  - ".gitignore"
77
77
  - ".rspec"
78
+ - AUTHORS
78
79
  - CHANGELOG.md
79
80
  - Gemfile
80
81
  - LICENSE.txt