ActuatorOutputStatus.parse constructor

ActuatorOutputStatus.parse(
  1. ByteData data_
)

Implementation

factory ActuatorOutputStatus.parse(ByteData data_) {
  if (data_.lengthInBytes < ActuatorOutputStatus.mavlinkEncodedLength) {
    var len = ActuatorOutputStatus.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 active = data_.getUint32(8, Endian.little);
  var actuator = MavlinkMessage.asFloat32List(data_, 12, 32);

  return ActuatorOutputStatus(
      timeUsec: timeUsec, active: active, actuator: actuator);
}