more G-Labs products

Author Topic: Invert Inputs?  (Read 1298 times)

November 22, 2015, 02:44:24 PM
Read 1298 times

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
At the moment due to the way I have done my wiring, I am using internal pull ups, so by default the inputs show as 1. however I would like to flip them

Does the code support inverting inputs? I have had a quick look and tried it, but I'm due to go out shortly and doesn't seem to work, so thought i would ask first!

So as per above is this supported?, if not I will make the necessary changes and share it.

David

November 22, 2015, 02:58:27 PM
Reply #1

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
Ok, so she's not quite ready, so spent a little more time, looks like the code only reverses the Outputs, so I have added the following at line 32:

Code: [Select]
((InputPinConfiguration)configuration[p]).Reversed = pc.Reversed;
I'll let you know how this works once it gets dark :) ( Outdoor PIR's)

November 22, 2015, 03:04:14 PM
Reply #2

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
Just realised that I had wired two other GPIO's to open collector outputs on the alarm expander (Texecom 8XP) and have just configured them as PC controlled, so tested this using Wintex and the reversing of the input code works fine.

So I would suggest its added to a future release :)