I have a new problem with AM 2.1.2
The callback function is frequently re-triggered without any am_variable_write () call.
This happens with FSX and P3D.
It could be once a second or many times per second.
I don't think this was present in 2.1.1
If I run a simple instrument with only this demo am_variable_subscribe script, New data1: 0 is frequently printed .
-- This function will be called when new data is available from another instrument
function new_data_callback(data1)
print("New data1: " .. data1)
end
-- subscribe to Air Manager variable
am_variable_subscribe("my_variable", "FLOAT", new_data_callback)
Yves
Bug with am_variable_subscribe
Re: Bug with am_variable_subscribe
I have noticed this recently while debugging an instrument. Except I'm using X-plane 10.45. While monitoring the reference /sim/ice/pitot_heat1_on or something very close to that, a 0 would be output multiple times with no change to the variable. Odd.
Re: Bug with am_variable_subscribe
Hi,
Hmz, that should not happen. I will investigate coming week.
Thanks for submitting this problem,
Corjan
Hmz, that should not happen. I will investigate coming week.
Thanks for submitting this problem,
Corjan
Re: Bug with am_variable_subscribe
Hi,
Just had a look in the code, and I found the source of the problem. The scary part is that this bug applies to all subscriptions. In theory, the instrument code should be able to handle multiple callbacks with the same value though.
The fix will be included in the upcoming 2.1.3. Let me know with a PM or something if you want a BETA version of 2.1.3.
Corjan
Just had a look in the code, and I found the source of the problem. The scary part is that this bug applies to all subscriptions. In theory, the instrument code should be able to handle multiple callbacks with the same value though.
The fix will be included in the upcoming 2.1.3. Let me know with a PM or something if you want a BETA version of 2.1.3.
Corjan
Re: Bug with am_variable_subscribe
It does seem to work still. If yves hadn't mentioned it I wouldn't have given more than a passing thought. But I have some iPad specific instruments I hope to have in before 2.1.3 please let me know roughly before you are going to compile the iPad release.