use new pos printer settings
This commit is contained in:
parent
dc74c59287
commit
f0078647d4
9 changed files with 144 additions and 47 deletions
|
@ -9,16 +9,17 @@
|
|||
#include <libusb-1.0/libusb.h>
|
||||
|
||||
struct SupportedPrinters {
|
||||
std::array<std::pair<int, int>, 2> models{
|
||||
// {Vendor ID, Model ID}
|
||||
std::make_pair(0x0456, 0x0808),
|
||||
std::make_pair(0x0416, 0x5011),
|
||||
std::array<std::tuple<int, int, int>, 2> models{
|
||||
// {Vendor ID, Model ID, Endpoint}
|
||||
std::make_tuple(0x0456, 0x0808, 0x03),
|
||||
std::tuple(0x0416, 0x5011, 0x03),
|
||||
};
|
||||
};
|
||||
|
||||
struct PrinterDevice {
|
||||
int idVendor{};
|
||||
int idProduct{};
|
||||
int endpoint{};
|
||||
};
|
||||
|
||||
class PosPrinter
|
||||
|
@ -50,6 +51,7 @@ class PosPrinter
|
|||
libusb_device_handle* devicePtr_{};
|
||||
SupportedPrinters supportedPrinters_;
|
||||
PrinterDevice printerDevice_{};
|
||||
int printerEndpoint_{0x03};
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue