ActuatorControlTarget.parse constructor

ActuatorControlTarget.parse(
  1. ByteData data_
)

Implementation

factory ActuatorControlTarget.parse(ByteData data_) {
  if (data_.lengthInBytes < ActuatorControlTarget.mavlinkEncodedLength) {
    var len =
        ActuatorControlTarget.mavlinkEncodedLength - data_.lengthInBytes;
    var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
    data_ = Uint8List.fromList(d).buffer.asByteData();
  }
  var timeUsec = data_.getUint64(0, Endian.little);
  var controls = MavlinkMessage.asFloat32List(data_, 8, 8);
  var groupMlx = data_.getUint8(40);

  return ActuatorControlTarget(
      timeUsec: timeUsec, controls: controls, groupMlx: groupMlx);
}