qzind / qz-print

Archive for legacy qz-print versions (1.8, 1.9). See https://github.com/qzind/tray for modern versions.
Other
141 stars 101 forks source link

USB "Poll" option #154

Closed tresf closed 8 years ago

tresf commented 8 years ago

@bberenz is there a way we can fetch only the latest message frame so that the scale reads are always the current scale status?

I like the streaming functionality you've entered, and I don't disagree with the behavior of read-data, since it gives us exactly as the OS would, but the buffered values are causing some issues with clients. Can we dump the buffer and only get the latest message? Perhaps qz.usb.pollData().

akberenz commented 8 years ago

Not easily. Currently the best way to do this would probably be to open a stream, and then just call read data as needed. It could be possible for us to read up the buffer and return the last non-empty message in a single call. But I am not sure how well this would work (if at all) on a continuous stream like a scale.

tresf commented 8 years ago

Closing as wont-fix for now. We can reopen at a later time if we determine this is possible.