Computed attributes ++i

br0 a year ago

Hello. Is it possible to accumulate data from the sensor and then display this value like normal true/false
I use a tektonika device. The sensor is connected to input 2 and during the trip sometimes I have incorrect data.

JEXL syntax supports this expression, but I can't integrate it.
for (let i = 0; i < size(list); ++i) { x = x + list[i]; }

Thanks for helping

Anton Tananaev a year ago

What list are you planning to accumulate?

br0 a year ago

sorry for my late reply. I would like to use the operator «for» to check the signal about 5 sec at the input 2 and then accept it as true.
I need it because the signal at this input is not stable and sometimes lost during movement. Thanks

Anton Tananaev a year ago

It's still unclear to me how you plan to get old data in the expression, even if you can do a loop.

br0 a year ago

is there any other way to do this?

Anton Tananaev a year ago

You have to modify the source code