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.

Autobrake Display

Featured Replies

Okay, I'm relatively new to gauge coding, but I've been working pretty steadily on the things I'm doing for a couple of weeks. I've come across a problem with the autobrake value.I'm working on an electronic checklist. It's supposed to be that if the switch is set to RTO or OFF, the function is not completed. I've been messing with this all sorts of different ways, and I've been stumped for two days on this problem.FLOAT64 FSAPI autobrake_set_cb(PELEMENT_STRING pelement){ lookup_var(&autobrake); FLOAT64 val=pelement->source_var[0].var_value.n; val=!val; wsprintf(pelement->string, "AUTOBRAKE SET"); FLOAT64 val_autobrake = autobrake.var_value.n; //14 { if(val_autobrake == 0 && val_autobrake == 1) { pelement->fg_color = RGB(255,255,255); wsprintf(pelement->string, "AUTOBRAKE SET"); } else { pelement->fg_color = RGB(0,255,0); wsprintf(pelement->string, "AUTOBRAKE SET "); } } return 0;}I've tried various ways of making that work, up to and including separate commands for each setting of the AB switch. I'm ready to shotgun my computer!Any suggestions would be appreciated. (Be kind, I'm new to this! :) )

  • Moderator

if(val_autobrake == 0 && val_autobrake == 1)What's wrong with the above? How will val_autobrake ever be both on and off at the same time... ;)

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Bill:It also doesn't work if it's:if(val_autobrake != 0 && val_autobrake != 1) orif(val_autobrake != 0 && val_autobrake != 1) orif(val_autobrake > 1) orif(val_autobrake == 2 || val_autobrake == 3 || val_autobrake == 4, val_autobrake == 5) orJust about any combination. I know this is simple (I have some VB experience, so I'm familiar with program flow conrol...) ARGH is a common expression here lately, usually followed by a stream of vintage Marine Corps profanity. I've been working on this for about 2 days straight now.

Okay, I got it worked out. Thanks.

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.