Intel vs Motorola format was backwards in the program. This has been

corrected. Any older DBC files saved by this program will need to be
updated to compensate.
This commit is contained in:
Collin Kidder
2015-07-21 18:32:20 -04:00
parent b3e8562a45
commit 92176bbe92
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -519,7 +519,7 @@ QString DBCHandler::processSignal(const CANFrame &frame, const DBC_SIGNAL &sig)
startBit = sig.startBit;
startByte = startBit / 8;
bitWithinByteStart = startBit % 8;
if (sig.intelByteOrder)
if (!sig.intelByteOrder)
{
bitWithinByteStart = 7 - bitWithinByteStart;
startBit = (startByte * 8) + bitWithinByteStart;
@@ -539,7 +539,7 @@ QString DBCHandler::processSignal(const CANFrame &frame, const DBC_SIGNAL &sig)
bitsToGo = sig.signalSize - 1;
multiplier = 1;
if (sig.intelByteOrder)
if (!sig.intelByteOrder)
{
for (int y = startByte; y < endByte; y++) multiplier *= 256;
}
@@ -563,7 +563,7 @@ QString DBCHandler::processSignal(const CANFrame &frame, const DBC_SIGNAL &sig)
result += processByte(frame.data[b], sBit, eBit) * multiplier;
//add to multiplier
if (!sig.intelByteOrder)
if (sig.intelByteOrder)
multiplier = multiplier << 8;
else
multiplier = multiplier >> 8;