serialize method

  1. @override
ByteData serialize()
override

Implementation

@override
ByteData serialize() {
  var data_ = ByteData(mavlinkEncodedLength);
  data_.setUint64(0, timeUsec, Endian.little);
  data_.setFloat32(8, xacc, Endian.little);
  data_.setFloat32(12, yacc, Endian.little);
  data_.setFloat32(16, zacc, Endian.little);
  data_.setFloat32(20, xgyro, Endian.little);
  data_.setFloat32(24, ygyro, Endian.little);
  data_.setFloat32(28, zgyro, Endian.little);
  data_.setFloat32(32, xmag, Endian.little);
  data_.setFloat32(36, ymag, Endian.little);
  data_.setFloat32(40, zmag, Endian.little);
  data_.setFloat32(44, absPressure, Endian.little);
  data_.setFloat32(48, diffPressure, Endian.little);
  data_.setFloat32(52, pressureAlt, Endian.little);
  data_.setFloat32(56, temperature, Endian.little);
  data_.setUint32(60, fieldsUpdated, Endian.little);
  data_.setUint8(64, id);
  return data_;
}