Tom,
> return get_named_variable_typed_value(register_named_variable(szName),get_units_enum(szUnits));
I cannot deny it could look "comfortable" but isn't it inefficient "by nature", it the sense that every time to execute this line of code you're imposing the "gauge engine" to search within (I imagine) FSX internal defined LVARS array, if szName has already been defined (and so recycle its ID or define a new one)? And the larger the LVARS array becomes, the more time gets wasted?
> bool bValue = (bool)GetLVAR("CDU1_Key","number");
Also, another thing I don't understand, here you're just initializing bValue to the (casted bool) content of "CDU1_Key" LVAR.
You are NOT associating bValue to be automaGically updated as soon as "CDU1_Key" LVAR content changes right?
So to keep bValue aligned with "CDU1_Key" you'll have to (continuously) re-execute "bValue = (bool)GetLVAR("CDU1_Key","number");"
Is this correct?
Marco
> return get_named_variable_typed_value(register_named_variable(szName),get_units_enum(szUnits));
I cannot deny it could look "comfortable" but isn't it inefficient "by nature", it the sense that every time to execute this line of code you're imposing the "gauge engine" to search within (I imagine) FSX internal defined LVARS array, if szName has already been defined (and so recycle its ID or define a new one)? And the larger the LVARS array becomes, the more time gets wasted?
> bool bValue = (bool)GetLVAR("CDU1_Key","number");
Also, another thing I don't understand, here you're just initializing bValue to the (casted bool) content of "CDU1_Key" LVAR.
You are NOT associating bValue to be automaGically updated as soon as "CDU1_Key" LVAR content changes right?
So to keep bValue aligned with "CDU1_Key" you'll have to (continuously) re-execute "bValue = (bool)GetLVAR("CDU1_Key","number");"
Is this correct?
Marco



