void Firmata_DigitalStateReceived(object parSender, FirmataEventArgs <DigitalPortState> parEventArgs) { if (_port >= 0 && _port != parEventArgs.Value.Port) { return; } Observers.ForEach(o => o.OnNext(parEventArgs.Value)); }
void Firmata_AnalogStateReceived(object parSender, FirmataEventArgs <AnalogState> parEventArgs) { if (_channel >= 0 && _channel != parEventArgs.Value.Channel) { return; } Observers.ForEach(o => o.OnNext(parEventArgs.Value)); }