Currently I am in the making of a new instrument.
I use AM 2.1.3 and AM 3.0 Beta, side by side just to compare and to help me to decide in what version I should go on.
So, the code beneath works in AM2 and in AM3 in conjunction with X-Plane11
I am developing an instrument for the B737-800X
Code: Select all
img_add("background.png",0,0,900,900)
img_wpt1 = img_add("wpt_white.png",430,710,40,40) --visible(img_wpt1,false)
function new_x_position(new_x, new_y)
wpt1x = 410+(new_x[1]*100)
wpt1y = 750-(new_y[1]*100)
--visible(img_wpt1,true)
move(img_wpt1,wpt1x,wpt1y,nil,nil)
end
xpl_dataref_subscribe("laminar/B738/nd/wpt_x", "FLOAT[10]",
"laminar/B738/nd/wpt_y", "FLOAT[10]", new_x_position)
I observed the following:
In AM2 everything is normal.......no problems.
In AM3 I see random glitches, it seems that every few seconds the program "restarts ???"
I can see then the waypoint as constructed in this line "img_wpt1 = img_add("wpt_white.png",430,710,40,40)" appearing.
Maybe I am doing something wrong but then why is this not happening in AM2 ??
Regards
Jedeen