Compare commits

...

56 Commits

Author SHA1 Message Date
Jacob Dahl d4bf6216e3 fix(rc): warn and deny invalid Spektrum bind sub-type
Previously, an unrecognized param2 sub-type would silently leave
dsm_bind_pulses at 0 and return the generic UNSUPPORTED ACK. Add an
explicit else-branch that logs a PX4_WARN and returns DENIED so users
get clear feedback in QGC.
2026-03-19 16:56:36 -08:00
Jacob Dahl c47fcf7390 fix(rc): check write return value in BindCRSF, guard Spektrum bind against invalid sub-type 2026-03-17 20:06:53 -08:00
Jacob Dahl 3d92ca5edf style(crsf_rc): zero-init vcmd, remove noisy comments, drop unused enum value 2026-03-17 19:16:57 -08:00
Jacob Dahl 0478395ada style(crsf_rc): use C++ style comment 2026-03-17 19:15:02 -08:00
Jacob Dahl 2bf50badf4 feat(crsf_rc): add CRSF receiver bind command
Add ability to initiate CRSF receiver binding from QGroundControl or
the NSH console. When MAV_CMD_START_RX_PAIR is received with
RC_TYPE_CRSF, the driver sends the CRSF bind command frame over UART.

Binding is rejected when armed or on singlewire configurations.

Also adds RC_TYPE and RC_SUB_TYPE constants to VehicleCommand.msg and
replaces magic numbers in DsmRc and RCInput drivers.

