Move header, voice_bits and data_bits into the dstar_machine data structure for future support of multiple instances

This commit is contained in:
Ed Gonzalez 2015-06-16 18:14:34 -05:00
parent 8ab5a053aa
commit 5eb520fcce
2 changed files with 10 additions and 4 deletions

View file

@ -493,10 +493,10 @@ BOOL dstar_stateMachine(DSTAR_MACHINE machine, BOOL in_bit, unsigned char * ambe
BOOL have_audio_packet = FALSE;
BOOL found_syn_bits = FALSE;
BOOL found_end_bits = FALSE;
static BOOL header[FEC_SECTION_LENGTH_BITS];
static BOOL voice_bits[72];
//static BOOL data_bits[(24+72) * 50];
static BOOL data_bits[24];
BOOL * header = machine->header;
BOOL * voice_bits = machine->voice_bits;
BOOL * data_bits = machine->data_bits;
//unsigned char bytes[((24+72) * 50)/8 + 1];
unsigned char bytes[FEC_SECTION_LENGTH_BITS/8 + 1];

View file

@ -64,10 +64,16 @@ typedef struct _dstar_machine
uint32 bit_count;
uint32 frame_count;
/* BIT Pattern Matcher */
BIT_PM syn_pm;
BIT_PM data_sync_pm;
BIT_PM end_pm;
/* Bit Buffers */
BOOL header[FEC_SECTION_LENGTH_BITS];
BOOL voice_bits[VOICE_FRAME_LENGTH_BITS];
BOOL data_bits[DATA_FRAME_LENGTH_BITS];
} dstar_machine, * DSTAR_MACHINE;
typedef struct _dstar_fec