Actually two for SWAP_UINT16 :)

This commit is contained in:
Andrey 2021-06-21 10:47:43 -04:00
parent 498358247e
commit 31a62d664f
1 changed files with 1 additions and 1 deletions

View File

@ -156,7 +156,7 @@ void canMazdaRX8(CanCycle cycle) {
float kph = getVehicleSpeed();
int rpm = GET_RPM();
// do not pass function as macro parameter that would cause same code to be invoked 4 times!
// do not pass function as macro parameter that would cause same code to be invoked 2 times!
msg.setShortValue(SWAP_UINT16(rpm * 4), 0);
msg.setShortValue(0xFFFF, 2);
msg.setShortValue(SWAP_UINT16((int )(100 * kph + 10000)), 4);