mirror of
https://github.com/n0mjs710/HBlink4.git
synced 2026-11-08 04:19:26 +00:00
Translation that only rewrites the DMRD header leaves stale addressing in the 33-byte payload's embedded LC. Radios and MMDVMHost reassemble the EMB_LC across voice bursts B-E and eventually see addressing that contradicts the header, which matches the observed "works for 1-2s then corrupts" symptom (and the "fall back" LC warnings in MMDVMHost). Replace payload zero-blanking with targeted LC splicing: - VHEAD / VTERM (data sync): re-encode the 196-bit BPTC full LC - Voice bursts B/C/D/E: re-encode the 32-bit embedded LC fragment - All other frames pass through with payload untouched LC is captured once per stream (decoded from VHEAD to preserve FLCO/ FID/service-option bits, synthesized from LC_OPT_GROUP_DEFAULT + dst + src for late-entry streams). Per-target encoded forms cache on StreamState keyed by (out_dst, out_src), so we pay one BPTC encode per unique target addressing per stream. Group-voice only today — unit/private call opts will slot in unchanged via decode_lc_from_vhead or a non-default synth_lc_base opts argument when those calls are enabled upstream. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>