Generate labels with pangocairo #8

Merged
moritz merged 30 commits from generate-text-part-one into master 2025-10-12 20:07:19 +00:00
Showing only changes of commit 58287202d8 - Show all commits

View File

@@ -128,7 +128,12 @@ bool P700Printer::printBitmap(const graphics::Bitmap<graphics::ALPHA8>& bitmap)
bool P700Printer::printMonochromeData(const graphics::MonochromeData& data) { bool P700Printer::printMonochromeData(const graphics::MonochromeData& data) {
// Send initialization sequence // 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<uint8_t> initCmd(128, 0x00);
initCmd[126] = 0x1b; // ESC
initCmd[127] = 0x40; // @
send(initCmd);
// Status is already queried in getPrinterStatus() // Status is already queried in getPrinterStatus()
send(p700::commands::PRINT_MODE); send(p700::commands::PRINT_MODE);
send(p700::commands::AUTO_STATUS); 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; return true;
} }