April 18, 200521 yr Hi all,Working through the SDK at the moment trying to get to grips with this C business....When you look at the code below which is trying to work out the compass value, I can't understand where the code is accessing the FS compass variable?Can anyone explain it to me?FLOAT64 FSAPI compass_moving_card_x_cb( PELEMENT_MOVING_IMAGE pelement ){ FLOAT64 val = 360.0 - pelement->source_var_x.var_value.n; if( val >= 0 && val <= 360 ) return val; else return 0;}Many thanks,Paul.
April 18, 200521 yr The function wiskey_moving_card_x_cb() gets the variable from pelement->source_var_x.var_value.n. source_var_x is the first of the two MODULE_VARs defined in the MAKE_MOVING macro called a few lines further down:WHISKEY_COMPASS_DEGREES, wiskey_moving_card_x_cbHope that helps
Create an account or sign in to comment