修复蓝牙缓存问题 (#43)

This commit is contained in:
iAMD
2024-01-19 13:43:01 +08:00
committed by GitHub
parent 921dc0fa88
commit 63bbc1a732
7 changed files with 19 additions and 11 deletions

View File

@ -1,3 +1,7 @@
## 5.0.5
* `Windows` Fix the [`CentralManager#discoverGATT`, `CentralManager#readCharacteristic` and `CentralManager#readDescriptor` issue](https://github.com/yanshouwang/bluetooth_low_energy/issues/42) caused by cache mode.
## 5.0.4 ## 5.0.4
* `iOS` Fix issues caused by CoW. * `iOS` Fix issues caused by CoW.

View File

@ -23,7 +23,7 @@ packages:
path: ".." path: ".."
relative: true relative: true
source: path source: path
version: "5.0.4" version: "5.0.5"
bluetooth_low_energy_android: bluetooth_low_energy_android:
dependency: transitive dependency: transitive
description: description:
@ -60,10 +60,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: bluetooth_low_energy_windows name: bluetooth_low_energy_windows
sha256: "1a4382a1c3d480a35b4de5b7065b00e739cf44129108006c2a3ed8f3ca99fd3d" sha256: e2b812e00ff808feb5dca9404a5310f21fceecd2656f0a2d51f0bbeb9e8b258b
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "5.0.0" version: "5.0.1"
bluez: bluez:
dependency: transitive dependency: transitive
description: description:

View File

@ -1,6 +1,6 @@
name: bluetooth_low_energy name: bluetooth_low_energy
description: A Flutter plugin for controlling the bluetooth low energy, supports central and peripheral apis. description: A Flutter plugin for controlling the bluetooth low energy, supports central and peripheral apis.
version: 5.0.4 version: 5.0.5
homepage: https://github.com/yanshouwang/bluetooth_low_energy homepage: https://github.com/yanshouwang/bluetooth_low_energy
environment: environment:
@ -13,7 +13,7 @@ dependencies:
bluetooth_low_energy_platform_interface: ^5.0.0 bluetooth_low_energy_platform_interface: ^5.0.0
bluetooth_low_energy_android: ^5.0.2 bluetooth_low_energy_android: ^5.0.2
bluetooth_low_energy_darwin: ^5.0.3 bluetooth_low_energy_darwin: ^5.0.3
bluetooth_low_energy_windows: ^5.0.0 bluetooth_low_energy_windows: ^5.0.1
bluetooth_low_energy_linux: ^5.0.0 bluetooth_low_energy_linux: ^5.0.0
dev_dependencies: dev_dependencies:

View File

@ -1,3 +1,7 @@
## 5.0.1
* Fix the [`CentralManager#discoverGATT`, `CentralManager#readCharacteristic` and `CentralManager#readDescriptor` issue](https://github.com/yanshouwang/bluetooth_low_energy/issues/42) caused by cache mode.
## 5.0.0 ## 5.0.0
* Add implementation of `CentralManagerApi`. * Add implementation of `CentralManagerApi`.

View File

@ -23,7 +23,7 @@ packages:
path: ".." path: ".."
relative: true relative: true
source: path source: path
version: "5.0.0" version: "5.0.1"
boolean_selector: boolean_selector:
dependency: transitive dependency: transitive
description: description:

View File

@ -1,6 +1,6 @@
name: bluetooth_low_energy_windows name: bluetooth_low_energy_windows
description: Windows implementation of the bluetooth_low_energy plugin. description: Windows implementation of the bluetooth_low_energy plugin.
version: 5.0.0 version: 5.0.1
homepage: https://github.com/yanshouwang/bluetooth_low_energy homepage: https://github.com/yanshouwang/bluetooth_low_energy
environment: environment:

View File

@ -280,7 +280,7 @@ namespace bluetooth_low_energy_windows
try try
{ {
const auto& service = m_retrieve_service(address_args, handle_args); const auto& service = m_retrieve_service(address_args, handle_args);
const auto& r = co_await service->GetCharacteristicsAsync(); const auto& r = co_await service->GetCharacteristicsAsync(winrt::Windows::Devices::Bluetooth::BluetoothCacheMode::Uncached);
const auto status = r.Status(); const auto status = r.Status();
if (status != winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattCommunicationStatus::Success) if (status != winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattCommunicationStatus::Success)
{ {
@ -345,7 +345,7 @@ namespace bluetooth_low_energy_windows
try try
{ {
const auto& characteristic = m_retrieve_characteristic(address_args, handle_args); const auto& characteristic = m_retrieve_characteristic(address_args, handle_args);
const auto& r = co_await characteristic->GetDescriptorsAsync(); const auto& r = co_await characteristic->GetDescriptorsAsync(winrt::Windows::Devices::Bluetooth::BluetoothCacheMode::Uncached);
const auto status = r.Status(); const auto status = r.Status();
if (status != winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattCommunicationStatus::Success) if (status != winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattCommunicationStatus::Success)
{ {
@ -399,7 +399,7 @@ namespace bluetooth_low_energy_windows
try try
{ {
const auto& characteristic = m_retrieve_characteristic(address_args, handle_args); const auto& characteristic = m_retrieve_characteristic(address_args, handle_args);
const auto& r = co_await characteristic->ReadValueAsync(); const auto& r = co_await characteristic->ReadValueAsync(winrt::Windows::Devices::Bluetooth::BluetoothCacheMode::Uncached);
const auto status = r.Status(); const auto status = r.Status();
if (status != winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattCommunicationStatus::Success) if (status != winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattCommunicationStatus::Success)
{ {
@ -515,7 +515,7 @@ namespace bluetooth_low_energy_windows
try try
{ {
const auto& descriptor = m_retrieve_descriptor(address_args, handle_args); const auto& descriptor = m_retrieve_descriptor(address_args, handle_args);
const auto& r = co_await descriptor->ReadValueAsync(); const auto& r = co_await descriptor->ReadValueAsync(winrt::Windows::Devices::Bluetooth::BluetoothCacheMode::Uncached);
const auto status = r.Status(); const auto status = r.Status();
if (status != winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattCommunicationStatus::Success) if (status != winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattCommunicationStatus::Success)
{ {