Skip to content

Commit

Permalink
fix sensor msg type
Browse files Browse the repository at this point in the history
  • Loading branch information
Codel1417 committed Apr 15, 2024
1 parent 658b9ed commit 5868605
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/Backend/sensors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ class CoverTriggerDefinition extends TriggerDefinition {
}

class EarMicTriggerDefinition extends TriggerDefinition {
List<StreamSubscription<List<int>>?> rxSubscriptions = [];
List<StreamSubscription<String>?> rxSubscriptions = [];
ProviderSubscription<Map<String, BaseStatefulDevice>>? deviceRefSubscription;

EarMicTriggerDefinition(super.ref) {
Expand Down Expand Up @@ -318,8 +318,7 @@ class EarMicTriggerDefinition extends TriggerDefinition {
(element) {
element.commandQueue.addCommand(BluetoothMessage(message: "LISTEN FULL", device: element, priority: Priority.low, type: Type.system));
return element.rxCharacteristicStream?.listen(
(event) {
String msg = const Utf8Decoder().convert(event);
(msg) {
if (msg.contains("LISTEN_FULL BANG")) {
// we don't store the actions in class as multiple Triggers can exist, so go get them. This is only necessary when the action is dependent on gear being available
sendCommands("Sound", ref);
Expand Down

0 comments on commit 5868605

Please sign in to comment.