MAVLINKHUD

Overview

The TMODE parameter group configures the Toy Mode engine. This is a specialized simplified interface used for consumer drones (like the SkyViper) or for integrating ArduPilot with cheap gamepad-style controllers.

Toy Mode simplifies flight control and abstracts many complex settings into easy-to-use button mappings.

Key Concepts

1. Button Mapping (TMODE_ACTIONx)

Maps specific gamepad buttons to ArduPilot actions.

  • Actions: Flip, Take Photo, Change Mode, Land.

2. Simplified Tuning (TMODE_TMAX / VMAX)

Toy Mode often uses simplified limits for speed and tilt to make the drone easier for children or beginners to fly.

Parameter Breakdown

  • TMODE_ENABLE: Master switch.
  • TMODE_TRIM_AUTO: Automatically calculates trim from stick positions.

Developer Notes

  • Library: ArduCopter/toy_mode.cpp.

TMODE_ACTION1

Default 2
Range 0 24

Toy Mode Action 1 (TMODE_ACTION1)

Description

TMODE_ACTION1 maps a specific function to a button on the transmitter.

Values

  • 1: Take Photo.
  • 2: Toggle Video.
  • 7: Mode RTL.
  • 18: Disarm.

TMODE_ACTION2

Default 1
Range 0 24

Toy Mode Action 2 (TMODE_ACTION2)

Description

TMODE_ACTION2 maps a specific function to the secondary action button on a consumer transmitter.

Values

  • 1: Take Photo (Default).
  • 2: Toggle Video.
  • 8: Mode Circle.
  • 16: Flip.

TMODE_ACTION3

Default 18
Range 0 24

Toy Mode Action 3 (TMODE_ACTION3)

Description

TMODE_ACTION3 defines the behavior of the third utility button on the transmitter.

Values

  • 18: Disarm (Default). Instantly kills the motors.
  • 7: Mode RTL. Return to home.
  • 9: Mode Land.

TMODE_ACTION4

Default 0
Range 0 24

Toy Mode Action 4 (TMODE_ACTION4)

Description

TMODE_ACTION4 enables a "Shift Key" functionality for the transmitter buttons. By holding down the Mode button (Left), the other buttons can perform secondary tasks.

Values

  • 0: None (Default).
  • 23: Motor Load Test.
  • 15: Mode Throw.

TMODE_ACTION5

Default 0
Range 0 24

Toy Mode Action 5 (TMODE_ACTION5)

Description

TMODE_ACTION5 maps a secondary function to the right action button while in the "Shifted" state.

TMODE_ACTION6

Default 0
Range 0 24

Toy Mode Action 6 (TMODE_ACTION6)

Description

TMODE_ACTION6 maps a secondary function to the power button while in the "Shifted" state.

TMODE_ENABLE

Default 0
Range 0 2

Toy Mode Enable (TMODE_ENABLE)

Description

TMODE_ENABLE activates a simplified control scheme often used in consumer drones.

Instead of the standard ArduPilot stick behaviors and button mappings, Toy Mode reconfigures the flight controller to respond to specific button layouts (like those found on SkyViper transmitters) and enables "easy" features like auto-takeoff on high throttle.

  • 0: Disabled (Default). Standard ArduPilot behavior.
  • 1: Version 1 (SkyViper V2450GPS).
  • 2: Version 2 (F412-based boards).

Tuning & Behavior

  • Default Value: 0.
  • Warning: Do not enable this on a custom-built drone unless you are specifically using a SkyViper transmitter, as it will drastically change how your sticks and buttons work.
  • Reboot Required: Yes.

TMODE_FLAGS

Default 0
Range 0 15

Toy Mode Flags (TMODE_FLAGS)

Description

