39685 Commits

Author SHA1 Message Date
Julian Oes
6960600c28 Mantis: play power off tune
To play a power off tune, I needed to convert the file to C++, so that I
could use the uORB::Publication.

The current implementation starts playing the power off sound but then
stops it as soon as the button is released.

The problem is mostly that we only get an interrupt when the button is
pressed or released but we don't seem to be able to poll it, at least
not in the current state.
2022-01-10 23:04:10 -05:00
Julian Oes
860b23dd17 tunes: add tune to power off
This is used by the ATL Mantis EDU to help the user realize when the
drone is powered off.
2022-01-10 23:04:10 -05:00
Julian Oes
a21fefda48 tune_control: prevent segfault 2022-01-10 23:04:10 -05:00
Julian Oes
856e229482 ROMFS: reset the startup sound for Mantis 2022-01-10 23:04:10 -05:00
Julian Oes
1be4e35ed4 ROMFS: move startup sound further down
This way it works for the Mantis where the tap_esc driver needs to be
running before beeping is posssible.
2022-01-10 23:04:10 -05:00
Julian Oes
76920171c7 tap_esc: fix tunes
This removes the redundant _play_tone flag and instead just polls the
next_note() interface to check if there is something to play.
2022-01-10 23:04:10 -05:00
Julian Oes
de1849167d Mantis: Add upload_wifi target to upload firmware 2022-01-10 23:04:10 -05:00
Julian Oes
185e4cfd48 Mantis: set range finder limits, and min quality
The limits might somewhat match the sensor, guessed based on the
original driver.

The quality is set so that spikes when sitting on the ground are not
used.
2022-01-10 23:04:10 -05:00
Julian Oes
dd00e43ca3 mavlink: set signal_quality (and sane variance)
Otherwise this distance data is actually not used at all.
2022-01-10 23:04:10 -05:00
Julian Oes
aefbd80b53 mavlink: use optical flow limits from params
This makes more sense than hard-coding arbitrary values.
2022-01-10 23:04:10 -05:00
Julian Oes
f48c3a2cc6 mavlink: don't handle RC_CHANNELS
This is a status/output but should not be an input for the autopilot.
Instead RC_CHANNELS_OVERRIDE should be used.
2022-01-10 23:04:10 -05:00
Daniel Agar
cc1fee525a lib/sensor_calibration: handle calibration slot change on parameter update 2022-01-10 17:16:50 -05:00
Daniel Agar
ab547bb982 sensors/vehicle_angular_velocity: RPM notch don't fully disable if first harmonic frequency drops below minimum frequency
- keep higher frequency harmonics enabled per ESC
 - cleanup timestamp handling (timeouts, etc)
2022-01-10 14:51:29 -05:00
Daniel Agar
b58922a5d7 sensors/vehicle_angular_velocity: notch filters automatically reset on sufficient parameter change 2022-01-10 14:51:29 -05:00
Daniel Agar
7d632254be NotchFilter push initialization/reset into filter
- this simplifies the reset by allowing a notch filter to reset as
needed
 - improves cascade initialization, on reset each filter will reset
properly from the previous
2022-01-10 14:51:29 -05:00
Daniel Agar
2e2ac36cab
drivers/uavcan: make firmware server available on both CAN1/CAN2 always (if enabled)
- uavcan firmware server no longer shuts down when arming (nodes might restart in flight)
 - always handle UAVCAN parameters with or without the FW server active
 - remove legacy ESC enumeration in FW server
2022-01-10 11:13:02 -05:00
Daniel Agar
d9e7315420 sensors: automatically set initial accel/gyro calibration if stable bias available 2022-01-10 10:46:37 -05:00
Daniel Agar
e731fcdbc0
sensors (accel/gyro/mag) determine if external with device id 2022-01-10 10:31:07 -05:00
Daniel Agar
45040be669 ekf2: accel/gyro/mag sensor cal minor cleanup
- cleanup obsolete comments
 - remove debug helpers
 - add additional variance requirements to mag bias stable (matching accel & gyro)
