mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-26 17: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) {
|
void MotorDriver::throttleInrush(bool on) {
|
||||||
if (brakePin == UNUSED_PIN)
|
if (brakePin == UNUSED_PIN)
|
||||||
return;
|
return;
|
||||||
|
if ( !(trackMode & (TRACK_MODE_MAIN | TRACK_MODE_PROG | TRACK_MODE_EXT)))
|
||||||
|
return;
|
||||||
byte duty = on ? 208 : 0;
|
byte duty = on ? 208 : 0;
|
||||||
if (invertBrake)
|
if (invertBrake)
|
||||||
duty = 255-duty;
|
duty = 255-duty;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user