From 22a8ccb75f679f48b100236b35ef1eee1994d3f6 Mon Sep 17 00:00:00 2001 From: Bryan Biedenkapp Date: Sat, 17 Aug 2024 10:43:25 -0400 Subject: [PATCH] partially revert Modem poll change to 250ms, partial because we're only reverting the poll time to 125ms (previous commit IDLE time); --- src/host/Host.cpp | 5 ++++- src/host/modem/Modem.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/host/Host.cpp b/src/host/Host.cpp index c102a7ef..3d1fda30 100644 --- a/src/host/Host.cpp +++ b/src/host/Host.cpp @@ -1656,7 +1656,10 @@ void* Host::threadModem(void* arg) host->m_modem->clock(ms); } - Thread::sleep(1U); + if (host->m_state != STATE_IDLE) + Thread::sleep(m_activeTickDelay); + if (host->m_state == STATE_IDLE) + Thread::sleep(m_idleTickDelay); } LogDebug(LOG_HOST, "[STOP] %s", threadName.c_str()); diff --git a/src/host/modem/Modem.h b/src/host/modem/Modem.h index 7764703a..eb52bec7 100644 --- a/src/host/modem/Modem.h +++ b/src/host/modem/Modem.h @@ -272,7 +272,7 @@ namespace modem const uint32_t MAX_ADC_OVERFLOW = 128U; const uint32_t MAX_DAC_OVERFLOW = 128U; - const uint32_t MODEM_POLL_TIME = 250U; + const uint32_t MODEM_POLL_TIME = 125U; /** @} */