Commit 26b345f
committed
Fixed bug in short-circuit detection for MEGA
The short-circuit code polled the track current every 10
“milliseconds.” But Arduino millis() is based on TIMER-0 settings
which are changed in DCC++ Base Station. The actual polling was closer
to every 1 millisecond. When Base Station for the Mega for updated to
utilize TIMER-3 instead of TIMER-0, the millis() function now really
did count milliseconds, and 10 milliseconds between each track-current
sampling was too long. Changed the code so that for the Mega, the
current sampling time is defined as 1 (instead of 10), representing an
actual 1 millisecond as desired.1 parent a21c978 commit 26b345f
2 files changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
19 | 24 | | |
20 | 25 | | |
21 | 26 | | |
| |||
0 commit comments