Data32.parse constructor

Data32.parse(
  1. ByteData data_
)

Implementation

factory Data32.parse(ByteData data_) {
  if (data_.lengthInBytes < Data32.mavlinkEncodedLength) {
    var len = Data32.mavlinkEncodedLength - data_.lengthInBytes;
    var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
    data_ = Uint8List.fromList(d).buffer.asByteData();
  }
  var type = data_.getUint8(0);
  var len = data_.getUint8(1);
  var data = MavlinkMessage.asUint8List(data_, 2, 32);

  return Data32(type: type, len: len, data: data);
}