1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-12-23 21:01:25 +01:00

clearer binary arith.

This commit is contained in:
Harald Barth 2021-03-16 23:20:30 +01:00
parent 46d0304ce0
commit 2f860e594c

View File

@ -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