pinx 0.1.0 → 0.1.1

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: 72f620e28be95dae20baad281601acd928d25e92
4
- data.tar.gz: 52ba8b19b6f4dc4a02b9a4982dba48e718944579
3
+ metadata.gz: edcd2aa4f6f58b4ccb1650486d1a9cd1b6704ca1
4
+ data.tar.gz: beea29f1d17c486e57581a1712e98b46b3f8187f
5
5
  SHA512:
6
- metadata.gz: 042d3cd2146838aef20fa739f90e9d9188b2eca844d9d77f65b2bb17d100a7346e1be96e1b9a492bb9445a63b91be513b54bba263463fae1f99a37fdb8a514da
7
- data.tar.gz: f62cc4197eee73cede6a5c448f9ff221e072043414dae9d5e9da657d35df1a7514acd44834a3c195e6ce3fe71e2122fc939c7a4061b6b6ce1a570b721f1a6615
6
+ metadata.gz: 7145f27c652b87ffab0bb40ee9274b0434ff499a4978dc6dd9c94c5b2d0a8934286360598b6602e6af6e7adc671f3db9f841c5e56f3aea6a36d5c18068db5f9e
7
+ data.tar.gz: abd3d643ea0fb390f62767a25d099921d23d35be5653d6421f05a3e7a578038aac42e02fd916768467f03e7b7a239dc5640564510fa76a93080126fbe448c84f
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -38,9 +38,17 @@ class PinX
38
38
  @on_thread.exit if @on_thread
39
39
  @off_thread = Thread.new { (sleep duration; on()) } if duration
40
40
 
41
- end
41
+ end
42
+
43
+ alias high on # opposite of low
44
+ alias open on # opposite of close
45
+ alias lock on # opposite of unlock
42
46
 
43
47
  alias stop off
48
+ alias low off
49
+ alias close off
50
+ alias unlock off
51
+
44
52
 
45
53
  def blink(seconds=0.5, duration: nil)
46
54
 
@@ -68,6 +76,8 @@ class PinX
68
76
  end
69
77
  end
70
78
 
79
+ alias oscillate blink
80
+
71
81
  def on?() @on end
72
82
  def off?() !@on end
73
83
 
@@ -77,7 +87,9 @@ class PinX
77
87
 
78
88
  protected
79
89
 
90
+ # set val with 0 (off) or 1 (on)
91
+ #
80
92
  def set_pin(val)
81
93
  @on = val
82
94
  end
83
- end
95
+ end
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.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  WdpSqEkWrn6XZDe0iuWCX26N1sSSsTZXyCpXGTvxJH3UlusRUdSYn1EKMVK7d2cv
32
32
  hBMb+m7+wJZ0Lw==
33
33
  -----END CERTIFICATE-----
34
- date: 2017-05-09 00:00:00.000000000 Z
34
+ date: 2017-05-10 00:00:00.000000000 Z
35
35
  dependencies: []
36
36
  description:
37
37
  email: james@jamesrobertson.eu
@@ -63,5 +63,6 @@ rubyforge_project:
63
63
  rubygems_version: 2.6.8
64
64
  signing_key:
65
65
  specification_version: 4
66
- summary: pinx
66
+ summary: A base class for setting a digital pin to on, off, or blink, or on, off,
67
+ or blinkg for a fixed duration.
67
68
  test_files: []
metadata.gz.sig CHANGED
Binary file