From a8ef82646cb0f72dc563a9e540936bb3ff657b4d Mon Sep 17 00:00:00 2001 From: Ed Gonzalez Date: Thu, 3 Sep 2015 10:32:53 -0500 Subject: [PATCH] Reset encoder on END_PATTERN and shorted the initial SYNC and END tones --- DSP_API/ThumbDV/dstar.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/DSP_API/ThumbDV/dstar.c b/DSP_API/ThumbDV/dstar.c index 883766e..12f4b2e 100644 --- a/DSP_API/ThumbDV/dstar.c +++ b/DSP_API/ThumbDV/dstar.c @@ -682,7 +682,7 @@ void dstar_txStateMachine( DSTAR_MACHINE machine, GMSK_MOD gmsk_mod, Circular_Fl switch ( machine->tx_state ) { case BIT_FRAME_SYNC: /* Create Sync */ - for ( i = 0 ; i < 64 * 7; i += 2 ) { + for ( i = 0 ; i < 64 * 5; i += 2 ) { gmsk_encode( gmsk_mod, TRUE, buf, DSTAR_RADIO_BIT_LENGTH ); for ( j = 0 ; j < DSTAR_RADIO_BIT_LENGTH ; j++ ) { @@ -730,7 +730,7 @@ void dstar_txStateMachine( DSTAR_MACHINE machine, GMSK_MOD gmsk_mod, Circular_Fl uint32 count = 0; dstar_scramble( interleaved, scrambled, outLen, &count ); - output( "Count = %d\n", count ); + //output( "Count = %d\n", count ); for ( i = 0 ; i < count ; i++ ) { gmsk_encode( gmsk_mod, scrambled[i], buf, DSTAR_RADIO_BIT_LENGTH ); @@ -809,7 +809,7 @@ void dstar_txStateMachine( DSTAR_MACHINE machine, GMSK_MOD gmsk_mod, Circular_Fl cbWriteFloat( tx_cb, end_buf[i] ); } - for ( i = 0 ; i < 100 ; i += 2 ) { + for ( i = 0 ; i < 22 ; i += 2 ) { gmsk_encode( gmsk_mod, TRUE, buf, DSTAR_RADIO_BIT_LENGTH ); for ( j = 0 ; j < DSTAR_RADIO_BIT_LENGTH ; j++ ) { @@ -823,6 +823,8 @@ void dstar_txStateMachine( DSTAR_MACHINE machine, GMSK_MOD gmsk_mod, Circular_Fl } } + slow_data_resetEncoder(machine); + break; } }