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.

Help with DCS script plugin

Featured Replies

Hello:

I'm trying the new DCS plugin. Everything seems to work properly. As an easy start point, I'm trying to program two scripts for INC and DEC the baro knob in the standard altimeter for F18. I know that this knob is associated with the following LVAR in the F18:

STBY_PRESS_ALT

I added the LVAR. it seems this LVAR goes from a min value to a max value in increments/decrements of 1000. The inc and dec scripts should be associated to right and left assignments on my midi touch mini device. 

I'm not an expert in rpn, can anybody help with this easy scripts?

Thanks in advance

C.

  • Author

Could it be this?

Code for inc: ( LVAR:STBY_PRESS_ALT 1000 + LVAR:STBY_PRESS_ALT min )

Code for dec: ( LVAR:STBY_PRESS_ALT 1000 - LVAR:STBY_PRESS_ALT max )

  • Author
3 minutes ago, clop6719 said:

Could it be this?

Code for inc: ( LVAR:STBY_PRESS_ALT 1000 + LVAR:STBY_PRESS_ALT min )

Code for dec: ( LVAR:STBY_PRESS_ALT 1000 - LVAR:STBY_PRESS_ALT max )

From LVAR: to L:

  • Author

I think I got it:

INC: ( L:STBY_PRESS_ALT 1000 + Max_value min )

DEC: ( L:STBY_PRESS_ALT 1000 - Min_value max )

I'll try

  • Commercial Member

Please use emails at this point, less than a handful of people currently have this plugin.

  • A value that is being read from DCS appears as an LVar "(L:varname)"
     
  • If you want to write something, you must do that as a BVar "value (>B:var_or_cmd_name)"

I'm not sure how that works in this case (I don't have the F18), there seem to be three items to control this "STBY_PRESS_SET_0" to "_2", and each controls a different portion of the value?

For the (L:STBY_PRESS_ALT) the DCS spec says that this is "the rotation of the knob, not the value that it controls". Make of that what you will, but I think that you will have to use the three separate variables (100, 1000, 10000) to read the data, and the _0, _1, _2 to write them back after changing them. This feels quite complex, not something that you can do with a simple/single command.

Edit: be mindful that you have AAO version 4 - you can script in JScript or VBScript if you struggle with RPN)

 

Edited by Lorby_SI

LORBY-SI

Archived

This topic is now archived and is closed to further replies.

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.