But when I try to load it as a clock face for multiclock it fails.
(() => {
function getFace(){
function draw() {
g.reset(); g.drawImage(atob("GBjCAP////+rStqvAAAAAAAAAAAqqAAAAAKv+oAAACtVV+gAAKVVXvoAApVV6/6AAlVXv/+AC1VXv6/gCVVVvu/gKValqnroLt7pfVV4L5vpVVV4LtulVX14LquVX6p4K6+lar5oC//te/tgC//5Xq3gAv/pVdWAAr/tVVaAAK/lVVoAACvlVegAAAKv+oAAAAAqqAAAAAAAAAAA"),40,40);
}
return {init:draw};
}
return getFace;
})();
the error message I get is:
Uncaught Error: Expecting first argument to a valid Image
at line 1 col 251
...oAAAAAqqAAAAAAAAAAA"),40,40);
^
in function "init" called from line 1 col 52
...le.drawWidgets();face.init();intervalRefSec=setInterval(face...
^
in function "startdraw" called from line 1 col 102
...e=FACES[iface]();startdraw();
^
in function called from system
>
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
The following code works fine in the emulator.
But when I try to load it as a clock face for multiclock it fails.
the error message I get is:
Any ideas what I am doing wrong ?