When sending 2 fs2020_rpn() quickly, the second one does not work

Discuss suspected bugs with other users and Sim Innovations Staff

Moderators: russ, Ralph

Post Reply
Message
Author
ylevesque
Posts: 69
Joined: Wed Jan 09, 2019 6:49 pm

When sending 2 fs2020_rpn() quickly, the second one does not work

#1 Post by ylevesque »

If i send 2 fs2020_rpn() quickly, the second one does not work (AM 4.2 BETA 8, plugin 4.1 BETA 5).

For example, in this simple script, pressing the button will increment both the whole and the fraction part of COM1 :
function but1_pressed_cb() print ("Button1 pushed")
fs2020_event("COM_RADIO_WHOLE_INC")
fs2020_event("COM_RADIO_FRACT_INC")
end
but1 = button_add("button1.png", "button1_p.png",30,60,30,30,but1_pressed_cb)

If I replace fs2020_event by fs2020_rpn(), the fractional part is not changed when I press the button:
function but1_pressed_cb() print ("Button1 pushed")
fs2020_rpn("(>K:COM_RADIO_WHOLE_INC)")
fs2020_rpn("(>K:COM_RADIO_FRACT_INC)")
end
but1 = button_add("button1.png", "button1_p.png",30,60,30,30,but1_pressed_cb)

If I add a delay before sending the second one, both variables are updated:
function but1_pressed_cb() print ("Button1 pushed")
fs2020_rpn("(>K:COM_RADIO_WHOLE_INC)")
timer_start(50,function() fs2020_rpn("(>K:COM_RADIO_FRACT_INC)") end)
end
but1 = button_add("button1.png", "button1_p.png",30,60,30,30,but1_pressed_cb)

I found that a delay of 10 to 50 msec is needed.
The problem is the same when writing to variables (ex LVars).

Can this problem be corrected in Air Manager?

Yves

User avatar
Corjan
Posts: 2941
Joined: Thu Nov 19, 2015 9:04 am

Re: When sending 2 fs2020_rpn() quickly, the second one does not work

#2 Post by Corjan »

Hi,


I think I know where this might be coming from...

Probably have some time tomorrow to look at it.


Corjan

User avatar
Corjan
Posts: 2941
Joined: Thu Nov 19, 2015 9:04 am

Re: When sending 2 fs2020_rpn() quickly, the second one does not work

#3 Post by Corjan »

Hi,


Managed to find the issue.

Please download/install the latest flight sim plugin here:
https://siminnovations.com/wiki/index.p ... ugins_BETA


Let me know if this helped,

Corjan

ylevesque
Posts: 69
Joined: Wed Jan 09, 2019 6:49 pm

Re: When sending 2 fs2020_rpn() quickly, the second one does not work

#4 Post by ylevesque »

Problem fixed!

Thanks

Yves

Post Reply