Fixed an issue with there being no visual confirmation that intel byte mode had been changed in DBC editor, made masking work much more intuitively in graphing screen.

This commit is contained in:
Collin Kidder
2015-07-13 20:39:00 -04:00
parent 159f4c5d6f
commit 9b1d752a02
3 changed files with 17 additions and 4 deletions
+14 -2
View File
@@ -426,14 +426,20 @@ void GraphingWindow::createGraph(GraphParams &params, bool createGraphParam)
int tempValInt;
int numBytes = (params.endByte - params.startByte) + 1;
int shiftRef = 1 << (numBytes * 8);
uint64_t maskShifter;
uint8_t tempByte;
for (int j = 0; j < numEntries; j++)
{
tempValInt = 0;
int expon = 1;
maskShifter = params.mask;
for (int c = 0; c < numBytes; c++)
{
tempValInt += (frameCache[j * params.stride].data[params.endByte - c] * expon);
tempByte = frameCache[j * params.stride].data[params.endByte - c];
tempByte &= maskShifter;
tempValInt += (tempByte * expon);
expon *= 256;
maskShifter = maskShifter >> 8;
}
tempValInt &= params.mask;
@@ -467,14 +473,20 @@ void GraphingWindow::createGraph(GraphParams &params, bool createGraphParam)
int tempValInt;
int numBytes = (params.startByte - params.endByte) + 1;
int shiftRef = 1 << (numBytes * 8);
uint64_t maskShifter;
uint8_t tempByte;
for (int j = 0; j < numEntries; j++)
{
tempValInt = 0;
int expon = 1;
maskShifter = params.mask;
for (int c = 0; c < numBytes; c++)
{
tempValInt += frameCache[j * params.stride].data[params.endByte + c] * expon;
tempByte = frameCache[j * params.stride].data[params.endByte + c];
tempByte &= maskShifter;
tempValInt += tempByte * expon;
expon *= 256;
maskShifter = maskShifter >> 8;
}
tempValInt &= params.mask;