fix the LICH_CNT

pull/35/head
Wojciech Kaczmarski 2024-06-24 19:49:52 +02:00
rodzic ebb082726b
commit e471c76f18
2 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -659,6 +659,7 @@ int main(int argc, char* argv[])
randomize_bits(rf_bits);
send_data(frame_buff, &frame_buff_cnt, rf_bits);
fwrite((uint8_t*)frame_buff, SYM_PER_FRA*sizeof(float), 1, stdout);
lich_cnt = (lich_cnt + 1) % 6; //continue with next LICH_CNT
//if we are done, and the stream is signed, so we need to transmit the signature (4 frames)
if(signed_str)

Wyświetl plik

@ -596,7 +596,7 @@ int main(int argc, char* argv[])
lich_cnt=lich_b[5]>>5;
//If we're at the start of a superframe, or we missed a frame, reset the LICH state
if((lich_cnt==0) || ((fn % 0x8000)!=expected_next_fn))
if((lich_cnt==0) || ((fn % 0x8000)!=expected_next_fn && fn<0x7FFC))
lich_chunks_rcvd=0;
lich_chunks_rcvd|=(1<<lich_cnt);