- Messages
- 588
- Country

Hello.
Can some kind person explain to me what the "var_old" member of a MODULE_VAR holds? I'm trying to catch airspeed at time intervalls and my airspeed.var_old.n seems to be 0 all the time. Can I set it in such a way that it remains through the next iteration/frame (PANEL_SERVICE_PRE_DRAW)?
Thanks for any input on this...
edit. Note to self: var_old can be used to store data for the next cycle, ie:
edit2. Doesn't work either...
Can some kind person explain to me what the "var_old" member of a MODULE_VAR holds? I'm trying to catch airspeed at time intervalls and my airspeed.var_old.n seems to be 0 all the time. Can I set it in such a way that it remains through the next iteration/frame (PANEL_SERVICE_PRE_DRAW)?
Thanks for any input on this...
edit. Note to self: var_old can be used to store data for the next cycle, ie:
Code:
asi->airspeed = curr_ias.var_old.n; //from last cycle
curr_ias.var_old.n = curr_ias.var_value.n;//for next cycle

Last edited: