diff --git a/lib/src/flutter_blue_plus.dart b/lib/src/flutter_blue_plus.dart index 5f7431f2..af2c77f8 100644 --- a/lib/src/flutter_blue_plus.dart +++ b/lib/src/flutter_blue_plus.dart @@ -788,13 +788,17 @@ class AdvertisementData { final Map> serviceData; // key: service guid final List serviceUuids; - /// raw manufacturer specific data + /// for convenience, raw msd data + /// * interprets the first two byte as raw data, + /// as opposed to a `manufacturerId` List> get msd { - List> out = []; - manufacturerData.forEach((key, value) { - out.add([key & 0xFF, (key >> 8) & 0xFF] + value); + List> output = []; + manufacturerData.forEach((manufacturerId, bytes) { + int low = manufacturerId & 0xFF; + int high = (manufacturerId >> 8) & 0xFF; + output.add([low, high] + bytes); }); - return out; + return output; } AdvertisementData({