Constructors
Methods
Static
bufToHex
- bufToHex(buf, separator?): string
Parameters
- buf: DataView | Uint8Array | number[]
- separator: string = " "
Returns string
Static
bytesToI16
- bytesToI16(arr): number
Returns number
Static
countPixelsForBitmapPacket
- countPixelsForBitmapPacket(arr, printheadSize): {
a: number;
b: number;
c: number;
total: number;
} Parameters
- arr: Uint8Array
- printheadSize: number
Returns {
a: number;
b: number;
c: number;
total: number;
}
a: number
b: number
c: number
total: number
Static
dataViewToNumberArray
- dataViewToNumberArray(dw): number[]
Returns number[]
Static
dataViewToU8Array
- dataViewToU8Array(dw): Uint8Array
Returns Uint8Array
Static
hexToBuf
- hexToBuf(str): Uint8Array
Returns Uint8Array
Static
isBluetoothSupported
- isBluetoothSupported(): boolean
Returns boolean
Static
isSerialSupported
- isSerialSupported(): boolean
Returns boolean
Static
numberToHex
- numberToHex(n): string
Returns string
Static
sleep
- sleep(ms): Promise<undefined>
Returns Promise<undefined>
Static
u16ToBytes
- u16ToBytes(n): [number, number]
Returns [number, number]
Static
u8ArraysEqual
- u8ArraysEqual(a, b): boolean
Parameters
- a: Uint8Array
- b: Uint8Array
Returns boolean
Static
u8ArrayToString
- u8ArrayToString(arr): string
Returns string
Utility class for various common operations.