From 1b499b398f72ff16616d0a533c6acae4fc3f8cd0 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Thu, 2 Jul 2020 00:21:17 +0200 Subject: [PATCH] glcd: fix compiler warnings Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/e5d13896d653fb6873746ae359b0c0bb939dd625 Author: vanhofen Date: 2020-07-02 (Thu, 02 Jul 2020) Origin message was: ------------------ - glcd: fix compiler warnings --- src/driver/glcd/analogclock.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/driver/glcd/analogclock.cpp b/src/driver/glcd/analogclock.cpp index eb3a80c69..49ca640bb 100644 --- a/src/driver/glcd/analogclock.cpp +++ b/src/driver/glcd/analogclock.cpp @@ -116,11 +116,11 @@ void RenderClock(int x, int y) cglcd->imageShow(file[ANALOG_CLOCK], x, y, 0, 0, false, true, false, false, false); } -void RenderHands(int hour, int min, int sec, int posx, int posy, int hour_size, int min_size, int sec_size) +void RenderHands(int hour, int min, int sec, int posx, int posy, int hour_size, int min_size, int /*sec_size*/) { cGLCD *cglcd = cGLCD::getInstance(); - int time_sec, time_min, time_hour, sec_x, sec_y, min_x, min_y, hour_x, hour_y, dia; + int time_sec, time_min, time_hour, /*sec_x, sec_y,*/ min_x, min_y, hour_x, hour_y, dia; double pi = 3.1415926535897932384626433832795, sAngleInRad, mAngleInRad, mAngleSave, hAngleInRad; time_sec = sec; @@ -132,8 +132,10 @@ void RenderHands(int hour, int min, int sec, int posx, int posy, int hour_size, sAngleInRad = ((6 * time_sec) * (2 * pi / 360)); sAngleInRad -= pi / 2; + /* sec_x = int((dia * 0.9 * cos(sAngleInRad))); sec_y = int((dia * 0.9 * sin(sAngleInRad))); + */ mAngleInRad = ((6 * time_min) * (2 * pi / 360)); mAngleSave = mAngleInRad;