attempt to fix windows ble issue

This commit is contained in:
Jonas Bark
2025-03-29 02:02:32 +01:00
parent 022df97b89
commit de8ef5f10b
2 changed files with 5 additions and 5 deletions

View File

@@ -83,7 +83,7 @@ abstract class BaseDevice {
);*/
if (!kIsWeb && Platform.isAndroid) {
await UniversalBle.requestMtu(device.deviceId, 256);
//await UniversalBle.requestMtu(device.deviceId, 256);
}
final services = await UniversalBle.discoverServices(device.deviceId);

View File

@@ -49,7 +49,7 @@ class ZwiftClick extends BaseDevice {
device.deviceId,
customService.uuid,
asyncCharacteristic.uuid,
BleInputProperty.indication,
BleInputProperty.notification,
);
await UniversalBle.setNotifiable(
device.deviceId,
@@ -63,7 +63,7 @@ class ZwiftClick extends BaseDevice {
Future<void> _setupHandshake(BleCharacteristic syncRxCharacteristic) async {
if (supportsEncryption) {
UniversalBle.writeValue(
await UniversalBle.writeValue(
device.deviceId,
customServiceId,
syncRxCharacteristic.uuid,
@@ -75,7 +75,7 @@ class ZwiftClick extends BaseDevice {
BleOutputProperty.withoutResponse,
);
} else {
UniversalBle.writeValue(
await UniversalBle.writeValue(
device.deviceId,
customServiceId,
syncRxCharacteristic.uuid,
@@ -86,7 +86,7 @@ class ZwiftClick extends BaseDevice {
}
void _processCharacteristic(String tag, Uint8List bytes) {
if (kDebugMode && false) {
if (kDebugMode) {
print('Received $tag: ${bytes.map((e) => e.toRadixString(16).padLeft(2, '0')).join(' ')}');
print('Received $tag: ${String.fromCharCodes(bytes)}');
}