Commit Graph

24394 Commits

Author SHA1 Message Date
Beat Küng 5ac43e7236 commander: switch to events 2021-09-11 14:08:41 -04:00
Daniel Agar 8866215d1d sensors/vehicle_imu: add protections for bad sensor data
- check for inconsistent timestamps, zero samples, and numerical issues in online mean
2021-09-11 13:04:46 -04:00
Beat Küng ae8733c2d4 pwm_input: remove 'test' command and use 'status' instead 2021-09-08 16:10:24 -04:00
Beat Küng f1aafe83b3 pwm_out: cleanup, remove _output_mask & only update owned channels
_pwm_mask reflects the actually owned channels.
2021-09-08 16:10:24 -04:00
Beat Küng a8e75d174c boards: remove BOARD_HAS_PWM and use DIRECT_PWM_OUTPUT_CHANNELS 2021-09-08 16:10:24 -04:00
Beat Küng 1ee423e3c8 pwm_out, dshot: remove mode_* handling and capture ioctl's
They now use all unused pins, whereas camera_capture, camera_trigger and
pwm_input modules start before to reserve their pins.
2021-09-08 16:10:24 -04:00
Beat Küng 062dd28f4d camera_capture: use up_input_capture_set directly
It reserves the channel and pwm_out will not use it
2021-09-08 16:10:24 -04:00
Beat Küng 847bd120fa io_timer: reserve pins & timers on first use
This allows modules to do a first-come-first-serve pin/timer reservation
on bootup.
E.g. camera trigger reserves any of the pins, and then PWM/DShot output
will just use the rest of the available pins.
2021-09-08 16:10:24 -04:00
bresch aad11ecc65 PreFltCheck: do not force to report ekf2 failures on GCS connection
EKF2 has a grace period of 10 seconds after boot where it doesn't need
to warn the user while the sensors (especially GNSS) are still
converging.
A connection to a GCS shouldn't skip this grace period but
an arming request should.
2021-09-08 14:41:26 -04:00
Matthias Grob 58ea97a699 MulticopterPositionControl: add horizontal margin for saturation cases 2021-09-08 19:55:27 +02:00
benjinne 06a91ec752 Improve offboard failsafe (#18160)
* state_machine_helper: improve offboard failsafe

* state_machine_helper: add missing parameter to set_link_loss_nav_state

* state_machine_helper: fix no rc and offboard reason

* Fix offboard test by enabling rcl_except

* mavros_test fix offboard_posctl_test with rcl_except

* autopilot_tester make RcLossException bits explicit

Co-authored-by: Julian Oes <julian@oes.ch>

* autopilot_tester change rcl_except to rc_loss_exception

Co-authored-by: Julian Oes <julian@oes.ch>

* autopilot_tester fix rc_loss_exception renaming errors

Co-authored-by: Julian Oes <julian@oes.ch>
2021-09-08 18:19:53 +02:00
ShiauweiZhao 686bcff8a7 new TDK ICM42670p IMU driver support (#18141)
Co-authored-by: zhaoxiaowei <zhaoxiaowei@efy-tech.com>
2021-09-08 10:24:22 -04:00
Daniel Agar 29a91306b5 lib/led: error if dropping ORB_ID(led_control) messages 2021-09-08 10:21:09 -04:00
Daniel Agar 5c7882b787 icm42688p: properly disable anti-aliasing and notch filter 2021-09-08 10:20:57 -04:00
Daniel Agar 4b5a91bf7d experimental driver for the Tattu 12S 16000mAh Smart Battery on /dev/can0 (#18164)
-  This driver is highly specific to this model of Tattu battery and cannot work with other models without code changes. 
 - The driver simply reads CAN frames using the NuttX CAN character device interface and converts the data into the proper format as specified in the Tattu datasheet

Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
2021-09-08 10:20:14 -04:00
Beat Küng 291ca246d2 matrix: update submodule (improves matrix inversion) 2021-09-05 23:18:28 -04:00
Beat Küng 73ab153fe0 fix test_microbench_math: don't try to measure single instructions
The clock is simply not accurate enough to do that.
Plus the measuring overhead is much higher than the executed instruction.

Remaining issue: memory transfers (due to volatile) add non-negligible
overhead and distort the result. Could be solved by using inline assembly.
2021-09-05 23:18:28 -04:00
RomanBapst 93075ad5e8 rtl: fixed computation of return altitude if destination is not home
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-09-05 10:26:24 +02:00
xdwgood c35293107d tailsitter.cpp:If transition timeout,abort transition 2021-09-03 13:41:40 +02:00
RomanBapst 92abf0545a GeofenceBreachAvoidance: fixed bug which caused min vertical distance to fence
not to be calculated

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2021-09-02 15:45:19 +03:00
Daniel Agar 99d7cf4255 parameters: only warn on invalid parameter import 2021-09-01 15:16:00 -04:00
Daniel Agar 478cc576ee commander: warn on offboard mission init
- this could happen because the SD card was formatted
2021-09-01 15:16:00 -04:00
Daniel Agar e7607b858d sensors: use vehicle_imu timestamp_sample instead of timestamp 2021-09-01 15:16:00 -04:00
Daniel Agar a5a457d744 sensors: relax default data_validator timeout 20->40ms 2021-09-01 15:16:00 -04:00
Daniel Agar bd8937642f lib/sensor_calibration: only warn if external rotation resetting
- this also happens with the actual default parameter value (-1)
2021-09-01 15:16:00 -04:00
Daniel Agar 40e5477edb NuttX boards fix mkfatfs and rcS logic 2021-09-01 15:16:00 -04:00
Daniel Agar 65b1a9648d Tools/HIL/run_nsh_cmd.py: fail if ERROR printed in output 2021-09-01 15:16:00 -04:00
Daniel Agar 2f99857b0a systemcmds/bl_update: add CONFIG_ARCH_CHIP_STM32F7 file size limit 2021-09-01 15:16:00 -04:00
Daniel Agar 5dfc07cb1b systemcmds/param: add set-default sient (-s) option 2021-09-01 15:16:00 -04:00
Daniel Agar 054d0b995c px4iofirmware: remove police lights to avoid getting stuck 2021-09-01 15:16:00 -04:00
Daniel Agar 70831a8e2c px4io: checkcrc warn on mismatch 2021-09-01 15:16:00 -04:00
Daniel Agar 8434da6f79 px4io: reduce upload retries 5 -> 2 2021-09-01 15:16:00 -04:00
Daniel Agar 6be7926ed3 px4io: add watchdog
- F1 iwdg:Support optional configuable init

Co-authored-by: David Sidrane <David.Sidrane@NscDg.com>
2021-09-01 15:16:00 -04:00
Julian Oes 6cb0259b79 commander: improve progress output
Instead of outputting progress at weird percentages and dropping 100%,
this now sends the progress every 10 %.
2021-08-30 21:05:40 -04:00
Daniel Agar ca685490a9 drivers/rc_input: only print vrssi if analog stable 2021-08-30 12:45:56 -07:00
Daniel Agar 15c01a9732 drivers/rc_input: flush buffers when beginning new scan state 2021-08-30 12:45:56 -07:00
Daniel Agar a305fc9c34 drivers/rc_input: only invert RC when starting/ending SBUS 2021-08-30 12:45:56 -07:00
Daniel Agar 79703c9c7a drivers/rc_input: don't resume scanning if armed 2021-08-30 12:45:56 -07:00
Daniel Agar 98f89aae9b drivers/rc_input: always report new lock 2021-08-30 12:45:56 -07:00
Hylke Faas 34483aef0f Do not resend a mission request if it is not the expected sequence number, this can cause an excessive increase of used bandwith (#18082) 2021-08-30 13:39:51 +02:00
Daniel Agar a917793248 mavlink: only block parameter sync until boot complete 2021-08-30 13:27:51 +02:00
Daniel Agar c6a6403ce2 px4io: increase stack 1500 -> 1536 bytes 2021-08-25 21:32:05 +02:00
Daniel Agar 22e62a044a px4iofirmware: never directly touch mixer from isr 2021-08-25 21:32:05 +02:00
Jacob Crabill 1ee5f75aa5 uavcan_v1: Add PublicationManager and uORB Publisher (#17863) 2021-08-25 14:56:23 -04:00
Beat Küng d8214f5e00 component_information: merge extra component_information_header target
With Makefile build, generate_component_general.py was called twice during
build, which did not happen with the ninja build.

This created a race condition with the following error in rare cases:
Traceback (most recent call last):
  File "/__w/PX4-Autopilot/PX4-Autopilot/src/lib/component_information/generate_component_general.py", line 79, in <module>
    save_compressed(filename)
  File "/__w/PX4-Autopilot/PX4-Autopilot/src/lib/component_information/generate_component_general.py", line 33, in save_compressed
    with open(filename, 'r') as content_file:
FileNotFoundError: [Errno 2] No such file or directory: '/__w/PX4-Autopilot/PX4-Autopilot/build/px4_sitl_default/component_general.json'
make[3]: *** [src/lib/component_information/CMakeFiles/component_information_header.dir/build.make:68: component_general.json] Error 1

Merging the targets avoids the duplicate execution.
2021-08-25 10:04:39 -04:00
Beat Küng af53b60713 Revert "component_information: add debug instrumentation for FileNotFoundError exception"
This reverts commit ca454c93d1.
2021-08-25 10:04:39 -04:00
Jukka Laitinen 8f03045fb2 Increase micrortps_client_rcv stack for 64 bit targets
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-08-24 10:16:27 -04:00
Jukka Laitinen 69021dbafa Increase navigator stack for 64-bit targets
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-08-24 10:16:27 -04:00
Jukka Laitinen e49791cdf2 Increase mavlink stack for 64 bit targets
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-08-24 10:16:27 -04:00
Jukka Laitinen 29248cb6b8 Increase gps stack for 64 bit targets
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-08-24 10:16:27 -04:00