slight adjustments to cal and setup for dvmbbsdr support;

pull/121/merge
Bryan Biedenkapp 3 weeks ago
parent 12d8d5f313
commit 436bbf634e

@ -600,9 +600,38 @@ system:
nxdnFifoLength: 538 nxdnFifoLength: 538
# #
# Hotspot Modem Configuration # Hotspot/SDR-based Modem Configuration
# #
hotspot: hotspot:
#
# Automatic Frequency Control Configuration
# (This applies to both the ADF7021 based hotspots and SDR based modems, as the same AFC algorithm is
# applied to both types of modems in DVM.)
#
# Flag indicating whether the ADF7021's automatic frequency correction is enabled.
afcEnable: true
# Don't change this. See the ADF7021 datasheet for more information.
afcKI: 13
# Don't change this. See the ADF7021 datasheet for more information.
afcKP: 5
# Sets the maximum frequency correction range of the ADF7021.
# (It is highly recommended *not* to alter this.)
afcRange: 1
#
# Frequency Offset Configuration
# (This applies to both the ADF7021 based hotspots and SDR based modems, as the same frequency offset
# is applied to both types of modems in DVM.)
#
# Sets the transmit frequency offset. (in Hz)
txTuning: 0
# Sets the receive frequency offset. (in Hz)
rxTuning: 0
#
# Discriminator and Post Demodulator Bandwidth Adjustment Configuration
# (ADF7021 Hotspot only, this does not apply to SDR based modems.)
#
# DMR Discriminator Bandwidth Adjustment. # DMR Discriminator Bandwidth Adjustment.
dmrDiscBWAdj: 0 # Valid values between -128 and 128 dmrDiscBWAdj: 0 # Valid values between -128 and 128
# DMR Post Demodulator Bandwidth Adjustment. # DMR Post Demodulator Bandwidth Adjustment.
@ -615,21 +644,13 @@ system:
nxdnDiscBWAdj: 0 # Valid values between -128 and 128 nxdnDiscBWAdj: 0 # Valid values between -128 and 128
# NXDN Post Demodulator Bandwidth Adjustment. # NXDN Post Demodulator Bandwidth Adjustment.
nxdnPostBWAdj: 0 # Valid values between -128 and 128 nxdnPostBWAdj: 0 # Valid values between -128 and 128
#
# LNA Gain Mode Configuration
# (ADF7021 Hotspot only, this does not apply to SDR based modems.)
#
# LNA Gain Mode. # LNA Gain Mode.
adfGainMode: 2 # 0 - Auto, 1 - Auto High Lin, 2 - Low, 3 - High adfGainMode: 2 # 0 - Auto, 1 - Auto High Lin, 2 - Low, 3 - High
# Flag indicating whether the ADF7021's automatic frequency correction is enabled.
afcEnable: true
# Don't change this. See the ADF7021 datasheet for more information.
afcKI: 13
# Don't change this. See the ADF7021 datasheet for more information.
afcKP: 5
# Sets the maximum frequency correction range of the ADF7021.
# (It is highly recommended *not* to alter this.)
afcRange: 1
# Sets the transmit frequency offset. (in Hz)
txTuning: 0
# Sets the receive frequency offset. (in Hz)
rxTuning: 0
# #
# Repeater Modem Configuration # Repeater Modem Configuration

