Fix curves display on colorlcd (#8057)

This commit is contained in:
3djc
2020-10-24 18:46:34 +02:00
committed by GitHub
parent 9272029ec2
commit c9565f3f0f
+2 -2
View File
@@ -111,11 +111,11 @@ void drawCursor(FnFuncP fn)
}
x = limit(-1024, x, 1024);
int y = limit<int>(-1024, applyCurrentCurve(x), 1024);
int y = limit<int>(-1024, fn(x), 1024);
strAppendSigned(texty, calcRESXto100(y));
x = divRoundClosest(x * CURVE_SIDE_WIDTH, RESX);
y = CURVE_CENTER_Y + getCurveYCoord(applyCurrentCurve, x, CURVE_SIDE_WIDTH);
y = CURVE_CENTER_Y + getCurveYCoord(fn, x, CURVE_SIDE_WIDTH);
lcdDrawSolidFilledRect(CURVE_CENTER_X + x, CURVE_CENTER_Y - CURVE_SIDE_WIDTH, 2, 2 * CURVE_SIDE_WIDTH + 2, CURVE_CURSOR_COLOR);
lcdDrawSolidFilledRect(CURVE_CENTER_X - CURVE_SIDE_WIDTH-2, y-1, 2*CURVE_SIDE_WIDTH + 2, 2, CURVE_CURSOR_COLOR);