-
Notifications
You must be signed in to change notification settings - Fork 31
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
Wait for finish to send end_print #12
base: main
Are you sure you want to change the base?
Conversation
Thanks, I'll try to find some time on the next week to finally fix this. The problem is that I only have a B21 at hand, and I'm afraid the modification you're suggesting can (for example) break D11/D110 instead. The only way I can be sure my code works is to buy every single one of niimbot printers 🥲 |
I have D110 so I can test this changes. «Be not afraid», yeah. |
Awesome! Did you test your PR on D110 already? |
Which one?… |
@Orhideous oh, sorry, I confused you with this PR author. Anyway, testing is appreciated :) |
niimprint/printer.py
Outdated
return { | ||
"finished": finished, | ||
"progress": progress, | ||
"error": error, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's made this strongly typed? Like, def get_print_status(self) -> Progress:
, and
@dataclass
class Progress:
finished: int # or whatever
…
Thanks for the fast response! If you don't have time for extensive testing you can also just c+p a few logs and I try to make sense of them! |
pyproject.toml
Outdated
@@ -1,6 +1,6 @@ | |||
[tool.poetry] | |||
name = "niimprint" | |||
version = "0.1.0" | |||
version = "0.1.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is the right place for bumping a version - that should probably be a separate commit with a GitHub release attached to it
Hey, thanks for all the feedback! sorry life happened, I'll fixup this PR on the weekend and try to have a look at #17 |
- Added basic error checking before attempting to print (Open paper compartment and busy) - Unpacking on get_print_status() now works. Tagged unknown values for the time being. - Added two unknown values to InfoEnum
Probably should have taken a better look at the open PRs before making mine. Looks like this PR address the problem I patched. @glaserL is there any update with this PR? |
No, unfortunately not. I know I promised an update weeks ago, next week should (seriously) work out, not sure if it'll be Monday. What printer do you have? I think we already have access to B21 and a D110 so we can make sure we don't break other printers. |
No issue, there isn't any rush. I have a B1, so I can help test compatibility. |
Same story... Can't get myself to sit down and fix all accumulated issues Anyway, I'm pretty sure that as-is, this PR will break D110 compatibility. @Orhideous if you're available, can you please test this? |
No worries, such is life. The utility still has been very useful for making custom stickers! I might have access to a D110, if @Orhideous isn't available I can see if I can get my hands on it to test on. |
Co-authored-by: azplanlos <[email protected]>
Good lord! Finally got around to it, sorry for the insane delay. |
First, thanks a lot for your work!
I recently bought a B21 and .. well, want to make it more complicated than simply installing an app!
I noticed the same behaviour as in #3 and realized increasing the sleep duration also helped.
Somehow I got the exception below, when calling get_print_status. Unsure if this is related to using usb? So I had to modify it a bit.
Right now it simply prints
Progress: VALUE
, if you want that changed or have it send to logger i can change that of course.Looking forward to your feedback!