serialize method

  1. @override
ByteData serialize()
override

Implementation

@override
ByteData serialize() {
  var data_ = ByteData(mavlinkEncodedLength);
  data_.setUint32(0, timeUsec, Endian.little);
  data_.setUint16(4, servo1Raw, Endian.little);
  data_.setUint16(6, servo2Raw, Endian.little);
  data_.setUint16(8, servo3Raw, Endian.little);
  data_.setUint16(10, servo4Raw, Endian.little);
  data_.setUint16(12, servo5Raw, Endian.little);
  data_.setUint16(14, servo6Raw, Endian.little);
  data_.setUint16(16, servo7Raw, Endian.little);
  data_.setUint16(18, servo8Raw, Endian.little);
  data_.setUint8(20, port);
  data_.setUint16(21, servo9Raw, Endian.little);
  data_.setUint16(23, servo10Raw, Endian.little);
  data_.setUint16(25, servo11Raw, Endian.little);
  data_.setUint16(27, servo12Raw, Endian.little);
  data_.setUint16(29, servo13Raw, Endian.little);
  data_.setUint16(31, servo14Raw, Endian.little);
  data_.setUint16(33, servo15Raw, Endian.little);
  data_.setUint16(35, servo16Raw, Endian.little);
  return data_;
}