|
|
@ -89,6 +89,7 @@ class NoviceGuideService extends GetxService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void startWakeupListen() { |
|
|
void startWakeupListen() { |
|
|
|
|
|
_bleService.setWakeup(false); |
|
|
_statusSubscription = _bleService.onStatusUpdated.listen((event) { |
|
|
_statusSubscription = _bleService.onStatusUpdated.listen((event) { |
|
|
if (event is Map && event['type'] == 'wakeup') { |
|
|
if (event is Map && event['type'] == 'wakeup') { |
|
|
isWakeup.value = true; |
|
|
isWakeup.value = true; |
|
|
@ -97,6 +98,7 @@ class NoviceGuideService extends GetxService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void closeWakeupListen() { |
|
|
void closeWakeupListen() { |
|
|
|
|
|
_bleService.setWakeup(true); |
|
|
_statusSubscription?.cancel(); |
|
|
_statusSubscription?.cancel(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|