mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-22 15:46:14 +01:00
restrict to relevant TRACK_MODE(s)
This commit is contained in:
parent
94648ead28
commit
c2eb5f23b4
|
@ -1 +1 @@
|
|||
#define GITHUB_SHA "devel-202307170030Z"
|
||||
#define GITHUB_SHA "devel-202307170741Z"
|
||||
|
|
|
@ -350,6 +350,8 @@ void MotorDriver::setDCSignal(byte speedcode) {
|
|||
void MotorDriver::throttleInrush(bool on) {
|
||||
if (brakePin == UNUSED_PIN)
|
||||
return;
|
||||
if ( !(trackMode & (TRACK_MODE_MAIN | TRACK_MODE_PROG | TRACK_MODE_EXT)))
|
||||
return;
|
||||
byte duty = on ? 208 : 0;
|
||||
if (invertBrake)
|
||||
duty = 255-duty;
|
||||
|
|
Loading…
Reference in New Issue
Block a user