Esempio n. 1
0
        private static void SetFilter(IDigitalSource input, int channelIndex)
        {
            if (input != null)
            {
                if (input.IsAnalogTrigger)
                {
                    throw new InvalidOperationException("Analog Triggers not supported for DigitalGlitchFilters");
                }
                Hal.DIOLowLevel.SetFilterSelect(input.PortHandleForRouting, channelIndex);

                int selected = DIOLowLevel.GetFilterSelect(input.PortHandleForRouting);
                if (selected != channelIndex)
                {
                    throw new InvalidOperationException($"SetFilterSelect {channelIndex} failed -> {selected}");
                }
            }
        }
Esempio n. 2
0
 public void SetPeriodCycles(long fpgaCycles)
 {
     Console.WriteLine(fpgaCycles);
     DIOLowLevel.SetFilterPeriod(m_channelIndex, fpgaCycles);
 }