-
Notifications
You must be signed in to change notification settings - Fork 8
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
Draft: Maintenance #28
base: master
Are you sure you want to change the base?
Conversation
pretixprint/app/src/main/java/eu/pretix/pretixprint/ui/MaintenanceFragment.kt
Outdated
Show resolved
Hide resolved
I cannot compile this branch due to
|
Ah, sorry, the magic of different changelists in android studio. Should be fixed with 89947d5 |
First of all, many printers have a line-based buffer, so what I was instantly missing most was a way to send a line feed in ASCII mode. Switching to hex mode and sending 0A is not really convenient. Do you have any ideas there? Now for my tests. I tried a SNBC receipt printer via USB, which apparently causes nullbytes and status bytes to be sent all the time: device-2022-05-23-102556.mp4This was not only annoying, but slowed down the UI so much I could barely type anything or close the keyboard. I then tried connecting the same printer via LAN, where it did not shows these null bytes – at first. After I sent my commands, it started to show them as well. I then quit the dialog and started it again, after which the log did not work at all, also no outgoing statements: device-2022-05-23-103031.mp4Maybe something with the resource/thread handling is still wrong there? I'm happy to accept that this is something specific to SNBC printers, but we need this dialog for SNBC printers. Accepting the null bytes is fine, but it should not slow down the interface so much or hide output completely. As for the UI, it's a little annoying that the keyboard will overlap with the most interesting part of the log, even on a huge screen. Maybe instead of a dialog let's use a full-screen activity? On a TC25 its… better than expected, but still hard to use, do you think we can allocate more space for the input and less for HEX/ASCII and less for the send button? |
…ons menu if configured. Add printer menu option to unset/delete a configured printer
This PR adds a maintenance utility to configured printer entries. With this, it is possible to send maintenance data packets to the printer to configure stuff like paper sensor calibration values.
It accepts data in ascii or hex (with
0x
-prefixes, spaced or simply endless hex characters) formats.Maintenance and the also added printer removal feature are placed in the new three dots
⋮
menu on the right side of each printer row.This PR also migrates the settings screen from the deprecated
android.preference.PreferenceFragment
toandroidx.preferences.PreferenceFragmentCompat
TODO: