From 790c4775cda05e3aacd34438902971e29c88ea2f Mon Sep 17 00:00:00 2001 From: Adrian Chrysanthou Date: Sun, 21 Aug 2022 13:17:13 -0400 Subject: [PATCH] bug fix fixed issue where Bad Connection error will popup, but previous text stayed in the canvas off screen --- .../com.f00d4tehg0dz.teslafi.streamDeckPlugin | Bin 167895 -> 167964 bytes com.f00d4tehg0dz.teslafi.sdPlugin/js/app.js | 12 +++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Release/com.f00d4tehg0dz.teslafi.streamDeckPlugin b/Release/com.f00d4tehg0dz.teslafi.streamDeckPlugin index 9eb9fc9e45b600d84709a42d24e3b2906ee6b87d..3598f9cea3e870c58873121463445dba72cdf23f 100644 GIT binary patch delta 3449 zcmY*cc{r5a|DJj55+nQeHL^}*8B0jEEHRd`Gj^hEStFFOG zOC$^_uZSWV*~;?b`^0-)zu)&c*Y(`zzR&sG&$&L&Kld4{-~fUJ zoC>(@c%dLd{@;Tj8nMd~(NMO6GD+q?i^QP>B*-}ncHmGHRU9e~J(TqTXOI(t3Kl4e z$Z*o22C~N=0jHn&z8}1`sZ0U_02D>SMgbb6icElu>LxUQ0<1AMM!-M_wU=dL{&Ngs zk&`RP8BR@1P>{e}{n$wJ=FO6D;qOE_Vl?g2hXy z@xg?pZ^$(HN~r{ja*`!YX#?hxB!`of9KerlXk5ca@S<%l1D-;T>!U@Z60^AyEz^9o z$*_L+Z}!JvCYHUgEg^`^GcTy{uBJ|5(euJ1>O!_*;(ZDFEOw7j*>gcf35D4*9rbUI^Jg%WP4<@x}u(ANtbq&al4&Z$fF0lEW+bS z0{-ahalp@7Du1w!QBUn7m8vxL&P|ApHalJ@Qs!E!UawT?IZ*N=a6xyK#aR=}5W-Qwdk^Xw+daO4z~2#INDy58#wGxS(sVhrrj&H*yY0c+-}YJ>aJKKBrN!6}rsh~h_r)&1a=0I@ zv)8Z11`}}3wXaXOUx{`Kl5Wz^QF`q9v`~)Bs=q3E$coqDY-|x^6LCjE>pO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*|@?-#RDl5 zKSwP)#+Uoc7-o5@)67`O4<;HHKCQ{EKj4dDmZjI~s(=@ZDDw$2BX>DEoYnrBzfTcA z>gzh_H{{(#zv(?noPo>e!(R0*&fo-?VXN*TNy)43ZVm!-pZLZu1l@u~57ahb4x5+h zZ`qk5?J2G2LxNad$>p=j1_i4!RV=bSi+M8S^JmO}mEtP8zcT-^!b|xB2c7~2Rk?vL*Jov+xjV-x8J~%tvl}wp-^AY2r-YD zD^BWIjkYp%F04`igB;B{AHf~{dPG1$Zu?$*V-lwBM}M|cuj&Tn!0fmdqdPtgYt*og z`(brAb6|nw7uW_kHzBbLLmcvBZ=?QXj`D! z^VbI&mkcOH8iY4Tl%Ix&!;uFnn^@JkiQVSNFPp+YoWJZ1__487I$1f>bp|S(lPyP? z0fLO+&)s5T7|D`Soi@*{C`%V#R61FB9sL~pXqF};1aemc0y*{4jG&ixI5D_N8dprusU7w z#sSwrAMGCpxSR?f;s6U!xDXFGfe;%HxPY)24>*9Jk3WG2c)%WHhxn6J>jVIOnp&Fx zSb;iiBAA09-ADvHK^RB`yg^YV31oVtl2f2d20TFKn|u-*O9pIDD_lwe%vgVW>;Iky zDJ=y+f_o=Z06{<{K0Q#JB%BJI{arE@RM0h`LY%7MB&DPRETEbXs#IzlP~tY17^!sw z%1l}Y10n`GDF1@7K7IfKVW5FPF8=#w0zJWB{=mt0@D%ya>FJ;OnfdoJkY*S4D+q?@t&9e#txJk5W06VQfEZ6|@FT4H!00000 diff --git a/com.f00d4tehg0dz.teslafi.sdPlugin/js/app.js b/com.f00d4tehg0dz.teslafi.sdPlugin/js/app.js index 5819ad1..b0c0201 100644 --- a/com.f00d4tehg0dz.teslafi.sdPlugin/js/app.js +++ b/com.f00d4tehg0dz.teslafi.sdPlugin/js/app.js @@ -55,7 +55,7 @@ if ($SD) { Object.assign(clonedSettings, settings); setTitleWithTeslaFiStatus(context, clonedSettings); }, - moment.duration(1, 'hours').asMilliseconds()); + moment.duration(15, 'minutes').asMilliseconds()); } function setTitleWithTeslaFiStatus(context, settings) { @@ -73,6 +73,13 @@ if ($SD) { const unquoted = removeBracket.replace(/\"/g, ""); const comma = unquoted.replace(/,/g, ""); + function clearCanvas(context, canvas) { + context.clearRect(0, 0, canvas.width, canvas.height); + var w = canvas.width; + canvas.width = 1; + canvas.width = w; + } + // load bg-image ctx = canvas.getContext("2d"); img = document.getElementById("bg"); @@ -102,6 +109,9 @@ if ($SD) { ctx.textAlign = 'center'; ctx.textBaseline = 'middle'; ctx.drawImage(img, 144, 144); + + // Create Canvas Image + clearCanvas(context, canvas) for (var i = 0; i