Is there a limit on the number of function (expressions) calls in the same component?

Hi new developer here!

I was trying to get a general “shake” measurement and wrote this:
(abs(gyroRawX())+abs(gyroRawY()))
but it fails when for instance all those one works:
(abs(gyroRawX())+abs(5.5))
(abs(5.5)+abs(gyroRawY()))
(abs(gyroRawX())+gyroRawY())
so my first guess is that there is a limit of 3 expression calls, but I’d like to check.

Thanks!

1 Like

Eeeeek . Welcome @monyosc.tareas . You Jump in at the deep end . I never got any useful readings from the gyro . I use acceleromterRawX() and Y . Gives 0 to 10 for 0 to 90 degrees .
.
.
Try this .
.
(abs((gyroRawX())+(gyroRawX())))

1 Like

Thanks Russell!
the problem with abs(gyroX() + gyroY()) is when X and Y components have different sign they will be cancelling one each other. That’s why I wanted to add abs(x) + abs(y).
In any case there’s a workaround squaring and rooting values like
sqrt(gyroRawX()**2+gyroRawY()**2)
Thanks!

1 Like

One day I might understand what’s going on here…:sunglasses:

4 Likes

Ok I think I posted this in the wrong category, should have posted in “Expression Help” sorry!

1 Like

Just like in your other post, simply add brackets, then add more brackets. Facer is finnicky and likes brackets.

1 Like