summaryrefslogtreecommitdiff
path: root/lib/model/motive_selection/universal_blue_motive_selection.dart
diff options
context:
space:
mode:
Diffstat (limited to 'lib/model/motive_selection/universal_blue_motive_selection.dart')
-rw-r--r--lib/model/motive_selection/universal_blue_motive_selection.dart4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/model/motive_selection/universal_blue_motive_selection.dart b/lib/model/motive_selection/universal_blue_motive_selection.dart
index 43b717e..607d429 100644
--- a/lib/model/motive_selection/universal_blue_motive_selection.dart
+++ b/lib/model/motive_selection/universal_blue_motive_selection.dart
@@ -14,7 +14,6 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
import 'dart:convert';
-import 'dart:io';
import 'package:universal_ble/universal_ble.dart';
import 'package:uvok_epaper_badge/string_ext.dart';
@@ -54,6 +53,7 @@ class UniversalBlueMotiveSelection implements BadgeMotiveSelection {
_currentMotiveCharacteristic,
service: _badgeService,
);
+
var val = await c.read();
int? currentMotive = int.tryParse(ascii.decode(val));
if (currentMotive == null) {
@@ -112,7 +112,7 @@ class UniversalBlueMotiveSelection implements BadgeMotiveSelection {
service: _badgeService,
);
- await c.write(ascii.encode(motive.id.toString()), withResponse: false);
+ await c.write(ascii.encode(motive.id.toString()), withResponse: true);
} on NotFoundException {
throw BadgeException("Characeristic/Service not found.");
}