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
파일 보기 프로젝트 열기: emlid/Navio-SDK-Windows-IoT

공개 메소드들

메소드 설명
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