You are reading a single comment by @Tx and its replies. Click here to read the full conversation.
  • Whoops it did it again ... It happens when I detach timers and the LCD sleeps.
    Last code is:

    Bangle.on('lcdPower',on=>{
     console.log("LCD Event"); 
     if (on) {
        console.log("LCD Event ON");
        //state.screen=scrnClock;
        b.clear();
        if (state.screen==scrnClock) {
          writeTime();
          writeCircles();
          state.clockDots=false;
          writeClockDots();
          handleSecondClock=setInterval(clockUpdat­e, 1000);
        }
        if (state.screen==scrnDate) {
          writeDate();
        }
        g.drawImage({width:240,height:190,bpp:1,­buffer:b.buffer, palette: color},0,48);
      }else {
        if (handleSecondClock){
          console.log("LCD Event: Clearhandle");
          clearInterval(handleSecondClock);
          handleSecondClock = undefined;
      }
     }
    });
    

    1 Attachment

    • 2020-06-02_11-28.png
About

Avatar for Tx @Tx started