jeffmer / P8Apps

Espruino Firmware and Apps for the P8 Smartwatch together with drivers to support these Apps
MIT License
16 stars 13 forks source link

wrong BTN event when load xxx.app.js #6

Open tyrone1984 opened 3 years ago

tyrone1984 commented 3 years ago

An wrong BTN pressed event will fired automaticly with out release event when i touching the ico to enter an app with the code load( xxx.app.js)
And then the BTN pressed event will not fired when i press the button sides of the watch manualy but release event. And the second press will generate the right event include the press and release event. I don't know why, and can't find the reason : ( But the BTN event has not appeared when i run the same app from the webIde Storage directly.

I's the code in xxx.app.js here

setWatch(pressedFun, D17,{repeat:true,edge:"rising"});
setWatch(releasedFun, D17,{repeat:true,edge:"falling"});
tyrone1984 commented 3 years ago

I tested many app code and has the same problem

jeffmer commented 3 years ago

Launching an app needs two touches. The first selects the app, the second touch launches it. That’s the correct behaviour. Pressing the side button always returns to launcher.

tyrone1984 commented 3 years ago

Thanks for the rapid reply!