niimprint
niimprint copied to clipboard
Wait for finish to send end_print
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.
/niimprint/niimprint/printer.py", line 299, in get_print_status
page, progress1, progress2 = struct.unpack(">HBB", packet.data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
struct.error: unpack requires a buffer of 4 bytes
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!
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'm afraid the modification you're suggesting can (for example) break D11/D110 instead.
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 :)
Thanks for the fast response! You are right, https://github.com/AndBondStyle/niimprint/issues/3#issuecomment-1867058175 mentioned a difference between whole job progress and label progress but I'm not sure how to print multiple labels at once so I didn't take it into account - this might make the progress logging behave weird.
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!
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
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.
sorry life happened
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.
Good lord! Finally got around to it, sorry for the insane delay. @AndBondStyle you mentioned it breaks D110, why exactly? I added the changes from @azplanlos in #28 , is that sufficient?
I have now had a chance to test this PR and: Yes, it works for me. (one failed (half) print before importing this, and one successful print after doing the pull).
During testing today, we at one point got three blank stickers instead of one printed one. So maybe this patch is not complete yet.