📄
SPAD.neXt
  • SPAD.neXt Manual
  • About SPAD.neXt
  • Getting Started
    • System Requirements
    • Supported hardware
      • Check Hardware
    • Installation
      • Simulation Specifc Steps
        • SimConnect Configuration
        • MSFS: Enable PMDG data access
        • X-Plane Configuration
    • First Start
      • Configuration Wizard
    • Common Tasks and Issues
      • SPAD
        • Online Services
        • Fresh reinstall
        • Move SPAD.neXt to new Computer
        • License Issues
      • MSFS Specific Topics
      • X-Plane specific Topics
      • Saitek/Logitech MP/RP blinking
      • USB Powermanagement
  • Guides and Videos
    • New User Series
    • MSFS SimConnect
    • L:Vars / H:Events and B:Events
    • Features & Functions
    • Device Specific
      • Arduino / SPAD Serial
      • Authentikit
      • Cockpit Simulator CDU
      • Honeycomb
      • Joystick (Generic HID)
      • miniCockpit
      • RealSimGear
      • Saitek/Logitech
      • Script Panel
      • Stream Deck
      • Thrustmaster TCA
      • vFIP
      • Virtual Avionics
      • vJoy
      • VRinsight
      • X-Touch MC Mode
      • X-Touch Midi Mode
    • Simulation Specific
      • ATR 600 (MSFS)
      • AS CRJ 550/700/900/1000 (MSFS)
      • FBW A32NX (MSFS)
      • FFX/MG HJet (MSFS)
      • FFX Vision Jet (MSFS)
      • FSW C414AW (MSFS)
      • PMDG 737 (MSFS)
      • PMDG 777 (MSFS)
      • SWS Kodiak (MSFS)
      • WT CJ4 (MSFS)
      • WT G1000 NXi (MSFS)
      • PMDG 777 (P3D)
  • User Interface
    • UI Familiarization
      • Home Page
      • Profiles Page
  • Features
    • Expressions
      • Values
      • Referencing Simulation Data
      • Operators
      • Functions
      • Examples
    • Tuner Acceleration
    • Event Execution Order
  • Simulations
    • MSFS 2024
    • MSFS 2020
    • X-Plane
      • Pre-Requisites
      • Dataref Tool
      • Helping Spad Help You
      • Dataref vs. Command: Know Your Copilots
      • Basic Flight Controls – Axis Setup
    • P3d and FSX
    • Other
  • Hardware specific
    • USB HUB Requirements
    • CPFlight Devices
    • Saitek FIP (Flight Instrument Panel)
      • Saitek FIP: Driver & Function Check
    • Loupedeck Image Devices
    • Midi Devices
      • X-Touch Mini
    • Serial (COM) Devices
    • Skalarki
    • VRInsight Overhead
  • Extending and API's
    • Gauges and Extensions
      • SPAD Gauges: GaugeSettings
    • C# Scripting Interface
      • C# Scripting: ScriptStub
      • C# Scripting: Provide Values
      • C# Scripting: PreCompile
    • Device Interface
      • Device Communication Flow
        • Device INIT-Phase
        • Device CONFIG-Phase
          • Device options
          • Device COLORSET configuration
          • Device PROFILE configuration
          • Device OUTPUT Configuration
          • Device INPUT configuration
            • Device input AXIS
            • Device input ENCODER
            • Device input PUSHBUTTON
            • Device input ROTARY
            • Device input SWITCH
            • Device input SWITCH3
            • Device LABEL
          • Device config: Advanced topics
        • Device STATESCAN-Phase
      • Device General Commands
      • Device commands
        • Page-Control
      • Device SPAD.neXt Events (2)
      • Device Simulation Events (Channel 4)
      • Device Data (Channel 5)
      • Device LED Update (Channel 6)
      • Device Display Update (Channel 7)
      • Device Input Updates (Channel 8)
      • Device Virtual Power
      • Device Custom UI
      • Device HTML UI
      • Device preconfigured definition
      • Serial V2
        • Command 1,RAISE
        • Command: 0,AUTH
    • X-Plane Datarefs & Commands
    • FSUIPC: Custom Offsets
    • RestAPI
    • HTML Rendering API
    • Other API's
  • FAQ
    • General FAQ
    • MSFS: Lost profile aircraft assigments
  • Changes
    • 0.9.21
    • 0.9.14.0
    • 0.9.13.39
  • Glossar
  • Old-Docs
    • Old-Getting-Started-Guide
Powered by GitBook
On this page
  • Input Routing
  • Example: An Encoder with a Pushbutton
  • Example: An encoder that can be pulled out as a switch
  • Complex Examples
  • Output routing
  • Example: FCU AP1 button

Was this helpful?

  1. Extending and API's
  2. Device Interface
  3. Device Communication Flow
  4. Device CONFIG-Phase

Device config: Advanced topics

Add functionality to inputs and outputs

Input Routing

Basically every device input is a separate control for SPAD.neXt, however you can re-route inputs in the SPAD.neXt UI to add functionality to one input in the UI.

An additional input is created, and the following options are added to it:

HIDDEN=1

Input will not be exposed in the UI

ROUTETO=<targettag>

Events from this input will not be handled by the input, but routed to the input associated with <targettag>

