@@ -347,7 +347,7 @@ int extract_horus_rtty(struct horus *hstates, char ascii_out[], int uw_loc) {
347
347
char_dec |= hstates -> rx_bits [i + j ] * (1 <<j );
348
348
}
349
349
if (hstates -> verbose ) {
350
- fprintf (stderr , " extract_horus_rtty i: %4d 0x%02x %c " , i , char_dec , char_dec );
350
+ fprintf (stderr , " extract_horus_rtty i: %4d 0x%02x %c \n " , i , char_dec , char_dec );
351
351
if ((nout % 6 ) == 0 ) {
352
352
fprintf (stderr , "\n" );
353
353
}
@@ -359,6 +359,11 @@ int extract_horus_rtty(struct horus *hstates, char ascii_out[], int uw_loc) {
359
359
endpacket = 1 ;
360
360
rx_crc = horus_l2_gen_crc16 ((uint8_t * )& ascii_out [5 ], nout - 5 );
361
361
ptx_crc = pout + 1 ; /* start of tx CRC */
362
+ if (hstates -> verbose ){
363
+ fprintf (stderr , " begin endpacket\n" );
364
+ }
365
+ // Only process up to the next 5 characters (checksum + line ending)
366
+ en = i + 10 * 5 ;
362
367
}
363
368
364
369
/* build up output array, really only need up to tx crc but
@@ -377,7 +382,9 @@ int extract_horus_rtty(struct horus *hstates, char ascii_out[], int uw_loc) {
377
382
for (i = 0 ; i < 4 ; i ++ ) {
378
383
tx_crc <<= 4 ;
379
384
tx_crc |= hex2int (ptx_crc [i ]);
380
- //fprintf(stderr, "ptx_crc[%d] %c 0x%02X tx_crc: 0x%04X\n", i, ptx_crc[i], hex2int(ptx_crc[i]), tx_crc);
385
+ if (hstates -> verbose ){
386
+ fprintf (stderr , "ptx_crc[%d] %c 0x%02X tx_crc: 0x%04X\n" , i , ptx_crc [i ], hex2int (ptx_crc [i ]), tx_crc );
387
+ }
381
388
}
382
389
crc_ok = (tx_crc == rx_crc );
383
390
* (ptx_crc + 4 ) = 0 ; /* terminate ASCII string */
0 commit comments