Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Ack

Acknowledge packet response from the Crazyflie Header byte format is documented here: (https://wiki.bitcraze.io/doc:crazyradio:usb:index#data_transfer)

Hierarchy

Index

Constructors

constructor

  • new Ack(packet: Buffer): Ack

Properties

ackHeader

ackHeader: number

ackReceived

ackReceived: boolean

channel

channel: number = 0

data

data: Buffer = Buffer.alloc(MAX_PAYLOAD_SIZE)

length

length: number = 0

port

port: number = 0

powerDetector

powerDetector: boolean

retry

retry: number

Static emptyPing

emptyPing: Ack = new Ack(Buffer.from([0x01, 0xf0, 0x01]))

Accessors

header

  • get header(): number

Methods

equals

  • equals(other: Ack): boolean
  • Determine if two ack packets are equal to each other

    Parameters

    Returns boolean

export

  • export(): Buffer

exportHexCodes

  • exportHexCodes(): string[]

write

  • write(type: Type, value: number): this
  • Write a type onto the packet payload

    Parameters

    • type: Type
    • value: number

    Returns this

Static parseHeader

  • parseHeader(header: number): object
  • You take the header... then you parse it

    Parameters

    • header: number

    Returns object

    • channel: number
    • port: number

Generated using TypeDoc