mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-23 12:51:24 +01:00
prevent DC addr 0
This commit is contained in:
parent
75b16c9047
commit
4f2dc0934f
@ -2,7 +2,7 @@
|
||||
* © 2022 Chris Harlow
|
||||
* All rights reserved.
|
||||
*
|
||||
* This file is part of Asbelos DCC API
|
||||
* This file is part of DCC++EX
|
||||
*
|
||||
* This is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -150,7 +150,7 @@ bool TrackManager::parseJ(Print *stream, int16_t params, int16_t p[])
|
||||
if (params==2 && p[1]==HASH_KEYWORD_OFF) // <= id OFF>
|
||||
return setTrackMode(p[0],TRACK_MODE_OFF);
|
||||
|
||||
if (params==3 && p[1]==HASH_KEYWORD_DC) // <= id DC cab>
|
||||
if (params==3 && p[1]==HASH_KEYWORD_DC && p[2]>0) // <= id DC cab>
|
||||
return setTrackMode(p[0],p[2]);
|
||||
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user