The layout library is powerful but it is not a solution to have a long press touch event on (bangle.js2)
Executing below code you can see that "long press" is only detected on Bangle.js1
var v_model=process.env.BOARD; var Layout = require("Layout"); if (v_model=='BANGLEJS'||v_model=='EMSCRIPTEN') v_font="6x8:2"; else v_font="6x8"; var layout = new Layout( { //v vertical type:"v", c: [ {type:"txt", font:v_font, label:".", id:"label", valign:-1, halign:-1 } ] }, {btns:[ {label:"File", cb: l=>print("log: btn1"), cbl: l=>{print("log: long press btn1"); },font:v_font, col:"#f00"}, {label:"Launch", cb: l=>print("log: btn2"),font:v_font, col:"#f00"}, {label:"Color", cb: l=>print("log: btn3"),font:v_font, col:"#f00"} ], lazy:true}); layout.render();
Is it is the expected behaviour? If yes, is the only alternative digitalPulse?
I am aware of @enaon using "longpress" on his eucwatch and I see that it is through digitalPulse?
@dapgo started
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 layout library is powerful but it is not a solution to have a long press touch event on (bangle.js2)
Executing below code you can see that "long press" is only detected on Bangle.js1
Is it is the expected behaviour?
If yes, is the only alternative digitalPulse?
I am aware of @enaon using "longpress" on his eucwatch and I see that it is through digitalPulse?