kopia lustrzana https://github.com/OpenRTX/OpenRTX
Restoring priority level of output streams to PRIO_BEEP when the stream terminates, made M17Modulator::emitBaseband() wait for effective stream termination before returning when transmission stop is requested. Fixes #76
rodzic
76be50db61
commit
46c988bdc2
|
@ -132,10 +132,12 @@ void M17Modulator::emitBaseband()
|
|||
outputStream_sync(outStream, true);
|
||||
}
|
||||
|
||||
// Check if transmission stop is requested
|
||||
// Check if transmission stop is requested, if so stop the output stream
|
||||
// and wait until its effective termination.
|
||||
if(stopTx == true)
|
||||
{
|
||||
outputStream_stop(outStream);
|
||||
outputStream_sync(outStream, false);
|
||||
stopTx = false;
|
||||
txRunning = false;
|
||||
idleBuffer = baseband_buffer;
|
||||
|
|
|
@ -52,10 +52,11 @@ static inline void stopTransfer()
|
|||
// Re-activate "beeps"
|
||||
toneGen_unlockBeep();
|
||||
|
||||
// Finally, clear flags
|
||||
// Finally, clear flags and restore priority level
|
||||
running = false;
|
||||
reqFinish = false;
|
||||
circularMode = false;
|
||||
priority = PRIO_BEEP;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -42,7 +42,7 @@ static Thread *dmaWaiting = 0;
|
|||
* \internal
|
||||
* Stop an ongoing transfer, deactivating timers and DMA stream.
|
||||
*/
|
||||
void stopTransfer()
|
||||
static inline void stopTransfer()
|
||||
{
|
||||
// Stop DMA transfers
|
||||
DMA1_Stream5->CR = 0;
|
||||
|
@ -53,10 +53,11 @@ void stopTransfer()
|
|||
DAC->CR = DAC_CR_EN1; // Keep only channel 1 active
|
||||
DAC->DHR12R1 = 1365; // Set channel 1 (RTX) to about 1.1V when idle
|
||||
|
||||
// Clear flags
|
||||
// Clear flags and restore priority level
|
||||
running = false;
|
||||
reqFinish = false;
|
||||
circularMode = false;
|
||||
priority = PRIO_BEEP;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Ładowanie…
Reference in New Issue