Skip to content

Commit

Permalink
reset uart/tailcontrol status on device disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
Codel1417 committed Dec 21, 2024
1 parent 587467e commit ec618d0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Backend/Definitions/Device/device_definition.dart
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ class BaseStatefulDevice {

isTailCoNTROL.value = bluetoothUartService.value ==
uartServices.firstWhere(
(element) => element.bleDeviceService == "19f8ade2-d0c6-4c0a-912a-30601d9b3060",
(element) => element.bleDeviceService.toLowerCase() == "19f8ade2-d0c6-4c0a-912a-30601d9b3060",
)
? tailControlStatus.tailControl
: tailControlStatus.legacy;
Expand All @@ -260,6 +260,8 @@ class BaseStatefulDevice {
stopWatch.reset();
mtu.value = -1;
mandatoryOtaRequired.value = false;
isTailCoNTROL.value = tailControlStatus.unknown;
bluetoothUartService.value = null;
}
}

Expand Down

0 comments on commit ec618d0

Please sign in to comment.