decode
fun decode(packet: ByteArray, config: DeviceConfig, state: DecodeState, contactOut: (BooleanArray) -> Unit? = null, hardware: DeviceHardware = DeviceHardware.legacyDefault(config.model), out: (EegFrame) -> Unit): Boolean
Decode one stream packet into typed EegFrames, advancing state. hardware decides the footer layout (accelerometer / gyroscope blocks present or not); it defaults to the V2 board of the config's model, which is every device without a readable Model Number. Returns true on success, false if the packet was malformed (matching the legacy broad-catch behaviour). See decodeRaw for the underlying legacy-positional output.