MAVLINKHUD

Overview

The SF parameter group (specifically SF_JS_AXISx) is a SITL-only tool used to map physical USB Gamepads or Joysticks to the simulator using the SFML library.

Key Concepts

1. Direct Control

When developers want to test flight modes using a real controller rather than keyboard commands or GCS sliders, they use the SFML backend to pipe the USB HID data directly into the simulated RC input stack.

  • SF_JS_AXIS1..8: Maps physical joystick axes (0, 1, 2...) to virtual RC channels (Throttle, Roll, etc.).

Developer Notes

  • Library: libraries/SITL.
  • Requirement: Requires the autopilot to be compiled with SFML support.

SF_JS_AXIS1

Default 0
Range 0 8

SFML Joystick Axis 1 (SF_JS_AXIS1)

Description

SF_JS_AXIS1 allows you to use a real USB Joystick or Gamepad to fly the simulator.

If you are using the SFML build of SITL, this parameter maps the first axis of your physical controller to the internal RC input system.

Tuning & Behavior

  • Default Value: 0.
  • Usage: Usually handled by the -j flag in sim_vehicle.py, but can be manually configured here.

SF_JS_AXIS2

null
Default sf::Joystick::Axis::Y
Range null

None

Note: This parameter functions identically to SF_JS_AXIS1.

SF_JS_AXIS3

null
Default sf::Joystick::Axis::Z
Range null

None

Note: This parameter functions identically to SF_JS_AXIS1.

SF_JS_AXIS4

null
Default sf::Joystick::Axis::U
Range null

None

Note: This parameter functions identically to SF_JS_AXIS1.

SF_JS_AXIS5

null
Default sf::Joystick::Axis::V
Range null

None

Note: This parameter functions identically to SF_JS_AXIS1.

SF_JS_AXIS6

null
Default sf::Joystick::Axis::R
Range null

None

Note: This parameter functions identically to SF_JS_AXIS1.

SF_JS_AXIS7

null
Default sf::Joystick::Axis::PovX
Range null

None

Note: This parameter functions identically to SF_JS_AXIS1.

SF_JS_AXIS8

null
Default sf::Joystick::Axis::PovY
Range null

None

Note: This parameter functions identically to SF_JS_AXIS1.