mirror of
https://github.com/g4klx/MMDVM.git
synced 2026-04-04 14:08:33 +00:00
Disassociate the ADC overload detection from the DCD LED.
This commit is contained in:
parent
d4e56965da
commit
b8457aed4c
6 changed files with 42 additions and 9 deletions
8
IO.cpp
8
IO.cpp
|
|
@ -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__)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue