import { type SensorState } from '@dg-kit/core'; import type { WebBluetoothConnectionContext, WebBluetoothSensorAdapter } from './base.js'; /** * Civet Edging Sensor (灵猫边缘控制传感器) — a barometric pressure sensor used * for edging control. Single-variant reading type on purpose: unlike * paw-prints (which can push several distinct event shapes), this device * only ever streams pressure samples. The `type` discriminant is kept anyway * so downstream consumers that fan-in readings from multiple sensor kinds * can still narrow on it. */ export interface CivetPressureReading { type: 'pressure'; kPa: number; } type ReadingListener = (reading: CivetPressureReading) => void; type StateListener = (state: SensorState) => void; /** * Web Bluetooth adapter for the Civet Edging Sensor. * * Shares the exact same GATT skeleton as Coyote V3 (service 0x180C, write * 0x150A, notify 0x150B, battery 0x180A/0x1500) — only the application-layer * opcodes differ. See constants.ts for why no new UUIDs are declared. */ export declare class CivetPressureSensorAdapter implements WebBluetoothSensorAdapter { private readonly readingListeners; private readonly stateListeners; private state; private writeChar; private notifyChar; /** Tracks whether pressure streaming is currently on, so `setIndicatorColor` can re-send the `0x50` packet without flipping it. */ private streaming; onConnected(context: WebBluetoothConnectionContext): Promise; onDisconnected(): Promise; getState(): SensorState; subscribe(listener: ReadingListener): () => void; onStateChanged(listener: StateListener): () => void; /** `0x50` pressure-reporting toggle: start streaming pressure notifications. */ startPressureReporting(color?: number): Promise; /** `0x50` pressure-reporting toggle: stop streaming pressure notifications. */ stopPressureReporting(color?: number): Promise; /** * Change only the indicator color. There is no dedicated "set color" * opcode in the documented protocol — `0x50` always carries both the * color and the streaming on/off byte together — so this re-sends `0x50` * with the current streaming state preserved, rather than the caller * having to guess by calling `startPressureReporting`/`stopPressureReporting` * (which would unintentionally start or stop the pressure stream as a * side effect of what's meant to be a purely cosmetic change). */ setIndicatorColor(color: number): Promise; /** `0x66` calibration: reset the pressure baseline to the current reading. */ calibrateZero(): Promise; /** `0x66` calibration: toggle the on-device screen rotation. */ toggleRotation(next: 0x01 | 0x03): Promise; private buildPressureReportingPacket; private write; private emitState; readonly handleNotification: (event: Event) => void; } export {}; //# sourceMappingURL=civet-edging.d.ts.map