serialize method

  1. @override
ByteData serialize()
override

Implementation

@override
ByteData serialize() {
  var data_ = ByteData(mavlinkEncodedLength);
  data_.setUint64(0, timeUsec, Endian.little);
  MavlinkMessage.setFloat32List(data_, 8, attitudeQuaternion);
  data_.setFloat32(24, rollspeed, Endian.little);
  data_.setFloat32(28, pitchspeed, Endian.little);
  data_.setFloat32(32, yawspeed, Endian.little);
  data_.setInt32(36, lat, Endian.little);
  data_.setInt32(40, lon, Endian.little);
  data_.setInt32(44, alt, Endian.little);
  data_.setInt16(48, vx, Endian.little);
  data_.setInt16(50, vy, Endian.little);
  data_.setInt16(52, vz, Endian.little);
  data_.setUint16(54, indAirspeed, Endian.little);
  data_.setUint16(56, trueAirspeed, Endian.little);
  data_.setInt16(58, xacc, Endian.little);
  data_.setInt16(60, yacc, Endian.little);
  data_.setInt16(62, zacc, Endian.little);
  return data_;
}