20955 Commits

Author SHA1 Message Date
Silvan Fuhrer
4e3f65e376 disable spinup tilt sequence if spinup tilt parameter is set to 0
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-04-08 21:12:53 -04:00
Silvan
7e4a53f292 VTOL tiltrotor: introduce spin up time with spin up tilt angle
As some tiltrotor systems need a certain tilt angle of their motors in oder to spin up freely,
this commit introduces an additional parameter VT_TILT_SPINUP and sets the motor tilt to
this value if disarmed or within 1s since arming.

The spinup consists of 2 phases:
    1st phase fixed tilt (duration hardcoded to 1s)
    2nd phase transition from spinup tilt to multicopter tilt (hardcoded to 0.5s)

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-04-08 21:12:53 -04:00
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
Lorenz Meier
18e78261ab Commander: Add more documentation around USB reboots
If the user disconnects USB we reboot the system to bring it back into a nominal condition before arming. Otherwise we would either have the USB stack running without a cable connected (code running for no reason, which is violating the principle of not running unnecessary code in aviation). Or we would not allow to arm at all if USB was ever connected, which can be confusing if the system is powered off a battery.
2020-04-08 14:11:09 -04:00
Nico van Duijn
59bd3e9f6e Change defaults for MPC_LAND_ALT 2020-04-08 11:52:01 -04:00
Beat Küng
6b0a2649c0 commander: set home position on takeoff
instead of when arming and on takeoff.

It is set on the first takeoff or if there was a disarm event between the
last and the current takeoff.
2020-04-08 14:59:26 +02:00
Beat Küng
80f0892de5 fix commander: set _was_landed before _land_detector topic update
Before _was_landed was set to the same value as the current
_land_detector.landed, thus outside of the update condition,
_was_landed && !_land_detector.landed could never be true.

This affects setting the home position, which is now set upon arming AND
upon takeoff.
2020-04-08 14:59:26 +02:00
Beat Küng
aa6f9280e1 fix commander: set _have_taken_off_since_arming when !landed upon arming
If arming and already !landed, _have_taken_off_since_arming will not be set
and thus auto-disarm after 10s will be triggered (with default config).

This can only happen due to quick state changes, as land detector generally
sets landed=true if !armed.
2020-04-08 14:59:26 +02: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
JacobCrabill
74aa3201ce uavcannode: Fix Kelvin/Celcius in RawAirData pub 2020-04-07 18:31:10 +02:00
Beat Küng
4e0441ab0b logger: add data format version tag 2020-04-07 09:59:12 -04:00
Julien Lecoeur
7b12a21565
mavlink: Enable offboard attitude for coaxial airframes 2020-04-07 09:23:03 -04:00
Jacob Dahl
d682ddb510
UAVCAN differential pressure sensor support
* added airspeed handling (differential pressure) to uavcan and uavcannode

Co-authored-by: Jacob Crabill <jacob@flyvoly.com>
2020-04-07 00:15:31 -04:00
Daniel Agar
ff74a2a48b new mpu6000/mpu6500/mpu9250 always schedule backup cycle if using data ready 2020-04-06 23:32:04 -04:00
Daniel Agar
0860a61fa6
new InvenSense IMU drivers review temperature sensitivities and offsets 2020-04-06 22:53:16 -04:00
AlexKlimaj
d8c140be04
UAVCAN Smart Battery Improvements 2020-04-06 21:09:02 -04:00
Beat Küng
08bfeb3dc7 mavlink: fix potential busy loop upon USB disconnect
When disconnecting USB poll returns successfully, but the read returns
-1 with ENOTCONN.
In addition this also ensures there's no busy loop when poll returns an
error.

MAVLink continues to work after reconnecting USB.
2020-04-06 12:42:10 -04:00
Claudio Micheli
4cdc58ce8d EscBattery: only publish data if all the ESCs are online
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2020-04-06 15:56:54 +02:00
Julian Oes
c1884975ed esc_battery: several review fixes
Thanks @bkueng.
2020-04-06 15:56:54 +02:00
Julian Oes
5927bb3635 battery: add requirements to ESCs as battery 2020-04-06 15:56:54 +02:00
Julian Oes
ae219c3272 esc_battery: fix timeout check 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
b01cdafcf6 boards: add esc_battery to build 2020-04-06 15:56:54 +02:00
Julian Oes
509b8b6b4b First skeleton for esc_battery module 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
Daniel Agar
ad559a66a1 examples: add simple work_item example module 2020-04-06 09:43:55 -04:00
Julian Kent
9404b19906 Fix bezier scaling 2020-04-06 09:02:12 +02:00
Claudio Micheli
dc29a994b7 msg: extend field definition in msg/esc_report (arming & failure states)
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2020-04-03 09:16:43 +02:00
Julian Oes
4e091a369d uavcannode: fix format 2020-04-03 09:08:33 +02:00
Jacob Dahl
ff1e5a595d
uavcannode: battery info publishing 2020-04-03 01:30:31 -04: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
Matthias Grob
ab6606aa46 PreFlightCheck: fix magnometer typo 2020-04-02 13:53:47 +02:00
RomanBapst
2522435f9c vtol_att_control: got rid of VT_B_DEC_SP
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2020-04-02 13:45:52 +03: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
005bc97959 tiltrotor: enable l1 and deceleration control during transition
Signed-off-by: RomanBapst <bapstroman@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
0184d8196f vtol_type: calculate backtransition acceleration in forward direction
- use track angle to calculate the current forward acceleration

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2020-04-02 13:45:52 +03:00
RomanBapst
47b5d51369 vtol_type: added explicit control over deceleration during backtransition
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
RomanBapst
b6a80253d7 run l1 during transition 2020-04-02 13:45:52 +03:00
Beat Küng
1f60a86d32 fix commander: need to copy all battery states in a cycle
Previously if in a cycle only a disconnected battery status updated, the
battery health state would switch to unhealthy during that time.

Fixes intermittent 'Arming denied! Check battery' preflight failures on
v5x with 1 power module connected.
2020-04-02 12:42:00 +02:00
Matthias Grob
70c28c7274 mc_pos_control_params: update MPC_POS_MODE description
- remove deprecated sport mode
- clarify wording
2020-04-02 11:52:44 +02:00
Daniel Agar
aa2f3a6624 sensors: complete move to uORB::Subscription 2020-04-01 16:17:14 -04: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
b3fe235129 drv_mag: delete unused MAGIOCSRANGE, MAGIOCCALIBRATE, MAGIOCEXSTRAP, MAGIOCSTEMPCOMP 2020-04-01 10:07:08 -04:00
Daniel Agar
cfc087c6ad rm3100: move to PX4Magnetometer and cleanup 2020-04-01 10:07:08 -04:00
Daniel Agar
a59aa865da qmc5883: move to PX4Magnetometer and cleanup 2020-04-01 10:07:08 -04:00
Daniel Agar
ade52d612b lsm9ds1_mag: minor cleanup 2020-04-01 10:07:08 -04:00