Skip to content

Add async to all methods

Choose a tag to compare

@mazinsw mazinsw released this 14 Mar 15:45

Add async to methods that run commands at connection (USB) to allow catch exceptions

What's Changed

New Contributors

Full Changelog: v1.6.6...v2.0.0

Migration guide from 1.x to 2.x

Before: new Printer(model, connection) After: await Printer.CONNECT(model, connection)
Before: printer.columns = 48 After: await printer.setColumns(48)
Before: printer.alignment = Align.Center After: await printer.setAlignment(Align.Center)
Before: printer.codepage = "utf8" After: await printer.setCodepage("utf8")

These method now need await
await printer.write(...)
await printer.writeln(...)
await printer.feed(...)
await printer.draw(...)
await printer.withStyle(...)
await printer.drawer(...)
await printer.buzzer(...)
await printer.cutter(...)