How does touch work in BanjleJS #6760
Replies: 1 comment
-
Posted at 2024-02-12 by @fanoush
not sure I understand the question but does this https://www.espruino.com/Bangle.js2#touchscreen help? Posted at 2024-02-12 by user156811 That is helpful, but what i'm looking for is a little lower level. So here's where the underlining code gets called to handle touch events It gets called here. But this can only be reached by the bangle2 watch. Here is where the bangle 1 gets its touch events from So i know there's a few other watches that are supported with bangleJS and they have touch screens. So i'm curious how do they get there touch events. Since both of these touch event handlers are covered in defines that only work for the bangle watches. Posted at 2024-02-12 by @fanoush
which ones? if you mean the unofficial ones it is all in javascript Posted at 2024-02-12 by user156811 So when i do a search for -DBANGLEJS in the board files i see these watches.
Posted at 2024-02-12 by @fanoush and when you check board files, there is no touchscreen defined in any of those 3. Posted at 2024-02-13 by user156811 Ok, got it. Thanks so much for clearing this up for me! I've never used any of these watches. I just assumed that all smart watches used a full touch screen. One last thing. There seems to be a touchscreen device. Which is different then the touch device. This seems to use SPI. Do you know how these are handled? I see there's a STROKE lib for handling gestures. But i don't see a place to handle getting the position of the touch events when your not using bangleJS. Posted at 2024-02-13 by @fanoush
Espruino is for many devices, banglejs is relatively new and just for watches, this one is quite old devboard with lcd with resistive touchscreen. Before Bangle this stuff was typically written as javascript module. Posted at 2024-02-13 by user156811 Thanks for the info. I think i understand everything now. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2024-02-12 by user156811
So this is what i understand
There are two defines TOUCH_DEVICE and TOUCH_I2C.
Touch_I2C - seems to only be enabled on Bangle 2
Bangle 1 - bt4 and bt5 are used as "touch handlers"
So i know there are a few other watches. I just don't know how they get there touch positions from bangleJS? Most of the touch code is wrapped around either F18 or BQ3 defines.
Beta Was this translation helpful? Give feedback.
All reactions