24632 Commits

Author SHA1 Message Date
Daniel Agar
7001d90d84
lib/sensor_calibration: BiasCorrectedSensorOffset() don't incorporate thermal offsets
- the thermal offsets are an optional correction applied to the raw data, so when updating an existing calibration offset with new learned bias we don't want this incorporated
2023-02-07 09:12:09 -05:00
CUAVmengxiao
ca9af1ca9e
drivers: add support for ICP101XX and ICP201XX 2023-02-06 15:19:49 -05:00
Ryan Meagher
7a6cfce0ca
drivers/barometer/invensense: fix icp10111 and icp10100
* fix icp so it compiles
* add icp10111 and icp10100 DEVTPYE
2023-02-06 15:19:39 -05:00
Julian Oes
37cb24afd8 mavlink_shell: fix stall on CubeOrange
On CubeOrange where no console is configured by default, starting
MAVLink shell just stalls, and doesn't work.

Also, logfile download has been reported not to work, and again, seems
to work with this change.

Signed-off-by: Julian Oes <julian@oes.ch>
2023-01-04 22:33:36 -05:00
Beat Küng
985482badb mixer_module: only advertise actuator_outputs when mixer is loaded 2022-12-16 07:50:57 +01:00
bresch
beddb3969e GyroCalibration: update sensor correction before using it
Otherwise, the thermal offset value can be outdated
2022-11-23 14:25:31 -05:00
bresch
4481c3bc1f TC: erase current calibration when temp cal is completed 2022-11-23 14:25:31 -05:00
bresch
72becdf407 ekf2: do not fuse ZVU if other velocity source is active 2022-11-15 13:11:06 -05:00
Matthias Grob
228def6081 mission_block: explicitly (re)set the acceptance radius to default for takeoff items
otherwise a previously adjusted or uninitialized radius from the last flight
can cause problems during the new takeoff
2022-11-11 14:48:45 +13:00
Matthias Grob
092562dc51 mission_block: minimal acceptance radius of 1mm
to avoid float rounding errors leading to tiny acceptance radii
getting considered
2022-11-11 14:48:45 +13:00
Daniel Agar
872ac68daf
vehicle_magnetometer: fix standalone mag bias est factored into in flight mag cal
- preflight mag bias estimate is in the vehicle body frame and removed from the raw mag data after it's rotated, calibrated, etc
 - in flight mag bias (from ekf2) is in the vehicle body frame, but stored as a sensor frame offset immediately
