Skip to content

Configuration Reference

This page explains the meaning of important parameters in the THAP Engine to allow you to tune your robot accurately and safely.


⚙️ Serial System (Connectivity)

Communication port settings between AT32 and external devices (such as ESP32 or GPS).

Parameter Default Description
SERIAL1_BAUD 115200 Baudrate for Telemetry Port 1 (typically connected to ESP32).
SERIAL2_BAUD 115200 Baudrate for Telemetry Port 2 (typically used for GPS).
SERIAL_ORDER OTG1, USART1, USART2 The order of ports in the system (modifiable in hwdef.dat).

📈 PID Tuning

The core of motion control, divided into Roll, Pitch, and Yaw axes.

🟠 Rate Control

Parameter Recommended Range Description
ATC_RAT_RLL_P 0.1 - 0.5 Proportional: Response strength. If too high, the robot vibrates; if too low, it feels sluggish.
ATC_RAT_RLL_I 0.01 - 0.1 Integral: Corrects accumulated errors (e.g., wind pushing the robot).
ATC_RAT_RLL_D 0.001 - 0.1 Derivative: Dampens movement to prevent oscillating when stopping suddenly.

🏎️ ROVER Specific Settings (Ground Vehicle)

Parameter Default Description
MOT_STR_THR_MIX 0.5 Mixing ratio between Steering and Throttle.
CRUISE_SPEED 1.5 Target speed in automatic modes (unit: m/s).
WP_RADIUS 2.0 Radius around a Waypoint for it to be considered "reached".

🛡️ Safety System (Failsafe)

Parameter Recommended Description
FS_THR_ENABLE 1 (Enabled) Enables Failsafe when the RC signal is lost.
FS_THR_VALUE 950 PWM value of the throttle channel that triggers Failsafe.
BATT_LOW_VOLT 10.5 Minimum voltage to trigger Low Battery warning (for 3S Lipo).

🛠️ Correct Configuration Steps

  1. Connect: Plug the USB cable or connect via 5G to the THAP Configurator.
  2. Read Current Values: Click READ PARAMS to see the factory settings.
  3. Modify: Enter the new values in the desired fields.
  4. Save: Click WRITE PARAMS (values are saved to Flash immediately).
  5. Test: Experiment with the robot in a safe area. If it vibrates, reduce the P gain slightly.

[!IMPORTANT] Warning: Do not increase PID values too much at once, as it may cause the motors to spin excessively fast and cause damage.