예제 #1
0
        void Firmata_DigitalStateReceived(object parSender, FirmataEventArgs <DigitalPortState> parEventArgs)
        {
            if (_port >= 0 && _port != parEventArgs.Value.Port)
            {
                return;
            }

            Observers.ForEach(o => o.OnNext(parEventArgs.Value));
        }
예제 #2
0
        void Firmata_AnalogStateReceived(object parSender, FirmataEventArgs <AnalogState> parEventArgs)
        {
            if (_channel >= 0 && _channel != parEventArgs.Value.Channel)
            {
                return;
            }

            Observers.ForEach(o => o.OnNext(parEventArgs.Value));
        }