From ac6171f89edcf38f073ce78693dc79ef74508347 Mon Sep 17 00:00:00 2001 From: Joel Haasnoot Date: Fri, 28 Apr 2023 16:34:17 +0200 Subject: [PATCH] Add support for MX09 --- src/CatGFX.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/CatGFX.cpp b/src/CatGFX.cpp index 7da82f1..c324f6f 100644 --- a/src/CatGFX.cpp +++ b/src/CatGFX.cpp @@ -110,7 +110,8 @@ void CatPrinter::printBuffer(void) { void CatPrinter::onResult(BLEAdvertisedDevice advertisedDevice) { if (strcmp(advertisedDevice.getName().c_str(), "GT01") == 0 || strcmp(advertisedDevice.getName().c_str(), "GB01") == 0 || - strcmp(advertisedDevice.getName().c_str(), "GB02") == 0 ) { + strcmp(advertisedDevice.getName().c_str(), "GB02") == 0 || + strcmp(advertisedDevice.getName().c_str(), "MX09") == 0 ) { blePrinterAddress = new BLEAddress(advertisedDevice.getAddress()); Serial.print("Found Printer: "); Serial.println(blePrinterAddress->toString().c_str()); @@ -159,7 +160,7 @@ void CatPrinter::writeData(byte *data, uint8_t len) { void CatPrinter::startGraphics(void) { byte data[2] = {0x80, 0x3E}; sendCmd(CatPrinter::Cmd::ENERGY, data, 2); - + data[0] = 0x33; sendCmd(CatPrinter::Cmd::QUALITY, data, 1); data[0] = 0x00; @@ -183,4 +184,4 @@ void CatPrinter::drawPixel(int16_t x, int16_t y, uint16_t color) { void CatPrinter::fillScreen(uint16_t color) { fillBuffer((!color ? 0xFF : 0x00)); -} \ No newline at end of file +}