From 5b6d10d517f76a18f0bf8173b1fc156c9d04632a Mon Sep 17 00:00:00 2001 From: Bryan Biedenkapp Date: Wed, 31 Jul 2024 13:19:58 -0400 Subject: [PATCH] implement missing cal options; --- src/fw/hotspot | 2 +- src/fw/modem | 2 +- src/host/calibrate/HostCal.cpp | 59 ++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 2 deletions(-) diff --git a/src/fw/hotspot b/src/fw/hotspot index 13e51c67..40f9083e 160000 --- a/src/fw/hotspot +++ b/src/fw/hotspot @@ -1 +1 @@ -Subproject commit 13e51c67719f4983be7504967baf591f21375cb7 +Subproject commit 40f9083e6117c48761f61d3a873a167e1f74b0b4 diff --git a/src/fw/modem b/src/fw/modem index 041bd856..5623f5c5 160000 --- a/src/fw/modem +++ b/src/fw/modem @@ -1 +1 @@ -Subproject commit 041bd8563ef68d75c69acbab25a517921b5d8015 +Subproject commit 5623f5c5ec7bcc777850bbcc83414a64e44fadb0 diff --git a/src/host/calibrate/HostCal.cpp b/src/host/calibrate/HostCal.cpp index ded811b2..acbcec34 100644 --- a/src/host/calibrate/HostCal.cpp +++ b/src/host/calibrate/HostCal.cpp @@ -242,6 +242,65 @@ int HostCal::run(int argc, char **argv) } break; + case 'X': + { + char value[5] = { '\0' }; + ::fprintf(stdout, "> FDMA Preambles [%u] ? ", m_modem->m_fdmaPreamble); + ::fflush(stdout); + + m_console.getLine(value, 5, 0); + if (value[0] != '\0') { + // bryanb: appease the compiler... + uint32_t fdmaPreamble = m_modem->m_fdmaPreamble; + sscanf(value, "%u", &fdmaPreamble); + + m_modem->m_fdmaPreamble = (uint8_t)fdmaPreamble; + + writeConfig(); + } + } + break; + + case 'W': + { + char value[5] = { '\0' }; + ::fprintf(stdout, "> DMR Rx Delay [%u] ? ", m_modem->m_dmrRxDelay); + ::fflush(stdout); + + m_console.getLine(value, 5, 0); + if (value[0] != '\0') { + // bryanb: appease the compiler... + uint32_t dmrRxDelay = m_modem->m_dmrRxDelay; + sscanf(value, "%u", &dmrRxDelay); + + m_modem->m_dmrRxDelay = (uint8_t)dmrRxDelay; + + writeConfig(); + } + } + break; + + case 'w': + { + if (!m_isHotspot) { + char value[5] = { '\0' }; + ::fprintf(stdout, "> P25 Correlation Count [%u] ? ", m_modem->m_p25CorrCount); + ::fflush(stdout); + + m_console.getLine(value, 5, 0); + if (value[0] != '\0') { + // bryanb: appease the compiler... + uint32_t p25CorrCount = m_modem->m_p25CorrCount; + sscanf(value, "%u", &p25CorrCount); + + m_modem->m_p25CorrCount = (uint8_t)p25CorrCount; + + writeConfig(); + } + } + } + break; + case 'F': { char value[10] = { '\0' };