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.

SET_OFF_SCREEN

Featured Replies

The light comes on when the rudder is turned, but does not go off when the rudder returns to center without SET_OFF_SCREEN.I have run into this on several other occasions and am at a loss as to why it is required. Any clues?ThanksFredvoid FSAPI nosewheel_lights_gcb (PGAUGEHDR pgauge, int service_id, UINT32 extra_data){ switch(service_id) { case PANEL_SERVICE_PRE_UPDATE: SET_OFF_SCREEN(pgauge->elements_list[0]); // <--- why??? break; }}//---------------------------------------------------------------------------FLOAT64 FSAPI nw_l_cb ( PELEMENT_ICON pelement ){ lookup_var (&on_ground); FLOAT64 val = (pelement->source_var.var_value.n); if (val < -0.30 && on_ground.var_value.n == 1.0) return 1; // on else return -1; // off} MAKE_ICON( nosewheel_lights_left, NW_LIGHT_ON, NULL, nosewheel_lights_fail, IMAGE_USE_TRANSPARENCY | IMAGE_USE_BRIGHT, 0, 13,35, RUDDER_DEFLECTION, nw_l_cb, ICON_SWITCH_TYPE_SET_CUR_ICON, 1, 0, 0)PELEMENT_HEADER nosewheel_lights_left_list[] ={ &nosewheel_lights_left.header, NULL};//--------------------------------------------------------MAKE_STATIC( nosewheel_lights_background, NW_LIGHTS_BG, &nosewheel_lights_left_list, NULL, IMAGE_USE_TRANSPARENCY, 0, 0,0)PELEMENT_HEADER nosewheel_lights_list = &nosewheel_lights_background.header;

  • Commercial Member

SET_OFF_SCREEN forces the element to be updated. Most times I've only found this to be necessary is if the macro did not have the IMAGE_USE_ERASE flag declared (which appears to be your case) but there are other uses for it e.g. forcing the text forecolour to change.

FLOAT64 FSAPI	chklist_line1_string_cb(PELEMENT_STRING pelement){	pelement->fg_color=line1_forecolour;	//Change the text colour on the fly where line1_forecolour contains the RGB definition	SET_OFF_SCREEN(pelement);			 //Force the text to update	wsprintf(pelement->string, "%30s",chklist_line1);	return 0;}

-Dai

  • Author

That was it Dai. I knew what SET_OFF_SCREEN was for but I didn't make the connection to the ERASE flag.I've run into that a few times over the years and was never smart enough to figure it out.ThanksFred

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.