2293 Commits

Author SHA1 Message Date
Daniel Agar
746b3124ab
Update submodule matrix to latest Wed Apr 8 12:39:43 UTC 2020
- matrix in PX4/Firmware (222e0636c4b53ea18013f2bf0d35a798fab6ae76): a32892926c
    - matrix current upstream: d613055462
    - Changes: a32892926c...d613055462

d613055 2020-04-06 kamilritz - Add more assignment operators for slices
976ada4 2020-03-21 Matthias Grob - Matrix: min max comments and test style
fa7153e 2020-03-21 Matthias Grob - Matrix: omit min max nan case with same result
2020-04-08 16:25:00 -04:00
Daniel Agar
cf37be8c44
ekf2 handle accelerometer clipping
- track clipping per IMU axis and pass through to ecl/EKF
 - update ecl/EKF to include delta velocity clipping changes (PX4/ecl#663)
2020-04-07 20:11:08 -04:00
Julian Oes
5927bb3635 battery: add requirements to ESCs as battery 2020-04-06 15:56:54 +02:00
Julian Oes
f650b91718 battery: check source param inside battery lib
This moves the handling of the BAT%d_SOURCE param inside of the battery
library. Users of the library now pass the source instead of the flag
whether to publish. The battery library then checks if the source is
selected using the param and publishes accordingly.

Since we removed the strange system_source flag, we now need to look at
all batteries in commander.
For current estimation - I think - it makes sense to sum them up.
2020-04-06 15:56:54 +02:00
Julian Oes
dcd34ed08d battery: add ESCs source, remove wrong unit 2020-04-06 15:56:54 +02:00
Julian Kent
9404b19906 Fix bezier scaling 2020-04-06 09:02:12 +02:00
Beat Küng
dfb5b5d7d9
fix param import transition
* fix param import transition for MC_DTERM_CUTOFF

The previous implementation did not work, as there was a check for
param_find_no_notification() returning PARAM_INVALID for IMU_DGYRO_CUTOFF,
and therefore would not call param_modify_on_import().

This moves param_modify_on_import() before the check and makes it modify
the bson node directly.

* parameters: fix param import transition when testing is enabled

BUILD_TESTING is used for unit test builds, PX4_TESTING is used to enable additional test material within PX4

Co-authored-by: Daniel Agar <daniel@agar.ca>
2020-04-02 18:41:00 -04:00
Matthias Grob
2baa5ca4d7
minor build fixes and ignored warnings for GCC 9 (#14159)
- px4io task_main_trampoline add return
 - iridiumsbd main_loop_helper add return
 - drivers/uavcan ignore Wcast-align, Wdeprecated-copy, and Waddress-of-packed-member for now
 - flashparams ignore Wvla-larger-than
 - test_time fix printf type
2020-04-02 10:24:36 -04:00
Roman Bapst
47f0e91076 Apply suggestions from code review
Co-Authored-By: Mathieu Bresciani <brescianimathieu@gmail.com>
2020-04-02 13:45:52 +03:00
RomanBapst
a916cc2a26 better comments
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2020-04-02 13:45:52 +03:00
RomanBapst
baf5e86f81 transition flighttask: don't control yaw and altitude during trans
Signed-off-by: RomanBapst <bapstroman@gmail.com>

# Conflicts:
#	src/lib/flight_tasks/tasks/Transition/FlightTaskTransition.cpp
2020-04-02 13:45:52 +03:00
Daniel Agar
02f4ad61ec
I2C/SPI require device type in constructor 2020-04-01 12:24:22 -04:00
Daniel Agar
04bf9afd1b CDev delete unused pub_blocked 2020-04-01 11:23:26 -04:00
Daniel Agar
09ba9d62eb PX4Magnetometer: add external() getter and default temperature to NAN 2020-04-01 10:07:08 -04:00
bresch
3f15ccd2dd Update ECL
Add "Fly without magnetometer" and some interface changes
2020-04-01 11:47:39 +02:00
Daniel Agar
2b82b471c1 sensor_accel_fifo increase to 32 samples 2020-03-31 13:26:50 -04:00
Matthias Grob
49d22edc33 battery: cell voltage fill refactor 2020-03-31 09:14:50 +02:00
Timothy Scott
14a61a6695 Fixed reporting of battery voltages in uORB 2020-03-31 09:14:50 +02:00
Matthias Grob
f6ceb08522 FlightTaskTransition: don't overwrite setpoints with estimates
Previously acceleration setpoints were not executed and just used
to pass a possible rough initialization value for the next task. Now
they get executed by the multicopter controller and hence
overwriting them with rough estimates doesn't work anymore.
2020-03-30 09:58:39 +02:00
Matthias Grob
91057fe024 FlighTasks: remove FlightTaskSport
This mode was just kept as an example after
its usage in a single case. It's basically untested
and doesn't make much sense anymore since it's
incompatible with the jerk limited trajectory
implementations. It's implementation only switched
hte configuration parameter of the velocity resulting
from maximum stick deflection to be
MPC_XY_VEL_MAX instead of MPC_VEL_MANUAL.
This is according to todays understanding undesired
because when hitting that limit the position
controller has no room for corrections anymore.

Also it saves some flash space on omnibus to remove
the task at this point and makes romm for the
acceleration feed-forward.
2020-03-30 09:58:39 +02:00
Matthias Grob
b79b095ce7 FlightTasks: adapt to acceleration based control 2020-03-30 09:58:39 +02:00
Beat Küng
e5dd2e7a19 mag_compensation.py: some minor fixes + indentation 2020-03-27 11:07:50 +01:00
Dusan Zivkovic
26a8707298 flight task auto: set acceptance radius when setting loiter as a responce to invalid setpoint 2020-03-26 21:02:20 +01:00
bresch
dc38930bb2 AutoSmoothVel: desynchronize XY from Z for small changes in speed
This fixes the issue that makes the drone slow-down even in straight
lines due to the Z component being constrained to a really small value
2020-03-26 08:31:09 +01:00
baumanta
7fd77fedaa add python script for offline param identification 2020-03-26 08:00:30 +01:00
baumanta
22ceeccc26 add library for current- or thrust-based mag compensation 2020-03-26 08:00:30 +01:00
Daniel Agar
f4e2cd36d4 add new invensense/mpu6500 driver for airmind mindpx 2020-03-25 01:05:38 -04:00
Daniel Agar
f5fe50f839 invensense/icm20608g driver minor improvements
- interupt pin set active low and latch
 - relax retry timeout if configure failed
 - improve configured empty rate (sample rate) rounding
 - fix RegisterCheck
 - check FIFO count as part of full transfer and reset or adjust timing if necessary
 - rename DRV_IMU_DEVTYPE_ICM20608 -> DRV_IMU_DEVTYPE_ICM20608G
2020-03-25 01:05:38 -04:00
Beat Küng
6ad5357d1a SPI+I2C: remove unused defines and printf's 2020-03-24 09:46:20 -04:00
JacobCrabill
1e5784609f UAVCAN Sensors: Improve error handling
Also add new 'generic' device types for UAVCAN sensors

Other misc. cleanup and style changes.
2020-03-21 12:39:29 -04:00
JacobCrabill
4c8cfa140a UAVCAN: Overhaul SensorBridge drivers
Supposedly multiple sensor callbacks were supported; in reality, this
was not the case, as the mag SensorBridge in particular can only
calibrate one compass, leading to a race condition on which compass
appears first on the bus to get published and calibrated (with no
warning to the user that the 'wrong' compass is being used).

For sensors with existing generic driver classes (baro and mag) the
sensor bridges use these classes for the driver registration, and uORB
publication, and calibration interface (ioctl) handling.
2020-03-21 12:39:29 -04:00
TSC21
341dd6ba26 update submodule src/lib/ecl 2020-03-20 23:18:04 +01:00
bresch
0213fd662a update ecl 2020-03-19 20:27:39 +03:00
bazooka joe
53bc5fddad smbus return with error if failed transfer 2020-03-19 09:34:02 +01:00
PX4 BuildBot
32a6a4e8d8 Update submodule ecl to latest Wed Mar 18 12:38:43 UTC 2020
- ecl in PX4/Firmware (e34351229b4d9de251c495ee49e7c709a93b2521): f1aa53db8a
    - ecl current upstream: ee5e3c479b
    - Changes: f1aa53db8a...ee5e3c479b

    ee5e3c4 2020-03-18 CarlOlsson - ekfgsf: fix formatting
f20fc08 2020-03-17 Mathieu Bresciani - ekf2: centralize mag covariance reset (#693)
2020-03-18 12:39:33 -04:00
Beat Küng
68ef14002a differential_pressure drivers: allow multiple instances of each driver
- the device path needs to be removed, as startup fails if it already
  exists
- sdp3x broadcasts a reset on startup, so do it only for the first I2C
  address
2020-03-17 23:31:17 -04:00
Beat Küng
3b7b2dc871 differential_pressure sensors: use driver base class 2020-03-17 23:31:17 -04:00
Beat Küng
134413233a i2c spi: extend BusCLIArguments to handle common driver arguments 2020-03-17 23:31:17 -04:00
Matthias Grob
eb3b0f6b55 mathlib: get rid of now duplicate sign() function
Instead use the one that was copied to the matrix library in
https://github.com/PX4/Matrix/pull/116/
2020-03-17 10:01:42 +01:00
Daniel Agar
1a9452e411
fw_att_control: move ecl/attitude_fw into fw_att_control module
- ecl/attitude_fw was never maintained as a standalone library
 - moving ecl/attitude_fw library into the fw_att_control module to ease further development
2020-03-15 14:14:59 -04:00
Paul Riseborough
ab92b46e69
Update ecl to add ability to recover from bad magnetic yaw
* msg: Add EKF-GSF yaw estimator logging data
* ecl: update to version with EKF-GSF yaw estimator
* ekf2: Add param control and logging for EKF-GSF yaw estimator
* logger: Add logging for EKF-GSF yaw esimtator
2020-03-15 12:57:25 -04:00
Daniel Agar
422e89b1c0 iSentek IST8308 magnetometer driver 2020-03-15 12:27:01 -04:00
Daniel Agar
64c7b4d489 parameters: handle MC_DTERM_CUTOFF -> IMU_DGYRO_CUTOFF migration 2020-03-15 09:31:45 +01:00
PX4 BuildBot
2da38ae81c Update submodule matrix to latest Thu Mar 12 00:38:40 UTC 2020
- matrix in PX4/Firmware (db0c95ed5620e8ffad3dd3281b511cf5f9ee7848): 649c837b6b
    - matrix current upstream: 4873dc1c1e
    - Changes: 649c837b6b...4873dc1c1e

    4873dc1 2020-03-04 kritz - Analytic inverse implementation (#122)
2020-03-12 00:01:38 -04:00
Daniel Agar
f9794e99f8
move hover_thrust_estimator to new module (mc_hover_thrust_estimator)
* MC_HTE: unitialize with hover_thrust parameter
* MC_HTE: constrain hover thrust setter between 0.1 and 0.9
* MC_HTE: integrate with land detector and velocity controller
* MCHoverThrustEstimator: Always publish an estimate even when not fusing measurements. This is required as the land detector and the position controller need to receive a hover thrust value.

* MC_HTE: use altitude agl threshold to start the estimator
local_position.z is relative to the origin of the EKF while dist_bottom
is above ground

Co-authored-by: bresch <brescianimathieu@gmail.com>
2020-03-11 21:20:54 -04:00
Beat Küng
a2b2605443 param: fix param_get_cplusplus type check 2020-03-10 10:11:43 -04:00
Beat Küng
b54e5a1c23 param: automatically update calibration ID params on import
This avoids the need for recalibration, and also cleans up other driver
ID's (merge separate accel/gyro).

The SPI address was previously set to a board-specific (arbitrary) value,
and is now set to 0. This will allow extending for multiple sensors of the
same type on the same bus.
2020-03-10 10:11:43 -04:00
Beat Küng
1851665fab boards: add new spi+i2c config
Chip-select and SPI initialization uses the new config, whereas the drivers
still use the existing defines.

The configuration in board_config.h can be removed after all drivers are
updated.
2020-03-10 10:11:43 -04:00
Beat Küng
3fef401e81 uorb callbacks: fix unregister ordering to avoid race conditions
The order should be: first unregister, then remove the item from the
runnable queue.
2020-03-09 08:06:00 -04:00
Julian Kent
36c307a39e Provide a dummy avoidance for flash constrained boards
Part of this: move ObstacleAvoidance to a library
2020-03-09 09:51:49 +01:00