1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-07-28 09:53:45 +02:00

prevent usage of pins for DC than can not do PWM

This commit is contained in:
Harald Barth
2022-05-25 09:28:28 +02:00
parent 1c78792dda
commit 06e7ad5c53
3 changed files with 5 additions and 5 deletions

View File

@@ -139,8 +139,8 @@ bool TrackManager::setTrackMode(byte trackToSet, TRACK_MODE mode, int16_t dcAddr
//DIAG(F("Track=%c"),trackToSet+'A');
// DC tracks require a motorDriver that can set brake!
if ((mode==TRACK_MODE_DC || mode==TRACK_MODE_DCX)
&& !track[trackToSet]->canBrake()) {
DIAG(F("No brake:no DC"));
&& !track[trackToSet]->brakeCanPWM()) {
DIAG(F("Brake pin can't PWM: No DC"));
return false;
}