Closed Jueff closed 3 years ago
Hi Jueff,
You are right. The two lines of code after
// enable level checking
should be active for all processors. So the #endif
must be shifted 3 lines up.
In all other cases where the ISR edge is changed and this two variables are set it is correct.
Regards Franz-Peter
I've committed this change - thanks
sometimes ESP32 runs into the problem, that no DCC data are processed anymore.
I found out that in error state we have
so this code
if ( bitMicros < bitMin || ( DccRx.State != WAIT_START_BIT && digitalRead( DccProcState.ExtIntPinNum ) != (ISRLevel) ) ) {
will always detect a short bit, because when interrupt filter is RISING the ExtIntPinNum will never be 0. This fault situation needs a reboot.It seems that the problems comes from this code
because ISRChkMask and ISRLevel are not set correctly (in ESP32 case)
The fixed code could look like this - but maybe it's not the only location where levels aren't set correctly.