DMR: Fix MassReg reg_address value and tweaks; #366

This commit is contained in:
lwvmobile
2026-10-09 19:42:45 -04:00
parent 4fe32db7f5
commit 37855b817b
2 changed files with 11 additions and 4 deletions

View File

@@ -940,13 +940,20 @@ void dmr_cspdu (dsd_opts * opts, dsd_state * state, uint8_t cs_pdu_bits[], uint8
//MassReg //MassReg
if (a_type == 4) if (a_type == 4)
{ {
uint8_t mreg_res = (uint8_t)ConvertBitIntoBytes(&bpbits1[0], 5);
uint8_t reg_window = (uint8_t)ConvertBitIntoBytes(&bpbits1[5], 4); //7.2.19.5.1 Table 7.77 convert raw to seconds uint8_t reg_window = (uint8_t)ConvertBitIntoBytes(&bpbits1[5], 4); //7.2.19.5.1 Table 7.77 convert raw to seconds
uint8_t aloha_mask = (uint8_t)ConvertBitIntoBytes(&bpbits1[9], 5); uint8_t aloha_mask = (uint8_t)ConvertBitIntoBytes(&bpbits1[9], 5);
//ADDRNull or MS Individual Address //ADDRNull or MS Individual Address
uint8_t reg_address = (uint8_t)ConvertBitIntoBytes(&bpbits2[16], 8); //see clause 7.2.41 uint32_t reg_address = bparms2; //see clause 7.2.41
fprintf (stderr, "\n"); //raw value only on the reg window, see aforementioned table fprintf (stderr, "\n"); //raw value only on the reg window, see aforementioned table
fprintf (stderr, " Reg Window: %X; Aloha Mask: %02X; Target: %d; ", reg_window, aloha_mask, reg_address); fprintf (stderr, " Reg Window: %X; Aloha Mask: %02X; Target: %d; ", reg_window, aloha_mask, reg_address);
if (mreg_res != 0)
fprintf (stderr, "Res: %02X", mreg_res);
if (reg_address != 0)
dmr_gateway_identifier(0, reg_address); dmr_gateway_identifier(0, reg_address);
} }

View File

@@ -595,7 +595,7 @@ void pn95_lfsr() //test to see if this generates the correct bits now
} }
void ysf_ehr (dsd_opts * opts, dsd_state * state, uint8_t dbuf[180], int start, int stop ) void ysf_ehr (dsd_opts * opts, dsd_state * state, uint8_t * dbuf, int start, int stop )
{ {
int i; int i;
char ambe_fr[4][24]; char ambe_fr[4][24];
@@ -850,7 +850,7 @@ void processYSF(dsd_opts * opts, dsd_state * state)
} }
// send VCH to ehr voice handler // send VCH to ehr voice handler
ysf_ehr (opts, state, vbuf, 0, 4); ysf_ehr (opts, state, vbuf, 0, 5);
//send DCH to decoder //send DCH to decoder
ysf_conv_dch (opts, state, bn, bt, fn, ft, cm, dbuf); ysf_conv_dch (opts, state, bn, bt, fn, ft, cm, dbuf);