apa102_rbpi 1.0.0 → 1.0.1
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/AUTHORS +3 -0
- data/CHANGELOG.md +7 -3
- data/lib/apa102_rbpi/strip.rb +17 -3
- data/lib/apa102_rbpi/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c45c70969c9ca54e9ea97767122830cd10e63608
|
4
|
+
data.tar.gz: fcad57631c27c9b9bbbb0523bc39a5c847cd5175
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d333ca8227c94a6254571ebc8f3e94b3e268882d66fd8e8298494885f4179adc645f1565c752b56b37767a1f9a8e151227821144fe8932f7b306993450fb3145
|
7
|
+
data.tar.gz: 8dffec1f2cfd910843233e8bebba50569c429aa307c5bd8f72cb60eeda98bffedd4298823d46e4d5f2d9897733084abc281a01e656813990f187accabeb6cca4
|
data/AUTHORS
ADDED
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
|
|
data/lib/apa102_rbpi/strip.rb
CHANGED
@@ -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 |
|
90
|
-
set_pixel(
|
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
|
-
|
data/lib/apa102_rbpi/version.rb
CHANGED
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.
|
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-
|
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
|