ROUTETO=E_ENCODER

Example: An Encoder with a Pushbutton

First the Encoder is configured

0,INPUT,2000,E_HDG,ENCODER,SPAD_ENCODER;

Then the pushbutton is configured, telling SPAD.neXt to route it to the encoder

0,INPUT,7,I_HDG_PUSH,PUSHBUTTON,SPAD_PUSHBUTTON,HIDDEN=1,ROUTETO=E_HDG;

SPAD.neXt will now add the pushbutton-events to the encoder in the UI, and not expose the pushbutton I_HDG_PUSH in the UI at all. Whenever the device sends now an input event (8,7,1;) for that pushbutton, the according events on the encoder will be executed.

Example: An encoder that can be pulled out as a switch

Again, just configure the encoder and the additional switch

0,INPUT,2000,E_HDG,ENCODER,SPAD_ENCODER; 0,INPUT,7,S_HDG_PULL,SWITCH,SPAD_SWITCH,HIDDEN=1,ROUTETO=E_HDG;

Complex Examples

Example: Encoder that can be pushed and pulled as a pushbutton

Now things get a bit more complicated.

First, as before the encoder is configured

0,INPUT,2000,E_HDG,ENCODER,SPAD_ENCODER;

Now 2 additional inputs shall be attached to the encoder that will use the same events. SPAD.neXt needs to know what to do and how to separate the events. To achieve this, additional options can be added to the input(s) to create different events for each of them:

Option
Default

ROUTETO.PRESS

PRESS

ROUTETO.PRESSSHORT

PRESSSHORT

ROUTETO.PRESSLONG

PRESSLONG

ROUTETO.HELD

HELD

ROUTETO.RELEASE

RELEASE

Literally every event from an input can be rerouted this way. For a switch the options would be ROUTETO.ON , ROUTETO.OFF , for stateful input (rotary/3-way) those would be ROUTETO.<positionname>

The option-value will be used as event name in SPAD.neXt. If it does not exist yet, it will be automatically created.

But back to the example, now create the 2 additional input buttons (simple ones to keep this short and simple):

0,INPUT,7,I_HDG_PUSH,PUSHBUTTON,SPAD_SIMPLEBUTTON,HIDDEN=1,ROUTETO=E_HDG,ROUTETO.PRESS=PUSH_PRESS,ROUTETO.RELEASE=PUSH_RELEASE;

0,INPUT,8,I_HDG_PULL,PUSHBUTTON,SPAD_SIMPLEBUTTON,HIDDEN=1,ROUTETO=E_HDG,ROUTETO.PRESS=PULL_PRESS,ROUTETO.RELEASE=IGNORE;

Note that the INHERIT for the button are ommited, to prevent SPAD.neXt to add any default events to the buttons.

For the pull-button SPAD.neXt is instructed to ignore the release event and only support the push event. The value "IGNORE" can also be omitted which will have the same effect.

In the SPAD.neXt UI the E_HDG encoder will now have the events CW / CCW / PUSH_PRESS / PUSH_RELEASE / PULL_PRESS

Note: This can become quite long configuration commands and should be done in the device editor/ device xml configuration to preserve device space

Important! Routed inputs still have their own variables to hold their current value!

Example: Airbus FCU Altitude encoder

The Airbus FCU altitude encoder has following additional functions: Push , Pull and a ring-switch for 100 / 1000 steps

0,INPUT,1000,E_ALT,ENCODER,SPAD_ENCODER;

0,INPUT,1,I_ALT_PUSH,PUSHBUTTON,SPAD_SIMPLEBUTTON,HIDDEN=1,ROUTETO=E_ALT,ROUTETO.PRESS=PUSH,ROUTETO.RELEASE=;

0,INPUT,2,I_ALT_PULL,PUSHBUTTON,SPAD_SIMPLEBUTTON,HIDDEN=1,ROUTETO=E_ALT,ROUTETO.PRESS=PULL,ROUTETO.RELEASE=;

0,INPUT,3,S_ALT_RING,SWITCH,SPAD_SWITCH,HIDDEN=1,ROUTETO=E_ALT,ROUTETO.ON=ALT100,ROUTETO.OFF=ALT1000;

The E_ALT encoder will have the events

CW / CCW / PUSH / PULL / ALT100 / ALT1000

Note that the INHERIT for the buttons/switch are omitted, to prevent SPAD.neXt to add any default events to the buttons.

Output routing

The other way around is an output that physically located on a button (e.g. MCP / FCU). Here SPAD.neXt needs to know not to expose the led in the UI, but add it to another input, while keeping the output events separated. This is currently only supported for LEDs.

Again the led will need to have the HIDDEN=1 option so it will not be exposed in the UI, but now the button needs an option to associate it with the led. This is done by adding the option LED=<ledtargettag> to it.

Example: FCU AP1 button

0,INPUT,8,I_AP1,PUSHBUTTON,SPAD_PUSHBUTTON,LED=L_AP1;

0,OUTPUT,5,L_AP1,LED,SPAD_LED,HIDDEN=1;

This will add the led-control actions to the button, but when executed they will be routed to the L_AP1 led using the led-update channel (6)

PreviousDevice LABELNextDevice STATESCAN-Phase

Last updated 1 month ago

Was this helpful?