diff --git a/src/printers/P700Printer.cpp b/src/printers/P700Printer.cpp index 0cb7f71..3d996e8 100644 --- a/src/printers/P700Printer.cpp +++ b/src/printers/P700Printer.cpp @@ -128,7 +128,12 @@ bool P700Printer::printBitmap(const graphics::Bitmap& bitmap) bool P700Printer::printMonochromeData(const graphics::MonochromeData& data) { // Send initialization sequence - send(p700::commands::INITIALIZE); + // The INITIALIZE command needs to be sent as a 128-byte packet with ESC @ at the end + std::vector initCmd(128, 0x00); + initCmd[126] = 0x1b; // ESC + initCmd[127] = 0x40; // @ + send(initCmd); + // Status is already queried in getPrinterStatus() send(p700::commands::PRINT_MODE); send(p700::commands::AUTO_STATUS); @@ -163,6 +168,9 @@ bool P700Printer::printMonochromeData(const graphics::MonochromeData& data) { } } + // Send print finalization commands + send(p700::commands::EJECT); + return true; }