Repository navigation
Add async to all methods
Add async to methods that run commands at connection (USB) to allow catch exceptions
What's Changed
- Exposes the async nature of WebUSB by @tjmgregory in #24
New Contributors
- @tjmgregory made their first contribution in #24
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(...)