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

add notification listener to disconnect once the printer is ready #77

Merged
merged 1 commit into from
Sep 21, 2024

Conversation

ashbork
Copy link
Contributor

@ashbork ashbork commented Sep 19, 2024

Instead of just waiting for 30s, we're listening for the printer's notifications. My testing suggests this is working well - I can run the script twice in a row without the hard-coded delay and the printer seems to have enough time to receive the next print instructions. I'm not 100% sure about the notification itself, but another project uses it for showing the print status and it looks like that's working out for them.

@ashbork ashbork changed the title add RX characteristic listener to disconnect once the printer is ready add notification listener to disconnect once the printer is ready Sep 19, 2024
@rbaron
Copy link
Owner

rbaron commented Sep 20, 2024

Thanks @ashbork, that looks great. I will give it a test later today.

@rbaron
Copy link
Owner

rbaron commented Sep 21, 2024

Thanks @ashbork!

@rbaron rbaron merged commit ea92b08 into rbaron:main Sep 21, 2024
2 checks passed
@rbaron
Copy link
Owner

rbaron commented Sep 21, 2024

@ashbork can I ask you on which platform did you test it? I think on macos it's hanging without receiving any events 😢

EDIT: I ended up adding support for both events + timeout in 2a4d0dc. Let me know if that still works for you 👌

@ashbork
Copy link
Contributor Author

ashbork commented Sep 28, 2024

Sorry for not responding, I was on vacation. Yep, the event is still going through for me! Thank you for that change, the timeout should've been there in the first place :D

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

Successfully merging this pull request may close these issues.

2 participants