rpi_pinin 0.1.0 → 0.1.1
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/rpi_pinin.rb +3 -3
- 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: 9d59e78f9937602e53d10e329fa0a52e0f2e29d6
|
4
|
+
data.tar.gz: 6d47657f3ca37d372df1c3035003ad6ee84cbd9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db2fc37bcb21cfd3fe809cf32c3b2300f9b5baf322d77c7f3060b64b0830995ae9c5783677511ba798c4674c18807a2c80b7722b046dfd5a9bdabf74274ee433
|
7
|
+
data.tar.gz: 70a3961c037942c3ed076fe0dbb53a27724174a56f82c07291a2d69e68581826bca9a7847c68b3fd385b977118c5d5cb77acd07c066c106fa80d9b9bd95fa65a
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/rpi_pinin.rb
CHANGED
@@ -35,7 +35,7 @@ class RPiPinIn
|
|
35
35
|
|
36
36
|
watch() do |value|
|
37
37
|
|
38
|
-
if value ==
|
38
|
+
if value == 1 then
|
39
39
|
|
40
40
|
yield if block_given?
|
41
41
|
on_high()
|
@@ -74,7 +74,7 @@ class RPiPinIn
|
|
74
74
|
private
|
75
75
|
|
76
76
|
def read_value()
|
77
|
-
File.read("/sys/class/gpio/gpio#{@id}/value").chomp == '0' ?
|
77
|
+
File.read("/sys/class/gpio/gpio#{@id}/value").chomp == '0' ? 1 : 0
|
78
78
|
end
|
79
79
|
|
80
80
|
# to avoid "Device or resource busy @ fptr_finalize - /sys/class/gpio/export"
|
@@ -86,4 +86,4 @@ class RPiPinIn
|
|
86
86
|
|
87
87
|
File.write "/sys/class/gpio/unexport", @id
|
88
88
|
end
|
89
|
-
end
|
89
|
+
end
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|