mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-27 22:31:24 +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);
|
||||
state = 0;
|
||||
}
|
||||
else state = 2;
|
||||
else {
|
||||
setSignal(HIGH); // jitter prevention
|
||||
state = 2;
|
||||
}
|
||||
break;
|
||||
case 2: // 116us after case 0
|
||||
setSignal(LOW);
|
||||
state = 3;
|
||||
break;
|
||||
case 3: // finished sending zero bit
|
||||
setSignal(LOW); // jitter prevention
|
||||
state = 0;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user