From 88116856d41797c2eabedad93f957b58d34998c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Esmit=20Pe=CC=81rez=20C?= Date: Sun, 14 Sep 2014 10:18:00 -0500 Subject: [PATCH] Code cleanups for previous refactoring --- MicroView.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/MicroView.cpp b/MicroView.cpp index a201dd8..950e99c 100644 --- a/MicroView.cpp +++ b/MicroView.cpp @@ -1702,20 +1702,7 @@ void MicroViewGauge::draw() { needFirstDraw=false; } else { - degreeSec = ((float)(uint16_t)(prevValue-getMinValue())/(float)(uint16_t)(getMaxValue()-getMinValue()))*240; // total 240 degree in the widget - degreeSec = (degreeSec+150) * (PI/180); // 150 degree starting point - toSecX = cos(degreeSec) * (radius / 1.2); - toSecY = sin(degreeSec) * (radius / 1.2); - uView.line(offsetX,offsetY,1+offsetX+toSecX,1+offsetY+toSecY, WHITE,XOR); - - // Draw previous pointer in XOR mode to erase it - degreeSec = ((float)(uint16_t)(prevValue-getMinValue())/(float)(uint16_t)(getMaxValue()-getMinValue()))*240; // total 240 degree in the widget - degreeSec = (degreeSec+150) * (PI/180); - toSecX = cos(degreeSec) * (radius / 1.2); - toSecY = sin(degreeSec) * (radius / 1.2); - uView.line(offsetX,offsetY,1+offsetX+toSecX,1+offsetY+toSecY, WHITE,XOR); - - // draw current pointer + /// draw current pointer degreeSec = ((float)(uint16_t)(getValue()-getMinValue())/(float)(uint16_t)(getMaxValue()-getMinValue()))*240; // total 240 degree in the widget degreeSec = (degreeSec+150) * (PI/180); // 150 degree starting point toSecX = cos(degreeSec) * (radius / 1.2);