pinx 0.1.1 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: edcd2aa4f6f58b4ccb1650486d1a9cd1b6704ca1
4
- data.tar.gz: beea29f1d17c486e57581a1712e98b46b3f8187f
3
+ metadata.gz: 9b9952a499480dd5c10b0047fe9920a61cf48780
4
+ data.tar.gz: b948b2930c55015f593fd31c987849b69588f116
5
5
  SHA512:
6
- metadata.gz: 7145f27c652b87ffab0bb40ee9274b0434ff499a4978dc6dd9c94c5b2d0a8934286360598b6602e6af6e7adc671f3db9f841c5e56f3aea6a36d5c18068db5f9e
7
- data.tar.gz: abd3d643ea0fb390f62767a25d099921d23d35be5653d6421f05a3e7a578038aac42e02fd916768467f03e7b7a239dc5640564510fa76a93080126fbe448c84f
6
+ metadata.gz: 5edfa514a797f90e05a476687a585bd3ce0a61a7465e254dcc3099848248a94ba1368ee4066bbfd7660ee077e3df4b3f2846f448232dbf4271e78242ca1323a4
7
+ data.tar.gz: 207a23f4b67561b3a4e7e69a051cab0237c531cc0392ffad9d76bf5b8c16485d153affbd31d0433e098ad1aac0db0c96f4220d50716ecd0db5ca019d0e094a71
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -17,7 +17,10 @@ class PinX
17
17
  @on, @blinking = false, false
18
18
  end
19
19
 
20
-
20
+ def blinking?()
21
+ @blinking
22
+ end
23
+
21
24
  def on(durationx=nil, duration: nil)
22
25
 
23
26
  set_pin HIGH
@@ -40,6 +43,7 @@ class PinX
40
43
 
41
44
  end
42
45
 
46
+ alias start on
43
47
  alias high on # opposite of low
44
48
  alias open on # opposite of close
45
49
  alias lock on # opposite of unlock
@@ -52,6 +56,8 @@ class PinX
52
56
 
53
57
  def blink(seconds=0.5, duration: nil)
54
58
 
59
+ self.stop if blinking?
60
+
55
61
  @blinking = true
56
62
  t2 = Time.now + duration if duration
57
63
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pinx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file