diff --git a/src/printers/P700Printer.cpp b/src/printers/P700Printer.cpp index 3d996e8..23e75f0 100644 --- a/src/printers/P700Printer.cpp +++ b/src/printers/P700Printer.cpp @@ -130,8 +130,8 @@ bool P700Printer::printMonochromeData(const graphics::MonochromeData& data) { // Send initialization sequence // 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; // @ + initCmd[126] = p700::commands::INITIALIZE[0]; // ESC + initCmd[127] = p700::commands::INITIALIZE[1]; // @ send(initCmd); // Status is already queried in getPrinterStatus() @@ -139,8 +139,9 @@ bool P700Printer::printMonochromeData(const graphics::MonochromeData& data) { send(p700::commands::AUTO_STATUS); send(p700::commands::MODE_SETTING); - // Send raster data row by row - for (uint32_t row = 0; row < data.height; row++) { + // Send raster data row by row in reverse order (bottom to top) + // The printer feeds tape as it prints, so first row sent appears at the end + for (int row = data.height - 1; row >= 0; row--) { std::vector rowData; // Extract row data byte by byte