Пример #1
0
        public void ResponsePackageRecieved(byte responsePackage)
        {
            bool belongsToPin = ArduinoPinUtilities.ResponsePackageBelongsToPin(pinNumber, responsePackage);

            if (belongsToPin)
            {
                // Stop listening for a response package. Read the pin state and send it out to the listeners.
                toggleListeningForResponePackageEventHandler((IPinMapping)this, false);
                int         state    = ArduinoPinUtilities.ReadPinState(responsePackage);
                PinFeedback feedback = new PinFeedback(pinNumber, state);
                if (FeedbackEvent != null)
                {
                    FeedbackEvent(feedback);
                }
            }
        }
Пример #2
0
 private void PinFeedbackRecievedEventHandler(PinFeedback feedback)
 {
     // RBakerFlag -> Do something.
 }
Пример #3
0
 private void PinFeedbackRecievedEventHandler(PinFeedback feedback)
 {
     // RBakerFlag -> Do something.
 }
Пример #4
0
 private void ResponsePackageRecieved(PinFeedback feedback)
 {
     SetDisplay(feedback.PinState);
 }
Пример #5
0
        public void ResponsePackageRecieved(byte responsePackage)
        {
            bool belongsToPin = ArduinoPinUtilities.ResponsePackageBelongsToPin(pinNumber, responsePackage);

            if (belongsToPin)
            {
                // Stop listening for a response package. Read the pin state and send it out to the listeners.
                toggleListeningForResponePackageEventHandler((IPinMapping)this, false);
                int state = ArduinoPinUtilities.ReadPinState(responsePackage);
                PinFeedback feedback = new PinFeedback(pinNumber, state);
                if (FeedbackEvent != null) FeedbackEvent(feedback);
            }
        }