rust-ptouch icon indicating copy to clipboard operation
rust-ptouch copied to clipboard

feat: support 360 DPI devices like PT-P910BT

Open aschmitz opened this issue 8 months ago • 1 comments

This is about as minimal an implementation as I can manage at the moment, though it still passes around the resolution more than I might like. Tested on both a PT-P910BT and a PT-P710BT.

Closes #60.

(Also adds debug logging of data read from the USB device alongside logging of data written.)

This works, but it may not necessarily be in keeping with what you were thinking. The changes end up affecting most of the classes, because most of them need to know the DPI for various reasons. (Even down to the level of the set_print_info command, which apparently needs to set the page type to 2 for 360 DPI printers in order to trigger the "last page" behavior including printing smaller labels or cutting any labels. But of course setting it to 2 in 180 DPI printers causes them to hang.)

If you'd like any changes, I'm happy to either attempt them myself, or you're welcome to make the relevant changes to my branch if you'd like.

aschmitz avatar Apr 06 '25 22:04 aschmitz

good effort! i need to fix the CI but otherwise happy to merge the new functionality / play with things later if we come up with better abstractions.

But of course setting it to 2 in 180 DPI printers causes them to hang

of course 🙃

ryankurte avatar Apr 13 '25 23:04 ryankurte