2022-01-10 09:55:59 -05:00
Daniel Agar
c3ca40a98f drivers/px4io: delete monitor command
- the px4io console isn't even connected on most flight controllers
2022-01-10 09:51:11 -05:00
Daniel Agar
e5d49f6fff drivers/px4io: delete unused detect 2022-01-10 09:51:11 -05:00
Daniel Agar
d077ca15fb delete PWM_SERVO_SET, PWM_SERVO_SET_MODE, systemcmds/motor_ramp, and pwm_out test 2022-01-10 09:51:11 -05:00
Daniel Agar
df44df2df6 delete systemcmds/esc_calib
- this is redundant with commander esc_calibration
2022-01-10 09:51:11 -05:00
Daniel Agar
03bdc460d8 drivers/px4io: PWM_SERVO_GET_FAILSAFE_PWM don't get registers directly 2022-01-10 09:51:11 -05:00
Daniel Agar
d3301ba826 delete PWM_SERVO_GET_TRIM_PWM 2022-01-10 09:51:11 -05:00
Daniel Agar
8de59dad32 delete PWM_SERVO_SET_TERMINATION_FAILSAFE 2022-01-10 09:51:11 -05:00
Daniel Agar
1739ecc981 delete PWM_SERVO_SET_FORCE_FAILSAFE 2022-01-10 09:51:11 -05:00
Daniel Agar
649d3e3f55 delete PWM_SERVO_SET_DISABLE_LOCKDOWN/PWM_SERVO_GET_DISABLE_LOCKDOWN 2022-01-10 09:51:11 -05:00
Daniel Agar
b7ed4fd3e0 delete PWM_SERVO_SET_DISARMED_PWM 2022-01-10 09:51:11 -05:00
Daniel Agar
551a31ce2f delete PWM_SERVO_SET_FAILSAFE_PWM 2022-01-10 09:51:11 -05:00
Daniel Agar
daa925137c boards: move default battery calibration defines to parameter defaults 2022-01-10 09:49:36 -05:00
Daniel Agar
78b3d22471 lib/mixer_module: consume output_limit library 2022-01-10 11:59:55 +01:00
Daniel Agar
71d8b15b73 commander: fix COM_HOME_EN missing case
- VEHICLE_CMD_COMPONENT_ARM_DISARM is yet another path that calls set_home_position()
2022-01-09 20:52:07 -05:00
Daniel Agar
0b1402afe2 Tools/HIL/test_airframes.sh enable all mavlink and GPS 2022-01-08 18:11:43 -05:00
bresch
57fa9c545a PosControl: fix hover update equation
The integrator now absorbs properly the change in hover thrust
2022-01-08 15:42:10 +01:00
Daniel Agar
6c97700eaa move sensor calibration parameters to yaml 2022-01-07 19:00:41 -05:00
Matthias Grob
bbad4a5397 FlightTaskAuto: Respect altitude with offtrack state
To avoid weird cases where the altitude is different enough and
the offtrack state flies to the target altitude instead of the closest
point on the track between the waypoints.
2022-01-07 10:30:39 -05:00
Julian Oes
be0a5b4b32 workflows: Set up batch fuzzing every 24 hours
So instead of fuzzing each and every PR for 10minutes, we just fuzz
30mins every 24 hours, at 6am UTC which should be a time when US and
Europe might be least active.
2022-01-07 10:17:12 -05:00
Julian Oes
2cbc993976 Add clusterfuzzlite to fuzz in CI 2022-01-07 10:17:12 -05:00
Julian Oes
9eda5b373c posix: add fuzz testing using MAVLink messages
This adds the env option PX4_FUZZ which runs the LLVM libFuzzer which
throws random bytes at mavlink_receiver using MAVLink messages over UDP.

The MAVLink messages that are being sent are valid, so the CRC is
calculated but the payload and msgid, etc. are generally garbage, unless
the fuzzing gets a msgid right by chance.

