Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False updates on status stream #169

Open
Rohan-raftlabs opened this issue Sep 14, 2023 · 0 comments
Open

False updates on status stream #169

Rohan-raftlabs opened this issue Sep 14, 2023 · 0 comments

Comments

@Rohan-raftlabs
Copy link

i get ghost updates on the bluetoothprint.state status stream , even though the printer is connected i get the status 0 i.e. disconnected update for a few seconds only to set back to connected a few seconds later

bluetoothStatusStream = bluetoothPrint.state.listen((state) async {

  switch (state) {
    case BluetoothPrint.CONNECTED:
      // i treat this state as connected
      break;
    case BluetoothPrint.DISCONNECTED:
      // i treat this state as disconnected
      break;
    case 12: 
     // wierdly this fires whenever bluetooth radio is turned on
      break;
    case 10:
    // fires when  bluetooth radio is turned  off
    default:
      break;
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant