Commit Graph

30460 Commits

Author SHA1 Message Date
Beat Küng 37cc877c80 smbus: fix invalid memory access in read_word()
read_word() expected 3 bytes (uint16_t + PEC byte), but was passed an
address to an uint16_t value.

write_word() is changed to be type-safe as well.
2019-11-07 10:02:42 -05:00
Silvan Fuhrer a124664b80 disable airspeed selector module startup for 1.10
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-11-06 11:41:42 +01:00
Julian Oes c8886ee32f mixer_module: fix poll error in SITL lockstep
This fixes the case where the mixer_module would subscribe and use its
own test_motor publication which was created only to make sure the
topic is advertised and subsequent updates will work properly.

This happened in SITL lockstep because the timestamp would be 0 at the
very beginning, and hence elapsed time would be 0 as well.
This lead to an actuator publication which would then get lockstep out
of sync causing poll errors on the Gazebo side.
2019-11-05 12:48:29 -05:00
Julian Oes 3c8685742e Removed lidar lite reset after intialization 2019-11-05 09:07:19 -05:00
Beat Küng 23334df1e5 BlockingList: fix unsafe getLockGuard() API
getLockGuard relies on copy elision to work correctly, which the compiler
is not required to do (only with C++17).
If no copy elision happens, the mutex ends up being unlocked twice, and the
CS is executed with the mutex unlocked.

The patch also ensures that the same pattern cannot be used again.
2019-11-05 14:19:10 +01:00
David Sidrane 5c6d16ca27 NuttX/nuttx with SDIO fixes (#13311)
* NuttX/nuttx with SDIO fixes
2019-10-31 13:42:22 -04:00
Daniel Agar 5bd5fa34fa sensors: own BAT_V_DIV and BAT_A_PER_V params (#13299)
- this is currently necessary for the QGC power setup gui, but should be reverted in the future
 - fixes #13292
2019-10-28 16:52:42 -04:00
Julian Oes 24143a9fcf mavlink: only ignore messages on UDP before init
We should still accept messages arriving over serial.
2019-10-28 16:52:42 -04:00
Julian Oes 469ab9dce6 mavlink: accept msgs without source initialized
I don't understand why we should wait to parse incoming MAVLink traffic
just because we don't have the source address initialized. We still
check the source address before doing a sendto.

This should fix serial MAVLink communication on FMU5x where both serial
and UDP is available. There the serial connection previously did not
work because nothing was connected over UDP.
2019-10-28 16:52:42 -04:00
Beat Küng d5f003eed5 px4io: add missing lock()/unlock() in ioctl 2019-10-28 16:04:11 -04:00
bresch 6535d5123e AutoLineSmoothVel: fix constrain priority for autocontinue.
The constrainAbs function was not prioritizing the minimum value
that produces the autocontinue behaviour. This caused zig-zag
paths when the waypoints were almost -but not exactly- aligned.
2019-10-28 16:04:11 -04:00
PX4 BuildBot 0d895f2a0a Update submodule sitl_gazebo to latest Fri Oct 25 12:40:00 UTC 2019
- sitl_gazebo in PX4/Firmware (ffefd458be): c0634b241e
    - sitl_gazebo current upstream: 169d48217d
    - Changes: c0634b241e...169d48217d

    169d482 2019-10-22 Julian Oes - travis: let's not bother about macOS Sierra
78fef51 2019-10-22 Julian Oes - travis: install gstreamer using brew
764d1b7 2019-10-21 Julian Oes - models: fix reported validation errors
053622b 2019-10-11 TSC21 - Travis CI: Cleanup scripts and add more MacOSX build pipelines
0c8214c 2019-10-21 Julian Oes - cmake: fix Qt prefix path for macOS
bb2c08c 2019-10-06 TSC21 - CMake: fix Qt5 find in MacOS
81f072b 2019-10-14 Julian Oes - travis: install GStreamer using brew
39d4399 2019-10-14 Julian Oes - cmake: link to glib-2.0 and gobject-2.0
fef3ff5 2019-10-14 Julian Oes - cmake: fix GStreamer and Qt deps for macOS
605da22 2019-10-22 Nuno Marques - Update README.md
2a8a54e 2019-10-20 Nuno Marques - README: update install instructions
2019-10-28 16:04:11 -04:00
Jacob Crabill 940ce5b2d6 UAVCAN: Optical Flow: Bug fix (missing integration_timespan field in optical_flow topic). (#13257) 2019-10-28 16:04:11 -04:00
JaeyoungLim 9771bac8e8 Fix typhoon h480 parameter (#13263) 2019-10-28 16:04:11 -04:00
Dusan Zivkovic 9e3775515e mission: ensure precland::on_inactivation() is called once landed 2019-10-28 16:04:11 -04:00
Hamish Willee 8e9dc60eaa Mavlink Submodule update 2019-10-28 16:04:11 -04:00
Hamish Willee 662795cb90 Fix incorrect default for parser 2019-10-28 16:04:11 -04:00
Hamish Willee e65515cd9b Parameter parser/markdown includes boolean flag 2019-10-28 16:04:11 -04:00
bresch 16d7db1e69 InnovationLpf: initialize state to zero 2019-10-28 16:04:11 -04:00
TSC21 471bc23a9f Jenkins CI: Colcon build on ROS2 Dashing workspace 2019-10-28 16:04:11 -04:00
TSC21 12c0d198ae bump container tags to 2019-10-24 2019-10-28 16:04:11 -04:00
TSC21 1ee8b67591 Jenkins CI: Tests: bump px4-dev-ros-melodic tag to 2019-10-23 2019-10-28 16:04:11 -04:00
TSC21 a0367b30b8 Jenkins CI: move SITL tests to Melodic container 2019-10-28 16:04:11 -04:00
bresch 6cab14fc5d ekf2: Fix heading not stable issue. The prblem was that a large
dt could drive the alpha filter crazy because of the small dt
approximation during the computation of the coefficient.
- Remove unused bitmask packing of the innovation checks
2019-10-28 16:04:11 -04:00
Matthias Grob 45bc2c5882 arch.sh: get rid of ignition-cmake workaround
The AUR repository got fixed upstream after
I reported the issue. I tested on a fresh machine
so we can get rid of the workaround that was necessary. See
https://aur.archlinux.org/packages/ignition-cmake/#comment-712301
2019-10-28 16:04:11 -04:00
Travis Bottalico 571c6f136d modalai fc-v1: add dshot support 2019-10-28 16:04:11 -04:00
Travis Bottalico e038f06778 Fix a missed refactor of board name in vscode file 2019-10-28 16:04:11 -04:00
mcsauder 71a7bf420e Add rangefinder dependency to the CM8JL65 driver CMakeList and organize #includes. 2019-10-28 16:04:11 -04:00
Jaeyoung-Lim 4a76f608ac Retune h480 2019-10-28 16:04:11 -04:00
RomanBapst 3e84def1e2 rcS: do not wipe next flight UUID parameter when resetting parameters
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-10-28 16:04:11 -04:00
Mathieu Bresciani 112f24c54f ekf2_main - Add optical flow innovation pre-flight check (#13036)
* ekf2: Add FirstOrderLpf and InnovationLpf classes for innovation lowpass filtering

* ekf2: use InnovLpf filter class in preflight checks

* ekf2: move selection of yaw test limit for pre-flight check in function

* ekf2: Move pre-flight checks into separate function

* ekf2: use static constexpr insetead of inline for sq (square) function

* ekf2: Split pre-flight checks in separate functions
Also use the same check for all the innovations:
innov_lpf < test and innov < 2xtest

* ekf2: Add optical flow pre-flight check

* ekf2: Combine FirstOrderLpf and InnovationLpf in single class

* ekf2: check vel_pos_innov when ev_pos is active as well

* ekf2: transform InnovationLpf into a header only library and pass the
spike limit during the update call to avoid storing it here

* ekf2: Static and const cleanup
- set spike_lim constants as static constexpr, set innovation
- set checker helper functions as static
- rename the mix of heading and yaw as heading to avoid confusion

* ekf2: use ternary operator in selectHeadingTestLimit instead of if-else

* ekf2: store intermediate redults in const bool flags. Those will be used for logging

* ekf2: set variable const whenever possible

* ekf2: create PreFlightChecker class that handle all the innovation
pre-flight checks.
Add simple unit testing
Use bitmask instead of general flag to have more granularity

* PreFlightChecker: use setter for the innovations to check instead of sending booleans in the update function
This makes it more scalable as more checks will be added

* ekf: Use booleans instead of bitmask for ekf preflt checks
Rename "down" to "vert"
2019-10-28 16:04:11 -04:00
Daniel Agar 17d0073f95 generate_listener.py don't use message length 2019-10-28 16:04:11 -04:00
Daniel Agar a59a0b64b8 perf counter cleanup (mostly intervals)
Some of these perf counters were useful during initial development, but realistically aren't needed anymore, some are redundant when we can now see the average interval from `work_queue status` and some of them simply aren't worth the cost at higher rates.
2019-10-28 16:04:11 -04:00
Daniel Agar f7e62349b3 px4_posix: increase posix stack overhead (mostly for ASan)
- sync address sanitizer SITL tests
2019-10-21 16:56:09 -04:00
Daniel Agar 6a0f5249f8
sensors: split out analog battery handling to new standalone battery_status module 2019-10-21 13:40:23 -04:00
Beat Küng f956bafa4e MixingOutput: remove safety button check
The assumption is that the system can only ever get into armed state if
the safety button is already off.
2019-10-21 09:42:08 +02:00
Beat Küng 529da7b33e MIXERIOCLOADBUF ioctl: remove unnecessary string length restriction
mixer.cpp ensures the string is null-terminated (buffer length is 2048).
2019-10-21 09:42:08 +02:00
Beat Küng a8f6622831 OutputModuleInterface::updateOutputs return bool to control actuator_outputs pub
Required for pwm_out_sim: only publish actuator_outputs when we get
actuator_controls. Otherwise lockstep startup does not work.
The issue was there before but hidden, due to a long poll timeout.

Works with HIL too.
2019-10-21 09:42:08 +02:00
Beat Küng 380247168d mixer_module: avoid using an enum as px4::atomic argument
Does not compile on MacOS.
2019-10-21 09:42:08 +02:00
Beat Küng 0871802568 mixer_module: add support for test_motor (motor_test CLI command) 2019-10-21 09:42:08 +02:00
Beat Küng 349469cf75 refactor pwm_out_sim: use mixer_module and run on work queue
Tested with SITL + HITL
2019-10-21 09:42:08 +02:00
Beat Küng 2837152983 refactor mixer_module: move some code in update() into separate methods 2019-10-21 09:42:08 +02:00
Beat Küng 72a8be538a mixer_module: more robust logic to set 'stop_motors' flag
Checking the first output_limited for a disarmed value is fragile.
For example a disarmed value might be within the range of min/max output
values and could then be triggered while armed.
2019-10-21 09:42:08 +02:00
Hamish Willee 177da1f923 RTL params - proposed updates 2019-10-21 09:08:27 +03:00
RomanBapst 4cc7bb7296 addressed review comments
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-10-21 09:08:27 +03:00
RomanBapst b1a9d4b4c7 updated rtl parameter descriptions.
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-10-21 09:08:27 +03:00
TSC21 2930b55732 microRTPS: templates: only decode ros2_distro when possible and nedeed 2019-10-20 16:08:32 +01:00
Daniel Agar 981f8d5d90
systemcmds/tests: IntrusiveQueue and List fix memory leaks 2019-10-20 10:46:44 -04:00
Daniel Agar 687a3a15c5
top: decrease priority below IMU sensor WQ threads
- otherwise top can potentially disrupt with sensor sampling
2019-10-19 13:44:24 -04:00
modaltb 3bbf1cc868 Add support for ModalAI FC1 2019-10-19 12:23:23 -04:00