Skip to content

Commit

Permalink
OTA Screen changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Codel1417 committed May 29, 2024
1 parent 3fa0087 commit 9eaf1a9
Show file tree
Hide file tree
Showing 7 changed files with 215 additions and 149 deletions.
7 changes: 4 additions & 3 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
id "io.sentry.android.gradle" version "4.6.0"
id "io.sentry.android.gradle"
}

def localProperties = new Properties()
Expand Down Expand Up @@ -93,7 +93,9 @@ dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'

}

sentry {
ignoredBuildTypes = ["debug"]
// Disables or enables debug log output, e.g. for for sentry-cli.
// Default is disabled.
debug = false
Expand Down Expand Up @@ -167,5 +169,4 @@ sentry {
autoInstallation {
enabled = false
}

}
}
2 changes: 1 addition & 1 deletion android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version '8.4.1' apply false
id "org.jetbrains.kotlin.android" version "2.0.0" apply false
id("com.google.gms.google-services") version "4.4.1" apply false
id "io.sentry.android.gradle" version "4.6.0" apply false
}

include ":app"
Expand Down
12 changes: 10 additions & 2 deletions lib/Backend/Bluetooth/bluetooth_manager_plus.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Future<void> initFlutterBluePlus(InitFlutterBluePlusRef ref) async {
}
_didInitFlutterBluePlus = true;

await FlutterBluePlus.setLogLevel(LogLevel.warning, color: false);
await FlutterBluePlus.setLogLevel(LogLevel.warning, color: true);
// first, check if bluetooth is supported by your hardware
// Note: The platform is initialized on the first call to any FlutterBluePlus method.
if (await FlutterBluePlus.isSupported == false) {
Expand Down Expand Up @@ -365,6 +365,14 @@ Future<void> sendMessage(BaseStatefulDevice device, List<int> message, {bool wit
if (bluetoothDevice != null) {
BluetoothCharacteristic? bluetoothCharacteristic =
bluetoothDevice.servicesList.firstWhereOrNull((element) => element.uuid == Guid(device.baseDeviceDefinition.bleDeviceService))?.characteristics.firstWhereOrNull((element) => element.characteristicUuid == Guid(device.baseDeviceDefinition.bleTxCharacteristic));
await bluetoothCharacteristic?.write(message, withoutResponse: withoutResponse && bluetoothCharacteristic.properties.writeWithoutResponse);
if (bluetoothCharacteristic == null) {
return;
}

Future<void> future = bluetoothCharacteristic.write(message, withoutResponse: withoutResponse && bluetoothCharacteristic.properties.writeWithoutResponse);
future.catchError((e) {
_bluetoothPlusLogger.severe("Unable to send message to ${device.baseDeviceDefinition.btName} $e", e);
});
await future;
}
}
Loading

0 comments on commit 9eaf1a9

Please sign in to comment.