serialize method

  1. @override
ByteData serialize()
override

Implementation

@override
ByteData serialize() {
  var data_ = ByteData(mavlinkEncodedLength);
  data_.setUint64(0, timeUsec, Endian.little);
  data_.setFloat32(8, roll, Endian.little);
  data_.setFloat32(12, pitch, Endian.little);
  data_.setFloat32(16, yaw, Endian.little);
  data_.setFloat32(20, rollspeed, Endian.little);
  data_.setFloat32(24, pitchspeed, Endian.little);
  data_.setFloat32(28, yawspeed, Endian.little);
  data_.setInt32(32, lat, Endian.little);
  data_.setInt32(36, lon, Endian.little);
  data_.setInt32(40, alt, Endian.little);
  data_.setInt16(44, vx, Endian.little);
  data_.setInt16(46, vy, Endian.little);
  data_.setInt16(48, vz, Endian.little);
  data_.setInt16(50, xacc, Endian.little);
  data_.setInt16(52, yacc, Endian.little);
  data_.setInt16(54, zacc, Endian.little);
  return data_;
}