libClearCore/src/DigitalIn.cpp
void DigitalIn::Refresh() {
    if (*m_changeRegPtr & m_inputDataMask) {
        m_filterTicksLeft = m_filterLength;

        if (!m_filterLength) {
            // If the filter length is zero, set the filtered state
            UpdateFilterState();
        }
    }
    else if (m_filterTicksLeft && !--m_filterTicksLeft) {
        // When we decrement to zero, set the filtered state
        UpdateFilterState();
    }
}
/**
    Set connector's internal state and update filtering if required.
**/
Set connector's internal state and update filtering if required.
Set connector ' s internal state and update filtering if required .
void DigitalIn::Refresh() {
    if (*m_changeRegPtr & m_inputDataMask) {
        m_filterTicksLeft = m_filterLength;
        if (!m_filterLength) {
            UpdateFilterState();
        }
    }
    else if (m_filterTicksLeft && !--m_filterTicksLeft) {
        UpdateFilterState();
    }
}
void DigitalIn :: Refresh ( ) { if ( * m_changeRegPtr & m_inputDataMask ) { m_filterTicksLeft = m_filterLength ; if ( ! m_filterLength ) { UpdateFilterState ( ) ; } } else if ( m_filterTicksLeft && ! -- m_filterTicksLeft ) { UpdateFilterState ( ) ; } }
Set connector's internal state and update filtering if required.
Set connector ' s internal state and update filtering if required .
// If the filter length is zero, set the filtered state // When we decrement to zero, set the filtered state