-
• #2
The best thing really is to check the code at https://github.com/espruino/Espruino/blob/master/libs/banglejs/jswrap_bangle.c#L1638 but...
Difference in acceleration compared to the previous data point?)?
Yes, it's this. It's the difference in raw acceleration values.
The
sqr
stands for squared - it might be worth checking withBangle.getOptions
to see what the values are originally, but gestureStartThresh should have a default of 800*800. (I can't remember now why we square them and don't use them normally, but I think it's historical)Chances are it broke because the value was 800*800 and you set it to 800?
So:
- gesture starts when accDiff > gestureStartThresh
- gesture ends when accDiff < gestureEndThresh for at least gestureInactiveCount samples
- if there are less than gestureMinLength samples we ignore it
- gesture starts when accDiff > gestureStartThresh
Hi @Gordon, I would like to ask you more clarification on how the movement gesture feature of the Bangle JS 2 is working. What are the events that trigger the start and stop of a gesture? What measurement are they based on (accelerometer magnitude? Difference in acceleration compared to the previous data point?)?
Moreover, I would like to know more about the Bangle.setOption parameters related to movement gesture. In the software reference I found these 4:
In this vein, "sqr" stands for "square root"? The values of "800" and "2000" to what kind of measure do they refer?
I tryed to change these parameters both on the Bangle ide and inside an app that I built, but everytime that I touch these option the gesture functionality stops working. Even setting back the old parameters don't fix the situation, so I have to completely reset the watch everytime. After completely resetting the watch, without touching the parameters, the gesture functionality works again correctly. Could it be a bug or maybe I'm doing something wrong?
Thanks in advance :)