remove playback timer (its unused now); fix some issues with the way interrupt P25 CC was working;

3.0-rcon_maint
Bryan Biedenkapp 3 years ago
parent 0ba35c7a54
commit 9a3d00abd0

@ -815,6 +815,7 @@ int Host::run()
// Macro to interrupt a running P25 control channel transmission
#define INTERRUPT_P25_CONTROL \
if (p25 != nullptr) { \
LogDebug(LOG_HOST, "interrupt P25 control, m_state = %u", m_state); \
p25->setCCHalted(true); \
if (p25BcastDurationTimer.isRunning() && !p25BcastDurationTimer.isPaused()) { \
p25BcastDurationTimer.pause(); \
@ -826,6 +827,7 @@ int Host::run()
if (dmr != nullptr) { \
if (dmrBeaconDurationTimer.isRunning() && !dmrBeaconDurationTimer.hasExpired()) { \
if (m_dmrTSCCData && !m_dmrCtrlChannel) { \
LogDebug(LOG_HOST, "interrupt DMR control, m_state = %u", m_state); \
dmr->setCCHalted(true); \
dmr->setCCRunning(false); \
} \
@ -836,6 +838,7 @@ int Host::run()
// Macro to interrupt a running NXDN control channel transmission
#define INTERRUPT_NXDN_CONTROL \
if (nxdn != nullptr) { \
LogDebug(LOG_HOST, "interrupt NXDN control, m_state = %u", m_state); \
nxdn->setCCHalted(true); \
if (nxdnBcastDurationTimer.isRunning() && !nxdnBcastDurationTimer.isPaused()) { \
nxdnBcastDurationTimer.pause(); \
@ -928,7 +931,6 @@ int Host::run()
// if there is a P25 CC running; halt the CC
if (p25 != nullptr) {
if (p25->getCCRunning() && !p25->getCCHalted()) {
p25->setCCHalted(true);
INTERRUPT_P25_CONTROL;
}
}
@ -936,7 +938,6 @@ int Host::run()
// if there is a NXDN CC running; halt the CC
if (nxdn != nullptr) {
if (nxdn->getCCRunning() && !nxdn->getCCHalted()) {
nxdn->setCCHalted(true);
INTERRUPT_NXDN_CONTROL;
}
}
@ -975,7 +976,6 @@ int Host::run()
// if there is a P25 CC running; halt the CC
if (p25 != nullptr) {
if (p25->getCCRunning() && !p25->getCCHalted()) {
p25->setCCHalted(true);
INTERRUPT_P25_CONTROL;
}
}
@ -983,7 +983,6 @@ int Host::run()
// if there is a NXDN CC running; halt the CC
if (nxdn != nullptr) {
if (nxdn->getCCRunning() && !nxdn->getCCHalted()) {
nxdn->setCCHalted(true);
INTERRUPT_NXDN_CONTROL;
}
}
@ -1022,7 +1021,6 @@ int Host::run()
// if there is a NXDN CC running; halt the CC
if (nxdn != nullptr) {
if (nxdn->getCCRunning() && !nxdn->getCCHalted()) {
nxdn->setCCHalted(true);
INTERRUPT_NXDN_CONTROL;
}
}
@ -1097,7 +1095,6 @@ int Host::run()
// if there is a P25 CC running; halt the CC
if (p25 != nullptr) {
if (p25->getCCRunning() && !p25->getCCHalted()) {
p25->setCCHalted(true);
INTERRUPT_P25_CONTROL;
}
}
@ -1263,7 +1260,7 @@ int Host::run()
setState(STATE_P25);
INTERRUPT_DMR_BEACON;
INTERRUPT_P25_CONTROL;
//INTERRUPT_P25_CONTROL;
INTERRUPT_NXDN_CONTROL;
}
else {
@ -1306,7 +1303,7 @@ int Host::run()
bool ret = p25->processFrame(data, len);
if (ret) {
m_modeTimer.start();
INTERRUPT_P25_CONTROL;
//INTERRUPT_P25_CONTROL;
}
else {
ret = p25->writeRF_VoiceEnd();
@ -2049,17 +2046,12 @@ bool Host::createModem()
if (!modemConf["txLevel"].isNone()) {
cwIdTXLevel = dmrTXLevel = p25TXLevel = nxdnTXLevel = modemConf["txLevel"].as<float>(50.0F);
}
uint8_t packetPlayoutTime = (uint8_t)modemConf["packetPlayoutTime"].as<uint32_t>(10U);
bool disableOFlowReset = modemConf["disableOFlowReset"].as<bool>(false);
bool ignoreModemConfigArea = modemConf["ignoreModemConfigArea"].as<bool>(false);
bool dumpModemStatus = modemConf["dumpModemStatus"].as<bool>(false);
bool trace = modemConf["trace"].as<bool>(false);
bool debug = modemConf["debug"].as<bool>(false);
// make sure playout time is always greater than 1ms
if (packetPlayoutTime < 1U)
packetPlayoutTime = 1U;
if (rfPower == 0U) { // clamp to 1
rfPower = 1U;
}
@ -2175,7 +2167,6 @@ bool Host::createModem()
LogInfo(" DMR TX Level: %.1f%%", dmrTXLevel);
LogInfo(" P25 TX Level: %.1f%%", p25TXLevel);
LogInfo(" NXDN TX Level: %.1f%%", nxdnTXLevel);
LogInfo(" Packet Playout Time: %u ms", packetPlayoutTime);
LogInfo(" Disable Overflow Reset: %s", disableOFlowReset ? "yes" : "no");
if (m_useDFSI) {
@ -2196,7 +2187,7 @@ bool Host::createModem()
}
m_modem = new Modem(modemPort, m_duplex, rxInvert, txInvert, pttInvert, dcBlocker, cosLockout, fdmaPreamble, dmrRxDelay, p25CorrCount,
packetPlayoutTime, disableOFlowReset, ignoreModemConfigArea, dumpModemStatus, trace, debug);
disableOFlowReset, ignoreModemConfigArea, dumpModemStatus, trace, debug);
if (!m_modemRemote) {
m_modem->setModeParams(m_dmrEnabled, m_p25Enabled, m_nxdnEnabled);
m_modem->setLevels(rxLevel, cwIdTXLevel, dmrTXLevel, p25TXLevel, nxdnTXLevel);

@ -421,7 +421,7 @@ int HostCal::run()
p25::lc::TSBK::setWarnCRC(true);
p25::lc::tsbk::TSBKFactory::setWarnCRC(true);
m_modem = new Modem(modemPort, false, rxInvert, txInvert, pttInvert, dcBlocker, false, fdmaPreamble, dmrRxDelay, p25CorrCount, 10U, false, ignoreModemConfigArea, false, false, false);
m_modem = new Modem(modemPort, false, rxInvert, txInvert, pttInvert, dcBlocker, false, fdmaPreamble, dmrRxDelay, p25CorrCount, false, ignoreModemConfigArea, false, false, false);
m_modem->setLevels(rxLevel, txLevel, txLevel, txLevel, txLevel);
m_modem->setSymbolAdjust(dmrSymLevel3Adj, dmrSymLevel1Adj, p25SymLevel3Adj, p25SymLevel1Adj, nxdnSymLevel3Adj, nxdnSymLevel1Adj);
m_modem->setDCOffsetParams(txDCOffset, rxDCOffset);

@ -105,14 +105,13 @@ using namespace modem;
/// <param name="fdmaPreamble">Count of FDMA preambles to transmit before data. (P25/DMR DMO)</param>
/// <param name="dmrRxDelay">Compensate for delay in receiver audio chain in ms. Usually DSP based.</param>
/// <param name="p25CorrCount">P25 Correlation Countdown.</param>
/// <param name="packetPlayoutTime">Length of time in MS between packets to send to modem.</param>
/// <param name="disableOFlowReset">Flag indicating whether the ADC/DAC overflow reset logic is disabled.</param>
/// <param name="ignoreModemConfigArea">Flag indicating whether the modem configuration area is ignored.</param>
/// <param name="dumpModemStatus">Flag indicating whether the modem status is dumped to the log.</param>
/// <param name="trace">Flag indicating whether air interface modem trace is enabled.</param>
/// <param name="debug">Flag indicating whether air interface modem debug is enabled.</param>
Modem::Modem(port::IModemPort* port, bool duplex, bool rxInvert, bool txInvert, bool pttInvert, bool dcBlocker, bool cosLockout,
uint8_t fdmaPreamble, uint8_t dmrRxDelay, uint8_t p25CorrCount, uint8_t packetPlayoutTime, bool disableOFlowReset,
uint8_t fdmaPreamble, uint8_t dmrRxDelay, uint8_t p25CorrCount, bool disableOFlowReset,
bool ignoreModemConfigArea, bool dumpModemStatus, bool trace, bool debug) :
m_port(port),
m_protoVer(0U),

@ -217,7 +217,7 @@ namespace modem
public:
/// <summary>Initializes a new instance of the Modem class.</summary>
Modem(port::IModemPort* port, bool duplex, bool rxInvert, bool txInvert, bool pttInvert, bool dcBlocker, bool cosLockout,
uint8_t fdmaPreamble, uint8_t dmrRxDelay, uint8_t p25CorrCount, uint8_t packetPlayoutTime, bool disableOFlowReset,
uint8_t fdmaPreamble, uint8_t dmrRxDelay, uint8_t p25CorrCount, bool disableOFlowReset,
bool ignoreModemConfigArea, bool dumpModemStatus, bool trace, bool debug);
/// <summary>Finalizes a instance of the Modem class.</summary>
~Modem();

Loading…
Cancel
Save

Powered by TurnKey Linux.