MAVLINKHUD

Overview

The ONESHOT parameter group (specifically ONESHOT_MASK) configures the legacy OneShot125 and OneShot42 fast PWM ESC protocols.

OneShot was an intermediate step between standard 490Hz PWM and modern digital DShot. It uses shorter pulse widths to allow the autopilot to send motor updates faster (up to 8kHz) with less latency.

Key Concepts

1. OneShot Mask

Selects which output channels on the flight controller will use the OneShot protocol.

  • Recommendation: Modern users should use DShot instead, as it is digital and more robust. OneShot is only recommended for legacy hardware that doesn't support DShot.

Developer Notes

  • Library: libraries/AP_HAL_ChibiOS.
  • Selection: This mask is often set automatically when MOT_PWM_TYPE is set to 1 (OneShot) or 2 (OneShot125).

ONESHOT_MASK: Oneshot output mask

Description

Mask of output channels to use OneShot125 on.

Values

  • Bitmask:

    • Bit 0: Servo 1
    • Bit 1: Servo 2
    • ...
    • Bit 15: Servo 16
  • Default: 0 (Disabled)

Description

This parameter enables the OneShot125 ESC protocol on specific servo output channels.

  • OneShot125: A faster analog PWM protocol (125-250µs pulse width) compared to standard PWM (1000-2000µs). It provides faster motor updates and is synchronized with the main loop.
  • Usage: Set the bit corresponding to each motor channel connected to a OneShot-capable ESC.
  • Warning: Do not enable this for standard servos or older ESCs, as the high refresh rate and short pulses will damage them.

Source Code

ardupilot/ArduPlane/Parameters.cpp