pigpiod 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/exe/pigpio_mqtt_bridge +7 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7402311d7d55303c25209cbe6dd119955681714fe86e8ee830a0931575ddc79e
4
- data.tar.gz: 9a1805587185f5724683d4f36801bb534ea8b5cd256e08f288161c6a59dace40
3
+ metadata.gz: 755c246694e16bb88402c4674f45785fe4af5294f4e92c4624da7d7eee001068
4
+ data.tar.gz: 38f615dce7d46425a149e270b8a8d68e60396a0281ea736c05346b049eb73309
5
5
  SHA512:
6
- metadata.gz: 608f85c221dc559a57c9273febf63c9c583049caa28a7e1fd506c9bb9c48bc0320cff7ce8694e8b58ec8cf8a2f019fc29671b6545cb766f3c446b0faee1b234f
7
- data.tar.gz: 01e51a27bd50621c79380383735fb5a954379c552d94d1a636242be1830ef16ccc956888ca2ee4e454b3e61e03693a12a6e9785ef93bf2cefff29efbf556d397
6
+ metadata.gz: d19665b2effaa41cee2290e48940960a9940129df70993a9dd0005f30bf66186d438d3c4c6b4fafe03bfcc144e88ae4a8f57f3fbc0217c298389b5ff0dfa65a8
7
+ data.tar.gz: e220dc9d415eb2291ec4aaa985fffbc55aa43cc7d3ea8fe2dcdb7a558383f64ae65993e0561b9c9c33652f77a8576e6babd0ec28bd2be529492bf38034d3d6fb
@@ -34,9 +34,9 @@ config.each do |pin, gpio_config|
34
34
  pin = pin.to_i
35
35
  raise "Unrecognized gpio" unless (gpio = PiGPIO.instance.gpios[pin])
36
36
 
37
- gpio.mode = gpio_config[:mode].to_sym if gpio_config[:mode]
38
- gpio.pull_up_down = gpio_config[:pull_up_down].to_sym if gpio_config[:pull_up_down]
39
- gpio.invert_logic = gpio_config[:invert_logic] if gpio_config[:invert_logic]
37
+ gpio.mode = gpio_config["mode"].to_sym if gpio_config["mode"]
38
+ gpio.pull_up_down = gpio_config["pull_up_down"].to_sym if gpio_config["pull_up_down"]
39
+ gpio.invert_logic = gpio_config["invert_logic"] if gpio_config["invert_logic"]
40
40
  end
41
41
 
42
42
  homie = MQTT::Homie::Device.new(device_id, "PiGPIO", mqtt: ARGV[0])
@@ -56,6 +56,10 @@ PiGPIO.instance.gpios.each do |gpio|
56
56
  format: %w[up down off]) do |value|
57
57
  gpio.pull_up_down = value.to_sym
58
58
  end
59
+ node.property("invert-logic", "Invert Logic", :boolean, gpio.invert_logic) do |value|
60
+ gpio.invert_logic = value
61
+ node["level"] = gpio.level
62
+ end
59
63
  end
60
64
  end
61
65
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pigpiod
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Cutrer