public override void Send() { using (var data = new MemoryStream()) { data.WriteByte((byte)CommandIds.Home); data.Write(BitConverter.GetBytes(AziB), 0, 4); data.Write(BitConverter.GetBytes(AltB), 0, 4); data.Write(BitConverter.GetBytes(UInt16.MinValue), 0, 2); data.Write(BitConverter.GetBytes(UInt16.MinValue), 0, 2); data.Write(BitConverter.GetBytes(UInt16.MinValue), 0, 2); data.Write(BitConverter.GetBytes(UInt16.MinValue), 0, 2); data.Write(BitConverter.GetBytes(UInt16.MinValue), 0, 2); data.Write(BitConverter.GetBytes(UInt16.MinValue), 0, 2); data.Write(BitConverter.GetBytes(UInt16.MinValue), 0, 2); byte crc = _checkSummer.Calculate(data.ToArray()); data.WriteByte(crc); _sender.Send("Home", data.ToArray()); } }
public override void Send() { using (var data = new MemoryStream()) { data.WriteByte((byte)CommandIds.Goto); data.Write(BitConverter.GetBytes(AziB), 0, 4); data.Write(BitConverter.GetBytes(AltB), 0, 4); data.Write(BitConverter.GetBytes(AziS), 0, 2); data.Write(BitConverter.GetBytes(AltS), 0, 2); data.Write(BitConverter.GetBytes(AziA), 0, 2); data.Write(BitConverter.GetBytes(AltA), 0, 2); data.Write(BitConverter.GetBytes(AziD), 0, 2); data.Write(BitConverter.GetBytes(AziS), 0, 2); data.Write(BitConverter.GetBytes(AltD), 0, 2); byte crc = _checkSummer.Calculate(data.ToArray()); data.WriteByte(crc); _sender.Send("Goto", data.ToArray()); } }