CubepilotRawRc.parse constructor

CubepilotRawRc.parse(
  1. ByteData data_
)

Implementation

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

  return CubepilotRawRc(rcRaw: rcRaw);
}