TMODE_FLAGS toggles specific "Ease of Use" behaviors.

  • Bit 0 (1): Disarm on Low Throttle. Automatically disarms the drone if the throttle is held at minimum for a few seconds.
  • Bit 1 (2): Arm on High Throttle. Allows arming the motors by simply pushing the throttle stick up (Auto-Takeoff style).
  • Bit 2 (4): Upgrade to Loiter. Automatically switches from AltHold to Loiter once a solid GPS fix is acquired.
  • Bit 3 (8): RTL Cancel. Cancels an automatic Return-to-Launch if the pilot provides a large stick input.

TMODE_LEFT

Default 19
Range 0 24

Toy Mode Left Action (TMODE_LEFT)

Description

TMODE_LEFT handles the primary "Mode" button.

  • 19: Toggle Mode (Default). Switches between the primary modes configured in TMODE_MODE1 and TMODE_MODE2 (typically swapping between AltHold and Loiter).

TMODE_LEFT_LONG

Default 0
Range 0 24

Toy Mode Left Long Action (TMODE_LEFT_LONG)

Description

TMODE_LEFT_LONG defines the behavior for a sustained press of the Mode button.

TMODE_LOAD_FILT

Default 1
Range 0 100

Toy Mode Load Test Filter (TMODE_LOAD_FILT)

Description

TMODE_LOAD_FILT controls the temporal resolution of thrust commands during a Toy Mode Load Test.

Instead of applying a new thrust value on every loop, this parameter "stretches" each value.

  • 1: No filtering. Commands are applied at the full loop rate.
  • X: Each thrust value from the test sequence is repeated X times.

Tuning & Behavior

  • Default: 1.
  • Usage: Used to slow down the rate of change during battery stress tests to see how the voltage recovers between steps.
  • Context: Only applicable when TMODE_LOAD_TYPE is set to a Log Replay mode.

TMODE_LOAD_MUL

Default 1.0
Range 0 1

TMODE_LOAD_MUL: Load test multiplier

Description

This scales the load test output, as a value between 0 and 1.

Values

  • Range: 0 to 1
  • Default: 1.0

Description

This parameter is part of the Toy Mode factory test suite (ENABLE_LOAD_TEST must be compiled in).

  • Function: It multiplies the motor PWM output during the automated load test sequence.
  • Usage: Used to run the motors at a reduced power level (e.g., 0.5) during endurance testing to verify battery life or thermal performance without running at full hover power.

TMODE_LOAD_TYPE

Default 1
Range 0 2

Toy Mode Load Test Type (TMODE_LOAD_TYPE)

Description

TMODE_LOAD_TYPE is used for factory testing and battery performance analysis on consumer drones using Toy Mode.

When a Load Test is active (triggered via specialized commands), this parameter determines the thrust profile:

  • 0: Constant Thrust. The drone applies a steady, fixed amount of power.
  • 1: Log Replay 1. Follows a pre-defined sequence of thrust variations to simulate a real flight profile.
  • 2: Log Replay 2. An alternative test sequence.

Tuning & Behavior

  • Default: 1.
  • Warning: This is an engineering/diagnostic feature. Activating a load test while the drone is on the ground can cause it to flip or fly away if propellers are attached.

TMODE_MODE1

Default 2
Range 0 25

Toy Mode Primary Mode 1 (TMODE_MODE1)

Description

TMODE_MODE1 sets the default flight mode that the drone starts in when powered on. In Toy Mode, this is typically a mode that does not require GPS (like AltHold).

Tuning & Behavior

  • Default Value: 2 (AltHold).

TMODE_MODE2

Default 5
Range 0 25

Toy Mode Primary Mode 2 (TMODE_MODE2)

Description

TMODE_MODE2 is the "Advanced" mode for Toy Mode drones, typically requiring a GPS fix (like Loiter).

TMODE_RIGHT

Default 2
Range 0 5

Tmode right action (TMODE_RIGHT)

Description

This parameter defines the function of the "Right" shoulder button (often labeled "Return") on Toy-grade controllers supported by ArduCopter's Toy Mode.

The Mathematics

Enum Mapping.

The Engineer's View

