Dial seems to be broken. Both nav and com values jump when dial rotated. Test with this instrument 50x70 and observe the dataref value in datafer tool.
Note If you send a command via dataref tool the dataref changes smoothly.
Code: Select all
function nav_outer_turn( direction)
if direction == -1 then
xpl_command("sim/radios/stby_com1_coarse_down") print("down")
elseif direction == 1 then
xpl_command("sim/radios/stby_com1_coarse_up") print("up")
end
end
nav_dial_outer = dial_add(nil, 0,0,50,50, nav_outer_turn)
mytext1 = txt_add("xxx", "font:arimo_regular.ttf; size:16; color: black; halign:left;", 5, 15, 40, 20)
function com_radios(com)
txt_set(mytext1,com)
end
xpl_dataref_subscribe("sim/cockpit/radios/com1_stdby_freq_hz","INT",com_radios)
Keith