Open
Conversation
MultiMote
reviewed
Jul 22, 2024
NiimPrintX/nimmy/printer.py
Outdated
| return bool(packet.data[0]) | ||
|
|
||
| async def start_printV2(self): | ||
| packet = await self.send_command(RequestCodeEnum.START_PRINT, b"\x00\x01\x00\x00\x00\x00\x00") |
There was a problem hiding this comment.
First two bytes are indicating total page count of print. Here you send only one page. You should use variable. Otherwise set_dimensionV2 will not work for >1 pages.
Author
There was a problem hiding this comment.
You are right, I put that in for testing and then did not remove it.
Will add it later, thank you for the feedback.
|
Tested successfully locally, thanks Loris! |
|
After a bit more testing, the print count doesn't seem to work. I wanted to print 2 copies of a label, it only printed one. |
mlgtcode
approved these changes
Nov 16, 2024
mlgtcode
approved these changes
Nov 16, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As described in issue #5, there is an error when implementing sizes for the B1 printer.
Based on the browser implementation of @MultiMote (https://github.com/MultiMote/niimblue) newer version under (https://gitee.mmote.ru/MultiMote/niimblue-nightly) I was able to get the B1 printer working.
It looks like as if the commands that the B1 printer expects are not the same as the other printers.
By adding a new V2 function for
I could get basic prints running, the V2 implementations send some more data and don't require other packets to be sent. An end_print command, for instance, is not needed anymore in the V2 implementation. For better reliability while printing, I added a timeout of 2 seconds.
The implementation was tested on the following labels I have at hand:
50mm x 30mm
40mm x 30mm (T40*15/2R-460WHITE-HW)
I also enhanced parts of the debug logging and left it enabled for now.
I also had to change the rotation setting from 90 to 0 for me to get it working, if I find the time I am going to add that setting to the UI.