Defined in ArduCopter/toy_mode.cpp.

  • 0: None
  • 1: Safety (Toggle Motor Interlock)
  • 2: Arm / Land / RTL (Context sensitive)
  • 3: Mode Toggle
  • 4: Stunt

Tuning & Behavior

  • Default Value: 2 (Arm/Land/RTL)
  • Behavior: Press to Arm. Press in flight to RTL. Press near ground to Land.

TMODE_TMAX

Default 1.0
Range 0.1 1.0

Toy Mode Max Thrust Multiplier (TMODE_TMAX)

Description

TMODE_TMAX is the low-voltage counterpart to TMIN. It defines the scaling factor applied when the battery is near empty.

Typically, this is kept at 1.0 (full available power) to compensate for the naturally lower voltage of a drained battery.

Tuning & Behavior

  • Default: 1.0.
  • Physics: As voltage drops, RPM drops. By setting TMIN < 1.0 and TMAX = 1.0, the autopilot "unlocks" more signal range as the battery drains to maintain constant lift.

TMODE_TMIN

Default 1.0
Range 0.1 1.0

Toy Mode Min Thrust Multiplier (TMODE_TMIN)

Description

TMODE_TMIN is used in Toy Mode to ensure the drone's throttle feel remains consistent even as the battery drains.

A fully charged battery produces more power than a low battery. To prevent the drone from feeling "hyper" at the start of a flight and "sluggish" at the end, Toy Mode scales the thrust. TMIN defines the scaling factor applied at the Maximum voltage.

  • 1.0 (Default): No scaling.
  • 0.8: Reduces the motor power to 80% when the battery is full.

Tuning & Behavior

  • Default: 1.0.
  • Recommendation: Leave at 1.0 unless you find the drone is too difficult to control with a fresh battery.
  • Integration: Works in conjunction with TMODE_TMAX.

TMODE_TRIM_AUTO

PWM
Default 50
Range 0 100

Toy Mode Auto Stick Trim (TMODE_TRIM_AUTO)

Description

TMODE_TRIM_AUTO is a convenience feature for consumer drones using low-cost transmitters (RC controllers).

Cheap transmitters often have "Drift" in their gimbal sticks – the center point might not be exactly 1500 PWM every time. In Toy Mode, while the vehicle is Disarmed, the autopilot monitors the sticks. If they are near the center and remain steady for several seconds, the autopilot assumes that position is the intended "Neutral" and applies a small trim offset automatically.

Tuning & Behavior

  • Default: 50 PWM.
  • Safety: This only happens while disarmed. If the stick is too far from center (more than this parameter's value), the autopilot will NOT apply the trim, assuming you are intentionally holding the stick.
  • Benefit: Prevents the drone from slowly drifting in one direction just because your transmitter's potentiometers are slightly aged or imprecise.

TMODE_VMAX

V
Default 3.8
Range 3.0 4.2

Toy Mode Max Voltage Threshold (TMODE_VMAX)

Description

TMODE_VMAX sets the "Ceiling" for battery compensation in Toy Mode.

When the battery is above this voltage, the autopilot applies the minimum scaling set in TMODE_TMIN.

  • Default: 3.8V.
  • Physics: Defines the $X\_2$ point in a linear interpolation for thrust scaling. Between VMIN and VMAX, the autopilot smoothly varies the motor power to keep the drone's vertical performance constant.

TMODE_VMIN

V
Default 3.5
Range 3.0 4.2

Toy Mode Min Voltage Threshold (TMODE_VMIN)

Description

TMODE_VMIN sets the "Floor" for battery compensation in Toy Mode.

When the battery voltage drops to this level, the autopilot applies the maximum scaling set in TMODE_TMAX. This is calibrated for single-cell (1S) voltages, as Toy Mode is primarily used on small consumer drones.

Tuning & Behavior

  • Default: 3.5V.
  • Physics: Defines the $X\_1$ point in a linear interpolation for thrust scaling.