From 7eb6faa25d99645d7e85d17ce2b41bc21525488e Mon Sep 17 00:00:00 2001 From: czeppi Date: Mon, 3 Mar 2025 07:50:30 +0100 Subject: [PATCH] fix two small syntax errors --- apps/cc_clock24/app.js | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/apps/cc_clock24/app.js b/apps/cc_clock24/app.js index 945a1c4b4..b1a4dd3f8 100644 --- a/apps/cc_clock24/app.js +++ b/apps/cc_clock24/app.js @@ -40,16 +40,17 @@ const calcHandPolygon = function(len, dia, alpha) { "x": dia/2 * Math.cos(alpha + Math.PI/2), "y": dia/2 * Math.sin(alpha + Math.PI/2) }, - return [ - center.x - d.x, - center.y - d.y, - center.x + d.x, - center.y + d.y, - x + d.x, - y + d.y, - x - d.x, - y - d.y - ]; + polygon = [ + center.x - d.x, + center.y - d.y, + center.x + d.x, + center.y + d.y, + x + d.x, + y + d.y, + x - d.x, + y - d.y + ]; + return polygon; }; const drawHands = function(date) { @@ -104,7 +105,7 @@ const drawNumbers = function() { g.setColor(1, 1, 1); g.setBgColor(0, 0, 0); for(let i = 0; i < 12; i++){ - hour = hourNumberPositions[i][0] + hour = hourNumberPositions[i][0]; if (settings.show24HourMode){ hour *= 2; } @@ -142,7 +143,7 @@ const queueDraw = function() { const draw = function() { // draw black rectangle in the middle to clear screen from scale and hands - g.setColor(0, 0, 0); + g.setColor(0, 1, 1); g.fillRect(10, 10, 2 * center.x - 10, 2 * center.x - 10); // prepare for drawing the text g.setFontAlign(0, 0);