PowerStatus.parse constructor
PowerStatus.parse(
- ByteData data_
Implementation
factory PowerStatus.parse(ByteData data_) {
if (data_.lengthInBytes < PowerStatus.mavlinkEncodedLength) {
var len = PowerStatus.mavlinkEncodedLength - data_.lengthInBytes;
var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
data_ = Uint8List.fromList(d).buffer.asByteData();
}
var vcc = data_.getUint16(0, Endian.little);
var vservo = data_.getUint16(2, Endian.little);
var flags = data_.getUint16(4, Endian.little);
return PowerStatus(vcc: vcc, vservo: vservo, flags: flags);
}