22826 Commits

Author SHA1 Message Date
David Sidrane
dd4ffb3c0c PWMOut:Fix pwm status 2021-05-05 20:48:06 +02:00
David Sidrane
44cdc52ef8 PWMOut:Use rates from single instance & init all instances channels 2021-05-05 20:48:06 +02:00
Jukka Laitinen
ac6e7a1c6c FlightTaskManualAltitude: Fix double->float conversion in initialization
This gives an error on some new compilers, e.g. riscv64-unknown-elf 10.2.0

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-05-05 09:31:07 +02:00
Jukka Laitinen
532f370e7d Fix implicit float to double conversions
The both results of ?: should be of same type, and some compilers give error
on this:
	" implicit conversion from 'float' to 'double' to match other result of conditional"

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-05-05 09:31:07 +02:00
Daniel Agar
3ec40a5956 collision_prevention: fix CP_GO_NO_DATA parameter type 2021-05-04 16:41:32 -04:00
Matthias Grob
ee87257a8d FlightModeManager: move velocity control feedback into FlightTask
This was only handled outside because FlightTaks lived in the
multicopter position controller which produces the data that was
needed but now it doesn't make sense anymore to handle this
subscription separately.

It's better to have it inside the base task to have the data available
on task activation sucht that e.g. Altitude mode can take over smoothly
from Position mode.
2021-05-04 16:47:48 +02:00
Matthias Grob
c28533677d MulticopterLandDetector: use setpoint generation to infer decend intent
For any normal use case where a downwards velocity setpoint is set
this works exactly the same as before.
E.g. autonomous landing, landing in Altitude or Position mode

The advantage is that the very common case where a vehicle tries
to hold a constant altitude but fails to do so e.g. during a hard brake
with too much lift the resulting downwards velocity was interpreted
as descend intent and since the vehicle already struggled to hold altitude
with low thrust and was not moving fast anymore because it was braking
this lead to a lot more false positives on certain vehicle types.

The disadvantage is that not setting a downwards velocity setpoint but
just moving the position setpoint into the ground does not result in
land detection anymore. We do not use this method of landing anymore for
quite a while. It's not recommended and I wonder if there's some rare use
case like offboard where this is done.

