Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information