@ -798,11 +798,11 @@ void HostCal::displayHelp()
if (!m_isHotspot) { if (!m_isHotspot) {
LogInfoEx(LOG_CAL, " w Set P25 Correlation Count"); LogInfoEx(LOG_CAL, " w Set P25 Correlation Count");
} }
if (m_isHotspot) { if (m_isHotspot || m_isPTY) {
LogInfoEx(LOG_CAL, " F Set Rx Frequency Adjustment"); LogInfoEx(LOG_CAL, " F Set Rx Frequency Adjustment");
LogInfoEx(LOG_CAL, " f Set Tx Frequency Adjustment"); LogInfoEx(LOG_CAL, " f Set Tx Frequency Adjustment");
} }
if (!m_isHotspot) { if (!m_isHotspot && !m_isPTY) {
LogInfoEx(LOG_CAL, " 1/2 Increase/Decrease receive coarse level"); LogInfoEx(LOG_CAL, " 1/2 Increase/Decrease receive coarse level");
LogInfoEx(LOG_CAL, " 3/4 Increase/Decrease receive fine level"); LogInfoEx(LOG_CAL, " 3/4 Increase/Decrease receive fine level");
LogInfoEx(LOG_CAL, " 5/6 Increase/Decrease transmit coarse level"); LogInfoEx(LOG_CAL, " 5/6 Increase/Decrease transmit coarse level");
@ -1055,6 +1055,12 @@ void HostCal::printStatus()
m_modem->m_nxdnSymLevel3Adj, m_modem->m_nxdnSymLevel1Adj); m_modem->m_nxdnSymLevel3Adj, m_modem->m_nxdnSymLevel1Adj);
} }
} }
if (m_isHotspot || m_isPTY) {
LogInfoEx(LOG_CAL, " - AFC Enabled: %u, AFC KI: %u, AFC KP: %u, AFC Range: %u",
m_modem->m_afcEnable, m_modem->m_afcKI, m_modem->m_afcKP, m_modem->m_afcRange);
}
if (m_isHotspot) { if (m_isHotspot) {
LogInfoEx(LOG_CAL, " - DMR Disc. BW: %d, P25 Disc. BW: %d, DMR Post Demod BW: %d, P25 Post Demod BW: %d", LogInfoEx(LOG_CAL, " - DMR Disc. BW: %d, P25 Disc. BW: %d, DMR Post Demod BW: %d, P25 Post Demod BW: %d",
m_modem->m_dmrDiscBWAdj, m_modem->m_p25DiscBWAdj, m_modem->m_dmrPostBWAdj, m_modem->m_p25PostBWAdj); m_modem->m_dmrDiscBWAdj, m_modem->m_p25DiscBWAdj, m_modem->m_dmrPostBWAdj, m_modem->m_p25PostBWAdj);
@ -1063,9 +1069,6 @@ void HostCal::printStatus()
if (m_modem->getVersion() >= 3U) { if (m_modem->getVersion() >= 3U) {
LogInfoEx(LOG_CAL, " - NXDN Disc. BW: %d, NXDN Post Demod BW: %d", LogInfoEx(LOG_CAL, " - NXDN Disc. BW: %d, NXDN Post Demod BW: %d",
m_modem->m_nxdnDiscBWAdj, m_modem->m_nxdnPostBWAdj); m_modem->m_nxdnDiscBWAdj, m_modem->m_nxdnPostBWAdj);
LogInfoEx(LOG_CAL, " - AFC Enabled: %u, AFC KI: %u, AFC KP: %u, AFC Range: %u",
m_modem->m_afcEnable, m_modem->m_afcKI, m_modem->m_afcKP, m_modem->m_afcRange);
} }
switch (m_modem->m_adfGainMode) { switch (m_modem->m_adfGainMode) {

@ -66,7 +66,7 @@ private:
*/ */
void initLayout() override void initLayout() override
{ {
FDialog::setText("Hotspot Gain & AFC Adjustment"); FDialog::setText("AFC & Hotspot Gain Adjustment");
FDialog::setSize(FSize{50, 22}); FDialog::setSize(FSize{50, 22});
AdjustWndBase::initLayout(); AdjustWndBase::initLayout();
@ -183,6 +183,10 @@ private:
}); });
} }
if (m_setup->m_isPTY) {
m_gainButtonGroup.setDisable();
}
AdjustWndBase::initControls(); AdjustWndBase::initControls();
} }
}; };