2022-11-07 09:31:49 -05:00
Silvan Fuhrer
65d22120b2 Navigator: initialize _mission_item for all navigation modes in Navigator::Navigator()
This fixes the issue where the init happended in the initializer list, at which point
the params were not yet initialized and thus resulted in random values for the init
values of _mission_item.loiter_radius and .acceptance_radius.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-10-27 13:20:29 +02:00
Thomas Stastny
dc7f29e2ec
welford mean: protect against negative variances 2022-10-05 10:29:03 -04:00
Thomas Stastny
fbef296890
welford mean: convert to matrix only template 2022-10-05 10:29:03 -04:00
Daniel Agar
6ce38b8296
vehicle_imu: only reset raw accel/gyro Welford mean periodically
- vehicle_imu_status can publish immediately on any measured sample
rate change or sensor error increment, but the windowed mean/variance
shouldn't necessarily reset that often
2022-10-05 10:29:03 -04:00
Julian Oes
e3d730ea37 ms5611: ignore reading 0
This prevents publishing a negative pressure which leads to a NAN
altitude estimate further down the line.
2022-10-04 09:42:16 -04:00
bresch
1ea4fe9b7b
Mag: fix estimated bias save to calibration
Clear the calibration at the end only otherwise everything gets erased
at the end of the first iteration of the outer loop
2022-09-28 10:03:35 -04:00
Julian Oes
2e7df77bff uavcan: fix RTCM corrections publication
Before this fix, this function would stall and somehow never return.
2022-09-27 22:01:48 -04:00
Julian Oes
241abb933a libuavcan: update submodule
This fixes a Python 3.10 issue for me.
2022-09-27 21:55:08 -04:00
alexklimaj
61d2b13e43 Add BMP390 to BMP388 driver 2022-09-20 20:34:23 -04:00
Daniel Agar
a5a9b1011a [DO NOT MERGE] px4_i2c_device_external hacks 2022-09-20 18:54:28 -04:00
Alex Klimaj
af0d53cdc9
boards: V1.13.0 ARKV6X Backport (#20253) 2022-09-20 18:53:48 -04:00
RomanBapst
79367ed417 standard: fixed pusher assist in hover
- in hover mode the pusher assist is already set in update_mc_state()

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2022-09-15 13:07:27 -04:00
Daniel Agar
26f912eb8a icm42670p run at full speed 2022-09-06 16:23:14 +12:00
Daniel Agar
e7d18960a5 drivers/imu/invensense/icm42670p: cleanup and small fixes 2022-09-06 16:23:14 +12:00
Daniel Agar
8a54b21e7d
adis16470: fix accel and gyro scaling 2022-08-17 11:40:30 -04:00
bresch
b30c2c22b3
ekf2: do not run rng kinematic consistency check for fixed-wings
As they are always moving horizontally, the check doesn't make sense
for fixed-wings.
Also don't run the check while on ground to prevent getting a failed
check during pre-takeoff manipulation.
2022-07-12 13:54:30 -04:00
Daniel Agar
cc7e709597
uavcan: GNSS optionally publish RTCMStream or MovingBaselineData 2022-07-12 13:54:21 -04:00
Daniel Agar
416610afc3
differential_pressure/sdp3x: sdp3x_main fix 'keep running' regression 2022-07-12 13:54:11 -04:00
David Sidrane
55706108b6
uc_stm32h7_can:Correct initalization of the mumber of interfaces
H7 Only supports 2 not 3 CAN interfaces.

   CanInitHelper passes in in the run time configuration of
   the number of interfaces. The code was ignoring these!
2022-07-01 15:32:53 -04:00
Alex Klimaj
f9980e0721
uavcannode: Fix dronecan baro units 2022-06-17 14:44:32 -04:00
Daniel Agar
6823cbc414
sensors/vehicle_angular_velocity: add IMU_GYRO_RATEMAX constraints 2022-06-07 16:23:01 -04:00
Daniel Agar
beaebe4d0b
sensors/vehicle_imu: don't bother checking IMU_GYRO_RATEMAX 2022-06-07 16:22:54 -04:00
Julian Oes
4ae97c505f
commander: lockdown is not termination
We use lockdown to prevent outputs like motors and servos from being
active in HITL simulation. This means that we can't treat the lockdown
flag as a flight_terminated, otherwise we can't arm in HITL at all.
2022-05-24 09:42:38 -04:00
Daniel Agar
b8ce2a6039
icm42688p: only check configured registers periodically (as intended) 2022-05-23 14:58:37 -04:00
bresch
1f399e5b33
ekf2: use explicit flags instead of bitmask position
This prevents bitmask mismatch when a new flag is inserted
2022-05-23 14:57:17 -04:00
Serhat Aksun
d67cddae7d
sensors/vehicle_magnetometer: fix multi_mode check
Signed-off-by: Serhat Aksun <serhat.aksun@maxwell-innovations.com>
2022-05-23 10:10:22 -04:00
Nicolas MARTIN
39d1c79f48
HITL: undefined time_remaining_s should be NAN 2022-05-20 09:40:28 -04:00
Nico van Duijn
ad410a2512
Commander: ignore MAV_CMD_REQUEST_MSG
This commit adds the MAV_CMD_REQUEST_MESSAGE to the list of vehicle
commands which are ignored without generating a warning sound.
2022-05-20 09:40:22 -04:00
Beat Küng
afb2538da3
output drivers: init SmartLock after exit_and_cleanup
This fixes an invalid memory access when exiting the module:
exit_and_cleanup destroys the object, but lock_guard is destructed after
and accesses the lock.
2022-05-12 08:17:15 -04:00
alexklimaj
af58c412c3
Fix uavcan battery causing immediate RTL time remaining low 2022-05-11 21:49:13 -04:00
Daniel Agar
d5226b28ce
drivers/rc_input: ensure RC inversion is disabled initially and latch RC_INPUT_PROTO conservatively
- this allows jumping straight to a non-SBUS RC protocol
 - increased the scan time per protocol 300->500 ms, which the newer DSM parser seems to need in some cases.
 - only set RC_INPUT_PROTO if we've had a successful RC lock for > 3 seconds
2022-05-11 14:31:51 -04:00
Beat Küng
b091ea9fd9
log_writer_file: fix corner case when mission log is enabled
Normally _should_run for mission is only ever true if _should_run for the
normal log is. There are exceptions though:
- the log buffer fails to allocate
- there was a write failure (e.g. due to SD card removal)
In that situation, the writer would not wait anymore but busy-loop.
2022-05-11 10:07:46 -04:00
Beat Küng
9e91ca8294
log_writer_file: protect access to _should_run, use px4::atomicbool for _exit_thread 2022-05-11 10:07:46 -04:00
Igor Mišić
8302f076e7
uavcan: use timer 6 by default on stm32f7 2022-05-10 12:43:26 -04:00
Thomas Stastny
de26ffa6e0 fw pos ctrl: turn back to takeoff point with npfg 2022-05-06 13:08:07 -04:00
Thomas Stastny
f60d38db65 fw pos ctrl: add missing guidance control interval setting to control_manual_position() 2022-05-06 13:08:07 -04:00
Thomas Stastny
5e3c8d2fa0 fw pos ctrl: fix state switching logic for takeoff and landing 2022-05-06 13:08:07 -04:00
Matthias Grob
90998837ec
Commander: ensure diconnected battery is cleared from bit field 2022-05-06 10:46:40 -04:00
Beat Küng
8cff9a1e04
commander: fix incorrect return in set_link_loss_nav_state()
If both local position and altitude were not valid, then both RC loss and
datalink loss would not trigger any failsafe at all, independently from
the configured action.
2022-05-06 10:15:30 -04:00