DecodeState

class DecodeState(var lastSample: Int = 0, var batteryPct: Float = -1.0f)

Mutable per-device decode state carried across packets. Replaces the legacy per-device lastSample / batteryLevel fields that lived on the global singleton.

One instance per DeviceConfig/connection; the decoder advances lastSample as it emits samples (including gap-fill dummies) and reads batteryPct for each frame.

Constructors

Link copied to clipboard
constructor(lastSample: Int = 0, batteryPct: Float = -1.0f)

Properties

Link copied to clipboard

Last known battery percentage; -1 until the first battery notification.

Link copied to clipboard

Index of the next sample expected from the device (matches legacy lastSample).