private void SerialPortOnSwitch(object?sender, PinSwitchEventArgs e) { if (e.IsOn == _options.OnFrontSignal && e.PinType == _options.TrackingPin) { JettonPassed.Invoke(sender, EventArgs.Empty); } }
private async void OnReceive() { await Task.Delay(_delayBefore); JettonPassed.Invoke(this, EventArgs.Empty); }