WifiConfigAp.parse constructor

WifiConfigAp.parse(
  1. ByteData data_
)

Implementation

factory WifiConfigAp.parse(ByteData data_) {
  if (data_.lengthInBytes < WifiConfigAp.mavlinkEncodedLength) {
    var len = WifiConfigAp.mavlinkEncodedLength - data_.lengthInBytes;
    var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
    data_ = Uint8List.fromList(d).buffer.asByteData();
  }
  var ssid = MavlinkMessage.asInt8List(data_, 0, 32);
  var password = MavlinkMessage.asInt8List(data_, 32, 64);
  var mode = data_.getInt8(96);
  var response = data_.getInt8(97);

  return WifiConfigAp(
      ssid: ssid, password: password, mode: mode, response: response);
}