bitbank2 / Thermal_Printer

Arduino library to draw text and graphics on BLE thermal printers
Apache License 2.0
361 stars 54 forks source link

Speed improvement (and print quality) with no response #10

Closed bitluni closed 2 years ago

bitluni commented 3 years ago

By splitting data transmission into 20 byte chunks the API won't split anymore. Therefore we can control the delay between each packet and let the printer work off the buffer. Negotiating a bigger packet size would be more beneficial but seems not to be available. With this hack the print speed is improved and a delay of 4ms seems ok. 5ms is conservative but also lowers print quality by stalling the motor.

bitbank2 commented 2 years ago

I changed a lot of the code and this is why there is a conflict, but I have incorporated your fix in the newest version.