Skip to content

Latest commit

 

History

History
27 lines (14 loc) · 662 Bytes

tryToConnectUntil.md

File metadata and controls

27 lines (14 loc) · 662 Bytes

static Printer.tryToConnectUntil

Tries to connect to the printer until the condition is met.

Parameters

printerInstance

  • Printer

Printer instance defined by calling new Printer(...).

predicate

Predicate function that will be called with printer status. If returns true promise will be resolved and next steps will be executed.

Returns

Promise<void>

Supplementary explanation

  • Can be used to wait for printer to be ready based on its status. I.e. connection loss.
  • Internaly uses connect, getStatus commands.