GoproGetResponse.parse constructor
GoproGetResponse.parse(
- ByteData data_
Implementation
factory GoproGetResponse.parse(ByteData data_) {
if (data_.lengthInBytes < GoproGetResponse.mavlinkEncodedLength) {
var len = GoproGetResponse.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);
var value = MavlinkMessage.asUint8List(data_, 2, 4);
return GoproGetResponse(cmdId: cmdId, status: status, value: value);
}