CSharpRoboticsLib.WPIExtensions.EnhancedDigitalInput.Get C# (CSharp) Method

Get() public method

Get the value from the Enhanced Digital Input Channel
public Get ( ) : bool
return bool
        public override bool Get()
        {
            return base.Get() ^ Inverted;
        }

Usage Example

        public void EnhancedDigitalInvertedTest()
        {
            using (EnhancedDigitalInput e = new EnhancedDigitalInput(0))
            {
                e.Inverted = true;
                DIO[0].Value = true;
                Assert.IsFalse(e.Get());
                DIO[0].Value = false;
                Assert.IsTrue(e.Get());

                e.Inverted = false;
                DIO[0].Value = true;
                Assert.IsTrue(e.Get());
                DIO[0].Value = false;
                Assert.IsFalse(e.Get());
            }
        }
All Usage Examples Of CSharpRoboticsLib.WPIExtensions.EnhancedDigitalInput::Get