GoproSetResponse.parse constructor

GoproSetResponse.parse(
  1. ByteData data_
)

Implementation

factory GoproSetResponse.parse(ByteData data_) {
  if (data_.lengthInBytes < GoproSetResponse.mavlinkEncodedLength) {
    var len = GoproSetResponse.mavlinkEncodedLength - data_.lengthInBytes;
    var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
    data_ = Uint8List.fromList(d).buffer.asByteData();
  }
  var cmdId = data_.getUint8(0);
  var status = data_.getUint8(1);

  return GoproSetResponse(cmdId: cmdId, status: status);
}