Compare commits

...

59 Commits

Author SHA1 Message Date
RomanBapst 81982eb829 battery: re-introduced check of LITHIUM_BATTERY_RECOGNITION_VOLTAGE
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2024-09-24 10:15:19 +03:00
RomanBapst c4d2ec2654 battery: cleanup setter functions and added hysteresis for connected state
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2024-09-24 10:02:09 +03:00
RomanBapst 3fdd054566 hysteresis: added get_last_time_to_change_state method
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2024-09-24 10:02:09 +03:00
Matthias Grob f60bb2c6bc rtl_direct: skip loiter altitude items for multicopter without RTL land delay (#23689)
This was already done before the refactor and was assumed to not be necessary.
The problem is that these mission items result in a strang looking vertical slow down directly followed
by an acceleration during the landing phase.
2024-09-23 18:33:03 +02:00
Ramon Roche e0f8642d26 ci: try upload-artifacts@v3 2024-09-23 12:21:29 -04:00
Marco Hauswirth 8afd267509 move more ekf function implementations to cpp 2024-09-23 12:18:41 -04:00
Marco Hauswirth e3f138862a move implementation of updateAidSrcStatus to cpp file, saves flash 2024-09-23 12:18:41 -04:00
Andrew Brahim b41811b145 SF45 fixes to restart the state machine if sensor does not init correctly (#23565)
* fixes to restart the state machine if sensor does not init correctly

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* fixes

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* increase fail count

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* remove extra flush, switch from warn to debug, add enum states for sensor bring-up

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

* remove dead code, decrease restart fail count metric, break out of loop with consec errors if over the fail count and not init

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>

---------

Signed-off-by: dirksavage88 <dirksavage88@gmail.com>
2024-09-23 16:35:35 +02:00
bresch 15ddd94349 ekf2: move implementation to ekf_helper to reduce flash usage
saves about 4.8kB of flash on FMUv5
2024-09-23 10:27:42 -04:00
Konrad c20c1f09a6 RTL_DIRECT: explicitely set force heading in loiter hold if needed 2024-09-23 11:02:02 +02:00
Konrad 02e50bb5dc rtl_direct: loiter hold should track altitude as best effort but not enforce it 2024-09-23 11:02:02 +02:00
Silvan Fuhrer cacbfcecd8 aiframes: remove setting of CBRK_IO_SAFETY to enabeld, as that's already the param default (#23702)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-09-23 09:10:02 +02:00
Alexander Lerach dff775a0a7 Implemented AUAV absolute/differential pressure sensor support (#23656)
* Added AUAV absolute pressure sensing

* Moved func to abstract base class

* Probe and params

* Fixed arg parsing and added auto start

* refactorings

* Added sample perf

* Fixed CI findings

* Simplified rc.sensors condition
2024-09-20 16:40:45 +02:00
Stefano Colli b1c2cf7c88 GZ Advanced Plane: improved rate/TECS tuning (#23700)
* GZ_Advanced_Plane: Improve rate tuning

* GZ_Advanced_Plane: Remove unnecessary default params

* GZ_Advanced_Plane: Improve tecs tuning
2024-09-20 16:15:57 +02:00
caijie 11d370823b NuttX with mtd:ramtron MB85RS256B address length is 2 backport 2024-09-20 06:16:34 -04:00
Alvaro Fernandez 2ecffff700 fw_tecs: Support tighter altitude tracking during low-height flight (#23519)
* fw_tecs: Support tighter altitude tracking during low-height flight. Added FW_T_THR_LOW_HGT defining low-height flight threshold

* tecs: Applied smoothed-out altitude TC transition to landings

* fw_tecs: modified tighter altitude control for low-height implementation

* addressed PR comments

* addressed PR comments

---------

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
2024-09-19 16:24:53 +03:00
BazookaJoe1900 4d83badba1 fix files tags on the header comments (#23564) 2024-09-19 09:25:18 +03:00
Connor Walker d01a3d8f04 Fix duplicate entry in gz_worlds list (#23691) 2024-09-18 16:36:48 -08:00
Daniel Agar e4dd3f2871 boards/px4/fmu-v5: stackcheck remove FW modules (flash overflow) 2024-09-18 11:34:48 -04:00
Matthias Grob 555b2e6abc BatteryStatus: Clarify "incompatible voltage" error message 2024-09-18 17:18:02 +02:00
Claudio Chies ab41927bbd SIM: GZ: Added mono_cam_down and aruco world (#23687) 2024-09-18 15:16:27 +02:00
Claudio Chies 5d2e7c8748 Misc: Matrix: Added Addition and Subtraction to Slices (#23679)
* Added Addition and Subtraction to Slices

* MatrixSliceTest: refactor Addition/Substraction checks

* Slice: replace operations returning a Matrix with calling the existing Matrix function

---------

Co-authored-by: Matthias Grob <maetugr@gmail.com>
2024-09-18 11:17:37 +02:00
Marco Hauswirth 4a99a51fb1 update upload-artifact v2->v4 2024-09-17 10:55:00 -07:00
chfriedrich98 8aece9bff2 differential: fix CI issue 2024-09-17 09:34:51 -07:00
chfriedrich98 2fd4150b38 differential: Add stabilized and position mode (#23669)
* differential: add position and stabilized mode

* differential: add hardcoded stick input deadzones
2024-09-16 12:09:51 +02:00
chfriedrich98 81747f35bb rover: add descend navigation state to land detection 2024-09-16 09:36:38 +02:00
Silvan Fuhrer 1c9c5e51c2 boards: cuav x7pro: remove build of ROVER and Q_ATTITUDE_ESTIMATOR to save flash
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-09-16 09:11:23 +02:00
Konrad 82a7d0410c DistanceSensorModeChangeRequest: renaming of variable 2024-09-16 09:11:23 +02:00
Konrad aab2390e51 navigator: publish distance sensor mode change request when in RTL landing phase or during mission landing 2024-09-16 09:11:23 +02:00
Konrad 1755b8304e RTL direct: Make sure the _rtl_state captures the current status and not the next one 2024-09-16 09:11:23 +02:00
Konrad e6f07bde2a lightware_laser: add option to listen to system to enable/disable distance sensor 2024-09-16 09:11:23 +02:00
Silvan Fuhrer 9ca0630376 airframes: SIH_tailsitter: add SENS_DPRES_OFF to bypass airspeed cal
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-09-13 15:53:52 +03:00
RomanBapst 11440cfb45 added some default parameteter that allow the transition to complete
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2024-09-13 15:53:52 +03:00
RomanBapst 878c8bfcce SIH: fix airspeed for tailsitter
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2024-09-13 15:53:52 +03:00
Konrad 4713a6737e TECS: ramp up fast descend over 2_s to ramp down the throttle command 2024-09-13 14:04:39 +02:00
Konrad 585c92796d mission_base: do not make terrain avoidance check when mission is not run anymore 2024-09-13 13:59:24 +02:00
Claudio Chies 4ba4b340cc Reduce the orbit jerk by using a slew rate 2024-09-13 10:28:42 +02:00
Marco Hauswirth 22c2878cf8 send acknowledgement after receiving vehicle wind cmd 2024-09-12 09:34:08 +02:00
chfriedrich98 741ea6b707 differential: add individual parameters for speed and yaw rate feedforward 2024-09-11 13:57:27 +02:00
chfriedrich98 5d8a107925 differential: fix closed loop control
removed thresholds for closed loop setpoints and added minimum thresholds for yaw rate and speed measurements instead to avoid moving due to measurement noise
2024-09-11 13:57:27 +02:00
Roman Bapst c94c1ce4d2 Navigator: Support straight line mission landings (#23576)
* introduced altitude acceptance radius in position setpoint for fixed
wing guidance
- allows navigator to explicitly set the altitude acceptance radius
- needed for staright line landing support

* added ignore_alt_acceptance to position setpoint message to allow guidance
logic to ignore altitude error on waypoint
- can be useful to prevent loitering at a waypoint within a mission landing sequence

* only set altitude acceptance radius to infinity for a waypoint inside a mission landing
for fixed wing vehicles

* navigator: return altitude acceptance radius from triplet if it's valid

* FixedWingPositionControl: check if alt acceptance radius provided in position setpoint
is larger 0

---------

Signed-off-by: RomanBapst <bapstroman@gmail.com>
Co-authored-by: Alvaro Fernandez <alvaro@auterion.com>
2024-09-10 17:44:24 +02:00
Mathieu Bresciani 03aec2e188 HeadingSmoothing: fix angle wrapping and add unit tests
Co-authored-by: Matthias Grob <maetugr@gmail.com>
2024-09-10 15:06:19 +02:00
jmackay2 a5729da4e9 Simplify gz bridge CMakeLists and add GZ Ionic (#23657)
Co-authored-by: jmackay2 <jmackay2@gmail.com>
2024-09-10 11:53:00 +02:00
bresch 15e9c65a8f dist-sensor: reduce enum names 2024-09-09 15:40:40 +02:00
bresch 8bca467c15 dist-sensor: use enum instead of integer 2024-09-09 15:40:40 +02:00
chfriedrich98 bb0210ecd7 rover: add rtl as a landed condition for rovers (#23646)
The RTL sequence from the navigator requires the vehicle to land. This is now handled for rovers by setting its state to landed if it is within the acceptance radius of the home position when in return mode.
2024-09-06 17:21:49 +02:00
Hubert 67ee4817ae Makefile add micoair h743 bootloader 2024-09-06 11:14:30 -04:00
Hubert 232f699a7f cmake-variants.yaml add micoair h743 2024-09-06 11:14:30 -04:00
Hubert c2bd3900be Jenkins: compile add micoair h743 2024-09-06 11:14:30 -04:00
Marco Hauswirth 44967bdaab ekf2: uncorrelate position covariance after velocity reset (#23644) 2024-09-06 08:51:15 -04:00
RomanBapst 1337fca4d0 vtol backtransition: removed downscaling of fw controls during the backtransition
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2024-09-06 13:55:48 +03:00
Alexander Lerach 3d36c8519d drivers/power_monitor: Implement temperature sensor support for INA228 / INA238 2024-09-05 23:09:01 -04:00
Matthias Grob f98eb067be logger params: clarify AUX1 logging trigger 2024-09-05 18:06:29 +02:00
Matthias Grob e4d25df58a Consistently use "stick gesture" for "rc stick gesture" 2024-09-05 18:06:29 +02:00
Silvan Fuhrer 8eaf93468e Commander: feedback string for arming/disarming: make clear when from gesture
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-09-05 18:06:29 +02:00
Silvan Fuhrer d967cdbb48 Manual control: rename SOURCE_RC_STICK_GESTURE to SOURCE_MANUAL_CONTROL_GESTURE
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-09-05 18:06:29 +02:00
Silvan Fuhrer 556a302a09 Logger: replace RC keyword by 'manual control'
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-09-05 18:06:29 +02:00
Silvan Fuhrer f7c35291ee Rover Differential: remove RC keyword from params
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-09-05 18:06:29 +02:00
Silvan Fuhrer 81cf6a736d Commander: add VEHICLE_CMD_EXTERNAL_POSITION_ESTIMATE to list of externaly handled commands (#23642)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2024-09-05 11:20:39 +02:00
432 changed files with 3447 additions and 1639 deletions
+1
View File
@@ -77,6 +77,7 @@ pipeline {
"matek_h743-mini_default",
"matek_h743-slim_default",
"matek_h743_default",
"micoair_h743_default",
"modalai_fc-v1_default",
"modalai_fc-v2_default",
"mro_ctrl-zero-classic_default",
+4 -4
View File
@@ -88,7 +88,7 @@ jobs:
run: gdb build/px4_sitl_default/bin/px4 px4.core -ex "thread apply all bt" -ex "quit"
- name: Upload px4 coredump
if: failure()
uses: actions/upload-artifact@v2-preview
uses: actions/upload-artifact@v3
with:
name: coredump
path: px4.core
@@ -103,21 +103,21 @@ jobs:
- name: Upload px4 binary
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: binary
path: build/px4_sitl_default/bin/px4
- name: Store PX4 log
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: px4_log
path: ~/.ros/log/*/*.ulg
- name: Store ROS log
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ros_log
path: ~/.ros/**/rostest-*.log
+4 -4
View File
@@ -83,7 +83,7 @@ jobs:
run: gdb build/px4_sitl_default/bin/px4 px4.core -ex "thread apply all bt" -ex "quit"
- name: Upload px4 coredump
if: failure()
uses: actions/upload-artifact@v2-preview
uses: actions/upload-artifact@v3
with:
name: coredump
path: px4.core
@@ -98,21 +98,21 @@ jobs:
- name: Upload px4 binary
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: binary
path: build/px4_sitl_default/bin/px4
- name: Store PX4 log
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: px4_log
path: ~/.ros/log/*/*.ulg
- name: Store ROS log
if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ros_log
path: ~/.ros/**/rostest-*.log
+5
View File
@@ -286,6 +286,11 @@ CONFIG:
buildType: MiniSizeRel
settings:
CONFIG: matek_gnss-m9n-f4_default
micoair_h743_default:
short: micoair_h743
buildType: MinSizeRel
settings:
CONFIG: micoair_h743_default
modalai_fc-v1_default:
short: modalai_fc-v1
buildType: MinSizeRel
+1
View File
@@ -340,6 +340,7 @@ bootloaders_update: \
matek_h743_bootloader \
matek_h743-mini_bootloader \
matek_h743-slim_bootloader \
micoair_h743_bootloader \
modalai_fc-v2_bootloader \
mro_ctrl-zero-classic_bootloader \
mro_ctrl-zero-h7_bootloader \
@@ -19,8 +19,6 @@ param set-default SENS_EN_MAGSIM 1
# disable some checks to allow to fly:
# - without real battery
param set-default CBRK_SUPPLY_CHK 894281
# - without safety switch
param set-default CBRK_IO_SAFETY 22027
# Square quadrotor X PX4 numbering
param set-default CA_ROTOR_COUNT 4
@@ -21,8 +21,6 @@ param set-default SENS_EN_ARSPDSIM 1
param set-default CBRK_USB_CHK 197848
# - without real battery
param set-default CBRK_SUPPLY_CHK 894281
# - without safety switch
param set-default CBRK_IO_SAFETY 22027
param set-default SIH_T_MAX 6
param set-default SIH_MASS 0.3
@@ -30,8 +30,6 @@ param set-default MAV_TYPE 19
# disable some checks to allow to fly:
# - without real battery
param set-default CBRK_SUPPLY_CHK 894281
# - without safety switch
param set-default CBRK_IO_SAFETY 22027
param set-default SIH_T_MAX 2
param set-default SIH_Q_MAX 0.0165
@@ -97,11 +97,6 @@ param set-default IMU_GYRO_CUTOFF 100
# Power Parameters
param set-default BAT1_N_CELLS 4
# param set-default BAT1_A_PER_V 36.364 Not found
# param set-default BAT1_V_DIV 18.182 Not found
# Circuit breakers
param set-default CBRK_IO_SAFETY 22027
param set-default THR_MDL_FAC 0.3
@@ -16,39 +16,36 @@ param set-default SENS_EN_MAGSIM 1
param set-default SENS_EN_ARSPDSIM 1
param set-default FW_LND_ANG 8
param set-default NPFG_PERIOD 12
param set-default FW_MAN_P_MAX 30
param set-default FW_PR_P 0.9
param set-default FW_PR_FF 0.5
param set-default FW_PR_I 0.5
param set-default FW_PR_FF 0.08
param set-default FW_PR_I 0.3
param set-default FW_PR_P 0.08
param set-default FW_RR_FF 0.05
param set-default FW_RR_I 0.2
param set-default FW_RR_P 0.03
param set-default FW_YR_FF 0.3
param set-default FW_YR_I 0.4
param set-default FW_YR_P 0.2
param set-default FW_PSP_OFF 2
param set-default FW_P_LIM_MAX 32
param set-default FW_P_LIM_MIN -15
param set-default FW_RR_FF 0.5
param set-default FW_RR_P 0.3
param set-default FW_RR_I 0.5
param set-default FW_YR_FF 0.5
param set-default FW_YR_P 0.6
param set-default FW_YR_I 0.5
param set-default FW_SPOILERS_LND 0.4
param set-default FW_THR_MIN 0.05
param set-default FW_THR_TRIM 0.25
param set-default FW_THR_MAX 0.6
param set-default FW_T_CLMB_MAX 8
param set-default FW_T_CLMB_R_SP 5
param set-default FW_T_CLMB_MAX 6
param set-default FW_T_SINK_MAX 2.7
param set-default FW_T_SINK_MIN 2.2
param set-default FW_W_EN 1
param set-default MIS_TAKEOFF_ALT 30
param set-default NAV_ACC_RAD 15
param set-default NAV_DLL_ACT 2
param set-default RWTO_TKOFF 1
@@ -56,7 +53,6 @@ param set-default RWTO_TKOFF 1
param set-default CA_AIRFRAME 1
param set-default CA_ROTOR_COUNT 1
param set-default CA_ROTOR0_PX 0.3
param set-default CA_SV_CS_COUNT 6
param set-default CA_SV_CS0_TRQ_R -0.5
@@ -16,11 +16,13 @@ param set-default RD_WHEEL_TRACK 0.3
param set-default RD_MAN_YAW_SCALE 0.1
param set-default RD_MAX_ACCEL 6
param set-default RD_MAX_JERK 30
param set-default RD_MAX_SPEED 7
param set-default RD_YAW_RATE_P 5
param set-default RD_MAX_THR_YAW_R 5
param set-default RD_YAW_RATE_P 0.1
param set-default RD_YAW_RATE_I 0
param set-default RD_YAW_P 5
param set-default RD_YAW_I 0
param set-default RD_MAX_SPEED 5
param set-default RD_MAX_THR_SPD 7
param set-default RD_SPEED_P 1
param set-default RD_SPEED_I 0
param set-default RD_MAX_YAW_RATE 180
@@ -18,8 +18,6 @@ param set UAVCAN_ENABLE 0
# disable some checks to allow to fly
# - without real battery
param set-default CBRK_SUPPLY_CHK 894281
# - without safety switch
param set-default CBRK_IO_SAFETY 22027
# Square quadrotor X PX4 numbering
param set-default CA_ROTOR_COUNT 4
@@ -96,7 +96,5 @@ param set UAVCAN_ENABLE 0
# disable some checks to allow to fly
# - without real battery
param set-default CBRK_SUPPLY_CHK 894281
# - without safety switch
param set-default CBRK_IO_SAFETY 22027
param set-default MAV_TYPE 22
@@ -20,8 +20,6 @@ param set SYS_HITL 2
# disable some checks to allow to fly:
# - without real battery
param set-default CBRK_SUPPLY_CHK 894281
# - without safety switch
param set-default CBRK_IO_SAFETY 22027
param set SIH_VEHICLE_TYPE 0
@@ -41,8 +41,6 @@ param set-default SYS_HITL 2
# disable some checks to allow to fly:
# - without real battery
param set-default CBRK_SUPPLY_CHK 894281
# - without safety switch
param set-default CBRK_IO_SAFETY 22027
param set SIH_T_MAX 6
param set SIH_MASS 0.3
@@ -43,6 +43,10 @@ param set-default CA_SV_CS1_TRQ_P 0.3
param set-default CA_SV_CS1_TRQ_Y -0.3
param set-default CA_SV_CS1_TYPE 6
param set-default FW_AIRSPD_MAX 12
param set-default FW_AIRSPD_MIN 7
param set-default FW_AIRSPD_TRIM 10
param set-default HIL_ACT_FUNC1 101
param set-default HIL_ACT_FUNC2 102
param set-default HIL_ACT_FUNC5 202
@@ -59,8 +63,8 @@ param set-default SYS_HITL 2
# disable some checks to allow to fly:
# - without real battery
param set-default CBRK_SUPPLY_CHK 894281
# - without safety switch
param set-default CBRK_IO_SAFETY 22027
param set-default SENS_DPRES_OFF 0.001
param set SIH_T_MAX 2.0
param set SIH_Q_MAX 0.0165
@@ -75,3 +79,5 @@ param set SIH_L_ROLL 0.145
# sih as tailsitter
param set SIH_VEHICLE_TYPE 2
param set-default VT_ARSP_TRANS 6
@@ -29,7 +29,6 @@ param set-default BAT1_N_CELLS 4
param set-default BAT1_R_INTERNAL 0.0025
param set-default SYS_HAS_NUM_ASPD 0
param set-default CBRK_IO_SAFETY 22027
param set-default EKF2_GPS_POS_X -0.12
param set-default EKF2_IMU_POS_X -0.12
@@ -16,7 +16,6 @@
. ${R}etc/init.d/rc.balloon_defaults
param set-default COM_PREARM_MODE 2 # always in prearm state
param set-default CBRK_IO_SAFETY 22027
param set-default SDLOG_PROFILE 17
param set-default SDLOG_MODE 2
param set-default MAV_0_MODE 1
@@ -16,7 +16,6 @@
. ${R}etc/init.d/rc.airship_defaults
param set-default COM_PREARM_MODE 2
param set-default CBRK_IO_SAFETY 22027
param set-default CA_AIRFRAME 9
@@ -92,9 +92,6 @@ param set-default BAT1_N_CELLS 4
param set-default BAT1_A_PER_V 36.364
param set-default BAT1_V_DIV 18.182
# Circuit breakers
param set-default CBRK_IO_SAFETY 22027
param set-default THR_MDL_FAC 0.3
# Square quadrotor X PX4 numbering
@@ -93,9 +93,6 @@ param set-default BAT1_N_CELLS 4
param set-default BAT1_A_PER_V 36.364
param set-default BAT1_V_DIV 18.182
# Circuit breakers
param set-default CBRK_IO_SAFETY 22027
param set-default THR_MDL_FAC 0.3
# Square quadrotor X PX4 numbering
@@ -25,12 +25,14 @@ param set-default RBCLW_REV 1 # reverse right wheels
param set-default RD_WHEEL_TRACK 0.3
param set-default RD_MAN_YAW_SCALE 1
param set-default RD_MAX_ACCEL 5
param set-default RD_MAX_JERK 50
param set-default RD_MAX_SPEED 2
param set-default RD_MAX_JERK 10
param set-default RD_MAX_THR_YAW_R 4
param set-default RD_YAW_RATE_P 0.1
param set-default RD_YAW_RATE_I 0
param set-default RD_YAW_P 5
param set-default RD_YAW_I 0
param set-default RD_MAX_SPEED 1.8
param set-default RD_MAX_THR_SPD 2
param set-default RD_SPEED_P 0.5
param set-default RD_SPEED_I 0.1
param set-default RD_MAX_YAW_RATE 300
@@ -23,9 +23,6 @@
. ${R}etc/init.d/rc.uuv_defaults
# companion computer is connected via USB permanently
param set-default CBRK_IO_SAFETY 22027
param set-default MAV_1_CONFIG 102
param set-default BAT1_A_PER_V 37.8798
@@ -73,8 +73,6 @@ param set-default SENS_EN_PX4FLOW 1
param set-default SENS_EN_LL40LS 2
param set-default SENS_FLOW_ROT 2
#
param set-default CBRK_IO_SAFETY 22027
param set-default COM_DISARM_LAND 3
# Battery
+7
View File
@@ -184,6 +184,13 @@ then
asp5033 start -X
fi
# AUAV absolute/differential pressure sensor external I2C
if param greater -s SENS_EN_AUAVX 0
then
auav start -D -X
auav start -A -X
fi
# SHT3x temperature and hygrometer sensor, external I2C
if param compare -s SENS_EN_SHT3X 1
then
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file mindpx_can.c
* @file can.c
*
* Board-specific CAN functions.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file mindpx2_init.c
* @file init.c
*
* MINDPX-specific early startup code. This file implements the
* board_app_initialize() function that is called early by nsh during startup.
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file mindpx2_led.c
* @file led.c
*
* PX4FMU LED backend.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file mindpx_usb.c
* @file usb.c
*
* Board-specific USB functions.
*/
+1 -1
View File
@@ -33,7 +33,7 @@
****************************************************************************/
/**
* @file pwr.c
* @file pwr.cpp
*
* Board-specific power button functions.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file init.c
* @file init.cpp
*
* BBBLUE specific initialization
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file crazyflie_init.c
* @file init.c
*
* Crazyflie specific early startup code. This file implements the
* board_app_initialize() function that is called early by nsh during startup.
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file crazyflie_led.c
* @file led.c
*
* Crazyflie LED backend.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file crazyflie_usb.c
* @file usb.c
*
* Board-specific USB functions.
*/
@@ -402,11 +402,12 @@ Syslink::handle_message(syslink_message_t *msg)
float vbat; //, iset;
memcpy(&vbat, &msg->data[1], sizeof(float));
//memcpy(&iset, &msg->data[5], sizeof(float));
_battery.setConnected(true);
_battery.updateVoltage(vbat);
_battery.updateAndPublishBatteryStatus(t);
Battery::InputSample sample{
.timestamp = t,
.voltage_v = vbat,
};
_battery.updateAndPublishBatteryStatus(sample);
// Update battery charge state
if (charging) {
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file crazyflie_init.c
* @file init.c
*
* Crazyflie specific early startup code. This file implements the
* board_app_initialize() function that is called early by nsh during startup.
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file crazyflie_led.c
* @file led.c
*
* Crazyflie LED backend.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file crazyflie_usb.c
* @file usb.c
*
* Board-specific USB functions.
*/
-2
View File
@@ -39,7 +39,6 @@ CONFIG_DRIVERS_TONE_ALARM=y
CONFIG_DRIVERS_UAVCAN=y
CONFIG_BOARD_UAVCAN_TIMER_OVERRIDE=2
CONFIG_MODULES_AIRSPEED_SELECTOR=y
CONFIG_MODULES_ATTITUDE_ESTIMATOR_Q=y
CONFIG_MODULES_BATTERY_STATUS=y
CONFIG_MODULES_CAMERA_FEEDBACK=y
CONFIG_MODULES_COMMANDER=y
@@ -70,7 +69,6 @@ CONFIG_MODULES_MC_POS_CONTROL=y
CONFIG_MODULES_MC_RATE_CONTROL=y
CONFIG_MODULES_NAVIGATOR=y
CONFIG_MODULES_RC_UPDATE=y
CONFIG_MODULES_ROVER_POS_CONTROL=y
CONFIG_MODULES_SENSORS=y
CONFIG_MODULES_SIMULATION_SIMULATOR_SIH=y
CONFIG_MODULES_TEMPERATURE_COMPENSATION=y
@@ -6,7 +6,4 @@
# system_power unavailable
param set-default CBRK_SUPPLY_CHK 894281
# Disable safety switch by default
param set-default CBRK_IO_SAFETY 22027
param set-default SYS_HAS_MAG 0
@@ -9,9 +9,6 @@ param set-default SYS_AUTOSTART 4001
# system_power unavailable
param set-default CBRK_SUPPLY_CHK 894281
# Disable safety switch by default
param set-default CBRK_IO_SAFETY 22027
param set-default EKF2_MAG_TYPE 5
param set-default SENS_BOARD_ROT 6
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_can.c
* @file can.c
*
* Board-specific CAN functions.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu2_led.c
* @file led.c
*
* PX4FMU LED backend.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_usb.c
* @file usb.c
*
* Board-specific USB functions.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_usb.c
* @file usb.c
*
* Board-specific USB functions.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_usb.c
* @file usb.c
*
* Board-specific USB functions.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_usb.c
* @file usb.c
*
* Board-specific USB functions.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_can.c
* @file can.c
*
* Board-specific CAN functions.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu2_led.c
* @file led.c
*
* PX4FMU LED backend.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_usb.c
* @file usb.c
*
* Board-specific USB functions.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_can.c
* @file can.c
*
* Board-specific CAN functions.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu2_led.c
* @file led.c
*
* PX4FMU LED backend.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_usb.c
* @file usb.c
*
* Board-specific USB functions.
*/
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4_simple_app.c
* @file rc_controller.cpp
* Minimal application example for PX4 autopilot
*
* @author Example User <mail@example.com>
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/*
* @file timer_config.c
* @file timer_config.cpp
*
* Configuration data for the kinetis pwm_servo, input capture and pwm input driver.
*
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/*
* @file timer_config.c
* @file timer_config.cpp
*
* Configuration data for the kinetis pwm_servo, input capture and pwm input driver.
*
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/*
* @file timer_config.c
* @file timer_config.cpp
*
* Configuration data for the kinetis pwm_servo, input capture and pwm input driver.
*
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/*
* @file timer_config.c
* @file timer_config.cpp
*
* Configuration data for the S32K1XX pwm_servo, input capture and pwm input driver.
*
@@ -9,7 +9,4 @@ param set-default BAT1_A_PER_V 31
# system_power unavailable
param set-default CBRK_SUPPLY_CHK 894281
# Disable safety switch by default
param set-default CBRK_IO_SAFETY 22027
param set-default SYS_HAS_MAG 0
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_can.c
* @file can.c
*
* Board-specific CAN functions.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_i2c.c
* @file i2c.cpp
*
* Board-specific I2C functions.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu2_init.c
* @file init.c
*
* PX4FMUv2-specific early startup code. This file implements the
* board_app_initialize() function that is called early by nsh during startup.
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu2_led.c
* @file led.c
*
* PX4FMU LED backend.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_usb.c
* @file usb.c
*
* Board-specific USB functions.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_can.c
* @file can.c
*
* Board-specific CAN functions.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_i2c.c
* @file i2c.cpp
*
* Board-specific I2C functions.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu2_init.c
* @file init.c
*
* PX4FMUv2-specific early startup code. This file implements the
* board_app_initialize() function that is called early by nsh during startup.
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu2_led.c
* @file led.c
*
* PX4FMU LED backend.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_usb.c
* @file usb.c
*
* Board-specific USB functions.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_can.c
* @file can.c
*
* Board-specific CAN functions.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_init.c
* @file init.c
*
* PX4FMU-specific early startup code. This file implements the
* board_app_initializ() function that is called early by nsh during startup.
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu2_led.c
* @file led.c
*
* PX4FMU LED backend.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_usb.c
* @file usb.c
*
* Board-specific USB functions.
*/
+8 -1
View File
@@ -22,20 +22,27 @@ CONFIG_DRIVERS_PWM_INPUT=n
CONFIG_DRIVERS_SMART_BATTERY_BATMON=n
CONFIG_DRIVERS_TONE_ALARM=n
CONFIG_DRIVERS_UAVCAN=n
CONFIG_MODULES_AIRSPEED_SELECTOR=n
CONFIG_MODULES_ATTITUDE_ESTIMATOR_Q=n
CONFIG_MODULES_CAMERA_FEEDBACK=n
CONFIG_MODULES_ESC_BATTERY=n
CONFIG_MODULES_EVENTS=n
CONFIG_MODULES_FW_ATT_CONTROL=n
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=n
CONFIG_MODULES_FW_POS_CONTROL=n
CONFIG_MODULES_FW_RATE_CONTROL=n
CONFIG_MODULES_GIMBAL=n
CONFIG_MODULES_GYRO_CALIBRATION=n
CONFIG_MODULES_LANDING_TARGET_ESTIMATOR=n
CONFIG_MODULES_MC_AUTOTUNE_ATTITUDE_CONTROL=n
CONFIG_MODULES_MAG_BIAS_ESTIMATOR=n
CONFIG_MODULES_ROVER_POS_CONTROL=n
CONFIG_MODULES_SIMULATION_SIMULATOR_SIH=n
CONFIG_MODULES_TEMPERATURE_COMPENSATION=n
CONFIG_MODULES_UUV_ATT_CONTROL=n
CONFIG_MODULES_UUV_POS_CONTROL=n
CONFIG_MODULES_VTOL_ATT_CONTROL=n
CONFIG_SYSTEMCMDS_REFLECT=n
CONFIG_BOARD_CONSTRAINED_FLASH=y
CONFIG_BOARD_TESTING=y
CONFIG_DRIVERS_BAROMETER_MS5611=y
CONFIG_EKF2_AUX_GLOBAL_POSITION=y
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_can.c
* @file can.c
*
* Board-specific CAN functions.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file init.c
* @file init.cpp
*
* PX4FMU-specific early startup code. This file implements the
* board_app_initialize() function that is called early by nsh during startup.
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu2_led.c
* @file led.c
*
* PX4FMU LED backend.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_usb.c
* @file usb.c
*
* Board-specific USB functions.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_can.c
* @file can.c
*
* Board-specific CAN functions.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu2_led.c
* @file led.c
*
* PX4FMU LED backend.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_usb.c
* @file usb.c
*
* Board-specific USB functions.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_can.c
* @file can.c
*
* Board-specific CAN functions.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu2_led.c
* @file led.c
*
* PX4FMU LED backend.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_usb.c
* @file usb.c
*
* Board-specific USB functions.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_can.c
* @file can.c
*
* Board-specific CAN functions.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file init.c
* @file init.cpp
*
* PX4FMU-specific early startup code. This file implements the
* board_app_initialize() function that is called early by nsh during startup.
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu2_led.c
* @file led.c
*
* PX4FMU LED backend.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_usb.c
* @file usb.c
*
* Board-specific USB functions.
*/
@@ -8,6 +8,3 @@ param set-default BAT1_A_PER_V 36.367515152
# system_power unavailable
param set-default CBRK_SUPPLY_CHK 894281
# Disable safety switch by default
param set-default CBRK_IO_SAFETY 22027
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_can.c
* @file can.c
*
* Board-specific CAN functions.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu2_led.c
* @file led.c
*
* PX4FMU LED backend.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_usb.c
* @file usb.c
*
* Board-specific USB functions.
*/
@@ -21,9 +21,6 @@ param set-default BAT1_A_PER_V 36.00
param set-default BAT_V_OFFS_CURR 0.413
# Disable safety switch
param set-default CBRK_IO_SAFETY 22027
safety_button start
set LOGGER_BUF 32
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_can.c
* @file can.c
*
* Board-specific CAN functions.
*/
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file init.c
* @file init.cpp
*
* PX4FMU-specific early startup code. This file implements the
* board_app_initialize() function that is called early by nsh during startup.
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu2_led.c
* @file led.c
*
* PX4FMU LED backend.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu2_led.c
* @file led.c
*
* PX4FMU LED backend.
*/
+1 -1
View File
@@ -32,7 +32,7 @@
****************************************************************************/
/**
* @file px4fmu_usb.c
* @file usb.c
*
* Board-specific USB functions.
*/
+1 -1
View File
@@ -11,7 +11,7 @@ uint8 ACTION_VTOL_TRANSITION_TO_MULTICOPTER = 6
uint8 ACTION_VTOL_TRANSITION_TO_FIXEDWING = 7
uint8 source # how the request was triggered
uint8 SOURCE_RC_STICK_GESTURE = 0
uint8 SOURCE_STICK_GESTURE = 0
uint8 SOURCE_RC_SWITCH = 1
uint8 SOURCE_RC_BUTTON = 2
uint8 SOURCE_RC_MODE_SLOT = 3
+50 -50
View File
@@ -1,67 +1,67 @@
uint64 timestamp # time since system start (microseconds)
bool connected # Whether or not a battery is connected, based on a voltage threshold
float32 voltage_v # Battery voltage in volts, 0 if unknown
float32 current_a # Battery current in amperes, -1 if unknown
float32 current_average_a # Battery current average in amperes (for FW average in level flight), -1 if unknown
float32 discharged_mah # Discharged amount in mAh, -1 if unknown
float32 remaining # From 1 to 0, -1 if unknown
float32 scale # Power scaling factor, >= 1, or -1 if unknown
float32 time_remaining_s # predicted time in seconds remaining until battery is empty under previous averaged load, NAN if unknown
float32 temperature # temperature of the battery. NaN if unknown
uint8 cell_count # Number of cells, 0 if unknown
uint64 timestamp # time since system start (microseconds)
bool connected # Whether or not a battery is connected, based on a voltage threshold
float32 voltage_v # Battery voltage in volts, 0 if unknown
float32 current_a # Battery current in amperes, -1 if unknown
float32 current_average_a # Battery current average in amperes (for FW average in level flight), -1 if unknown
float32 discharged_mah # Discharged amount in mAh, -1 if unknown
float32 remaining # From 1 to 0, -1 if unknown
float32 scale # Power scaling factor, >= 1, or -1 if unknown
float32 time_remaining_s # predicted time in seconds remaining until battery is empty under previous averaged load, NAN if unknown
float32 temperature # Temperature of the battery in degrees Celcius, NaN if unknown
uint8 cell_count # Number of cells, 0 if unknown
uint8 BATTERY_SOURCE_POWER_MODULE = 0
uint8 BATTERY_SOURCE_EXTERNAL = 1
uint8 BATTERY_SOURCE_ESCS = 2
uint8 source # Battery source
uint8 priority # Zero based priority is the connection on the Power Controller V1..Vn AKA BrickN-1
uint16 capacity # actual capacity of the battery
uint16 cycle_count # number of discharge cycles the battery has experienced
uint16 average_time_to_empty # predicted remaining battery capacity based on the average rate of discharge in min
uint16 serial_number # serial number of the battery pack
uint16 manufacture_date # manufacture date, part of serial number of the battery pack. Formatted as: Day + Month×32 + (Year1980)×512
uint16 state_of_health # state of health. FullChargeCapacity/DesignCapacity, 0-100%.
uint16 max_error # max error, expected margin of error in % in the state-of-charge calculation with a range of 1 to 100%
uint8 source # Battery source
uint8 priority # Zero based priority is the connection on the Power Controller V1..Vn AKA BrickN-1
uint16 capacity # actual capacity of the battery
uint16 cycle_count # number of discharge cycles the battery has experienced
uint16 average_time_to_empty # predicted remaining battery capacity based on the average rate of discharge in min
uint16 serial_number # serial number of the battery pack
uint16 manufacture_date # manufacture date, part of serial number of the battery pack. Formatted as: Day + Month×32 + (Year1980)×512
uint16 state_of_health # state of health. FullChargeCapacity/DesignCapacity, 0-100%.
uint16 max_error # max error, expected margin of error in % in the state-of-charge calculation with a range of 1 to 100%
uint8 id # ID number of a battery. Should be unique and consistent for the lifetime of a vehicle. 1-indexed.
uint16 interface_error # interface error counter
uint16 interface_error # interface error counter
float32[14] voltage_cell_v # Battery individual cell voltages, 0 if unknown
float32 max_cell_voltage_delta # Max difference between individual cell voltages
float32[14] voltage_cell_v # Battery individual cell voltages, 0 if unknown
float32 max_cell_voltage_delta # Max difference between individual cell voltages
bool is_powering_off # Power off event imminent indication, false if unknown
bool is_required # Set if the battery is explicitly required before arming
bool is_powering_off # Power off event imminent indication, false if unknown
bool is_required # Set if the battery is explicitly required before arming
uint8 BATTERY_WARNING_NONE = 0 # no battery low voltage warning active
uint8 BATTERY_WARNING_LOW = 1 # warning of low voltage
uint8 BATTERY_WARNING_CRITICAL = 2 # critical voltage, return / abort immediately
uint8 BATTERY_WARNING_EMERGENCY = 3 # immediate landing required
uint8 BATTERY_WARNING_FAILED = 4 # the battery has failed completely
uint8 BATTERY_STATE_UNHEALTHY = 6 # Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in faults field.
uint8 BATTERY_STATE_CHARGING = 7 # Battery is charging
uint8 BATTERY_WARNING_NONE = 0 # no battery low voltage warning active
uint8 BATTERY_WARNING_LOW = 1 # warning of low voltage
uint8 BATTERY_WARNING_CRITICAL = 2 # critical voltage, return / abort immediately
uint8 BATTERY_WARNING_EMERGENCY = 3 # immediate landing required
uint8 BATTERY_WARNING_FAILED = 4 # the battery has failed completely
uint8 BATTERY_STATE_UNHEALTHY = 6 # Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in faults field.
uint8 BATTERY_STATE_CHARGING = 7 # Battery is charging
uint8 BATTERY_FAULT_DEEP_DISCHARGE = 0 # Battery has deep discharged
uint8 BATTERY_FAULT_SPIKES = 1 # Voltage spikes
uint8 BATTERY_FAULT_CELL_FAIL= 2 # One or more cells have failed
uint8 BATTERY_FAULT_OVER_CURRENT = 3 # Over-current
uint8 BATTERY_FAULT_OVER_TEMPERATURE = 4 # Over-temperature
uint8 BATTERY_FAULT_UNDER_TEMPERATURE = 5 # Under-temperature fault
uint8 BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 6 # Vehicle voltage is not compatible with battery one
uint8 BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 7 # Battery firmware is not compatible with current autopilot firmware
uint8 BATTERY_FAULT_INCOMPATIBLE_MODEL = 8 # Battery model is not supported by the system
uint8 BATTERY_FAULT_HARDWARE_FAILURE = 9 # hardware problem
uint8 BATTERY_FAULT_FAILED_TO_ARM = 10 # Battery had a problem while arming
uint8 BATTERY_FAULT_COUNT = 11 # Counter - keep it as last element!
uint8 BATTERY_FAULT_DEEP_DISCHARGE = 0 # Battery has deep discharged
uint8 BATTERY_FAULT_SPIKES = 1 # Voltage spikes
uint8 BATTERY_FAULT_CELL_FAIL= 2 # One or more cells have failed
uint8 BATTERY_FAULT_OVER_CURRENT = 3 # Over-current
uint8 BATTERY_FAULT_OVER_TEMPERATURE = 4 # Over-temperature
uint8 BATTERY_FAULT_UNDER_TEMPERATURE = 5 # Under-temperature fault
uint8 BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 6 # Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage).
uint8 BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 7 # Battery firmware is not compatible with current autopilot firmware
uint8 BATTERY_FAULT_INCOMPATIBLE_MODEL = 8 # Battery model is not supported by the system
uint8 BATTERY_FAULT_HARDWARE_FAILURE = 9 # hardware problem
uint8 BATTERY_FAULT_FAILED_TO_ARM = 10 # Battery had a problem while arming
uint8 BATTERY_FAULT_COUNT = 11 # Counter - keep it as last element!
uint16 faults # Smart battery supply status/fault flags (bitmask) for health indication.
uint8 warning # Current battery warning
uint16 faults # Smart battery supply status/fault flags (bitmask) for health indication.
uint8 warning # Current battery warning
uint8 MAX_INSTANCES = 4
float32 full_charge_capacity_wh # The compensated battery capacity
float32 remaining_capacity_wh # The compensated battery capacity remaining
uint16 over_discharge_count # Number of battery overdischarge
float32 nominal_voltage # Nominal voltage of the battery pack
float32 full_charge_capacity_wh # The compensated battery capacity
float32 remaining_capacity_wh # The compensated battery capacity remaining
uint16 over_discharge_count # Number of battery overdischarge
float32 nominal_voltage # Nominal voltage of the battery pack
float32 internal_resistance_estimate # [Ohm] Internal resistance per cell estimate
float32 ocv_estimate # [V] Open circuit voltage estimate

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