Measure_soil_height() how to return the height value

Hello,

It appears that the measure_soil_height() does not return a value. I can see that every time it is executed, a new point is created in the points list.

I would like to have it return a value, maybe something like:

local height = measure_soil_height()

I think this is the function you are searching for.
Soil_heigh(x,y)

Measure soil height will take a few pictures an create a few points with soil height.
Soil_height(x,y) will interpolate the soil height from the nearest measured points.

Thank you very much. That worked perfectly.