mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-22 23:56:13 +01:00
fix typo and remove debug stuff
This commit is contained in:
parent
20512b0c63
commit
efce94058e
4
DCC.cpp
4
DCC.cpp
|
@ -257,11 +257,9 @@ void DCC::setAccessory(int address, byte number, bool activate) {
|
||||||
b[0] = address % 64 + 128;
|
b[0] = address % 64 + 128;
|
||||||
// second byte is of the form 1AAACDDD, where C should be 1, and the least significant D represent activate/deactivate
|
// second byte is of the form 1AAACDDD, where C should be 1, and the least significant D represent activate/deactivate
|
||||||
// if we follow RCN-213, activate has to be reversed because in DCC++/DCC-EX activate=1 is "thrown, diverging",
|
// if we follow RCN-213, activate has to be reversed because in DCC++/DCC-EX activate=1 is "thrown, diverging",
|
||||||
// but in RCN-213, 1 means "closed, straight" and 0 "thown, diverging"
|
// but in RCN-213, 1 means "closed, straight" and 0 "thrown, diverging"
|
||||||
#ifdef TURNOUTS_RCN_213
|
#ifdef TURNOUTS_RCN_213
|
||||||
activate = !activate;
|
activate = !activate;
|
||||||
#else
|
|
||||||
#error fooo
|
|
||||||
#endif
|
#endif
|
||||||
b[1] = ((((address / 64) % 8) << 4) + (number % 4 << 1) + activate % 2) ^ 0xF8;
|
b[1] = ((((address / 64) % 8) << 4) + (number % 4 << 1) + activate % 2) ^ 0xF8;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user