serialize method

  1. @override
ByteData serialize()
override

Implementation

@override
ByteData serialize() {
  var data_ = ByteData(mavlinkEncodedLength);
  data_.setUint64(0, timeUtc, Endian.little);
  data_.setUint32(8, timeBootMs, Endian.little);
  data_.setInt32(12, lat, Endian.little);
  data_.setInt32(16, lon, Endian.little);
  data_.setInt32(20, alt, Endian.little);
  data_.setInt32(24, relativeAlt, Endian.little);
  MavlinkMessage.setFloat32List(data_, 28, q);
  data_.setInt32(44, imageIndex, Endian.little);
  data_.setUint8(48, cameraId);
  data_.setInt8(49, captureResult);
  MavlinkMessage.setInt8List(data_, 50, fileUrl);
  return data_;
}