summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruvok2026-05-03 15:55:08 +0200
committeruvok2026-05-03 15:55:08 +0200
commit098dcbbfac422d6888d277cd0bc0f4b0d28dd9d1 (patch)
tree2f8e1b588e82a3b5674c1bb22f530e0433dcc440
parentfe5d86f92a34ad03a038d729561e9e9884bf5322 (diff)
Update UniversalBle
-rw-r--r--lib/model/motive_selection/universal_blue_motive_selection.dart12
-rw-r--r--pubspec.lock4
-rw-r--r--pubspec.yaml2
3 files changed, 12 insertions, 6 deletions
diff --git a/lib/model/motive_selection/universal_blue_motive_selection.dart b/lib/model/motive_selection/universal_blue_motive_selection.dart
index 084541a..e523d91 100644
--- a/lib/model/motive_selection/universal_blue_motive_selection.dart
+++ b/lib/model/motive_selection/universal_blue_motive_selection.dart
@@ -21,6 +21,9 @@ import 'package:uvok_epaper_badge/badge_exception.dart';
import 'package:uvok_epaper_badge/model/badge_motive.dart';
import 'package:uvok_epaper_badge/model/device/universal_ble_device.dart';
import 'package:uvok_epaper_badge/model/motive_selection/badge_motive_selection.dart';
+import 'package:uvok_epaper_badge/log.dart';
+
+var logger = fileLogger();
class UniversalBlueMotiveSelection
with BadgeParser
@@ -65,7 +68,8 @@ class UniversalBlueMotiveSelection
(bm) => bm.id == currentMotive,
orElse: () => throw BadgeException("Selected motive not in templates"),
);
- } on NotFoundException {
+ } on UniversalBleException catch (e) {
+ logger.e(e.toString());
throw BadgeException("Characeristic/Service not found.");
}
}
@@ -81,7 +85,8 @@ class UniversalBlueMotiveSelection
);
var val = await c.read();
_cachedMotives = parseBadgeMotives(val);
- } on NotFoundException {
+ } on UniversalBleException catch (e) {
+ logger.e(e.toString());
throw BadgeException("Characeristic/Service not found.");
}
@@ -104,7 +109,8 @@ class UniversalBlueMotiveSelection
);
await c.write(ascii.encode(motive.id.toString()), withResponse: true);
- } on NotFoundException {
+ } on UniversalBleException catch (e) {
+ logger.e(e.toString());
throw BadgeException("Characeristic/Service not found.");
}
}
diff --git a/pubspec.lock b/pubspec.lock
index 81a8149..78bcc9d 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -377,10 +377,10 @@ packages:
dependency: "direct main"
description:
name: universal_ble
- sha256: "6a5c6c1fb295015934a5aef3dc751ae7e00721535275f8478bfe74db77b238c5"
+ sha256: "8325ca9f5cce2fba2b4efef74a4fcfe7144f303b409d6fc6ed16197b00a1a241"
url: "https://pub.dev"
source: hosted
- version: "0.21.1"
+ version: "1.2.0"
vector_math:
dependency: transitive
description:
diff --git a/pubspec.yaml b/pubspec.yaml
index 75a8033..2d8e40b 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -38,7 +38,7 @@ dependencies:
permission_handler: ^12.0.1
logger: ^2.6.1
meta: ^1.16.0
- universal_ble: ^0.21.0
+ universal_ble: ^1.2.0
rxdart: ^0.28.0
dev_dependencies: