PlayTuneV2.parse constructor
PlayTuneV2.parse(
- ByteData data_
Implementation
factory PlayTuneV2.parse(ByteData data_) {
if (data_.lengthInBytes < PlayTuneV2.mavlinkEncodedLength) {
var len = PlayTuneV2.mavlinkEncodedLength - data_.lengthInBytes;
var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
data_ = Uint8List.fromList(d).buffer.asByteData();
}
var format = data_.getUint32(0, Endian.little);
var targetSystem = data_.getUint8(4);
var targetComponent = data_.getUint8(5);
var tune = MavlinkMessage.asInt8List(data_, 6, 248);
return PlayTuneV2(
format: format,
targetSystem: targetSystem,
targetComponent: targetComponent,
tune: tune);
}