@ -60,7 +60,7 @@ private:
FLabel m_dmrRxDelayLabel{"DMR Rx Delay: ", this}; FLabel m_dmrRxDelayLabel{"DMR Rx Delay: ", this};
FLabel m_p25CorrCountLabel{"P25 Corr. Count: ", this}; FLabel m_p25CorrCountLabel{"P25 Corr. Count: ", this};
FLabel m_freqAdjustLabel{"Hotspot Frequency Offset", this}; FLabel m_freqAdjustLabel{"Hotspot/SDR Frequency Offset", this};
FLabel m_rxFreqAdjLabel{"Rx Freq. Offset: ", this}; FLabel m_rxFreqAdjLabel{"Rx Freq. Offset: ", this};
FLabel m_txFreqAdjLabel{"Tx Freq. Offset: ", this}; FLabel m_txFreqAdjLabel{"Tx Freq. Offset: ", this};
@ -303,8 +303,14 @@ private:
m_txCoarseLevel.setEnable(); m_txCoarseLevel.setEnable();
m_rssiCoarseLevel.setEnable(); m_rssiCoarseLevel.setEnable();
m_rxTuning.setDisable(); if (m_setup->m_isPTY) {
m_txTuning.setDisable(); m_rxTuning.setEnable();
m_txTuning.setEnable();
}
else {
m_rxTuning.setDisable();
m_txTuning.setDisable();
}
} }
} }

@ -558,6 +558,10 @@ public:
m_adjSymLevel.setEnable(); m_adjSymLevel.setEnable();
m_adjHSBandwidth.setDisable(); m_adjHSBandwidth.setDisable();
m_adjHSGain.setDisable(); m_adjHSGain.setDisable();
if (m_setup->m_isPTY) {
m_adjHSGain.setEnable();
}
} }
} }
} }
@ -626,7 +630,7 @@ private:
FMenu m_engineeringMenu{"&Engineering", &m_menuBar}; FMenu m_engineeringMenu{"&Engineering", &m_menuBar};
FMenuItem m_adjSymLevel{"&Symbol Level Adjustment", &m_engineeringMenu}; FMenuItem m_adjSymLevel{"&Symbol Level Adjustment", &m_engineeringMenu};
FMenuItem m_adjHSBandwidth{"Hotspot &Bandwidth Adjustment", &m_engineeringMenu}; FMenuItem m_adjHSBandwidth{"Hotspot &Bandwidth Adjustment", &m_engineeringMenu};
FMenuItem m_adjHSGain{"Hotspot &Gain & AFC", &m_engineeringMenu}; FMenuItem m_adjHSGain{"AFC and Hotspot &Gain", &m_engineeringMenu};
FMenuItem m_engineeringMenuSeparator1{&m_engineeringMenu}; FMenuItem m_engineeringMenuSeparator1{&m_engineeringMenu};
FMenuItem m_adjFifoBuffers{"&FIFO Buffers", &m_engineeringMenu}; FMenuItem m_adjFifoBuffers{"&FIFO Buffers", &m_engineeringMenu};
FMenuItem m_engineeringMenuSeparator3{&m_engineeringMenu}; FMenuItem m_engineeringMenuSeparator3{&m_engineeringMenu};
@ -733,12 +737,17 @@ private:
m_setup->writeRFParams(); m_setup->writeRFParams();
m_setup->getStatus(); m_setup->getStatus();
uint8_t timeout = 0U; uint32_t timeout = 0U;
uint32_t maxTimeout = 75U; // ~375ms
if (m_setup->m_isPTY) {
maxTimeout = 2000U; // ~10s for PTY which can be slower to respond depending on SDR startup
}
while (!m_setup->m_hasFetchedStatus) { while (!m_setup->m_hasFetchedStatus) {
m_setup->m_modem->clock(0U); m_setup->m_modem->clock(0U);
timeout++; timeout++;
if (timeout >= 75U) { if (timeout >= maxTimeout) {
break; break;
} }

Loading…
Cancel
Save

Powered by TurnKey Linux.