import { CFW_MSG_BOUNDING_BOX, CFW_MSG_DRAW_CALLS, CFW_MSG_FULL_FRAME, CFW_MSG_MULTI_SEGMENT, CFW_MSG_TYPE_MASK } from "./cfw-message-type"; /** Adapter for raster-only senders; optimized legacy layouts remain internal to the phone. */ export function drawMessages(payload: Uint8Array, width = 640, height = 480): Uint8Array[] { const word = (v: number) => [v & 255, (v >>> 8) & 255] const mode = payload[0] & CFW_MSG_TYPE_MASK let calls: Uint8Array[] if (mode === CFW_MSG_MULTI_SEGMENT) { const output: Uint8Array[] = []; let p=2 for(let i=0;i new Uint8Array([CFW_MSG_DRAW_CALLS,1,0,...word(call.length),...call])) }