As I understand it, libFuzzer watches the test coverage and will try to
execute as much of the code as possible.
2022-01-07 10:17:12 -05:00
Daniel Agar
c17a9e8003 sensors/vehicle_imu: refactor SensorCalibrationUpdate() to separate accel/gyro cal saving 2022-01-07 09:40:51 -05:00
Daniel Agar
aec97e0020 sensors: minor IMU bias saving updates
- sensors/vehicle_imu: reset learned cal on any calibration change
during parameter update
 - sensors/vehicle_imu: cleanup logic estimated bias -> calibration offset
saving
   - don't invalidate saved calibration (the point is to keep the last valid)
   - remove old debug code, etc
 - sensors/vehicle_imu: notify parameter changes if accel or gyro
calibration has changed
 - lib/sensor_calibration: add calibrated() and calibration_index()
getters, keep Accelerometer/Gyroscope/Magnetometer in sync
2022-01-07 09:40:51 -05:00
Silvan Fuhrer
5d7ddf5734 FW Pos Control: use SlewRate library for airspeed setpoint
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-01-07 09:39:10 -05:00
Daniel Agar
30ccfdb2ed
sensors/vehicle_magnetomeer: fix copyright year 2022-01-06 20:27:56 -05:00
Julian Oes
07d75d85cf mavsdk_tests: trigger flush to stdout every second 2022-01-06 09:24:32 -05:00
Julian Oes
2d8ebc6839 mavsdk_tests: add timestamp to log output
The timestamp is added when the output is queued up, rather than later
when the queue is emptied and some time might have passed.
2022-01-06 09:24:32 -05:00
Julian Oes
dd6fb58f82 mavsdk_tests: don't stall mavsdk_tests binary
This is an attempt to fix the test failure where PX4 detects an RC
timeout presumably because the tester process mavsdk_tests is stalled
and does not send RC control messages in time.
2022-01-06 09:24:32 -05:00
Julian Oes
952cfe2fd7 ekf2: fix uninitalized memory warning
The imu and sensor_combined data should not be used when it has not been
updated yet, otherwise this triggers a memory sanitizer warning:

Conditional jump or move depends on uninitialised value(s)
   at 0x2DA7AA: __sanitizer_cov_trace_const_cmp1 (in build/px4_sitl_default-clang/bin/px4)
   by 0x3C4E79: EKF2::Run() (src/modules/ekf2/EKF2.cpp:401)
   by 0x6EB881: px4::WorkQueue::Run() (platforms/common/px4_work_queue/WorkQueue.cpp:187)
   by 0x6ECB9D: px4::WorkQueueRunner(void*) (platforms/common/px4_work_queue/WorkQueueManager.cpp:230)
   by 0x4C07258: start_thread (in /usr/lib/libpthread-2.33.so)
   by 0x4D415E2: clone (in /usr/lib/libc-2.33.so)

Conditional jump or move depends on uninitialised value(s)
   at 0x3C4E7C: EKF2::Run() (src/modules/ekf2/EKF2.cpp:401)
   by 0x6EB881: px4::WorkQueue::Run() (platforms/common/px4_work_queue/WorkQueue.cpp:187)
   by 0x6ECB9D: px4::WorkQueueRunner(void*) (platforms/common/px4_work_queue/WorkQueueManager.cpp:230)
   by 0x4C07258: start_thread (in /usr/lib/libpthread-2.33.so)
   by 0x4D415E2: clone (in /usr/lib/libc-2.33.so)
2022-01-05 16:20:06 -05:00
romain-chiap
4264ec992d Update 1101_rc_plane_sih.hil
This bugged me for a while, the sih FW would not takeoff from the ground. Now, I found it!
2022-01-05 16:18:53 -05:00
Silvan Fuhrer
0a82025faf FW Position Control: some airspeed setpoint handling adaptions
- introuce slew rate limiting of airspeed setpoint (with slew rate of 1 m/s/s)
- some refactoring and clean up

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-01-05 17:06:41 +01:00