mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-07-28 09:53:45 +02:00
withrottle changes
disallow acquire if address in use return error on address 0 and mismatched L/S move init string to 'HU' reply some message format fixes comment-out some DIAGs to show only in and out message traffic
This commit is contained in:
9
DCC.cpp
9
DCC.cpp
@@ -95,6 +95,15 @@ bool DCC::getThrottleDirection(int cab) {
|
||||
return (speedTable[reg].speedCode & 0x80) !=0;
|
||||
}
|
||||
|
||||
bool DCC::isThrottleInUse(int locoId) {
|
||||
// return true if this loco address is already in table, false otherwise
|
||||
int reg;
|
||||
for (reg = 0; reg < MAX_LOCOS; reg++) {
|
||||
if (speedTable[reg].loco == locoId) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Set function to value on or off
|
||||
void DCC::setFn( int cab, byte functionNumber, bool on) {
|
||||
if (cab<=0 || functionNumber>28) return;
|
||||
|
Reference in New Issue
Block a user