This commit is contained in:
@@ -130,8 +130,8 @@ bool P700Printer::printMonochromeData(const graphics::MonochromeData& data) {
|
|||||||
// Send initialization sequence
|
// Send initialization sequence
|
||||||
// The INITIALIZE command needs to be sent as a 128-byte packet with ESC @ at the end
|
// The INITIALIZE command needs to be sent as a 128-byte packet with ESC @ at the end
|
||||||
std::vector<uint8_t> initCmd(128, 0x00);
|
std::vector<uint8_t> initCmd(128, 0x00);
|
||||||
initCmd[126] = 0x1b; // ESC
|
initCmd[126] = p700::commands::INITIALIZE[0]; // ESC
|
||||||
initCmd[127] = 0x40; // @
|
initCmd[127] = p700::commands::INITIALIZE[1]; // @
|
||||||
send(initCmd);
|
send(initCmd);
|
||||||
|
|
||||||
// Status is already queried in getPrinterStatus()
|
// 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::AUTO_STATUS);
|
||||||
send(p700::commands::MODE_SETTING);
|
send(p700::commands::MODE_SETTING);
|
||||||
|
|
||||||
// Send raster data row by row
|
// Send raster data row by row in reverse order (bottom to top)
|
||||||
for (uint32_t row = 0; row < data.height; row++) {
|
// 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<uint8_t> rowData;
|
std::vector<uint8_t> rowData;
|
||||||
|
|
||||||
// Extract row data byte by byte
|
// Extract row data byte by byte
|
||||||
|
|||||||
Reference in New Issue
Block a user