mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-07 16:38:30 -04:00
db197c0068
Co-authored-by: Torsten Z <t.zunker@fettec.net> Co-authored-by: Dr.-Ing. Amilcar do Carmo Lucas <amilcar.lucas@iav.de> Co-authored-by: Peter Barker <pb-gh@barker.dropbear.id.au> - uses ArduPilot's coding guidelines and naming conventions - control motor speed - Use the AP_ESC_Telem base class to: - copy ESC telemetry data into MAVLink telemetry - save ESC telemetry data in dataflash logs - use RPM telemetry for dynamic notch filter frequencies - sum the current telemetry info from all ESCs and use it as virtual battery current monitor sensor - average the voltage telemetry info and use it as virtual battery voltage monitor sensor - average the temperature telemetry info and use it as virtual battery temperature monitor sensor - Obey the safety switch. Keeps motors from turning - Use `SERVO_FWT_MASK` to define which servo output should be routed to FETtec ESCs - Use `SERVO_FWT_RVMASK` to define the rotation direction of the motors - `SERVO_FWT_RVMASK` changes only take effect when disarmed - Can be compiled when `HAL_WITH_ESC_TELEM` is disabled. No telemetry data will be available but it saves a lot of memory - pre-arm checks: - Check that UART is available - check that the desired motor channels parameter (`SERVO_FWT_MASK`) is valid - check that the desired motor poles parameter (`SERVO_FWT_POLES`) is valid - check that the all desired ESCs are found and configured - check that the ESCs are periodically sending telemetry data - re-init and configure an ESC(s) if not armed (motors not spinning) when - telemetry communication with the ESC(s) is lost - adds a serial simulator (--uartF=sim:fetteconewireesc) of FETtec OneWire ESCs - adds autotest (using the simulator) to: - simulate telemetry voltage, current, temperature, RPM data using SITL internal variables - test the safety switch functionality - test ESC power outages - test `SERVO_FWT_MASK` parameter validation - fly a copter over a simulated serial link connection
32 lines
736 B
Plaintext
32 lines
736 B
Plaintext
# Example parameter configuration file is for a Quadcopter with ESCs connected to Telem2
|
|
|
|
# FETtec OneWire ESCs are connected on Telem2 port
|
|
SERIAL2_PROTOCOL 38
|
|
SERIAL2_OPTIONS 0
|
|
|
|
# Use the full digital range supported by the ESCs
|
|
MOT_PWM_MAX 2000
|
|
MOT_PWM_MIN 1000
|
|
|
|
# Make sure the correct functions get routed out
|
|
SERVO1_FUNCTION 33
|
|
SERVO2_FUNCTION 34
|
|
SERVO3_FUNCTION 35
|
|
SERVO4_FUNCTION 36
|
|
|
|
# Activate FETtec OneWire support
|
|
SERVO_FTW_MASK 15
|
|
SERVO_FTW_RVMASK 0
|
|
SERVO_FTW_POLES 14
|
|
|
|
# Use RPM telemetry data to dynamically configure one notch filter per motor
|
|
INS_HNTCH_ENABLE 1
|
|
INS_HNTCH_MODE 3
|
|
INS_HNTCH_OPTS 2
|
|
INS_HNTCH_REF 1
|
|
INS_HNTCH_FREQ 60
|
|
INS_HNTCH_BW 30
|
|
|
|
# Use ESC telemetry data as a "virtual" battery monitor
|
|
BATT2_MONITOR 9
|