serialize method

  1. @override
ByteData serialize()
override

Implementation

@override
ByteData serialize() {
  var data_ = ByteData(mavlinkEncodedLength);
  data_.setFloat32(0, roll, Endian.little);
  data_.setFloat32(4, pitch, Endian.little);
  data_.setFloat32(8, yaw, Endian.little);
  data_.setFloat32(12, xacc, Endian.little);
  data_.setFloat32(16, yacc, Endian.little);
  data_.setFloat32(20, zacc, Endian.little);
  data_.setFloat32(24, xgyro, Endian.little);
  data_.setFloat32(28, ygyro, Endian.little);
  data_.setFloat32(32, zgyro, Endian.little);
  data_.setInt32(36, lat, Endian.little);
  data_.setInt32(40, lng, Endian.little);
  return data_;
}