mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-23 21:01:25 +01:00
protect from setting unused pin
This commit is contained in:
parent
6d2a9e3b36
commit
79ef114c0d
@ -160,6 +160,8 @@ int MotorDriver::getCurrentRaw() {
|
||||
}
|
||||
|
||||
void MotorDriver::setDCSignal(byte speedcode) {
|
||||
if (brakePin == UNUSED_PIN)
|
||||
return;
|
||||
// spedcoode is a dcc speed /direction
|
||||
byte tSpeed=speedcode & 0x7F;
|
||||
// DCC Speed with 0,1 stop and speed steps 2 to 127
|
||||
|
Loading…
Reference in New Issue
Block a user