In lua it would look like this:shadyowl2 wrote:Do you have to calculate for each indication ie 40 knots 60 knots? do you start at 0 or 260?
Code: Select all
function newDataFrom Sim (airspeed)
if airspeed<= 60 then
angle = ...
elseif airspeed> 60 and airspeed<= 180 then
angle=36/19 * airspeed -1350/19
else
angle =...
end
img_rotate(image_needle, angle)
end