serialize method

  1. @override
ByteData serialize()
override

Implementation

@override
ByteData serialize() {
  var data_ = ByteData(mavlinkEncodedLength);
  data_.setUint32(0, onboardControlSensorsPresent, Endian.little);
  data_.setUint32(4, onboardControlSensorsEnabled, Endian.little);
  data_.setUint32(8, onboardControlSensorsHealth, Endian.little);
  data_.setUint16(12, load, Endian.little);
  data_.setUint16(14, voltageBattery, Endian.little);
  data_.setInt16(16, currentBattery, Endian.little);
  data_.setUint16(18, dropRateComm, Endian.little);
  data_.setUint16(20, errorsComm, Endian.little);
  data_.setUint16(22, errorsCount1, Endian.little);
  data_.setUint16(24, errorsCount2, Endian.little);
  data_.setUint16(26, errorsCount3, Endian.little);
  data_.setUint16(28, errorsCount4, Endian.little);
  data_.setInt8(30, batteryRemaining);
  data_.setUint32(31, onboardControlSensorsPresentExtended, Endian.little);
  data_.setUint32(35, onboardControlSensorsEnabledExtended, Endian.little);
  data_.setUint32(39, onboardControlSensorsHealthExtended, Endian.little);
  return data_;
}