机架、输出和电源 组装之后
FRAME_CLASS 3 和 FRAME_TYPE 1 让它成为 octa X,八个 SERVOn_FUNCTION 把 Motor1 到 Motor8 放在 MAIN OUT 1-8 上。这里选普通 PWM 最简单,因为 6X 的 MAIN 输出要额外做一项板级设置才能用 DShot。MOT_BAT_VOLT_MAX 和 _MIN 让 ArduPilot 在电池电压下降时保持推力不变。谐波陷波滤波器跟随油门,把电机的振动从陀螺仪信号里滤掉。6X 以数字方式读取它的电源模块(BATT_MONITOR 21)。其中有几项需要重启。
# ArduCopter 4.7.2 on a Pixhawk 6X: octa X, eight 80 A PWM ESCs on MAIN OUT 1-8, the PM02D HV on POWER1
param set FRAME_CLASS 3 # Octa
param set FRAME_TYPE 1 # X: M1 front right, then Motor Test A-H clockwise: M1 M3 M8 M4 M2 M6 M7 M5
param set SERVO1_FUNCTION 33 # MAIN 1: Motor1
param set SERVO2_FUNCTION 34 # MAIN 2: Motor2
param set SERVO3_FUNCTION 35 # MAIN 3: Motor3
param set SERVO4_FUNCTION 36 # MAIN 4: Motor4
param set SERVO5_FUNCTION 37 # MAIN 5: Motor5
param set SERVO6_FUNCTION 38 # MAIN 6: Motor6
param set SERVO7_FUNCTION 39 # MAIN 7: Motor7
param set SERVO8_FUNCTION 40 # MAIN 8: Motor8
param set MOT_PWM_TYPE 0 # Normal PWM: the MAIN outputs run DShot only with BRD_IO_DSHOT
param set MOT_PWM_MIN 1000 # then calibrate the ESCs to this range once, props off
param set MOT_PWM_MAX 2000
param set MOT_SPIN_ARM 0.1 # armed idle
param set MOT_SPIN_MIN 0.15 # the lowest it spins in flight: keep it above MOT_SPIN_ARM
param set MOT_HOVER_LEARN 2 # learn the hover throttle and save it in MOT_THST_HOVER
param set MOT_BAT_VOLT_MAX 50.4 # 4.2 V x 12: the same stick gives the same thrust as the packs sag
param set MOT_BAT_VOLT_MIN 39.6 # 3.3 V x 12
param set INS_HNTCH_ENABLE 1 # harmonic notch; refresh the parameters to see the rest
param set INS_HNTCH_MODE 1 # follow the throttle: PWM ESCs report no rpm
param set INS_HNTCH_FREQ 64 # Hz: about 3850 rpm at hover / 60; 20-inch props turn slowly
param set BATT_MONITOR 21 # the 6X's digital power module (INA2xx); analog (4) is not supported
param set BATT_I2C_BUS 1
param set BATT_CAPACITY 16000 # mAh: two packs in series add volts, not mAh
param set AHRS_ORIENTATION 0 # Pixhawk arrow to the nose; 4 = Yaw180 if it points back
# FRAME_CLASS, the SERVOn_FUNCTIONs, INS_HNTCH_ENABLE and BATT_MONITOR take effect after a reboot