SerialUdbExtraF20.parse constructor

SerialUdbExtraF20.parse(
  1. ByteData data_
)

Implementation

factory SerialUdbExtraF20.parse(ByteData data_) {
  if (data_.lengthInBytes < SerialUdbExtraF20.mavlinkEncodedLength) {
    var len = SerialUdbExtraF20.mavlinkEncodedLength - data_.lengthInBytes;
    var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
    data_ = Uint8List.fromList(d).buffer.asByteData();
  }
  var sueTrimValueInput1 = data_.getInt16(0, Endian.little);
  var sueTrimValueInput2 = data_.getInt16(2, Endian.little);
  var sueTrimValueInput3 = data_.getInt16(4, Endian.little);
  var sueTrimValueInput4 = data_.getInt16(6, Endian.little);
  var sueTrimValueInput5 = data_.getInt16(8, Endian.little);
  var sueTrimValueInput6 = data_.getInt16(10, Endian.little);
  var sueTrimValueInput7 = data_.getInt16(12, Endian.little);
  var sueTrimValueInput8 = data_.getInt16(14, Endian.little);
  var sueTrimValueInput9 = data_.getInt16(16, Endian.little);
  var sueTrimValueInput10 = data_.getInt16(18, Endian.little);
  var sueTrimValueInput11 = data_.getInt16(20, Endian.little);
  var sueTrimValueInput12 = data_.getInt16(22, Endian.little);
  var sueNumberOfInputs = data_.getUint8(24);

  return SerialUdbExtraF20(
      sueTrimValueInput1: sueTrimValueInput1,
      sueTrimValueInput2: sueTrimValueInput2,
      sueTrimValueInput3: sueTrimValueInput3,
      sueTrimValueInput4: sueTrimValueInput4,
      sueTrimValueInput5: sueTrimValueInput5,
      sueTrimValueInput6: sueTrimValueInput6,
      sueTrimValueInput7: sueTrimValueInput7,
      sueTrimValueInput8: sueTrimValueInput8,
      sueTrimValueInput9: sueTrimValueInput9,
      sueTrimValueInput10: sueTrimValueInput10,
      sueTrimValueInput11: sueTrimValueInput11,
      sueTrimValueInput12: sueTrimValueInput12,
      sueNumberOfInputs: sueNumberOfInputs);
}