/** * Protocol adapter for the "Paw-Prints" (爪印) wireless button/motion sensor. * * Shares the exact GATT skeleton with Coyote V3 (service 0x180C, write * 0x150A, notify 0x150B, battery 0x180A/0x1500) — only the application-layer * opcodes differ, so the transport wiring below mirrors `v3.ts` but the * command/notification framing is Paw-Prints-specific. * * NOTE: the byte layout below is transcribed from a paraphrased summary of * the community protocol doc, not a byte-exact spec or a real device * capture. Fields called out with a comment are best-effort interpretations * that need confirming against real hardware before being treated as * authoritative. */ import { type SensorState } from '@dg-kit/core'; import type { WebBluetoothConnectionContext, WebBluetoothSensorAdapter } from './base.js'; export type PawPrintsReading = { type: 'status'; color: number; deviceType: number; battery: number; } | { type: 'trigger'; eventId: number; parameterValue: number; } | { type: 'triggerCancel'; eventId: number; } | { type: 'parameterChange'; eventId: number; value: number; } | { type: 'physical'; sequence: number; pressState: number; acceleration: number; angleX: number; angleY: number; angleZ: number; extVoltage: number; } | { type: 'autoDetectResult'; xRange: [number, number]; yRange: [number, number]; zRange: [number, number]; }; export type PawPrintsReadingListener = (reading: PawPrintsReading) => void; export type PawPrintsStateListener = (state: SensorState) => void; export declare class PawPrintsSensorAdapter implements WebBluetoothSensorAdapter { private state; private writeChar; private notifyChar; private readonly readingListeners; private readonly stateListeners; onConnected(context: WebBluetoothConnectionContext): Promise; onDisconnected(): Promise; getState(): SensorState; subscribe(listener: PawPrintsReadingListener): () => void; onStateChanged(listener: PawPrintsStateListener): () => void; /** * Sends the 0x50 config/trigger command. `config` is copied into the * 14-byte trailing config block (truncated if longer, zero-padded if * shorter/omitted). */ configureTrigger(mode: number, color: number, config?: Uint8Array): Promise; resetParameters(): Promise; startAngleDetection(): Promise; setLedSolid(color: number): Promise; setLedBlink(color1: number, color2: number, speed: number): Promise; private resetConnection; private emitState; private writeCommand; private readonly handleNotification; private parseReading; } //# sourceMappingURL=paw-prints.d.ts.map