feat: update optimizations
This commit is contained in:
@ -363,6 +363,27 @@ class BluetoothController {
|
||||
}
|
||||
}
|
||||
|
||||
Future<Result<void>> requestHighPerformanceConnection(
|
||||
String deviceId,
|
||||
) async {
|
||||
if (defaultTargetPlatform != TargetPlatform.android) {
|
||||
return Ok(null);
|
||||
}
|
||||
|
||||
try {
|
||||
await _ble.requestConnectionPriority(
|
||||
deviceId: deviceId,
|
||||
priority: ConnectionPriority.highPerformance,
|
||||
);
|
||||
log.info('High-performance BLE connection requested for $deviceId');
|
||||
return Ok(null);
|
||||
} catch (e) {
|
||||
return bail(
|
||||
'Error requesting high-performance BLE connection for $deviceId: $e',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Future<Result<void>> _requestInitialMtu(String deviceId) async {
|
||||
if (defaultTargetPlatform != TargetPlatform.android) {
|
||||
return Ok(null);
|
||||
|
||||
Reference in New Issue
Block a user