Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Accessing an A var inside a cb function.

Featured Replies

GoalTo keep the oil temperature needle from falling below ambient air temperature. (vs. going to zero on shutdown).Proposed StrategyUse the needle's call back function and clip the minimum at the current TOTAL_AIR_TEMP.ProblemHow do you access TOTAL_AIR_TEMP while inside the call back function?Could I do this:

FLOAT64 FSAPI	temp_needle_cb( PELEMENT_STRING pelement ){	FLOAT64	val = pelement->source_var->var_value.n;	SINT16 nTemp = 0;	MODULE_VAR curr_Temp = {TOTAL_AIR_TEMP};		lookup_var(&curr_Temp);	nTemp = curr_Temp.var_value.n;	if (val < nTemp)		val = nTemp;	return val;}

inside the call back function?

Ok, this works, but I changed the SINT16 to a FLOAT64.

  • Author

You can use the 'lookup_var' command anywhere. You may want to move the 'MODULE_VAR' declaration out of the function. I've never tried that - not sure if it will work...Doug

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.