bitbank2 / Print2BLE

MacOS app which allows drag and drop of images to BLE thermal printers
Apache License 2.0
70 stars 11 forks source link

Support for the Phomemo T02 #19

Open xrayessay opened 5 months ago

xrayessay commented 5 months ago

Hey there!

Me and my class mates are working on this project where want to print our own custom bills with the Phomemo T02 heat printer. It would mean the world to use if you could support this printer in your program so we could automate our process a little!

Yours trully,

emnullfuenf commented 5 months ago

The Phonemo T02 works when you add two items to the arrays in MyBLE.m in line 54 and 55.

Add "T02" in line 54 before null. And "PRINTER_PERIPAGE" at the end of the array in line 55.

const char *szTypes[] = {"MTP-II", "MTP-2", "MTP-3", "MTP-3F", "PeriPage+", "PeriPage_", "GT01", "GT02", "GB01", "GB02", "YHK-54A8", "MX06", "D110-E8", "T02", NULL}; const uint8_t ucTypes[] = {PRINTER_MTP2, PRINTER_MTP2, PRINTER_MTP3, PRINTER_MTP3, PRINTER_PERIPAGEPLUS, PRINTER_PERIPAGE, PRINTER_CAT, PRINTER_CAT, PRINTER_CAT, PRINTER_CAT, PRINTER_PANDA, PRINTER_CAT, PRINTER_PANDA, PRINTER_PERIPAGE};

I'll try to add a pull request later.