You are reading a single comment by @jgw and its replies. Click here to read the full conversation.
  • Hi,
    I'm trying to get a 'Bangle.js 2' to wake up whenever the screen is touched.

    I've isolated my code into this silly test app :

    var dummy = 0;
    g.clear().setFontAlign(-1,-1).setFont("Vector",20).drawString("Hi",10,10);
    
    Bangle.setOptions({wakeOnTouch:true});
    
    Bangle.on("touch", function() {
      Bangle.buzz(100,1);
      g.clear();
      g.drawString((++dummy).toString(), 10, 10);
    });
    

    Touch events are properly captured when the device is awake, but once it sleeps (dim LED backlight), no further events are thrown. Only after a BTN1 click, events are recognized again.

    The wakeOnTouch option seems to be properly set :

    Bangle.getOptions()
    ={ gestureStartThresh: 640000, gestureEndThresh: 4000000, gestureInactiveCount: 4, gestureMinLength: 10,
      stepCounterThresholdLow: 32, stepCounterThresholdHigh: 78149, twistThreshold: 819, twistTimeout: 1000, twistMaxY: -800,
      wakeOnBTN1: true, wakeOnBTN2: true, wakeOnBTN3: true, wakeOnFaceUp: false, wakeOnTouch: true,
      wakeOnTwist: true, powerSave: false, lockTimeout: 10000, lcdPowerTimeout: 0, backlightTimeout: 10000 }
    >process.env
    ={
      VERSION: "2v09.120",
      GIT_COMMIT: "8c650226b",
      BOARD: "BANGLEJS2",
      FLASH: 1048576, SPIFLASH: 8388608, HWVERSION: 2, STORAGE: 8388608, RAM: 262144,
      SERIAL: "5705650f-3ec9f6bf",
      CONSOLE: "Bluetooth",
      MODULES: "Flash,Storage,heatshrink,locale",
      EXPTR: 536884176 }
    >
    

    Is this expected behavior ? What am I missing ?

    Thanks

About

Avatar for jgw @jgw started