DigicamControl.parse constructor
DigicamControl.parse(
- ByteData data_
Implementation
factory DigicamControl.parse(ByteData data_) {
if (data_.lengthInBytes < DigicamControl.mavlinkEncodedLength) {
var len = DigicamControl.mavlinkEncodedLength - data_.lengthInBytes;
var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
data_ = Uint8List.fromList(d).buffer.asByteData();
}
var extraValue = data_.getFloat32(0, Endian.little);
var targetSystem = data_.getUint8(4);
var targetComponent = data_.getUint8(5);
var session = data_.getUint8(6);
var zoomPos = data_.getUint8(7);
var zoomStep = data_.getInt8(8);
var focusLock = data_.getUint8(9);
var shot = data_.getUint8(10);
var commandId = data_.getUint8(11);
var extraParam = data_.getUint8(12);
return DigicamControl(
extraValue: extraValue,
targetSystem: targetSystem,
targetComponent: targetComponent,
session: session,
zoomPos: zoomPos,
zoomStep: zoomStep,
focusLock: focusLock,
shot: shot,
commandId: commandId,
extraParam: extraParam);
}