blink1-patterns 0.0.4 → 0.0.5

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.
@@ -11,7 +11,7 @@ module Blink
11
11
  Blink1.open do |blink|
12
12
  (0..11).each do |pos|
13
13
  color = Blink::Patterns.darken(hex_color, (1 - brightness[pos]) * depth)
14
- duration = stretch * interval[pos] * 1000
14
+ duration = (stretch * interval[pos] * 1000).to_i
15
15
  blink.write_pattern_line(duration, *color, pos)
16
16
  end
17
17
  blink.play(0)
@@ -36,6 +36,12 @@ module Blink
36
36
  end
37
37
  end
38
38
 
39
+ def self.off
40
+ Blink1.open do |blink|
41
+ blink.off
42
+ end
43
+ end
44
+
39
45
  def self.to_rgb(hex_color)
40
46
  hex_color.gsub('#','').scan(/../).map {|color| color.hex}
41
47
  end
@@ -45,3 +51,5 @@ module Blink
45
51
  end
46
52
  end
47
53
  end
54
+
55
+ Blink::Patterns.breath
@@ -1,5 +1,5 @@
1
1
  module Blink
2
2
  module Patterns
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: blink1-patterns
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.4
5
+ version: 0.0.5
6
6
  platform: ruby
7
7
  authors:
8
8
  - Michael Schmidt
@@ -62,7 +62,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
62
62
  - !ruby/object:Gem::Version
63
63
  segments:
64
64
  - 0
65
- hash: 1383845139701609875
65
+ hash: -4289701966724171646
66
66
  version: '0'
67
67
  required_rubygems_version: !ruby/object:Gem::Requirement
68
68
  none: false
@@ -71,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
71
71
  - !ruby/object:Gem::Version
72
72
  segments:
73
73
  - 0
74
- hash: 1383845139701609875
74
+ hash: -4289701966724171646
75
75
  version: '0'
76
76
  requirements: []
77
77
  rubyforge_project: