pinx 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/pinx.rb +7 -1
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b9952a499480dd5c10b0047fe9920a61cf48780
|
4
|
+
data.tar.gz: b948b2930c55015f593fd31c987849b69588f116
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5edfa514a797f90e05a476687a585bd3ce0a61a7465e254dcc3099848248a94ba1368ee4066bbfd7660ee077e3df4b3f2846f448232dbf4271e78242ca1323a4
|
7
|
+
data.tar.gz: 207a23f4b67561b3a4e7e69a051cab0237c531cc0392ffad9d76bf5b8c16485d153affbd31d0433e098ad1aac0db0c96f4220d50716ecd0db5ca019d0e094a71
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/pinx.rb
CHANGED
@@ -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
metadata.gz.sig
CHANGED
Binary file
|