C# Класс Emlid.WindowsIot.Hardware.Protocols.Pwm.CppmDecoder

PWM decoder for the CPPM protocol.

A complete CPPM frame is about 22.5 ms (can vary between manufacturer). Signal low state is about 0.3 ms but sometimes a bit longer (PwmLowLimit). It begins with a start pulse (state high for more than 2 ms PwmSyncLengthMinium). Each channel (up to 8) is encoded by the time of the high state (CPPM high state + 0.3 x (PPM low state) = servo PWM pulse width).

See https://en.wikipedia.org/wiki/Pulse-position_modulation for more information.
Наследование: IPwmDecoder
Показать файл Открыть проект

Открытые методы

Метод Описание
DecodePulse ( ConcurrentQueue inputBuffer, AutoResetEvent inputTrigger, ConcurrentQueue outputBuffer, AutoResetEvent outputTrigger, CancellationToken stop ) : void

Runs the decoder thread.

Приватные методы

Метод Описание
DecodeCycle ( PwmCycle cycle ) : PwmFrame

Decodes the incoming PWM signal (each complete cycle) using the CPPM protocol.

Описание методов

DecodePulse() публичный Метод

Runs the decoder thread.
public DecodePulse ( ConcurrentQueue inputBuffer, AutoResetEvent inputTrigger, ConcurrentQueue outputBuffer, AutoResetEvent outputTrigger, CancellationToken stop ) : void
inputBuffer ConcurrentQueue Buffer from which new PWM values are read.
inputTrigger System.Threading.AutoResetEvent Trigger which is fired by the caller when new data arrives.
outputBuffer ConcurrentQueue Buffer into which decoded PWM frames are written.
outputTrigger System.Threading.AutoResetEvent Trigger which is fired by this decoder when new data has been decoded.
stop System.Threading.CancellationToken Signals when the decoder should stop.
Результат void