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.

KEY_SPOILERS_SET

Featured Replies

  • Commercial Member

Does it work as advertised? I've got the following problem:-KEY_SPOILERS_SET(0-4320) does nothingKEY_SPOILERS_SET(4323-@5000) returns 10062 (or thereabouts - it varies) if I query SPOILERS_POS_LEFT or SPOILERS_POS_RIGHTKEY_SPOILERS_SET(anything above @5000) returns 16383 if I query SPOILERS_POS_LEFT or SPOILERS_POS_RIGHTThe onscreen visuals match the SPOILERS_POS returns. I've looked in both the airfile and the aircraft.cfg file for inspiration (failed!) and I know that the information being entered into the SPOILERS_SET command is only coming from one place, so nothing else is sneakily overriding it.Very puzzled....-Dai

Dai, I remember an anomoly similar, just donot know the specifics though. ( long time ago, FS02 )Are you setting the spoilers while on the ground?Try querying spoiler_pos with spoilers armed & in the air.Just a bit of input, that's all.Roman

20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

  • Author
  • Commercial Member

@Ed: I'll give that a try. KEY_AXIS_SPOILERS_SET didn't work in C but it could work in XML.@Roman: Yes, I'm on the ground. I'm trying to build an AGS (automatic ground spoiler) system and you've made me wonder if I specifically need the KEY_SPOILERS_ARM command. Must try that too.-Dai

This is a simple auto ground spoiler code.

>(L:G/Sactive,bool) if{ (>K:SPOILERS_ARM_ON) } (A:General eng1 throttle lever position, part) 0 < (A:General eng2 throttle lever position, part) 0 < || if{ (>K:SPOILERS_ARM_OFF) (>K:SPOILERS_OFF) }

Arms the spoilers on glideslope capture, deploys on ground contact, retracts on reverse thrust.

Paul EGLD

  • Author
  • Commercial Member

This solved it in the end:

void setSpoilers(int pos){	if(!pos)trigger_key_event(KEY_SPOILERS_OFF,0);	else if(pos>13000)trigger_key_event(KEY_SPOILERS_ON,0);	else trigger_key_event(KEY_AXIS_SPOILER_SET,pos);	return;}

Final tally for spoilers on the ground is this:-1. KEY_SPOILERS_SET is utterly snafu when on the ground.2. KEY_AXIS_SPOILER_SET starts to get unreliable at extreme ranges, hence the SPOILERS_OFF/ON to trap the unreliability.3. KEY_SPOILER_ARM_SET,[value] simply bangs you through to full deployment and ignores [value].4. KEY_SPOILER_ARM_ON does the same.Paul: it would have been nice to have such a simple AGS; unfortunately this aircraft deploys spoilers on RTO, plus the amount of spoiler/speedbrake deployment depends on which hydraulic systems are available. I had to be able to set them to a specific amount.-Dai

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.