serialize method

  1. @override
ByteData serialize()
override

Implementation

@override
ByteData serialize() {
  var data_ = ByteData(mavlinkEncodedLength);
  data_.setUint64(0, timeUsec, Endian.little);
  data_.setFloat32(8, angleX, Endian.little);
  data_.setFloat32(12, angleY, Endian.little);
  data_.setFloat32(16, distance, Endian.little);
  data_.setFloat32(20, sizeX, Endian.little);
  data_.setFloat32(24, sizeY, Endian.little);
  data_.setUint8(28, targetNum);
  data_.setUint8(29, frame);
  data_.setFloat32(30, x, Endian.little);
  data_.setFloat32(34, y, Endian.little);
  data_.setFloat32(38, z, Endian.little);
  MavlinkMessage.setFloat32List(data_, 42, q);
  data_.setUint8(58, type);
  data_.setUint8(59, positionValid);
  return data_;
}