Fix the TX Hang.

This commit is contained in:
Jonathan Naylor 2020-05-20 15:27:16 +01:00
parent 96e1a765f9
commit 489853f200
4 changed files with 6 additions and 15 deletions

View File

@ -54,7 +54,7 @@ m_poBuffer(),
m_poLen(0U), m_poLen(0U),
m_poPtr(0U), m_poPtr(0U),
m_txDelay(240U), // 200ms m_txDelay(240U), // 200ms
m_txHang(6000U), // 5s m_txHang(3000U), // 5s
m_txCount(0U) m_txCount(0U)
{ {
::memset(m_modState, 0x00U, 16U * sizeof(q15_t)); ::memset(m_modState, 0x00U, 16U * sizeof(q15_t));
@ -72,10 +72,7 @@ m_txCount(0U)
void CNXDNTX::process() void CNXDNTX::process()
{ {
if (m_buffer.getData() == 0U && m_poLen == 0U && m_txCount == 0U) if (m_poLen == 0U && m_buffer.getData() > 0U) {
return;
if (m_poLen == 0U) {
if (!m_tx) { if (!m_tx) {
for (uint16_t i = 0U; i < m_txDelay; i++) for (uint16_t i = 0U; i < m_txDelay; i++)
m_poBuffer[m_poLen++] = NXDN_SYNC; m_poBuffer[m_poLen++] = NXDN_SYNC;
@ -201,5 +198,5 @@ uint8_t CNXDNTX::getSpace() const
void CNXDNTX::setParams(uint8_t txHang) void CNXDNTX::setParams(uint8_t txHang)
{ {
m_txHang = txHang * 1200U; m_txHang = txHang * 600U;
} }

View File

@ -70,10 +70,7 @@ m_txCount(0U)
void CP25TX::process() void CP25TX::process()
{ {
if (m_buffer.getData() == 0U && m_poLen == 0U && m_txCount == 0U) if (m_poLen == 0U && m_buffer.getData() > 0U) {
return;
if (m_poLen == 0U) {
if (!m_tx) { if (!m_tx) {
for (uint16_t i = 0U; i < m_txDelay; i++) for (uint16_t i = 0U; i < m_txDelay; i++)
m_poBuffer[m_poLen++] = P25_START_SYNC; m_poBuffer[m_poLen++] = P25_START_SYNC;

View File

@ -107,7 +107,7 @@ const uint8_t MMDVM_DEBUG5 = 0xF5U;
#define HW_TYPE "MMDVM" #define HW_TYPE "MMDVM"
#endif #endif
#define DESCRIPTION "20200519 (D-Star/DMR/System Fusion/P25/NXDN/POCSAG/FM)" #define DESCRIPTION "20200520 (D-Star/DMR/System Fusion/P25/NXDN/POCSAG/FM)"
#if defined(GITVERSION) #if defined(GITVERSION)
#define concat(h, a, b, c) h " " a " " b " GitID #" c "" #define concat(h, a, b, c) h " " a " " b " GitID #" c ""

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2009-2018,2020 by Jonathan Naylor G4KLX * Copyright (C) 2009-2018 by Jonathan Naylor G4KLX
* Copyright (C) 2017 by Andy Uribe CA6JAU * Copyright (C) 2017 by Andy Uribe CA6JAU
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -66,9 +66,6 @@ m_txCount(0U)
void CYSFTX::process() void CYSFTX::process()
{ {
if (m_buffer.getData() == 0U && m_poLen == 0U && m_txCount == 0U)
return;
// If we have YSF data to transmit, do so. // If we have YSF data to transmit, do so.
if (m_poLen == 0U && m_buffer.getData() > 0U) { if (m_poLen == 0U && m_buffer.getData() > 0U) {
if (!m_tx) { if (!m_tx) {