Fixed graphing window to properly graph things that are signed
but don't exist on clean byte boundaries, updated version num.
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
#ifndef CONFIG
|
#ifndef CONFIG
|
||||||
#define CONFIG
|
#define CONFIG
|
||||||
|
|
||||||
#define VERSION 124
|
#define VERSION 125
|
||||||
|
|
||||||
//try to keep this in sync.
|
//try to keep this in sync.
|
||||||
//SavvyCAN will complain if you connect a GVRET board with a revision
|
//SavvyCAN will complain if you connect a GVRET board with a revision
|
||||||
|
|||||||
+8
-4
@@ -554,9 +554,11 @@ void GraphingWindow::createGraph(GraphParams ¶ms, bool createGraphParam)
|
|||||||
|
|
||||||
tempValInt &= params.mask;
|
tempValInt &= params.mask;
|
||||||
|
|
||||||
if (params.isSigned && tempValInt > ((shiftRef / 2) - 1))
|
long long twocompPoint = params.mask;
|
||||||
|
if (shiftRef < twocompPoint) twocompPoint = shiftRef;
|
||||||
|
if (params.isSigned && tempValInt > ((twocompPoint / 2) - 1))
|
||||||
{
|
{
|
||||||
tempValInt = tempValInt - shiftRef;
|
tempValInt = tempValInt - twocompPoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
tempValue = (float)tempValInt;
|
tempValue = (float)tempValInt;
|
||||||
@@ -600,9 +602,11 @@ void GraphingWindow::createGraph(GraphParams ¶ms, bool createGraphParam)
|
|||||||
}
|
}
|
||||||
tempValInt &= params.mask;
|
tempValInt &= params.mask;
|
||||||
|
|
||||||
if (params.isSigned && tempValInt > ((shiftRef / 2) - 1))
|
long long twocompPoint = params.mask;
|
||||||
|
if (shiftRef < twocompPoint) twocompPoint = shiftRef;
|
||||||
|
if (params.isSigned && tempValInt > ((twocompPoint / 2) - 1))
|
||||||
{
|
{
|
||||||
tempValInt = tempValInt - shiftRef;
|
tempValInt = tempValInt - twocompPoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
tempValue = (float)tempValInt;
|
tempValue = (float)tempValInt;
|
||||||
|
|||||||
Reference in New Issue
Block a user