mirror of
https://github.com/g4klx/MMDVM.git
synced 2026-10-23 02:55:01 +02:00
Disassociate the ADC overload detection from the DCD LED.
This commit is contained in:
@@ -120,6 +120,7 @@ m_txLevel(128 * 128),
|
||||
m_ledCount(0U),
|
||||
m_ledValue(true),
|
||||
m_dcd(false),
|
||||
m_detect(false),
|
||||
m_overflow(0U),
|
||||
m_overcount(0U),
|
||||
m_count(0U),
|
||||
@@ -299,7 +300,7 @@ void CIO::process()
|
||||
m_rxBuffer.get(sample, control[i]);
|
||||
|
||||
// Detect ADC overflow
|
||||
if (m_dcd && (sample == 0U || sample == 4095U))
|
||||
if (m_detect && (sample == 0U || sample == 4095U))
|
||||
m_overflow++;
|
||||
m_overcount++;
|
||||
|
||||
@@ -449,6 +450,11 @@ void CIO::setDecode(bool dcd)
|
||||
m_dcd = dcd;
|
||||
}
|
||||
|
||||
void CIO::setADCDetection(bool detect)
|
||||
{
|
||||
m_detect = detect;
|
||||
}
|
||||
|
||||
void CIO::setMode()
|
||||
{
|
||||
#if !defined(__MBED__)
|
||||
|
||||
Reference in New Issue
Block a user