We could add an additional case for the specific case to land with a
position setpoint only.
2021-05-04 16:43:33 +02:00
Matthias Grob
2e292abfff MulticopterLandDetector: Make land detection time configurable
The tree stages used arbitrary 350, 250 300ms totally 900ms
So this changes it to each stage to a third of the parameter.
Default it is 1 second -> 333ms per stage.
2021-05-04 16:43:33 +02:00
RomanBapst
269ce07cb5 land detector: log more states in order to facilitate debugging ground contact state
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-05-04 16:43:33 +02:00
Jari Nippula
04b7ee43bc
protocol_splitter: Sp2Header defined as union (#17511)
Aligned with agent_protocol_splitter to make byte access easier
for checksum generation

Co-authored-by: Nuno Marques <n.marques21@hotmail.com>
2021-05-04 10:09:24 +02:00
RomanBapst
cd4378b8c6 vtol: init boolean consistently
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-05-03 18:58:26 -04:00
Thomas
ab10e68a40 update Quadchute trigger from mavlink PR 1569 2021-05-03 21:44:27 +03:00
Thomas
bf9758247b add VEHICLE_VTOL_STATE_QC and remove hardcoding 2021-05-03 21:44:27 +03:00
Thomas
d3ddbe8db5 Allow quadchute from external command 2021-05-03 21:44:27 +03:00
Peter van der Perk
ecc5154a44 Reflect dynamically allocate block pointers instead of using heap 2021-05-03 14:04:02 -04:00
Silvan Fuhrer
2c6b3eeb02 Navigator: NAV_CMD_DO_VTOL_TRANSITION: accept once in correct vtol state
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-05-03 08:40:54 +02:00
Silvan Fuhrer
5579a1d789 Navigator: remove WORK_ITEM_TYPE_CMD_BEFORE_MOVE
It was used to make the vehicle needing to accept the waypoint after a VTOL transition in the new VTOL mode

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-05-03 08:40:54 +02:00
Silvan Fuhrer
3c4b0c1b8c tiltrotor: only allow increasing tilt during first part of transition
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-05-02 21:51:09 -04:00
Jukka Laitinen
fa9fdce6e6
sensors/vehicle_gps_position: Fix raw_dt and present_dt calculation in gps_blending
If the GPS data is passed from companion computer, there may be inaccuracies
with timesync. This may cause time deltas to overflow.

Make the time delta calculation using floats directly, wich results in negative
numbers in case there are such inaccuracies.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-05-02 13:59:50 -04:00
Daniel Agar
e78a4287f9 parameters: attempt import multiple times 2021-05-02 13:48:16 -04:00
Daniel Agar
feebb24106 logger: skip multi-EKF logging if CONSTRAINED_MEMORY 2021-05-02 13:47:28 -04:00
Femtomes
783a780207
drivers/gps: add femtomes gps driver protocol 2021-05-02 13:46:39 -04:00
Julian Oes
abee13df1a mavlink: improve rx stats printf 2021-05-02 13:45:39 -04:00
Julian Oes
d96ba2d88a mavlink: use 4s for HITL
This is more inline with SITL.
2021-05-02 13:45:39 -04:00
Julian Oes
e9a1599355 mavlink: clang-tidy fix 2021-05-02 13:45:39 -04:00
Julian Oes
aa0752ad86 mavlink: fix pthread usage 2021-05-02 13:45:39 -04:00
Julian Oes
5784f1d951 mavlink: add detailed stats about rx messages 2021-05-02 13:45:39 -04:00
Julian Oes
370d9ee409 mavlink: use px4::atomic instead of volatile 2021-05-02 13:45:39 -04:00
Julian Oes
4498509426 mavlink: move thread handling into MavlinkReceiver
In my opinion this makes it much cleaner and will allow mavlink main to
directly call the receiver.
2021-05-02 13:45:39 -04:00
Julian Oes
71bd35fcaa mavlink: keep track of seq for any component
Instead of only keeping track of the sequence ID of specific "supported"
components, we now keep track of any sysid/compid of an incoming
message. Before this change, unknown components (such as jMAVSim) would
completely screw up the mavlink message stats and create confusion (at
least in my case).

With this change we currently keep track of up to 8 other components.
Once we reach the limit, we will print a warning.
2021-05-02 13:45:39 -04:00
Julian Oes
6ae23e7b7b mavlink: fix HITL battery status publication
Without these fields the pre-arm check would complain and fail.

Also, the voltage is adjusted to be at around 70% rather than 30% which
would almost start to trigger warnings.
2021-05-02 13:45:39 -04:00
Julian Oes
cfcc074e9d mavlink: remove unused methods 2021-05-02 13:45:39 -04:00
TSC21
18dc0e4900 update submodule micro-CDR 2021-05-02 13:05:16 -04:00
SalimTerryLi
514d4fd57b
drivers/distance_sensor: GY-SR04 sonar range finder driver 2021-05-02 12:09:35 -04:00
PX4 BuildBot
32d354e5fe Update submodule ecl to latest Sun May 2 12:39:08 UTC 2021
- ecl in PX4/Firmware (cb999f37d4891ebfbbc21b4ce9b3851888b39ad4): 5d34d7a24e
    - ecl current upstream: a7b8afe420
    - Changes: 5d34d7a24e...a7b8afe420

    a7b8afe 2021-04-30 Eike - Allow rangefinder fusion in vision height mode (Fix for #994) (#999)
4ac57d3 2021-04-25 Daniel Agar - EKF: increase fault flags value size to fit current flag bits (> 16)
2021-05-02 11:47:36 -04:00
PX4 BuildBot
8ef10c9b38 Update submodule public_regulated_data_types to latest Sat May 1 12:41:36 UTC 2021
- public_regulated_data_types in PX4/Firmware (bb5225ddae32f3a85f6c01fa5957f1b30cb73a14): 309b251a7e
    - public_regulated_data_types current upstream: 1337b1c86f
    - Changes: 309b251a7e...1337b1c86f

    1337b1c 2021-04-23 Pavel Kirienko - Update the `nominal_voltage` in battery parameters (#114)
2021-05-01 19:17:02 -04:00
PX4 BuildBot
199db72d5f Update submodule public_regulated_data_types to latest Sat May 1 12:41:39 UTC 2021
- public_regulated_data_types in PX4/Firmware (d052cf4a6963d576e0e108b6c95b6fa4fab57584): 309b251a7e
    - public_regulated_data_types current upstream: 1337b1c86f
    - Changes: 309b251a7e...1337b1c86f

    1337b1c 2021-04-23 Pavel Kirienko - Update the `nominal_voltage` in battery parameters (#114)
2021-05-01 19:16:42 -04:00
mcsauder
4eb758edf0 Alphabetize flight_mode_manager CMakeLists.txt list, and group/format types in FlightTask.cpp/hpp. 2021-05-01 10:46:27 -04:00
Daniel Agar
186bc2bda4
Update submodule GPSDrivers to latest Sat May 1 00:38:31 UTC 2021 2021-05-01 10:31:09 -04:00
TSC21
4f098a01bc drivers: protocol_splitter: some style updates 2021-04-29 11:57:35 +02:00
Jari Nippula
9980d2a556 Utilize header struct instead of control bytes directly 2021-04-29 09:37:48 +02:00
Jari Nippula
757f1df068 Protocol_splitter: 4-byte header with checksum 2021-04-29 09:37:48 +02:00
CUAVcaijie
b898aabfed Fix the repeated configuration of PWM rate after initialization 2021-04-28 00:22:07 +02:00
Kalyan Sriram
b2d73dca26 uavcan_v1: cmake: nunavut generation message 2021-04-27 10:30:33 -04:00
Beat Küng
38c1ec6a9c ekf2: check if ChangeInstance succeeded 2021-04-27 10:29:09 -04:00
Beat Küng
1a89f165fd fix bmi088: set correct accel scale
This affected the clipping limit, which was set too low
2021-04-27 10:27:57 -04:00
RomanBapst
171c26373b land_detector: robustify land detection by using distance to ground info
- if distance to the ground is available then hysteresis times will be increased
by a factor of 3 if vehicle is higher than 1m above ground

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-04-27 08:19:19 +02:00
RomanBapst
f6a34e1e80 vtol_type: reset accel to pitch integrator
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-04-27 07:43:38 +03:00
Alex Mikhalev
cbf34109d1 paw3902: Default to using SENS_FLOW_ROT rotation
This restores the behavior to what it was previous to #16338 (74083d6).

Signed-off-by: Alex Mikhalev <alex@corvus-robotics.com>
2021-04-26 15:14:17 -04:00
Daniel Agar
c266c3e43a parameters: remove unnecessary param_get_system_default_value() locking 2021-04-26 09:49:15 +02:00