serialize method

  1. @override
ByteData serialize()
override

Implementation

@override
ByteData serialize() {
  var data_ = ByteData(mavlinkEncodedLength);
  data_.setFloat32(0, fitness, Endian.little);
  data_.setFloat32(4, ofsX, Endian.little);
  data_.setFloat32(8, ofsY, Endian.little);
  data_.setFloat32(12, ofsZ, Endian.little);
  data_.setFloat32(16, diagX, Endian.little);
  data_.setFloat32(20, diagY, Endian.little);
  data_.setFloat32(24, diagZ, Endian.little);
  data_.setFloat32(28, offdiagX, Endian.little);
  data_.setFloat32(32, offdiagY, Endian.little);
  data_.setFloat32(36, offdiagZ, Endian.little);
  data_.setUint8(40, compassId);
  data_.setUint8(41, calMask);
  data_.setUint8(42, calStatus);
  data_.setUint8(43, autosaved);
  data_.setFloat32(44, orientationConfidence, Endian.little);
  data_.setUint8(48, oldOrientation);
  data_.setUint8(49, newOrientation);
  data_.setFloat32(50, scaleFactor, Endian.little);
  return data_;
}