mirror of
https://github.com/n5ac/smartsdr-dsp.git
synced 2026-04-19 05:03:48 +00:00
Move RX=END status message to DSTAR State machine and add new STATUS_END_RX case in status message function
This commit is contained in:
parent
3008950e50
commit
fdc522e747
3 changed files with 15 additions and 8 deletions
|
|
@ -522,12 +522,6 @@ static void * _sched_waveform_thread( void * param ) {
|
|||
cbWriteShort( RX3_cb, speech_out[j] );
|
||||
}
|
||||
|
||||
if (_dstar->rx_state == END_PATTERN)
|
||||
{
|
||||
char msg[64];
|
||||
sprintf( msg, "waveform status slice=%d RX=END", _dstar->slice);
|
||||
tc_sendSmartSDRcommand( msg, FALSE, NULL );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -661,6 +661,14 @@ void dstar_updateStatus( DSTAR_MACHINE machine, uint32 slice, enum STATUS_TYPE
|
|||
sprintf( status, "waveform status slice=%d message=%s", slice, message_string);
|
||||
tc_sendSmartSDRcommand( status, FALSE, NULL );
|
||||
break;
|
||||
case STATUS_END_RX:
|
||||
{
|
||||
char msg[64];
|
||||
sprintf( msg, "waveform status slice=%d RX=END", machine->slice);
|
||||
tc_sendSmartSDRcommand( msg, FALSE, NULL );
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1004,6 +1012,7 @@ BOOL dstar_rxStateMachine( DSTAR_MACHINE machine, BOOL in_bit, unsigned char * a
|
|||
|
||||
bitPM_reset( machine->data_sync_pm );
|
||||
|
||||
dstar_updateStatus(machine, machine->slice, STATUS_END_RX);
|
||||
/* STATE CHANGE */
|
||||
machine->rx_state = BIT_FRAME_SYNC;
|
||||
machine->bit_count = 0;
|
||||
|
|
@ -1016,7 +1025,10 @@ BOOL dstar_rxStateMachine( DSTAR_MACHINE machine, BOOL in_bit, unsigned char * a
|
|||
|
||||
case END_PATTERN:
|
||||
|
||||
output( "Found end pattern bits\n" );
|
||||
output( "Found end pattern bits -- sending status update\n" );
|
||||
|
||||
dstar_updateStatus(machine, machine->slice, STATUS_END_RX);
|
||||
|
||||
bitPM_reset( machine->end_pm );
|
||||
bitPM_reset( machine->syn_pm );
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,8 @@ enum DSTAR_RX_STATE {
|
|||
enum STATUS_TYPE {
|
||||
STATUS_RX = 0,
|
||||
STATUS_TX,
|
||||
STATUS_SLOW_DATA_MESSAGE
|
||||
STATUS_SLOW_DATA_MESSAGE,
|
||||
STATUS_END_RX
|
||||
};
|
||||
|
||||
typedef struct _dstar_header {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue