This Commit adds a rudimentary printer factory to greatly simplify the creation of printers
All checks were successful
Build ptprnt / build (push) Successful in 1m36s
All checks were successful
Build ptprnt / build (push) Successful in 1m36s
This commit is contained in:
@@ -41,6 +41,11 @@
|
||||
|
||||
namespace ptprnt::printer {
|
||||
|
||||
const PrinterInfo P700Printer::mInfo = {.driverName = "P700",
|
||||
.name = "Brother P-touch P700",
|
||||
.version = "v1.0",
|
||||
.usbId{0x04f9, 0x2061}};
|
||||
|
||||
P700Printer::~P700Printer() {
|
||||
detachUsbDevice();
|
||||
if (mUsbHndl) {
|
||||
@@ -80,12 +85,8 @@ const PrinterStatus P700Printer::getPrinterStatus() {
|
||||
return PrinterStatus{.tapeWidthMm = recvBuf[10]};
|
||||
}
|
||||
|
||||
const uint16_t P700Printer::getVid() {
|
||||
return mInfo.vid;
|
||||
}
|
||||
|
||||
const uint16_t P700Printer::getPid() {
|
||||
return mInfo.pid;
|
||||
const libusbwrap::usbId P700Printer::getUsbId() {
|
||||
return mInfo.usbId;
|
||||
}
|
||||
|
||||
bool P700Printer::attachUsbDevice(std::shared_ptr<libusbwrap::IUsbDevice> usbHndl) {
|
||||
|
Reference in New Issue
Block a user