Open montanhes opened 2 years ago
why are close after print?
why are close after print?
I added it to disconnect from the print after this finish, but it isn't working as expected for me. So I solved it by calling the closeConn() after the user navigate back to previous screen.
I'm using this lib to print using Bluetooth printers, It's working, but I struggling to deal with the BLEPrinter.closeConn().
I have created the function:
The printer that I'm using has a blue led that indicates that the Bluetooth connection has established, If I call the BLEPrinter.closeConn() after the BLEPrinter.printText(receipt) it's close the connection and most of the time the print does not have time to finish the printing that stop on the middle of the receipt.
If I comment the await BLEPrinter.closeConn(), the blue led turn on and the printText print all the receipt. Do we have any method/event to know if the printText has finished his job before I call the closeConn method?