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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8726d0bf63ceeba143de791ae04b776397e33f20
4
- data.tar.gz: ea7bd528d0bff144a33980087193a6cb9aba9871
3
+ metadata.gz: 9d59e78f9937602e53d10e329fa0a52e0f2e29d6
4
+ data.tar.gz: 6d47657f3ca37d372df1c3035003ad6ee84cbd9f
5
5
  SHA512:
6
- metadata.gz: 2c35c7c4134d1457df0a52138561be4071f093179b893cf674758e0fe7ff4425b57577b458cb7371805b327b6fdbd57aced9f44a635a07f510b8bdf2cc028917
7
- data.tar.gz: 51402d1bfe10c9693267f4e1d1ad50730e29d7f706daa6817931a9340b67d45529d19273ef8f5050c3830591d0db7d8584c4e77324f165a9f335caa261dd3b55
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 == '1' then
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' ? '1' : '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
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rpi_pinin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file