Based on PX4/PX4-Autopilot#23294.
2026-03-17 19:11:33 -08:00
PX4BuildBot 3b28390a2e docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-18 02:37:49 +00:00
Jacob Dahl 4b2e0a6f59 feat(sensors/gps): add per-receiver GPS delay parameters (#26660)
* sensors: add per-receiver GPS delay parameters

Add SENS_GPS{0,1}_DELAY params to vehicle_gps_position, following the
same device-ID matching pattern used for antenna offsets. Each receiver
can now have its own measurement delay relative to the IMU.

The delay is applied to timestamp_sample before blending. When PPS time
correction is active it takes priority over the parameter-based delay.
When a GPS driver already provides its own timestamp_sample the
per-receiver delay is not applied on top of it.

* fix(ekf2): remove EKF2_GPS_DELAY and perform param transation

* fix(param_translation): fix GPS param migration return values

Add missing return for EKF2_GPS_POS_Z and remove incorrect return for
EKF2_GPS_DELAY (1-to-many migration should not return PARAM_MODIFIED).

* fix(sensors,ekf2): rename pps_compensation and clarify delay default

* fix(ekf2): account for SENS_GPS*_DELAY in observation buffer sizing

* fix(docs): migrate EKF2_GPS_DELAY param
2026-03-17 18:19:08 -08:00
PX4BuildBot 533b2d677c docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-18 02:16:44 +00:00
Hamish Willee b1d25d05be docs(bug): Fix up typo to BATTERY_STATUS_DEMO (#26787) 2026-03-18 13:09:35 +11:00
PX4BuildBot 1f9911289c docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-18 01:41:01 +00:00
Jacob Dahl 89855926ef feat(sensors/gps): move GPS antenna offsets to per-receiver parameters (#26634)
* sensors: move GPS antenna offsets to per-receiver parameters

Move antenna position configuration from the single EKF2_GPS_POS_X/Y/Z
parameter set into per-receiver SENS_GPS{0,1}_OFF{X,Y,Z} parameters in
the sensors module. Each offset slot is matched to a physical receiver
by device ID (SENS_GPS{0,1}_ID), falling back to uORB instance index
when no IDs are configured.

The antenna offset is now carried through the SensorGps uORB message
and blended alongside other GPS states when multi-receiver blending is
active, so EKF2 receives the correct lever arm for whichever receiver
(or weighted combination) is selected.

- Add antenna_offset_{x,y,z} fields to SensorGps.msg
- Remove EKF2_GPS_POS_X/Y/Z params; EKF2 reads offset from gnssSample
- Add SENS_GPS{0,1}_ID and SENS_GPS{0,1}_OFF{X,Y,Z} params (module.yaml)
- Blend antenna offsets in GpsBlending (weighted average)
- Add unit tests for single, blended, and failover antenna offset cases
- Migrate params.c to module.yaml for the vehicle_gps_position module

* sensors: gps_blending: add asymmetric weight and fallthrough offset tests

Add two additional antenna offset test cases:

- dualReceiverAsymmetricWeightAntennaOffset: verify that unequal eph
  values produce correctly skewed blend weights (0.8/0.2) and that the
  output antenna offset reflects the weighted average
- blendingFallthroughAntennaOffset: verify that when blending is enabled
  but can_do_blending evaluates false (eph=0), the non-blending path
  correctly assigns the selected receiver's antenna offset

* feat(param_translation): translate EKF2_GPS_POS_ to SENS_GPS0_OFF_

* fix(msgs): proper formatting

* chore(msg): 0 if invalid/unknown

* fix(ROMFS): migrate EKF2_GPS_POS_ params

* fix(docs): migrate EKF2_GPS_POS_ params

* fix(blending): unsigned param

* Update msg/SensorGps.msg

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix(sensors/gps): remove 'values:' tag in  module.yaml

* fix(sensors/gps): unsigned instance index

* fix(blending): restore const on gps_blend_states()

Move antenna offset blending into blend_gps_data() where the
weights are computed, keeping gps_blend_states() const.

* fix(sensors/gps): fix msg annotation and restore SENS_GPS_PRIME values

Remove incorrect @invalid NaN annotation from antenna offset fields
(0.0 default is correct, not a sentinel). Restore values tag for
SENS_GPS_PRIME so QGC shows a dropdown.

* fix(gps_blending): fix pre-existing bug to clear _gps_updated flags

The loop iterates over i but always clears gps_select_index. The intent is to clear
all updated flags, but only the selected one gets cleared (N times)

* test(gps_blending): add stale update flag regression test
2026-03-17 17:33:41 -08:00
PX4BuildBot b597227da6 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-18 00:46:16 +00:00
Jacob Dahl f00e46f618 feat(dshot): Extended Telemetry and EEPROM support
Overhauls the DShot driver with per-timer BDShot selection, multi-timer                                                                                                                                  
sequential capture, Extended DShot Telemetry (EDT), and AM32 ESC EEPROM                                                                                                                                  
read/write via MAVLink. Expands ESC support from 8 to 12 channels.                                                                                                                                       
                                                                                                                                                                                                   
BDShot:                                                                                                                                                                                                  
- Per-timer BDShot protocol selection via actuator config UI                                                                                                                                             
- Multi-timer sequential burst/capture on any DMA-capable timer                                                                                                                                          
- Adaptive per-channel GCR bitstream decoding                                                                                                                                                            
- Per-channel online/offline detection with hysteresis                                                                                                                                                   
                                                                                                                                                                                                   
Extended DShot Telemetry (EDT):                                                                                                                                                                          
- Temperature, voltage, current from BDShot frames (no serial wire)                                                                                                                                      
- New DSHOT_BIDIR_EDT parameter                                                                                                                                     
- EDT data merged with serial telemetry when both available                                                                                                                                              
                                                                                                                                                                                                   
AM32 EEPROM:                                                                                                                                                                                             
- Read/write AM32 ESC settings via MAVLink ESC_EEPROM message                                                                                                                                            
- ESCSettingsInterface abstraction for future ESC firmware types                                                                                                                                         
- New DSHOT_ESC_TYPE parameter                                                                                                                                                                           
                                                                                                                                                                                                   
Other changes:                                                                                                                                                                                           
- Per-motor pole count params DSHOT_MOT_POL1–12 (replaces MOT_POLE_COUNT)                                                                                                                              
- EscStatus/EscReport expanded to 12 ESCs with uint16 bitmasks                                                                                                                                           
- Numerous bounds-check, overflow, and concurrency fixes                                                                                                                                                 
- Updated DShot documentation
2026-03-17 16:38:33 -08:00
PX4BuildBot c9ee06ff17 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-17 21:12:26 +00:00
Matthias Grob 09cb22f799 refactor(commander): remove unused parameter COM_MOT_TEST_EN 2026-03-17 12:56:18 -08:00
ghohl-30 9a5034b187 commander: fix typo in COM_RC_STICK_OV documentation (#26777) 2026-03-17 12:44:20 -08:00
Matthias Grob efdd1e021f fix(rcS): reset the flight mode assignments during an airframe reset (#26773)
* fix(rcS): reset the flight mode assignments during an airframe reset

because there are many products that have a default flight mode assignment in the airframe file and if the user resets to airframe defaults the flight mode assignment stays custom and doesn't get reset to "factory settings". It's neither a unit specific calibration nor a parameter to track total flights or flight time. I suggest to reset it as well.

* fix(posix rcS): sync airframe reset with the px4 common startup script

to make simulation testing of an airframe reset more realistic.
2026-03-17 12:43:27 -08:00
PX4BuildBot 89068128cb docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-17 20:14:33 +00:00
Marco Hauswirth f2608089fd fix(commander): decouple heading preflight check from attitude mode requirement 2026-03-17 20:47:12 +01:00
PX4BuildBot c7c0e830f1 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-17 19:44:30 +00:00
Marco Hauswirth 9fd967c857 fix(lib/events): add missing POSITION_SLOW and ALTITUDE_CRUISE to navigation_mode_groups 2026-03-17 20:27:52 +01:00
PX4BuildBot b066181512 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-17 17:54:55 +00:00
ttechnick c5b8eee4c3 fix(fw_att_control): fix comments / docs 2026-03-17 17:59:20 +01:00
ttechnick 3601a01594 feat(fw_att_control): limit turn coordination to normal flight 2026-03-17 17:59:20 +01:00
ttechnick ca4ae7cf41 feat(fw_att_control): use Axis angles instead of Euler Angles 2026-03-17 17:59:20 +01:00
ttechnick 22cad6ebf7 fix(fw_att_control): guard against 0 in param 2026-03-17 17:59:20 +01:00
ttechnick c0e7086d90 feat(fw_att_control): add derrivation of formulas
refactor(fw_att_control): move error calc to function
2026-03-17 17:59:20 +01:00
ttechnick 82bf75df0f docs(fw_att_ctrl): update quat turn coordination
fix(fw_att_control): use correct formula
2026-03-17 17:59:20 +01:00
ttechnick a42e7ebb2a feat(fw_att_control): add yaw rotation unit test 2026-03-17 17:59:20 +01:00
bresch c71e196dcf feat(fw q att control): improve pitchrate tracking using turn coordination constraint
refactor(fw_att_control): clean-up & optimization
2026-03-17 17:59:20 +01:00
ttechnick 00f952ed93 feat(fw_att_control): yaw error reallocation 2026-03-17 17:59:20 +01:00
ttechnick 7e5aca5540 feat(fw_att_control): magic numbers 2026-03-17 17:59:20 +01:00
ttechnick fdf258c2aa docs(fw_att_control): update docs 2026-03-17 17:59:20 +01:00
ttechnick 11ffa179bb docs(fw_att_control): update docs 2026-03-17 17:59:20 +01:00
ttechnick c4330f5a47 feat(fw_att_control): tilt-tracking controller 2026-03-17 17:59:20 +01:00
ttechnick e370b3f4b8 feat(fw_att_control): Add Initial Quat Controller + Debug topic
This commit introduces a new control mode for fixed-wing aircraft that
utilizes Euler angles for attitude control.
Additionally, a new logged topic has been added to facilitate debugging and
monitoring of the Euler rates setpoints during flight.
2026-03-17 17:59:20 +01:00
Eric Katzfey 9136c66b7e fix(voxl2): Added explicit port identifier on gps start command 2026-03-17 09:03:32 -07:00
PX4BuildBot 2ca42e5252 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-16 23:14:52 +00:00
Jacob Dahl 1e5a485424 docs(dronecan): add SENS_GPS_PRIME guidance for moving baseline GPS heading (#26769)
Recommend setting SENS_GPS_PRIME to the moving base CAN node ID
when using dual antenna GPS heading. The rover receiver in a
moving baseline configuration can experience degraded navigation
rate and increased data latency when corrections are intermittent,
making the moving base the better primary position source.
2026-03-16 15:06:41 -08:00
Gennaro Guidone 00b27c56a8 fix(mixer_module): change MixingOutput to use float outputs (#26724)
* refactor(mixer_module): change MixingOutput to use float outputs

MixingOutput now passes float values to output drivers instead of
uint16_t. This removes the need for the 8192 offset encoding and
allows reversible motors to receive negative values directly.

* fix(mixer_module): fix float safety issues

-EscClient and voxl2_io: replace outputs[i] with fabs(outputs[i]) > 0.fto fix compilation issues
-GZMixingInterface: add explicit double cast to prevent compilation error
-PWMSim: replaced unit16 cast with lroundf given that now motors outputs can be negative and casting a negative float to unit16 is undefinder behaviour
-mixer_module: same fix of PWM (unit126 cast on negative float is undefined behaviour)

* refactor(mixer_module): float rounding suggestions

* fix(pwm_sim): fix inverted disarmed condition

* fix(mixer_module): more float rounding improvements

* fix(mixer_module_tests): use casting method which are now in drivers for rounding tests

---------

Co-authored-by: Matthias Grob <maetugr@gmail.com>
2026-03-16 14:59:53 -08:00
Jacob Dahl 26c9ca115f fix(mathlib): rename euler312YawTest to match tested function (#26753)
* fix(mathlib): rename euler312YawTest to match tested function

The test calls getEuler321Yaw() but was named euler312YawTest.

Fixes #22103

* test(mathlib): add unit test for getEuler312Yaw

The existing test was named euler312YawTest but actually tested
getEuler321Yaw. Rename it and add a proper test for getEuler312Yaw
that verifies the quaternion and DCM overloads agree, and that
312 and 321 yaw match for a pure-yaw rotation.

Fixes #22103
2026-03-16 14:52:23 -08:00
Jacob Dahl ba5b96edbe fix(boards): correct GPIO_VDD_3V3_SENSORS_EN macro name (#26751)
* fix(fmu-v6c): correct GPIO_VDD_3V3_SENSORS_EN macro name

VDD_3V3_SENSORS_EN() referenced GPIO_VDD_3V3_SENSORS4_EN which
does not exist. The correct macro is GPIO_VDD_3V3_SENSORS_EN.

Fixes #26454

* fix(boards): rename VDD_3V3_SENSORS4_EN to VDD_3V3_SENSORS_EN

These boards have a single sensor power rail that was incorrectly
named SENSORS4_EN (copy-paste from boards with 4 rails). Rename
to SENSORS_EN to match the actual hardware.

Boards with legitimately numbered rails (fmu-v6xrt, x25-evo,
x25-super) are not changed.
2026-03-16 14:51:47 -08:00
Jacob Dahl a107179ce7 fix(commander): fix baro calibration infinite loop (#26752)
In dd2322d622, the local PressureToAltitude(pressure_pa, temperature)
was replaced with the shared getAltitudeFromPressure(pressure_pa,
pressure_sealevel_pa), but the call sites continued passing temperature
where sea-level pressure was expected. This caused the binary search to
never converge, hanging "commander calibrate baro" indefinitely.

The original function used measured temperature in its hypsometric
equation. The replacement uses standard atmosphere temperature (15C)
internally, which is sufficient since the calibration computes a
relative offset against GPS altitude.

- Pass kPressRefSeaLevelPa as the second argument instead of temperature
- Remove the now-unused temperature accumulation
- Replace unbounded while loop with iteration-capped for loop to prevent
  hangs from float precision stalls, matching VehicleAirData.cpp
2026-03-16 14:51:12 -08:00
Jacob Dahl d04858efe0 fix(uavcan): silence DroneCAN DSDL compiler build warnings (#26757)
Fix Python DeprecationWarning for invalid escape sequence in pyratemp.py
and replace deprecated FindPythonInterp CMake module in libuavcan.
2026-03-16 14:49:21 -08:00
Jacob Dahl 0b2e554202 refactor(voxl_esc): pass vehicle_control_mode_s and led_control_s by const reference 2026-03-16 14:48:13 -08:00
Jacob Dahl 7d9484e7a6 refactor(flight_mode_manager): pass follow_target_s by const reference 2026-03-16 14:48:13 -08:00
Jacob Dahl 37745a97d3 refactor(navigator): pass PositionYawSetpoint and loiter_point_s by const reference 2026-03-16 14:48:13 -08:00
Jacob Dahl 6f7ae9b5e5 refactor(navigator): pass mission_s by const reference 2026-03-16 14:48:13 -08:00
Jacob Dahl 43174bbf39 refactor(navigator): pass mission_item_s by const reference 2026-03-16 14:48:13 -08:00
Jacob Dahl aba4bbb1ab refactor(fw_mode_manager): pass position_setpoint_s by const reference 2026-03-16 14:48:13 -08:00
PX4BuildBot 346690ba75 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-16 22:07:50 +00:00
Ege Kural 113853f631 fix(ci): enable clang-tidy bugprone-unhandled-self-assignment / cert-oop54-cpp (#26767)
Signed-off-by: kuralme <kuralme@protonmail.com>
2026-03-16 13:59:06 -08:00
PX4BuildBot ed58a83a5c docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-15 19:50:02 +00:00
Jacob Dahl 71e673bec2 fix(mc_rate_control): remove redundant uORB copy in rate setpoint path (#26755)
Subscription::update() already copies data into the destination buffer,
making the subsequent copy() call redundant. This eliminates an
unnecessary memcpy every cycle on the 400 Hz rate control loop.
2026-03-15 11:43:23 -08:00
PX4BuildBot 9535559025 docs: auto-sync metadata [skip ci]
Co-Authored-By: PX4 BuildBot <bot@px4.io>
2026-03-14 20:58:23 +00:00
Jonas Eschmann 6f023d4c23 bumping mc_raptor blob submodule (to include license) (#26750) 2026-03-14 13:51:42 -07:00
206 changed files with 4902 additions and 2976 deletions
-2
View File
@@ -141,8 +141,6 @@ Checks: '*,
-cppcoreguidelines-avoid-goto,
-hicpp-avoid-goto,
-bugprone-branch-clone,
-bugprone-unhandled-self-assignment,
-cert-oop54-cpp,
-performance-enum-size,
-readability-avoid-nested-conditional-operator,
-cppcoreguidelines-prefer-member-initializer,
@@ -34,6 +34,7 @@ param set-default PWM_MAIN_FUNC2 102
param set-default PWM_MAIN_FUNC3 103
param set-default PWM_MAIN_FUNC4 104
param set-default EKF2_GPS_DELAY 0
param set-default SENS_GPS0_DELAY 0
param set-default SENS_GPS1_DELAY 0
param set SIH_VEHICLE_TYPE 0
@@ -44,7 +44,8 @@ param set-default PWM_MAIN_FUNC2 202
param set-default PWM_MAIN_FUNC3 203
param set-default PWM_MAIN_FUNC4 101
param set-default EKF2_GPS_DELAY 0
param set-default SENS_GPS0_DELAY 0
param set-default SENS_GPS1_DELAY 0
# Rate controllers
param set-default FW_RR_P 0.0500
@@ -11,7 +11,8 @@
PX4_SIMULATOR=${PX4_SIMULATOR:=sihsim}
PX4_SIM_MODEL=${PX4_SIM_MODEL:=xvert}
param set-default EKF2_GPS_DELAY 0
param set-default SENS_GPS0_DELAY 0
param set-default SENS_GPS1_DELAY 0
param set-default EKF2_FUSE_BETA 0 # side slip fusion is currently not supported for tailsitters
param set-default SENS_EN_GPSSIM 1
@@ -27,7 +27,8 @@ param set-default SENS_EN_BAROSIM 1
param set-default SENS_EN_MAGSIM 1
param set-default SENS_EN_ARSPDSIM 1
param set-default EKF2_GPS_DELAY 0
param set-default SENS_GPS0_DELAY 0
param set-default SENS_GPS1_DELAY 0
param set-default VT_TYPE 2
param set-default MPC_MAN_Y_MAX 60
@@ -44,4 +44,5 @@ param set-default PWM_MAIN_FUNC4 104
param set-default PWM_MAIN_FUNC5 105
param set-default PWM_MAIN_FUNC6 106
param set-default EKF2_GPS_DELAY 0
param set-default SENS_GPS0_DELAY 0
param set-default SENS_GPS1_DELAY 0
@@ -20,8 +20,8 @@ param set-default COM_DISARM_LAND 0.5
# EKF2 parameters
param set-default EKF2_DRAG_CTRL 1
param set-default EKF2_IMU_POS_X 0.02
param set-default EKF2_GPS_POS_X 0.055
param set-default EKF2_GPS_POS_Z -0.15
param set-default SENS_GPS0_OFFX 0.055
param set-default SENS_GPS0_OFFZ -0.15
param set-default EKF2_MIN_RNG 0.03
param set-default EKF2_OF_CTRL 1
param set-default EKF2_OF_POS_X 0.055
@@ -2,7 +2,8 @@
# shellcheck disable=SC2154
# EKF2 specifics
param set-default EKF2_GPS_DELAY 10
param set-default SENS_GPS0_DELAY 10
param set-default SENS_GPS1_DELAY 10
param set-default EKF2_MULTI_IMU 3
param set-default SENS_IMU_MODE 0
+4 -3
View File
@@ -119,10 +119,11 @@ else
param set SYS_AUTOCONFIG 1
fi
if param compare SYS_AUTOCONFIG 1
# To trigger a parameter reset during boot SYS_AUTCONFIG was set to 1 before
if param greater SYS_AUTOCONFIG 0
then
# Reset params except Airframe, RC calibration, sensor calibration, flight modes, total flight time, and next flight UUID.
param reset_all SYS_AUTOSTART RC* CAL_* COM_FLTMODE* LND_FLIGHT* TC_* COM_FLIGHT*
# Reset parameters except airframe, parameter version, RC calibration, sensor calibration, total flight time, flight UUID
param reset_all SYS_AUTOSTART SYS_PARAM_VER RC* CAL_* LND_FLIGHT* TC_* COM_FLIGHT*
set AUTOCNF yes
fi
@@ -19,8 +19,8 @@ param set-default COM_DISARM_LAND 0.5
# EKF2 parameters
param set-default EKF2_DRAG_CTRL 1
param set-default EKF2_IMU_POS_X 0.02
param set-default EKF2_GPS_POS_X 0.055
param set-default EKF2_GPS_POS_Z -0.15
param set-default SENS_GPS0_OFFX 0.055
param set-default SENS_GPS0_OFFZ -0.15
param set-default EKF2_MIN_RNG 0.03
param set-default EKF2_OF_CTRL 1
param set-default EKF2_OF_POS_X 0.055
@@ -19,8 +19,8 @@ param set-default COM_DISARM_LAND 0.5
# EKF2 parameters
param set-default EKF2_DRAG_CTRL 1
param set-default EKF2_IMU_POS_X 0.02
param set-default EKF2_GPS_POS_X 0.055
param set-default EKF2_GPS_POS_Z -0.15
param set-default SENS_GPS0_OFFX 0.055
param set-default SENS_GPS0_OFFZ -0.15
param set-default EKF2_MIN_RNG 0.03
param set-default EKF2_OF_CTRL 1
param set-default EKF2_OF_POS_X 0.055
@@ -47,8 +47,9 @@ param set-default EKF2_BCOEF_Y 25.5
param set-default EKF2_DRAG_CTRL 1
param set-default EKF2_GPS_DELAY 100
param set-default EKF2_GPS_POS_X 0.06
param set-default SENS_GPS0_DELAY 100
param set-default SENS_GPS1_DELAY 100
param set-default SENS_GPS0_OFFX 0.06
param set-default EKF2_GPS_V_NOISE 0.5
param set-default EKF2_IMU_POS_X 0.06
+2 -2
View File
@@ -191,8 +191,8 @@ else
# To trigger a parameter reset during boot SYS_AUTCONFIG was set to 1 before
if param greater SYS_AUTOCONFIG 0
then
# Reset parameters except airframe, parameter version, RC calibration, sensor calibration, flight modes, total flight time, flight UUID
param reset_all SYS_AUTOSTART SYS_PARAM_VER RC* CAL_* COM_FLTMODE* LND_FLIGHT* TC_* COM_FLIGHT*
# Reset parameters except airframe, parameter version, RC calibration, sensor calibration, total flight time, flight UUID
param reset_all SYS_AUTOSTART SYS_PARAM_VER RC* CAL_* LND_FLIGHT* TC_* COM_FLIGHT*
fi
#
+3 -3
View File
@@ -259,7 +259,7 @@
#define GPIO_VDD_5V_PERIPH_nOC /* PE15 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTE|GPIO_PIN15)
#define GPIO_VDD_5V_HIPOWER_nEN /* PG10 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTG|GPIO_PIN10)
#define GPIO_VDD_5V_HIPOWER_nOC /* PF13 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTF|GPIO_PIN13)
#define GPIO_VDD_3V3_SENSORS4_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SENSORS_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SPEKTRUM_POWER_EN /* PH2 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTH|GPIO_PIN2)
#define GPIO_VDD_3V3_SD_CARD_EN /* PC13 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN13)
@@ -286,7 +286,7 @@
#define VDD_5V_PERIPH_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_PERIPH_nEN, !(on_true))
#define VDD_5V_HIPOWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_HIPOWER_nEN, !(on_true))
#define VDD_3V3_SENSORS4_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS4_EN, (on_true))
#define VDD_3V3_SENSORS_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS_EN, (on_true))
#define VDD_3V3_SPEKTRUM_POWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SPEKTRUM_POWER_EN, (on_true))
#define READ_VDD_3V3_SPEKTRUM_POWER_EN() px4_arch_gpioread(GPIO_VDD_3V3_SPEKTRUM_POWER_EN)
#define VDD_3V3_SD_CARD_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SD_CARD_EN, (on_true))
@@ -452,7 +452,7 @@
GPIO_VDD_5V_PERIPH_nOC, \
GPIO_VDD_5V_HIPOWER_nEN, \
GPIO_VDD_5V_HIPOWER_nOC, \
GPIO_VDD_3V3_SENSORS4_EN, \
GPIO_VDD_3V3_SENSORS_EN, \
GPIO_VDD_3V3_SPEKTRUM_POWER_EN, \
GPIO_VDD_3V3_SD_CARD_EN, \
GPIO_PD15, \
+3 -3
View File
@@ -107,7 +107,7 @@ __EXPORT void board_peripheral_reset(int ms)
VDD_5V_PERIPH_EN(false);
board_control_spi_sensors_power(false, 0xffff);
VDD_3V3_SENSORS4_EN(false);
VDD_3V3_SENSORS_EN(false);
bool last = READ_VDD_3V3_SPEKTRUM_POWER_EN();
/* Keep Spektum on to discharge rail*/
@@ -122,7 +122,7 @@ __EXPORT void board_peripheral_reset(int ms)
/* switch the peripheral rail back on */
VDD_3V3_SPEKTRUM_POWER_EN(last);
board_control_spi_sensors_power(true, 0xffff);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_5V_PERIPH_EN(true);
}
@@ -219,7 +219,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
VDD_3V3_SD_CARD_EN(true);
VDD_5V_PERIPH_EN(true);
VDD_5V_HIPOWER_EN(true);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_3V3_SPEKTRUM_POWER_EN(true);
/* Need hrt running before using the ADC */
+1 -1
View File
@@ -48,7 +48,7 @@ constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
+1
View File
@@ -0,0 +1 @@
CONFIG_MAVLINK_DIALECT="development"
+3 -6
View File
@@ -273,7 +273,7 @@
#define GPIO_VDD_5V_PERIPH_nOC /* PE15 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTE|GPIO_PIN15)
#define GPIO_VDD_5V_HIPOWER_nEN /* PG10 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTG|GPIO_PIN10)
#define GPIO_VDD_5V_HIPOWER_nOC /* PF13 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTF|GPIO_PIN13)
#define GPIO_VDD_3V3_SENSORS4_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SENSORS_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SPEKTRUM_POWER_EN /* PH2 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTH|GPIO_PIN2)
#define GPIO_VDD_3V3_SD_CARD_EN /* PC13 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN13)
@@ -295,7 +295,7 @@
#define VDD_5V_PERIPH_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_PERIPH_nEN, !(on_true))
#define VDD_5V_HIPOWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_HIPOWER_nEN, !(on_true))
#define VDD_3V3_SENSORS4_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS4_EN, (on_true))
#define VDD_3V3_SENSORS_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS_EN, (on_true))
#define VDD_3V3_SPEKTRUM_POWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SPEKTRUM_POWER_EN, (on_true))
#define READ_VDD_3V3_SPEKTRUM_POWER_EN() px4_arch_gpioread(GPIO_VDD_3V3_SPEKTRUM_POWER_EN)
#define VDD_3V3_SD_CARD_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SD_CARD_EN, (on_true))
@@ -421,9 +421,6 @@
/* This board provides a DMA pool and APIs */
#define BOARD_DMA_ALLOC_POOL_SIZE 5120
/* This board has 4 DMA channels available for bidirectional dshot */
#define BOARD_DMA_NUM_DSHOT_CHANNELS 4
/* This board provides the board_on_reset interface */
#define BOARD_HAS_ON_RESET 1
@@ -455,7 +452,7 @@
GPIO_VDD_5V_PERIPH_nOC, \
GPIO_VDD_5V_HIPOWER_nEN, \
GPIO_VDD_5V_HIPOWER_nOC, \
GPIO_VDD_3V3_SENSORS4_EN, \
GPIO_VDD_3V3_SENSORS_EN, \
GPIO_VDD_3V3_SPEKTRUM_POWER_EN, \
GPIO_VDD_3V3_SD_CARD_EN, \
GPIO_PD15, \
+3 -3
View File
@@ -108,7 +108,7 @@ __EXPORT void board_peripheral_reset(int ms)
VDD_5V_HIPOWER_EN(false);
VDD_5V_PERIPH_EN(false);
board_control_spi_sensors_power(false, 0xffff);
VDD_3V3_SENSORS4_EN(false);
VDD_3V3_SENSORS_EN(false);
SPI6_RESET(true);
bool last = READ_VDD_3V3_SPEKTRUM_POWER_EN();
@@ -124,7 +124,7 @@ __EXPORT void board_peripheral_reset(int ms)
/* switch the peripheral rail back on */
VDD_3V3_SPEKTRUM_POWER_EN(last);
board_control_spi_sensors_power(true, 0xffff);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_5V_HIPOWER_EN(true);
VDD_5V_PERIPH_EN(true);
@@ -221,7 +221,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
/* Power on Interfaces */
VDD_5V_PERIPH_EN(true);
VDD_5V_HIPOWER_EN(true);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_3V3_SPEKTRUM_POWER_EN(true);
SPI6_RESET(false);
+2 -2
View File
@@ -48,7 +48,7 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
@@ -71,7 +71,7 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
+19
View File
@@ -0,0 +1,19 @@
4001_quad_x
4050_generic_250
6001_hexa_x
12001_octo_cox
13100_generic_vtol_tiltrotor
5001_quad_+
24001_dodeca_cox
2100_standard_plane
13000_generic_vtol_standard
4601_droneblocks_dexi_5
11001_hexa_cox
14001_generic_mc_with_tilt
16001_helicopter
9001_octo_+
7001_hexa_+
3000_generic_wing
2106_albatross
13200_generic_vtol_tailsitter
13030_generic_vtol_quad_tiltrotor
+1
View File
@@ -0,0 +1 @@
CONFIG_MAVLINK_DIALECT="development"
-3
View File
@@ -306,9 +306,6 @@
/* This board provides a DMA pool and APIs */
#define BOARD_DMA_ALLOC_POOL_SIZE 5120
/* This board has 3 DMA channels available for bidirectional dshot */
#define BOARD_DMA_NUM_DSHOT_CHANNELS 3
/* This board provides the board_on_reset interface */
#define BOARD_HAS_ON_RESET 1
+1
View File
@@ -0,0 +1 @@
CONFIG_MAVLINK_DIALECT="development"
-3
View File
@@ -311,9 +311,6 @@
/* This board provides a DMA pool and APIs */
#define BOARD_DMA_ALLOC_POOL_SIZE 5120
/* This board has 4 DMA channels available for bidirectional dshot */
#define BOARD_DMA_NUM_DSHOT_CHANNELS 4
/* This board provides the board_on_reset interface */
#define BOARD_HAS_ON_RESET 1
+2 -2
View File
@@ -48,7 +48,7 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
// initSPIBus(SPI::Bus::SPI5, {
// initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
@@ -69,7 +69,7 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
// initSPIBus(SPI::Bus::SPI5, {
// initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
+3 -3
View File
@@ -262,7 +262,7 @@
#define GPIO_VDD_5V_PERIPH_nOC /* PE15 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTE|GPIO_PIN15)
#define GPIO_VDD_5V_HIPOWER_nEN /* PG10 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTG|GPIO_PIN10)
#define GPIO_VDD_5V_HIPOWER_nOC /* PF13 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTF|GPIO_PIN13)
#define GPIO_VDD_3V3_SENSORS4_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SENSORS_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SPEKTRUM_POWER_EN /* PH2 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTH|GPIO_PIN2)
#define GPIO_VDD_3V3_SD_CARD_EN /* PC13 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN13)
@@ -289,7 +289,7 @@
#define VDD_5V_PERIPH_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_PERIPH_nEN, !(on_true))
#define VDD_5V_HIPOWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_HIPOWER_nEN, !(on_true))
#define VDD_3V3_SENSORS4_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS4_EN, (on_true))
#define VDD_3V3_SENSORS_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS_EN, (on_true))
#define VDD_3V3_SPEKTRUM_POWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SPEKTRUM_POWER_EN, (on_true))
#define READ_VDD_3V3_SPEKTRUM_POWER_EN() px4_arch_gpioread(GPIO_VDD_3V3_SPEKTRUM_POWER_EN)
#define VDD_3V3_SD_CARD_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SD_CARD_EN, (on_true))
@@ -453,7 +453,7 @@
GPIO_VDD_5V_PERIPH_nOC, \
GPIO_VDD_5V_HIPOWER_nEN, \
GPIO_VDD_5V_HIPOWER_nOC, \
GPIO_VDD_3V3_SENSORS4_EN, \
GPIO_VDD_3V3_SENSORS_EN, \
GPIO_VDD_3V3_SPEKTRUM_POWER_EN, \
GPIO_VDD_3V3_SD_CARD_EN, \
GPIO_PD15, \
+3 -3
View File
@@ -107,7 +107,7 @@ __EXPORT void board_peripheral_reset(int ms)
VDD_5V_PERIPH_EN(false);
board_control_spi_sensors_power(false, 0xffff);
VDD_3V3_SENSORS4_EN(false);
VDD_3V3_SENSORS_EN(false);
bool last = READ_VDD_3V3_SPEKTRUM_POWER_EN();
/* Keep Spektum on to discharge rail*/
@@ -122,7 +122,7 @@ __EXPORT void board_peripheral_reset(int ms)
/* switch the peripheral rail back on */
VDD_3V3_SPEKTRUM_POWER_EN(last);
board_control_spi_sensors_power(true, 0xffff);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_5V_PERIPH_EN(true);
}
@@ -215,7 +215,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
VDD_3V3_SD_CARD_EN(true);
VDD_5V_PERIPH_EN(true);
VDD_5V_HIPOWER_EN(true);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_3V3_SPEKTRUM_POWER_EN(true);
/* Need hrt running before using the ADC */
+1 -1
View File
@@ -48,7 +48,7 @@ constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
+3 -3
View File
@@ -271,7 +271,7 @@
#define GPIO_VDD_5V_PERIPH_nOC /* PE15 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTE|GPIO_PIN15)
#define GPIO_VDD_5V_HIPOWER_nEN /* PG10 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTG|GPIO_PIN10)
#define GPIO_VDD_5V_HIPOWER_nOC /* PF13 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTF|GPIO_PIN13)
#define GPIO_VDD_3V3_SENSORS4_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SENSORS_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SPEKTRUM_POWER_EN /* PH2 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTH|GPIO_PIN2)
#define GPIO_VDD_3V3_SD_CARD_EN /* PC13 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN13)
@@ -297,7 +297,7 @@
#define VDD_5V_PERIPH_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_PERIPH_nEN, !(on_true))
#define VDD_5V_HIPOWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_HIPOWER_nEN, !(on_true))
#define VDD_3V3_SENSORS4_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS4_EN, (on_true))
#define VDD_3V3_SENSORS_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS_EN, (on_true))
#define VDD_3V3_SPEKTRUM_POWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SPEKTRUM_POWER_EN, (on_true))
#define READ_VDD_3V3_SPEKTRUM_POWER_EN() px4_arch_gpioread(GPIO_VDD_3V3_SPEKTRUM_POWER_EN)
#define VDD_3V3_SD_CARD_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SD_CARD_EN, (on_true))
@@ -463,7 +463,7 @@
GPIO_VDD_5V_PERIPH_nOC, \
GPIO_VDD_5V_HIPOWER_nEN, \
GPIO_VDD_5V_HIPOWER_nOC, \
GPIO_VDD_3V3_SENSORS4_EN, \
GPIO_VDD_3V3_SENSORS_EN, \
GPIO_VDD_3V3_SPEKTRUM_POWER_EN, \
GPIO_VDD_3V3_SD_CARD_EN, \
GPIO_SYNC, \
+3 -3
View File
@@ -107,7 +107,7 @@ __EXPORT void board_peripheral_reset(int ms)
VDD_5V_PERIPH_EN(false);
board_control_spi_sensors_power(false, 0xffff);
VDD_3V3_SENSORS4_EN(false);
VDD_3V3_SENSORS_EN(false);
bool last = READ_VDD_3V3_SPEKTRUM_POWER_EN();
/* Keep Spektum on to discharge rail*/
@@ -122,7 +122,7 @@ __EXPORT void board_peripheral_reset(int ms)
/* switch the peripheral rail back on */
VDD_3V3_SPEKTRUM_POWER_EN(last);
board_control_spi_sensors_power(true, 0xffff);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_5V_PERIPH_EN(true);
}
@@ -219,7 +219,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
VDD_3V3_SD_CARD_EN(true);
VDD_5V_PERIPH_EN(true);
VDD_5V_HIPOWER_EN(true);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_3V3_SPEKTRUM_POWER_EN(true);
/* Need hrt running before using the ADC */
+1 -1
View File
@@ -49,7 +49,7 @@ constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
@@ -58,11 +58,13 @@
//#define DMAMAP_USART6_RX DMAMAP_DMA12_USART6RX_0 /* 5 DMA1:71 PX4IO */
//#define DMAMAP_USART6_TX DMAMAP_DMA12_USART6TX_0 /* 6 DMA1:72 PX4IO */
// Assigned in timer_config.cpp
// TODO
// Timer 4 /* 7 DMA1:32 TIM4UP */
// Timer 5 /* 8 DMA1:50 TIM5UP */
// Dynamically assigned in timer_config.cpp for DShot (allocated/freed per cycle):
// Timer 1 TIM1UP (burst) + TIM1CH1-4 (capture)
// Timer 2 TIM2UP (burst) + TIM2CH1-4 (capture)
// Timer 3 TIM3UP (burst) + TIM3CH1-4 (capture)
// Timer 4 TIM4UP (burst) + TIM4CH1-3 (capture, CH4 has no DMA)
// Timer 5 TIM5UP (burst) + TIM5CH1-4 (capture)
// Timer 15 - no TIM15UP DMA, cannot do DShot
// DMAMUX2 Using at most 8 Channels on DMA2 -------- Assigned
// V
@@ -38,18 +38,20 @@ constexpr io_timers_t io_timers[MAX_IO_TIMERS] = {
initIOTimer(Timer::Timer1, DMA{DMA::Index1}),
initIOTimer(Timer::Timer4, DMA{DMA::Index1}),
initIOTimer(Timer::Timer5, DMA{DMA::Index1}),
initIOTimer(Timer::Timer15),
initIOTimer(Timer::Timer3),
initIOTimer(Timer::Timer2),
initIOTimer(Timer::Timer15), // Note: Timer15 has no TIM_UP DMA on STM32H7, cannot do DShot
initIOTimer(Timer::Timer3, DMA{DMA::Index1}),
initIOTimer(Timer::Timer2, DMA{DMA::Index1}),
};
// Note: Timer4 Channel4 has no DMAMUX mapping on STM32H7, so BDShot telemetry capture
// is not available on that channel. DShot output still works (uses TIM_UP DMA for burst).
constexpr timer_io_channels_t timer_io_channels[MAX_TIMER_IO_CHANNELS] = {
initIOTimerChannel(io_timers, {Timer::Timer1, Timer::Channel1}, {GPIO::PortA, GPIO::Pin8}),
initIOTimerChannel(io_timers, {Timer::Timer1, Timer::Channel2}, {GPIO::PortE, GPIO::Pin11}),
initIOTimerChannel(io_timers, {Timer::Timer1, Timer::Channel3}, {GPIO::PortE, GPIO::Pin13}),
initIOTimerChannel(io_timers, {Timer::Timer1, Timer::Channel4}, {GPIO::PortE, GPIO::Pin14}),
initIOTimerChannel(io_timers, {Timer::Timer4, Timer::Channel3}, {GPIO::PortD, GPIO::Pin14}),
initIOTimerChannel(io_timers, {Timer::Timer4, Timer::Channel4}, {GPIO::PortD, GPIO::Pin15}),
initIOTimerChannel(io_timers, {Timer::Timer4, Timer::Channel4}, {GPIO::PortD, GPIO::Pin15}), // no BDShot telemetry readback
initIOTimerChannel(io_timers, {Timer::Timer5, Timer::Channel1}, {GPIO::PortA, GPIO::Pin0}),
initIOTimerChannel(io_timers, {Timer::Timer5, Timer::Channel2}, {GPIO::PortA, GPIO::Pin1}),
initIOTimerChannel(io_timers, {Timer::Timer15, Timer::Channel1}, {GPIO::PortE, GPIO::Pin5}),
+1 -1
View File
@@ -143,7 +143,7 @@ if [ "$GPS" != "NONE" ]; then
if [ "$PLATFORM" == "M0197" ]; then
gps start -d /dev/ttyHS7
else
qshell gps start
qshell gps start -d 6
fi
fi
+3 -3
View File
@@ -233,7 +233,7 @@
#define GPIO_VDD_5V_PERIPH_nOC /* PE15 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTE|GPIO_PIN15)
#define GPIO_VDD_5V_HIPOWER_nEN /* PF12 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTF|GPIO_PIN12)
#define GPIO_VDD_5V_HIPOWER_nOC /* PF13 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTF|GPIO_PIN13)
#define GPIO_VDD_3V3_SENSORS4_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SENSORS_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SPEKTRUM_POWER_EN /* PH2 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTH|GPIO_PIN2)
#define GPIO_VDD_3V3_SD_CARD_EN /* PC13 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN13)
@@ -258,7 +258,7 @@
#define VDD_5V_PERIPH_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_PERIPH_nEN, !(on_true))
#define VDD_5V_HIPOWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_HIPOWER_nEN, !(on_true))
#define VDD_3V3_SENSORS4_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS4_EN, (on_true))
#define VDD_3V3_SENSORS_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS_EN, (on_true))
#define VDD_3V3_SPEKTRUM_POWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SPEKTRUM_POWER_EN, (on_true))
#define READ_VDD_3V3_SPEKTRUM_POWER_EN() px4_arch_gpioread(GPIO_VDD_3V3_SPEKTRUM_POWER_EN)
#define VDD_3V3_SD_CARD_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SD_CARD_EN, (on_true))
@@ -409,7 +409,7 @@
GPIO_VDD_5V_PERIPH_nOC, \
GPIO_VDD_5V_HIPOWER_nEN, \
GPIO_VDD_5V_HIPOWER_nOC, \
GPIO_VDD_3V3_SENSORS4_EN, \
GPIO_VDD_3V3_SENSORS_EN, \
GPIO_VDD_3V3_SPEKTRUM_POWER_EN, \
GPIO_VDD_3V3_SD_CARD_EN, \
GPIO_PH11, \
+3 -3
View File
@@ -107,7 +107,7 @@ __EXPORT void board_peripheral_reset(int ms)
VDD_5V_PERIPH_EN(false);
board_control_spi_sensors_power(false, 0xffff);
VDD_3V3_SENSORS4_EN(false);
VDD_3V3_SENSORS_EN(false);
bool last = READ_VDD_3V3_SPEKTRUM_POWER_EN();
/* Keep Spektum on to discharge rail*/
@@ -122,7 +122,7 @@ __EXPORT void board_peripheral_reset(int ms)
/* switch the peripheral rail back on */
VDD_3V3_SPEKTRUM_POWER_EN(last);
board_control_spi_sensors_power(true, 0xffff);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_5V_PERIPH_EN(true);
}
@@ -217,7 +217,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
VDD_3V3_SD_CARD_EN(true);
VDD_5V_PERIPH_EN(true);
VDD_5V_HIPOWER_EN(true);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_3V3_SPEKTRUM_POWER_EN(true);
/* Need hrt running before using the ADC */
+3 -3
View File
@@ -49,7 +49,7 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
@@ -73,7 +73,7 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
@@ -96,7 +96,7 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
+1 -1
View File
@@ -185,7 +185,7 @@
#define VDD_5V_PERIPH_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_PERIPH_nEN, !(on_true))
#define VDD_5V_HIPOWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_HIPOWER_nEN, !(on_true))
#define VDD_3V3_SENSORS_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS4_EN, (on_true))
#define VDD_3V3_SENSORS_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS_EN, (on_true))
/* Tone alarm output */
+3 -3
View File
@@ -268,7 +268,7 @@
#define GPIO_VDD_5V_PERIPH_nOC /* PE15 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTE|GPIO_PIN15)
#define GPIO_VDD_5V_HIPOWER_nEN /* PG10 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTG|GPIO_PIN10)
#define GPIO_VDD_5V_HIPOWER_nOC /* PF13 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTF|GPIO_PIN13)
#define GPIO_VDD_3V3_SENSORS4_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SENSORS_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SPEKTRUM_POWER_EN /* PH2 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTH|GPIO_PIN2)
#define GPIO_VDD_3V3_SD_CARD_EN /* PC13 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN13)
@@ -290,7 +290,7 @@
#define VDD_5V_PERIPH_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_PERIPH_nEN, !(on_true))
#define VDD_5V_HIPOWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_HIPOWER_nEN, !(on_true))
#define VDD_3V3_SENSORS4_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS4_EN, (on_true))
#define VDD_3V3_SENSORS_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS_EN, (on_true))
#define VDD_3V3_SPEKTRUM_POWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SPEKTRUM_POWER_EN, (on_true))
#define READ_VDD_3V3_SPEKTRUM_POWER_EN() px4_arch_gpioread(GPIO_VDD_3V3_SPEKTRUM_POWER_EN)
#define VDD_3V3_SD_CARD_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SD_CARD_EN, (on_true))
@@ -454,7 +454,7 @@
GPIO_VDD_5V_PERIPH_nOC, \
GPIO_VDD_5V_HIPOWER_nEN, \
GPIO_VDD_5V_HIPOWER_nOC, \
GPIO_VDD_3V3_SENSORS4_EN, \
GPIO_VDD_3V3_SENSORS_EN, \
GPIO_VDD_3V3_SPEKTRUM_POWER_EN, \
GPIO_VDD_3V3_SD_CARD_EN, \
GPIO_PD15, \
+3 -3
View File
@@ -107,7 +107,7 @@ __EXPORT void board_peripheral_reset(int ms)
VDD_5V_PERIPH_EN(false);
board_control_spi_sensors_power(false, 0xffff);
VDD_3V3_SENSORS4_EN(false);
VDD_3V3_SENSORS_EN(false);
bool last = READ_VDD_3V3_SPEKTRUM_POWER_EN();
/* Keep Spektum on to discharge rail*/
@@ -122,7 +122,7 @@ __EXPORT void board_peripheral_reset(int ms)
/* switch the peripheral rail back on */
VDD_3V3_SPEKTRUM_POWER_EN(last);
board_control_spi_sensors_power(true, 0xffff);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_5V_PERIPH_EN(true);
}
@@ -219,7 +219,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
VDD_3V3_SD_CARD_EN(true);
VDD_5V_PERIPH_EN(true);
VDD_5V_HIPOWER_EN(true);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_3V3_SPEKTRUM_POWER_EN(true);
/* Need hrt running before using the ADC */
+7 -7
View File
@@ -49,7 +49,7 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
@@ -73,7 +73,7 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
@@ -97,7 +97,7 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
@@ -120,7 +120,7 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
@@ -143,7 +143,7 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
@@ -166,7 +166,7 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
@@ -190,7 +190,7 @@ constexpr px4_spi_bus_all_hw_t px4_spi_buses_all_hw[BOARD_NUM_SPI_CFG_HW_VERSION
}, {GPIO::PortE, GPIO::Pin7}),
// initSPIBus(SPI::Bus::SPI4, {
// // no devices
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS4_EN from board_config.h
// TODO: if enabled, remove GPIO_VDD_3V3_SENSORS_EN from board_config.h
// }, {GPIO::PortG, GPIO::Pin8}),
initSPIBus(SPI::Bus::SPI5, {
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortG, GPIO::Pin7})
+1 -1
View File
@@ -161,7 +161,7 @@
#define VDD_5V_PERIPH_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_PERIPH_nEN, !(on_true))
#define VDD_5V_HIPOWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_HIPOWER_nEN, !(on_true))
#define VDD_3V3_SENSORS4_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS_EN, (on_true))
#define VDD_3V3_SENSORS_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS_EN, (on_true))
#define VDD_3V3_SPEKTRUM_POWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SPEKTRUM_POWER_EN, (on_true))
#define READ_VDD_3V3_SPEKTRUM_POWER_EN() px4_arch_gpioread(GPIO_VDD_3V3_SPEKTRUM_POWER_EN)
+3 -3
View File
@@ -108,7 +108,7 @@ __EXPORT void board_peripheral_reset(int ms)
VDD_5V_PERIPH_EN(false);
board_control_spi_sensors_power(false, 0xffff);
VDD_3V3_SENSORS4_EN(false);
VDD_3V3_SENSORS_EN(false);
bool last = READ_VDD_3V3_SPEKTRUM_POWER_EN();
/* Keep Spektum on to discharge rail*/
@@ -123,7 +123,7 @@ __EXPORT void board_peripheral_reset(int ms)
/* switch the peripheral rail back on */
VDD_3V3_SPEKTRUM_POWER_EN(last);
board_control_spi_sensors_power(true, 0xffff);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_5V_PERIPH_EN(true);
}
@@ -212,7 +212,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
VDD_5V_PERIPH_EN(true);
VDD_5V_HIPOWER_EN(true);
board_control_spi_sensors_power(true, 0xffff);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_3V3_SPEKTRUM_POWER_EN(true);
/* Need hrt running before using the ADC */
@@ -210,7 +210,7 @@
#define GPIO_VDD_3V5_LTE_nOC /* PE15 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTE|GPIO_PIN15)
#define GPIO_VDD_5V_HIPOWER_nEN /* PF12 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTF|GPIO_PIN12)
#define GPIO_VDD_5V_HIPOWER_nOC /* PF13 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTF|GPIO_PIN13)
#define GPIO_VDD_3V3_SENSORS4_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SENSORS_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
/* Spare GPIO */
@@ -227,7 +227,7 @@
#define VDD_5V_PERIPH_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_PERIPH_nEN, !(on_true))
#define VDD_3V5_LTE_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V5_LTE_nEN, on_true)
#define VDD_5V_HIPOWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_HIPOWER_nEN, on_true)
#define VDD_3V3_SENSORS4_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS4_EN, (on_true))
#define VDD_3V3_SENSORS_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS_EN, (on_true))
/* Tone alarm output */
@@ -342,7 +342,7 @@
GPIO_VDD_3V5_LTE_nOC, \
GPIO_VDD_5V_HIPOWER_nEN, \
GPIO_VDD_5V_HIPOWER_nOC, \
GPIO_VDD_3V3_SENSORS4_EN, \
GPIO_VDD_3V3_SENSORS_EN, \
GPIO_PH11, \
GPIO_NFC_GPIO, \
GPIO_TONE_ALARM_IDLE, \
@@ -109,7 +109,7 @@ __EXPORT void board_peripheral_reset(int ms)
VDD_3V5_LTE_EN(false);
VDD_5V_HIPOWER_EN(false);
board_control_spi_sensors_power(false, 0xffff);
VDD_3V3_SENSORS4_EN(false);
VDD_3V3_SENSORS_EN(false);
/* wait for the peripheral rail to reach GND */
usleep(ms * 1000);
@@ -121,7 +121,7 @@ __EXPORT void board_peripheral_reset(int ms)
board_control_spi_sensors_power(true, 0xffff);
VDD_3V5_LTE_EN(true);
VDD_5V_HIPOWER_EN(true);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
}
@@ -211,7 +211,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
/* Power on Interfaces */
VDD_3V5_LTE_EN(true);
VDD_5V_HIPOWER_EN(true);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
/* Need hrt running before using the ADC */
+3 -3
View File
@@ -259,7 +259,7 @@
#define GPIO_VDD_5V_PERIPH_nOC /* PE15 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTE|GPIO_PIN15)
#define GPIO_VDD_5V_HIPOWER_nEN /* PG10 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTG|GPIO_PIN10)
#define GPIO_VDD_5V_HIPOWER_nOC /* PF13 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTF|GPIO_PIN13)
#define GPIO_VDD_3V3_SENSORS4_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SENSORS_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SPEKTRUM_POWER_EN /* PH2 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTH|GPIO_PIN2)
#define GPIO_VDD_3V3_SD_CARD_EN /* PC13 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN13)
@@ -276,7 +276,7 @@
#define VDD_5V_PERIPH_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_PERIPH_nEN, !(on_true))
#define VDD_5V_HIPOWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_HIPOWER_nEN, !(on_true))
#define VDD_3V3_SENSORS4_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS4_EN, (on_true))
#define VDD_3V3_SENSORS_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS_EN, (on_true))
#define VDD_3V3_SPEKTRUM_POWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SPEKTRUM_POWER_EN, (on_true))
#define READ_VDD_3V3_SPEKTRUM_POWER_EN() px4_arch_gpioread(GPIO_VDD_3V3_SPEKTRUM_POWER_EN)
#define VDD_3V3_SD_CARD_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SD_CARD_EN, (on_true))
@@ -420,7 +420,7 @@
GPIO_VDD_5V_PERIPH_nOC, \
GPIO_VDD_5V_HIPOWER_nEN, \
GPIO_VDD_5V_HIPOWER_nOC, \
GPIO_VDD_3V3_SENSORS4_EN, \
GPIO_VDD_3V3_SENSORS_EN, \
GPIO_VDD_3V3_SPEKTRUM_POWER_EN, \
GPIO_VDD_3V3_SD_CARD_EN, \
GPIO_ETH_POWER_EN, \
+1 -1
View File
@@ -212,7 +212,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
VDD_3V3_SD_CARD_EN(true);
VDD_5V_PERIPH_EN(true);
VDD_5V_HIPOWER_EN(true);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_3V3_SPEKTRUM_POWER_EN(true);
/* Need hrt running before using the ADC */
+3 -3
View File
@@ -267,7 +267,7 @@
#define GPIO_VDD_5V_PERIPH_nOC /* PE15 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTE|GPIO_PIN15)
#define GPIO_VDD_5V_HIPOWER_nEN /* PG10 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTG|GPIO_PIN10)
#define GPIO_VDD_5V_HIPOWER_nOC /* PF13 */ (GPIO_INPUT |GPIO_FLOAT|GPIO_PORTF|GPIO_PIN13)
#define GPIO_VDD_3V3_SENSORS4_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SENSORS_EN /* PG8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTG|GPIO_PIN8)
#define GPIO_VDD_3V3_SPEKTRUM_POWER_EN /* PH2 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTH|GPIO_PIN2)
#define GPIO_VDD_3V3_SD_CARD_EN /* PC13 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN13)
@@ -289,7 +289,7 @@
#define VDD_5V_PERIPH_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_PERIPH_nEN, !(on_true))
#define VDD_5V_HIPOWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_5V_HIPOWER_nEN, !(on_true))
#define VDD_3V3_SENSORS4_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS4_EN, (on_true))
#define VDD_3V3_SENSORS_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS_EN, (on_true))
#define VDD_3V3_SPEKTRUM_POWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SPEKTRUM_POWER_EN, (on_true))
#define READ_VDD_3V3_SPEKTRUM_POWER_EN() px4_arch_gpioread(GPIO_VDD_3V3_SPEKTRUM_POWER_EN)
#define VDD_3V3_SD_CARD_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SD_CARD_EN, (on_true))
@@ -452,7 +452,7 @@
GPIO_VDD_5V_PERIPH_nOC, \
GPIO_VDD_5V_HIPOWER_nEN, \
GPIO_VDD_5V_HIPOWER_nOC, \
GPIO_VDD_3V3_SENSORS4_EN, \
GPIO_VDD_3V3_SENSORS_EN, \
GPIO_VDD_3V3_SPEKTRUM_POWER_EN, \
GPIO_VDD_3V3_SD_CARD_EN, \
GPIO_PD15, \
+3 -3
View File
@@ -107,7 +107,7 @@ __EXPORT void board_peripheral_reset(int ms)
VDD_5V_PERIPH_EN(false);
board_control_spi_sensors_power(false, 0xffff);
VDD_3V3_SENSORS4_EN(false);
VDD_3V3_SENSORS_EN(false);
bool last = READ_VDD_3V3_SPEKTRUM_POWER_EN();
/* Keep Spektum on to discharge rail*/
@@ -122,7 +122,7 @@ __EXPORT void board_peripheral_reset(int ms)
/* switch the peripheral rail back on */
VDD_3V3_SPEKTRUM_POWER_EN(last);
board_control_spi_sensors_power(true, 0xffff);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_5V_PERIPH_EN(true);
}
@@ -219,7 +219,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
VDD_3V3_SD_CARD_EN(true);
VDD_5V_PERIPH_EN(true);
VDD_5V_HIPOWER_EN(true);
VDD_3V3_SENSORS4_EN(true);
VDD_3V3_SENSORS_EN(true);
VDD_3V3_SPEKTRUM_POWER_EN(true);
/* Need hrt running before using the ADC */
@@ -310,7 +310,6 @@
1 1 COM_IMB_PROP_ACT 0 6
1 1 COM_LKDOWN_TKO 3.000000000000000000 9
1 1 COM_LOW_BAT_ACT 0 6
1 1 COM_MOT_TEST_EN 1 6
1 1 COM_OBC_LOSS_T 5.000000000000000000 9
1 1 COM_OBL_RC_ACT 0 6
1 1 COM_OBS_AVOID 0 6
Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 110 KiB

+1 -1
View File
@@ -129,5 +129,5 @@ See also:
The PPS signal provides much higher temporal precision than the transmitted time data, which has latency and jitter from serial communication.
::: warning
If the PPS driver does not sending any data for 5 seconds (despite having `PPS_CAP_ENABLE` set to 1), the `EKF2_GPS_DELAY` will be used instead for estimating the latency.
If the PPS driver does not sending any data for 5 seconds (despite having `PPS_CAP_ENABLE` set to 1), the `SENS_GPS0_DELAY` will be used instead for estimating the latency.
:::
+321 -87
View File
@@ -4202,6 +4202,9 @@ Custom PWM rates can be used by directly setting any value >0.
**Values:**
- `-8`: BDShot150
- `-7`: BDShot300
- `-6`: BDShot600
- `-5`: DShot150
- `-4`: DShot300
- `-3`: DShot600
@@ -5499,7 +5502,7 @@ Note that non-motor outputs might already be active in prearm state if COM_PREAR
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 128 | 128 | | 128 | |
| &nbsp; | 127 | 127 | | 127 | |
### RBCLW_DIS2 (`INT32`) {#RBCLW_DIS2}
@@ -5513,7 +5516,7 @@ Note that non-motor outputs might already be active in prearm state if COM_PREAR
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 128 | 128 | | 128 | |
| &nbsp; | 127 | 127 | | 127 | |
### RBCLW_FAIL1 (`INT32`) {#RBCLW_FAIL1}
@@ -5701,7 +5704,7 @@ Maxmimum output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 128 | 256 | | 256 | |
| &nbsp; | 127 | 254 | | 254 | |
### RBCLW_MAX2 (`INT32`) {#RBCLW_MAX2}
@@ -5713,7 +5716,7 @@ Maxmimum output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 128 | 256 | | 256 | |
| &nbsp; | 127 | 254 | | 254 | |
### RBCLW_MIN1 (`INT32`) {#RBCLW_MIN1}
@@ -5725,7 +5728,7 @@ Minimum output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 1 | 128 | | 1 | |
| &nbsp; | 0 | 127 | | 0 | |
### RBCLW_MIN2 (`INT32`) {#RBCLW_MIN2}
@@ -5737,7 +5740,7 @@ Minimum output value (when not disarmed).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 1 | 128 | | 1 | |
| &nbsp; | 0 | 127 | | 0 | |
### RBCLW_REV (`INT32`) {#RBCLW_REV}
@@ -18849,17 +18852,6 @@ By default disabled for safety reasons
| ------ | -------- | -------- | --------- | ------------ | ---- |
| &nbsp; | | | | Disabled (0) | |
### COM_MOT_TEST_EN (`INT32`) {#COM_MOT_TEST_EN}
Enable Actuator Testing.
If set, enables the actuator test interface via MAVLink (ACTUATOR_TEST), that
allows spinning the motors and moving the servos for testing purposes.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ----------- | ---- |
| &nbsp; | | | | Enabled (1) | |
### COM_OBC_LOSS_T (`FLOAT`) {#COM_OBC_LOSS_T}
Time-out to wait when onboard computer connection is lost before warning about loss connection.
@@ -19105,7 +19097,7 @@ Note: Only has an effect on multicopters, and VTOLs in multicopter mode.
Stick override threshold.
If COM_RC_OVERRIDE is enabled and the joystick input is moved more than this threshold
the autopilot the pilot takes over control.
the pilot takes over control.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
@@ -19510,18 +19502,33 @@ When mixer outputs 1000 or value inside DSHOT 3D deadband, DShot 0 is sent.
| ------ | -------- | -------- | --------- | ------------ | ---- |
| &nbsp; | | | | Disabled (0) | |
### DSHOT_BIDIR_EN (`INT32`) {#DSHOT_BIDIR_EN}
### DSHOT_BIDIR_EDT (`INT32`) {#DSHOT_BIDIR_EDT}
Enable bidirectional DShot.
Enable Extended DShot Telemetry.
This parameter enables bidirectional DShot which provides RPM feedback.
Note that this requires ESCs that support bidirectional DSHot, e.g. BlHeli32.
This is not the same as DShot telemetry which requires an additional serial connection.
This parameter enables Extended DShot Telemetry which allows transmission of
additional telemetry within the eRPM frame. The EDT data is interleaved with
the eRPM frames at a low rate.
| Reboot | minValue | maxValue | increment | default | unit |
| ------- | -------- | -------- | --------- | ------------ | ---- |
| &check; | | | | Disabled (0) | |
### DSHOT_ESC_TYPE (`INT32`) {#DSHOT_ESC_TYPE}
ESC Type.
The ESC firmware type
**Values:**
- `0`: Unknown
- `1`: AM32
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0 | |
### DSHOT_MIN (`FLOAT`) {#DSHOT_MIN}
Minimum DShot Motor Output.
@@ -19534,6 +19541,174 @@ armed.
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 1 | 0.01 | 0.055 | norm |
### DSHOT_MOT_POL1 (`INT32`) {#DSHOT_MOT_POL1}
Number of magnetic poles of motor 1.
Number of magnetic poles for motor 1.
Required to compute RPM from the eRPM returned by ESC telemetry.
Either get the number from the motor spec sheet or count the magnets
on the bell of the motor (not the stator magnets).
Typical motors for 5 inch props have 14 poles.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 2 | 400 | | 14 | |
### DSHOT_MOT_POL10 (`INT32`) {#DSHOT_MOT_POL10}
Number of magnetic poles of motor 10.
Number of magnetic poles for motor 10.
Required to compute RPM from the eRPM returned by ESC telemetry.
Either get the number from the motor spec sheet or count the magnets
on the bell of the motor (not the stator magnets).
Typical motors for 5 inch props have 14 poles.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 2 | 400 | | 14 | |
### DSHOT_MOT_POL11 (`INT32`) {#DSHOT_MOT_POL11}
Number of magnetic poles of motor 11.
Number of magnetic poles for motor 11.
Required to compute RPM from the eRPM returned by ESC telemetry.
Either get the number from the motor spec sheet or count the magnets
on the bell of the motor (not the stator magnets).
Typical motors for 5 inch props have 14 poles.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 2 | 400 | | 14 | |
### DSHOT_MOT_POL12 (`INT32`) {#DSHOT_MOT_POL12}
Number of magnetic poles of motor 12.
Number of magnetic poles for motor 12.
Required to compute RPM from the eRPM returned by ESC telemetry.
Either get the number from the motor spec sheet or count the magnets
on the bell of the motor (not the stator magnets).
Typical motors for 5 inch props have 14 poles.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 2 | 400 | | 14 | |
### DSHOT_MOT_POL2 (`INT32`) {#DSHOT_MOT_POL2}
Number of magnetic poles of motor 2.
Number of magnetic poles for motor 2.
Required to compute RPM from the eRPM returned by ESC telemetry.
Either get the number from the motor spec sheet or count the magnets
on the bell of the motor (not the stator magnets).
Typical motors for 5 inch props have 14 poles.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 2 | 400 | | 14 | |
### DSHOT_MOT_POL3 (`INT32`) {#DSHOT_MOT_POL3}
Number of magnetic poles of motor 3.
Number of magnetic poles for motor 3.
Required to compute RPM from the eRPM returned by ESC telemetry.
Either get the number from the motor spec sheet or count the magnets
on the bell of the motor (not the stator magnets).
Typical motors for 5 inch props have 14 poles.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 2 | 400 | | 14 | |
### DSHOT_MOT_POL4 (`INT32`) {#DSHOT_MOT_POL4}
Number of magnetic poles of motor 4.
Number of magnetic poles for motor 4.
Required to compute RPM from the eRPM returned by ESC telemetry.
Either get the number from the motor spec sheet or count the magnets
on the bell of the motor (not the stator magnets).
Typical motors for 5 inch props have 14 poles.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 2 | 400 | | 14 | |
### DSHOT_MOT_POL5 (`INT32`) {#DSHOT_MOT_POL5}
Number of magnetic poles of motor 5.
Number of magnetic poles for motor 5.
Required to compute RPM from the eRPM returned by ESC telemetry.
Either get the number from the motor spec sheet or count the magnets
on the bell of the motor (not the stator magnets).
Typical motors for 5 inch props have 14 poles.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 2 | 400 | | 14 | |
### DSHOT_MOT_POL6 (`INT32`) {#DSHOT_MOT_POL6}
Number of magnetic poles of motor 6.
Number of magnetic poles for motor 6.
Required to compute RPM from the eRPM returned by ESC telemetry.
Either get the number from the motor spec sheet or count the magnets
on the bell of the motor (not the stator magnets).
Typical motors for 5 inch props have 14 poles.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 2 | 400 | | 14 | |
### DSHOT_MOT_POL7 (`INT32`) {#DSHOT_MOT_POL7}
Number of magnetic poles of motor 7.
Number of magnetic poles for motor 7.
Required to compute RPM from the eRPM returned by ESC telemetry.
Either get the number from the motor spec sheet or count the magnets
on the bell of the motor (not the stator magnets).
Typical motors for 5 inch props have 14 poles.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 2 | 400 | | 14 | |
### DSHOT_MOT_POL8 (`INT32`) {#DSHOT_MOT_POL8}
Number of magnetic poles of motor 8.
Number of magnetic poles for motor 8.
Required to compute RPM from the eRPM returned by ESC telemetry.
Either get the number from the motor spec sheet or count the magnets
on the bell of the motor (not the stator magnets).
Typical motors for 5 inch props have 14 poles.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 2 | 400 | | 14 | |
### DSHOT_MOT_POL9 (`INT32`) {#DSHOT_MOT_POL9}
Number of magnetic poles of motor 9.
Number of magnetic poles for motor 9.
Required to compute RPM from the eRPM returned by ESC telemetry.
Either get the number from the motor spec sheet or count the magnets
on the bell of the motor (not the stator magnets).
Typical motors for 5 inch props have 14 poles.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 2 | 400 | | 14 | |
### DSHOT_TEL_CFG (`INT32`) {#DSHOT_TEL_CFG}
Serial Configuration for DShot Driver.
@@ -19559,20 +19734,6 @@ Configure on which serial port to run DShot Driver.
| ------- | -------- | -------- | --------- | ------- | ---- |
| &check; | | | | 0 | |
### MOT_POLE_COUNT (`INT32`) {#MOT_POLE_COUNT}
Number of magnetic poles of the motors.
Specify the number of magnetic poles of the motors.
It is required to compute the RPM value from the eRPM returned with the ESC telemetry.
Either get the number from the motor spec sheet or count the magnets on the bell of the motor (not the stator magnets).
Typical motors for 5 inch props have 14 poles.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 14 | |
## EKF2
### EKF2_ABIAS_INIT (`FLOAT`) {#EKF2_ABIAS_INIT}
@@ -20308,16 +20469,6 @@ Set bits in the following positions to enable: 0 : Longitude and latitude fusion
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 15 | | 7 | |
### EKF2_GPS_DELAY (`FLOAT`) {#EKF2_GPS_DELAY}
GPS measurement delay relative to IMU measurement.
GPS measurement delay relative to IMU measurement if PPS time correction is not available/enabled (PPS_CAP_ENABLE).
| Reboot | minValue | maxValue | increment | default | unit |
| ------- | -------- | -------- | --------- | ------- | ---- |
| &check; | 0 | 300 | | 110 | ms |
### EKF2_GPS_MODE (`INT32`) {#EKF2_GPS_MODE}
Fusion reset mode.
@@ -20333,36 +20484,6 @@ Automatic: reset on fusion timeout if no other source of position is available.
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0 | |
### EKF2_GPS_POS_X (`FLOAT`) {#EKF2_GPS_POS_X}
X position of GPS antenna in body frame.
Forward (roll) axis with origin relative to vehicle centre of gravity
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0.0 | m |
### EKF2_GPS_POS_Y (`FLOAT`) {#EKF2_GPS_POS_Y}
Y position of GPS antenna in body frame.
Right (pitch) axis with origin relative to vehicle centre of gravity
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0.0 | m |
### EKF2_GPS_POS_Z (`FLOAT`) {#EKF2_GPS_POS_Z}
Z position of GPS antenna in body frame.
Down (yaw) axis with origin relative to vehicle centre of gravity
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0.0 | m |
### EKF2_GPS_P_GATE (`FLOAT`) {#EKF2_GPS_P_GATE}
Gate size for GNSS position fusion.
@@ -37197,14 +37318,129 @@ Configure on which serial port to run FT Technologies Digital Wind Sensor (seria
| ------- | -------- | -------- | --------- | ------- | ---- |
| &check; | | | | 0 | |
### SENS_GPS0_DELAY (`INT32`) {#SENS_GPS0_DELAY}
GPS 0 measurement delay.
GPS measurement delay relative to IMU measurements.
Matched to physical GPS receiver via SENS_GPS0_ID.
Only applied when the GPS driver does not provide its own
timestamp_sample correction.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 300 | | 110 | ms |
### SENS_GPS0_ID (`INT32`) {#SENS_GPS0_ID}
GPS 0 device ID.
Device ID of the GPS receiver for antenna offset slot 0.
Set to 0 to disable this slot. When all slots are 0, offsets are
matched by uORB instance index (only reliable for serial GPS).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0 | |
### SENS_GPS0_OFFX (`FLOAT`) {#SENS_GPS0_OFFX}
GPS 0 antenna X position.
Forward axis relative to vehicle centre of gravity.
Matched to physical GPS receiver via SENS_GPS0_ID.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0.0 | m |
### SENS_GPS0_OFFY (`FLOAT`) {#SENS_GPS0_OFFY}
GPS 0 antenna Y position.
Right axis relative to vehicle centre of gravity.
Matched to physical GPS receiver via SENS_GPS0_ID.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0.0 | m |
### SENS_GPS0_OFFZ (`FLOAT`) {#SENS_GPS0_OFFZ}
GPS 0 antenna Z position.
Down axis relative to vehicle centre of gravity.
Matched to physical GPS receiver via SENS_GPS0_ID.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0.0 | m |
### SENS_GPS1_DELAY (`INT32`) {#SENS_GPS1_DELAY}
GPS 1 measurement delay.
GPS measurement delay relative to IMU measurements.
Matched to physical GPS receiver via SENS_GPS1_ID.
Only applied when the GPS driver does not provide its own
timestamp_sample correction.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | 0 | 300 | | 110 | ms |
### SENS_GPS1_ID (`INT32`) {#SENS_GPS1_ID}
GPS 1 device ID.
Device ID of the GPS receiver for antenna offset slot 1.
Set to 0 to disable this slot. When all slots are 0, offsets are
matched by uORB instance index (only reliable for serial GPS).
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0 | |
### SENS_GPS1_OFFX (`FLOAT`) {#SENS_GPS1_OFFX}
GPS 1 antenna X position.
Forward axis relative to vehicle centre of gravity.
Matched to physical GPS receiver via SENS_GPS1_ID.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0.0 | m |
### SENS_GPS1_OFFY (`FLOAT`) {#SENS_GPS1_OFFY}
GPS 1 antenna Y position.
Right axis relative to vehicle centre of gravity.
Matched to physical GPS receiver via SENS_GPS1_ID.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0.0 | m |
### SENS_GPS1_OFFZ (`FLOAT`) {#SENS_GPS1_OFFZ}
GPS 1 antenna Z position.
Down axis relative to vehicle centre of gravity.
Matched to physical GPS receiver via SENS_GPS1_ID.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
| &nbsp; | | | | 0.0 | m |
### SENS_GPS_MASK (`INT32`) {#SENS_GPS_MASK}
Multi GPS Blending Control Mask.
Set bits in the following positions to set which GPS accuracy metrics will be used to calculate the blending weight. Set to zero to disable and always used first GPS instance.
0 : Set to true to use speed accuracy
1 : Set to true to use horizontal position accuracy
2 : Set to true to use vertical position accuracy
Set bits in the following positions to set which GPS accuracy metrics will
be used to calculate the blending weight. Set to zero to disable and always
used first GPS instance.
**Bitmask:**
@@ -37225,11 +37461,7 @@ The GPS selection logic waits until the primary receiver is available to
send data to the EKF even if a secondary instance is already available.
The secondary instance is then only used if the primary one times out.
Accepted values:
-1 : Auto (equal priority for all instances)
0 : Main serial GPS instance
1 : Secondary serial GPS instance
2-127 : UAVCAN module node ID
To select a DroneCAN GPS, set this to the node ID.
This parameter has no effect if blending is active.
@@ -37241,7 +37473,9 @@ This parameter has no effect if blending is active.
Multi GPS Blending Time Constant.
Sets the longest time constant that will be applied to the calculation of GPS position and height offsets used to correct data from multiple GPS data for steady state position differences.
Sets the longest time constant that will be applied to the calculation of GPS
position and height offsets used to correct data from multiple GPS data for
steady state position differences.
| Reboot | minValue | maxValue | increment | default | unit |
| ------ | -------- | -------- | --------- | ------- | ---- |
+1 -1
View File
@@ -20,7 +20,7 @@ For more information see [Setting the Compass Orientation](../config/flight_cont
## Position
In order to compensate for the relative motion between the receiver and the CoG, you should [configure](../advanced_config/parameters.md) the following parameters to set the offsets: [EKF2_GPS_POS_X](../advanced_config/parameter_reference.md#EKF2_GPS_POS_X), [EKF2_GPS_POS_Y](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Y) and [EKF2_GPS_POS_Z](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Z).
In order to compensate for the relative motion between the receiver and the CoG, you should [configure](../advanced_config/parameters.md) the following parameters to set the offsets: [SENS_GPS0_OFFX](../advanced_config/parameter_reference.md#SENS_GPS0_OFFX), [SENS_GPS0_OFFY](../advanced_config/parameter_reference.md#SENS_GPS0_OFFY) and [SENS_GPS0_OFFZ](../advanced_config/parameter_reference.md#SENS_GPS0_OFFZ).
This is important because the body frame estimated by the EKF will converge on the location of the GNSS module and assume it to be at the CoG. If the GNSS module is significantly offset from the CoG, then rotation around the COG will be interpreted as an altitude change, which in some flight modes (such as position mode) will result in unnecessary corrections.
-1
View File
@@ -660,7 +660,6 @@ For each of the tilt servos:
- If a safety button is used, it must be pressed before actuator testing is allowed.
- The kill-switch can still be used to stop motors immediately.
- Servos do not actually move until the corresponding slider is changed.
- The parameter [COM_MOT_TEST_EN](../advanced_config/parameter_reference.md#COM_MOT_TEST_EN) can be used to completely disable actuator testing.
- On the shell, [actuator_test](../modules/modules_command.md#actuator-test) can be used as well for actuator testing.
- VTOLs will automatically turn off motors pointing upwards during **fixed-wing flight**:
- Standard VTOL : Motors defined as multicopter motors will be turned off
+1 -1
View File
@@ -72,7 +72,7 @@ The ESC RPM feedback is used to track the rotor blade pass frequency and its har
ESC RPM feedback requires ESCs capable of providing RPM feedback such as [DShot](../peripherals/dshot.md) with telemetry connected, a bidirectional DShot set up ([work in progress](https://github.com/PX4/PX4-Autopilot/pull/23863)), or [UAVCAN/DroneCAN ESCs](../dronecan/escs.md).
Before enabling, make sure that the ESC RPM is correct.
You might have to adjust the [pole count of the motors](../advanced_config/parameter_reference.md#MOT_POLE_COUNT).
You might have to adjust the per-motor pole count (`DSHOT_MOT_POL1``DSHOT_MOT_POL12`).
The following parameters should be set to enable and configure dynamic notch filters:
+1 -1
View File
@@ -97,7 +97,7 @@ There is also CAN built-in bus termination via [CANNODE_TERM](../advanced_config
You need to set necessary [DroneCAN](index.md) parameters and define offsets if the sensor is not centred within the vehicle:
- Enable [UAVCAN_SUB_GPS](../advanced_config/parameter_reference.md#UAVCAN_SUB_GPS), [UAVCAN_SUB_MAG](../advanced_config/parameter_reference.md#UAVCAN_SUB_MAG), and [UAVCAN_SUB_BARO](../advanced_config/parameter_reference.md#UAVCAN_SUB_BARO).
- The parameters [EKF2_GPS_POS_X](../advanced_config/parameter_reference.md#EKF2_GPS_POS_X), [EKF2_GPS_POS_Y](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Y) and [EKF2_GPS_POS_Z](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Z) can be set to account for the offset of the ARK G5 RTK GPS from the vehicle's centre of gravity.
- The parameters [SENS_GPS0_OFFX](../advanced_config/parameter_reference.md#SENS_GPS0_OFFX), [SENS_GPS0_OFFY](../advanced_config/parameter_reference.md#SENS_GPS0_OFFY) and [SENS_GPS0_OFFZ](../advanced_config/parameter_reference.md#SENS_GPS0_OFFZ) can be set to account for the offset of the ARK G5 RTK GPS from the vehicle's centre of gravity.
## LED Meanings
+1 -1
View File
@@ -99,7 +99,7 @@ You need to set necessary [DroneCAN](index.md) parameters and define offsets if
- Enable GPS yaw fusion by setting bit 3 of [EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL) to true.
- Enable GPS blending to ensure the heading is always published by setting [SENS_GPS_MASK](../advanced_config/parameter_reference.md#SENS_GPS_MASK) to 7 (all three bits checked).
- Enable [UAVCAN_SUB_GPS](../advanced_config/parameter_reference.md#UAVCAN_SUB_GPS), [UAVCAN_SUB_MAG](../advanced_config/parameter_reference.md#UAVCAN_SUB_MAG), and [UAVCAN_SUB_BARO](../advanced_config/parameter_reference.md#UAVCAN_SUB_BARO).
- The parameters [EKF2_GPS_POS_X](../advanced_config/parameter_reference.md#EKF2_GPS_POS_X), [EKF2_GPS_POS_Y](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Y) and [EKF2_GPS_POS_Z](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Z) can be set to account for the offset of the ARK G5 RTK HEADING GPS from the vehicle's centre of gravity.
- The parameters [SENS_GPS0_OFFX](../advanced_config/parameter_reference.md#SENS_GPS0_OFFX), [SENS_GPS0_OFFY](../advanced_config/parameter_reference.md#SENS_GPS0_OFFY) and [SENS_GPS0_OFFZ](../advanced_config/parameter_reference.md#SENS_GPS0_OFFZ) can be set to account for the offset of the ARK G5 RTK HEADING GPS from the vehicle's centre of gravity.
### Parameter references
+1 -1
View File
@@ -91,7 +91,7 @@ If the sensor is not centred within the vehicle you will also need to define sen
- Enable GPS yaw fusion by setting bit 3 of [EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL) to true.
- Enable [UAVCAN_SUB_GPS](../advanced_config/parameter_reference.md#UAVCAN_SUB_GPS), [UAVCAN_SUB_MAG](../advanced_config/parameter_reference.md#UAVCAN_SUB_MAG), and [UAVCAN_SUB_BARO](../advanced_config/parameter_reference.md#UAVCAN_SUB_BARO).
- The parameters [EKF2_GPS_POS_X](../advanced_config/parameter_reference.md#EKF2_GPS_POS_X), [EKF2_GPS_POS_Y](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Y) and [EKF2_GPS_POS_Z](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Z) can be set to account for the offset of the ARK GPS from the vehicles centre of gravity.
- The parameters [SENS_GPS0_OFFX](../advanced_config/parameter_reference.md#SENS_GPS0_OFFX), [SENS_GPS0_OFFY](../advanced_config/parameter_reference.md#SENS_GPS0_OFFY) and [SENS_GPS0_OFFZ](../advanced_config/parameter_reference.md#SENS_GPS0_OFFZ) can be set to account for the offset of the ARK GPS from the vehicles centre of gravity.
### ARK GPS Configuration
+4 -1
View File
@@ -84,8 +84,9 @@ You need to set necessary [DroneCAN](index.md) parameters and define offsets if
- Enable GPS yaw fusion by setting bit 3 of [EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL) to true.
- Enable GPS blending to ensure the heading is always published by setting [SENS_GPS_MASK](../advanced_config/parameter_reference.md#SENS_GPS_MASK) to 7 (all three bits checked).
- If using [Moving Baseline & GPS Heading](#setting-up-moving-baseline--gps-heading), set [SENS_GPS_PRIME](../advanced_config/parameter_reference.md#SENS_GPS_PRIME) to the CAN node ID of the _Moving Base_ module. The moving base is preferred because the rover receiver in a moving baseline configuration can experience degraded navigation rate and increased data latency when corrections are intermittent.
- Enable [UAVCAN_SUB_GPS](../advanced_config/parameter_reference.md#UAVCAN_SUB_GPS), [UAVCAN_SUB_MAG](../advanced_config/parameter_reference.md#UAVCAN_SUB_MAG), and [UAVCAN_SUB_BARO](../advanced_config/parameter_reference.md#UAVCAN_SUB_BARO).
- The parameters [EKF2_GPS_POS_X](../advanced_config/parameter_reference.md#EKF2_GPS_POS_X), [EKF2_GPS_POS_Y](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Y) and [EKF2_GPS_POS_Z](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Z) can be set to account for the offset of the ARK RTK GPS from the vehicles centre of gravity.
- The parameters [SENS_GPS0_OFFX](../advanced_config/parameter_reference.md#SENS_GPS0_OFFX), [SENS_GPS0_OFFY](../advanced_config/parameter_reference.md#SENS_GPS0_OFFY) and [SENS_GPS0_OFFZ](../advanced_config/parameter_reference.md#SENS_GPS0_OFFZ) can be set to account for the offset of the ARK RTK GPS from the vehicles centre of gravity.
### ARK RTK GPS Configuration
@@ -136,6 +137,7 @@ Setup via CAN:
- On the _Moving Base_, set the following:
- [GPS_UBX_MODE](../advanced_config/parameter_reference.md#GPS_UBX_MODE) to `4`.
- [CANNODE_PUB_MBD](../advanced_config/parameter_reference.md#CANNODE_PUB_MBD) to `1`.
- On the _Flight Controller_, set [SENS_GPS_PRIME](../advanced_config/parameter_reference.md#SENS_GPS_PRIME) to the CAN node ID of the _Moving Base_ (see [PX4 Configuration](#px4-configuration)).
Setup via UART:
@@ -154,6 +156,7 @@ Setup via UART:
- [GPS_YAW_OFFSET](../advanced_config/parameter_reference.md#GPS_YAW_OFFSET) to `0` if your _Rover_ is in front of your _Moving Base_, `90` if _Rover_ is right of _Moving Base_, `180` if _Rover_ is behind _Moving Base_, or `270` if _Rover_ is left of _Moving Base_.
- On the _Moving Base_, set the following:
- [GPS_UBX_MODE](../advanced_config/parameter_reference.md#GPS_UBX_MODE) to `2`.
- On the _Flight Controller_, set [SENS_GPS_PRIME](../advanced_config/parameter_reference.md#SENS_GPS_PRIME) to the CAN node ID of the _Moving Base_ (see [PX4 Configuration](#px4-configuration)).
For more information see [Rover and Moving Base](../dronecan/index.md#rover-and-moving-base) in the DroneCAN guide.
+1 -1
View File
@@ -85,7 +85,7 @@ You need to set necessary [DroneCAN](index.md) parameters and define offsets if
- Enable GPS yaw fusion by setting bit 3 of [EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL) to true.
- Enable GPS blending to ensure the heading is always published by setting [SENS_GPS_MASK](../advanced_config/parameter_reference.md#SENS_GPS_MASK) to 7 (all three bits checked).
- Enable [UAVCAN_SUB_GPS](../advanced_config/parameter_reference.md#UAVCAN_SUB_GPS), [UAVCAN_SUB_MAG](../advanced_config/parameter_reference.md#UAVCAN_SUB_MAG), and [UAVCAN_SUB_BARO](../advanced_config/parameter_reference.md#UAVCAN_SUB_BARO).
- The parameters [EKF2_GPS_POS_X](../advanced_config/parameter_reference.md#EKF2_GPS_POS_X), [EKF2_GPS_POS_Y](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Y) and [EKF2_GPS_POS_Z](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Z) can be set to account for the offset of the ARK RTK GPS L1 L5 from the vehicles centre of gravity.
- The parameters [SENS_GPS0_OFFX](../advanced_config/parameter_reference.md#SENS_GPS0_OFFX), [SENS_GPS0_OFFY](../advanced_config/parameter_reference.md#SENS_GPS0_OFFY) and [SENS_GPS0_OFFZ](../advanced_config/parameter_reference.md#SENS_GPS0_OFFZ) can be set to account for the offset of the ARK RTK GPS L1 L5 from the vehicles centre of gravity.
### ARK RTK GPS L1 L5 Configuration
+1 -1
View File
@@ -88,7 +88,7 @@ You need to set necessary [DroneCAN](index.md) parameters and define offsets if
- Enable GPS yaw fusion by setting bit 3 of [EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL) to true.
- Enable GPS blending to ensure the heading is always published by setting [SENS_GPS_MASK](../advanced_config/parameter_reference.md#SENS_GPS_MASK) to 7 (all three bits checked).
- Enable [UAVCAN_SUB_GPS](../advanced_config/parameter_reference.md#UAVCAN_SUB_GPS), [UAVCAN_SUB_MAG](../advanced_config/parameter_reference.md#UAVCAN_SUB_MAG), and [UAVCAN_SUB_BARO](../advanced_config/parameter_reference.md#UAVCAN_SUB_BARO).
- The parameters [EKF2_GPS_POS_X](../advanced_config/parameter_reference.md#EKF2_GPS_POS_X), [EKF2_GPS_POS_Y](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Y) and [EKF2_GPS_POS_Z](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Z) can be set to account for the offset of the ARK X20 RTK GPS from the vehicles centre of gravity.
- The parameters [SENS_GPS0_OFFX](../advanced_config/parameter_reference.md#SENS_GPS0_OFFX), [SENS_GPS0_OFFY](../advanced_config/parameter_reference.md#SENS_GPS0_OFFY) and [SENS_GPS0_OFFZ](../advanced_config/parameter_reference.md#SENS_GPS0_OFFZ) can be set to account for the offset of the ARK X20 RTK GPS from the vehicles centre of gravity.
### ARK X20 RTK GPS Configuration
+1 -1
View File
@@ -94,4 +94,4 @@ If the sensor is not centred within the vehicle you will also need to define sen
- Enable GPS yaw fusion by setting bit 3 of [EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL) to true.
- Enable [UAVCAN_SUB_GPS](../advanced_config/parameter_reference.md#UAVCAN_SUB_GPS), [UAVCAN_SUB_MAG](../advanced_config/parameter_reference.md#UAVCAN_SUB_MAG), and [UAVCAN_SUB_BARO](../advanced_config/parameter_reference.md#UAVCAN_SUB_BARO).
- Set [CANNODE_TERM](../advanced_config/parameter_reference.md#CANNODE_TERM) to `1` if this is that last node on the CAN bus.
- The parameters [EKF2_GPS_POS_X](../advanced_config/parameter_reference.md#EKF2_GPS_POS_X), [EKF2_GPS_POS_Y](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Y) and [EKF2_GPS_POS_Z](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Z) can be set to account for the offset of the ARK GPS from the vehicles centre of gravity.
- The parameters [SENS_GPS0_OFFX](../advanced_config/parameter_reference.md#SENS_GPS0_OFFX), [SENS_GPS0_OFFY](../advanced_config/parameter_reference.md#SENS_GPS0_OFFY) and [SENS_GPS0_OFFZ](../advanced_config/parameter_reference.md#SENS_GPS0_OFFZ) can be set to account for the offset of the ARK GPS from the vehicles centre of gravity.
+1 -1
View File
@@ -188,7 +188,7 @@ GPS CANNODE parameter ([set using QGC](#qgc-cannode-parameter-configuration)):
Other PX4 Parameters:
- If the GPS is not positioned at the vehicle centre of gravity you can account for the offset using [EKF2_GPS_POS_X](../advanced_config/parameter_reference.md#EKF2_GPS_POS_X), [EKF2_GPS_POS_Y](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Y) and [EKF2_GPS_POS_Z](../advanced_config/parameter_reference.md#EKF2_GPS_POS_Z).
- If the GPS is not positioned at the vehicle centre of gravity you can account for the offset using [SENS_GPS0_OFFX](../advanced_config/parameter_reference.md#SENS_GPS0_OFFX), [SENS_GPS0_OFFY](../advanced_config/parameter_reference.md#SENS_GPS0_OFFY) and [SENS_GPS0_OFFZ](../advanced_config/parameter_reference.md#SENS_GPS0_OFFZ).
- If the GPS module provides yaw information, you can enable GPS yaw fusion by setting bit 3 of [EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL) to true.
#### RTK GPS
+12
View File
@@ -51,6 +51,18 @@ Other
- Open source AM32 firmware
- [DIU Blue Framework Listed](https://www.diu.mil/blue-uas/framework)
## PX4 Configuration
The ARK 4IN1 ESC supports DShot 300/600, Bidirectional DShot, and PWM input protocols.
- **Bidirectional DShot**: Select BDShot300 or BDShot600 in the [Actuator Configuration](../config/actuators.md) to enable eRPM telemetry.
- **[Extended DShot Telemetry (EDT)](https://github.com/bird-sanctuary/extended-dshot-telemetry)**: AM32 firmware supports EDT, which provides temperature, voltage, and current through the BDShot signal. Enable with `DSHOT_BIDIR_EDT=1`.
- **AM32 EEPROM Settings**: Set `DSHOT_ESC_TYPE=1` to enable reading and writing ESC firmware settings via a ground station.
See [DShot ESCs](../peripherals/dshot.md) for full setup details.
## See Also
- [ARK 4IN1 ESC CONS](https://docs.arkelectron.com/electronic-speed-controller/ark-4in1-esc) (ARK Docs)
- [DShot and Bidirectional DShot](https://brushlesswhoop.com/dshot-and-bidirectional-dshot/) (brushlesswhoop.com - General DShot reference)
- [Extended DShot Telemetry (EDT) Specification](https://github.com/bird-sanctuary/extended-dshot-telemetry) (bird-sanctuary)
+44 -4
View File
@@ -163,6 +163,42 @@ $$\dot{B} = \gamma - \frac{\dot{V_T}}{g}$$
## Fixed-Wing Attitude Controller
### Setpoint modificaiton
Most fixed-wing aircraft cannot generate a sustained yaw rate using the rudder alone. As a result, the yaw component of the quaternion attitude error should be removed before computing the control action.
This is achieved by premultiplying the setpoint quaternion with a rotation about the global down axis. The additional rotation cancels the yaw component of the attitude error while preserving the roll and pitch components.
The yaw offset is
$$
\psi =-2\frac{\hat{q}_0 q_3 - \hat{q}_1 q_2 + \hat{q}_2 q_1 -\hat{q}_3 q_0}
{\hat{q}_0 q_0 - \hat{q}_1 q_1 - \hat{q}_2 q_2 + \hat{q}_3 q_3}
$$
The quaternion representing the yaw offset is
$$
_{\text{yaw}} =
\operatorname{normalize}
\left(
\begin{bmatrix}
1 \
0 \
0 \
\frac{\psi}{2}
\end{bmatrix}
\right)
$$
The corrected setpoint quaternion is then obtained by applying the rotation
$$
_{\text{sp, corrected}} = _{\text{yaw}} \otimes _{sp}
$$
### Quaternion based attitude controller
![FW Attitude Controller Diagram](../../assets/diagrams/px4_fw_attitude_controller_diagram.png)
<!-- The drawing is on draw.io: https://drive.google.com/file/d/1ibxekmtc6Ljq60DvNMplgnnU-JOvKYLQ/view?usp=sharing
@@ -185,12 +221,16 @@ In order to keep a constant rate, this damping can be compensated using feedforw
### Turn coordination
The roll and pitch controllers have the same structure and the longitudinal and lateral dynamics are assumed to be uncoupled enough to work independently.
The yaw controller, however, generates its yaw rate setpoint using the turn coordination constraint in order to minimize lateral acceleration, generated when the aircraft is slipping. The turn coordination algorithm is based solely on coordinated turn geometry calculation.
The yaw rate setpoint is generated using the turn coordination constraint in order to minimize lateral acceleration, generated when the aircraft is slipping.
$$\dot{\Psi}_{sp} = \frac{g}{V_T} \tan{\phi_{sp}} \cos{\theta_{sp}}$$
$$r_{sp} = \frac{2g}{V_T}\left(q_0 q_1 + q_2 q_3\right)$$
The yaw rate controller also helps to counteract [adverse yaw effects](https://youtu.be/sNV_SDDxuWk) and to damp the [Dutch roll mode](https://en.wikipedia.org/wiki/Dutch_roll) by providing extra directional damping.
This also helps to counteract [adverse yaw effects](https://youtu.be/sNV_SDDxuWk) and to damp the [Dutch roll mode](https://en.wikipedia.org/wiki/Dutch_roll) by providing extra directional damping.
To compensate for the non-zero pitch rate that naturally occurs during coordinated turns, a geometry-based feedforward term is added to the pitch-rate command.
This feedforward term accounts for the aircraft's current attitude and airspeed so that the controller does not need to generate this motion purely through feedback.
$$q_{sp}^{ff} = \frac{4g(q_0 q_1 + q_2 q_3)^2}{V(1 - 2q_1^2 - 2q_2^2)}$$
## VTOL Flight Controller
+1 -1
View File
@@ -230,7 +230,7 @@ If you search in the file you'll find groups of messages defined in a switch sta
- `MAVLINK_MODE_IRIDIUM`: Streamed to an iridium satellite phone
Normally you'll be testing on a GCS, so you could just add the message to the `MAVLINK_MODE_NORMAL` case using the `configure_stream_local()` method.
For example, to stream CA_TRAJECTORY at 5 Hz:
For example, to stream `BATTERY_STATUS_DEMO` at 5 Hz:
```cpp
case MAVLINK_MODE_CONFIG: // USB
+189 -187
View File
@@ -95,202 +95,204 @@ They are not build into the module, and hence are neither published or subscribe
::: details See messages
- [SensorsStatusImu](../msg_docs/SensorsStatusImu.md)
- [Gripper](../msg_docs/Gripper.md)
- [SensorUwb](../msg_docs/SensorUwb.md)
- [AirspeedWind](../msg_docs/AirspeedWind.md)
- [FixedWingLateralStatus](../msg_docs/FixedWingLateralStatus.md)
- [RcParameterMap](../msg_docs/RcParameterMap.md)
- [MavlinkLog](../msg_docs/MavlinkLog.md)
- [EstimatorAidSource2d](../msg_docs/EstimatorAidSource2d.md)
- [IrlockReport](../msg_docs/IrlockReport.md)
- [RaptorStatus](../msg_docs/RaptorStatus.md)
- [NavigatorMissionItem](../msg_docs/NavigatorMissionItem.md)
- [GimbalManagerStatus](../msg_docs/GimbalManagerStatus.md)
- [BatteryInfo](../msg_docs/BatteryInfo.md)
- [GimbalManagerSetAttitude](../msg_docs/GimbalManagerSetAttitude.md)
- [LandingGearWheel](../msg_docs/LandingGearWheel.md)
- [EstimatorStatus](../msg_docs/EstimatorStatus.md)
- [GimbalManagerSetManualControl](../msg_docs/GimbalManagerSetManualControl.md)
- [SensorAirflow](../msg_docs/SensorAirflow.md)
- [FollowTargetStatus](../msg_docs/FollowTargetStatus.md)
- [PowerMonitor](../msg_docs/PowerMonitor.md)
- [UlogStreamAck](../msg_docs/UlogStreamAck.md)
- [AirspeedValidatedV0](../msg_docs/AirspeedValidatedV0.md)
- [TuneControl](../msg_docs/TuneControl.md)
- [ArmingCheckReplyV0](../msg_docs/ArmingCheckReplyV0.md)
- [HomePositionV0](../msg_docs/HomePositionV0.md)
- [LedControl](../msg_docs/LedControl.md)
- [PowerButtonState](../msg_docs/PowerButtonState.md)
- [PpsCapture](../msg_docs/PpsCapture.md)
- [OrbTestMedium](../msg_docs/OrbTestMedium.md)
- [EstimatorInnovations](../msg_docs/EstimatorInnovations.md)
- [AutotuneAttitudeControlStatus](../msg_docs/AutotuneAttitudeControlStatus.md)
- [VehicleImu](../msg_docs/VehicleImu.md)
- [DebugArray](../msg_docs/DebugArray.md)
- [SensorPreflightMag](../msg_docs/SensorPreflightMag.md)
- [GeneratorStatus](../msg_docs/GeneratorStatus.md)
- [CanInterfaceStatus](../msg_docs/CanInterfaceStatus.md)
- [GeofenceResult](../msg_docs/GeofenceResult.md)
- [MountOrientation](../msg_docs/MountOrientation.md)
- [VehicleLocalPositionSetpoint](../msg_docs/VehicleLocalPositionSetpoint.md)
- [ConfigOverridesV0](../msg_docs/ConfigOverridesV0.md)
- [ActuatorControlsStatus](../msg_docs/ActuatorControlsStatus.md)
- [VehicleStatusV0](../msg_docs/VehicleStatusV0.md)
- [SensorGnssRelative](../msg_docs/SensorGnssRelative.md)
- [EstimatorGpsStatus](../msg_docs/EstimatorGpsStatus.md)
- [SensorSelection](../msg_docs/SensorSelection.md)
- [RcChannels](../msg_docs/RcChannels.md)
- [SensorGyroFft](../msg_docs/SensorGyroFft.md)
- [EscStatus](../msg_docs/EscStatus.md)
- [GpioRequest](../msg_docs/GpioRequest.md)
- [SensorAccelFifo](../msg_docs/SensorAccelFifo.md)
- [ButtonEvent](../msg_docs/ButtonEvent.md)
- [DistanceSensorModeChangeRequest](../msg_docs/DistanceSensorModeChangeRequest.md)
- [PurePursuitStatus](../msg_docs/PurePursuitStatus.md)
- [MagWorkerData](../msg_docs/MagWorkerData.md)
- [FlightPhaseEstimation](../msg_docs/FlightPhaseEstimation.md)
- [RaptorInput](../msg_docs/RaptorInput.md)
- [LaunchDetectionStatus](../msg_docs/LaunchDetectionStatus.md)
- [FollowTarget](../msg_docs/FollowTarget.md)
- [InternalCombustionEngineStatus](../msg_docs/InternalCombustionEngineStatus.md)
- [VehicleOpticalFlowVel](../msg_docs/VehicleOpticalFlowVel.md)
- [TiltrotorExtraControls](../msg_docs/TiltrotorExtraControls.md)
- [SensorGnssStatus](../msg_docs/SensorGnssStatus.md)
- [VehicleOpticalFlow](../msg_docs/VehicleOpticalFlow.md)
- [OpenDroneIdArmStatus](../msg_docs/OpenDroneIdArmStatus.md)
- [PwmInput](../msg_docs/PwmInput.md)
- [MissionResult](../msg_docs/MissionResult.md)
- [GeofenceStatus](../msg_docs/GeofenceStatus.md)
- [EstimatorAidSource3d](../msg_docs/EstimatorAidSource3d.md)
- [VehicleAngularVelocity](../msg_docs/VehicleAngularVelocity.md)
- [FollowTargetEstimator](../msg_docs/FollowTargetEstimator.md)
- [OrbitStatus](../msg_docs/OrbitStatus.md)
- [Airspeed](../msg_docs/Airspeed.md)
- [VehicleMagnetometer](../msg_docs/VehicleMagnetometer.md)
- [Event](../msg_docs/Event.md)
- [ActuatorOutputs](../msg_docs/ActuatorOutputs.md)
- [EstimatorBias3d](../msg_docs/EstimatorBias3d.md)
- [ArmingCheckRequestV0](../msg_docs/ArmingCheckRequestV0.md)
- [LandingTargetInnovations](../msg_docs/LandingTargetInnovations.md)
- [Vtx](../msg_docs/Vtx.md)
- [DeviceInformation](../msg_docs/DeviceInformation.md)
- [FailureDetectorStatus](../msg_docs/FailureDetectorStatus.md)
- [RoverAttitudeStatus](../msg_docs/RoverAttitudeStatus.md)
- [Cpuload](../msg_docs/Cpuload.md)
- [Ekf2Timestamps](../msg_docs/Ekf2Timestamps.md)
- [SensorMag](../msg_docs/SensorMag.md)
- [VelocityLimits](../msg_docs/VelocityLimits.md)
- [EstimatorStates](../msg_docs/EstimatorStates.md)
- [EstimatorBias](../msg_docs/EstimatorBias.md)
- [SensorCorrection](../msg_docs/SensorCorrection.md)
- [GainCompression](../msg_docs/GainCompression.md)
- [ActuatorTest](../msg_docs/ActuatorTest.md)
- [OpenDroneIdSelfId](../msg_docs/OpenDroneIdSelfId.md)
- [UavcanParameterValue](../msg_docs/UavcanParameterValue.md)
- [DifferentialPressure](../msg_docs/DifferentialPressure.md)
- [HoverThrustEstimate](../msg_docs/HoverThrustEstimate.md)
- [GpioOut](../msg_docs/GpioOut.md)
- [InternalCombustionEngineControl](../msg_docs/InternalCombustionEngineControl.md)
- [UlogStream](../msg_docs/UlogStream.md)
- [TaskStackInfo](../msg_docs/TaskStackInfo.md)
- [GpsInjectData](../msg_docs/GpsInjectData.md)
- [OrbTest](../msg_docs/OrbTest.md)
- [SystemPower](../msg_docs/SystemPower.md)
- [SensorBaro](../msg_docs/SensorBaro.md)
- [AdcReport](../msg_docs/AdcReport.md)
- [DatamanResponse](../msg_docs/DatamanResponse.md)
- [VehicleLocalPositionV0](../msg_docs/VehicleLocalPositionV0.md)
- [GimbalControls](../msg_docs/GimbalControls.md)
- [DebugVect](../msg_docs/DebugVect.md)
- [OrbTestLarge](../msg_docs/OrbTestLarge.md)
- [SensorAccel](../msg_docs/SensorAccel.md)
- [DebugKeyValue](../msg_docs/DebugKeyValue.md)
- [BatteryStatusV0](../msg_docs/BatteryStatusV0.md)
- [NeuralControl](../msg_docs/NeuralControl.md)
- [GpsDump](../msg_docs/GpsDump.md)
- [EventV0](../msg_docs/EventV0.md)
- [NormalizedUnsignedSetpoint](../msg_docs/NormalizedUnsignedSetpoint.md)
- [QshellReq](../msg_docs/QshellReq.md)
- [NavigatorStatus](../msg_docs/NavigatorStatus.md)
- [LandingTargetPose](../msg_docs/LandingTargetPose.md)
- [ManualControlSwitches](../msg_docs/ManualControlSwitches.md)
- [RoverSpeedStatus](../msg_docs/RoverSpeedStatus.md)
- [PositionControllerLandingStatus](../msg_docs/PositionControllerLandingStatus.md)
- [VehicleAirData](../msg_docs/VehicleAirData.md)
- [SatelliteInfo](../msg_docs/SatelliteInfo.md)
- [SensorTemp](../msg_docs/SensorTemp.md)
- [OpenDroneIdOperatorId](../msg_docs/OpenDroneIdOperatorId.md)
- [ParameterSetUsedRequest](../msg_docs/ParameterSetUsedRequest.md)
- [QshellRetval](../msg_docs/QshellRetval.md)
- [ActuatorArmed](../msg_docs/ActuatorArmed.md)
- [RadioStatus](../msg_docs/RadioStatus.md)
- [Ping](../msg_docs/Ping.md)
- [OpenDroneIdSystem](../msg_docs/OpenDroneIdSystem.md)
- [Px4ioStatus](../msg_docs/Px4ioStatus.md)
- [TrajectorySetpoint6dof](../msg_docs/TrajectorySetpoint6dof.md)
- [CameraTrigger](../msg_docs/CameraTrigger.md)
- [HealthReport](../msg_docs/HealthReport.md)
- [PositionControllerStatus](../msg_docs/PositionControllerStatus.md)
- [InputRc](../msg_docs/InputRc.md)
- [VehicleAngularAccelerationSetpoint](../msg_docs/VehicleAngularAccelerationSetpoint.md)
- [FuelTankStatus](../msg_docs/FuelTankStatus.md)
- [RoverRateStatus](../msg_docs/RoverRateStatus.md)
- [OpenDroneIdArmStatus](../msg_docs/OpenDroneIdArmStatus.md)
- [HoverThrustEstimate](../msg_docs/HoverThrustEstimate.md)
- [PositionSetpoint](../msg_docs/PositionSetpoint.md)
- [Rpm](../msg_docs/Rpm.md)
- [VehicleAirData](../msg_docs/VehicleAirData.md)
- [ParameterSetValueResponse](../msg_docs/ParameterSetValueResponse.md)
- [SensorGyro](../msg_docs/SensorGyro.md)
- [SensorGyroFifo](../msg_docs/SensorGyroFifo.md)
- [MavlinkTunnel](../msg_docs/MavlinkTunnel.md)
- [SensorsStatus](../msg_docs/SensorsStatus.md)
- [EstimatorSensorBias](../msg_docs/EstimatorSensorBias.md)
- [DatamanRequest](../msg_docs/DatamanRequest.md)
- [VehicleAttitudeSetpointV0](../msg_docs/VehicleAttitudeSetpointV0.md)
- [GpioIn](../msg_docs/GpioIn.md)
- [ActionRequest](../msg_docs/ActionRequest.md)
- [RtlStatus](../msg_docs/RtlStatus.md)
- [GpioConfig](../msg_docs/GpioConfig.md)
- [UavcanParameterRequest](../msg_docs/UavcanParameterRequest.md)
- [TakeoffStatus](../msg_docs/TakeoffStatus.md)
- [EstimatorSelectorStatus](../msg_docs/EstimatorSelectorStatus.md)
- [ActuatorServosTrim](../msg_docs/ActuatorServosTrim.md)
- [EstimatorAidSource1d](../msg_docs/EstimatorAidSource1d.md)
- [DebugValue](../msg_docs/DebugValue.md)
- [EstimatorAidSource2d](../msg_docs/EstimatorAidSource2d.md)
- [SensorGyroFft](../msg_docs/SensorGyroFft.md)
- [ButtonEvent](../msg_docs/ButtonEvent.md)
- [GimbalManagerSetAttitude](../msg_docs/GimbalManagerSetAttitude.md)
- [YawEstimatorStatus](../msg_docs/YawEstimatorStatus.md)
- [RateCtrlStatus](../msg_docs/RateCtrlStatus.md)
- [TecsStatus](../msg_docs/TecsStatus.md)
- [InternalCombustionEngineControl](../msg_docs/InternalCombustionEngineControl.md)
- [ConfigOverridesV0](../msg_docs/ConfigOverridesV0.md)
- [CameraStatus](../msg_docs/CameraStatus.md)
- [OrbitStatus](../msg_docs/OrbitStatus.md)
- [RtlTimeEstimate](../msg_docs/RtlTimeEstimate.md)
- [EstimatorInnovations](../msg_docs/EstimatorInnovations.md)
- [MissionResult](../msg_docs/MissionResult.md)
- [DifferentialPressure](../msg_docs/DifferentialPressure.md)
- [GpsInjectData](../msg_docs/GpsInjectData.md)
- [GpsDump](../msg_docs/GpsDump.md)
- [QshellReq](../msg_docs/QshellReq.md)
- [EstimatorGpsStatus](../msg_docs/EstimatorGpsStatus.md)
- [TuneControl](../msg_docs/TuneControl.md)
- [LandingTargetPose](../msg_docs/LandingTargetPose.md)
- [EstimatorAidSource3d](../msg_docs/EstimatorAidSource3d.md)
- [PwmInput](../msg_docs/PwmInput.md)
- [FollowTargetEstimator](../msg_docs/FollowTargetEstimator.md)
- [RtlStatus](../msg_docs/RtlStatus.md)
- [ActuatorTest](../msg_docs/ActuatorTest.md)
- [VehicleImu](../msg_docs/VehicleImu.md)
- [Event](../msg_docs/Event.md)
- [FollowTarget](../msg_docs/FollowTarget.md)
- [BatteryInfo](../msg_docs/BatteryInfo.md)
- [GimbalDeviceInformation](../msg_docs/GimbalDeviceInformation.md)
- [OrbTestLarge](../msg_docs/OrbTestLarge.md)
- [QshellRetval](../msg_docs/QshellRetval.md)
- [UavcanParameterValue](../msg_docs/UavcanParameterValue.md)
- [VehicleConstraints](../msg_docs/VehicleConstraints.md)
- [GimbalControls](../msg_docs/GimbalControls.md)
- [LogMessage](../msg_docs/LogMessage.md)
- [RegisterExtComponentRequestV0](../msg_docs/RegisterExtComponentRequestV0.md)
- [RoverRateStatus](../msg_docs/RoverRateStatus.md)
- [LaunchDetectionStatus](../msg_docs/LaunchDetectionStatus.md)
- [FixedWingLateralStatus](../msg_docs/FixedWingLateralStatus.md)
- [VehicleAngularVelocity](../msg_docs/VehicleAngularVelocity.md)
- [TiltrotorExtraControls](../msg_docs/TiltrotorExtraControls.md)
- [EscStatus](../msg_docs/EscStatus.md)
- [GimbalManagerSetManualControl](../msg_docs/GimbalManagerSetManualControl.md)
- [GeofenceStatus](../msg_docs/GeofenceStatus.md)
- [DebugValue](../msg_docs/DebugValue.md)
- [PurePursuitStatus](../msg_docs/PurePursuitStatus.md)
- [GeneratorStatus](../msg_docs/GeneratorStatus.md)
- [Ping](../msg_docs/Ping.md)
- [EstimatorStatus](../msg_docs/EstimatorStatus.md)
- [PositionControllerStatus](../msg_docs/PositionControllerStatus.md)
- [DatamanRequest](../msg_docs/DatamanRequest.md)
- [VehicleImuStatus](../msg_docs/VehicleImuStatus.md)
- [VehicleOpticalFlowVel](../msg_docs/VehicleOpticalFlowVel.md)
- [ArmingCheckReplyV0](../msg_docs/ArmingCheckReplyV0.md)
- [AirspeedWind](../msg_docs/AirspeedWind.md)
- [ParameterResetRequest](../msg_docs/ParameterResetRequest.md)
- [InputRc](../msg_docs/InputRc.md)
- [EventV0](../msg_docs/EventV0.md)
- [VehicleAngularAccelerationSetpoint](../msg_docs/VehicleAngularAccelerationSetpoint.md)
- [FigureEightStatus](../msg_docs/FigureEightStatus.md)
- [UlogStreamAck](../msg_docs/UlogStreamAck.md)
- [GimbalDeviceSetAttitude](../msg_docs/GimbalDeviceSetAttitude.md)
- [ParameterSetUsedRequest](../msg_docs/ParameterSetUsedRequest.md)
- [SensorGyro](../msg_docs/SensorGyro.md)
- [TakeoffStatus](../msg_docs/TakeoffStatus.md)
- [AirspeedValidatedV0](../msg_docs/AirspeedValidatedV0.md)
- [IridiumsbdStatus](../msg_docs/IridiumsbdStatus.md)
- [EscReport](../msg_docs/EscReport.md)
- [ParameterUpdate](../msg_docs/ParameterUpdate.md)
- [VehicleStatusV1](../msg_docs/VehicleStatusV1.md)
- [DebugArray](../msg_docs/DebugArray.md)
- [FuelTankStatus](../msg_docs/FuelTankStatus.md)
- [MagWorkerData](../msg_docs/MagWorkerData.md)
- [SensorCorrection](../msg_docs/SensorCorrection.md)
- [ActuatorServosTrim](../msg_docs/ActuatorServosTrim.md)
- [VehicleAttitudeSetpointV0](../msg_docs/VehicleAttitudeSetpointV0.md)
- [DronecanNodeStatus](../msg_docs/DronecanNodeStatus.md)
- [WheelEncoders](../msg_docs/WheelEncoders.md)
- [EstimatorEventFlags](../msg_docs/EstimatorEventFlags.md)
- [FailureDetectorStatus](../msg_docs/FailureDetectorStatus.md)
- [PowerMonitor](../msg_docs/PowerMonitor.md)
- [FlightPhaseEstimation](../msg_docs/FlightPhaseEstimation.md)
- [Airspeed](../msg_docs/Airspeed.md)
- [EscEepromRead](../msg_docs/EscEepromRead.md)
- [VehicleAcceleration](../msg_docs/VehicleAcceleration.md)
- [SensorAccel](../msg_docs/SensorAccel.md)
- [ParameterUpdate](../msg_docs/ParameterUpdate.md)
- [AdcReport](../msg_docs/AdcReport.md)
- [UavcanParameterRequest](../msg_docs/UavcanParameterRequest.md)
- [CanInterfaceStatus](../msg_docs/CanInterfaceStatus.md)
- [RadioStatus](../msg_docs/RadioStatus.md)
- [SensorTemp](../msg_docs/SensorTemp.md)
- [GimbalManagerStatus](../msg_docs/GimbalManagerStatus.md)
- [VehicleStatusV0](../msg_docs/VehicleStatusV0.md)
- [RcParameterMap](../msg_docs/RcParameterMap.md)
- [VehicleGlobalPositionV0](../msg_docs/VehicleGlobalPositionV0.md)
- [PositionControllerLandingStatus](../msg_docs/PositionControllerLandingStatus.md)
- [TrajectorySetpoint6dof](../msg_docs/TrajectorySetpoint6dof.md)
- [VehicleOpticalFlow](../msg_docs/VehicleOpticalFlow.md)
- [ActionRequest](../msg_docs/ActionRequest.md)
- [EstimatorAidSource1d](../msg_docs/EstimatorAidSource1d.md)
- [RaptorStatus](../msg_docs/RaptorStatus.md)
- [MountOrientation](../msg_docs/MountOrientation.md)
- [Vtx](../msg_docs/Vtx.md)
- [TaskStackInfo](../msg_docs/TaskStackInfo.md)
- [SensorMag](../msg_docs/SensorMag.md)
- [DistanceSensorModeChangeRequest](../msg_docs/DistanceSensorModeChangeRequest.md)
- [RoverAttitudeStatus](../msg_docs/RoverAttitudeStatus.md)
- [RcChannels](../msg_docs/RcChannels.md)
- [GimbalManagerInformation](../msg_docs/GimbalManagerInformation.md)
- [EstimatorSensorBias](../msg_docs/EstimatorSensorBias.md)
- [MagnetometerBiasEstimate](../msg_docs/MagnetometerBiasEstimate.md)
- [LoggerStatus](../msg_docs/LoggerStatus.md)
- [GimbalDeviceSetAttitude](../msg_docs/GimbalDeviceSetAttitude.md)
- [VehicleRoi](../msg_docs/VehicleRoi.md)
- [FixedWingRunwayControl](../msg_docs/FixedWingRunwayControl.md)
- [ParameterSetValueRequest](../msg_docs/ParameterSetValueRequest.md)
- [VehicleImuStatus](../msg_docs/VehicleImuStatus.md)
- [FixedWingLateralGuidanceStatus](../msg_docs/FixedWingLateralGuidanceStatus.md)
- [PositionSetpoint](../msg_docs/PositionSetpoint.md)
- [FigureEightStatus](../msg_docs/FigureEightStatus.md)
- [GimbalDeviceInformation](../msg_docs/GimbalDeviceInformation.md)
- [HeaterStatus](../msg_docs/HeaterStatus.md)
- [RtlTimeEstimate](../msg_docs/RtlTimeEstimate.md)
- [RaptorInput](../msg_docs/RaptorInput.md)
- [GpioIn](../msg_docs/GpioIn.md)
- [EstimatorStates](../msg_docs/EstimatorStates.md)
- [SatelliteInfo](../msg_docs/SatelliteInfo.md)
- [NavigatorStatus](../msg_docs/NavigatorStatus.md)
- [SystemPower](../msg_docs/SystemPower.md)
- [OpenDroneIdSelfId](../msg_docs/OpenDroneIdSelfId.md)
- [SensorsStatus](../msg_docs/SensorsStatus.md)
- [WheelEncoders](../msg_docs/WheelEncoders.md)
- [SensorAirflow](../msg_docs/SensorAirflow.md)
- [DebugKeyValue](../msg_docs/DebugKeyValue.md)
- [SensorGnssRelative](../msg_docs/SensorGnssRelative.md)
- [SensorHygrometer](../msg_docs/SensorHygrometer.md)
- [Mission](../msg_docs/Mission.md)
- [VehicleAcceleration](../msg_docs/VehicleAcceleration.md)
- [LogMessage](../msg_docs/LogMessage.md)
- [VehicleConstraints](../msg_docs/VehicleConstraints.md)
- [RegisterExtComponentRequestV0](../msg_docs/RegisterExtComponentRequestV0.md)
- [CameraStatus](../msg_docs/CameraStatus.md)
- [ControlAllocatorStatus](../msg_docs/ControlAllocatorStatus.md)
- [ParameterResetRequest](../msg_docs/ParameterResetRequest.md)
- [CameraCapture](../msg_docs/CameraCapture.md)
- [SensorBaro](../msg_docs/SensorBaro.md)
- [SensorAccelFifo](../msg_docs/SensorAccelFifo.md)
- [CameraTrigger](../msg_docs/CameraTrigger.md)
- [VehicleRoi](../msg_docs/VehicleRoi.md)
- [Ekf2Timestamps](../msg_docs/Ekf2Timestamps.md)
- [PowerButtonState](../msg_docs/PowerButtonState.md)
- [BatteryStatusV0](../msg_docs/BatteryStatusV0.md)
- [MavlinkTunnel](../msg_docs/MavlinkTunnel.md)
- [NormalizedUnsignedSetpoint](../msg_docs/NormalizedUnsignedSetpoint.md)
- [DebugVect](../msg_docs/DebugVect.md)
- [ActuatorArmed](../msg_docs/ActuatorArmed.md)
- [ActuatorOutputs](../msg_docs/ActuatorOutputs.md)
- [EscReport](../msg_docs/EscReport.md)
- [SensorGnssStatus](../msg_docs/SensorGnssStatus.md)
- [EstimatorBias3d](../msg_docs/EstimatorBias3d.md)
- [FixedWingRunwayControl](../msg_docs/FixedWingRunwayControl.md)
- [GeofenceResult](../msg_docs/GeofenceResult.md)
- [EscEepromWrite](../msg_docs/EscEepromWrite.md)
- [NavigatorMissionItem](../msg_docs/NavigatorMissionItem.md)
- [SensorUwb](../msg_docs/SensorUwb.md)
- [RegisterExtComponentReplyV0](../msg_docs/RegisterExtComponentReplyV0.md)
- [VehicleCommandAckV0](../msg_docs/VehicleCommandAckV0.md)
- [Gripper](../msg_docs/Gripper.md)
- [LandingGearWheel](../msg_docs/LandingGearWheel.md)
- [GainCompression](../msg_docs/GainCompression.md)
- [OrbTestMedium](../msg_docs/OrbTestMedium.md)
- [UlogStream](../msg_docs/UlogStream.md)
- [VelocityLimits](../msg_docs/VelocityLimits.md)
- [EstimatorBias](../msg_docs/EstimatorBias.md)
- [AutotuneAttitudeControlStatus](../msg_docs/AutotuneAttitudeControlStatus.md)
- [NeuralControl](../msg_docs/NeuralControl.md)
- [VehicleStatusV1](../msg_docs/VehicleStatusV1.md)
- [GpioConfig](../msg_docs/GpioConfig.md)
- [Cpuload](../msg_docs/Cpuload.md)
- [ArmingCheckRequestV0](../msg_docs/ArmingCheckRequestV0.md)
- [ParameterSetValueRequest](../msg_docs/ParameterSetValueRequest.md)
- [DeviceInformation](../msg_docs/DeviceInformation.md)
- [EstimatorEventFlags](../msg_docs/EstimatorEventFlags.md)
- [HomePositionV0](../msg_docs/HomePositionV0.md)
- [SensorPreflightMag](../msg_docs/SensorPreflightMag.md)
- [VehicleLocalPositionSetpoint](../msg_docs/VehicleLocalPositionSetpoint.md)
- [PpsCapture](../msg_docs/PpsCapture.md)
- [CellularStatus](../msg_docs/CellularStatus.md)
- [YawEstimatorStatus](../msg_docs/YawEstimatorStatus.md)
- [GimbalManagerInformation](../msg_docs/GimbalManagerInformation.md)
- [VehicleGlobalPositionV0](../msg_docs/VehicleGlobalPositionV0.md)
- [SensorsStatusImu](../msg_docs/SensorsStatusImu.md)
- [ActuatorControlsStatus](../msg_docs/ActuatorControlsStatus.md)
- [FollowTargetStatus](../msg_docs/FollowTargetStatus.md)
- [OpenDroneIdOperatorId](../msg_docs/OpenDroneIdOperatorId.md)
- [OrbTest](../msg_docs/OrbTest.md)
- [SensorGyroFifo](../msg_docs/SensorGyroFifo.md)
- [RoverSpeedStatus](../msg_docs/RoverSpeedStatus.md)
- [Px4ioStatus](../msg_docs/Px4ioStatus.md)
- [ManualControlSwitches](../msg_docs/ManualControlSwitches.md)
- [MavlinkLog](../msg_docs/MavlinkLog.md)
- [Mission](../msg_docs/Mission.md)
- [ControlAllocatorStatus](../msg_docs/ControlAllocatorStatus.md)
- [HeaterStatus](../msg_docs/HeaterStatus.md)
- [VehicleLocalPositionV0](../msg_docs/VehicleLocalPositionV0.md)
- [VehicleMagnetometer](../msg_docs/VehicleMagnetometer.md)
- [GpioRequest](../msg_docs/GpioRequest.md)
- [InternalCombustionEngineStatus](../msg_docs/InternalCombustionEngineStatus.md)
- [TecsStatus](../msg_docs/TecsStatus.md)
- [HealthReport](../msg_docs/HealthReport.md)
- [GpioOut](../msg_docs/GpioOut.md)
- [CameraCapture](../msg_docs/CameraCapture.md)
- [LedControl](../msg_docs/LedControl.md)
- [SensorSelection](../msg_docs/SensorSelection.md)
- [LandingTargetInnovations](../msg_docs/LandingTargetInnovations.md)
- [IrlockReport](../msg_docs/IrlockReport.md)
- [DatamanResponse](../msg_docs/DatamanResponse.md)
- [FixedWingLateralGuidanceStatus](../msg_docs/FixedWingLateralGuidanceStatus.md)
- [EstimatorSelectorStatus](../msg_docs/EstimatorSelectorStatus.md)
- [VehicleCommandAckV0](../msg_docs/VehicleCommandAckV0.md)
:::
+3 -50
View File
@@ -191,28 +191,13 @@ Source: [drivers/dshot](https://github.com/PX4/PX4-Autopilot/tree/main/src/drive
### Description
This is the DShot output driver. It is similar to the fmu driver, and can be used as drop-in replacement
This is the DShot output driver. It can be used as drop-in replacement
to use DShot as ESC communication protocol instead of PWM.
On startup, the module tries to occupy all available pins for DShot output.
It skips all pins already in use (e.g. by a camera trigger module).
It supports:
- DShot150, DShot300, DShot600
- telemetry via separate UART and publishing as esc_status message
- sending DShot commands via CLI
### Examples
Permanently reverse motor 1:
```
dshot reverse -m 1
dshot save -m 1
```
After saving, the reversed direction will be regarded as the normal one. So to reverse again repeat the same commands.
### Usage {#dshot_usage}
@@ -226,36 +211,6 @@ dshot <command> [arguments...]
values: <device>
[-x] Swap RX/TX pins
reverse Reverse motor direction
[-m <val>] Motor index (1-based, default=all)
normal Normal motor direction
[-m <val>] Motor index (1-based, default=all)
save Save current settings
[-m <val>] Motor index (1-based, default=all)
3d_on Enable 3D mode
[-m <val>] Motor index (1-based, default=all)
3d_off Disable 3D mode
[-m <val>] Motor index (1-based, default=all)
beep1 Send Beep pattern 1
[-m <val>] Motor index (1-based, default=all)
beep2 Send Beep pattern 2
[-m <val>] Motor index (1-based, default=all)
beep3 Send Beep pattern 3
[-m <val>] Motor index (1-based, default=all)
beep4 Send Beep pattern 4
[-m <val>] Motor index (1-based, default=all)
beep5 Send Beep pattern 5
[-m <val>] Motor index (1-based, default=all)
stop
status print status info
@@ -1109,7 +1064,7 @@ px4io <command> [arguments...]
## rgbled
Source: [drivers/lights/rgbled_ncp5623c](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/lights/rgbled_ncp5623c)
Source: [drivers/lights/rgbled](https://github.com/PX4/PX4-Autopilot/tree/main/src/drivers/lights/rgbled)
### Usage {#rgbled_usage}
@@ -1124,9 +1079,7 @@ rgbled <command> [arguments...]
[-f <val>] bus frequency in kHz
[-q] quiet startup (no message if no device found)
[-a <val>] I2C address
default: 57
[-o <val>] RGB PWM Assignment
default: 123
default: 85
stop
+41
View File
@@ -0,0 +1,41 @@
---
pageClass: is-wide-page
---
# EscEepromRead (UORB message)
**TOPICS:** esc_eeprom_read
## Fields
| Name | Type | Unit [Frame] | Range/Enum | Description |
| --------- | ----------- | ------------ | ---------- | ---------------------------------------------------- |
| timestamp | `uint64` | us | | Time since system start |
| firmware | `uint8` | | | ESC firmware type (see ESC_FIRMWARE enum in MAVLink) |
| index | `uint8` | | | Index of the ESC (0 = ESC1, 1 = ESC2, etc.) |
| length | `uint16` | | | Length of valid data |
| data | `uint8[48]` | | | Raw ESC EEPROM data |
## Constants
| Name | Type | Value | Description |
| ----------------------------------------------- | ------- | ----- | -------------------------------- |
| <a id="#ORB_QUEUE_LENGTH"></a> ORB_QUEUE_LENGTH | `uint8` | 8 | To support 8 queued up responses |
## Source Message
[Source file (GitHub)](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EscEepromRead.msg)
::: details Click here to see original file
```c
uint64 timestamp # [us] Time since system start
uint8 firmware # [-] ESC firmware type (see ESC_FIRMWARE enum in MAVLink)
uint8 index # [-] Index of the ESC (0 = ESC1, 1 = ESC2, etc.)
uint16 length # [-] Length of valid data
uint8[48] data # [-] Raw ESC EEPROM data
uint8 ORB_QUEUE_LENGTH = 8 # To support 8 queued up responses
```
:::
+43
View File
@@ -0,0 +1,43 @@
---
pageClass: is-wide-page
---
# EscEepromWrite (UORB message)
**TOPICS:** esc_eeprom_write
## Fields
| Name | Type | Unit [Frame] | Range/Enum | Description |
| ---------- | ----------- | ------------ | ---------- | ---------------------------------------------------------------------------------- |
| timestamp | `uint64` | us | | Time since system start |
| firmware | `uint8` | | | ESC firmware type (see ESC_FIRMWARE enum in MAVLink) |
| index | `uint8` | | | Index of the ESC (0 = ESC1, 1 = ESC2, etc, 255 = All) |
| length | `uint16` | | | Length of valid data |
| data | `uint8[48]` | | | Raw ESC EEPROM data |
| write_mask | `uint32[2]` | | | Bitmask indicating which bytes in the data array should be written (max 48 values) |
## Constants
| Name | Type | Value | Description |
| ----------------------------------------------- | ------- | ----- | ------------------------------- |
| <a id="#ORB_QUEUE_LENGTH"></a> ORB_QUEUE_LENGTH | `uint8` | 8 | To support 8 queued up requests |
## Source Message
[Source file (GitHub)](https://github.com/PX4/PX4-Autopilot/blob/main/msg/EscEepromWrite.msg)
::: details Click here to see original file
```c
uint64 timestamp # [us] Time since system start
uint8 firmware # [-] ESC firmware type (see ESC_FIRMWARE enum in MAVLink)
uint8 index # [-] Index of the ESC (0 = ESC1, 1 = ESC2, etc, 255 = All)
uint16 length # [-] Length of valid data
uint8[48] data # [-] Raw ESC EEPROM data
uint32[2] write_mask # [-] Bitmask indicating which bytes in the data array should be written (max 48 values)
uint8 ORB_QUEUE_LENGTH = 8 # To support 8 queued up requests
```
:::
+50 -43
View File
@@ -8,28 +8,27 @@ pageClass: is-wide-page
## Fields
| Name | Type | Unit [Frame] | Range/Enum | Description |
| ----------------- | --------- | ------------ | ---------- | ------------------------------------------------------------------ |
| timestamp | `uint64` | | | time since system start (microseconds) |
| esc_errorcount | `uint32` | | | Number of reported errors by ESC - if supported |
| esc_rpm | `int32` | | | Motor RPM, negative for reverse rotation [RPM] - if supported |
| esc_voltage | `float32` | | | Voltage measured from current ESC [V] - if supported |
| esc_current | `float32` | | | Current measured from current ESC [A] - if supported |
| esc_temperature | `float32` | | | Temperature measured from current ESC [degC] - if supported |
| motor_temperature | `int16` | | | Temperature measured from current motor [degC] - if supported |
| esc_address | `uint8` | | | Address of current ESC (in most cases 1-8 / must be set by driver) |
| esc_cmdcount | `uint8` | | | Counter of number of commands |
| esc_state | `uint8` | | | State of ESC - depend on Vendor |
| actuator_function | `uint8` | | | actuator output function (one of Motor1...MotorN) |
| failures | `uint16` | | | Bitmask to indicate the internal ESC faults |
| esc_power | `int8` | | | Applied power 0-100 in % (negative values reserved) |
| Name | Type | Unit [Frame] | Range/Enum | Description |
| ----------------- | --------- | ------------ | ------------------- | ------------------------------------------------------------------- |
| timestamp | `uint64` | us | | Time since system start |
| esc_errorcount | `uint32` | | | Number of reported errors by ESC - if supported |
| esc_rpm | `int32` | rpm | | Motor RPM, negative for reverse rotation - if supported |
| esc_voltage | `float32` | V | | Voltage measured from current ESC - if supported |
| esc_current | `float32` | A | | Current measured from current ESC - if supported |
| esc_temperature | `float32` | degC | | Temperature measured from current ESC - if supported |
| esc_address | `uint8` | | | Address of current ESC (in most cases 1-12 / must be set by driver) |
| motor_temperature | `int16` | degC | | Temperature measured from current motor - if supported |
| esc_state | `uint8` | | | State of ESC - depend on Vendor |
| actuator_function | `uint8` | | | Actuator output function (one of Motor1...MotorN) |
| failures | `uint16` | | [FAILURE](#FAILURE) | Bitmask to indicate the internal ESC faults |
| esc_power | `int8` | % | [0 : 100] | Applied power (negative values reserved) |
## Constants
## Enums
### FAILURE {#FAILURE}
| Name | Type | Value | Description |
| --------------------------------------------------------------------------- | ------- | ----- | ---------------------------------------------------------------------------- |
| <a id="#ACTUATOR_FUNCTION_MOTOR1"></a> ACTUATOR_FUNCTION_MOTOR1 | `uint8` | 101 |
| <a id="#ACTUATOR_FUNCTION_MOTOR_MAX"></a> ACTUATOR_FUNCTION_MOTOR_MAX | `uint8` | 112 | output_functions.yaml Motor.start + Motor.count - 1 |
| <a id="#FAILURE_OVER_CURRENT"></a> FAILURE_OVER_CURRENT | `uint8` | 0 | (1 << 0) |
| <a id="#FAILURE_OVER_VOLTAGE"></a> FAILURE_OVER_VOLTAGE | `uint8` | 1 | (1 << 1) |
| <a id="#FAILURE_MOTOR_OVER_TEMPERATURE"></a> FAILURE_MOTOR_OVER_TEMPERATURE | `uint8` | 2 | (1 << 2) |
@@ -40,7 +39,14 @@ pageClass: is-wide-page
| <a id="#FAILURE_MOTOR_WARN_TEMPERATURE"></a> FAILURE_MOTOR_WARN_TEMPERATURE | `uint8` | 7 | (1 << 7) |
| <a id="#FAILURE_WARN_ESC_TEMPERATURE"></a> FAILURE_WARN_ESC_TEMPERATURE | `uint8` | 8 | (1 << 8) |
| <a id="#FAILURE_OVER_ESC_TEMPERATURE"></a> FAILURE_OVER_ESC_TEMPERATURE | `uint8` | 9 | (1 << 9) |
| <a id="#ESC_FAILURE_COUNT"></a> ESC_FAILURE_COUNT | `uint8` | 10 | Counter - keep it as last element! |
## Constants
| Name | Type | Value | Description |
| --------------------------------------------------------------------- | ------- | ----- | --------------------------------------------------- |
| <a id="#ACTUATOR_FUNCTION_MOTOR1"></a> ACTUATOR_FUNCTION_MOTOR1 | `uint8` | 101 |
| <a id="#ACTUATOR_FUNCTION_MOTOR_MAX"></a> ACTUATOR_FUNCTION_MOTOR_MAX | `uint8` | 112 | output_functions.yaml Motor.start + Motor.count - 1 |
| <a id="#ESC_FAILURE_COUNT"></a> ESC_FAILURE_COUNT | `uint8` | 10 | Counter - keep it as last element! |
## Source Message
@@ -49,36 +55,37 @@ pageClass: is-wide-page
::: details Click here to see original file
```c
uint64 timestamp # time since system start (microseconds)
uint32 esc_errorcount # Number of reported errors by ESC - if supported
int32 esc_rpm # Motor RPM, negative for reverse rotation [RPM] - if supported
float32 esc_voltage # Voltage measured from current ESC [V] - if supported
float32 esc_current # Current measured from current ESC [A] - if supported
float32 esc_temperature # Temperature measured from current ESC [degC] - if supported
int16 motor_temperature # Temperature measured from current motor [degC] - if supported
uint8 esc_address # Address of current ESC (in most cases 1-8 / must be set by driver)
uint8 esc_cmdcount # Counter of number of commands
uint64 timestamp # [us] Time since system start
uint8 esc_state # State of ESC - depend on Vendor
uint32 esc_errorcount # [-] Number of reported errors by ESC - if supported
int32 esc_rpm # [rpm] Motor RPM, negative for reverse rotation - if supported
float32 esc_voltage # [V] Voltage measured from current ESC - if supported
float32 esc_current # [A] Current measured from current ESC - if supported
float32 esc_temperature # [degC] Temperature measured from current ESC - if supported
uint8 esc_address # [-] Address of current ESC (in most cases 1-12 / must be set by driver)
int16 motor_temperature # [degC] Temperature measured from current motor - if supported
uint8 esc_state # [-] State of ESC - depend on Vendor
uint8 actuator_function # [-] Actuator output function (one of Motor1...MotorN)
uint8 actuator_function # actuator output function (one of Motor1...MotorN)
uint8 ACTUATOR_FUNCTION_MOTOR1 = 101
uint8 ACTUATOR_FUNCTION_MOTOR_MAX = 112 # output_functions.yaml Motor.start + Motor.count - 1
uint16 failures # Bitmask to indicate the internal ESC faults
int8 esc_power # Applied power 0-100 in % (negative values reserved)
uint16 failures # [@enum FAILURE] Bitmask to indicate the internal ESC faults
int8 esc_power # [%] [@range 0,100] Applied power (negative values reserved)
uint8 FAILURE_OVER_CURRENT = 0 # (1 << 0)
uint8 FAILURE_OVER_VOLTAGE = 1 # (1 << 1)
uint8 FAILURE_MOTOR_OVER_TEMPERATURE = 2 # (1 << 2)
uint8 FAILURE_OVER_RPM = 3 # (1 << 3)
uint8 FAILURE_INCONSISTENT_CMD = 4 # (1 << 4) Set if ESC received an inconsistent command (i.e out of boundaries)
uint8 FAILURE_MOTOR_STUCK = 5 # (1 << 5)
uint8 FAILURE_GENERIC = 6 # (1 << 6)
uint8 FAILURE_MOTOR_WARN_TEMPERATURE = 7 # (1 << 7)
uint8 FAILURE_WARN_ESC_TEMPERATURE = 8 # (1 << 8)
uint8 FAILURE_OVER_ESC_TEMPERATURE = 9 # (1 << 9)
uint8 ESC_FAILURE_COUNT = 10 # Counter - keep it as last element!
uint8 FAILURE_OVER_CURRENT = 0 # (1 << 0)
uint8 FAILURE_OVER_VOLTAGE = 1 # (1 << 1)
uint8 FAILURE_MOTOR_OVER_TEMPERATURE = 2 # (1 << 2)
uint8 FAILURE_OVER_RPM = 3 # (1 << 3)
uint8 FAILURE_INCONSISTENT_CMD = 4 # (1 << 4) Set if ESC received an inconsistent command (i.e out of boundaries)
uint8 FAILURE_MOTOR_STUCK = 5 # (1 << 5)
uint8 FAILURE_GENERIC = 6 # (1 << 6)
uint8 FAILURE_MOTOR_WARN_TEMPERATURE = 7 # (1 << 7)
uint8 FAILURE_WARN_ESC_TEMPERATURE = 8 # (1 << 8)
uint8 FAILURE_OVER_ESC_TEMPERATURE = 9 # (1 << 9)
uint8 ESC_FAILURE_COUNT = 10 # Counter - keep it as last element!
```
:::
+51 -40
View File
@@ -8,27 +8,34 @@ pageClass: is-wide-page
## Fields
| Name | Type | Unit [Frame] | Range/Enum | Description |
| ------------------ | -------------- | ------------ | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| timestamp | `uint64` | | | time since system start (microseconds) |
| counter | `uint16` | | | incremented by the writing thread everytime new data is stored |
| esc_count | `uint8` | | | number of connected ESCs |
| esc_connectiontype | `uint8` | | | how ESCs connected to the system |
| esc_online_flags | `uint8` | | | Bitmask indicating which ESC is online/offline |
| esc_armed_flags | `uint8` | | | Bitmask indicating which ESC is armed. For ESC's where the arming state is not known (returned by the ESC), the arming bits should always be set. |
| esc | `EscReport[8]` | | |
| Name | Type | Unit [Frame] | Range/Enum | Description |
| ------------------ | --------------- | ------------ | ------------------------------------------- | --------------------------------------------------------------- |
| timestamp | `uint64` | us | | Time since system start |
| counter | `uint16` | | | Incremented by the writing thread everytime new data is stored |
| esc_count | `uint8` | | | Number of connected ESCs |
| esc_connectiontype | `uint8` | | [ESC_CONNECTION_TYPE](#ESC_CONNECTION_TYPE) | How ESCs connected to the system |
| esc_online_flags | `uint16` | | | Bitmask indicating which ESC is online/offline (in motor order) |
| esc_armed_flags | `uint16` | | | Bitmask indicating which ESC is armed (in motor order) |
| esc | `EscReport[12]` | | |
## Enums
### ESC_CONNECTION_TYPE {#ESC_CONNECTION_TYPE}
| Name | Type | Value | Description |
| --------------------------------------------------------------------- | ------- | ----- | ------------------------ |
| <a id="#ESC_CONNECTION_TYPE_PPM"></a> ESC_CONNECTION_TYPE_PPM | `uint8` | 0 | Traditional PPM ESC |
| <a id="#ESC_CONNECTION_TYPE_SERIAL"></a> ESC_CONNECTION_TYPE_SERIAL | `uint8` | 1 | Serial Bus connected ESC |
| <a id="#ESC_CONNECTION_TYPE_ONESHOT"></a> ESC_CONNECTION_TYPE_ONESHOT | `uint8` | 2 | One Shot PPM |
| <a id="#ESC_CONNECTION_TYPE_I2C"></a> ESC_CONNECTION_TYPE_I2C | `uint8` | 3 | I2C |
| <a id="#ESC_CONNECTION_TYPE_CAN"></a> ESC_CONNECTION_TYPE_CAN | `uint8` | 4 | CAN-Bus |
| <a id="#ESC_CONNECTION_TYPE_DSHOT"></a> ESC_CONNECTION_TYPE_DSHOT | `uint8` | 5 | DShot |
## Constants
| Name | Type | Value | Description |
| --------------------------------------------------------------------- | ------- | ----- | ----------------------------------------------------------------- |
| <a id="#CONNECTED_ESC_MAX"></a> CONNECTED_ESC_MAX | `uint8` | 8 | The number of ESCs supported. Current (Q2/2013) we support 8 ESCs |
| <a id="#ESC_CONNECTION_TYPE_PPM"></a> ESC_CONNECTION_TYPE_PPM | `uint8` | 0 | Traditional PPM ESC |
| <a id="#ESC_CONNECTION_TYPE_SERIAL"></a> ESC_CONNECTION_TYPE_SERIAL | `uint8` | 1 | Serial Bus connected ESC |
| <a id="#ESC_CONNECTION_TYPE_ONESHOT"></a> ESC_CONNECTION_TYPE_ONESHOT | `uint8` | 2 | One Shot PPM |
| <a id="#ESC_CONNECTION_TYPE_I2C"></a> ESC_CONNECTION_TYPE_I2C | `uint8` | 3 | I2C |
| <a id="#ESC_CONNECTION_TYPE_CAN"></a> ESC_CONNECTION_TYPE_CAN | `uint8` | 4 | CAN-Bus |
| <a id="#ESC_CONNECTION_TYPE_DSHOT"></a> ESC_CONNECTION_TYPE_DSHOT | `uint8` | 5 | DShot |
| Name | Type | Value | Description |
| ------------------------------------------------- | ------- | ----- | --------------------------------------------- |
| <a id="#CONNECTED_ESC_MAX"></a> CONNECTED_ESC_MAX | `uint8` | 12 | The number of ESCs supported (Motor1-Motor12) |
## Source Message
@@ -37,34 +44,38 @@ pageClass: is-wide-page
::: details Click here to see original file
```c
uint64 timestamp # time since system start (microseconds)
uint8 CONNECTED_ESC_MAX = 8 # The number of ESCs supported. Current (Q2/2013) we support 8 ESCs
uint64 timestamp # [us] Time since system start
uint8 CONNECTED_ESC_MAX = 12 # The number of ESCs supported (Motor1-Motor12)
uint8 ESC_CONNECTION_TYPE_PPM = 0 # Traditional PPM ESC
uint8 ESC_CONNECTION_TYPE_SERIAL = 1 # Serial Bus connected ESC
uint8 ESC_CONNECTION_TYPE_ONESHOT = 2 # One Shot PPM
uint8 ESC_CONNECTION_TYPE_I2C = 3 # I2C
uint8 ESC_CONNECTION_TYPE_CAN = 4 # CAN-Bus
uint8 ESC_CONNECTION_TYPE_DSHOT = 5 # DShot
uint8 ESC_CONNECTION_TYPE_PPM = 0 # Traditional PPM ESC
uint8 ESC_CONNECTION_TYPE_SERIAL = 1 # Serial Bus connected ESC
uint8 ESC_CONNECTION_TYPE_ONESHOT = 2 # One Shot PPM
uint8 ESC_CONNECTION_TYPE_I2C = 3 # I2C
uint8 ESC_CONNECTION_TYPE_CAN = 4 # CAN-Bus
uint8 ESC_CONNECTION_TYPE_DSHOT = 5 # DShot
uint16 counter # incremented by the writing thread everytime new data is stored
uint16 counter # [-] Incremented by the writing thread everytime new data is stored
uint8 esc_count # number of connected ESCs
uint8 esc_connectiontype # how ESCs connected to the system
uint8 esc_count # [-] Number of connected ESCs
uint8 esc_connectiontype # [@enum ESC_CONNECTION_TYPE] How ESCs connected to the system
uint8 esc_online_flags # Bitmask indicating which ESC is online/offline
# esc_online_flags bit 0 : Set to 1 if ESC0 is online
# esc_online_flags bit 1 : Set to 1 if ESC1 is online
# esc_online_flags bit 2 : Set to 1 if ESC2 is online
# esc_online_flags bit 3 : Set to 1 if ESC3 is online
# esc_online_flags bit 4 : Set to 1 if ESC4 is online
# esc_online_flags bit 5 : Set to 1 if ESC5 is online
# esc_online_flags bit 6 : Set to 1 if ESC6 is online
# esc_online_flags bit 7 : Set to 1 if ESC7 is online
uint16 esc_online_flags # Bitmask indicating which ESC is online/offline (in motor order)
# esc_online_flags bit 0 : Set to 1 if Motor1 is online
# esc_online_flags bit 1 : Set to 1 if Motor2 is online
# esc_online_flags bit 2 : Set to 1 if Motor3 is online
# esc_online_flags bit 3 : Set to 1 if Motor4 is online
# esc_online_flags bit 4 : Set to 1 if Motor5 is online
# esc_online_flags bit 5 : Set to 1 if Motor6 is online
# esc_online_flags bit 6 : Set to 1 if Motor7 is online
# esc_online_flags bit 7 : Set to 1 if Motor8 is online
# esc_online_flags bit 8 : Set to 1 if Motor9 is online
# esc_online_flags bit 9 : Set to 1 if Motor10 is online
# esc_online_flags bit 10: Set to 1 if Motor11 is online
# esc_online_flags bit 11: Set to 1 if Motor12 is online
uint8 esc_armed_flags # Bitmask indicating which ESC is armed. For ESC's where the arming state is not known (returned by the ESC), the arming bits should always be set.
uint16 esc_armed_flags # [-] Bitmask indicating which ESC is armed (in motor order)
EscReport[8] esc
EscReport[12] esc
```
:::
+46 -39
View File
@@ -10,45 +10,48 @@ GPS position in WGS84 coordinates. the field 'timestamp' is for the position & v
## Fields
| Name | Type | Unit [Frame] | Range/Enum | Description |
| ----------------------- | --------- | ------------ | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| timestamp | `uint64` | | | time since system start (microseconds) |
| timestamp_sample | `uint64` | | |
| device_id | `uint32` | | | unique device ID for the sensor that does not change between power cycles |
| latitude_deg | `float64` | | | Latitude in degrees, allows centimeter level RTK precision |
| longitude_deg | `float64` | | | Longitude in degrees, allows centimeter level RTK precision |
| altitude_msl_m | `float64` | | | Altitude above MSL, meters |
| altitude_ellipsoid_m | `float64` | | | Altitude above Ellipsoid, meters |
| s_variance_m_s | `float32` | | | GPS speed accuracy estimate, (metres/sec) |
| c_variance_rad | `float32` | | | GPS course accuracy estimate, (radians) |
| fix_type | `uint8` | | | Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix. |
| eph | `float32` | | | GPS horizontal position accuracy (metres) |
| epv | `float32` | | | GPS vertical position accuracy (metres) |
| hdop | `float32` | | | Horizontal dilution of precision |
| vdop | `float32` | | | Vertical dilution of precision |
| noise_per_ms | `int32` | | | GPS noise per millisecond |
| automatic_gain_control | `uint16` | | | Automatic gain control monitor |
| jamming_state | `uint8` | | | indicates whether jamming has been detected or suspected by the receivers. O: Unknown, 1: OK, 2: Mitigated, 3: Detected |
| jamming_indicator | `int32` | | | indicates jamming is occurring |
| spoofing_state | `uint8` | | | indicates whether spoofing has been detected or suspected by the receivers. O: Unknown, 1: OK, 2: Mitigated, 3: Detected |
| authentication_state | `uint8` | | | GPS signal authentication state |
| vel_m_s | `float32` | | | GPS ground speed, (metres/sec) |
| vel_n_m_s | `float32` | | | GPS North velocity, (metres/sec) |
| vel_e_m_s | `float32` | | | GPS East velocity, (metres/sec) |
| vel_d_m_s | `float32` | | | GPS Down velocity, (metres/sec) |
| cog_rad | `float32` | | | Course over ground (NOT heading, but direction of movement), -PI..PI, (radians) |
| vel_ned_valid | `bool` | | | True if NED velocity is valid |
| timestamp_time_relative | `int32` | | | timestamp + timestamp_time_relative = Time of the UTC timestamp since system start, (microseconds) |
| time_utc_usec | `uint64` | | | Timestamp (microseconds, UTC), this is the timestamp which comes from the gps module. It might be unavailable right after cold start, indicated by a value of 0 |
| satellites_used | `uint8` | | | Number of satellites used |
| system_error | `uint32` | | | General errors with the connected GPS receiver |
| heading | `float32` | | | heading angle of XYZ body frame rel to NED. Set to NaN if not available and updated (used for dual antenna GPS), (rad, [-PI, PI]) |
| heading_offset | `float32` | | | heading offset of dual antenna array in body frame. Set to NaN if not applicable. (rad, [-PI, PI]) |
| heading_accuracy | `float32` | | | heading accuracy (rad, [0, 2PI]) |
| rtcm_injection_rate | `float32` | | | RTCM message injection rate Hz |
| selected_rtcm_instance | `uint8` | | | uorb instance that is being used for RTCM corrections |
| rtcm_crc_failed | `bool` | | | RTCM message CRC failure detected |
| rtcm_msg_used | `uint8` | | | Indicates if the RTCM message was used successfully by the receiver |
| Name | Type | Unit [Frame] | Range/Enum | Description |
| ----------------------- | --------- | ------------------ | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| timestamp | `uint64` | | | time since system start (microseconds) |
| timestamp_sample | `uint64` | | |
| device_id | `uint32` | | | unique device ID for the sensor that does not change between power cycles |
| latitude_deg | `float64` | | | Latitude in degrees, allows centimeter level RTK precision |
| longitude_deg | `float64` | | | Longitude in degrees, allows centimeter level RTK precision |
| altitude_msl_m | `float64` | | | Altitude above MSL, meters |
| altitude_ellipsoid_m | `float64` | | | Altitude above Ellipsoid, meters |
| s_variance_m_s | `float32` | | | GPS speed accuracy estimate, (metres/sec) |
| c_variance_rad | `float32` | | | GPS course accuracy estimate, (radians) |
| fix_type | `uint8` | | | Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix. |
| eph | `float32` | | | GPS horizontal position accuracy (metres) |
| epv | `float32` | | | GPS vertical position accuracy (metres) |
| hdop | `float32` | | | Horizontal dilution of precision |
| vdop | `float32` | | | Vertical dilution of precision |
| noise_per_ms | `int32` | | | GPS noise per millisecond |
| automatic_gain_control | `uint16` | | | Automatic gain control monitor |
| jamming_state | `uint8` | | | indicates whether jamming has been detected or suspected by the receivers. O: Unknown, 1: OK, 2: Mitigated, 3: Detected |
| jamming_indicator | `int32` | | | indicates jamming is occurring |
| spoofing_state | `uint8` | | | indicates whether spoofing has been detected or suspected by the receivers. O: Unknown, 1: OK, 2: Mitigated, 3: Detected |
| authentication_state | `uint8` | | | GPS signal authentication state |
| vel_m_s | `float32` | | | GPS ground speed, (metres/sec) |
| vel_n_m_s | `float32` | | | GPS North velocity, (metres/sec) |
| vel_e_m_s | `float32` | | | GPS East velocity, (metres/sec) |
| vel_d_m_s | `float32` | | | GPS Down velocity, (metres/sec) |
| cog_rad | `float32` | | | Course over ground (NOT heading, but direction of movement), -PI..PI, (radians) |
| vel_ned_valid | `bool` | | | True if NED velocity is valid |
| timestamp_time_relative | `int32` | | | timestamp + timestamp_time_relative = Time of the UTC timestamp since system start, (microseconds) |
| time_utc_usec | `uint64` | | | Timestamp (microseconds, UTC), this is the timestamp which comes from the gps module. It might be unavailable right after cold start, indicated by a value of 0 |
| satellites_used | `uint8` | | | Number of satellites used |
| system_error | `uint32` | | | General errors with the connected GPS receiver |
| heading | `float32` | | | heading angle of XYZ body frame rel to NED. Set to NaN if not available and updated (used for dual antenna GPS), (rad, [-PI, PI]) |
| heading_offset | `float32` | | | heading offset of dual antenna array in body frame. Set to NaN if not applicable. (rad, [-PI, PI]) |
| heading_accuracy | `float32` | | | heading accuracy (rad, [0, 2PI]) |
| rtcm_injection_rate | `float32` | | | RTCM message injection rate Hz |
| selected_rtcm_instance | `uint8` | | | uorb instance that is being used for RTCM corrections |
| rtcm_crc_failed | `bool` | | | RTCM message CRC failure detected |
| rtcm_msg_used | `uint8` | | | Indicates if the RTCM message was used successfully by the receiver |
| antenna_offset_x | `float32` | m [body frame FRD] | | X Position of GNSS antenna |
| antenna_offset_y | `float32` | m [body frame FRD] | | Y Position of GNSS antenna |
| antenna_offset_z | `float32` | m [body frame FRD] | | Z Position of GNSS antenna |
## Constants
@@ -182,6 +185,10 @@ uint8 RTCM_MSG_USED_NOT_USED = 1
uint8 RTCM_MSG_USED_USED = 2
uint8 rtcm_msg_used # Indicates if the RTCM message was used successfully by the receiver
float32 antenna_offset_x # [m] [@frame body frame FRD] X Position of GNSS antenna
float32 antenna_offset_y # [m] [@frame body frame FRD] Y Position of GNSS antenna
float32 antenna_offset_z # [m] [@frame body frame FRD] Z Position of GNSS antenna
# TOPICS sensor_gps vehicle_gps_position
```
+36 -8
View File
@@ -1052,6 +1052,20 @@ Actuator configuration command.
| 6 | | | ? |
| 7 | | | ? |
### VEHICLE_CMD_ESC_REQUEST_EEPROM (312)
Request EEPROM data from an ESC.
| Param | Units | Range/Enum | Description |
| ----- | ----- | ---------- | ------------- |
| 1 | | | ESC Index |
| 2 | | | Firmware Type |
| 3 | | | Unused |
| 4 | | | Unused |
| 5 | | | Unused |
| 6 | | | ? |
| 7 | | | ? |
### VEHICLE_CMD_COMPONENT_ARM_DISARM (400)
Arms / Disarms a component.
@@ -1526,16 +1540,22 @@ Change mode by specifying nav_state directly.
## Constants
| Name | Type | Value | Description |
| --------------------------------------------------------------------------------------------------------- | -------- | ----- | ------------------------------------------------------------------------------------------ |
| Name | Type | Value | Description |
| --------------------------------------------------------------------------------------------------------- | -------- | ----- | ----------------------------------------------------------------------------------------------------- |
| <a id="#MESSAGE_VERSION"></a> MESSAGE_VERSION | `uint32` | 0 |
| <a id="#PREFLIGHT_CALIBRATION_TEMPERATURE_CALIBRATION"></a> PREFLIGHT_CALIBRATION_TEMPERATURE_CALIBRATION | `uint16` | 3 | Param value for VEHICLE_CMD_PREFLIGHT_CALIBRATION to start temperature calibration. |
| <a id="#VEHICLE_MOUNT_MODE_RETRACT"></a> VEHICLE_MOUNT_MODE_RETRACT | `uint8` | 0 | Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization. |
| <a id="#VEHICLE_MOUNT_MODE_NEUTRAL"></a> VEHICLE_MOUNT_MODE_NEUTRAL | `uint8` | 1 | Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory. |
| <a id="#VEHICLE_MOUNT_MODE_MAVLINK_TARGETING"></a> VEHICLE_MOUNT_MODE_MAVLINK_TARGETING | `uint8` | 2 | Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization. |
| <a id="#VEHICLE_MOUNT_MODE_RC_TARGETING"></a> VEHICLE_MOUNT_MODE_RC_TARGETING | `uint8` | 3 | Load neutral position and start RC Roll,Pitch,Yaw control with stabilization. |
| <a id="#VEHICLE_MOUNT_MODE_GPS_POINT"></a> VEHICLE_MOUNT_MODE_GPS_POINT | `uint8` | 4 | Load neutral position and start to point to Lat,Lon,Alt. |
| <a id="#PREFLIGHT_CALIBRATION_TEMPERATURE_CALIBRATION"></a> PREFLIGHT_CALIBRATION_TEMPERATURE_CALIBRATION | `uint16` | 3 | Param value for VEHICLE_CMD_PREFLIGHT_CALIBRATION to start temperature calibration. |
| <a id="#VEHICLE_MOUNT_MODE_RETRACT"></a> VEHICLE_MOUNT_MODE_RETRACT | `uint8` | 0 | Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization. |
| <a id="#VEHICLE_MOUNT_MODE_NEUTRAL"></a> VEHICLE_MOUNT_MODE_NEUTRAL | `uint8` | 1 | Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory. |
| <a id="#VEHICLE_MOUNT_MODE_MAVLINK_TARGETING"></a> VEHICLE_MOUNT_MODE_MAVLINK_TARGETING | `uint8` | 2 | Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization. |
| <a id="#VEHICLE_MOUNT_MODE_RC_TARGETING"></a> VEHICLE_MOUNT_MODE_RC_TARGETING | `uint8` | 3 | Load neutral position and start RC Roll,Pitch,Yaw control with stabilization. |
| <a id="#VEHICLE_MOUNT_MODE_GPS_POINT"></a> VEHICLE_MOUNT_MODE_GPS_POINT | `uint8` | 4 | Load neutral position and start to point to Lat,Lon,Alt. |
| <a id="#VEHICLE_MOUNT_MODE_ENUM_END"></a> VEHICLE_MOUNT_MODE_ENUM_END | `uint8` | 5 |
| <a id="#ACTUATOR_CONFIGURATION_NONE"></a> ACTUATOR_CONFIGURATION_NONE | `uint8` | 0 | Do nothing. |
| <a id="#ACTUATOR_CONFIGURATION_BEEP"></a> ACTUATOR_CONFIGURATION_BEEP | `uint8` | 1 | Command the actuator to beep now. |
| <a id="#ACTUATOR_CONFIGURATION_3D_MODE_ON"></a> ACTUATOR_CONFIGURATION_3D_MODE_ON | `uint8` | 2 | Permanently set the actuator (ESC) to 3D mode (reversible thrust). |
| <a id="#ACTUATOR_CONFIGURATION_3D_MODE_OFF"></a> ACTUATOR_CONFIGURATION_3D_MODE_OFF | `uint8` | 3 | Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust). |
| <a id="#ACTUATOR_CONFIGURATION_SPIN_DIRECTION1"></a> ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 | `uint8` | 4 | Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise). |
| <a id="#ACTUATOR_CONFIGURATION_SPIN_DIRECTION2"></a> ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 | `uint8` | 5 | Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1). |
| <a id="#PARACHUTE_ACTION_DISABLE"></a> PARACHUTE_ACTION_DISABLE | `uint8` | 0 |
| <a id="#PARACHUTE_ACTION_ENABLE"></a> PARACHUTE_ACTION_ENABLE | `uint8` | 1 |
| <a id="#PARACHUTE_ACTION_RELEASE"></a> PARACHUTE_ACTION_RELEASE | `uint8` | 2 |
@@ -1660,6 +1680,7 @@ uint16 VEHICLE_CMD_GIMBAL_DEVICE_INFORMATION = 283 # Command to ask information
uint16 VEHICLE_CMD_MISSION_START = 300 # Start running a mission. |first_item: the first mission item to run|last_item: the last mission item to run (after this item is run, the mission ends)|
uint16 VEHICLE_CMD_ACTUATOR_TEST = 310 # Actuator testing command. |[@range -1,1] value|[s] timeout|Unused|Unused|output function|
uint16 VEHICLE_CMD_CONFIGURE_ACTUATOR = 311 # Actuator configuration command. |configuration|Unused|Unused|Unused|output function|
uint16 VEHICLE_CMD_ESC_REQUEST_EEPROM = 312 # Request EEPROM data from an ESC. |ESC Index|Firmware Type|Unused|Unused|Unused|
uint16 VEHICLE_CMD_COMPONENT_ARM_DISARM = 400 # Arms / Disarms a component. |1 to arm, 0 to disarm.
uint16 VEHICLE_CMD_RUN_PREARM_CHECKS = 401 # Instructs a target system to run pre-arm checks.
uint16 VEHICLE_CMD_INJECT_FAILURE = 420 # Inject artificial failure for testing purposes.
@@ -1709,6 +1730,13 @@ uint8 VEHICLE_ROI_LOCATION = 3 # Point toward fixed location.
uint8 VEHICLE_ROI_TARGET = 4 # Point toward target.
uint8 VEHICLE_ROI_ENUM_END = 5
uint8 ACTUATOR_CONFIGURATION_NONE = 0 # Do nothing.
uint8 ACTUATOR_CONFIGURATION_BEEP = 1 # Command the actuator to beep now.
uint8 ACTUATOR_CONFIGURATION_3D_MODE_ON = 2 # Permanently set the actuator (ESC) to 3D mode (reversible thrust).
uint8 ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3 # Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust).
uint8 ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4 # Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise).
uint8 ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5 # Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1).
uint8 PARACHUTE_ACTION_DISABLE = 0
uint8 PARACHUTE_ACTION_ENABLE = 1
uint8 PARACHUTE_ACTION_RELEASE = 2
+2
View File
@@ -85,6 +85,8 @@ Graphs showing how these are used [can be found here](../middleware/uorb_graph.m
- [DistanceSensorModeChangeRequest](DistanceSensorModeChangeRequest.md)
- [DronecanNodeStatus](DronecanNodeStatus.md)
- [Ekf2Timestamps](Ekf2Timestamps.md) — this message contains the (relative) timestamps of the sensor inputs used by EKF2. It can be used for reproducible replay.
- [EscEepromRead](EscEepromRead.md)
- [EscEepromWrite](EscEepromWrite.md)
- [EscReport](EscReport.md)
- [EscStatus](EscStatus.md)
- [EstimatorAidSource1d](EstimatorAidSource1d.md)
+57 -100
View File
@@ -47,71 +47,12 @@ Then connect the battery and arm the vehicle.
The ESCs should initialize and the motors turn in the correct directions.
- If the motors do not spin in the correct direction (for the [selected airframe](../airframes/airframe_reference.md)) you can reverse them in the UI using the **Set Spin Direction** option (this option appears after you select DShot and assign motors).
You can also reverse motors by sending an [ESC Command](#commands).
## ESC Commands {#commands}
Commands can be sent to the ESC via the [MAVLink shell](../debug/mavlink_shell.md).
See [here](../modules/modules_driver.md#dshot) for a full reference of the supported commands.
The most important ones are:
- Make a motor connected to FMU output pin 1 beep (helps with identifying motors)
```sh
dshot beep1 -m 1
```
- Retrieve ESC information (requires telemetry, see below):
```sh
nsh> dshot esc_info -m 2
INFO [dshot] ESC Type: #TEKKO32_4in1#
INFO [dshot] MCU Serial Number: xxxxxx-xxxxxx-xxxxxx-xxxxxx
INFO [dshot] Firmware version: 32.60
INFO [dshot] Rotation Direction: normal
INFO [dshot] 3D Mode: off
INFO [dshot] Low voltage Limit: off
INFO [dshot] Current Limit: off
INFO [dshot] LED 0: unsupported
INFO [dshot] LED 1: unsupported
INFO [dshot] LED 2: unsupported
INFO [dshot] LED 3: unsupported
```
- Permanently set the spin direction of a motor connected to FMU output pin 1 (while motors are _not_ spinning):
- Set spin direction to `reversed`:
```sh
dshot reverse -m 1
dshot save -m 1
```
Retrieving ESC information will then show:
```sh
Rotation Direction: reversed
```
- Set spin direction to `normal`:
```sh
dshot normal -m 1
dshot save -m 1
```
Retrieving ESC information will then show:
```sh
Rotation Direction: normal
```
::: info
- The commands will have no effect if the motors are spinning, or if the ESC is already set to the corresponding direction.
- The ESC will revert to its last saved direction (normal or reversed) on reboot if `save` is not called after changing the direction.
:::
## ESC Telemetry
Some ESCs are capable of sending telemetry back to the flight controller through a UART RX port.
@@ -130,60 +71,76 @@ To enable this feature (on ESCs that support it):
1. Join all the telemetry wires from all the ESCs together, and then connect them to one of the RX pins on an unused flight controller serial port.
2. Enable telemetry on that serial port using [DSHOT_TEL_CFG](../advanced_config/parameter_reference.md#DSHOT_TEL_CFG).
After a reboot you can check if telemetry is working (make sure the battery is connected) using:
```sh
dshot esc_info -m 1
```
::: tip
You may have to configure [MOT_POLE_COUNT](../advanced_config/parameter_reference.md#MOT_POLE_COUNT) to get the correct RPM values.
:::tip
You may have to configure the per-motor pole count parameters ([`DSHOT_MOT_POL1``DSHOT_MOT_POL12`](../advanced_config/parameter_reference.md#DSHOT_MOT_POL1)) to get correct RPM values.
The default value for these is 14 poles, which is typical for 5-inch prop motors.
:::
::: tip
Not all DSHOT-capable ESCs support `[esc_info]`(e.g. APD 80F3x), even when telemetry is supported and enabled.
The resulting error is:
```sh
ERROR [dshot] No data received. If telemetry is setup correctly, try again.
```
Check manufacturer documentation for confirmation/details.
:::tip
[Extended DShot Telemetry (EDT)](#extended-dshot-telemetry-edt) can provide temperature, voltage, and current through the BDShot signal — no serial telemetry wire needed.
:::
## Bidirectional DShot (Telemetry)
<Badge type="tip" text="PX4 v1.16" />
Bidirectional DShot is a protocol that can provide telemetry including: high rate ESC RPM data, voltage, current, and temperature with a single wire.
Bidirectional DShot (BDShot) enables the ESC to send eRPM telemetry back to the flight controller on the same signal wire used for throttle commands — no additional telemetry wire is needed for RPM data.
High-rate eRPM data significantly improves the performance of [Dynamic Notch Filters](../config_mc/filter_tuning.md#dynamic-notch-filters) and enables more precise vehicle tuning.
The PX4 implementation currently enables only ESC RPM (eRPM) data collection from each ESC at high frequencies.
This telemetry significantly improves the performance of [Dynamic Notch Filters](../config_mc/filter_tuning.md#dynamic-notch-filters) and enables more precise vehicle tuning.
With [Extended DShot Telemetry (EDT)](#extended-dshot-telemetry-edt) enabled, BDShot can also provide temperature, voltage, and current data.
### Hardware Support
BDShot requires a flight controller with DMA-capable timers.
Any FMU output on a supported timer can be used for BDShot — multiple timers are supported through sequential burst/capture.
Supported processors:
- **STM32H7**: All FMU outputs on DMA-capable timers
- **i.MXRT** (V6X-RT & Tropic): All FMU outputs
::: info
The [ESC Telemetry](#esc-telemetry) described above is currently still necessary if you want voltage, current, or temperature information.
It's setup and use is independent of bidirectional DShot.
:::
### Hardware Setup
The ESC must be connected to FMU outputs only.
These will be labeled `MAIN` on flight controllers that only have one PWM bus, and `AUX` on controllers that have both `MAIN` and `AUX` ports (i.e. FCs that have an IO board).
::: warning **Limited hardware support**
This feature is only supported on flight controllers with the following processors:
- STM32H7: First four FMU outputs
- Must be connected to the first 4 FMU outputs, and these outputs must also be mapped to the same timer.
- [KakuteH7](../flight_controller/kakuteh7v2.md) is not supported because the outputs are not mapped to the same timer.
- [i.MXRT](../flight_controller/nxp_mr_vmu_rt1176.md) (V6X-RT & Tropic): 8 FMU outputs.
No other boards are supported.
These are labeled `MAIN` on controllers with a single PWM bus, and `AUX` on controllers with both `MAIN` and `AUX` ports (i.e. those with an IO board).
:::
### Configuration {#bidirectional-dshot-configuration}
### PX4 Configuration {#bidirectional-dshot-configuration}
To enable bidirectional DShot, set the [DSHOT_BIDIR_EN](../advanced_config/parameter_reference.md#DSHOT_BIDIR_EN) parameter.
BDShot is enabled **per-timer** in the [Actuator Configuration](../config/actuators.md) UI.
Select **BDShot150**, **BDShot300**, or **BDShot600** as the output protocol instead of the corresponding DShot speed.
There is no separate enable parameter — choosing a BDShot protocol activates bidirectional telemetry on that timer's outputs.
The system calculates actual motor RPM from the received eRPM data using the [MOT_POLE_COUNT](../advanced_config/parameter_reference.md#MOT_POLE_COUNT) parameter.
This parameter must be set correctly for accurate RPM reporting.
The system calculates actual motor RPM from eRPM data using per-motor pole count parameters: `DSHOT_MOT_POL1` through `DSHOT_MOT_POL12` (one per motor output).
The default is 14 poles, which is typical for 5-inch prop motors.
If you are using AM32 ESCs, the motor pole count must also be set in the AM32 firmware configuration (e.g. via the AM32 configurator tool) to match.
### Extended DShot Telemetry (EDT)
EDT extends BDShot by interleaving temperature, voltage, and current data into the eRPM telemetry frames.
This allows ESC health monitoring through the same signal wire, without requiring a separate serial telemetry connection.
To enable EDT:
1. Configure BDShot on the desired outputs (see above).
2. Set `DSHOT_BIDIR_EDT` to `1` and reboot.
The ESC firmware must support EDT (e.g. [AM32](https://github.com/am32-firmware/AM32)).
When both serial telemetry and BDShot/EDT are enabled, the driver merges data from both sources.
## AM32 ESC Settings (EEPROM)
PX4 can read and write AM32 ESC firmware settings (EEPROM) via a ground station, enabling remote ESC configuration without connecting directly to each ESC.
### Requirements
- ESCs running [AM32 firmware](https://github.com/am32-firmware/AM32) with serial telemetry connected ([DSHOT_TEL_CFG](../advanced_config/parameter_reference.md#DSHOT_TEL_CFG))
- `DSHOT_ESC_TYPE` set to `1` (AM32)
- Ground station with ESC EEPROM support (QGroundControl feature in development)
- MAVLink development dialect enabled on the flight controller
### How It Works
PX4 automatically reads the full EEPROM from each ESC on boot.
The ground station can then display individual settings and allow the user to modify them.
Changes are written back to the ESC one byte at a time using the DShot programming protocol.
+1 -1
View File
@@ -296,7 +296,7 @@ For all variants of SIH:
For SIH on SITL you will need to explicitly enable these sensors as shown below.
:::
- `param set-default EKF2_GPS_DELAY 0` to improve state estimator performance (the assumption of instant GPS measurements would normally be unrealistic, but is accurate for SIH).
- `param set-default SENS_GPS0_DELAY 0` to improve state estimator performance (the assumption of instant GPS measurements would normally be unrealistic, but is accurate for SIH).
For SIH on FC:
+1 -1
View File
@@ -7,7 +7,7 @@ Regression test for DSHOT working with PX4
## Preflight
- Ensure vehicle is using a DSHOT ESC
- Parameter [DSHOT_BIDIR_EN](../advanced_config/parameter_reference.md#DSHOT_BIDIR_EN) is enabled
- Bidirectional DShot is configured (BDShot150/300/600 selected in [Actuator Configuration](../config/actuators.md))
- Parameter [DSHOT_TEL_CFG](../advanced_config/parameter_reference.md#DSHOT_TEL_CFG) is configured (if ESC supports telemetry)
- Parameter [SDLOG_PROFILE](../advanced_config/parameter_reference.md#SDLOG_PROFILE) has Debug (`5`) checked
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
+2
View File
@@ -69,6 +69,8 @@ set(msg_files
DistanceSensorModeChangeRequest.msg
DronecanNodeStatus.msg
Ekf2Timestamps.msg
EscEepromRead.msg
EscEepromWrite.msg
EscReport.msg
EscStatus.msg
EstimatorAidSource1d.msg
+7
View File
@@ -0,0 +1,7 @@
uint64 timestamp # [us] Time since system start
uint8 firmware # [-] ESC firmware type (see ESC_FIRMWARE enum in MAVLink)
uint8 index # [-] Index of the ESC (0 = ESC1, 1 = ESC2, etc.)
uint16 length # [-] Length of valid data
uint8[48] data # [-] Raw ESC EEPROM data
uint8 ORB_QUEUE_LENGTH = 8 # To support 8 queued up responses
+8
View File
@@ -0,0 +1,8 @@
uint64 timestamp # [us] Time since system start
uint8 firmware # [-] ESC firmware type (see ESC_FIRMWARE enum in MAVLink)
uint8 index # [-] Index of the ESC (0 = ESC1, 1 = ESC2, etc, 255 = All)
uint16 length # [-] Length of valid data
uint8[48] data # [-] Raw ESC EEPROM data
uint32[2] write_mask # [-] Bitmask indicating which bytes in the data array should be written (max 48 values)
uint8 ORB_QUEUE_LENGTH = 8 # To support 8 queued up requests
+25 -24
View File
@@ -1,30 +1,31 @@
uint64 timestamp # time since system start (microseconds)
uint32 esc_errorcount # Number of reported errors by ESC - if supported
int32 esc_rpm # Motor RPM, negative for reverse rotation [RPM] - if supported
float32 esc_voltage # Voltage measured from current ESC [V] - if supported
float32 esc_current # Current measured from current ESC [A] - if supported
float32 esc_temperature # Temperature measured from current ESC [degC] - if supported
int16 motor_temperature # Temperature measured from current motor [degC] - if supported
uint8 esc_address # Address of current ESC (in most cases 1-8 / must be set by driver)
uint8 esc_cmdcount # Counter of number of commands
uint64 timestamp # [us] Time since system start
uint8 esc_state # State of ESC - depend on Vendor
uint32 esc_errorcount # [-] Number of reported errors by ESC - if supported
int32 esc_rpm # [rpm] Motor RPM, negative for reverse rotation - if supported
float32 esc_voltage # [V] Voltage measured from current ESC - if supported
float32 esc_current # [A] Current measured from current ESC - if supported
float32 esc_temperature # [degC] Temperature measured from current ESC - if supported
uint8 esc_address # [-] Address of current ESC (in most cases 1-12 / must be set by driver)
int16 motor_temperature # [degC] Temperature measured from current motor - if supported
uint8 esc_state # [-] State of ESC - depend on Vendor
uint8 actuator_function # [-] Actuator output function (one of Motor1...MotorN)
uint8 actuator_function # actuator output function (one of Motor1...MotorN)
uint8 ACTUATOR_FUNCTION_MOTOR1 = 101
uint8 ACTUATOR_FUNCTION_MOTOR_MAX = 112 # output_functions.yaml Motor.start + Motor.count - 1
uint16 failures # Bitmask to indicate the internal ESC faults
int8 esc_power # Applied power 0-100 in % (negative values reserved)
uint16 failures # [@enum FAILURE] Bitmask to indicate the internal ESC faults
int8 esc_power # [%] [@range 0,100] Applied power (negative values reserved)
uint8 FAILURE_OVER_CURRENT = 0 # (1 << 0)
uint8 FAILURE_OVER_VOLTAGE = 1 # (1 << 1)
uint8 FAILURE_MOTOR_OVER_TEMPERATURE = 2 # (1 << 2)
uint8 FAILURE_OVER_RPM = 3 # (1 << 3)
uint8 FAILURE_INCONSISTENT_CMD = 4 # (1 << 4) Set if ESC received an inconsistent command (i.e out of boundaries)
uint8 FAILURE_MOTOR_STUCK = 5 # (1 << 5)
uint8 FAILURE_GENERIC = 6 # (1 << 6)
uint8 FAILURE_MOTOR_WARN_TEMPERATURE = 7 # (1 << 7)
uint8 FAILURE_WARN_ESC_TEMPERATURE = 8 # (1 << 8)
uint8 FAILURE_OVER_ESC_TEMPERATURE = 9 # (1 << 9)
uint8 ESC_FAILURE_COUNT = 10 # Counter - keep it as last element!
uint8 FAILURE_OVER_CURRENT = 0 # (1 << 0)
uint8 FAILURE_OVER_VOLTAGE = 1 # (1 << 1)
uint8 FAILURE_MOTOR_OVER_TEMPERATURE = 2 # (1 << 2)
uint8 FAILURE_OVER_RPM = 3 # (1 << 3)
uint8 FAILURE_INCONSISTENT_CMD = 4 # (1 << 4) Set if ESC received an inconsistent command (i.e out of boundaries)
uint8 FAILURE_MOTOR_STUCK = 5 # (1 << 5)
uint8 FAILURE_GENERIC = 6 # (1 << 6)
uint8 FAILURE_MOTOR_WARN_TEMPERATURE = 7 # (1 << 7)
uint8 FAILURE_WARN_ESC_TEMPERATURE = 8 # (1 << 8)
uint8 FAILURE_OVER_ESC_TEMPERATURE = 9 # (1 << 9)
uint8 ESC_FAILURE_COUNT = 10 # Counter - keep it as last element!
+26 -22
View File
@@ -1,28 +1,32 @@
uint64 timestamp # time since system start (microseconds)
uint8 CONNECTED_ESC_MAX = 8 # The number of ESCs supported. Current (Q2/2013) we support 8 ESCs
uint64 timestamp # [us] Time since system start
uint8 CONNECTED_ESC_MAX = 12 # The number of ESCs supported (Motor1-Motor12)
uint8 ESC_CONNECTION_TYPE_PPM = 0 # Traditional PPM ESC
uint8 ESC_CONNECTION_TYPE_SERIAL = 1 # Serial Bus connected ESC
uint8 ESC_CONNECTION_TYPE_ONESHOT = 2 # One Shot PPM
uint8 ESC_CONNECTION_TYPE_I2C = 3 # I2C
uint8 ESC_CONNECTION_TYPE_CAN = 4 # CAN-Bus
uint8 ESC_CONNECTION_TYPE_DSHOT = 5 # DShot
uint8 ESC_CONNECTION_TYPE_PPM = 0 # Traditional PPM ESC
uint8 ESC_CONNECTION_TYPE_SERIAL = 1 # Serial Bus connected ESC
uint8 ESC_CONNECTION_TYPE_ONESHOT = 2 # One Shot PPM
uint8 ESC_CONNECTION_TYPE_I2C = 3 # I2C
uint8 ESC_CONNECTION_TYPE_CAN = 4 # CAN-Bus
uint8 ESC_CONNECTION_TYPE_DSHOT = 5 # DShot
uint16 counter # incremented by the writing thread everytime new data is stored
uint16 counter # [-] Incremented by the writing thread everytime new data is stored
uint8 esc_count # number of connected ESCs
uint8 esc_connectiontype # how ESCs connected to the system
uint8 esc_count # [-] Number of connected ESCs
uint8 esc_connectiontype # [@enum ESC_CONNECTION_TYPE] How ESCs connected to the system
uint8 esc_online_flags # Bitmask indicating which ESC is online/offline
# esc_online_flags bit 0 : Set to 1 if ESC0 is online
# esc_online_flags bit 1 : Set to 1 if ESC1 is online
# esc_online_flags bit 2 : Set to 1 if ESC2 is online
# esc_online_flags bit 3 : Set to 1 if ESC3 is online
# esc_online_flags bit 4 : Set to 1 if ESC4 is online
# esc_online_flags bit 5 : Set to 1 if ESC5 is online
# esc_online_flags bit 6 : Set to 1 if ESC6 is online
# esc_online_flags bit 7 : Set to 1 if ESC7 is online
uint16 esc_online_flags # Bitmask indicating which ESC is online/offline (in motor order)
# esc_online_flags bit 0 : Set to 1 if Motor1 is online
# esc_online_flags bit 1 : Set to 1 if Motor2 is online
# esc_online_flags bit 2 : Set to 1 if Motor3 is online
# esc_online_flags bit 3 : Set to 1 if Motor4 is online
# esc_online_flags bit 4 : Set to 1 if Motor5 is online
# esc_online_flags bit 5 : Set to 1 if Motor6 is online
# esc_online_flags bit 6 : Set to 1 if Motor7 is online
# esc_online_flags bit 7 : Set to 1 if Motor8 is online
# esc_online_flags bit 8 : Set to 1 if Motor9 is online
# esc_online_flags bit 9 : Set to 1 if Motor10 is online
# esc_online_flags bit 10: Set to 1 if Motor11 is online
# esc_online_flags bit 11: Set to 1 if Motor12 is online
uint8 esc_armed_flags # Bitmask indicating which ESC is armed. For ESC's where the arming state is not known (returned by the ESC), the arming bits should always be set.
uint16 esc_armed_flags # [-] Bitmask indicating which ESC is armed (in motor order)
EscReport[8] esc
EscReport[12] esc
+4
View File
@@ -87,4 +87,8 @@ uint8 RTCM_MSG_USED_NOT_USED = 1
uint8 RTCM_MSG_USED_USED = 2
uint8 rtcm_msg_used # Indicates if the RTCM message was used successfully by the receiver
float32 antenna_offset_x # [m] [@frame body frame FRD] X Position of GNSS antenna
float32 antenna_offset_y # [m] [@frame body frame FRD] Y Position of GNSS antenna
float32 antenna_offset_z # [m] [@frame body frame FRD] Z Position of GNSS antenna
# TOPICS sensor_gps vehicle_gps_position
+15
View File
@@ -80,6 +80,7 @@ uint16 VEHICLE_CMD_GIMBAL_DEVICE_INFORMATION = 283 # Command to ask information
uint16 VEHICLE_CMD_MISSION_START = 300 # Start running a mission. |first_item: the first mission item to run|last_item: the last mission item to run (after this item is run, the mission ends)|
uint16 VEHICLE_CMD_ACTUATOR_TEST = 310 # Actuator testing command. |[@range -1,1] value|[s] timeout|Unused|Unused|output function|
uint16 VEHICLE_CMD_CONFIGURE_ACTUATOR = 311 # Actuator configuration command. |configuration|Unused|Unused|Unused|output function|
uint16 VEHICLE_CMD_ESC_REQUEST_EEPROM = 312 # Request EEPROM data from an ESC. |ESC Index|Firmware Type|Unused|Unused|Unused|
uint16 VEHICLE_CMD_COMPONENT_ARM_DISARM = 400 # Arms / Disarms a component. |1 to arm, 0 to disarm.
uint16 VEHICLE_CMD_RUN_PREARM_CHECKS = 401 # Instructs a target system to run pre-arm checks.
uint16 VEHICLE_CMD_INJECT_FAILURE = 420 # Inject artificial failure for testing purposes.
@@ -129,6 +130,13 @@ uint8 VEHICLE_ROI_LOCATION = 3 # Point toward fixed location.
uint8 VEHICLE_ROI_TARGET = 4 # Point toward target.
uint8 VEHICLE_ROI_ENUM_END = 5
uint8 ACTUATOR_CONFIGURATION_NONE = 0 # Do nothing.
uint8 ACTUATOR_CONFIGURATION_BEEP = 1 # Command the actuator to beep now.
uint8 ACTUATOR_CONFIGURATION_3D_MODE_ON = 2 # Permanently set the actuator (ESC) to 3D mode (reversible thrust).
uint8 ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3 # Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust).
uint8 ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4 # Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise).
uint8 ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5 # Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1).
uint8 PARACHUTE_ACTION_DISABLE = 0
uint8 PARACHUTE_ACTION_ENABLE = 1
uint8 PARACHUTE_ACTION_RELEASE = 2
@@ -172,6 +180,13 @@ uint8 ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3
uint8 ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4
uint8 ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5
# Used as param1&2 in CMD_START_RX_PAIR.
uint8 RC_TYPE_SPEKTRUM = 0
uint8 RC_TYPE_CRSF = 1
uint8 RC_SUB_TYPE_SPEKTRUM_DSM2 = 0
uint8 RC_SUB_TYPE_SPEKTRUM_DSMX = 1
uint8 RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2
# Used as param1 in ARM_DISARM command.
int8 ARMING_ACTION_DISARM = 0
int8 ARMING_ACTION_ARM = 1
+5
View File
@@ -92,6 +92,11 @@ public:
// copy assignment
Subscription &operator=(const Subscription &other)
{
// Check for self-assignment
if (this == &other) {
return *this;
}
unsubscribe();
_orb_id = other._orb_id;
_instance = other._instance;
+38 -21
View File
@@ -63,8 +63,6 @@ static const uint32_t gcr_decode[32] = {
0x0, 0x0, 0x8, 0x1, 0x0, 0x4, 0xC, 0x0
};
uint32_t erpms[DSHOT_TIMERS];
typedef enum {
DSHOT_START = 0,
DSHOT_12BIT_FIFO,
@@ -321,8 +319,10 @@ static int flexio_irq_handler(int irq, void *context, void *arg)
}
int up_dshot_init(uint32_t channel_mask, unsigned dshot_pwm_freq, bool enable_bidirectional_dshot)
int up_dshot_init(uint32_t channel_mask, uint32_t bdshot_channel_mask, unsigned dshot_pwm_freq, bool edt_enable)
{
(void)edt_enable; // Not implemented
/* Calculate dshot timings based on dshot_pwm_freq */
dshot_tcmp = 0x2F00 | (((BOARD_FLEXIO_PREQ / (dshot_pwm_freq * 3) / 2) - 1) & 0xFF);
dshot_speed = dshot_pwm_freq;
@@ -360,7 +360,7 @@ int up_dshot_init(uint32_t channel_mask, unsigned dshot_pwm_freq, bool enable_bi
imxrt_config_gpio(timer_io_channels[channel].dshot.pinmux | IOMUX_PULL_UP);
if (enable_bidirectional_dshot) {
if (bdshot_channel_mask & (1 << channel)) {
dshot_inst[channel].bdshot = true;
dshot_inst[channel].bdshot_training_mask = 0;
dshot_inst[channel].bdshot_tcmp_offset = BDSHOT_TCMP_MIN_OFFSET;
@@ -383,7 +383,7 @@ int up_dshot_init(uint32_t channel_mask, unsigned dshot_pwm_freq, bool enable_bi
flexio_modifyreg32(IMXRT_FLEXIO_CTRL_OFFSET, 0,
FLEXIO_CTRL_FLEXEN_MASK);
return channel_mask;
return dshot_mask;
}
void up_bdshot_training(uint32_t channel, uint32_t value)
@@ -497,24 +497,26 @@ void up_bdshot_erpm(void)
}
int up_bdshot_num_erpm_ready(void)
uint16_t up_bdshot_get_ready_mask(void)
{
int num_ready = 0;
for (unsigned i = 0; i < DSHOT_TIMERS; ++i) {
// We only check that data has been received, rather than if it's valid.
// This ensures data is published even if one channel has bit errors.
if (bdshot_parsed_recv_mask & (1 << i)) {
++num_ready;
}
}
return num_ready;
return (uint16_t)bdshot_parsed_recv_mask;
}
int up_bdshot_num_errors(uint8_t channel)
{
if (channel >= DSHOT_TIMERS) {
return 0;
}
return dshot_inst[channel].crc_error_cnt + dshot_inst[channel].frame_error_cnt + dshot_inst[channel].no_response_cnt;
}
int up_bdshot_get_erpm(uint8_t channel, int *erpm)
{
if (channel >= DSHOT_TIMERS) {
return -1;
}
if (bdshot_parsed_recv_mask & (1 << channel)) {
*erpm = (int)dshot_inst[channel].erpm;
return 0;
@@ -523,13 +525,28 @@ int up_bdshot_get_erpm(uint8_t channel, int *erpm)
return -1;
}
int up_bdshot_channel_status(uint8_t channel)
int up_bdshot_get_extended_telemetry(uint8_t channel, int type, uint8_t *value)
{
// NOT IMPLEMENTED
return -1;
}
int up_bdshot_channel_capture_supported(uint8_t channel)
{
if (channel >= DSHOT_TIMERS) {
return 0;
}
return dshot_inst[channel].init && dshot_inst[channel].bdshot;
}
int up_bdshot_channel_online(uint8_t channel)
{
if (channel < DSHOT_TIMERS) {
return ((dshot_inst[channel].no_response_cnt - dshot_inst[channel].last_no_response_cnt) < BDSHOT_OFFLINE_COUNT);
}
return -1;
return 0;
}
void up_bdshot_status(void)
@@ -538,7 +555,7 @@ void up_bdshot_status(void)
for (uint8_t channel = 0; (channel < DSHOT_TIMERS); channel++) {
if (dshot_inst[channel].init) {
PX4_INFO("Channel %i %s Last erpm %i value", channel, up_bdshot_channel_status(channel) ? "online" : "offline",
PX4_INFO("Channel %i %s Last erpm %i value", channel, up_bdshot_channel_online(channel) ? "online" : "offline",
dshot_inst[channel].erpm);
PX4_INFO("BDSHOT Training done: %s TCMP offset: %d", dshot_inst[channel].bdshot_training_done ? "YES" : "NO",
dshot_inst[channel].bdshot_tcmp_offset);
@@ -601,7 +618,7 @@ uint64_t dshot_expand_data(uint16_t packet)
* bit 12 - dshot telemetry enable/disable
* bits 13-16 - XOR checksum
**/
void dshot_motor_data_set(unsigned channel, uint16_t throttle, bool telemetry)
void dshot_motor_data_set(uint8_t channel, uint16_t throttle, bool telemetry)
{
if (channel < DSHOT_TIMERS && dshot_inst[channel].init) {
uint16_t csum_data;
File diff suppressed because it is too large Load Diff
@@ -183,11 +183,11 @@ void VertiqIo::parameters_update()
}
}
void VertiqIo::OutputControls(uint16_t outputs[MAX_ACTUATORS])
void VertiqIo::OutputControls(float outputs[MAX_ACTUATORS])
{
//Put the mixer outputs into the output message
for (uint8_t i = 0; i < _transmission_message.num_cvs; i++) {
_transmission_message.commands[i] = outputs[i];
_transmission_message.commands[i] = static_cast<uint16_t>(lroundf(outputs[i]));
}
_operational_ifci.PackageIfciCommandsForTransmission(&_transmission_message, _output_message, &_output_len);
@@ -195,8 +195,7 @@ void VertiqIo::OutputControls(uint16_t outputs[MAX_ACTUATORS])
_serial_interface.ProcessSerialTx();
}
bool VertiqIo::updateOutputs(uint16_t outputs[MAX_ACTUATORS], unsigned num_outputs,
unsigned num_control_groups_updated)
bool VertiqIo::updateOutputs(float outputs[MAX_ACTUATORS], unsigned num_outputs, unsigned num_control_groups_updated)
{
#ifdef CONFIG_USE_IFCI_CONFIGURATION
@@ -94,14 +94,13 @@ public:
void print_info();
/** @see OutputModuleInterface */
bool updateOutputs(uint16_t outputs[MAX_ACTUATORS],
unsigned num_outputs, unsigned num_control_groups_updated) override;
bool updateOutputs(float outputs[MAX_ACTUATORS], unsigned num_outputs, unsigned num_control_groups_updated) override;
/**
* @brief Used to package and transmit controls via IQUART
* @param outputs The output throttles calculated by the mixer
*/
void OutputControls(uint16_t outputs[MAX_ACTUATORS]);
void OutputControls(float outputs[MAX_ACTUATORS]);
private:
@@ -83,7 +83,6 @@ void VertiqTelemetryManager::StartPublishing(uORB::Publication<esc_status_s> *es
_esc_status.esc[i].esc_address = 0;
_esc_status.esc[i].esc_rpm = 0;
_esc_status.esc[i].esc_state = 0;
_esc_status.esc[i].esc_cmdcount = 0;
_esc_status.esc[i].esc_voltage = 0;
_esc_status.esc[i].esc_current = 0;
_esc_status.esc[i].esc_temperature = 0;
@@ -124,7 +123,6 @@ uint16_t VertiqTelemetryManager::UpdateTelemetry()
_esc_status.esc[_current_module_id_target_index].esc_temperature = telem_response.mcu_temp *
0.01; //"If you ask other escs for their temp, they're giving you the micro temp, so go with that"
_esc_status.esc[_current_module_id_target_index].esc_state = 0; //not implemented
_esc_status.esc[_current_module_id_target_index].esc_cmdcount = 0; //not implemented
_esc_status.esc[_current_module_id_target_index].failures = 0; //not implemented
//Update the overall _esc_status timestamp and our counter
+18 -14
View File
@@ -66,7 +66,6 @@ VoxlEsc::VoxlEsc() :
_esc_status.esc[i].esc_address = 0;
_esc_status.esc[i].esc_rpm = 0;
_esc_status.esc[i].esc_state = 0;
_esc_status.esc[i].esc_cmdcount = 0;
_esc_status.esc[i].esc_voltage = 0;
_esc_status.esc[i].esc_current = 0;
_esc_status.esc[i].esc_temperature = 0;
@@ -526,7 +525,6 @@ int VoxlEsc::parse_response(uint8_t *buf, uint8_t len, bool print_feedback)
_esc_status.esc[id].esc_rpm = fb.rpm;
_esc_status.esc[id].esc_power = fb.power;
_esc_status.esc[id].esc_state = fb.id_state & 0x0F;
_esc_status.esc[id].esc_cmdcount = fb.cmd_counter;
_esc_status.esc[id].esc_voltage = _esc_chans[id].voltage;
_esc_status.esc[id].esc_current = _esc_chans[id].current;
_esc_status.esc[id].failures = 0; //not implemented
@@ -563,11 +561,11 @@ int VoxlEsc::parse_response(uint8_t *buf, uint8_t len, bool print_feedback)
//print ESC status just for debugging
/*
PX4_INFO("[%lld] ID=%d, ADDR %d, STATE=%d, RPM=%5d, PWR=%3d%%, V=%.2fdV, I=%.2fA, T=%+3dC, CNT %d, FAIL %d",
PX4_INFO("[%lld] ID=%d, ADDR %d, STATE=%d, RPM=%5d, PWR=%3d%%, V=%.2fdV, I=%.2fA, T=%+3dC, FAIL %d",
_esc_status.esc[id].timestamp, id, _esc_status.esc[id].esc_address,
_esc_status.esc[id].esc_state, _esc_status.esc[id].esc_rpm, _esc_status.esc[id].esc_power,
(double)_esc_status.esc[id].esc_voltage, (double)_esc_status.esc[id].esc_current, _esc_status.esc[id].esc_temperature,
_esc_status.esc[id].esc_cmdcount, _esc_status.esc[id].failures);
_esc_status.esc[id].failures);
*/
}
}
@@ -957,7 +955,7 @@ int VoxlEsc::update_params()
return ret;
}
void VoxlEsc::update_leds(vehicle_control_mode_s mode, led_control_s control)
void VoxlEsc::update_leds(const vehicle_control_mode_s &mode, const led_control_s &control)
{
int i = 0;
uint8_t led_mask = _led_rsc.led_mask;
@@ -1237,8 +1235,7 @@ void VoxlEsc::mix_turtle_mode(uint16_t outputs[MAX_ACTUATORS])
}
/* OutputModuleInterface */
bool VoxlEsc::updateOutputs(uint16_t outputs[MAX_ACTUATORS],
unsigned num_outputs, unsigned num_control_groups_updated)
bool VoxlEsc::updateOutputs(float outputs[MAX_ACTUATORS], unsigned num_outputs, unsigned num_control_groups_updated)
{
//in Run() we call _mixing_output.update(), which calls MixingOutput::limitAndUpdateOutputs which calls _interface.updateOutputs (this function)
//So, if Run() is blocked by a custom command, this function will not be called until Run is running again
@@ -1247,9 +1244,16 @@ bool VoxlEsc::updateOutputs(uint16_t outputs[MAX_ACTUATORS],
return false;
}
// Convert float outputs to uint16_t hardware values
uint16_t hw_outputs[VOXL_ESC_OUTPUT_CHANNELS] {};
for (int i = 0; i < VOXL_ESC_OUTPUT_CHANNELS; i++) {
hw_outputs[i] = static_cast<uint16_t>(lroundf(outputs[i]));
}
// don't use mixed values... recompute now.
if (_turtle_mode_en) {
mix_turtle_mode(outputs);
mix_turtle_mode(hw_outputs);
}
for (int i = 0; i < VOXL_ESC_OUTPUT_CHANNELS; i++) {
@@ -1259,24 +1263,24 @@ bool VoxlEsc::updateOutputs(uint16_t outputs[MAX_ACTUATORS],
} else {
if ((_turtle_mode_en) || (_parameters.cmd_type == VOXL_ESC_RPM_CMDS)) {
if (_extended_rpm) {
if (outputs[i] > VOXL_ESC_RPM_MAX_EXT) { outputs[i] = VOXL_ESC_RPM_MAX_EXT; }
if (hw_outputs[i] > VOXL_ESC_RPM_MAX_EXT) { hw_outputs[i] = VOXL_ESC_RPM_MAX_EXT; }
} else {
if (outputs[i] > VOXL_ESC_RPM_MAX) { outputs[i] = VOXL_ESC_RPM_MAX; }
if (hw_outputs[i] > VOXL_ESC_RPM_MAX) { hw_outputs[i] = VOXL_ESC_RPM_MAX; }
}
} else if (_parameters.cmd_type == VOXL_ESC_PWM_CMDS) {
if (outputs[i] > VOXL_ESC_PWM_MAX) { outputs[i] = VOXL_ESC_PWM_MAX; }
if (hw_outputs[i] > VOXL_ESC_PWM_MAX) { hw_outputs[i] = VOXL_ESC_PWM_MAX; }
else if (outputs[i] < _min_active_pwm) { outputs[i] = _min_active_pwm; }
else if (hw_outputs[i] < _min_active_pwm) { hw_outputs[i] = _min_active_pwm; }
}
if (!_turtle_mode_en) {
_esc_chans[i].rate_req = outputs[i] * _output_map[i].direction;
_esc_chans[i].rate_req = hw_outputs[i] * _output_map[i].direction;
} else {
// mapping updated in mixTurtleMode, no remap needed here, but reverse direction
_esc_chans[i].rate_req = outputs[i] * _output_map[i].direction * (-1);
_esc_chans[i].rate_req = hw_outputs[i] * _output_map[i].direction * (-1);
}
}
}
+2 -3
View File
@@ -83,8 +83,7 @@ public:
void print_params();
/** @see OutputModuleInterface */
bool updateOutputs(uint16_t outputs[MAX_ACTUATORS],
unsigned num_outputs, unsigned num_control_groups_updated) override;
bool updateOutputs(float outputs[MAX_ACTUATORS], unsigned num_outputs, unsigned num_control_groups_updated) override;
virtual int init();
int device_init(); // function where uart port is opened and ESC queried
@@ -272,7 +271,7 @@ private:
bool _device_initialized{false};
void update_leds(vehicle_control_mode_s mode, led_control_s control);
void update_leds(const vehicle_control_mode_s &mode, const led_control_s &control);
int read_response(Command *out_cmd);
int parse_response(uint8_t *buf, uint8_t len, bool print_feedback);
+3 -3
View File
@@ -169,7 +169,7 @@ public:
{
}
void update_outputs(uint16_t outputs[MAX_ACTUATORS], unsigned num_outputs)
void update_outputs(float outputs[MAX_ACTUATORS], unsigned num_outputs)
{
if (_port_id == 0 || _port_id == CANARD_PORT_ID_UNSET) {
return;
@@ -178,7 +178,7 @@ public:
uint8_t max_num_outputs = MAX_ACTUATORS > num_outputs ? num_outputs : MAX_ACTUATORS;
for (int8_t i = max_num_outputs - 1; i >= _max_number_of_nonzero_outputs; i--) {
if (outputs[i] != 0) {
if (fabsf(outputs[i]) > FLT_EPSILON) {
_max_number_of_nonzero_outputs = i + 1;
break;
}
@@ -187,7 +187,7 @@ public:
uint16_t payload_buffer[reg_udral_service_actuator_common_sp_Vector31_0_1_value_ARRAY_CAPACITY_];
for (uint8_t i = 0; i < _max_number_of_nonzero_outputs; i++) {
payload_buffer[i] = nunavutFloat16Pack(outputs[i] / 8192.0);
payload_buffer[i] = nunavutFloat16Pack(outputs[i] / 8192.f); // Output is float16 so this would benefit rescaling to e.g. [-1,1]
}
const CanardTransferMetadata transfer_metadata = {
+1 -2
View File
@@ -435,8 +435,7 @@ void CyphalNode::sendPortList()
_uavcan_node_port_List_last = now;
}
bool UavcanMixingInterface::updateOutputs(uint16_t outputs[MAX_ACTUATORS], unsigned num_outputs,
unsigned num_control_groups_updated)
bool UavcanMixingInterface::updateOutputs(float outputs[MAX_ACTUATORS], unsigned num_outputs, unsigned num_control_groups_updated)
{
// Note: This gets called from MixingOutput from within its update() function
// Hence, the mutex lock in UavcanMixingInterface::Run() is in effect

Some files were not shown because too many files have changed in this diff Show More