mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-23 08:06:13 +01:00
clearer binary arith.
This commit is contained in:
parent
46d0304ce0
commit
2f860e594c
2
DCC.cpp
2
DCC.cpp
|
@ -101,7 +101,7 @@ void DCC::setThrottle2( uint16_t cab, byte speedCode) {
|
|||
}
|
||||
// Construct command byte from:
|
||||
// command speed direction
|
||||
b[nB++] = 0b01000000 | code28 | (0b00100000 * (speedCode & 0x80));
|
||||
b[nB++] = 0b01000000 | code28 | ((speedCode & 0x80) ? 0b00100000 : 0);
|
||||
|
||||
} else { // 128 speedsteps
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user