mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-27 01:56:14 +01:00
Update DCCWaveform.cpp (#109)
Anti-jitter Prevents main track interrupt taking a variable time which causes prog track jitter.
This commit is contained in:
parent
883ac61fc7
commit
c8bf4347c2
|
@ -188,13 +188,17 @@ bool DCCWaveform::interrupt1() {
|
||||||
setSignal(LOW);
|
setSignal(LOW);
|
||||||
state = 0;
|
state = 0;
|
||||||
}
|
}
|
||||||
else state = 2;
|
else {
|
||||||
|
setSignal(HIGH); // jitter prevention
|
||||||
|
state = 2;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 2: // 116us after case 0
|
case 2: // 116us after case 0
|
||||||
setSignal(LOW);
|
setSignal(LOW);
|
||||||
state = 3;
|
state = 3;
|
||||||
break;
|
break;
|
||||||
case 3: // finished sending zero bit
|
case 3: // finished sending zero bit
|
||||||
|
setSignal(LOW); // jitter prevention
|
||||||
state = 0;
|
state = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user