Skip to content

Commit 3120267

Browse files
authored
Merge pull request #119 from rob0101/flex-fragment-fix
Flex fragment fix
2 parents 9f76626 + e8c1db6 commit 3120267

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

demod_flex.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
* Boston, MA 02110-1301, USA.
2323
*/
2424
/*
25+
* Version 0.9.1v (10 Jan 2019)
26+
* Modification (to this file) made by Rob0101
27+
* Fixed marking messages with K,F,C - One case had a 'C' marked as a 'K'
2528
* Version 0.9.0v (22 May 2018)
2629
* Modification (to this file) made by Bruce Quinton ([email protected])
2730
* - Addded Define at top of file to modify the way missed group messages are reported in the debug output (default is 1; report missed capcodes on the same line)
@@ -512,14 +515,15 @@ static void parse_alphanumeric(struct Flex * flex, unsigned int * phaseptr, char
512515
// char buf[1024], *message;
513516
char message[1024];
514517
int currentChar = 0;
515-
char frag_flag = 'K';
518+
char frag_flag = '?';
516519

517520
int frag = (phaseptr[mw1] >> 11) & 0x03;
518-
int cont = ( phaseptr[mw1] >> 0x0A ) & 0x01;
521+
int cont = (phaseptr[mw1] >> 0x0A) & 0x01;
519522

520-
if (cont == 1) frag_flag = 'F';
521-
if (cont == 0 && frag == 0) frag_flag = 'C';
522-
523+
if (cont == 0 && frag == 3) frag_flag = 'K'; // complete, ready to send
524+
if (cont == 0 && frag != 3) frag_flag = 'C'; // incomplete until appended to 1 or more 'F's
525+
if (cont == 1 ) frag_flag = 'F'; // incomplete until a 'C' fragment is appended
526+
523527
mw1++;
524528

525529
for (i = mw1; i <= mw2; i++) {

0 commit comments

Comments
 (0)