/// <summary>
        /// Create mavlink connection with explicit system and component ids
        /// </summary>
        public MavlinkConnection(Mavlink mavlink, int srcSystemId, int srcComponentId)
        {
            _mavlink = mavlink;
            _srcSystemId = srcSystemId;
            _srcComponentId = srcComponentId;

            mavlink.PacketReceived += mavlinkNetwork_PacketReceived;
        }
 public void Setup()
 {
     _testStream = new TestStream();
     _dut = new Mavlink(_testStream);
     _dut.PacketReceived  += (sender, e) => _decodedPackets.Add(e);
     _decodedPackets = new List<MavlinkPacket>();
     _dut.Start();
 }
 public void SetUp()
 {
     failCrcEvents = new List<PacketCRCFailEventArgs>();
     unusedEvents=new List<PacketCRCFailEventArgs>();
     _dut = new Mavlink(null);
     _dut.BytesUnused += _dl_BytesUnused;
     _dut.PacketFailedCRC += _dl_PacketFailedCRC;
 }
Exemple #4
0
 protected void SetStream(Stream stream)
 {
     _stream = stream;
     _mavlink = new Mavlink(stream);
     _mavlink.PacketReceived += (s, e) => {  _latestPacket = e; };
 }
Exemple #5
0
 public void Setup()
 {
     _packetsRxed = new List<MavlinkPacket>();
     _testStream = new TestStream();
     _mav = new Mavlink(_testStream);
     _mav.PacketReceived += (sender, e) => _packetsRxed.Add(e);
     _mav.Start();
 }
Exemple #6
0
 public void Setup()
 {
     packetsRxed = new List<MavlinkPacket>();
     _mav = new Mavlink(null);
     _mav.PacketReceived += (sender, e) => packetsRxed.Add(e);
 }