Skip to content

Commit

Permalink
Merge pull request #3 from joelhaasnoot/main
Browse files Browse the repository at this point in the history
Add support for MX09
  • Loading branch information
TheNitek committed Apr 28, 2023
2 parents 6f8844c + ac6171f commit 6103aa8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/CatGFX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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;
Expand All @@ -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));
}
}

0 comments on commit 6103aa8

Please sign in to comment.