mirror of
https://github.com/n0mjs710/ipsc2hbpc.git
synced 2026-11-08 04:18:24 +00:00
DMRD bytes 53-54 (BER, RSSI) are optional on input: HBlink3 passes a 53-byte DMRD through unchanged. Accept anything from 53 bytes and read byte 54 only when present; output is still 55 bytes. DMRD byte 54 of a voice header or terminator now goes into the RSSI field (bytes 52-53) of the VOICE_HEAD / VOICE_TERM built from it, as 8.8 fixed-point -dBm. No reading (53 bytes, 0, or a synthesized HEAD/TERM) sends 0 as before. The terminator reading is cleared at the end of each call so it cannot reach a later synthesized TERM. Byte 31 bit 7 of VOICE_HEAD / VOICE_TERM is the timeslot (0x40 / 0xC0 in repeater captures); it was hardcoded 0x80 (TS2). The RSSI status bit (bit 6) is left 0. The old firmware RSSI encoding (-56 dB offset) is dropped: no repeater using it is known. [ipsc] rssi_encoding_new is no longer read; configs that still carry it load unchanged. Tests: 53/55-byte input, RSSI round trip through the IPSC->HBP decoder, slot bit, terminator reading not carried into the next call, legacy key fixture, and a late-entry case where only the LC-error bit can reject a corrupt burst E LC. parity_ref_gv.txt byte 31 corrected to TS1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>