trying to debug cycle

master
Martin Zwigl 2025-03-17 21:58:27 +01:00
parent e3f858b650
commit 7741f83d9e
2 changed files with 9 additions and 4 deletions

View File

@ -16,6 +16,7 @@ function renderGraph(l) {
// g.clearRect(l.x, l.y, l.w, l.h); // g.clearRect(l.x, l.y, l.w, l.h);
const bounds = ciLib.findMinMax(tknChrtData); const bounds = ciLib.findMinMax(tknChrtData);
logFile.write("?. graphy: " + JSON.stringify(bounds));
require("graph").drawLine(g, tknChrtData, { require("graph").drawLine(g, tknChrtData, {
axes: true, axes: true,
x: l.x, y: l.y, width: l.w, height: l.h, x: l.x, y: l.y, width: l.w, height: l.h,
@ -61,15 +62,19 @@ function getChart() {
} }
}) })
.then(data => { .then(data => {
logFile.write("HTTP resp:" + JSON.stringify(data)); // logFile.write("HTTP resp:" + JSON.stringify(data));
const apiData = JSON.parse(data.resp); const apiData = JSON.parse(data.resp);
tknChrtData = apiData.map(innerArray => innerArray[1]); tknChrtData = apiData.map(innerArray => innerArray[1]);
logFile.write("Chart data:" + JSON.stringify(tknChrtData)); // logFile.write("Chart data:" + JSON.stringify(tknChrtData));
logFile.write("1. got data");
tknChrtData = [1,2,3,4,5,6,7,8,9,8,7,6,5,4,]; tknChrtData = [1,2,3,4,5,6,7,8,9,8,7,6,5,4,];
currLoadMsg = ""; currLoadMsg = "";
//
layout.render();
logFile.write("2. rendered");
}) })
.catch(err => { .catch(err => {
logFile.write("API Error: " + JSON.stringify(err)); // logFile.write("API Error: " + JSON.stringify(err));
}) })
.finally(() => { .finally(() => {
// Schedule next update regardless of success or failure // Schedule next update regardless of success or failure

View File

@ -1,7 +1,7 @@
{ "id": "coin_info", { "id": "coin_info",
"name": "Crypto-Coins Info", "name": "Crypto-Coins Info",
"shortName":"Coins Info", "shortName":"Coins Info",
"version": "0.06.40", "version": "0.06.41",
"description": "Crypto-Coins Infos with the help of the Binance API", "description": "Crypto-Coins Infos with the help of the Binance API",
"icon": "app.png", "icon": "app.png",
"tags": "clkinfo", "tags": "clkinfo",