Compare commits

...

3015 Commits

Author SHA1 Message Date
Beat Küng b076cfd4ed uorb: do not open a node exclusively for an advertiser
Exclusive open is not required, but we now need to ensure the queue size
is set atomically.

It avoids a race condition between 2 single-instance advertisers,
where one of them would fail to open the node with -EBUSY.
2019-12-03 14:30:25 -05:00
Beat Küng 6de6235fa9 uorb: fix several race conditions during topic initialization
Possible race conditions (they all happen between the check of existence
of a topic and trying to create the node):
- single instance, with multiple advertisers during the first advertise:
  both advertisers see the topic as non-existent and try to advertise it.
  One of them will fail, leading to an error message.
  This is the cause for telemetry_status advert failure seen in SITL in
  rare cases.
- multi-instance: subscription to non-existing instance -> px4_open fails,
  and the subscriber tries to create the node. If during that time a
  publisher publishes that instance, the subscriber will get (instance+1)
  (or fails if the max number of instances is exceeded).
  This is a race that goes pretty much unnoticed.
- multi-instance: 2 publishers can get the same instance (if is_published()
  is false in case both have not published data yet).
  This can also go unnoticed.
  Therefore the patch changes where _advertised is set: it is now set
  directly during the advertisement instead of during publication.
2019-12-03 14:30:25 -05:00
Beat Küng c5ec557a38 refactor uorb: rename published to advertised
No semantic change (yet)
2019-12-03 14:30:25 -05:00
Fabian Schilling 106905871d Use bc to support floating point PX4_SIM_SPEED_FACTOR 2019-07-03 13:59:06 -04:00
Beat Küng c92c90d4d9 logger: handle 'char' type in messages
Fixes errors like:
ERROR [logger] No definition for topic char[10] key;uint8_t[2] _padding0; found
when the Debug logging profile is selected.
2019-07-03 10:28:21 -04:00
dlwalter 7ab48dae57 px4_fmu-v5: rc.board_sensors start lis3mdl optional external magnetometer 2019-07-01 14:53:01 -04:00
RomanBapst 1fe70b2d6a ekf2: fixed calculation of static pressure error
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-06-27 12:38:05 -04:00
Mathieu Bresciani 220f5cc565 mc_pos_control: Explicitly convert tilt variables to radians during check and assignments 2019-06-27 12:38:00 -04:00
Lorenz Meier 4a1d16a06b MAVLink module: Add additional IMUs as default outputs
This simplifies setup and verification of systems, as all three sensors can be looked at in a graph view.
2019-06-26 10:25:00 -04:00
Angel 92e9228fcd Missed conversion to radians in AutoMapper and AutoMapper2 2019-06-26 09:23:55 -04:00
Matthias Grob f8db8650d0 Testing: hotfix to recover test coverage CI
CMAKE_TESTING should automatically be enabled
but I hoped to do that in the test.cmake
target specific options and not in the main
CMakeLists. I have to see if I can make that
order work. Here the hotfix to make CI work
again.
2019-06-24 16:56:12 -04:00
Matthias Grob 415b366c54 mc_att_control: Increase default rate integral gain
@bkueang and me realized that on every frame we tune the integral gain for
the roll and pitch rate controller is much too low. Usually it needs to be
increased to 0.3 or even 0.4 to have better "locked in" flight performance
and 0.2 seems like a good compromise for a safe default.
2019-06-24 12:36:34 -04:00
Matthias Grob 40e804d393 Airframes: rename normal S500 to generic and remove PX4 defaults 2019-06-24 12:36:31 -04:00
Matthias Grob 7195ae9ebb Airframes: add Holybro S500 Kit which was tested at dev summit 2019-06-24 12:36:26 -04:00
Beat Küng 6956d85e10 mc rate controller: add I term reduction factor
Reduce the I gain for high rate errors to reduce bounce-back effects after
flips. Up to 200 degrees the gain is almost not reduced (<25%), so this
will only take noticeable effects for large errors (setpoint changes),
where we actually want to have an effect.

This allows to increase the MC_*RATE_I parameters w/o negative effects
when doing flips (i.e. bounce-back after flips).

The 400 degrees limit and the x^2 are empirical.

The better the rate tracking in general (high P gain), the less this is
required (because of the lower tracking error). At the same time it also
does not harm, as the i_factor will always be close to 1.
2019-06-24 11:56:57 -04:00
David Sidrane 011f4990ff Add CUAV 5+ and Nano to fmu-v5 manifest
* rcS: Set SYS_USE_IO for Nano
2019-06-22 18:30:54 +02:00
Martina Rivizzigno 413acc57be reset the position lock only if current triplet latitude and longitude
are valid
2019-06-12 14:21:16 -04:00
Matthias Grob 0c110a4443 vtol_att_control: apply multicopter takeoff hotfix also for vtol (#12250)
Please see reference:
https://github.com/PX4/Firmware/issues/12171
2019-06-12 14:16:06 -04:00
Matthias Grob ea48cd4970 Takeoff: address @RomanBapst's review comments 2019-05-22 22:05:38 +02:00
Matthias Grob 1c776f16ec mc_att_control: fix applying not updated thrust setpoint 2019-05-22 22:05:38 +02:00
Matthias Grob 953e5e5019 Revert "mc_att_control: fix having high thrust when disarmed"
This reverts commit 0c81a19decde6ddfe4ce87c34c762ea15fd3ab09.
2019-05-22 22:05:38 +02:00
Matthias Grob fac3e1c3f9 mc_pos_control: switch back to velocity ramp
But fix the two crucial problems:
- When to begin the ramp?
There's a calculation now for the velocity ramp initial value
such that the resulting thrust is zero at the beginning.
- When to end the ramp?
The ramp is applied to the upwards velocity constraint and it
just ramps from the initial value to the velocity constraint
which is applied during flight. Slower/going down is always possible.
2019-05-22 22:05:38 +02:00
Matthias Grob 90c6fea408 mc_pos_control_params: user friendly default spool/rampup times 2019-05-22 22:05:38 +02:00
Matthias Grob 856d129bf8 mc_pos_control: fix updating takeoff state when no flight task is running
Without always updating the takeoff state it will not get skipped when
the takeoff happened manually and when you switch from manual to position
mode the drone goes to idle and falls.
2019-05-22 22:05:38 +02:00
Matthias Grob a9f0981aaf mc_pos_control: fix adjusting the wrong setpoint
There are two local_position_setpoint in the position controller.
One describing the setpoint the task gives to the position controller
and a second one with the output of the position controller. I corrected
the wrong one during takeoff because the new takeoff thrust ramp runs after
the controller and not before.
2019-05-22 22:05:38 +02:00
Matthias Grob ad6eb19f09 Add a Takeoff class to handle multicopter takeoff
In a deterministic way with clear states to go through.
2019-05-22 22:05:38 +02:00
Matthias Grob da533a7b1d mc_pos_control: replace takeoff velocity ramp with thrust ramp
The velocity ramp had problems with:
- different vehicle tunings resulted in the start value of the resulting
thrust ramp staring either higher and lower than zero thrust.
lower -> delay of beginning
higher -> small jump at beginning
- when a task set position and velocity at the same time during takeoff
(which AutoSmoothVel does) it resulted in a velocity setpoint
jump at the end of the ramp because the additional velocity
setpoint correction from the position controller was not considered.

The thrust ramp should now be very deterministic:
- always start at zero
- always end at the curreant thrust setpoint output
of the complete position controller
2019-05-22 22:05:38 +02:00
bresch bb055fdaf3 AutoSmoothVel - Override checkTakeoff with task-specific logic and reactivate z axis with downward velocity to takeoff smoothly 2019-05-22 22:05:38 +02:00
Matthias Grob 7c7d980cf0 FlightTasks: fix takeoff trigger for offboard 2019-05-22 22:05:38 +02:00
Matthias Grob e73218d665 mc_pos_control/FlightTasks: trigger takeoff based on task
The initial idea of the flight task architecture was that
a task can freely set it's setpoints and doesn't have to
worry about takeoff and landing. It would just takeoff
when it's landed and there's a setpoint to go up and
land when it puts a setpoint that pushes into the ground.
With the takeoff logic there are some significant interface
problems depending on the way a task is implemented:
From the setpoint is not high enough to trigger to
an unexpected takeoff because of some estimator
fluctuation affecting the setpoint. It's easiest to solve this
by allowing the task to determine when a takeoff is triggered.
If no condition is implemented by default a task is not
allowing a takeoff  and cannot be used to get the vehicle
off the ground.
2019-05-22 22:05:38 +02:00
Matthias Grob 9ba748e67e mc_att_control: fix having high thrust when disarmed
After boot the user is in manual mode and if he has an RC
but doesn't switch out the thrust gets set to the throttle stick
position. When he then starts a takeoff from tablet the thrust is still
high while arming and the land detector immediately sees a takeoff
skiping smooth takeoff from the position controller.
2019-05-22 22:05:38 +02:00
Matthias Grob ae96e16c73 mc_pos_control: initialize takeoff altitude reference
according to @dagar's review comment.
2019-05-22 22:05:38 +02:00
Matthias Grob 8036efd7f2 mc_pos_control: refactor takeoff trigger conditions to be positive 2019-05-22 22:05:38 +02:00
Matthias Grob 5e23883376 mc_pos_control: fix smooth takeoff ramp
- start from a velocity setpoint pushing into the ground
to ramp from idle thrust up.
- start with a bit higher velocity setpoint threshold to make
sure the vehicle has a chance to really get off the ground.
- calculate ramp slope from initialization setpoint to the desired one
instead from zero to the desired. this ramps up quicker when you demand
a very small upwards velocity like the AutoLineSmoothVel and
ManualPositionSmoothVel tasks do at the beginning.
- don't stay in the takeoff ramp depending on the land detector, this
is unnecessary.
2019-05-22 22:05:38 +02:00
Matthias Grob bc77302fc9 mc_pos_control: refactor smooth takeoff names
The comments and variable names were partly misleading.
I grouped all members, hopefully gave them more
understandable names and adjusted the comments.
2019-05-22 22:05:38 +02:00
Matthias Grob 6d5d09c231 mc_pos_control: refactor smooth takeoff call
There were two rather confusing function calls one to check
if smooth takeoff needs to be ran and one that updates it.
I combined them and documented the interface correctly
making the parameters non-reference const floats.
2019-05-22 22:05:38 +02:00
TSC21 3413df19e8 astyle: add microRTPS related code for format check and fix 2019-05-22 11:49:02 +02:00
TSC21 b3435dd1f5 microRTPS_transport: use preprocessor declarations to setup different build contexts for client and agent code 2019-05-22 11:49:02 +02:00
TSC21 f0447e0009 microRTPS_agent_CMakeLists.txt.template: add header files to micrortps_agent executable build 2019-05-22 11:49:02 +02:00
TSC21 95f144dfb7 msg.idl.template: do not generate typdefs for builtin types (not required) 2019-05-22 11:49:02 +02:00
TSC21 110a7931e4 microRTPS bridge generation: improve fastrtpsgen verbosity 2019-05-22 11:49:02 +02:00
TSC21 3536c9dddc RTPS IDL: fix const names; make IDL template similar to rosidl_generator_dds_idl/resource/msg.idl.em 2019-05-22 11:49:02 +02:00
Daniel Agar f0cd79953f create PX4Barometer class 2019-05-20 13:12:49 -04:00
Daniel Agar a883d8eff9 PX4Magnetometer now functional 2019-05-20 13:12:49 -04:00
Julian Oes 12374490cb visibility.h: clean up includes, add comments
This tries to make the visibility.h header clearer and better
structured. We don't actually need the ifdef for lockstep enabled or
disabled because that's now handled elsewhere.
2019-05-20 12:39:02 -04:00
Julian Oes 84537921e9 visibility.h: fix missing headers 2019-05-20 12:39:02 -04:00
Julian Oes 7a768dbab3 lockstep_scheduler: always use the same code
This define was not set anyway, and in my opinion we should
not use different code for tests anyway.
2019-05-20 12:39:02 -04:00
Julian Oes 52099f5792 cmake: include lockstep_scheduler test
This makes sure we add the lockstep_scheduler_test even if the
ENABLE_LOCKSTEP_SCHEDULER is not set to yes. This means the
lockstep_scheduler is not used for SITL but the CMakeLists.txt file
still used and the test added.
2019-05-20 12:39:02 -04:00
Julian Oes 8d8799097d lockstep_scheduler: convert test to gtest 2019-05-20 12:39:02 -04:00
Daniel Agar 162405479b device drivers lib add linux spi support 2019-05-20 12:18:56 -04:00
David Sidrane ed8c6019d5 Added TI ina226 I2C power monitor (#11755) 2019-05-17 13:33:48 -04:00
Timothy Scott d78a842ca8 Rover: add airframe configuration for Aion R1 Rover (#12026)
* Added Aion R1 airframe
* Tuned PID values for Aion R1
* Changed to generic mixer and cleaned up configuration
2019-05-17 08:51:16 -04:00
bresch feefbb444b ManualSmoothVel - Remove unused _param_mpc_jerk_min declaration 2019-05-17 14:15:29 +02:00
Mathieu Bresciani 4b2d01dea1 MPC parameters - Update from Matthias' comments
Co-Authored-By: Matthias Grob <maetugr@gmail.com>
2019-05-17 14:15:29 +02:00
bresch b726d8df0d Add jerk parameter for auto mode MPC_JERK_AUTO. Specify when a parameter is only used in a certain manual or auto mode 2019-05-17 14:15:29 +02:00
Beat Küng 011aef5464 px4_poll posix: fix wrap-around for large timeouts
timeout is an int, so it wraps when the poll timeout is >2147ms.
This happened in logger, resulting in poll never returning.
2019-05-17 07:53:33 -04:00
Julian Oes 9d8015d029 modules/lib: ignore address-of-packed-member
For now we need to ignore this warning which GCC 9 shows for the MAVLink
headers.
2019-05-16 13:06:25 +02:00
Julian Oes b20feacdb5 drivers: fix -Wstringop-truncation
GCC 9 complained about stringop-truncation which is a cautionary message
to prevent using strncpy with non-null terminated strings.

We can fix this by copying one byte less than the destination size and
then manually adding the null termination, as we already do.
2019-05-16 13:06:25 +02:00
TSC21 3ab75b83ce microcdr and IDL: remove field ordering, causing improper serialization/deserialization 2019-05-16 12:02:24 +02:00
Matthias Grob bff93685a5 pull_request_template: order and phrasing
Since I reorder the points every time I open a pull request I thought I might as well propose this order for the template.
2019-05-16 09:43:34 +02:00
Julian Oes 01fdd00c41 init.d-posix: $ is apparently not needed here 2019-05-14 11:04:04 +02:00
Julian Oes ffeeedc310 init.d-posix: raise timeouts for fast SITL
When simulating with lockstep we can raise the speed by setting the env
variable `PX4_SIM_SPEED_FACTOR`. Some inputs like RC, MAVLink heartbeats
from a ground station, or offboard controls via MAVLink are still at the
normal speed which leads to timeouts getting detected in PX4.

To work around this issue we can automatically multiply the timeout
parameters by the speed factor.
2019-05-14 11:04:04 +02:00
Daniel Agar f067ca0d8f fmu-v2 & fmu-v5 add missing tone_alarm to example board variants
- fixes #12012
2019-05-13 15:49:22 -04:00
Julian Oes 79651ed6a4 launch: count multi UAVs from 0
This fixes the IDs of multi UAVs started with ROS/Gazebo.

Previously the 3 vehicles were displayed in QGC as Vehicle 2, 3, 4.
With this change it is more intuitive Vehicle 1, 2, 3 and this is
also consistent with the way it is documented and how it is in
jMAVSim.
2019-05-13 10:33:17 +01:00
Oleg Kalachev 77097b6adc commander: update commander status when offboard control mode changed 2019-05-11 10:30:57 -04:00
Bart Slinger ebf8bc898a fix bebop upload script 2019-05-11 14:39:42 +01:00
Julian Oes e80d3940a6 jmavsim_run.sh: enable SDK UDP port
We forgot to add the option -s for jmavsim_run.sh which starts jMAVSim
with the UDP port connecting to the SDK (port 14540).
2019-05-09 18:27:14 +02:00
Julian Oes d2ab31f0d7 jMAVSim: update submodule
This fixes cross-talk between the QGC and SDK UDP ports for HITL.
2019-05-09 18:27:14 +02:00
Julian Oes e1f42ae767 sitl_run.sh: use tabs, not spaces 2019-05-09 12:02:56 -04:00
Julian Oes abed18dd0d sitl_gazebo: update submodule
This brings support for UDP port 14550 and 14540 for HITL simulation.
2019-05-09 12:02:56 -04:00
Matthias Grob 868b4e1746 Testing: correct license headers 2019-05-09 09:42:46 +02:00
Matthias Grob cbd230e34e Testing: Clean up unit_test target because test_results does all tests now 2019-05-09 09:42:46 +02:00
Matthias Grob d8e0d641a5 Makefile: fix reconfigure check passing with prefix substring
Example: Before when you passed "make tests TESTFILTER=Attitude"
and subsequently "make tests TESTFILTER=Atti" it found the string
"TESTFILTER=Atti" in "TESTFILTER=Attitude" and hence the check if
the configuration is already correct passed. The fix checks for
the configuration parameter including the subsequent space separator
and after that strips the space away again such that the list
VERIFIED_CMAKE_OPTIONS doesn't contain trailing spaces.
2019-05-09 09:42:46 +02:00
Matthias Grob 542f61f04b testing build: add possibility to filter tests with ctest regex 2019-05-09 09:42:46 +02:00
Matthias Grob 5a90382cb8 sitl_tests: add prefix "sitl-" for regex test filtering 2019-05-09 09:42:46 +02:00
Matthias Grob 5020dfdc3d Testing: switch unit tests to BUILD_TESTING 2019-05-09 09:42:46 +02:00
Matthias Grob 01e9b2cde8 AttitudeControlTest: compare vectors, not every element 2019-05-09 09:42:46 +02:00
Matthias Grob f5f95635b4 gtest: fix poisoned exit in compile flags
visibility.h is included globally in PX4 via cmake compile flags.
It contains poisoning the exit() command which is used by gtest
to close the test application. Removing the flag for gtest compilation
fixes the compile error:
gtest.cc:4757:7: error: attempt to use poisoned "exit"
2019-05-09 09:42:46 +02:00
Matthias Grob 8eb0d66279 gtest: download specific version 2019-05-09 09:42:46 +02:00
Matthias Grob 2cd0344712 AttitudeControlTest: fix style 2019-05-09 09:42:46 +02:00
Matthias Grob 0ff64bf101 Improve ctest unit test naming and filtering 2019-05-09 09:42:46 +02:00
Matthias Grob 63b967f5df Add unit testing possibility using googletest on POSIX 2019-05-09 09:42:46 +02:00
Roman Bapst 816aa0ffb6 VTOL transitions: use FW attitude loop (#11911)
* VTOL trans: changed that now in transition for both MC and FW the corresponding (correct) attitude controller is running
* attitude setpoint for stabilized mode is generated by tailsitter.cpp
* reset yaw setpoint during transition to avoid big yaw errors after
transition back to hover
* VT_TYPE parameter: added "reboot required" metadata
2019-05-08 10:33:13 -04:00
Daniel Agar d4b7441d12 Update submodule ecl to latest Wed May 8 12:38:58 UTC 2019 (#11972)
- ecl in PX4/Firmware (fa1fbed24633aef7985a128ebd4d19a7f6a4d108): https://github.com/PX4/ecl/commit/c4492b17c1d7bb9b74011efa9890452b091421e8
    - ecl current upstream: https://github.com/PX4/ecl/commit/a27a43eafa8f4dd514e89984f5394260a36ea4f6
    - Changes: https://github.com/PX4/ecl/compare/c4492b17c1d7bb9b74011efa9890452b091421e8...a27a43eafa8f4dd514e89984f5394260a36ea4f6

a27a43e 2019-05-01 Hamish Willee - Fix up link to EKF docs
3f69189 2019-04-04 Mohammed Kabir - EKF: control: stop vision yaw fusion on timeout
2019-05-08 09:56:16 -04:00
Beat Küng 1169d091b6 ToneAlarm: ignore topic updates with 0 timestamp
Commander initially publishes a tune_control topic set to 0, which can
interfere with the startup tone (as happening on the Pixhawk Cube).
2019-05-08 14:16:30 +02:00
Matthias Grob f30f12341f PositionControl: tiny minimal thrust length
To be able to still infer the direction of the thrust vector we
limit it to a minimal length even if MPC_THR_MIN is set to zero.

Note: This is a hotfix for certain specific applications.
The direction of the thrust vector in this corner case is very
likely to get into the tilt limit which is generally undesired.
2019-05-08 03:08:45 -05:00
斯东Stone b35be4b0a6 Fix typo in drivers/lights/CMakeLists.txt 2019-05-08 08:18:37 +02:00
bresch 02f0533ee9 Commander - Remove old code that overrides state_machine_helper logic 2019-05-07 17:45:28 +02:00
bresch 6d8d8e3c88 MC gyro cutoffs - Reduce IMU_GYRO_CUTOFF to 30Hz and disable MC_DTERM_CUTOFF.
A low gyro cutoff is needed for most medium/large size drones as the structural natural and blade-pass frequencies are low.
A higher value is still desirable for small platforms surch as racers
or well isolated autopilots and should be tuned by the user.
Specific values for config files are untouched.
The cutoff filter for the D term is disabled here as the required
cutoff frequency for the default D term of the rate controller is higher
than the gyro cutoff. In that case, enabling the D term cutoff would
just add some undesired phase lag to the derivative.
2019-05-07 12:15:51 +02:00
Daniel Agar 72b898fbf6 vscode minor settings update (#11978)
- minimap size and display
 - title bar show file path and if modified
 - disable natural language search (sends keystrokes to Bing)
2019-05-06 16:37:43 -04:00
Daniel Agar 3d22da9cbe wind_estimator fix true airspeed usage 2019-05-06 15:25:33 -04:00
Daniel Agar 317e8cda64 Update submodule jMAVSim to latest Mon May 6 12:38:30 UTC 2019 (#11974)
- jMAVSim in PX4/Firmware (7ec6f0dca6): https://github.com/PX4/jMAVSim/commit/79586deda5176c37de7804904f2553c8547edc4a
    - jMAVSim current upstream: https://github.com/PX4/jMAVSim/commit/ae1593d0c8d6f3860081dff04ada1cacda4c8087
    - Changes: https://github.com/PX4/jMAVSim/compare/79586deda5176c37de7804904f2553c8547edc4a...ae1593d0c8d6f3860081dff04ada1cacda4c8087

ae1593d 2019-04-30 Julian Oes - Merge pull request #100 from PX4/fix-port-default
9de8f86 2019-04-29 Julian Oes - Simulator: fix default for QGC and SDK link
d42efaf 2019-04-29 Julian Oes - Merge pull request #99 from PX4/pr-add-sdk-port
7d0bebb 2019-04-26 Julian Oes - Simulator: fix copy paste mistake
a94816e 2019-04-26 Julian Oes - Simulator: add MAVLink UDP port for SDK
6a9634b 2019-04-26 Julian Oes - Visualizer3D: ran fix_style.sh
2019-05-06 13:50:41 -04:00
Daniel Agar f4e5b2bf77 Update submodule mavlink v2.0 to latest Mon May 6 12:38:37 UTC 2019 (#11973)
- mavlink v2.0 in PX4/Firmware (0d543e29bb4535df9654c1f3a7c8f0712e81a120): https://github.com/mavlink/c_library_v2/commit/d8c4e5def38f2ff6079087e579693b4bd9552584
    - mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/57000134021fb8d5c2c6281e3783ce29bb35bc17
    - Changes: https://github.com/mavlink/c_library_v2/compare/d8c4e5def38f2ff6079087e579693b4bd9552584...57000134021fb8d5c2c6281e3783ce29bb35bc17
2019-05-06 13:16:25 -04:00
Julian Oes 0a978f51e6 px4_atomic: use volatile hack for Snappy
It looks like the atomic builtins are not available using QuRT and the
Hexagon toolchain, so our best bet is to use `volatile` for the atomics.
2019-05-06 12:06:01 -04:00
Julian Oes e6621bf7fb boards: ignore sih for Snappy
When sih (simulation in hardware) was compiled for Snapdragon, we got
the linking problem below. I'm not sure why, supposedly the symbol
`double sin(double)` is missing.

undefined PLT symbol _LSin (705) /libpx4.so (symbol.c:303)
2019-05-06 12:06:01 -04:00
Oleg Kalachev 7ec6f0dca6 lpe: use minimum flow altitude from uORB instead of hardcoding 2019-05-05 02:57:58 -05:00
David Sidrane 07e6730cd7 Add nxp_fmuk66-v3 to QGC deploy
See https://github.com/mavlink/qgroundcontrol/issues/7360
2019-05-04 09:14:35 -05:00
Beat Küng 2448a84c36 SITL: add if750a model 2019-05-03 13:32:48 +02:00
Claudio Micheli e7075a6660 rcS: Fix multiple set IO_PRESENT.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-05-03 12:20:49 +02:00
Julian Oes 7dc10d2bea CMakeLists.txt: fix cmake warning
It implicitly converted STRINGS to STRING.
2019-05-02 16:26:37 -05:00
bresch 881d0f4143 UAVCAN - update ROMFS_FW_PATH to /etc/uavcan/fw. to match documentation 2019-05-02 16:22:33 -05:00
Beat Küng 74990cadc8 uorb: avoid printf while DeviceMaster is locked
This fixes a potential dead-lock when 'uorb status' was used via MAVLink
shell.
The dead-lock chain is: DeviceMaster::lock() -> printf -> output to a pipe,
which blocks until a reader reads the data. In that case it's mavlink.
If mavlink makes a call that requires DeviceMaster::lock() (such as
orb_exists), it dead-locks.

This patch moves all printf's out of the locked state.
2019-05-02 10:26:41 +02:00
Matthias Grob 29719894f7 AttitudeControl: remove unused setter 2019-04-30 23:18:44 -05:00
Julian Oes 9e96c4a4ea sitl_gazebo: update submodule (#11939)
This should fix the regression where the mag values were not properly
initialized and caused EKF2 to stop in CI.
2019-04-30 23:18:04 -05:00
Julian Oes 611417acd2 ROMFS: use auto-disarm in HITL Gazebo with Iris
It is expected that Iris auto-disarms the same as in SITL.
2019-04-30 06:39:35 -05:00
Matthias Grob 269d077fae ekf2: only check ground effect if it's configured 2019-04-30 12:34:28 +02:00
Roman f034d2da19 ekf2: fixed bug in baro ground effect triggering logic
- when either terrain data was temporarily not valid (flying at high
distance to the ground) or the vehicle was not close to the ground
(_param_ekf2_gnd_max_hgt) the ekf switched to using the land detector
ground effect flag.

Signed-off-by: Roman <bapstroman@gmail.com>
2019-04-30 12:34:28 +02:00
Daniel Agar 9bad61b86b Improve robustness to bad and lost airspeed data (#11846) 2019-04-30 03:08:23 -04:00
Daniel Agar 59ebb9af0a Update submodule mavlink v2.0 to latest Tue Apr 30 00:39:26 UTC 2019 (#11926)
- mavlink v2.0 in PX4/Firmware (a26c25ca5bd0168dd2274dd8aa0392aba10feff2): https://github.com/mavlink/c_library_v2/commit/c6ab0459343c78a6a424514b5f64fa65d8cc0cf8
    - mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/d8c4e5def38f2ff6079087e579693b4bd9552584
    - Changes: https://github.com/mavlink/c_library_v2/compare/c6ab0459343c78a6a424514b5f64fa65d8cc0cf8...d8c4e5def38f2ff6079087e579693b4bd9552584
2019-04-30 03:05:25 -04:00
Roman 2bd8b517c5 FwPositionControl: don't do takeoff help for vtol
- takeoff help is used for fixed wings, it increases the altitude setpoint
after a launch. A vtol does not need this as it's already sufficiently
high up in the air.

Signed-off-by: Roman <bapstroman@gmail.com>
2019-04-30 02:45:49 -04:00
Daniel Agar 5d7a82b8e2 av/x-v1 support PMW3901 on SPI2 (now treated as external) 2019-04-30 02:27:29 -04:00
Daniel Agar db5dbb25b3 av/x-v1 board support cleanup and sync with fmu-v5 2019-04-30 02:27:29 -04:00
Matthias Grob 56591954ad Commander: reevaluate RC mode on altitude lock 2019-04-29 13:24:29 -04:00
Daniel Agar f032d0d9fc SYS_MC_EST_GROUP mark LPE unsupported and update airframes (#11925) 2019-04-29 11:50:36 -04:00
Daniel Agar 2142459027 Revert "simulator: remove hack for diff_pressure noise"
This reverts commit 4a71984f77.
2019-04-29 10:46:38 -04:00
Daniel Agar d93efa9169 Revert "sitl_gazebo: update submodule"
This reverts commit 585b9d8cf1.
2019-04-29 10:46:38 -04:00
Julian Oes 4ef59e0a59 standard_vtol: transition at airspeed of 16 m/s
This way we prevent a big dip due to TECS in altitude when the
transition happens at 10 m/s already. Apparently the rule of thumb
is to set this transition speed at the same as airspeed cruise speed.
2019-04-28 18:22:21 -04:00
Julian Oes 4a71984f77 simulator: remove hack for diff_pressure noise
The noise for airspeed is now applied on the Gazebo side and we can
remove this hack.
2019-04-28 18:22:21 -04:00
Julian Oes 585b9d8cf1 sitl_gazebo: update submodule
Includes:
- Fix for vibration on ground for standard_vtol.
- Noise for diff pressure / airspeed on Gazebo side.
- Fix for macOS magnetometer plugin linking error.
2019-04-28 18:22:21 -04:00
Matthias Grob 3bf5d6af12 commander: fix RC mode switch not getting applied after boot
the condition to enter the rc mode switch evaluation was neglecting
the first connection of an RC when "no RC switch changed". this means
depending on the actual initialization values of _last_sp_man and the
desired mode preselected on the RC while connecting it would not get
evaluated.
2019-04-26 21:04:10 +02:00
Matthias Grob f177a68da9 commander: negate main_state_rc entering condition
pure refactor using De Morgan's law to make the condition more intuitive
since you think about when should I enter and not when should I skip
2019-04-26 21:04:10 +02:00
Matthias Grob 1f3ebd98b1 commander: split up set_main_state_rc entering condition
pure refactor of the huge condition into smaller const bool junks
2019-04-26 21:04:10 +02:00
Matthias Grob 21194239c7 FlightTaskAuto: revisit yaw rate limit
There were multiple comments not addressed in pr #11904.
See commit 4bcb37f9bc9ef20b521ebcf33e7a0ed08fa86ccd
2019-04-26 18:58:50 +02:00
Beat Küng c3ac1497c0 mpu9250: fix mag publishing garbage on IMU failure (SPI only)
The Pixhawk cube as an internal mag on SPI. If there was a bad register
read (e.g. on an IMU failure), _register_wait was non-zero and there was
no transfer but _mag still published mpu_report.mag.
2019-04-26 18:49:28 +02:00
Thijs Raymakers 33fe69a3e8 adis16497: fix TEMP_OUT conversion according to the datasheet 2019-04-26 15:22:06 +02:00
bresch 89bc68e12b Auto - Rename MC_YAWRAUTO_MAX -> MPC_YAWRAUTO_MAX 2019-04-26 12:43:26 +02:00
bresch 581d25f77f Auto mode traj - limit yaw setpoint rate of change when generated in the flight task instead of clamping the yaw rate in the controller
Move yaw setpoint slew rate from AutoLineSmoothVel to Auto. The slew rate is now applied consistently to all the auto FlightTasks
2019-04-26 12:43:26 +02:00
mcsauder e6b427022a Add missing underscore prefix to a member variable in mavlink_main.cpp.h and delete unnecessary struct specifiers in mavlink_main.h. 2019-04-26 11:33:17 +02:00
mcsauder 73fb30f251 Migrate an additional set of 16 variable initilializations from the Mavlink class constructor list to their respective declarations. 2019-04-26 11:33:17 +02:00
bresch 903deb7579 RTL - Skip descend state if no delay is set between descend and land 2019-04-25 18:24:04 +02:00
Alexis Paques 5763787840 Adding narg to allow empty arguments 2019-04-25 09:56:06 +01:00
misswhile 37fe090225 fix bmp280 driver init faild. 2019-04-25 10:19:12 +02:00
Julian Oes c95394f57f navigator: fix uninitalized param values
By declaring the params above the navigator modes inheriting from
mission block we make sure the params in navigator are set before
read in the constructor of mission block.
2019-04-24 11:15:43 -04:00
Julian Oes 90ee26dd2d mavlink_mission: properly initialize padding
This prevents uninitialized padding from being written to dataman.
2019-04-24 11:15:43 -04:00
Julian Oes 4c56994d7a mavlink_system: set update_counter for safe points
This variable was not set and lead to uninitialized memory being written
to dataman.
2019-04-24 11:15:43 -04:00
Julian Oes bf32ff32f8 dataman: make _file_write more readable
This should not be any functional change. The only difference are the
variable scopes, and early return versus nested ifs.
2019-04-24 11:15:43 -04:00
Julian Kent dc3341db59 Fix uninitialized memory found using Valgrind 2019-04-24 11:15:43 -04:00
Julian Oes a9c3bce20d px_uploader.py: fix version check
Presumably older versions of pyserial do not implement __version__ but
only VERSION, so we need to check for that as well.
2019-04-24 14:47:10 +02:00
Roman 42d0522cdd FixedWingAttitudeControl: removed check for negative airspeed and slew rate
on airspeed scaling

Signed-off-by: Roman <bapstroman@gmail.com>
2019-04-24 14:27:37 +02:00
Daniel Agar 36aeb9defc WIP: FW attitude control limit airspeed scaling changes per iteration 2019-04-24 14:27:37 +02:00
Martina Rivizzigno eba0bb389a ObstacleAvoidance: fix comment, update failsafe position if one axis is NAN 2019-04-24 08:54:50 +02:00
Martina Rivizzigno e037edd2cc ObstacleAvoidance: once the commadand loiter has been sent, keep using
the first position when the oa fails as setpoint to avoid jumps
2019-04-24 08:54:50 +02:00
Paul Riseborough 0f346af226 ekf2: Improve parameter description
Inhibiting bias estimation using the EKF2_AID_MASK parameter only applies to the delta velocity bias states.
2019-04-24 06:55:54 +02:00
Daniel Agar d8a1a79f69 Mavlink: SYS_STATUS trivial style check fix 2019-04-23 08:48:11 -04:00
jdzerve 2e9d0f0751 Mavlink: Get full sensor status even if only subset has changed when composing SYS_STATUS message (#11886) 2019-04-23 08:31:13 -04:00
Arkadiusz Niemiec c50c44cc58 Add a boolean to cleanly exit sender thread 2019-04-21 10:40:25 +01:00
Julian Oes c78aaeb0f7 ak09916: fail if device is not found
This should fix the case where the driver initializes even though the
device is not found. The change changes the behavior to return ERROR
if the whoami call fails several times instead of returning OK.

Also, the reset() and thus probe() calls are moved before initializing
the ringbuffer and device name.
2019-04-20 12:52:56 +02:00
liubaoxu db37cd8c71 BMP280:fix definition misspelling
from BPM280 to BMP280
2019-04-20 08:52:06 +02:00
David Sidrane 2b68076663 Update Nuttx with F7 i2C fixes 2019-04-18 08:55:50 +02:00
baumanta c0a1f5b72f Collision prevention improvements (#11866)
* match max vel in col-prev to regular pos ctrl
* change warning criterium to avoid float error
* disable push back from obstacles
* use floats consistently
2019-04-17 13:20:29 -04:00
Roman 463b8a7528 vtol_att_control: respect min pwm values
Signed-off-by: Roman <bapstroman@gmail.com>
2019-04-17 09:13:27 +02:00
Dennis Millard 70681f990f BMI055 IMU driver fix temperature reporting 2019-04-16 22:53:16 -04:00
sfuhrer 3d36dbfba3 added babyshark VTOL config file and mixer 2019-04-16 11:05:35 -04:00
Mark Sauder 74bc6870ed simulator: uorb and initialization cleanup (#11825)
* Cherry pick the vehicle_imu PR #9756 src/modules/simulator directory work to submit as standalone PR.

* Modify the accelsim init method mag_report usage to match usage in measure() and mag_measure() methods in the class.

* Incorporate review comments in the accelsim.cpp init() method and also make the same modifications in gyrosim.cpp.

* Delete unneeded mag_report initialization from accelsim init() method.

* Deprecate unneeded measure() call from accelsim.cpp init() and gyrosim.cpp init().
2019-04-16 08:29:53 +02:00
Gabriel Moreno f9324fb76a mavlink: set correct distance_sensor timestamp. Fixes #11840
When PX4FLOW is connected to PX4 through MAVLink (e.g., through a USB
port), the timestamp assigned to the distance_sensor was wrong. This fix
uses the same timestamp assigned to the optical_flow message created from
the same OPTICAL_FLOW_RAD MAVLink message.

Signed-off-by: Gabriel Moreno <gabrielm@cs.cmu.edu>
2019-04-15 20:31:15 +02:00
bresch 93d52581ef Auto - Fix cruise speed. Tested with and without SDK. Before that commit, the drone files at max speed instead of cruise speed if not precised by the SDK 2019-04-15 16:32:26 +02:00
Beat Küng 226f3c0999 rc.board_sensors: probe for external qmc5883 2019-04-15 10:37:06 +02:00
Daniel Agar d36b06f779 fw_pos_control_l1: FW_LND_EARLYCFG disable by default
- change to boolean param
2019-04-13 17:35:12 +02:00
Daniel Agar 6d30b13afa update Tools/setup/ dev environment setup scripts
- Ubuntu install NuttX toolchain, gazebo, and switch to python3
 - OSX switch to python3
2019-04-12 10:43:21 -04:00
Julian Oes e88f1b33b2 FlightTasks: fix mission DO_CHANGE_SPEED
This fixes the issue where the  DO_CHANGE_SPEED command was ignored and
the drone always travelled at the MPC_XY_CRUISE velocity.
2019-04-12 15:47:36 +02:00
Matthias Grob 1454694bdd FlightTaskAuto: separate default speed and limit
It wasn't possible to fly faster than cruise speed even if planned
in the mission.

Limiting the planned cruise speed is necessary because
the smoothed trajectory mission plans to the _mc_cruise_speed and
if that's higher than the maximum it gets capped for safety by the
position controller and the result is a jerky flight.
2019-04-12 15:47:36 +02:00
Beat Küng 3135f9f0d2 sih: avoid static variable + style fixes 2019-04-12 09:25:07 +02:00
romain 65f623bd73 acceleration added when hitting the ground 2019-04-12 09:25:07 +02:00
romain 7be1cc389e removed arguments from constructor 2019-04-12 09:25:07 +02:00
Beat Küng 744b50b478 send MAVLink GROUND_TRUTH at 25 Hz, only in SIH mode. And minor cleanup 2019-04-12 09:25:07 +02:00
romain 9adb4410bd newline added at the end of files 2019-04-12 09:25:07 +02:00
romain 8b6480c1cf sih.msg removed, serial port communication removed 2019-04-12 09:25:07 +02:00
romain e8c5d85525 sih param names cleanup 2019-04-12 09:25:07 +02:00
Beat Küng f542736140 'simulation' category added in srcparser.py 2019-04-12 09:25:07 +02:00
romain e1d9438f79 sih: remove SYS_SIH parameter and extend SYS_HITL 2019-04-12 09:25:07 +02:00
romain a9660d9da0 white noise generator updated 2019-04-12 09:25:07 +02:00
romain cdd7e95a92 added a call to px4_sem_destroy() 2019-04-12 09:25:07 +02:00
romain 6ff228c2ff sih module implemented with hrt_call_every and semaphore_wait 2019-04-12 09:25:07 +02:00
Beat Küng 914a9b78b6 new airframe for sih, HIL_STATE_QUATERION sent through MAVLink 2019-04-12 09:25:07 +02:00
romain c09e9ec97f simulator in hardware, new module added that allows to run a simulator in the hardware autopilot, for more documentation visit https://github.com/romain-chiap/PX4_SIH_QuadX 2019-04-12 09:25:07 +02:00
Daniel Agar 4fe9ac9993 vscode add uavcan.dsdl to recommended extensions
- this extension adds support for Data Structure Description Language (DSDL)
2019-04-11 21:04:59 -04:00
Andreas Daniel Antener 95a0803b14 Adding AK09916 driver to support the Here2 GNSS emulated mag (I2C) (#11837)
* drivers, magnetometer: added ak09916 driver to support the mag driver emulated by the Here2 gps
* boards: set yaw 270 rotation for external ak09916 driver and only start it for the PH21
* drivers: only start ak09916 when icm20948 is not available on a ph21 setup
2019-04-11 12:43:50 -04:00
Daniel Agar 5a50f96bcf move icm20948 (Here GPS compass) to Cube sensors start (#11838) 2019-04-11 11:15:53 -04:00
Julian Oes cd9b3d6b27 CI: move no-ninja builds to Jenkinsfile 2019-04-11 10:07:00 +02:00
Julian Oes 471d05381b CI: also build PX4 SITL without ninja 2019-04-11 10:07:00 +02:00
Julian Oes f74aab33ad CI: also build two targets without ninja
This should prevent future regressions when compiling with "Unix
Makefiles" or others instead of ninja as the generator behind cmake.
2019-04-11 10:07:00 +02:00
Julian Oes 5b3a6facfa cmake: fix races without ninja
This fixes build races which happened if "Unix Makefiles" instead of
ninja-build was used as the cmake backend.

For any dependencies of commands on files we need to create a target.
Otherwise, if "Unix Makefiles" are used as the generator the commands
are run in parallel on the different files which often can lead to
races or redundancies in our build.

A nice write-up can be found here:
https://samthursfield.wordpress.com/2015/11/21/
cmake-dependencies-between-targets-and-files-and-custom-commands/#
custom-commands-and-parallel-make
2019-04-11 10:07:00 +02:00
David Sidrane dbd02b1e47 px4io:Detect Running on Cube and set GPIO for heater
Addresses #11832 - configure the mixed use GPIO
   that can be the a BLue LED or a Heater as PUSH
   PULL on Cube as to not let the heater input float.
2019-04-11 08:34:22 +02:00
mcsauder 9540869c20 Alphabetize a few methods and variable orders in mavlink_receiver.h. 2019-04-11 08:31:30 +02:00
Martina Rivizzigno f0ce0646a3 rostest_avoiance_run: bump to avoidance stable release 0.2.0 2019-04-10 16:36:18 -04:00
Chris Lovett b6120f39f3 Merge pull request #11826 from lovettchris/review/add_pwm_out_sim
Add back pwm out sim module so HITL simulation works again.
2019-04-10 09:39:23 +02:00
Alessandro Simovic 4127adf73c addressing comments from #11796 2019-04-10 09:38:53 +02:00
Alessandro Simovic 482a46ab36 Standardising mavlink message strings 2019-04-10 09:38:53 +02:00
PX4 Build Bot 3549354599 Update submodule ecl to latest Tue Apr 9 12:38:37 UTC 2019
- ecl in PX4/Firmware (aed3d80d5982f37e8353d6d07e29c79a9260b086): https://github.com/PX4/ecl/commit/f95cd4b3584d029c35b288a39180ddf25b2dd004
    - ecl current upstream: https://github.com/PX4/ecl/commit/c4492b17c1d7bb9b74011efa9890452b091421e8
    - Changes: https://github.com/PX4/ecl/compare/f95cd4b3584d029c35b288a39180ddf25b2dd004...c4492b17c1d7bb9b74011efa9890452b091421e8

    c4492b1 2019-04-09 Martina - do not reset yaw if vehicle on ground
14227ea 2019-04-08 Julian Oes - CMakeLists.txt: fix cmake warning
f97f0b6 2019-03-30 Paul Riseborough - EKF: Remove unnecessary code
43b5e26 2019-03-02 Paul Riseborough - EKF: Fix bug causing continual yaw reset when EKF2_MAG_TYPE = 2
2019-04-09 17:21:28 +02:00
Julian Kent 911df49045 increase stacks in drivers identified by stackcheck builds 2019-04-09 17:20:50 +02:00
Daniel Agar 0206375de6 logger reduce default topics 2019-04-09 10:14:49 -04:00
Beat Küng d9f8e37288 omnibus: use default clock rate of 20 MHz for SD card (CONFIG_MMCSD_SPICLOCK)
With 24 MHz accesses to the SD card were unreliable. And the chance of
failure recently got worse, so that logging became impossible.
2019-04-08 10:44:30 +02:00
Daniel Agar 6bb93936d1 cmake use ${PYTHON_EXECUTABLE} for mixer test
- needed for code coverage of python scripts
2019-04-07 16:35:31 -04:00
Daniel Agar b9516d7e38 mixer move test_mixer_multirotor into cmake 2019-04-07 16:12:17 -04:00
Daniel Agar d21314c74c vscode add empty kit to quiet user prompt 2019-04-07 14:05:41 -04:00
Matthias Grob eee51ef576 appveyor: cleanup unnecessary leftovers
- platform is optional and matters for Visual Studio builds
- `ver` command shows the windows version
and was just my first CI test
2019-04-07 18:56:51 +02:00
Matthias Grob e94580711b check_submodules: fetch in parallel on CI 2019-04-07 18:56:51 +02:00
Matthias Grob d2a23c8512 appveyor: let build system fetch submodules 2019-04-07 18:56:51 +02:00
Daniel Agar cbb5a25154 Update submodule mavlink v2.0 to latest Sun Apr 7 13:50:46 UTC 2019
- mavlink v2.0 in PX4/Firmware (88f2a6854c): https://github.com/mavlink/c_library_v2/commit/171c83700c6318af9ffb4a7ee733567b55a14543
    - mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/c6ab0459343c78a6a424514b5f64fa65d8cc0cf8
    - Changes: https://github.com/mavlink/c_library_v2/compare/171c83700c6318af9ffb4a7ee733567b55a14543...c6ab0459343c78a6a424514b5f64fa65d8cc0cf8
2019-04-07 10:22:26 -04:00
Matthias Grob 88f2a6854c Appveyor: Enable build matrix for parallel CI targets 2019-04-07 09:28:21 -04:00
Anthony Lamping a3ebe5676f make: tests_avoidance add prerequisite 2019-04-05 10:46:33 -04:00
Julian Oes 4907b87882 sitl_gazebo: update submodule
This should fix the macOS build.
2019-04-05 09:42:34 -04:00
Julian Oes 95ab984f4c commander: fix toggling datalink lost and regained
When using QGC and/or the Dronecode SDK it was possible to get in a
state where the two mavlink instances were both publishing their last
heartbeat_time and cause commander to consistently toggle between
data link lost and regained. With this fix, we only ever look at the
very last heartbeat time and therefore seem to avoid this issue.
2019-04-05 09:25:40 -04:00
Julian Oes 98857b4b94 ROMFS: don't check for UAVCAN_ENABLE param in SITL
This prevents a warning message being printed to SITL users because the
UAVCAN_ENABLE param does not exist.
2019-04-05 08:18:17 +02:00
Julian Oes 82682ac716 init.d-posix: re-use rc.logging
With this change the param SDLOG_MODE can be used for SITL as well.
2019-04-05 08:18:17 +02:00
Beat Küng 0bb5225370 rcS: add airframe parameter versioning and extend SYS_AUTOCONFIG 2019-04-05 08:08:47 +02:00
David Sidrane 46c4a68b62 fmu-v5: Move stage 0 dcache disable to later in boot (#11791) 2019-04-04 11:07:28 -04:00
Martina Rivizzigno 6f5c97f184 ObstacleAvoidance: do not check for loiter nav state twice 2019-04-04 16:41:26 +02:00
Martina Rivizzigno 0dab5d3a11 ObstacleAvoidance: enforce camel case 2019-04-04 16:41:26 +02:00
Martina Rivizzigno c5dfcbc50e cosmetics changes to ObstacleAvoidance library 2019-04-04 16:41:26 +02:00
Martina Rivizzigno e5441a6565 make format 2019-04-04 16:41:26 +02:00
Martina Rivizzigno 34c0bb1723 ObstacleAvoidance: don't inject avoidance setpoint when in
loiter mode since it's the failsafe mode
2019-04-04 16:41:26 +02:00
Martina Rivizzigno 0e27b5cbfa include libraries without the need for full path, make ObstacleAvoidance
instance protected
2019-04-04 16:41:26 +02:00
Martina Rivizzigno 4dcc77b822 ObstacleAvoidance: remove printf and remove unnecessary new lines 2019-04-04 16:41:26 +02:00
Martina Rivizzigno c1258931da rename updateAvoidanceWaypoints->updateAvoidanceDesiredWaypoints and
updateAvoidanceSetpoints->updateAvoidanceDesiredSetpoints
2019-04-04 16:41:26 +02:00
Martina Rivizzigno b165c41737 ObstacleAvoidance: add comments 2019-04-04 16:41:26 +02:00
Martina Rivizzigno aa1b46f85a ObstacleAvoidance library: save current waypoint in global variable
to check progress
2019-04-04 16:41:26 +02:00
Martina Rivizzigno 94f73117c7 reintroduce obstacle avoidance failsafe. If OA fails, switch to loiter 2019-04-04 16:41:26 +02:00
Martina Rivizzigno e464502d2d remove empty_trajectory_waypoint and getter method for avoidance
waypoints in FlightTasks. In obstacle avoidace library reset desired
avoidance waypoints after publication
2019-04-04 16:41:26 +02:00
Martina Rivizzigno 34b0f33098 move all obstacle avoidance interfaces to the ObstacleAvoidance library 2019-04-04 16:41:26 +02:00
Martina Rivizzigno 4e806d79fe inject avoidance setpoints into AutoMapper 2019-04-04 16:41:26 +02:00
Martina Rivizzigno 320ed40806 use subscription array in ObstacleAvoidance library 2019-04-04 16:41:26 +02:00
Martina Rivizzigno a9bab81eb8 make format 2019-04-04 16:41:26 +02:00
Martina Rivizzigno 8c24ba9255 move injection of avoidance setpoints to flight task library 2019-04-04 16:41:26 +02:00
Burak Han d2a0c857ed sf0x.cpp: change baudrate to 115200 for SF11/C 2019-04-04 10:17:50 +02:00
Alexis Paques 7a5aaa33b2 Fix @property and super function does not work properly if the 'NewStyle' class type is not used.
https://lgtm.com/rules/10030086/
2019-04-03 22:53:10 -04:00
PX4 Build Bot 7a27284d75 Update submodule ecl to latest Thu Apr 4 00:38:15 UTC 2019
- ecl in PX4/Firmware (3a004d13dc13d81403ae3873d5109c0503a4f964): https://github.com/PX4/ecl/commit/a892ececf8490b21aa8917bc243b2bc441af6a87
    - ecl current upstream: https://github.com/PX4/ecl/commit/f95cd4b3584d029c35b288a39180ddf25b2dd004
    - Changes: https://github.com/PX4/ecl/compare/a892ececf8490b21aa8917bc243b2bc441af6a87...f95cd4b3584d029c35b288a39180ddf25b2dd004

    f95cd4b 2019-01-22 Roman - ground effect: removed dependency on local position
7845ff4 2019-01-23 CarlOlsson - EKF: increase wind process noise scaler to 0.5
32ca6f7 2018-10-24 CarlOlsson - ekf: scale wind process noise with low pass filtered height rate
938c8ad 2019-02-04 CarlOlsson - EKF: use hagl estimate if valid for when to trigger yaw reset on takeoff
8b4ae48 2019-03-05 Hamish Willee - README: Fix link to EKF/ECL tuning guide
f0889c1 2019-03-18 Carl Olsson - EKF: fixed some comment typos
6e77b19 2019-03-14 Todd Stellanova - Add DataValidatorGroup tests, add more DataValidator tests (#592)
2019-04-03 22:22:57 -04:00
Daniel Agar 604cdc2b60 drivers/px4fmu initialize all arrays 2019-04-03 18:50:57 -04:00
Daniel Agar a78ff7fe55 NuttX delete accidental tone_alarm copy 2019-04-03 23:57:51 +02:00
Daniel Agar 1ca205888e Update submodule mavlink v2.0 to latest Wed Apr 3 12:38:14 UTC 2019
- mavlink v2.0 in PX4/Firmware (1c8aeab34d70c2a3ebee4c94397c4aa62c955ec7): https://github.com/mavlink/c_library_v2/commit/b32bd3f004b971c03711617c79e5dc67e720e864
    - mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/171c83700c6318af9ffb4a7ee733567b55a14543
    - Changes: https://github.com/mavlink/c_library_v2/compare/b32bd3f004b971c03711617c79e5dc67e720e864...171c83700c6318af9ffb4a7ee733567b55a14543
2019-04-03 17:08:46 -04:00
PX4 Build Bot e8daf93682 Update submodule sitl_gazebo to latest Wed Apr 3 12:38:08 UTC 2019
- sitl_gazebo in PX4/Firmware (d36c0e131d): https://github.com/PX4/sitl_gazebo/commit/2f0070ec6c29c34b9bae10ac03224775627c338a
    - sitl_gazebo current upstream: https://github.com/PX4/sitl_gazebo/commit/e0dfe7ea45c849e676c201b7428bf8df975d4790
    - Changes: https://github.com/PX4/sitl_gazebo/compare/2f0070ec6c29c34b9bae10ac03224775627c338a...e0dfe7ea45c849e676c201b7428bf8df975d4790

    e0dfe7e 2019-03-11 Jannik Beyerstedt - Fix compiler error with openCV (C++11) on macOS
2019-04-03 22:59:55 +02:00
Daniel Agar 8541f4b0cf cmake nuttx use defconfig matching config label if available
- otherwise use default nsh
2019-04-03 16:58:39 -04:00
David Sidrane 1c212e3f84 M7 dcache ctrl via a parameter (#11769)
* Support for armv7-m_dcache control via parameter

  The FORCE_F7_DCACHE parameter can be set to
   0 - (default) if Eratta exits turn dcache off else leave it on
   1 -  Force it off
   2 -  Force it on

   At boot the system will disable the d-cache if the silicon
   has the 1259864 Data corruption in a sequence of Write-Through
   stores and loads eratta.

   Post nsh script execution the FORCE_F7_DCACHE paramater
   will be used to set the d-cache to the state indicated
   above.
2019-04-03 16:14:19 -04:00
Matthias Grob daa3c733e9 vscode: move vscode specific .gitignore entries to the folder 2019-04-03 14:52:46 -04:00
Daniel Agar 6648937789 logger increase stack 3600 -> 3700 bytes 2019-04-03 14:32:45 -04:00
Daniel Agar 0c226e9b64 cmake fix ROMFS build dependencies 2019-04-03 12:33:12 -04:00
Daniel Agar 296d7900a0 cmake fix NuttX build dependencies 2019-04-03 12:33:12 -04:00
bresch dec96b0a3a revert FlightTasks: fix mission DO_CHANGE_SPEED 2019-04-03 18:08:24 +02:00
bresch 20adce5077 Add new line at the end of FlightTaskFailsafe.cpp and FlightTaskAutoLine.cpp 2019-04-03 15:38:50 +02:00
bresch 986c1a37d1 Parameter update - Rename variables in modules/ekf2
using parameter_update.py followed by a make format
2019-04-03 15:38:50 +02:00
bresch da2deaa0b2 Parameter update - Rename variables in modules/mavlink
using parameter_update.py script
2019-04-03 15:38:50 +02:00
bresch f3990c84fc Parameter update - Rename variables in modules/navigator
using parameter_update.py script
2019-04-03 15:38:50 +02:00
bresch e575f032e4 Parameter update - Rename variables in modules/mc_att_control
using parameter_update.py script
2019-04-03 15:38:50 +02:00
bresch 2197ac883d Parameter update - Rename variables in modules/wind_estimator
using parameter_update.py script
2019-04-03 15:38:50 +02:00
bresch 6c823903bc Parameter update - Rename variables in modules/simulator
using parameter_update.py script
2019-04-03 15:38:50 +02:00
bresch f08c00f324 Parameter update - Rename variables in modules/fw_pos_control
using parameter_update.py script
2019-04-03 15:38:50 +02:00
bresch ecacf4de46 Parameter update - Rename variables in modules/load_mon
using parameter_update.py script
2019-04-03 15:38:50 +02:00
bresch 10ba0801d2 Parameter update - Rename variables in modules/fw_pos_control
using parameter_update.py script
2019-04-03 15:38:50 +02:00
bresch ece49247b6 Parameter update - Rename variables in modules/mc_pos_control
using parameter_update.py script
2019-04-03 15:38:50 +02:00
bresch c6e7c0fa5d Parameter update - Rename variables in modules/events
using parameter_update.py script
2019-04-03 15:38:50 +02:00
bresch 2ca8ddd8af Parameter update - Rename variables in modules/commander
using parameter_update.py script
2019-04-03 15:38:50 +02:00
bresch 2255ab21be Parameter update - Rename variables in templates
using parameter_update.py script
2019-04-03 15:38:50 +02:00
bresch b14446f0e5 Parameter update - Rename variables in lib
using paramter_update.py script
2019-04-03 15:38:50 +02:00
bresch ec5da55107 Parameter update - Rename variables in drivers
using parameter_update.py script
2019-04-03 15:38:50 +02:00
bresch aa8edbc2ba Parameter update - add -tcpp flag in rg to check C++ files only 2019-04-03 15:38:50 +02:00
bresch 06ab8570ab Parameter update - Add parameter_update.py script used to rename the BlockParam variables with the new strict naming convention 2019-04-03 15:38:50 +02:00
Nuno Marques 5da5795433 commander: PreflightCheck replace all differential_pressure sensor checks with airspeed checks (#11722) 2019-04-03 09:20:27 -04:00
Roman d36c0e131d added aux6 RC channel
Signed-off-by: Roman <bapstroman@gmail.com>
2019-04-03 08:20:47 -04:00
Julian Oes a21242b0e3 FlightTasks: fix mission DO_CHANGE_SPEED
This fixes the issue where the  DO_CHANGE_SPEED command was ignored and
the drone always travelled at the MPC_XY_CRUISE velocity.
2019-04-03 11:21:12 +02:00
bresch 99fb88ce83 AltitudeSmoothVel - Create new altitude flight task that uses the
velocity smoothing library to create a jerk-limited trajectory along the
Z axis. This FlightTask is used when MPC_POS_MODE = 3.
2019-04-03 10:43:31 +02:00
Roman 6c1399b328 multicopter land detector: make threshold for _has_low_thrust
configurable

Signed-off-by: Roman <bapstroman@gmail.com>
2019-04-03 08:49:46 +02:00
Daniel Agar ec3bc4ee5b fw_pos_control_l1 reset internal takeoff and landing state when arming 2019-04-03 08:48:30 +02:00
mcsauder e6f1a2db12 Delete trailing whitespace, extra newlines, to quiet git hooks and add an extra = so that it does not appear to git as a merge conflict marker. 2019-04-02 15:31:37 -04:00
David Sidrane 1250fb1b48 RGB order now matchs layout 2019-04-02 13:40:17 -04:00
David Sidrane eb58dae51b lights:Remove conditional rgb led starting (do all of them)
There is no need to not to start a pwm based led or a
   rgbled_ncp5623c if the old TCA62724FMG is started. They
   will all work in parallel.
2019-04-02 13:40:17 -04:00
David Sidrane 91e548000f bmp280:Locate internal to PX4_I2C_BUS_ONBOARD 2019-04-02 13:40:17 -04:00
David Sidrane fd31091fdb bmm150:Restored lost internal i2C 2019-04-02 13:40:17 -04:00
David Sidrane 005db51d7f nxp_fmuk66-v3:Add support for rgbled_ncp5623c 2019-04-02 13:40:17 -04:00
David Sidrane 8504ffd8f2 nxp_fmuk66-v3:Set bmm150 orientation 2019-04-02 13:40:17 -04:00
David Sidrane bfc704b60a fmuk66-v3:Add pullup on LPUART0_RX 2019-04-02 13:40:17 -04:00
David Sidrane ef882989fe [Breaking Change]fmuk66-v3: Only Support Rev BX11
I2C bus chaged I2C0 is external, I2C1 internal
     Added BMM150 on I2C1 @ Addr 0x100
     Added BMP280 on I2C1 @ Addr 0x76

   UART0 (/dev/ttyS1) now used at Telem 2

   Chip select added for W25X40CLUXIG Calibration EE prom
     Driver is not added at this time
2019-04-02 13:40:17 -04:00
Nico van Duijn 0b548fa684 Update submodule sitl_gazebo
This updates the submodule sitl_gazebo to include the iris_obs_avoid
sdf model
2019-04-02 08:17:13 +02:00
Nico van Duijn b7784a1439 Add MAVLink stream and cmake sitl target 2019-04-02 08:17:13 +02:00
Alessandro Simovic 39d1751bbe rc loss alarm: stop on RC reconnect 2019-03-29 19:42:02 -07:00
Alessandro Simovic 3d668d871b tunes: don't let tune interrupt itself 2019-03-29 19:42:02 -07:00
Thijs Raymakers 52542f9802 adis16497: fix TEMP_OUT scaling 2019-03-29 00:43:16 -04:00
DanielePettenuzzo 75f1ad36d1 start px4flow after all rangefinders (including the ones going through rc.serial) 2019-03-28 06:04:10 -04:00
CarlOlsson 9a2617ad33 vtol_att_control: remove unused subscription variable
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2019-03-28 09:03:53 +01:00
Beat Küng fe0c2d1352 mavlink autopilot_version: add vendor version 2019-03-28 08:47:32 +01:00
Julian Oes be8ad46fc9 px_uploader.py: write timeout workaround
This is a workaround for the write timeout that we have seen for some
host computers trying to flash the firmware.

We don't know the root cause of the problem but we do observed the
following:

- For blocking writes with timeout (Pyserial write_timeout=0.5):
  write() throws SerialTimeoutException. In systrace we see that the
  select() call after write waiting for the write to be finished hangs
  and finally times out.
- For blocking writes without timeout (Pyserial write_timeout=None):
  write() hangs indefinitely. In systrace we see that the
  select() call after write waiting for the write to be finished hangs.
- For non-blocking writes:
  write() works but flush() hangs. In systrace we see that
  ioctl(fd, TCSBRK, 1) which is (correctly) triggered by termios tcdrain
  hangs.

Inspecting USB traffic using usbmon, we can see that the data which is
written actually seems to be sent and looking at responses from the
Pixhawk bootloader and the timings it looks like all the data has
arrived.

This workaround uses non-blocking writes without flushing and this
seemed to prevent the issue from happening so far.

Debugging was done in collaboration with Beat Küng and David Sidrane.
2019-03-27 14:53:00 +01:00
Julian Oes 187f3f2834 SITL: interim fix for replay
The replay functionality was broken with lockstep. This is an interim
fix for the replay functionality.

In the longer term it would be nice to leverage the lockstep speedup
for the replay.
2019-03-27 12:55:37 +01:00
Matthias Grob 463d5512d9 mc_att_control: only adapt yaw rate limit on control mode change
Put adaption into a method because it needs to be called when
the control mode or the parameter changes.
2019-03-27 12:06:39 +01:00
Matthias Grob 3375ae2c11 mc_att_control: parameter processing refactor
- Remove unnecessary in between rate limits member vectors.
- Only switch the yaw rate limit in auto modes,
other values stay the same anyways.
- Fill gain vectors with parameters in one line.
2019-03-27 12:06:39 +01:00
Matthias Grob 5ee1fcaebf AttitudeControl: address @dagar's review comments 2019-03-27 12:06:39 +01:00
Matthias Grob 7e8cf87d0d mc_att_control: move attitude control calculations into separate class
to modularize and simplify unit testing
2019-03-27 12:06:39 +01:00
Claudio Micheli 0eb4942f66 Commander: renamed print_msg_once variable into a more self-explanatory one.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-27 09:56:32 +01:00
Claudio Micheli be6f753022 Fixed CI errors. changed _print_msg_once into private class member.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-27 09:56:32 +01:00
Claudio Micheli e14e5b9d73 Commander: Changed COM_ONB_BOOT_T parameter to COM_OA_BOOT_T.
Since the time out is only Obstacle-Avoidance related, the new naming is more self explanatory.

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-27 09:56:32 +01:00
Claudio Micheli d937a5725b Commander: reset print once variable if OA is lost.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-27 09:56:32 +01:00
Claudio Micheli 9966a3d2f8 Commander: changed logic for checking OA at boot time.
With this commit the use cases will be:

Success case:
- booting, no messages about OA, pre-arm check would fail if you try to arm and OA is not yet running

Fail case:
- if OA takes longer than timeout time defined in COM_ONB_BOOT_T, then an error message is triggered.


Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-27 09:56:32 +01:00
Claudio Micheli 3b5ef82193 Commander: Added COM_ONB_BOOT_T parameter.
Since onboard controllers bootup times are hardware dependent, it makes sense to have the possibility to adapt timeout time according to the specific HW.

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-27 09:56:32 +01:00
Claudio Micheli 7a8002fdab Commander: increased hardcoded timeout time for avoidance to start.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-27 09:56:32 +01:00
Claudio Micheli f4a4dab65a Commander: Improved logic for OA prearm checks.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-27 09:56:32 +01:00
Claudio Micheli 977a4c8e9b Added status_change to force message updating.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-27 09:56:32 +01:00
Claudio Micheli 107746ded5 Added obstacle avoidance healthiness topic in vehicle status msg.
This allows to perform pre-arm checks and prevent arming if obstacle avoidance is enabled but not yet running.
Added a print once flag to prevent excessive message spamming in QGC.

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-27 09:56:32 +01:00
Julian Oes 7be05396ba px_uploader.py: check for pyserial
If we dont explicitly check for pyserial, we can have the case where the
import works but the Serial object creation fails. However, we don't see
this because we have this huge try/catch block which swallows
everything.
2019-03-27 07:55:05 +01:00
CarlOlsson ed2d4f6a9c replay: fix issue when original logfile had topics with zero timstamps
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2019-03-25 16:00:39 -04:00
Daniel Agar 3d271245a1 PX4Gyroscope apply sensor rotation before scaling
- prevents loss of numerical precision
2019-03-24 18:34:31 -04:00
Daniel Agar 5a841761ce PX4Accelerometer apply sensor rotation before scaling
- prevents loss of numerical precision
 - fixes #11695
2019-03-24 18:34:31 -04:00
Daniel Agar b35883f5d5 cmake nuttx use wrapper script to call "make olddefconfig"
- this is a workaround for PATH variables that exceed the maximum cmake custom command length
2019-03-24 17:58:41 -04:00
Matthias Grob 295c3fd0c5 mc_pos_control: correct tilt parameter limits
- correcting
c9e52d4386
to allow 180° maximum tilt instead of landing tilt.
- Introducing tilt limitation minimums like requested in #11473
2019-03-24 20:52:17 +01:00
Daniel Agar f402f68fb1 px4_fmu-v3 include icm20948 (Here+ compass) 2019-03-24 00:53:33 -04:00
Oleg Kalachev 319723a1ec mavlink_receiver: ignore BATTERY_STATUS of other system 2019-03-23 15:18:46 -04:00
Julian Oes ed3b924f97 nuttx: update submodule (#11705)
This fixes a build error due to a Scandinavian letter in the help text.
2019-03-23 11:09:35 -04:00
Daniel Agar 5e6bfe1ad8 vscode updates
* working debugging (one click build and debug)
   * SITL jmavsim
   * SITL gazebo
   * jlink px4_fmu-v{2-5}
 * improved syntax highlighting
   * GNU linker files
   * ROS message files msg/*.msg
   * jinja2 template files
 * fixed intellisense support
2019-03-22 20:55:39 -04:00
Martina Rivizzigno 8cdc2d9ae9 update matrix library submodule 2019-03-22 15:41:33 +01:00
Ilya Petrov 15c2473eda mavlink_main.cpp - add fix for Cygwin (Windows)
fix for issue https://github.com/PX4/Firmware/issues/11030 - "getting required buffer size failed" on jmavsim simulation on Windows 10
2019-03-21 22:48:11 +01:00
Beat Küng c9d32578e3 fix bmi055: increase DLPF from 62.5 to 500
With a DLPF of 62.5 Hz, the sampling rate is apperently not 1 kHz anymore,
because the driver got duplicate samples and published only at 128 Hz.
We have to increase the filter back to 500 Hz so that we get 1 kHz sampling
rate, with 250 Hz publications.
2019-03-21 11:50:37 -04:00
Daniel Agar 1d5309060a thiemar_s2740vc-v1 nsh compress defconfig 2019-03-21 08:41:01 -04:00
Daniel Agar 82737f4d2e px4_esc-v1 nsh compress defconfig 2019-03-21 08:41:01 -04:00
Daniel Agar 9d8c4c2945 px4_cannode-v1 nsh compress defconfig 2019-03-21 08:41:01 -04:00
Daniel Agar 3a4066c19f auav_esc35-v1 nsh compress defconfig 2019-03-21 08:41:01 -04:00
Daniel Agar be93dd1c5d omnibus_f4sd nsh compress defconfig 2019-03-21 08:41:01 -04:00
Daniel Agar 311bf93cd4 nxp_fmuk66-v3 nsh compress defconfig 2019-03-21 08:41:01 -04:00
Daniel Agar fde7c0ea4f av_x-v1 nsh compress defconfig 2019-03-21 08:41:01 -04:00
Daniel Agar 4352fae8dd auav_x21 nsh compress defconfig 2019-03-21 08:41:01 -04:00
Daniel Agar 5d49e36b3a airmind_mindpx-v2 nsh compress defconfig 2019-03-21 08:41:01 -04:00
Daniel Agar 8082f9a0b5 bitcraze_crazyflie nsh compress defconfig 2019-03-21 08:41:01 -04:00
Daniel Agar f27dddb8e9 intel_aerofc-v1 nsh compress defconfig 2019-03-21 08:41:01 -04:00
Daniel Agar 3f890b6ab1 px4_fmu-v5 stackcheck compress defconfig 2019-03-21 08:41:01 -04:00
Daniel Agar f6cd70bcc5 px4_fmu-v5 nsh compress defconfig 2019-03-21 08:41:01 -04:00
Daniel Agar 7ccaf1068b px4_fmu-v4pro nsh compress defconfig 2019-03-21 08:41:01 -04:00
Daniel Agar 8f32f3a0c8 px4_fmu-v4 stackcheck compress defconfig 2019-03-21 08:41:01 -04:00
Daniel Agar 41ff6c60ba px4_fmu-v4 nsh compress defconfig 2019-03-21 08:41:01 -04:00
Daniel Agar f1f84e52c7 px4_fmu-v3 stackcheck compress defconfig 2019-03-21 08:41:01 -04:00
Daniel Agar d5b617deac px4_fmu-v3 nsh compress defconfig 2019-03-21 08:41:01 -04:00
Daniel Agar fa2142d06e px4_fmu-v2 nsh compress defconfig 2019-03-21 08:41:01 -04:00
Daniel Agar de7df621d7 px4_io-v2 nsh compress defconfig 2019-03-21 08:41:01 -04:00
Daniel Agar 9fd0bbe30f NuttX build include and use Kconfiglib (python) 2019-03-21 08:41:01 -04:00
Elia Tarasov b3bb625c71 add parameter to set ground effect distance 2019-03-21 10:07:12 +01:00
Elia Tarasov 04a486f13d enable ground effect zone when land detector is updated 2019-03-21 10:07:12 +01:00
Elia Tarasov 0c24aa6149 enable ground effect zone when valid terrain estimate is available 2019-03-21 10:07:12 +01:00
Matthias Grob aa36fa2dfd replace camel case by snake case.
Co-Authored-By: EliaTarasov <elias.tarasov@gmail.com>
2019-03-21 10:07:12 +01:00
Elia Tarasov 84d9820baa remove EKF2_GND_EFF_EN flag and use condition EKF2_GND_EFF_DZ > 0 instead 2019-03-21 10:07:12 +01:00
Elia Tarasov 5fa0a647e5 add parameter to enable/disable ground effect zone 2019-03-21 10:07:12 +01:00
Roman ecc8a696d0 added ground effect reporting to land detector
Signed-off-by: Roman <bapstroman@gmail.com>
2019-03-21 10:07:12 +01:00
Beat Küng 14ef009aab logging: add SDLOG_MODE = -1 to disable logging completely 2019-03-21 08:15:48 +01:00
bresch a08b1682e3 [Position|AutoLine]SmoothVel - Update position and velocity states of the trajectories in case of EKF reset. Until now, only the position reset on XY axis was properly handled. Now, xy, vxy, z and vz are handled 2019-03-20 14:35:26 -04:00
bresch 0813f30723 AutoLineSmoothVel - change function contrain_one_side(..) from snake_case to camelCase 2019-03-20 14:35:26 -04:00
Daniel Agar 94cab1f9a9 update cmake NuttX helper save behaviour (oldconfig, menuconfig, etc) 2019-03-20 12:07:37 -04:00
David Sidrane 3938574a4a px4_fmuv5:Extend probes to CAP pins
This also fixes a typo in the GPIO defines
2019-03-18 16:16:23 -04:00
johannes 53effd5005 Tools/upload_log: change default upload to public flightreport 2019-03-18 09:52:18 -04:00
Pandacoolcool 35af8f3368 ist8310.cpp: fix code style 2019-03-18 11:05:12 +01:00
Pandacoolcool 875661d70c ist8310.cpp: remove unused variable 2019-03-18 11:05:12 +01:00
mcsauder a6315d4e6e Delete Simulator class subscription vars that are not used and add orb_unsubscribe() calls. 2019-03-18 10:00:39 +01:00
bresch aecf8fce58 ManualPositionSmoothVel - Force velocity and acceleration setpoints to zero if the velocity setpoint is smaller than 1mm/s and that the acceleration setpoint is null 2019-03-18 08:33:11 +01:00
bresch 1fefa76e5d ManualSmoothVel - Set jerk to 1.0 during position hold to help the optimizer to converge towards 0 vel and acc 2019-03-18 08:33:11 +01:00
bresch 06f683bdda VelocitySmoothing - Add simple test script 2019-03-18 08:33:11 +01:00
bresch b9cf4dfb6c VelocitySmoothing - Get rid of math.h, math.cpp and px4_defines dependencies 2019-03-18 08:33:11 +01:00
bresch ddab0ccdf1 VelocitySmoothing - Protect against division by zero and sqrt of a negative number 2019-03-18 08:33:11 +01:00
Daniel Agar e4967a9502 vscode minor updates
- add cmake language support to recommend extensions
 - jlink debug add stm32f427 svd
 - gitignore updates for vscode
2019-03-17 12:05:26 -04:00
Mark Sauder 164fe00df7 mc_att_control: replace math::min() and additional limit logic with math::constrain() calls (#11658) 2019-03-17 10:48:27 -04:00
Mark Sauder 4c228eaf4a cmake whitespace fixes to quiet git hook. 2019-03-16 14:48:44 -04:00
Daniel Agar b35d048566 cmake enable -Wcast-align and disable per module 2019-03-16 11:47:15 -04:00
Daniel Agar 13dba60149 perf counter lib convert to c++ 2019-03-16 11:47:15 -04:00
Daniel Agar 471e1bc866 serial/generate_config.py specify full loader (#11667)
- fixes #11666
2019-03-16 11:19:01 -04:00
Julian Oes b54ca67de9 lockstep_scheduler: check if mutex is still valid
It turns out that we can fix the unit tests of the lockstep_scheduler
just by checking if `passed_lock` is not `nullptr`.

Without this check, the unit tests segfaulted.
2019-03-15 13:38:11 +01:00
Julian Oes 2ebb9d2ab5 mixer_multirotor.py: fixes for Python3
This fixed running `make tests` on Arch Linux where Python 3 is the
default.
2019-03-15 10:53:55 +01:00
Beat Küng bfa0a4a8f1 sitl_gazebo: update submodule (hil fix) 2019-03-15 08:54:42 +01:00
Beat Küng 898664d919 jmavsim: fix HIL, don't add -lockstep by default 2019-03-15 08:54:42 +01:00
Beat Küng 8692d72501 jmavsim: update submodule
Brings https://github.com/PX4/jMAVSim/pull/97.
2019-03-15 08:50:05 +01:00
Hamish Willee 257b90958f Correct links to example docs 2019-03-15 08:05:54 +01:00
Julien Lecoeur 5f06c6a1aa VTOL: add parameter to prevent flight if roll direction was not checked
Mark V19_VT_ROLLDIR @category system

Throttle down mavlink critical msg

Send 0 actuator_output for safety

VTOL: unset v1.9 roll direction safety check param for builtin airframes
2019-03-15 00:48:23 -04:00
Julien Lecoeur e28f8a7f2e VTOL mixers: invert FW roll sign in builtin mixers
This inversion matches the fixed sign in the commands generated
by the VTOL attitude controller.
This commit, combined with the previous commit, should have no effect.
For safety, it is recommended to check the direction of roll control
surfaces before flight.
2019-03-15 00:48:23 -04:00
Julien Lecoeur e1caecc99a VTOL att control: fix roll sign 2019-03-15 00:48:23 -04:00
bresch c5706f6283 FlightTaskAuto - Recover position control after local position reset (#11636)
* FlightTaskAuto - Explicitly check is _triplet_target is finite to decide if the target has to be updated or not. If the _target is NAN, always try to update it to get a valid setpoint.
2019-03-15 00:42:24 -04:00
Martina Rivizzigno 09b795161e Obstacle Avoidance testing in CI (#10780) 2019-03-15 00:37:23 -04:00
Daniel Agar 1083af21e8 mc_pos_control limit to 50 Hz 2019-03-15 00:24:59 -04:00
Daniel Agar f3533d31f8 mavlink update to latest and enable address-of-packed-member warning 2019-03-14 09:56:09 +01:00
Paul Riseborough f8ae8ba502 ekf2: Use ecl library with recent bug fixes and enhancements.
Bug Fixes:

https://github.com/PX4/ecl/pull/586 - EKF: fix covariance and output filter buffer initialization
https://github.com/PX4/ecl/pull/590 - EKF: Fix innovation in fuseDeclination()

Enhancements:

https://github.com/PX4/ecl/pull/543 - ekf_helper: add more useful methods to interface with the covariances
https://github.com/PX4/ecl/pull/588 - Add unit tests for DataValidator

Note:

https://github.com/PX4/ecl/pull/543  has required a change to how the state variances are accessed .
2019-03-14 19:25:36 +11:00
Daniel Agar edad4c40c3 containers add IntrusiveQueue and testing 2019-03-14 09:22:19 +01:00
Daniel Agar 23189329a4 Jenkins hardware testing add nxp_fmuk66-v3 2019-03-13 23:50:57 -04:00
mcsauder 2ae2331c15 Delete extra newline character in qmc5883/CMakeLists.txt to quiet git hook. 2019-03-12 14:59:08 -04:00
Beat Küng 509189ea95 uorb top: add 'uorb top -1' to run only once 2019-03-12 12:33:23 -04:00
Beat Küng 6672284871 commander: fix status init & some status update changes 2019-03-12 11:24:33 +01:00
Claudio Micheli 697566177c Commander: Properly initialized another boolean variable.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-12 11:24:33 +01:00
Claudio Micheli 908cdaa574 Onboard controller loss parameter cleanup.
Since Timeout from onboard controller is something that does not require a lot of modifications there is no sense to having it parametrized.

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-12 11:24:33 +01:00
Claudio Micheli cd47cefb03 Some more code cleanup.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-12 11:24:33 +01:00
Claudio Micheli 59cf9a1dd4 telemetry_status: Changed "type" comment.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-12 11:24:33 +01:00
Claudio Micheli fb990d7de3 Removed subscribtion to multiple _telemetry_status instances.
Since commander handles all telemetry_status the same there is no need to subscribe to multiple instances.


Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-12 11:24:33 +01:00
Claudio Micheli a53594135b Commander: changed "datalink regain" logic.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-12 11:24:33 +01:00
Claudio Micheli ca53217175 removed stm discovery board.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-12 11:24:33 +01:00
Claudio Micheli 13f3ee4c82 state_machine_helper: (Critical) Prevent datalink failsafe triggering if not enabled.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-12 11:24:33 +01:00
Claudio Micheli 788e28fbb1 Commander: datalink heartbeat variables refactoring.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-12 11:24:33 +01:00
Claudio Micheli 32e4baf6a0 Commander: some more cleanup. 2019-03-12 11:24:33 +01:00
Claudio Micheli a84a1e1b5a Commander: mavlink messages cleanup. header variables refactoring.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-12 11:24:33 +01:00
Claudio Micheli b85cceebe9 mavlink_receiver: Ignore heartbeats coming from other vehicles.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-12 11:24:33 +01:00
Claudio Micheli 14415b29c1 Removed hardcoded onboard controller timeouts thresholds.
Added COM_ONB_LOSS_T and COM_ONB_REG_T parameters to specify thresholds that triggers "onboard link lost" and "onboard link regained".


Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-12 11:24:33 +01:00
Claudio Micheli 156317e546 Fixes for ONBOARD Controller lost & regain. 2019-03-12 11:24:33 +01:00
Claudio Micheli f44c690b33 Modified COM_DL_REG_T parameter description.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-12 11:24:33 +01:00
Claudio Micheli 1fc055a51f Fixed some issues for datalink loss & regain (GCS HEARTBEAT).
Major changes:
- Prevent  "HIGH LATENCY DATA LINK LOST" message to appear if iridium telemetry is not used.
- Prevent "DATA LINK LOSS" mavlink messages flooding when QGC is open and then closed.
- Changed "DATA LINK REGAINED" condition (use _datalink_last_heartbeat_gcs insthead of _datalink_lost)



Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-12 11:24:33 +01:00
baumanta d8bdc1b367 output a message if a previously lost connection is regained 2019-03-12 11:24:33 +01:00
baumanta d42b9205f9 Rename parameter MPC_OBS_AVOID to COM_OBS_AVOID and change the location to commander. 2019-03-12 11:24:33 +01:00
baumanta f42b378b9b Also activate navigator for 32f4discovery board 2019-03-12 11:24:33 +01:00
baumanta b0024a1555 activate mc_pos_ctrl module to be able to access MPC_OBS_AVOID parameter 2019-03-12 11:24:33 +01:00
baumanta a98f5d2ab2 suggestion for treating obstacle avoidance heartbeats 2019-03-12 11:24:33 +01:00
Daniel Agar 6dec451bab HEARTBEAT and commander failsafe handling cleanup 2019-03-12 11:24:33 +01:00
Matthias Grob f794ee0c8a FlightTaskManualAltitude: add slow upwards start
when still close to ground
2019-03-11 20:09:45 +01:00
Matthias Grob 63a6ab34f7 FlightTaskManualAltitude: slow down when landing manually 2019-03-11 20:09:45 +01:00
Vasily Evseenko f8c50f442f Fix RSSI in on FMUv4 (pixracer) 2019-03-11 10:55:57 -07:00
mcsauder 2773fe6a54 Deprecate _hil_frames and _old_timestamp member vars and dead logic from MavlinkReceiver class. 2019-03-11 08:03:37 +01:00
BazookaJoe1900 8947cb5841 FlightTaskAuto: removed non used _getMaxCruiseSpeed 2019-03-10 11:17:21 -04:00
Anthony Lamping a9fc04b2f9 CI: SITL test run: select ROS version based on env variable 2019-03-09 16:26:37 -05:00
Daniel Agar d085afdf3a Jenkins re-enable Catkin and Colcon builds 2019-03-09 15:38:15 -05:00
mcsauder 1f65887982 Migrate a few more var initializations from the Mavlink class constructor list to the respective declarations. 2019-03-09 14:53:24 -05:00
mcsauder 7b3482adf0 Whitespace formatting in mavlink_main.cpp/h and begin work of some variable initialization at declaration in mavlink_main.h. 2019-03-09 13:32:26 -05:00
Daniel Agar a8808cc5cd Jenkins update SITL tests coverage to correct base container 2019-03-09 13:08:34 -05:00
Anthony Lamping 84c52439e9 jenkins: update all image tags to 2019-03-08 2019-03-08 23:17:06 -05:00
mcsauder cb49ed55fe Delete unnecessary #includes from mavlink_main.cpp and relocate a few #defines to mavlink_main.h for future variable initialization work. 2019-03-08 22:10:11 -05:00
dlwalter 77ab9b617e QMC5883 Magnetometer Driver (#11140) 2019-03-08 22:04:43 -05:00
Beat Küng 505b1aca2c lockstep_scheduler: work around a potential dead-lock for canceled threads 2019-03-08 12:22:45 -05:00
Beat Küng e999075ac7 lockstep_scheduler: fix system_sleep -> system_usleep
The effect was that threads that tried to exit were unnecessarily kept
running.
This did not cause problems except for increased resource usage.
2019-03-08 12:22:45 -05:00
Beat Küng 08298ab3d0 drv_hrt: make lockstep_scheduler a pointer
This solves a potential dead-lock when trying to shutdown: a call to exit()
stops all threads and calls all destructors for static objects.
The destructor of LockstepScheduler takes a lock. However this is not
safe, as the lock could already be taken (by any thread).
2019-03-08 12:22:45 -05:00
Daniel Agar 27ad3178f8 Jenkins add SITL tests AddressSanitizer 2019-03-07 22:38:24 -05:00
mcsauder d12cec81ba Add const specifier to remaining methods utilizing mavlink_message_t and similar message pointer types. 2019-03-07 08:22:44 +01:00
mcsauder 278fddb585 Cut case MAVLINK_MSG_ID_ODOMETRY content and paste into handle_message_odometry() method. 2019-03-07 08:22:44 +01:00
mcsauder 3918d0ce0a Cut case MAVLINK_MSG_ID_VISION_POSITION_ESTIMATE content and paste into handle_message_vision_position_estimate() method. Add const specifier to publish_odometry_topic() method. 2019-03-07 08:22:44 +01:00
mcsauder c3acd3bad3 Delete unnecessary curly braces in simulator_mavlink.cpp 2019-03-07 08:22:44 +01:00
mcsauder e43a0bbf1d Cut case MAVLINK_MSG_ID_RC_CHANNELS content and paste into handle_message_rc_channels() method. 2019-03-07 08:22:44 +01:00
mcsauder 801cbc856e Cut case MAVLINK_MSG_ID_HIL_GPS content and paste into handle_message_hil_gps() method. 2019-03-07 08:22:44 +01:00
mcsauder b705bf6b1c Cut case MAVLINK_MSG_ID_HIL_SENSOR content and paste into handle_message_hil_sensor() method. 2019-03-07 08:22:44 +01:00
Daniel Agar 37cda4e264 Update submodule jMAVSim to latest Wed Mar 6 00:38:35 UTC 2019 (#11597)
- jMAVSim in PX4/Firmware (a97151feed): https://github.com/PX4/jMAVSim/commit/0c25b7c18990a64fc851cfd7fe3aac9a4060aea3
    - jMAVSim current upstream: https://github.com/PX4/jMAVSim/commit/8b2f4568e05935af57782fd0db9a434f733cc800
    - Changes: https://github.com/PX4/jMAVSim/compare/0c25b7c18990a64fc851cfd7fe3aac9a4060aea3...8b2f4568e05935af57782fd0db9a434f733cc800

    8b2f456 2019-02-28 Julian Oes - Merge pull request #95 from PX4/shell-style
3d0174a 2019-02-27 Matthias Grob - Fix shell script style
2019-03-05 23:57:25 -05:00
Daniel Agar a01b598694 Update submodule mavlink v2.0 to latest Wed Mar 6 00:38:42 UTC 2019 (#11596)
-  mavlink v2.0 in PX4/Firmware (1a2b88ea30ae3bec38d2e9f11793042d7582506a): https://github.com/mavlink/c_library_v2/commit/f073569b746b6533c1715b0bbfed6c988444b257
    - mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/2a47f11e73eef6d817af7934692b1223d7fb434f
    - Changes: https://github.com/mavlink/c_library_v2/compare/f073569b746b6533c1715b0bbfed6c988444b257...2a47f11e73eef6d817af7934692b1223d7fb434f

    2a47f11 2019-03-01 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/747c3e73e9ad28e8011cdc5c98faf56752b1d32a
2019-03-05 23:56:41 -05:00
Daniel Agar beca16fa37 ekf2 update setGpsData usage 2019-03-05 23:28:26 -05:00
mcsauder a97151feed Set default set_publlish() argument to true. 2019-03-05 09:16:31 +01:00
mcsauder 0bd5d6caff Refactor set_publish() logic so that a default false value is not (re)set each loop in simulator_mapvlink.cpp and provide a default argument to set_publish() in simulator.h. 2019-03-05 09:16:31 +01:00
mcsauder 6e0fc150c0 Create Simulator::set_publish() method and Simulator::_publish member variable to allow redefinition of the Simulator::handle_message() prototype to match MavlinkReceiver::handle_message(). 2019-03-05 09:16:31 +01:00
Daniel Agar 1221556515 RTL fix RTL_TYPE param metadata group 2019-03-05 07:49:45 +01:00
Paul Riseborough 6e0ca90852 ekf2: Minor parameter description edits 2019-03-05 07:17:09 +01:00
Paul Riseborough 643d8e968b ekf2: style fixes 2019-03-05 07:17:09 +01:00
Paul Riseborough 09da8e7dfc ekf2: Split static pressure correction into separate RH ad LH ellipsoids 2019-03-05 07:17:09 +01:00
Hamish Willee 1079ae3402 CONTRIBUTING:Fix up code.html link to goto master 2019-03-03 22:23:59 -05:00
Daniel Agar 468fb53459 navigator fix FW loiter to alt tangent exit (#11576)
- fixes #11317
2019-03-03 22:22:32 -05:00
Gabriel Moreno fc7c7ac206 simulator: fix to set system and component IDs as defined in params
The simulator had hardcoded component ID and system ID (sysID was 0), ignoring what was set up in the params MAV_SYS_ID and MAV_COMP_ID. This caused an issue with multi-vehicle simulations that that rely on sysID to identify the vehicles.

Signed-off-by: Gabriel Moreno <gabrielm@cs.cmu.edu>
2019-03-03 10:41:47 +01:00
Morten Fyhn Amundsen 951f33145f Fix link to code style guide
In CONTRIBUTING.md, the current link to the coding style leads to a
404 error. I've replaced it with a link to the Source Code Management
part of the developer documentation, which is where the style guide
seems to be now.
2019-03-02 23:40:09 -05:00
mcsauder 9f3937e2d2 Formatted and edited a few comments in mavlink_receiver.h. 2019-03-02 23:39:25 -05:00
mcsauder d60d802194 Correct board-config PIN1/PIN0 typo in fmu-v5/src/board_config.h. 2019-03-02 14:31:02 -08:00
mcsauder d42bb01e0c Standardize method definition newlines in mavlink_receiver.cpp. 2019-03-02 13:09:41 -05:00
David Sidrane dc50a564dd Revert "Jenkins hardware test temporarily disable px4_fmu-v5_stachcheck tests"
This reverts commit 0df34af181.
2019-03-01 23:45:48 -05:00
David Sidrane edd9f91a19 board:Set larger stack margin 2019-03-01 23:45:48 -05:00
David Sidrane 12d442e8dd px4_fmuv5:Stack Check build Increase to 2624
The cause of the stack detection fault is because of the
   level of nesting in the start up script. We need to
   determine the worst case configuration and set the
   bar there.

   This fault occurred some 42 calls deep due to script
   calling script (repeat).

   The HW stack check requires as a margin of 204 bytes. That is
   ISR HW stacking of CPU(8) FPU(18) registers and SW stacking of
   CPU(11) and FPU(16) registers. Total CPU(19) registers is
   68 bytes and the total FPU(34) registers is 136 bytes.  On
   a system with a separate ISR stack This only needs to be 104
   so there is 100 bytes of headroom. But as coded the detection
   will give a false positive detection and fault. This does not
   mean that the stack will be corrupted.

   Adjustments to that stack can have no effect due to rounding.
   A stack size of 2608 and 2616 can yield the exact same size stack.
   So even when the failure is due to a 4 byte overflow, it can take
   greater than a 16 bytes increase to fix it. Because the final
   stack size is calculated with an 8 byte alignment after a 4 byte
   decrease. So 2624 becomes 2620 at runtime and will boot
   with SYS_AUTOSTART=4001.
2019-03-01 23:45:48 -05:00
Daniel Agar e2bf4b1894 List container improvements and testing
- support range based for loops
 - add remove() method to remove a node
 - add clear() to empty entire list and delete nodes
 - add empty() helper
2019-03-01 21:01:04 -05:00
Beat Küng 6c3e79f361 mc airframes: reduce I gains a bit
A side-effect of the previous commit is that the integral is loaded up
during a flip, which leads to visible bounce-backs after a flip.
Reducing the I helps, but there's a trade-off and we'll need a better
solution.
2019-03-01 07:42:18 +01:00
Beat Küng 2f72e93d6f fix mixer multicopter: do not clip for max/min throttle
Except for the lower end with disabled airmode.

Otherwise the rate controller would disable the integrals, which can lead
to severe tracking loss in acro.
It is noticeable when flying in FPV, e.g. simply when throttling straight
up.

Relevant part in the rate controller:
https://github.com/PX4/Firmware/blob/master/src/modules/mc_att_control/mc_att_control_main.cpp#L702
2019-03-01 07:42:18 +01:00
bresch 684e2974ac mc_pos_control_main - Re-add updateVelocityControllerIO for glitch-free position unlock 2019-02-28 21:26:13 +01:00
mcsauder 1eced05359 Rename Simulator class private methods names to match snake case of other private class methods. 2019-02-28 19:26:45 +01:00
mcsauder b0a79996ae Cut case MAVLINK_MSG_ID_HIL_STATE_QUATERNION content and paste into handle_message_hil_state_quaternion() method. 2019-02-28 19:24:50 +01:00
mcsauder 8b42045546 Cut case MAVLINK_MSG_ID_HIL_OPTICAL_FLOW content and paste into handle_message_hil_optical_flow() method. 2019-02-28 19:24:50 +01:00
mcsauder 24e55e4d4d Cut case MAVLINK_MSG_ID_DISTANCE_SENSOR content and paste into handle_message_distance_sensor() method. 2019-02-28 19:24:50 +01:00
mcsauder 411db781eb Cut case MAVLINK_MSG_ID_LANDING_TARGET content and paste into handle_message_landing_target() method. 2019-02-28 19:24:50 +01:00
Daniel Agar 0df34af181 Jenkins hardware test temporarily disable px4_fmu-v5_stachcheck tests 2019-02-28 04:07:05 -08:00
Daniel Agar e7dfb375be create jlink gdb upload script and use in Jenkins Hardware pipeline 2019-02-27 18:42:54 -05:00
TSC21 12d29fd093 navigator: mission_feasibility_checker: remove lazy comparison 2019-02-27 13:25:47 +01:00
TSC21 c9c86ae2ff navigator: mission feasibility checker: minor cleanup 2019-02-27 13:25:47 +01:00
TSC21 9fa7f341e4 mission_feasibility_checker: takeoff: fix init of mission item 2019-02-27 13:25:47 +01:00
TSC21 8bf9ec32dc mission_feasibility_checker: takeoff: add a different log message when there's a takeoff item but it's not the first waypoint 2019-02-27 13:25:47 +01:00
TSC21 468a002355 mission_feasibility_checker: takeoff: minor spelling mistakes fixing 2019-02-27 13:25:47 +01:00
TSC21 f6ab40d2dd mission_feasibility_checker: takeoff: fix logic to return as valid 2019-02-27 13:25:47 +01:00
TSC21 676e1eb224 mission_feasibility_checker: takeoff: accept mission when takeoff is not the first item but the previous items are not waypoints 2019-02-27 13:25:47 +01:00
TSC21 6bb84af1db mission_feasibility_checker: takeoff: change warning message 2019-02-27 13:25:47 +01:00
TSC21 5b151a5df7 navigator: mission feasibility checker: check for a takeoff waypoint on mission on specific conditions 2019-02-27 13:25:47 +01:00
Daniel Agar 26811978e1 Jenkins hardware test add px4_fmu-v2 and px4_fmu-v5 2019-02-26 23:03:24 -05:00
Daniel Agar f5a1146517 Jenkins hardware test add px4_fmu-v3 and px4_fmu-v4pro 2019-02-26 19:22:16 -05:00
Daniel Agar aec3ad5417 Jenkins hardware testing update to new configuration
- the Jenkins slave now has the gdb server already started in the background
2019-02-26 18:33:42 -05:00
David Sidrane 0846059646 fmuv5:Repurpose TIM5_SPARE_4 as nARMED
nARMED is a Digital OUTPUT. GPIO will be set as input while not
   armed HW will have Pull UP. While armed it will be configured
   as a GPIO OUT set LOW.
2019-02-26 15:34:10 -05:00
David Sidrane 477152a96d Commander:Support BOARD_INDICATE_ARMED_STATE for HW that supports external armed indiction 2019-02-26 15:34:10 -05:00
David Sidrane bf8a5e9652 board_common:Add BOARD_INDICATE_ARMED_STATE
This adds an optional default support for HW that does not
   have and external armed indiction.
2019-02-26 15:34:10 -05:00
Mark Sauder c04147c53c Mavlink receiver: Move most variable initializations out of the constructor to the variable declarations 2019-02-26 11:48:02 -05:00
Matthias Grob 20c2d66ba3 Makefile: add function to check if cmake rerun is necessary
by comparing the configuration options that cmake reports
from the cache with the ones from the current build
2019-02-26 10:45:46 -05:00
Matthias Grob e8cbfab670 Makefile: help cleanup 2019-02-26 10:45:46 -05:00
Matthias Grob e7651c9c52 Makefile: streamline cmake-build and
cleanup nuttx_, _default targets
2019-02-26 10:45:46 -05:00
mcsauder ca92b8016d Move member variable initialization out of the constructor list to variable declarations, format whitespaces/tabs in sf1xx.cpp. 2019-02-26 10:42:00 -05:00
bresch f229444722 ManualSmoothVel - Split position lock condition and flag action 2019-02-25 21:41:04 +01:00
Matthias Grob db0283ef21 mc_pos_control: fix altitude limitation
Before if you were above the maximum altitude you could not command to
go down anymore until the position controller had overshoot to under the
maximum altitude again.
2019-02-25 18:53:05 +01:00
Matthias Grob 93ef70c43d vmount: add missing yaw wrap at the end of a ROI update 2019-02-25 11:03:04 -05:00
Matthias Grob 35409b4079 vmount: refactor ROI position update for readability 2019-02-25 11:03:04 -05:00
fpvaspassion cefffe652f Correted list of serial ports for lpe target for fmu v2 board 2019-02-25 10:41:05 -05:00
Mohammed Kabir 20e44aa320 Analog Device ADIS16497 IMU initial support 2019-02-25 09:34:58 -05:00
Alessandro Simovic d5aad58c92 navigator: reset vehicle_roi on mission update 2019-02-25 09:11:24 -05:00
sfalexrog 9355324209 mavlink/MavlinkReceiver: Use hrt_absolute_time for distance_sensor timestamps 2019-02-25 12:07:53 +01:00
Hamish Willee 5132368378 Flying Wing init files: Fix up main output docs 2019-02-25 12:01:27 +01:00
Hamish Willee e5dbd39ca6 Fx79 Frame: Reverse aileron outputs 2019-02-25 12:01:27 +01:00
bresch 8f584a1496 smooth takeoff - Support smooth takeoff triggered by jerk setpoint 2019-02-25 08:07:33 +01:00
Daniel Agar 0d170a0eaf FlightTasks VelocitySmoothing initialize member
- fixes Coverity CID 328485
2019-02-24 17:10:15 -05:00
Daniel Agar 7eca2769a7 FlightTasks AutoLineSmoothVel initialize member
- fixes Coverity CID 328492
2019-02-24 17:10:15 -05:00
Daniel Agar b2739d946c FlightTasks ManualPositionSmoothVel initialize member
- fixes Coverity CID 332544
2019-02-24 17:10:15 -05:00
Daniel Agar 703e28f7a8 Jenkins increase history retention 2019-02-24 13:17:22 -05:00
Carl Olsson 447e0be250 gpssim: populate s_variance_m_s with 0.25 (#11521)
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2019-02-24 11:23:28 -05:00
Matthias Grob bee1835831 Tools: fix style consistency in shell scripts "if [...]; then" 2019-02-24 11:20:38 -05:00
Daniel Agar c21849b9b5 Update submodule mavlink v2.0 to latest Fri Feb 22 12:38:30 UTC 2019 (#11528)
- mavlink v2.0 in PX4/Firmware (8f45c4f9ac1391a7519f633ed654cc41c54cafaa): https://github.com/mavlink/c_library_v2/commit/bf68eed6f6819ca1eca44217955794af554d0369
    - mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/f073569b746b6533c1715b0bbfed6c988444b257
    - Changes: https://github.com/mavlink/c_library_v2/compare/bf68eed6f6819ca1eca44217955794af554d0369...f073569b746b6533c1715b0bbfed6c988444b257
2019-02-22 17:07:33 -05:00
PX4 Build Bot d835d122dc Update submodule sitl_gazebo to latest Fri Feb 22 12:38:23 UTC 2019
- sitl_gazebo in PX4/Firmware (4e792b2487): https://github.com/PX4/sitl_gazebo/commit/b34a96e7e5572209d21b9445be048c77ef041baa
    - sitl_gazebo current upstream: https://github.com/PX4/sitl_gazebo/commit/2e80474653bcb7808a7dfced4cf403ef607d69da
    - Changes: https://github.com/PX4/sitl_gazebo/compare/b34a96e7e5572209d21b9445be048c77ef041baa...2e80474653bcb7808a7dfced4cf403ef607d69da

    2e80474 2019-02-18 Elia Tarasov - fix comment for mag strength table unit
9a9a137 2019-02-18 Elia Tarasov - fix comment for the file name
7c49b2f 2019-02-18 Elia Tarasov - add units to mag variables
c004d94 2019-02-18 Elia Tarasov - fix magnetic field calculation by using geo lookup table
e9a3940 2019-02-18 Elia Tarasov - fix comment on magnetic data source and properties
c76ac17 2019-02-18 Elia Tarasov - copy magnetic data tables and functions from ecl/geo_lookup
28f59c5 2019-02-18 Elia Tarasov - add constrain function
8c869ed 2019-02-18 Elia Tarasov - fix linker complain on multiple definitions
b5213a7 2019-02-18 Elia Tarasov - add getters for mag inclination and strength
d311233 2019-02-15 Elia Tarasov - fix D-component of magnetic field for Zurich according to WMM2015
2019-02-22 21:32:20 +00:00
Daniel Agar e4b3c8bcc6 tests enable bezier and search_min 2019-02-22 16:23:57 -05:00
Oleg Kalachev 0b4751d031 simulator_mavlink: fix DISTANCE_SENSOR.covariance field handling 2019-02-22 18:31:27 +00:00
Oleg Kalachev fbc8d01a7e Rename distance_sensor.covariance to variance 2019-02-22 18:31:27 +00:00
Oleg Kalachev 8ba7569852 mavlink_messages: fill DISTANCE_SENSOR.covariance correctly 2019-02-22 18:31:27 +00:00
Oleg Kalachev ec3f1fd5c2 mavlink_receiver: fix DISTANCE_SENSOR covariance handling 2019-02-22 18:31:27 +00:00
mtm-oss b818b07df3 mc_att_control: Failover in case of gyroscope failure (#11516)
Problem description at: http://discuss.px4.io/t/multicopter-lock-if-primary-gyro-fails/9685
2019-02-22 12:51:40 -05:00
David Sidrane 4e792b2487 Update nuttx with backport f7 i2c fix on 7.28+ 2019-02-21 16:07:58 -05:00
Daniel Agar 184aa2861a PX4_ISFINITE use builtin everywhere 2019-02-21 14:56:08 -05:00
Beat Küng 75bb3e9bac bmi055: add support for IMU_GYRO_CUTOFF and IMU_ACCEL_CUTOFF 2019-02-21 12:30:44 -05:00
Beat Küng ba6ef19314 bmi055: fixes for on-chip filter
- Accel: use cutoff of 62.5 Hz instead of 500 Hz
- Gyro: the cutoff frequency is coupled with the ODR and is fixed to 116 Hz
  at 1 kHz readout rate. So this patch does not change anything for the
  gyro.
2019-02-21 12:30:44 -05:00
mcsauder 6762f09490 Move variable initializations to header file that were no longer in the correct order in the constructor list. 2019-02-21 09:22:01 -05:00
mcsauder 8a6a5cc310 Deprecate #defines that are not needed, format whitespace and minor (incomplete) alphebetization of a few lists. 2019-02-21 09:22:01 -05:00
Alessandro Simovic cb9d483cb8 navigator: removed "using" C++ directive
There is only one occurence of the namespace specified,
so it's more readable to simply specify the full namespace in this case.
2019-02-21 09:20:06 -05:00
Alessandro Simovic 168f1a5d51 navigator: offboard_mission -> mission 2019-02-21 09:20:06 -05:00
bazooka joe 6ed5ee6865 remove check of myoptind >= argc because: [bkueng](/bkueng)
Because BATT_SMBUS is using a different structure (the ModuleBase class), and `BATT_SMBUS::task_spawn` is only called for the `start` command. This is the reason why you don't need to check for it in here.
2019-02-21 09:45:45 +01:00
bazooka joe 7bac0e03de Fixed using myoptarg instead of optarg 2019-02-21 09:45:45 +01:00
Beat Küng ae335f6bd8 Fixed using myoptarg instead of optarg
Co-Authored-By: BazookaJoe1900 <BazookaJoe1900@gmail.com>
2019-02-21 09:45:45 +01:00
Beat Küng 550710d502 Fixed using myoptarg instead of optarg
Co-Authored-By: BazookaJoe1900 <BazookaJoe1900@gmail.com>
2019-02-21 09:45:45 +01:00
Beat Küng 8e991f1878 Fixed using myoptarg instead of optarg
Co-Authored-By: BazookaJoe1900 <BazookaJoe1900@gmail.com>
2019-02-21 09:45:45 +01:00
Beat Küng e639a8834c Fixed using myoptarg instead of optarg
Co-Authored-By: BazookaJoe1900 <BazookaJoe1900@gmail.com>
2019-02-21 09:45:45 +01:00
Beat Küng 1ffacdc3c0 Fixed using myoptarg instead of optarg
Co-Authored-By: BazookaJoe1900 <BazookaJoe1900@gmail.com>
2019-02-21 09:45:45 +01:00
bazooka joe 922c19aa9c using only px4_getopt() and never the unsafe getopt()
using only <px4_getopt.h> as include, cleanup related includes
added check that all the option are valid (myoptind >= argc). if there are invalid options on some script that might now lead not to run commands
2019-02-21 09:45:45 +01:00
Anna Dai 3db901b238 add mavlink mode external vision MAVLINK_MODE_EXTVISION
the mode can be used for VIO algorithms and obstacle avoidance to close the loop
2019-02-21 09:18:23 +01:00
mcsauder b5be8d9fd1 Add perf_free() calls orb_unsubscribe and remove delete _instance in the Simulator class destructor. 2019-02-21 08:12:22 +01:00
mcsauder 437a9e0260 Move remaining variable initialization from constructor list and alphabetize/organize methods and vars ordering. 2019-02-21 08:12:22 +01:00
Daniel Agar 88fd8147fd commander auto disarm if kill switch engaged for 5 seconds
- closes #10133
2019-02-20 18:37:20 +01:00
Matej Frančeškin 9782aecc73 Added GPS reset command 2019-02-19 16:30:42 +01:00
Beat Küng 6d2849f4ef fmu-v4 rc.board_extras: use 'if ! ' instead if 'if then else' 2019-02-19 10:55:55 +01:00
Beat Küng ea27a03599 atxxxx: various fixes & cleanup 2019-02-19 10:55:55 +01:00
Beat Küng 7312059c29 atxxxx: refactor to ModuleBase (fixes some uorb subscription problems) 2019-02-19 10:55:55 +01:00
Beat Küng 717e52fa57 osd: rename driver to atxxxx 2019-02-19 10:55:55 +01:00
DanielePettenuzzo c3f9294b49 omnibus: initial osd driver for omnibus board 2019-02-19 10:55:55 +01:00
mcsauder 31f23c1e76 Rename tune_control_s strength to volume to match Nuttx and Linux standard nomenclature for audio (loudness) control. 2019-02-19 10:07:53 +01:00
Todd Colten 57dd1b7b45 reduced use of mixed capitalization
e.g. 
Preflight Fail: Height estimate error
Preflight Fail: Velocity estimate error
Preflight Fail: Position estimate error
Preflight Fail: Yaw estimate error
2019-02-19 09:44:42 +01:00
Todd Colten 0faba12337 re-word Preflight Fail msg, attempt 2
My recent PR exceeded the 50 char limit (apparently the last character must be null?).

This new attempt changes: "Preflight Fail: Horizontal position estimate Error"  to: "Preflight Fail: Position estimate Error"

In fact, this newest wording is more easily understood by the average user and is actually more consistent with the other COM_ARM_EKF_xxx related errors:

COM_ARM_EKF_HGT --> "Preflight Fail: Height estimate Error"
COM_ARM_EKF_VEL --> "Preflight Fail: Velocity estimate Error"
COM_ARM_EKF_POS --> "Preflight Fail: Position estimate Error"
2019-02-19 09:44:42 +01:00
Beat Küng 64f29fdff8 Tools/sitl_gazebo: update submodule
Includes https://github.com/PX4/sitl_gazebo/pull/283
2019-02-19 08:43:42 +01:00
stmoon 460c16cd7a add mavlink_tcp_port for multiple uav simultation 2019-02-19 08:12:12 +01:00
Hamish Willee 4dc1503122 Fix link to EKF tuning page 2019-02-19 08:05:39 +01:00
mcsauder a6d186dfed Rename Tunes::get_next_tune() to Tunes::get_next_note(). 2019-02-19 08:00:11 +01:00
Julian Oes 18f7ee2d50 jMAVSim: update submodule, use -lockstep CLI arg
This updates the jMAVSim submodule which includes a fix for HITL.
In order to fix HITL, a CLI argument `-lockstep` was required to enable
lockstep. This has now been added to the command in jmavsim_run.sh.
2019-02-18 20:25:50 +00:00
mcsauder d6dc5a7302 Rename MB12XX_MAX_RANGEFINDERS to RANGE_FINDER_MAX_SENSORS. 2019-02-18 13:07:47 -05:00
Julian Oes 4dea79b2d6 sensors: prevent double orb_copy of gyro topic
By using the uORB::Subscription API we use a separate subscription
rather than `orb_copy` on the existing file descriptor used in
sensors through `px4_poll`.

This fixes a very peculiar problem that we observed in SITL in CI for
fixedwing. The events were as follows:

1. `sensors` does `px4_poll` on the gyro topic (as normal), and gets
   the latest sample using `orb_copy`.
2. A parameter update happens when the mag is initialized and triggers
   `VotedSensorsUpdate::parameters_update()` where `orb_copy` happens
   before the main loop in `sensors` has started a `px4_poll`.
3. `sensors` now does the `px4_poll`, however waits indefinitely because
   it has already copied the latest sample.
   Also, the `px4_poll` will never time out because in lockstep the
   simulator waits for the next actuator control message which it never
   gets and therefore it never sends the next sensor message with a new
   timestamp to advance the time.

This only happens for fixedwing because there is only one "uORB path"
through the system unlike for multicopter where a gyro sample can get
picked up by either `sensors` or directly `mc_att_control`, so the
system can survive if `sensors` has "drops".
2019-02-18 11:44:07 -05:00
Daniel Agar 2e10bba829 Jenkins SITL restore FW tests 2019-02-18 11:44:07 -05:00
Daniel Agar 344f632443 Jenkins SITL tests coverage temporarily disable process_logdata_ekf.py coverage
- need to update to python3 coverage.py.
2019-02-18 11:40:29 -05:00
David Sidrane 0705d6c807 stm32 drv_io_timer: Prevent glitch on PWM outputs (#11453)
Rate changes were doing an asynchronous register reload via the EGR_UG. This could extend a PWM pulse up to 2X.

This fix removes the asynchronous update. The net effect is the the rate change will occur on the next counter expiration. The worst case is the rate change is delayed by 20 Ms.
2019-02-18 11:08:04 -05:00
JohannesBrand b01e470ff9 refactor ecl ekf analysis (#11412)
* refactor ekf analysis part 1: move plotting to functions

* add plot_check_flags plot function

* put plots in seperate file

* use object-oriented programming for plotting

* move functions for post processing and pdf report creation to new files

* add in_air_detector and description as a csv file

* refactor metrics and checks into separate functions

* refactor metrics into seperate file, seperate plotting

* ecl-ekf tools: re-structure folder and move results table generation

* ecl-ekf-tool: fix imports and test_results_table

* ecl-ekf tools: bugfix output observer tracking error plot

* ecl-ekf-tools: update batch processing to new api, fix exception handling

* ecl-ekf-tools: use correct in_air_detector

* ecl-ekf-tools: rename csv file containing the bare test results table

* ecl-tools: refactor for improving readability

* ecl-ekf tools: small plotting bugfixes

* ecl-ekf tools: small bugfixes in_air time, on_ground_trans, filenames

* ecl-ekf-tools: fix amber metric bug

* ecl-ekf-tools: remove custom function in inairdetector

* ecl-ekf-tools: remove import of pandas

* ecl-ekf-tools: add python interpreter to the script start

* ecl-ekf-tools pdf_report: fix python interpreter line

* px4-dev-ros-kinetic: update container tag to 2019-02-13

* ecl-ekf-tools python interpreter line: call python3 bin directly

* ecl-ekf-tools: change airtime from namedtuple to class for python 3.5

* ecl-ekf-tools: update docker image px4-dev-ros-kinetic

* ecl-ekf-tools: fix memory leak by correctly closing matplotlib figures
2019-02-18 16:52:02 +01:00
Daniel Agar 77b5c47d7f STM32F7 disable d-cache as a precaution (#11374)
- see 1259864 Data corruption in a sequence of Write-Through stores and loads
 - if we can be certain this sequence won't occur in PX4 then the d-cache will be re-enabled
2019-02-18 09:43:15 -05:00
Todd Colten 4c21163c78 re-word landing required msg for understandability
changed: "Mission rejected: land start required."
to: "Mission rejected: landing pattern required."

This new message is more clear to the average user.  When using RTL_TYPE = 1, mission feasibility checker adds the requirement of a landing sequence beginning with a MAV_CMD_DO_LAND_START and ending with a MAV_CMD_NAV_LAND with at least 1 other waypoint prior to the land waypoint.  The warning message "Mission rejected: land start required." is a common warning to trigger whenever the mission is blank or the mission is uploaded without a landing pattern.  The wording in this message confusing to the average user as they usually do not know the inner workings of the "landing pattern" that their planning software helps them make (e.g. Qgroundcontrol).  The only users who would know what a "Do_Land_Start" mission item is are advanced users already and this new message should work equally well for them as well as the non-advanced user.
2019-02-18 09:38:59 -05:00
Todd Colten b23374688b re-word Preflight Fail msg for consistency
changed: "Preflight Fail: Horizontal estimate Pos Error"
to: "Preflight Fail: Horizontal position estimate Error"
2019-02-17 23:44:47 +00:00
Antiheavy 1bcce518b0 Fixed typo in comment. from: EPV to: EPH
The comment description for COM_POS_FS_EPH incorrectly stated "...horizontal position error (EPV)...".  This fixes the acronym to "(EPH)".
2019-02-16 19:37:12 +00:00
Hamish Willee 6302452066 Remove unwanted info option 2019-02-15 10:41:32 +01:00
Hamish Willee f8c0849ff7 Add module docs for leddar_one 2019-02-15 10:41:32 +01:00
TSC21 57f1f01319 microRTPS_transport: replace printf() with PX4_ERR() 2019-02-15 08:54:58 +00:00
Gabriel Moreno 6bb0046407 urtps: fix UART speed setting to work in Linux
The previous code used the numeric baudrate as the speed argument
for cfsetispeed() and cfsetospeed(). This works in OSX and NuttX,
but is not portable.

This fix introduces a new method to convert baudrate to speed using
constants such as B115200.

Signed-off-by: Gabriel Moreno <gabrielm@cs.cmu.edu>
2019-02-15 08:54:58 +00:00
TSC21 d4570e10f3 Jenkins CI: PX4 ROS msgs stage: properly name the ros1 branch 2019-02-15 08:51:58 +00:00
TSC21 d1182f18ed Jenkins CI: PX4 ROS msgs stage: deploy message definitions to the 'ros1' branch of 'px4_msgs' 2019-02-15 08:51:58 +00:00
bresch 197ddd3e46 mc_pos_control - Publish trajectory setpoint directly after the FlightTask update 2019-02-13 20:56:57 +01:00
bresch c0dab47554 mc_pos_control - reduce smooth_velocity_takeoff default threshold, set initial takeoff speed to 0 and remove useless else 2019-02-13 20:56:57 +01:00
bresch e0c48d1d76 PositionControl - use dynamic constraints to saturate velocity controller for now as it is needed for the current smooth takeoff logic. Will be reverted after smooth takeoff refactor 2019-02-13 20:56:57 +01:00
bresch 106f0769fd mc_pos_control - add takeoff_ramp_time zero division guard 2019-02-13 20:56:57 +01:00
bresch 70ddb8049a Traj Smoothing - make format 2019-02-13 20:56:57 +01:00
bresch 3543071eb9 Position Controller - Saturate the controllers using static parameters. Handle saturations in the flight tasks only 2019-02-13 20:56:57 +01:00
bresch 4cace1bbe9 Manual vel smooth - use speed_up and speed_down constraints to limit velocity target of the trajectory generator 2019-02-13 20:56:57 +01:00
bresch b7c2464cce Manual vel smooth - Use MPC_JERK_MAX only 2019-02-13 20:56:57 +01:00
bresch 1730cd3a69 Velocity Smoothing - Various improvements, cleanup and corner cases fixes 2019-02-13 20:56:57 +01:00
bresch f1262cbe84 Manual Traj - Avoid velocity jumps due to a modification of the constraints 2019-02-13 20:56:57 +01:00
bresch 57eef6b170 Manual Trajectory - Add Z position lock logic and log complete trajectory 2019-02-13 20:56:57 +01:00
ArkadiuszNiemiec 556ac5547b attitude_estimator_q: fix newline at end of file 2019-02-13 08:51:41 -05:00
ArkadiuszNiemiec d93c3da172 q_estimator: correctly handle loss of external yaw estimation 2019-02-13 08:51:41 -05:00
ArkadiuszNiemiec 6257037924 Revert "q_estimator: correctly handle loss of external yaw estimation" 2019-02-13 08:51:41 -05:00
Arkadiusz Niemiec 075c836dfb q_estimator: correctly handle loss of external yaw estimation 2019-02-13 08:51:41 -05:00
Hamish Willee 3a34209dc1 Fix error text to: unrecognised command 2019-02-13 09:42:05 +01:00
Hamish Willee 1aaf342e86 Add usage output to command 2019-02-13 09:42:05 +01:00
Hamish Willee 48105ba878 Add module docs for tfmini driver 2019-02-13 09:42:05 +01:00
Hamish Willee 2b20c50659 Add module docs for teraranger 2019-02-13 09:20:07 +01:00
Daniel Agar 8185334994 navigation.h handle mission item structure padding explicitly
- also applies to mission_stats_entry_s, mission_fence_point_s,
   mission_save_point_s
 - -Wpadded warning is disabled by default because the snapdragon
   toolchain doesn't respect the pragma pop
2019-02-13 08:08:01 +01:00
David Sidrane beff3ae66a deprecate gumstix aerocore - no longer supported by mfg 2019-02-12 20:53:45 -05:00
Daniel Agar f1d17c9003 camera_capture add to all boards 2019-02-11 14:15:28 -05:00
Daniel Agar fb7c0376a0 systemlib hysteresis improve field packing and cleanup 2019-02-11 11:57:05 -05:00
Daniel Agar d7ba8cc3f0 simulator mavlink don't send_controls() until ready (#11426) 2019-02-11 10:50:24 -05:00
Daniel Agar 24d46df577 simulator cleanup initialization 2019-02-11 09:48:02 -05:00
Beat Küng 0acdffad90 fix MPU6000: restore orb priority
Fixes regression from https://github.com/PX4/Firmware/pull/11216.
2019-02-11 12:16:46 +01:00
Mark Sauder 352be14bbe Alphabetizing/standardizing orders in tunes.cpp and tunes.h files
- Remove a constructor overload by adding default values, and disambiguate a few variables by adding verbosity to naming.
2019-02-10 20:31:12 -05:00
David Sidrane b40f8d52a8 STM32F7 disable d-cache as a precaution (#11374)
- see 1259864 Data corruption in a sequence of Write-Through stores and loads
 - if we can be certain this sequence won't occur in PX4 then the d-cache will be re-enabled
2019-02-10 18:25:16 -05:00
Anna Dai a2bb826523 fix for AV board mavlink streams 2019-02-10 18:07:44 -05:00
DanielePettenuzzo 3e9acee83e add camera capture support for av_x board (not timer capture but gpio capture) 2019-02-10 18:07:44 -05:00
DanielePettenuzzo b12b4e1222 fixes after rebase 2019-02-10 18:07:44 -05:00
DanielePettenuzzo 15abb159a8 camera_capture: change topic namings to make logging, mavlink streaming and geotagging easier 2019-02-10 18:07:44 -05:00
DanielePettenuzzo faf535b040 camera_capture: remove trig_buffer and replace it with public structure 2019-02-10 18:07:44 -05:00
DanielePettenuzzo 0ee66c5434 camera_capture: clean trigger modes and change fmu to 4pwm2cap 2019-02-10 18:07:44 -05:00
DanielePettenuzzo 50f8c7349c fmu: add mode_4pwm2cap 2019-02-10 18:07:44 -05:00
DanielePettenuzzo 24f77ec5a4 rcS: start camera_capture later in script 2019-02-10 18:07:44 -05:00
David Sidrane a153148ef5 camera_capture:Use IOCTL to set capture mode. 2019-02-10 18:07:44 -05:00
David Sidrane 928e0140ee fmu:Add MODE_4PWM1CAP, MODE_5PWM, MODE_5PWM1CAP
This extends the  Capture support for FMU
   CHAN 5 and 6.
2019-02-10 18:07:44 -05:00
DanielePettenuzzo 4876bb2582 camera feedback: fix camera_trigger subscription 2019-02-10 18:07:44 -05:00
DanielePettenuzzo 96961c6f9c camera trigger and camera capture publish on two different topics and camera feedback module uses CAM_CAP_FBACK param to choose between the two. 2019-02-10 18:07:44 -05:00
DanielePettenuzzo 6b65eb2225 camera feedback: remove CAM_FBACK_MODE param. CAM_CAP_FBACK from camera capture driver will be used instead. 2019-02-10 18:07:44 -05:00
DanielePettenuzzo 011a7f26f4 fix camera_trigger publish and reduce time in capture interrupt routine 2019-02-10 18:07:44 -05:00
DanielePettenuzzo 3f99204de2 camera_trigger.msg: add feedback field to understand if message camera from trigger or capture driver 2019-02-10 18:07:44 -05:00
DanielePettenuzzo 38c8a6ff74 camera_capture: add cycle for cycle_trampoline 2019-02-10 18:07:44 -05:00
DanielePettenuzzo ea9d6899ae clean up camera capture driver 2019-02-10 18:07:44 -05:00
DanielePettenuzzo 42e2bd47c4 add camera capture mode and edge params 2019-02-10 18:07:44 -05:00
DanielePettenuzzo d49752141d rename camera capture feedback param and move it from camera_feedback module to camera capture driver 2019-02-10 18:07:44 -05:00
DanielePettenuzzo 42afc88285 add camera trigger feedback (input capture when camera actually takes the photo) 2019-02-10 18:07:44 -05:00
bresch 5229882470 Camera Capture - Use falling edge only 2019-02-10 18:07:44 -05:00
bresch 7906bff914 Camera Capture - add "status" to camera_capture usage help message 2019-02-10 18:07:44 -05:00
bresch faa8b6fe6d Camera Capture - enable capture at startup 2019-02-10 18:07:44 -05:00
Mohammed Kabir 94bb02a9c7 Add camera_capture driver 2019-02-10 18:07:44 -05:00
mcsauder 2fa70fca80 Added audio tune signals for unit tests passing and failing. 2019-02-10 17:47:16 -05:00
mcsauder 0032df3e87 Update the test_tone() unit test to use orb_advertise() and orb_publish() instead of IOCTL() and alphabetize tests_main.h. 2019-02-10 17:47:16 -05:00
mcsauder 6dc840ac6a Break test_tone and test_ppm out of the test_hrt.cpp file into their own respective files. 2019-02-10 17:47:16 -05:00
Daniel Agar 05dc2ba3ec update px4 dev containers to 2019-02-09
- this updates all containers except for px4-dev-snapdragon
2019-02-10 17:33:17 -05:00
Daniel Agar 0b16e650b7 Jenkinsfile temporarily disable catkin and colcon builds 2019-02-10 17:03:56 -05:00
Daniel Agar 955cde72af Jenkins SITL tests temporarily disable FW test (#11428)
- waiting for https://github.com/PX4/Firmware/issues/11380
2019-02-10 16:34:23 -05:00
Daniel Agar 7c3999e00e update mavlink and sitl_gazebo to latest with odometry velocity covariance 2019-02-10 16:32:59 -05:00
Daniel Agar fafadd4686 update all submodules to PX4 forks (#11407) 2019-02-10 15:48:59 -05:00
Roman e49549a433 uavcan: use px4 timestamp for the esc status message
- there is a timeshift between the esc and px4 time so until there is some
kind of offset estimation we are better off using px4 time since the logging
system uses that as reference

Signed-off-by: Roman <bapstroman@gmail.com>
2019-02-10 09:22:59 -05:00
PX4 Build Bot 795e13ca59 Update submodule ecl to latest Sat Feb 9 00:38:44 UTC 2019
- ecl in PX4/Firmware (65377def832e82bd667ff6e0d00155c95b51b12e): https://github.com/PX4/ecl/commit/54ab8191e34b06dd2e6f96fe1b0adb971c5b77f0
    - ecl current upstream: https://github.com/PX4/ecl/commit/1378ec179717448404c74819871d149217350b19
    - Changes: https://github.com/PX4/ecl/compare/54ab8191e34b06dd2e6f96fe1b0adb971c5b77f0...1378ec179717448404c74819871d149217350b19

    1378ec1 2019-02-07 Daniel Agar - EKF mag_fusion avoid unnecessary double promotion
2019-02-08 21:05:20 -05:00
Daniel Agar adad624572 px4_fmu-v5 remove PX4_FMUV5_RC00 2019-02-08 20:52:15 -05:00
Daniel Agar 06f5a782f4 px4_fmu-v5 board spi cleanup 2019-02-08 20:52:15 -05:00
David Sidrane c6edf41a74 test time: Fixed bad assumption about RAND_MAX (#11414)
usleep range was up to 2147 Seconds

   Per open group: The rand() function shall compute a
   sequence of pseudo-random integers in the range
   [0, {RAND_MAX}]  with a period of at least 2^32

   {RAND_MAX} Maximum value returned by rand();
   at least 32767.

   /* Maximum value returned by rand().  Must be a minimum of 32767. */

   #define RAND_MAX INT_MAX

  and

  #define INT_MAX     2147483647
2019-02-08 14:39:18 -05:00
Daniel Agar 2217faf812 mathlib Limits constexpr helpers don't use references (#11411)
- fixes #11408
 - cleanup Limits.hpp
2019-02-08 14:10:09 -05:00
Daniel Agar 13634e6757 Jenkins compile mac: double timeout (#11416) 2019-02-08 14:09:08 -05:00
Beat Küng ab6ab97aa2 px4_module: document that the subcategory is optional 2019-02-08 09:29:46 +01:00
Beat Küng 4452669614 module documentation: add support for subcategories 2019-02-08 09:29:46 +01:00
Beat Küng d8b013355c PRINT_MODULE_USAGE_PARAM_{INT,FLOAT}: add support to ignore the default value 2019-02-08 09:29:46 +01:00
Daniel Agar c3d6a042e6 Jenkins SITL coverage build in place to handle gcov paths properly 2019-02-07 16:11:25 -05:00
Daniel Agar 7f3b170024 mc_att_control: landing gear publish correct message 2019-02-07 11:57:35 +01:00
Daniel Agar 07fbd2202a EKF2 use simplified ecl/EKF setIMUData 2019-02-06 20:20:51 -05:00
Daniel Agar ddc9522712 EKF2 always use IMU timestamp as now 2019-02-06 20:20:51 -05:00
PX4 Build Bot 4c4ee67954 Update submodule ecl to latest Thu Feb 7 00:38:05 UTC 2019
- ecl in PX4/Firmware (9580dea9c2ab12d9fd6eaa1a3232c7c80639bef4): https://github.com/PX4/ecl/commit/dd58e695494acab73fb6fcec7074291edb5c226b
    - ecl current upstream: https://github.com/PX4/ecl/commit/54ab8191e34b06dd2e6f96fe1b0adb971c5b77f0
    - Changes: https://github.com/PX4/ecl/compare/dd58e695494acab73fb6fcec7074291edb5c226b...54ab8191e34b06dd2e6f96fe1b0adb971c5b77f0

    54ab819 2019-02-06 Carl Olsson - EKF: add method to get the terrain variance
c5554ca 2019-02-03 Daniel Agar - EKF tests update SWIG usage and use latest containers
2019-02-06 20:15:02 -05:00
Daniel Agar 537318cbb5 navigator delete unused mission_yaw_mode 2019-02-06 18:59:11 -05:00
Daniel Agar 83e76ece1c navigator mission block fix get_time_inside() and cleanup helpers 2019-02-06 18:59:11 -05:00
Daniel Agar 3665bc59b8 navigator initialize all mission items safely 2019-02-06 18:59:11 -05:00
Daniel Agar 26185f7c07 navigator orb subscribe/unsubscribe in constructor/destructor 2019-02-06 18:59:11 -05:00
Daniel Agar 6a08c1b6f1 Jenkins SITL tests increase test history from 2 -> 5 2019-02-06 13:37:44 -05:00
Daniel Agar 3959180a2e Jenkins PX4 ROS deploy steps cleanup first 2019-02-05 21:37:15 -05:00
Daniel Agar 8a3305742e Update submodule mavlink v2.0 to latest Wed Feb 6 01:50:00 UTC 2019 (#11391)
- mavlink v2.0 in PX4/Firmware (068a10b8f062759c2af5e20433608289dd198366): https://github.com/mavlink/c_library_v2/commit/e302e1b735e47e9d33c3bad579dd7c6c089c1bb3
    - mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/cf858b4513d4eb1689b7c45a30531ea2e65b589c
    - Changes: https://github.com/mavlink/c_library_v2/compare/e302e1b735e47e9d33c3bad579dd7c6c089c1bb3...cf858b4513d4eb1689b7c45a30531ea2e65b589c
2019-02-05 21:29:45 -05:00
Daniel Agar 216a3e13e7 Update submodule gencpp to latest Wed Feb 6 01:50:06 UTC 2019 (#11390)
- gencpp in PX4/Firmware (ed8517a7d97f15cdf556cdc64496cc72bebb99ab): https://github.com/ros/gencpp/commit/b41ee3060badd660662e21cd9d4f81971c87a420
    - gencpp current upstream: https://github.com/ros/gencpp/commit/7e446a9976916a7b6fc7266098c67fc6f73a76e0
    - Changes: https://github.com/ros/gencpp/compare/b41ee3060badd660662e21cd9d4f81971c87a420...7e446a9976916a7b6fc7266098c67fc6f73a76e0

    7e446a9 2019-01-25 James Xu - enable Windows build (#38)
2019-02-05 21:22:37 -05:00
Daniel Agar 6abd94e2b7 Update submodule genmsg to latest Wed Feb 6 01:50:12 UTC 2019 (#11389)
- genmsg in PX4/Firmware (d4338773aa0139295caff03dc8275b44b88ccd04): https://github.com/ros/genmsg/commit/42e364661025b8f3d51486dc513d9e29cbd308da
    - genmsg current upstream: https://github.com/ros/genmsg/commit/5736b1f7ad037fb5811a3100ba9da2db0ec1f20a
    - Changes: https://github.com/ros/genmsg/compare/42e364661025b8f3d51486dc513d9e29cbd308da...5736b1f7ad037fb5811a3100ba9da2db0ec1f20a

    5736b1f 2019-01-28 Dirk Thomas - add missing run_depend on empy (#81)
2019-02-05 21:21:09 -05:00
Daniel Agar 1a4d31140e create example vehicle type build configs for fmu-v2 and fmu-v5 (#10963)
- update navigator precision landing to build without multicopter
2019-02-05 19:53:54 -05:00
CarlOlsson fd4caa849d msg: add gps_yaw and mag_aligned to estimator_status
Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2019-02-05 19:31:30 -05:00
Daniel Agar 40252075f3 Jenkins add SITL tests coverage pipeline 2019-02-05 15:42:34 -05:00
Daniel Agar 25b4b63364 check_submodules.sh don't force update in CI 2019-02-05 14:47:58 -05:00
Daniel Agar 87b17bed58 px4io depend on NuttX submodules 2019-02-05 14:47:58 -05:00
Daniel Agar aec698ae44 appveyor: only build px4_sitl_tests (avoid building SITL twice) 2019-02-05 14:34:01 -05:00
Daniel Agar 986ff96c3e Jenkins mac compile run tests separately 2019-02-05 14:34:01 -05:00
Daniel Agar 071ec7d7cd Makefile: quick_check avoid building px4_sitl twice 2019-02-05 14:34:01 -05:00
Daniel Agar 205b0d94ca Update submodule sitl_gazebo to latest Tue Feb 5 12:38:27 UTC 2019 (#11377)
- sitl_gazebo in PX4/Firmware (6178ead6ea): https://github.com/PX4/sitl_gazebo/commit/12fb19ac6e7695ffc3dc9a64fcdd8499a522bd80
    - sitl_gazebo current upstream: https://github.com/PX4/sitl_gazebo/commit/34d06e042c9dbd336899dbba373e32a6f19828b7
    - Changes: https://github.com/PX4/sitl_gazebo/compare/12fb19ac6e7695ffc3dc9a64fcdd8499a522bd80...34d06e042c9dbd336899dbba373e32a6f19828b7

34d06e0 2019-02-05 Tully Foote - create plane_cam world
93159f3 2019-02-01 TSC21 - CMakeLists: install package.xml
c5882f7 2019-01-31 Anthony Lamping - models: plane: split up, adding plane_cam
38fe49a 2019-02-01 TSC21 - Travis CI: do not pass user id env var to the container
0f1221b 2019-02-01 TSC21 - Travis CI: update Ubuntu container tags
bab0de9 2019-01-31 Anthony Lamping - models: remove matrice 100 opt flow meshes
0efbe69 2019-01-23 Oleg Kalachev - Fix building on macOS
2019-02-05 11:58:22 -05:00
Julian Oes b17c0a11ab mavlink: improve comments about message forwarding (#11323)
This removes the confusing ugly magic number of 233 introduced as part
of https://github.com/PX4/Firmware/pull/7670.

Also, the convoluted if is cleaned up using 3 separate bools with some
comments to explain what's going on.

This should not change anything function-wise except that the flight
controller could now potentially also use system ID 233 and not break
forwarding.
2019-02-05 10:33:49 -05:00
Lorenz Meier 3d3a98c803 Add script to set the correct ulimit on Mac OS (#11247) 2019-02-05 10:19:55 -05:00
Hamish Willee 87993e7335 Indicate version in which SYS_COMPANION deprecated (#11327) 2019-02-05 10:16:28 -05:00
Julien Lecoeur 34717f7005 Merge pull request #11288 from PX4/pr-tiltrotor_noairspeed_transition_check
tiltrotor: fix transition check when airspeed is invalid
2019-02-05 10:09:48 -05:00
Matthias Grob 664674c36b simulator_mavlink: zero initializer instead of memset
Needed a clear scope inside a case for irlock_reports.
2019-02-05 10:09:15 -05:00
Matthias Grob 73f4706597 simulator_mavlink: consistent system call scope operator 2019-02-05 10:09:15 -05:00
TSC21 6178ead6ea Jenkins CI: PX4 ROS2 bridge stage: rollback test branch name 2019-02-05 08:18:14 +00:00
TSC21 cd49556aee Jenkins CI: PX4 ROS2 bridge stage: deploy uORB RTPS ID map before the scripts 2019-02-05 08:18:14 +00:00
TSC21 59a264b179 Jenkins CI: PX4 ROS2 bridge stage: update container tag 2019-02-05 08:18:14 +00:00
TSC21 29232b2499 Jenkins: px4_ros_com deploy: test 2019-02-05 08:18:14 +00:00
TSC21 14d7adc519 Jenkins CI: PX4 ROS2: deploy required tools 2019-02-05 08:18:14 +00:00
Daniel Agar 7a1c8ea8cb Update platforms/posix/src/lockstep_scheduler/CMakeLists.txt
Co-Authored-By: MaEtUgR <maetugr@gmail.com>
2019-02-04 21:31:06 +01:00
Matthias Grob ffb8bb6066 lockstep_scheduler: correct cmake target includes 2019-02-04 21:31:06 +01:00
Daniel Agar 2d922b5cb4 FW airframe defaults relax EKF2 GPS checks 2019-02-04 11:02:38 -05:00
Daniel Agar 2b16be9281 Jenkins hardware test remove px4_fmu-v4 stackcheck
- the stackcheck build is too slow to be useful
- will be recreated with fmu-v5
2019-02-04 10:54:38 -05:00
Beat Küng aa020eb28e airframes: add Holybro QAV250 2019-02-04 09:31:02 -05:00
bastien 1990338a3f gps: Support for Emlid Reach
Support Emlid Reach in ERB format,
including autodetect

Reported-by: Bastien Auneau <bastien.auneau@while-true.fr>
2019-02-04 09:10:11 -05:00
Paul Riseborough 9692ef1ae9 commander: remove duplicate check 2019-02-04 10:32:19 +01:00
Daniel Agar 248320b328 PreflightCheck trivial astyle fix 2019-02-04 10:32:19 +01:00
Paul Riseborough 6fb7cda9f2 commander: Reduce false positives in pre-flight accel bias check 2019-02-04 10:32:19 +01:00
Daniel Agar 7ecb04db2b Jenkins split MacOS builds into new pipeline 2019-02-04 00:18:56 -05:00
Daniel Agar daae9e85b8 Jenkins hardware increase test timeout and update container version 2019-02-03 23:58:40 -05:00
Julien Lecoeur fe83378db4 Tiltrotor: Do not lock elevons in multirotor mode
The behaviour is unchanged because VT_ELEV_MC_LOCK was not implemented for tiltrotors
2019-02-03 22:33:42 -05:00
Julien Lecoeur 6c1d85716c Convergence: Do not lock elevons in multirotor mode
The behaviour is unchanged because VT_ELEV_MC_LOCK was not implemented for tiltrotors
2019-02-03 22:33:42 -05:00
Julien Lecoeur 15f9b70431 Claire: Do not lock elevons in multirotor mode
The behaviour is unchanged because VT_ELEV_MC_LOCK was not implemented for tiltrotors
2019-02-03 22:33:42 -05:00
Julien Lecoeur 9b5dd1596f FireFly6: Do not lock elevons in multirotor mode
The behaviour is unchanged because VT_ELEV_MC_LOCK was not implemented for tiltrotors
2019-02-03 22:33:42 -05:00
Julien Lecoeur 57f9104420 VTOL tiltrotor: respect VT_ELEV_MC_LOCK 2019-02-03 22:33:42 -05:00
Anthony Lamping 77ea5249a1 startup: add plane_cam 2019-02-03 22:32:24 -05:00
PX4 Build Bot c6e60c2189 Update submodule ecl to latest Sun Feb 3 07:37:55 EST 2019
- ecl in PX4/Firmware (0dc2ccb130e891b387b4e0d6ea4492473339e142): https://github.com/PX4/ecl/commit/721f5e61a5965a08a34b2875d2bdc0b5d3b80601
    - ecl current upstream: https://github.com/PX4/ecl/commit/dd58e695494acab73fb6fcec7074291edb5c226b
    - Changes: https://github.com/PX4/ecl/compare/721f5e61a5965a08a34b2875d2bdc0b5d3b80601...dd58e695494acab73fb6fcec7074291edb5c226b

    dd58e69 2019-01-30 Paul Riseborough - EKF: Ensure FW yaw alignment method is used on first in-air reset
3accab1 2019-01-28 Paul Riseborough - EKF: protect declination fusion from badly conditioned earth field estimates
7bddbd1 2019-01-28 Paul Riseborough - EKF: Update cleaned up autocode fragment with sign error fix and missing LD
fe378fd 2019-01-22 Paul Riseborough - EKF: Prevent unwanted declination fusion when re-starting 3-axis fusion
bd1647a 2019-01-22 Paul Riseborough - EKF: Rework use of fuseDeclination()
d52f536 2019-01-17 Paul Riseborough - EKF: Save mag field covariance data before reset
82ce7a8 2019-01-17 Paul Riseborough - EKF: Save mag field covariance information on startup
708c79e 2019-01-17 Paul Riseborough - EKF: Ensure mag field state covariance data is always available for re-use
8839e4e 2019-01-17 Paul Riseborough - EKF: Don't discard declination certainty information when resuming 3-axis fusion.
25148e1 2019-01-17 Paul Riseborough - EKF: Prevent rapid changes in declination estimate after a reset
6e7c119 2019-01-16 CarlOlsson - EKF: limit yaw variance increase to 0.01 rad^2 to prevent a badly conditioned covariance matrix
0896f7b 2019-01-16 CarlOlsson - EKF: Also fill in lower part of covariance matrix in increaseQuatYawErrVariance()
4b3140e 2019-01-16 Paul Riseborough - EKF: Fix rebase error
911d4d8 2019-01-16 Paul Riseborough - EKF: Fix sign error in increaseQuatYawErrVariance function
a0b9cb0 2018-12-24 Paul Riseborough - EKF: Use consistent method for recording completion of in-flight yaw alignment
ef5a87c 2018-12-21 Paul Riseborough - EKF: Rework quaternion yaw reset.
fc2a089 2018-12-21 Paul Riseborough - EKF: Add function to un-correlate quaternion states
bce1b96 2018-12-21 Paul Riseborough - EKF: Add function enabling yaw variance to be increased
bf1f3a2 2018-12-21 Paul Riseborough - EKF: Derive equations enabling yaw variance to be increased
81eabc1 2019-01-29 Daniel Agar - Jenkins update all containers to latest tag 2019-01-28
a5e6191 2019-01-29 Daniel Agar - EKF add clarity brackets to avoid potential confusion
2019-02-03 18:57:10 -05:00
Daniel Agar a7388f142c auav x2.1 rc.defaults should be rc.board_defaults 2019-02-03 12:10:30 -05:00
Matthias Grob 1d86b7570a license: account for 2019 2019-01-31 17:43:35 +01:00
Matthias Grob 6a53a398e0 FlightTask: decline unimplemented callbacks, improve comments 2019-01-31 17:43:35 +01:00
Daniel Agar 115c31451c SITL use EKF2_MAG_TYPE default value 2019-01-31 09:23:12 -05:00
Anthony Lamping 4821885b03 CI: test: alphabetize args 2019-01-31 09:16:18 -05:00
Anthony Lamping 0fafa9dea7 CI: test: set verbose true 2019-01-31 09:16:18 -05:00
mcsauder 9d67bbc328 Standardized/updated copyright file headers in the src/systemcmds/tests/ directory. 2019-01-30 14:25:18 -05:00
Daniel Agar 40e42a677b NuttX cmake support optional compressed defconfigs 2019-01-30 10:54:53 -05:00
Beat Küng 2f4f4c6623 px4_module: explicitly call the constructor of _task_should_exit
Workaround for a GCC bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58930)
Triggered with the bebop toolchain.
2019-01-30 10:24:06 -05:00
Beat Küng 481bfc6308 px4_module: use px4_atomic_t 2019-01-30 10:24:06 -05:00
Beat Küng b6e2ac74de px4_atomic: add an atomic interface based on GGC's builtin atomics 2019-01-30 10:24:06 -05:00
Julian Oes 027d7e632e sitl_multiple_run.sh: fix port description
This has changed as we changed to TCP with the lockstep implementation.
2019-01-30 09:51:30 +01:00
Daniel Agar 8dc0509989 mpu9250: split icm20948 support out into new separate driver 2019-01-30 09:29:08 +01:00
Daniel Agar d02685c9f7 cmake nuttx .px4 package fix dependency location 2019-01-29 15:34:36 -05:00
Daniel Agar 489ea68b8d ROMFS fix pruned dependency and cleanup 2019-01-29 15:34:36 -05:00
Daniel Agar 298049b0fb px4_fmu-v4_stackcheck sync with default and increase pmw3901 main stack 2019-01-29 14:14:29 -05:00
David Sidrane 6f9a9b3d2c px4_fmu-v4: add runtime external SPI4 detection to support pmw3901 (#11301)
* The build is built with SPI4. At run time the signal GPIO_8266_GPIO2 it tested. If it is low the SPI4 is configured. If it is high SPI4 is not configured.
 * board_common: Add Notion of Board has bus manifest
2019-01-29 13:44:15 -05:00
David Sidrane 53a127beb9 Oversampling rate for MPL3115A2 pressure sensor (#11332)
As reported by @LeoMustafaNXP in https://github.com/PX4/Firmware/issues/11296
2019-01-29 11:41:58 -05:00
Anthony Lamping 22fe083666 Jenkins: bypass entrypoint temporarily (#11329)
* Jenkins: no SITL entrypoint for now
* Jenkins: complile - no snapdragon eagle entrypoint for now
2019-01-29 09:48:24 -05:00
Matthias Grob cdb6aca6bd mc_pos_control: refactor spoolup time naming 2019-01-29 10:02:48 +01:00
Matthias Grob 43fb84a63b mc_pos_control: make sure task gets started after idle delay 2019-01-29 10:02:48 +01:00
mcsauder dc5f18bdcd ToneAlarm class refactoring to implement an interface for hardware specific methods and a single ToneAlarm class. 2019-01-28 18:58:04 -08:00
Daniel Agar 0f386ee52a update all docker containers to latest 2019-01-27
- Jenkins compile drop arch until container is updated and maintained
 - clang-tidy disable for now, the new version isn't respecting the existing configuration
2019-01-28 13:08:58 -05:00
TSC21 c2e48f45ab Jenkins CI: ROS msgs: rollback branch naming 2019-01-28 14:00:21 +01:00
TSC21 c0a4185317 Jenkins CI: ROS msgs: replace GIT_BRANCH with BRANCH_NAME 2019-01-28 14:00:21 +01:00
TSC21 de917bae6d uorb_to_ros_msgs: delete all messages on the out dir first, so it can also consider message deletions on the input dir 2019-01-28 14:00:21 +01:00
TSC21 5c17a0b205 Jenkins CI: ROS msgs: clone by branch 2019-01-28 14:00:21 +01:00
TSC21 be2e1edbe2 Jenkins CI: ROS msgs: update stage name 2019-01-28 14:00:21 +01:00
TSC21 1dcb429d2d ROS msgs: add testing branch 2019-01-28 14:00:21 +01:00
TSC21 84c6e07c5c uorb_to_ros_msgs: only create dir if it doesn't exist 2019-01-28 14:00:21 +01:00
TSC21 a07bcc499a ROS msgs: remove redundant step 2019-01-28 14:00:21 +01:00
TSC21 4b1053d212 Jenkins: set autobuild and deploy for generating px4_msgs repo ROS msg definitions files 2019-01-28 14:00:21 +01:00
mcsauder cced80edf9 Correct the mpu6000 temperature correction scalar value to match the datasheet. 2019-01-28 12:48:03 +01:00
Alessandro Simovic 6e5bd1ad70 commander: remove duplicate includes 2019-01-28 12:05:36 +01:00
Alessandro Simovic fc2fbf5e72 fmu: added missing include 2019-01-28 12:05:36 +01:00
TSC21 78130574a3 uorb_rtps_classifier: add the capability to receive absolute and relative paths 2019-01-28 09:42:16 +01:00
TSC21 8da1ff4cff generate_microRTPS_bridge: add the capability to receive absolute and relative paths 2019-01-28 09:42:16 +01:00
TSC21 4ec40049ce micrortps_bridge: pass absolute path for yaml file and urtps templates 2019-01-28 09:42:16 +01:00
Matthias Grob bda60ecfd6 posix main: hotfix for px4 application not exiting anymore
Some threads do not exit and are still running when
trying to exit SITL running under Windows in Cygwin.

This problem was introduced with:
- posix shell #10173 because of strating a child process
for the startup script and mixing up the signal handling
(only Ctrl+C broken)
- lockstep #10648 because of simulator threads not
stopping gracefully anymore with timing race conditions
(no graceful exit possible anymore)

I leave the SIGINT handler on its default implementation for
Cygwin which kills the process and all its threads when pressing
Ctrl+C.

This hotfix at least allows the usage of Ctrl+C again instead
of forcing the user to use the task manager to shut down
px4.exe going crazy on CPU load instead of exiting
everytime.
2019-01-28 09:38:49 +01:00
Angel 7097c0a1b8 Fixed small bug in batch_process_metadata_ekf.py 2019-01-28 08:09:26 +01:00
Daniel Agar e89779364e Jenkins update px4-dev-base to 2019-01-26 2019-01-27 21:10:48 -05:00
Daniel Agar 23617fb880 px4_fmu-v2_default disable constained flash options 2019-01-27 19:48:38 -05:00
Daniel Agar 739a02022b position_estimator_inav: move to examples (start deprecation) 2019-01-27 22:15:39 +01:00
Daniel Agar 9ffacb1d22 av-x board disable CONFIG_MTD 2019-01-27 11:01:13 -05:00
Matthias Grob 573dd89cbf PositionControl: addess @bkueng 's comment in #11056 2019-01-26 14:53:15 +01:00
Matthias Grob f9ec0cd5ea LandDetector: use vertical velocity estimate for threshold
instead of the derivative of the vertical position which is
not the same value when using the ekf2 estimation.

Using the position derivative resulted in delayed landing because
the value for some reason often bumped over the theshold before
slowly converging towards zero while the velocity was within expected
accuary in all these cases.
2019-01-26 14:53:15 +01:00
Matthias Grob d5903853df mc_pos_control: shut down vertical thrust with ground contact 2019-01-26 14:53:15 +01:00
PX4 Build Bot 98148aad34 Update submodule micro-CDR to latest Sat Jan 26 00:38:18 UTC 2019
- micro-CDR in PX4/Firmware (e0680ffe2280620b81d415328f109dc8decaa1b8): https://github.com/eProsima/micro-CDR/commit/7a76880f90dfe702f4fa1723e22d1dcb491d7b9e
    - micro-CDR current upstream: https://github.com/eProsima/micro-CDR/commit/62d95c870eafb0cccc7bf70bb8a0cbb86f125a0e
    - Changes: https://github.com/eProsima/micro-CDR/compare/7a76880f90dfe702f4fa1723e22d1dcb491d7b9e...62d95c870eafb0cccc7bf70bb8a0cbb86f125a0e

    62d95c8 2019-01-24 Luis Enrique Muñoz Martín - Refs #4438. Modified the configuration of machine endianness. (#31)
2019-01-26 08:46:19 +00:00
Matthias Grob 504372f551 MAVLink: RC_CHANNELS_OVERRIDE generate correct RC channel count (#11219)
* mavlink_receiver: generate rc channel count
* mavlink_receiver: zero out ignored rc channels, add comments
2019-01-25 12:15:01 -05:00
Alessandro Simovic 5bcd7c0a0d Capitalizing/improving warning messages 2019-01-25 11:58:17 -05:00
Alessandro Simovic 0bb5345306 removed unnecessary new-lines 2019-01-25 11:58:17 -05:00
Alessandro Simovic 0c129274af Fixing a few headers 2019-01-25 11:58:17 -05:00
Alessandro Simovic 4ead3b20e5 Fixing some typos 2019-01-25 11:58:17 -05:00
Daniel Agar 38e3da535f boards/ delete unused stm32 nucleo-F767ZI example 2019-01-25 11:25:27 -05:00
Daniel Agar 9ae61b7775 boards/ delete unused stm32f4discovery example 2019-01-25 11:25:27 -05:00
Daniel Agar 1f4c3fedba deprecate samv7 support and atmel same70xplained board 2019-01-25 10:54:53 -05:00
Daniel Agar 71f73adf62 README - remove Coverity badge
Coverity scan has been offline since Monday, January 7, 2019.
2019-01-25 10:14:26 -05:00
David Sidrane b478719079 omnibus_f4sd:Fully remove console 2019-01-25 06:32:37 -08:00
David Sidrane dc73dd7bba px4_init:Nuttx support boards without a console 2019-01-25 06:32:37 -08:00
Daniel Agar c62956ccab av_x-v1 remove mtd driver 2019-01-25 06:32:37 -08:00
David Sidrane 1ef9b5ed81 Updated Nuttx 7.28+ 2019-01-25 06:32:37 -08:00
Daniel Agar d49f6a3aca mavlink increase STACK_MAIN and STACK_MAX
- needed if NuttX networking enabled
2019-01-25 06:32:37 -08:00
David Sidrane a4841a7179 thiemar_s2740vc-v1: Inital commit NuttX 7.27+ 2019-01-25 06:32:37 -08:00
David Sidrane 477bf384d7 stm_nucleo-F767ZI: Inital commit NuttX 7.27+ 2019-01-25 06:32:37 -08:00
David Sidrane 74898569a0 stm_32f4discovery: Inital commit NuttX 7.27+ 2019-01-25 06:32:37 -08:00
David Sidrane 0f5f4814bb px4_fmu-v5: Inital commit NuttX 7.27+ 2019-01-25 06:32:37 -08:00
David Sidrane 7e863456c4 px4_fmu-v4pro: Inital commit NuttX 7.27+ 2019-01-25 06:32:37 -08:00
David Sidrane 938f1453fe px4_fmu-v4: Inital commit NuttX 7.27+ 2019-01-25 06:32:37 -08:00
David Sidrane 9430854404 px4_fmu-v3: Inital commit NuttX 7.27+ 2019-01-25 06:32:37 -08:00
David Sidrane b31f29b983 px4_fmu-v2: Inital commit NuttX 7.27+ 2019-01-25 06:32:37 -08:00
David Sidrane 09d279b1e0 px4_esc-v1: Inital commit NuttX 7.27+ 2019-01-25 06:32:37 -08:00
David Sidrane 3032643a0c omnibus_f4sd: Inital commit NuttX 7.27+ 2019-01-25 06:32:37 -08:00
David Sidrane f943aa5d26 px4_cannode-v1:Inital commit NuttX 7.27+ 2019-01-25 06:32:37 -08:00
David Sidrane 122519c95f nxp_fmuk66-v3: Inital commit NuttX 7.27+ 2019-01-25 06:32:37 -08:00
David Sidrane 6e63985a10 intel_aerofc-v1: Inital commit NuttX 7.27+ 2019-01-25 06:32:37 -08:00
David Sidrane 9294766658 gumstix_aerocore2: Inital commit NuttX 7.27+ 2019-01-25 06:32:37 -08:00
David Sidrane 48f9d3f3d9 bitcraze_crazyflie: Inital commit NuttX 7.27+ 2019-01-25 06:32:37 -08:00
David Sidrane 47e16e75f2 av_x-v1: Inital commit NuttX 7.27+ 2019-01-25 06:32:37 -08:00
David Sidrane 6872c6900e auav_x21: Inital commit NuttX 7.27+ 2019-01-25 06:32:37 -08:00
David Sidrane 34aabed5e5 auav_esc35-v1: Inital commit NuttX 7.27+ 2019-01-25 06:32:37 -08:00
David Sidrane e7f8042e90 atmel_same70xplained: Inital commit NuttX 7.27+ 2019-01-25 06:32:37 -08:00
David Sidrane 55559bc72c airmind_mindpx-v2: Inital commit NuttX 7.27+ 2019-01-25 06:32:37 -08:00
David Sidrane 2d7effa342 px4_io-v2: Inital commit NuttX 7.27+ 2019-01-25 06:32:37 -08:00
David Sidrane cf09a8e933 px4_micro_hal:Upstream nuttx GPIO_OUTPUT_ZER0->GPIO_OUTPUT_ZERO 2019-01-25 06:32:37 -08:00
David Sidrane 3f0c9d5df5 px4_micro_hal:Fix typo 2019-01-25 06:32:37 -08:00
David Sidrane 517add3c8c auav_esc31-v1:Fix build 2019-01-25 06:32:37 -08:00
David Sidrane 869e476af9 uavcanesc:Add cdev 2019-01-25 06:32:37 -08:00
David Sidrane 0cc3bfb10b flashfs:Track upstream nuttx CONFIG_ARCH_HAVE_PROGMEM
Upstream header file is conditional on CONFIG_ARCH_HAVE_PROGMEM
2019-01-25 06:32:37 -08:00
David Sidrane 8f308efa88 upstram NuttX CONFIG_EXAMPLES_NSH_CXXINITIALIZE->CONFIG_SYSTEM_NSH_CXXINITIALIZE 2019-01-25 06:32:37 -08:00
David Sidrane 5c23099eed board_button_irq: API change in upstream 2019-01-25 06:32:37 -08:00
David Sidrane f007c93785 mc_pos_control_main:Use discret init of poll struct
Suport upstream change in nuttx.
2019-01-25 06:32:37 -08:00
David Sidrane 78619514b7 ROMFS/CMakeLists build gencromfs 2019-01-25 06:32:37 -08:00
David Sidrane e7bf0e03d2 px4_nuttx_tasks:Support future removal of env.
CONFIG_DISABLE_ENVIRON can prevent task having to allocate
   memory for the env.
2019-01-25 06:32:37 -08:00
David Sidrane 88d0b163b5 common:board_crashdump must end in reset!
Upstream changes defer the board reset based on the vaule of
   CONFIG_BOARD_RESET_ON_ASSERT
      0 (or not defined) Do not reset on assert
      >= 1 reset if assertion is in an interrupt handler or the idle task
      >= 2 on any asertion.

  up_assert is called from up_hardfault or an asertion failure.
  Part 1 of up_assert will call out to the board_crashdump
  Part 2 on return from board_crashdump will then perform
  the reset.

  board_crashdump needs a chunk of ram to save the complete
  context in. It uses  &_sdata which is the lowest memory and
  it will corrupt that memeory.  We can therfore can not allow
  return to the OS, as it could depend on that area of RAM.

  So all boards need to do a reset at the end of board_crashdump
2019-01-25 06:32:37 -08:00
David Sidrane e358486ef7 aerofc-v1:Scope CRASHDUMP_RESET_ONLY to BOARD_CRASHDUMP_RESET_ONLY 2019-01-25 06:32:37 -08:00
David Sidrane 91d8c31f7b Custom board naming, removed need for tools/nuttx_defconf_tool.sh 2019-01-25 06:32:37 -08:00
David Sidrane 5036a09e22 Add support from cromfs generation 2019-01-25 06:32:37 -08:00
David Sidrane f2208171d5 Add callout for CONFIG_BOARDCTL_FINALINIT 2019-01-25 06:32:37 -08:00
David Sidrane d122a35606 Add STM32 critical section monitor time resources 2019-01-25 06:32:37 -08:00
David Sidrane f00d633196 flashfs:Upstream renamed up_progmem_erasepage to up_progmem_eraseblock 2019-01-25 06:32:37 -08:00
David Sidrane 1f54214224 stm32/drv_io_timer:GTIM_CCER_CC1NP not on all STM32 HW
The F1 series GTIMs to not have GTIM_CCER_CC1NP.
   This bug fix tracks the upstream change that
   made GTIM_CCER_CC1NP conditional on the chip.
2019-01-25 06:32:37 -08:00
David Sidrane 7ba81fac4b Build copies the boards nuttx-config to build at Nuttx level 2019-01-25 06:32:37 -08:00
David Sidrane d294b40fcb Changes to suport Nuttx c++ lib rename 2019-01-25 06:32:37 -08:00
David Sidrane e505fe859d Update Nuttx and NuttX-apps to 7.28+ 2019-01-25 06:32:37 -08:00
Beat Küng 3859bbb3b0 px4io mixer: fix atomic access to system_state.fmu_data_received_time
system_state.fmu_data_received_time can be set from an IRQ handler, thus
we need to ensure every read access to it in mixer_tick is atomic.
So we read it once and copy it into a local variable.
2019-01-25 07:53:37 +01:00
Beat Küng 74a3c378b2 drv_hrt: inline hrt_elapsed_time
GCC did not do that.
2019-01-25 07:53:37 +01:00
Daniel Agar 2ffb49b734 delete px4_includes.h header and update boards/ to use syslog 2019-01-23 18:25:18 -05:00
Daniel Agar 376e078c24 platforms delete PX4_ROS and obsolete headers 2019-01-23 18:25:18 -05:00
Daniel Agar 67e5986c9b delete obsolete examples/subscriber 2019-01-23 18:25:18 -05:00
Daniel Agar 693ee4808a delete obsolete examples/publisher 2019-01-23 18:25:18 -05:00
Matthias Grob be108a33f8 mission_params: remove MIS_YAWMODE reference
This parameter was removed in d704a2d675 and should
not be referenced anymore.
2019-01-23 22:08:32 +01:00
PX4 Build Bot cc68775def Update submodule jMAVSim to latest Wed Jan 23 00:37:45 UTC 2019
- jMAVSim in PX4/Firmware (3a7deefe6e): https://github.com/PX4/jMAVSim/commit/5150bbab6ea3e13907d2ff9eadd2c293d2477d49
    - jMAVSim current upstream: https://github.com/PX4/jMAVSim/commit/00bdf6d92b6a8678f5b683a3ebca9e52e88cb5ce
    - Changes: https://github.com/PX4/jMAVSim/compare/5150bbab6ea3e13907d2ff9eadd2c293d2477d49...00bdf6d92b6a8678f5b683a3ebca9e52e88cb5ce

    00bdf6d 2019-01-21 Beat Küng - jMAVLib: update submodule
2019-01-23 08:23:25 +01:00
Daniel Agar 6feee70570 move SYS_STCK_EN to src/modules/load_mon 2019-01-23 08:23:03 +01:00
Daniel Agar 843443248e move modules/systemlib to lib/systemlib 2019-01-23 08:23:03 +01:00
dvornikov-aa ce0dd41a11 LPS22HB: Fix invalid driver reset (I2C bus) 2019-01-22 20:11:58 -05:00
Lorenz Meier 3a7deefe6e IO firmware: Run critical timing operations as atomic
This is required as we might be in interrupt context on this bare-metal target.
2019-01-22 23:52:57 +01:00
Lorenz Meier 46390a1508 HRT: Drop volatile specifier from function call for non-atomic mode
This allows the compiler to optimize better without loosing any performance / accuracy.
2019-01-22 23:52:57 +01:00
Lorenz Meier 502cd987ee SD Bench: No need for atomic timing
This leads to less jitter in the benchmark
2019-01-22 23:52:57 +01:00
Lorenz Meier bca0f7925c SAMv7: Add atomic and non-atomic HRT calls
This reduces interrupt load significantly.
2019-01-22 23:52:57 +01:00
Lorenz Meier 27cae912d1 Kinetis: Add atomic and non-atomic HRT calls
This reduces interrupt load significantly.
2019-01-22 23:52:57 +01:00
Lorenz Meier c6718a5bca Posix: Add initial stub for atomic HRT
The actual implementation is not atomic, as the value on the application layer would be limited.
2019-01-22 23:52:57 +01:00
Lorenz Meier ec0a9806a8 uORB test: Retain atomic operation 2019-01-22 23:52:57 +01:00
Lorenz Meier 01b7a11255 SD bench: Retain atomic operation.; 2019-01-22 23:52:57 +01:00
Lorenz Meier f21bc89a90 Unit tests: Retain atomic operation
This ensures we get absolutely accurate timing.
2019-01-22 23:52:57 +01:00
Lorenz Meier b7bcec2d8c HRT: Create new separate call for atomic HRT elapsed time calculation
This call rarely needs to be truly atomic and the involved CPU overhead in making it atomic was unnecessary and introduces a lot of IRQ jitter with no value-add. The call has been moved to be non-atomic and the codebase will be inspected and changed in follow-up commits for the few instances where it is truly needed.
2019-01-22 23:52:57 +01:00
Daniel Agar 320d2e9383 create PX4 platform layer initialization helper (#11269)
- starts requirements for PX4 modules (hrt, param, etc)
2019-01-22 14:13:20 -05:00
Daniel Agar 65fe3ce5d3 px4_fmu-v2_default temporarily disable sf0x
- can be reenabled after #11256 is merged
2019-01-22 17:23:16 +01:00
bresch df58e161d1 Trajectory auto - Handle EKF xy reset 2019-01-22 17:23:16 +01:00
bresch a2d5485c7f Trajectory manual - Handle EKF xy reset 2019-01-22 17:23:16 +01:00
Julian Oes e1472818dc mavlink_mission: round lat/lon
This avoids casting errors. An alternative to `std::round` would be to
add 0.5 before casting for positive values and subtract 0.5 before
casting for negative values.
2019-01-22 09:49:24 -05:00
SalimTerryLi d4c87132e4 board raspi (vanilla): simply added two lines to pass the compile 2019-01-22 07:45:48 -05:00
PX4 Build Bot b104b55cec Update submodule matrix to latest Mon Jan 21 20:57:42 UTC 2019
- matrix in PX4/Firmware (31bd46d2ed700b2da9fc314e9b87d9b683a66606): https://github.com/PX4/Matrix/commit/18fba8221cc1840964c43f04d8c2aa21857e1b9b
    - matrix current upstream: https://github.com/PX4/Matrix/commit/6b0777d815cd64902eb0575d56ec52f53aebb4a0
    - Changes: https://github.com/PX4/Matrix/compare/18fba8221cc1840964c43f04d8c2aa21857e1b9b...6b0777d815cd64902eb0575d56ec52f53aebb4a0

    6b0777d 2019-01-21 Daniel Agar - stdlib_imports cinttypes currently unavailable in NuttX toolchain (#79)
2019-01-21 16:58:36 -05:00
Daniel Agar ce5fbc7751 mavlink simple analyzer remove <limits> usage
- <limits> isn't available in the NuttX c++ standard library
2019-01-21 09:27:10 -05:00
Daniel Agar 572d1cefe8 test_mixer remove <limits> usage
- <limits> isn't available in the NuttX c++ standard library
2019-01-21 09:27:10 -05:00
Daniel Agar 755eb6a2e9 Update submodule mavlink v2.0 to latest Mon Jan 21 00:38:11 UTC 2019
- mavlink v2.0 in PX4/Firmware (ee517afb7c8b34e88daf656834a3315be72a4f40): https://github.com/mavlink/c_library_v2/commit/339abb5f4c20865ea67dd417b099e3f54683a2ad
    - mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/e302e1b735e47e9d33c3bad579dd7c6c089c1bb3
    - Changes: https://github.com/mavlink/c_library_v2/compare/339abb5f4c20865ea67dd417b099e3f54683a2ad...e302e1b735e47e9d33c3bad579dd7c6c089c1bb3
2019-01-20 20:15:12 -05:00
Lorenz Meier b719033d02 MK BL CTRL: Fix startup routine to be compliant with signature. 2019-01-20 10:29:13 -05:00
Daniel Agar 652c9dfc49 containers/Array.hpp cleanup and remove data initialization 2019-01-20 12:03:53 +01:00
Daniel Agar 7008558fac drivers/distance_sensor replace std::vector usage with px4::Array 2019-01-20 12:03:53 +01:00
Daniel Agar edeb59a8c3 move logger array.h -> containers/Array.hpp 2019-01-20 12:03:53 +01:00
Daniel Agar 939413fa06 Probot attempt to fix configuration (#11243) 2019-01-19 14:13:58 -05:00
Daniel Agar 1ec08ec6bd Jenkins more aggressively discard large builds 2019-01-19 12:37:05 -05:00
Daniel Agar 95eff33263 GPS increase task stack 1530 -> 1600 bytes 2019-01-18 12:07:28 -05:00
Dave Royer f537c98ca2 ulanding radar: update driver for new 2nd gen hardware (#11035) 2019-01-18 12:06:34 -05:00
Daniel Agar 658d734068 param add status 2019-01-18 11:50:37 -05:00
Daniel Agar 84724d5e1d param show default only active parameters
- add -a option to display all possible system parameters
2019-01-18 11:50:37 -05:00
Daniel Agar 1ded189f58 ROMFS rcS execute (optional) rc.board_defaults after AUTOCNF set 2019-01-18 11:23:01 -05:00
Daniel Agar 52c848a556 mpu6000 split into separate main, header, implementation 2019-01-18 10:39:15 -05:00
Daniel Agar d299d439c6 mpu6000 use new PX4Accelerometer and PX4Gyroscope classes 2019-01-18 10:39:15 -05:00
Daniel Agar 91dcfb7ab2 PX4 sensor driver helpers 2019-01-18 10:39:15 -05:00
bresch a2e9d9ffce AutoSmoothVel - Handle NAN in velocity and position properly 2019-01-17 17:55:37 +01:00
Beat Küng ef54bff4ed vmount: avoid reading uninitialized value
matrix::Quatf() calls sinf(), which caused a valgrind warning
2019-01-17 09:39:30 +01:00
Beat Küng 85e59c210d mc_pos_control: fix uninitialized member _old_landing_gear_position 2019-01-17 09:39:30 +01:00
Matthias Grob 7b9cfac767 mc_pos_control: change use avoidance to handle data loss during mission
There were accidents because when missions lead through an obstacle
and it should be avoided but the setpoints from the external obstacle
avoidance module are suddenly missing the mission is continued into the
obstacle which results in a crash.
2019-01-16 19:13:05 +01:00
Matthias Grob a563092742 mc_pos_control: add Loiter/Hold mode to possible failsafe commands 2019-01-16 19:13:05 +01:00
Matthias Grob b018a6088d mc_pos_control: refactor OA setpoints out of PositionControl calls 2019-01-16 19:13:05 +01:00
Daniel Agar c319ea7189 boards sync fmu-v2 sensors start with fmu-v3 2019-01-15 23:52:46 -08:00
Daniel Agar fef65bf5c8 ROMFS split rc.board into defaults, sensors, and extras 2019-01-15 23:52:46 -08:00
Beat Küng d8ab059ff3 cm8jl65: add comment which CRC is used 2019-01-15 09:19:52 +01:00
Claudio Micheli 8a313ffc26 Applied code-review suggestions.
- Removed blocking serial.
- Added passing variables by reference to parser.
- Removed commented code.

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli d1da46ef46 Added generic UART configuration.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli ca0cd27c6b Formatted code.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli 7124cbf3af Fixed CI broken build. Made TELEM2 default port.
Device port can be set via SENS_EN_CM8JL65 parameter:
SENS_EN_CM8JL65 = 0 -> Disabled
SENS_EN_CM8JL65 = 1 -> Enabled on TELEM2
SENS_EN_CM8JL65 = 2 -> Enabled on TELEM1

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli e4381bfc87 Added sensor enable/disable parameter (SENS_EN_CM8JL65).
Disabled by default.

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli 46c5a79b57 Renamed files according to distance sensor hardware.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli aee6a83fe0 Code Cleanup. Added configuration notes.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli c5fece6568 Redefined reading strategy from serial to get the latest available data.
First "stable" version of the driver.

TODO: - Cleanup the code
      - Bench test (compare data with IMU)
      - Flight Test

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli 39ed84b5cd Debugging printf.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli 5d70ac7fd9 Removed dismissed folder.
TODO : Adjust work_queue rescheduling (to always have a 10Hz cycle)

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli b0ac8fe963 Removed blocking "while" cycle to access serial port.
Serial is now cycled with work_queue rescheduling if some bytes are missing.

TODO: - Fix occasional sensor spikes (can be identified with crc)
      - Clean up the code
      - disable debug printf


Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli 93b3cf241b Renamed driver folder.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli dd300dca0a Solved frequency rate issue. Now driver publish at ~10Hz.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli 4b7be38e67 Added uORB publishing.
TODO: Need to fix driver cycling.

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli 700fd5652d Added parsing function. Everything works OK.
TODO:
- Clean up the code
- Add uORB publishing messages

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli 591e8fde5d Initial commit. Integrated new distance sensor hardware.
TODO: Parsing the data

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Daniel Agar 63097bd8a1 mavlink sort message defaults and float literal consistency 2019-01-14 14:46:13 -05:00
Matthias Grob 1e14b10dee simulator_mavlink: take care of battery percentage rounding errors
In 5bb9babc20 I made MAVLink send a
rounded up integer instead of rounded down. This makes sense in practice
because the low battery reactions happen exactly when the reported number
switches in the UI. But here we want to provoke an exact 50% in the UI so
we stop counting at 49.9%, it get's rounded up and we see the expected
result.
2019-01-14 19:30:36 +01:00
Matthias Grob a89e550f3c simulator_mavlink: switch battery max and min to fix simultion
In 3e6e1f5c2b the simulated battery
percentage was reversed. I'm assuming because of the possibly
missleading variable name. Now I'm fixing it by switching the
maximum and minimum voltage such that the name is not misleading anymore
but it still works as expected.
2019-01-14 19:30:36 +01:00
bresch 766f911005 beta75 - Reduce MC_YAWRATE_P to avoid oscillations when battery is fully charged 2019-01-14 18:38:31 +01:00
bresch 118848d261 beta75 - Adjust PWM_MIN and set number of cells 2019-01-14 18:38:31 +01:00
Jacob Dahl 29f034c53e mpu9250 fix hardfaults if attempting to start an already running driver (#11190)
* removed bus options that were essentially duplicates, causing hardfaults if attempting to start an already running driver. Changed NULL to nullptr. Removed bus options that were unused
* removed condition from if statement that was unnecessary
* fixed style
2019-01-14 09:59:36 -05:00
Beat Küng 4bc59092f4 lockstep_scheduler cmake: spaces -> tabs 2019-01-14 11:08:48 +01:00
Beat Küng 2a47715385 refactor lockstep_scheduler: fix class member naming convention 2019-01-14 11:08:48 +01:00
Beat Küng 828e31d3a9 lockstep_scheduler: optimize performance
- use a linked-list instead of std::vector. Insertion and removal are now
  O(1)
- avoid malloc and use a thread_local instance of TimedWait.
  It gets destroyed when the thread exits, so we have to add protection
  in case a thread exits too quickly. This in turn requires a fix to the
  unit-tests.
2019-01-14 11:08:48 +01:00
Beat Küng b6ba7b655a sitl_run.sh: fix for debugger & valgrind invocation: use eval
Because $sitl_command contains quotes
2019-01-14 11:08:48 +01:00
Beat Küng beac53d775 cdev_platform: remove unused code (sim_delay) 2019-01-14 11:08:48 +01:00
Beat Küng ecbe2a3e0b drv_hrt posix: improve performance for hrt_absolute_time()
Previously hrt_absolute_time() was at around 5% of the total CPU usage, now
it's around 0.35%.
2019-01-14 11:08:48 +01:00
Beat Küng ccefc640ac drv_hrt posix: remove unused code and remove locking from hrt_absolute_time 2019-01-14 11:08:48 +01:00
Beat Küng 5f0e6d70c5 lockstep_scheduler: use a static lock in usleep_until
less function calls
2019-01-14 11:08:48 +01:00
Beat Küng e8cbc49f7a lockstep_scheduler: remove timed_waits_iterator_invalidated_
Not required, since the lock is held during the whole loop iteration.
2019-01-14 11:08:48 +01:00
Beat Küng 8cdb65eed9 lockstep_scheduler: simplify LockstepScheduler::cond_timedwait & reduce locking
- the loop is not needed
- we optimize for the fast case and lock only if really needed
2019-01-14 11:08:48 +01:00
Beat Küng 318499f56e lockstep_scheduler: inline get_absolute_time()
This is a small method that is used a lot.
2019-01-14 11:08:48 +01:00
Daniel Agar 29a0950753 Update submodule mavlink v2.0 to latest Sat Jan 12 07:37:26 EST 2019
- mavlink v2.0 in PX4/Firmware (4787cabae6fcf55ef0f8bf19b0009de593c844db): https://github.com/mavlink/c_library_v2/commit/90d9b285e01fe8bfa3b4e8868ca71c5537d43302
    - mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/339abb5f4c20865ea67dd417b099e3f54683a2ad
    - Changes: https://github.com/mavlink/c_library_v2/compare/90d9b285e01fe8bfa3b4e8868ca71c5537d43302...339abb5f4c20865ea67dd417b099e3f54683a2ad
2019-01-12 10:20:02 -05:00
Daniel Agar 45d7165eb3 fw_pos_control_l1 skip wind > max airspeed logic if airspeed invalid
- cleanup airspeed validity check logic
2019-01-12 14:19:53 +01:00
Julian Oes 2e3fa30c83 sitl_gazebo: update to revision that doesn't abort on timeout (#11196)
* this should fix the CI failures where we intermittently saw SIGABRT. (fixes #11144)
2019-01-11 10:23:16 -05:00
Jacob Dahl f6175605cd px4_fmu-v4 init: Do not start mavlink stream on ttyS0 for the TealOne airframe
* We have RAM problems and can't afford 4 mavlink instances. This only adds logic the rc.board for the fmu-v4 that only has an effect for SYS_AUTOSTART = 4250 (TealOne airframe).
2019-01-11 10:21:51 -05:00
Daniel Agar 92ca26b111 mpu9250 fix code style 2019-01-09 10:27:19 -05:00
Florian Olbrich fb386580b8 Fixed failure notices on mpu9250 startup by adding back device probing on I2C interface init. 2019-01-09 09:54:45 -05:00
Florian Olbrich 280a60c86f Fixed unreliable ICM20948 detection.
Fixed ICM20948 magnetometer only option.
Specified bus for internal mpu9250 on Pixhawk 2.1 to avoid premature detection of
other device.
2019-01-09 09:54:45 -05:00
Beat Küng c2f82b5996 logger: disable mission log by default (SDLOG_MISSION=0)
- I enabled it by default mostly for testing purposes
- Disabling it reduces resource usage as most setups don't need it
2019-01-09 08:59:29 -05:00
Kevin Lopez Alvarez 490eeeb9d9 RM3100: enable I2C (#11038) 2019-01-09 08:57:19 -05:00
Jake Dahl 1699c577c3 Fixed an issue with a local variable that should have been a member variable. Increased the P term to reduce rise time. Removed feedforward as it was not neccessary. Removed some custom commands that didn't serve much of a purpose. 2019-01-08 22:36:09 +01:00
AnnaDaiZH 3b3752b753 pmw3901 increase publish rate and max_ground_distance (#11066)
* increase pmw3901 publish rate and max_ground_distance
* set work queue to high priority
2019-01-08 14:25:39 -05:00
David Sidrane 5e53f73ad8 fmu-v5:Add Alias CUAV V5 REV:5, VER:1 2019-01-08 07:34:22 -08:00
Daniel Agar ea3a694ffe Update submodule mavlink v2.0 to latest Tue Jan 8 12:41:26 UTC 2019
- mavlink v2.0 in PX4/Firmware (613a5f5e172de071ebd96b4cb5313316a10f8023): https://github.com/mavlink/c_library_v2/commit/175ab6725cc0d96827d04ffeeaf3a7797a9abdbf
    - mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/90d9b285e01fe8bfa3b4e8868ca71c5537d43302
    - Changes: https://github.com/mavlink/c_library_v2/compare/175ab6725cc0d96827d04ffeeaf3a7797a9abdbf...90d9b285e01fe8bfa3b4e8868ca71c5537d43302
2019-01-08 10:16:51 -05:00
Julian Oes b0dd55e80b jMAVSim: update submodule
This should fix:
- HITL regression (Init MAVLink forever).
- Starting using default arguments.
2019-01-08 09:49:47 -05:00
Dennis Mannhart 5887a2393c PositionControl: skip controller only if adjusted thrust setpoint are not finite
PositionControl: update comment about the order of thrust and position

mc_pos_control: reset setpoints to NAN if required

MulticopterLandDetector: consider to be landed if vehicle is not armed

mc_pos_control: initialize landing struct with landed

mc-pos-ctrl: adjust thrust-setpoint and yaw during ground-contact/maybe-landed without capturing
that information within vehicle-local-position-setpoint topic because that information
does not belong to user intention

PositionControl: set local position/velocity setpoint to NAN if not used in the control pipeline

mc-pos-ctrl: Fill vehicle_local_position_setpoint_s structure as follow:
The message contains setpoints where each type of setpoint is either the input to the PositionController
or was generated by the PositionController and therefore corresponds to the PositioControl internal states (states that were generated by P-PID).
Example:
If the desired setpoint is position-setpoint, _local_pos_sp will contain
position-, velocity- and thrust-setpoint where the velocity- and thrust-setpoint were generated by the PositionControlller.
If the desired setpoint has a velocity-setpoint only, then _local_pos_sp will contain valid velocity- and thrust-setpoint, but the position-setpoint
will remain NAN. Given that the PositionController cannot generate a position-setpoint, this type of setpoint is always equal to the input to the
PositionController.

mc_pos_control: switch to designated initializer for landed

It's less error prone because it produces an error on every discrepancy.
2019-01-08 15:36:30 +01:00
Hamish Willee 541b962654 CameraTrigger: Feedback fixes 2019-01-08 08:18:24 +01:00
Hamish Willee 68148c5fb4 Add camera trigger pwm params
Fix math::constrain usage

Fix second constraint
2019-01-08 08:18:24 +01:00
Daniel Agar e77c2cdfab Jenkins hardware test compare-sections properly 2019-01-07 15:12:30 -05:00
Daniel Agar 2a56eca910 Jenkins use px4_sitl_test build to run unit tests
- these only run if code coverage is enabled
2019-01-07 10:39:40 -05:00
TSC21 a78c9c4370 uorb_rtps_message_ids: for now, remove vehicle_global_position send 2019-01-07 12:46:36 +01:00
Beat Küng eda45b4df2 sbus: add time-based hardening (only for IO and NuttX)
Since SBUS does not have CRC, we can use timing information to improve
parsing reliability and reject unexpected bytes.
2019-01-07 10:17:37 +01:00
Beat Küng 4cd8fe0a30 sbus: simplify logic 2019-01-07 10:17:37 +01:00
Beat Küng 9ebd052ac7 sbus: remove unused variables & improve some comments 2019-01-07 10:17:37 +01:00
Daniel Agar 2251150875 uavcan include cstdint for fixed width integer types 2019-01-06 19:20:57 -05:00
Daniel Agar 60f2a92e3d replace <cfloat> with <float.h>
- <cfloat> isn't available in the NuttX c++ library
2019-01-06 19:20:57 -05:00
Daniel Agar c0b464e9e2 replace <cinttypes> with <inttypes.h>
- <cinttypes> isn't available in the NuttX c++ library
2019-01-06 19:20:57 -05:00
Daniel Agar 195dbf4ab6 NuttX platform remove system (toolchain) stdc++ include path 2019-01-06 19:20:57 -05:00
Daniel Agar 542cd7f216 Jenkins move hardware testing to JLink debugger setup 2019-01-05 20:33:38 -05:00
Nuno Marques 8ae3f50095 CI: update container tags to '2019-01-01' (#11128) 2019-01-04 16:34:02 -05:00
Alessandro Simovic aa74aa2b80 CollisionPrevention: curly brace inits 2019-01-04 15:39:40 +01:00
Alessandro Simovic e1dcc46578 CollisionPrevention: consistent var init 2019-01-04 15:39:40 +01:00
Alessandro Simovic ae6ae47bed CollisionPrevention: unused var 2019-01-04 15:39:40 +01:00
karliss 6a33b797ac drv_hrt restore dsp_offset and remove unused qurt code (#11139)
- Fixes #11134
2019-01-03 14:58:53 -05:00
Daniel Agar caf26c78e3 rgbled_ncp5623c set main stack 1500 2019-01-03 10:32:49 -05:00
Jacob Dahl a492d1cfdb MPU9250 driver fix to preserve bus+device plug-and-play capabilities (#11020) 2019-01-03 08:10:23 -05:00
TSC21 3c246ce170 microRTPS: improve verbosity with the usage of px4_log types 2019-01-02 00:14:18 +00:00
TSC21 adbec90018 microRTPS: replace usleep() by px4_usleep() 2019-01-02 00:14:18 +00:00
TSC21 37e71a4d9d sitl: rtps.cmake: add tone_alarm_sim and ENABLE_LOCKSTEP_SCHEDULER 2019-01-02 00:14:18 +00:00
Daniel Agar 8c88aa6416 mavlink move simple getters to header and mark const 2019-01-01 22:21:02 +00:00
Daniel Agar f60bfd0020 mavlink add tx loop interval perf counter 2019-01-01 22:21:02 +00:00
Daniel Agar 55e3f80bab mavlink handle MAV_ODOM_LP parameter in main
- fixes #11125
2019-01-01 22:21:02 +00:00
Julian Oes 032e64aaf2 px4_sem: set errno, return -1 on any error
- Don't duplicate the ret variable to err.
- Return -1 on any error, 0 otherwise.
- Set errno to return value of pthread_cond_timedwait.
2019-01-01 20:35:42 +01:00
Julian Oes 23653f9f39 lockstep_scheduler: fix return value, remove errno
The API of cond_timedwait was wrong. It used return -1 and set errno
instead of returning the error as specified for pthread_cond_timedwait
which it tries to mock.
2019-01-01 20:35:42 +01:00
Lorenz Meier 0d0a556847 Fix usage of errno in POSIX semaphore error handling
Previous commit 98ae0186e9 changed the err variable to errno, which is not the return value we are looking for.
2019-01-01 20:35:42 +01:00
Daniel Agar 5b2661e0f8 Jenkins archive SITL package 2019-01-01 17:57:24 +01:00
Daniel Agar 1b8c2c82d5 px4flow start in rc.sensors instead of per board (#11123)
- fixes #11009
2019-01-01 11:39:40 -05:00
TSC21 065f97e87b add more relevant messages to the RTPS stream 2019-01-01 11:21:36 +00:00
Julian Oes 29bfdb0c88 platforms: fix linking for qurt (#11115) 2018-12-29 16:21:52 -05:00
Matthias Grob 36248cb12e PWMSim: publish disarmed value when not armed 2018-12-29 00:18:05 +01:00
Matthias Grob 05e45c2867 PWMSim: refactor only use one output number variable 2018-12-29 00:18:05 +01:00
Matthias Grob 986e6c96b5 PWMSim: refactor unused output loop 2018-12-29 00:18:05 +01:00
Matthias Grob c22dbe130b PWMSim: refactor to use math constrain 2018-12-29 00:18:05 +01:00
bazooka joe 1560364c04 fix home position timestamp to be the timestamp that the home was set and not when the message was sent 2018-12-27 11:04:24 -05:00
bazooka joe f6cf95cee0 mavlink: fix uninitialized messages fields
zeroed uninitialized fields on home_position, mavlink_rc_channels_override, mavlink_mission_item, mavlink_mission_item_int
2018-12-27 11:04:24 -05:00
Daniel Agar 3cd3856d32 commander set home position timestamp properly 2018-12-27 10:52:01 -05:00
Julian 3e87013936 simulator: fix TCP on Cygwin-Windows
It turns out that `sendto` does not work for TCP on Cygwin-Windows,
instead we need to use `send`. This required some refactoring since we
need to have the internet protocol and the port stored as a member
variable.

This should fix that lockstep SITL simulation was not working on
Windows.
2018-12-27 07:49:12 +01:00
PX4 Build Bot 2a7fe22a04 Update submodule sitl_gazebo to latest Wed Dec 26 12:37:45 UTC 2018
- sitl_gazebo in PX4/Firmware (1f9b833342): https://github.com/PX4/sitl_gazebo/commit/c90e8ad2b27b95dc0b4c45b346509477c5fa593d
    - sitl_gazebo current upstream: https://github.com/PX4/sitl_gazebo/commit/e945745021a74ae45695a624dfc114a5c7bbd6bc
    - Changes: https://github.com/PX4/sitl_gazebo/compare/c90e8ad2b27b95dc0b4c45b346509477c5fa593d...e945745021a74ae45695a624dfc114a5c7bbd6bc

    e945745 2018-12-26 Julian Oes - worlds: fix rate for tailsitter and plane
46a3d27 2018-12-14 Jörg Schmidt - Fix bug in groundtruth altitude calculation
2018-12-26 11:06:26 -05:00
Daniel Agar f50963c2eb travis-ci (coverity scan) update to xenial 2018-12-26 11:04:36 -05:00
Daniel Agar 1f9b833342 ROMFS 4041 change nsh shebang to /bin/sh 2018-12-24 19:27:04 +00:00
PX4 Build Bot 03c0760e4b Update submodule micro-CDR to latest Sun Dec 23 21:17:02 UTC 2018
- micro-CDR in PX4/Firmware (b043cfac5e8635d9017ad6a13f45795ad6fda6fb): https://github.com/eProsima/micro-CDR/commit/8b3546e8848e4c07c16ec55730d3ad1aa94396ab
    - micro-CDR current upstream: https://github.com/eProsima/micro-CDR/commit/7a76880f90dfe702f4fa1723e22d1dcb491d7b9e
    - Changes: https://github.com/eProsima/micro-CDR/compare/8b3546e8848e4c07c16ec55730d3ad1aa94396ab...7a76880f90dfe702f4fa1723e22d1dcb491d7b9e

    7a76880 2018-12-11 Julián Bermúdez Ortega - Badges (#24)
2018-12-23 21:25:09 +00:00
PX4 Build Bot 0636aff5d5 Update submodule nuttx to latest Sun Dec 23 21:16:39 UTC 2018
- nuttx in PX4/Firmware (faf082fa1876b3f96ff9c07fc91ab8211d274c60): https://github.com/PX4/NuttX/commit/c225d4a691ef4572839b19635a84f2d9bf07ea74
    - nuttx current upstream: https://github.com/PX4/NuttX/commit/c225d4a691ef4572839b19635a84f2d9bf07ea74
    - Changes: https://github.com/PX4/NuttX/compare/c225d4a691ef4572839b19635a84f2d9bf07ea74...c225d4a691ef4572839b19635a84f2d9bf07ea74
2018-12-23 16:20:30 -05:00
Beat Küng 2790cace4f beta75X aiframe: exclude on most boards (only used on Omnibus) 2018-12-23 15:49:37 -05:00
Beat Küng 9f642c7ea7 airframes: add a config for the BetaFPV Beta75X 2S Brushless Whoop 2018-12-23 15:49:37 -05:00
Beat Küng 169722c46f omnibus rc.board: add transition support to load params from file to FLASH 2018-12-23 15:49:37 -05:00
Beat Küng 5b4a77a67b params: add possibility to access files if flash-based params are enabled
- the flash-backend is selected by specifying nullptr as file or -1 as fd
- the default file is nullptr, and thus the FLASH
- 'param select' has no effect, FLASH is always the default

Thus there should be no functional change to existing setups.
2018-12-23 15:49:37 -05:00
Beat Küng 2698625be9 omnibus: switch to flash-based params
Not all boards have an SD card.

This is a *breaking* change and requires a bootloader change.
2018-12-23 15:49:37 -05:00
Matthias Grob 95b472277c TBS Caipirinha: Prevent ESC beeping all the time
Setting PWM_DISARMED to 0 results in no PWM output to the ESC for the pusher motor.
Most ESCs start beeping endless in short intervals if they don't get a signal.
I remove changing this parameter which is 900 by default to always command the motor to stand still.
2018-12-23 12:21:30 +01:00
David Sidrane d676325ea5 Update Nuttx with env out of memory fix 2018-12-22 19:09:49 +01:00
Julian Oes 73ed9deac5 mixer: add missing include 2018-12-22 10:32:18 +01:00
Julian Oes ea87bcb5a2 DriverFramework: update submodule
Now that the lockstep changes are merged to master.
2018-12-22 10:32:18 +01:00
Julian Oes dd54b3a511 jMAVSim: update submodule
Now that this is merged to master in jMAVSim.
2018-12-22 10:32:18 +01:00
Julian Oes 8486b2b917 tests: properly disable shutdown test for Cygwin 2018-12-22 10:32:18 +01:00
Julian Oes 736599f362 sitl_gazebo: updated submodule
This is just because the branch got merged.
2018-12-22 10:32:18 +01:00
Julian 0601214806 tests: disable shutdown and hysteresis for Cygwin
It seems that the hysteresis test fails every now and then, presumably
due to timing issues. The tests needs some improvements, e.g. isolating
it from the system time.
2018-12-22 10:32:18 +01:00
Julian Oes a1fc44d1f0 simulator: fix noise in airspeed
It turns out the noise of the airspeed depends on the least significant
bit of time which is now always 0 because time is quite regular with
lockstep. Therefore, we need a better source for the randomness. I chose
to use the sign of the y-gyro and it seems to work.
2018-12-22 10:32:18 +01:00
Julian Oes 2d7299043d sitl_gazebo: update submodule
This should fix a race because the use of future/promise wasn't done in
a thread-safe way.
2018-12-22 10:32:18 +01:00
Julian Oes 6435db37c6 sitl_gazebo: update submodule
An include was missing.
2018-12-22 10:32:18 +01:00
Julian Oes 9916fb9b07 Jenkins: fix path to test results 2018-12-22 10:32:18 +01:00
Julian Oes 73c22bd60e sitl_gazebo: updated submodule
This fixes a HITL bug and uses promise/future instead of sleeping.
2018-12-22 10:32:18 +01:00
Julian Oes 2e78b6f2d4 Jenkins: use test board for unit test only 2018-12-22 10:32:18 +01:00
Julian Oes 3e452e2e72 boards: tone_alarm_sim was missing for test board 2018-12-22 10:32:18 +01:00
Julian Oes 6b37102b8e Jenkins: use test board for unit and coverage test 2018-12-22 10:32:18 +01:00
Julian Oes 8faf28918c sitl_gazebo: update submodule
This brings build fixes for Gazebo 7.
2018-12-22 10:32:18 +01:00
Julian Oes ffb73f6496 platforms: fix redefinition for QURT 2018-12-22 10:32:18 +01:00
Julian Oes aac7b8d7eb platforms: fix NuttX build 2018-12-22 10:32:18 +01:00
Julian Oes 14e5ebbbbc platforms: fix clock build for macOS (yet again) 2018-12-22 10:32:18 +01:00
Julian Oes 06c5037025 platforms: use CLOCK_MONOTONIC
For the non-lockstep case we want to use CLOCK_MONOTONIC if possible.
2018-12-22 10:32:18 +01:00
Julian Oes d94748c831 Makefile: use px4_sitl_test board for make tests
This means that we can use the normal host scheduling (not lockstep) for
the unit tests.

In the future we might add unit tests using lockstep as well.
2018-12-22 10:32:18 +01:00
Julian Oes 547dd8511b platforms: use define for lockstep scheduler
Instead of using the define __PX4_POSIX_SITL it makes more sense to have
a define just to determine if the lockstep scheduler should be used.
2018-12-22 10:32:18 +01:00
Julian Oes 73578a593f simulator: bring -t argument back
The -t argument had been deleted because I didn't realize that it was
actually being used. Therefore, this brings it back and we now use -c
for TCP.
2018-12-22 10:32:18 +01:00
Julian Oes f03e938953 sitl_gazebo: updated submodule
This fixes all world files at 250 Hz simulation rate.
2018-12-22 10:32:18 +01:00
Julian Oes d0251581d3 samv7: fix include 2018-12-22 10:32:18 +01:00
Julian Oes a7c2adc877 sitl_gazebo: update submodule
This brings support for TCP and lockstep.
2018-12-22 10:32:18 +01:00
Julian Oes 1b685de70d simulator: raise timeout
This is not suposed to ever trigger anyway.
2018-12-22 10:32:18 +01:00
Julian Oes 8b2c47523f simulator: set socket options after opening socket 2018-12-22 10:32:18 +01:00
Julian Oes e4af97b11b simulator: fix printf format 2018-12-22 10:32:18 +01:00
Julian Oes 564cae86b5 simulator: remove doubled tcgetattr call 2018-12-22 10:32:18 +01:00
Julian Oes 8a5e0558e4 simulator: improve a couple of error messages 2018-12-22 10:32:18 +01:00
Julian Oes 1165739a56 sensors: check other gyros on timeout
@bkueng reviewed this and found that it is dangerous to continue on
timeout because we don't update other gyro sensors in the timeout case.
2018-12-22 10:32:18 +01:00
Julian Oes 8e4296d000 parameters: remove unneeded usleep
According to @bkueng this was to schedule other processes but can now be
removed.
2018-12-22 10:32:18 +01:00
Julian Oes 5280a4aba1 platforms: prevent wrap-arounds in px4_sleep
@bkueng found that the old implementation was likely to wrap-around
given seconds is only a uint32_t. We now cast it directly to uint64_t
and therefore should fix this problem.
2018-12-22 10:32:18 +01:00
Julian Oes 4efe4b0d15 platforms: reorg after rebase on new board config
The new board config changed everything, so I needed to move the
lockstep_scheduler repo.
2018-12-22 10:32:18 +01:00
Julian Oes b4382d4a71 DriverFramework: updated submodule 2018-12-22 10:32:18 +01:00
Julian Oes 185ddb2ab6 lockstep_scheduler: format to PX4 style
Consistency over taste :(.
2018-12-22 10:32:18 +01:00
Julian Oes fb9f72d029 lockstep_scheduler: modernize warnings 2018-12-22 10:32:18 +01:00
Julian Oes 6d273f3bd8 px4_layer: modernize warnings 2018-12-22 10:32:18 +01:00
Julian Oes 85486e0469 platforms: let's try clockid_t as int
Who knows what this really is.
2018-12-22 10:32:18 +01:00
Julian Oes f3aad419ac DriverFramework: update submodule
Hopefully, we can fix the defines for macOS.
2018-12-22 10:32:18 +01:00
Julian Oes c24f6ef943 platforms: lockstep_scheduler ain't no submodule 2018-12-22 10:32:18 +01:00
Julian Oes 7b43e96896 platforms: copied files from lockstep-scheduler
The files are copied from:
https://github.com/julianoes/lockstep-scheduler/
2018-12-22 10:32:18 +01:00
Julian Oes 3cbb2d8661 platforms: removed lockstep_scheduler submodule 2018-12-22 10:32:18 +01:00
Julian Oes 357870377a platforms: try to get submodule checked out 2018-12-22 10:32:18 +01:00
Julian Oes f36f85010c simulator: fix casting warning on Windows 2018-12-22 10:32:18 +01:00
Julian Oes 393a665424 DriverFramework: update submodule
Fixes the unit test on macOS.
2018-12-22 10:32:18 +01:00
Julian Oes e046a6255f DriverFramework: update submodule
This brings a couple more build fixes.
2018-12-22 10:32:18 +01:00
Julian Oes e41518a08b platforms: clean up various build/linking issues
This makes sure lockstep is only built for SITL builds and fixes the
existing builds.
2018-12-22 10:32:18 +01:00
Julian Oes 23264fe579 kinetis: add missing include 2018-12-22 10:32:18 +01:00
Julian Oes 9724a84801 gitmodules: use https link for lockstep-scheduler 2018-12-22 10:32:18 +01:00
Julian Oes 8cbe26c6f6 platforms: fix linking issues for NuttX build 2018-12-22 10:32:18 +01:00
Julian Oes a193e4117c drv_hrt: update signature of ts_to_abstime 2018-12-22 10:32:18 +01:00
Julian Oes d75389b2e4 platforms: consolidate latency_buckets
These symbols were duplicated all over the place.
2018-12-22 10:32:18 +01:00
Julian Oes b13600ed1a platforms: remove TODO
It turns out Mac OS X v10.11.6 (El Capitan) is still covered by security
updates at this time, so not end-of-lifed, so we might as well keep
these legacy things.
2018-12-22 10:32:18 +01:00
Julian Oes 22b584b3b4 simulator: fix TCP connection init on macOS
When `connect()` fails, the state of the socket is unspecified and we
need to close the it and create it again.

It turns out retrying connect worked on Linux but it didn't on macOS.
2018-12-22 10:32:18 +01:00
Julian Oes b2f1a59164 DriverFramework: update submodule
This fixes the build on macOS.
2018-12-22 10:32:18 +01:00
Julian Oes 6ed6941aba DriverFramework: update submodule
This fixes the SITL speedup for macOS.
2018-12-22 10:32:18 +01:00
Julian Oes 546f89aee7 lockstep_scheduler: update submodule 2018-12-22 10:32:18 +01:00
Julian Oes 876d4ebd76 posix: remove appalling errno hack 2018-12-22 10:32:18 +01:00
Julian Oes 66e7b4d578 posix: remove random lies 2018-12-22 10:32:18 +01:00
Julian Oes 11b7411bf8 platforms: cleaned up defines 2018-12-22 10:32:18 +01:00
Julian Oes 23acb77e2d Tools: add PX4_SIM_SPEED_FACTOR as env variable
This adds the env variable PX4_SIM_SPEED_FACTOR to set the speed factor
to run SITL at.
2018-12-22 10:32:18 +01:00
Julian Oes 107606e757 simulator: set device_ids when publishing directly
Without setting the device_id, the preflight checks fail because the
calibration is not found.
2018-12-22 10:32:18 +01:00
Julian Oes 843033d530 platforms: remove unused function 2018-12-22 10:32:18 +01:00
Julian Oes b436f3dd56 ROMFS/Tools: switch to TCP connection for SITL
This switches from UDP to TCP to connect to jMAVSim.
2018-12-22 10:32:18 +01:00
Julian Oes 6d7fb232dd simulator: added TCP, general cleanup, lockstep
This adds the option to connect over UDP or TCP for mavlink to the
SITL simulator.

Also, this includes a bunch of general cleanup and refactoring of the
simulator interface code. For instance sending of mavlink messages was
put into separate functions and unneccessary comments were removed.

Also, this now sets the timestamp sent by the SITL simulator in the
HIL_SENSOR message in order to enable lockstep.
2018-12-22 10:32:18 +01:00
Julian Oes cf39fdd37b simulator: use usual type of timestamp 2018-12-22 10:32:18 +01:00
Julian Oes 9b7857315c sensors: handle timeout 2018-12-22 10:32:18 +01:00
Julian Oes 22bd06e5d5 mc_pos_control: don't do orb_check on polled topic
When we poll on vehicle_local_position we shouldn't do yet another
orb_check but copy it first up.
2018-12-22 10:32:18 +01:00
Julian Oes 0e04d3e9a9 commander: remove lying comment 2018-12-22 10:32:18 +01:00
Julian Oes e36e0b6ad0 posix: print warning before backtrace 2018-12-22 10:32:18 +01:00
Julian Oes 4ef0d74ea3 platforms: remove old lockstep functionality
These functions won't be used any longer with the new implementation.
2018-12-22 10:32:18 +01:00
Julian Oes 14642edfda gps/devices: updated submodule 2018-12-22 10:32:18 +01:00
Julian Oes cc7cae4e7f DriverFramework: updated submodule
This fixes a race/lockup happening in the DriverFramework scheduler.
2018-12-22 10:32:18 +01:00
Julian Oes 7c93578b8b jMAVSim: updated submodule 2018-12-22 10:32:18 +01:00
Julian Oes a7e93bc2da simulator: removed leftover (wrong) comment 2018-12-22 10:32:18 +01:00
Julian Oes 09595a1de9 dataman: left FIXME comment
We shouldn't be using module here.
2018-12-22 10:32:18 +01:00
Julian Oes 3f508c99fd parameters: commented out strange usleep 2018-12-22 10:32:18 +01:00
Julian Oes da9029274c pwm_out_sim: always publish actuators
This is required so that the SITL simulator receives a feedback from
PX4.
2018-12-22 10:32:18 +01:00
Julian Oes d1514cd667 POSIX: add defines system clock calls 2018-12-22 10:32:18 +01:00
Julian Oes 98ae0186e9 px4_sem: use px4_sem on all POSIX system
This uses the "fake" px4_sem based on mutex and condition_variable on
all POSIX system, not just macOS and Cygwin. This means that we can
change px4_sem_timedwait under the hood and inject the simulated time.
2018-12-22 10:32:18 +01:00
Julian Oes 3e6e1f5c2b POSIX: use lockstep_scheduler to fake time
This integrates the lockstep_scheduler, so that the system time is set
by the mavlink HIL_SENSOR message.

This means that the speed factor is removed and the speed is entirely
given by the simulator.
2018-12-22 10:32:18 +01:00
Julian Oes f0ce300744 platforms: move latency_buckets to perf.c 2018-12-22 10:32:18 +01:00
Julian Oes 6466e690fe DriverFramework: update submodule 2018-12-22 10:32:18 +01:00
Julian Oes 4af0c939ec lockstep_scheduler: update submodule 2018-12-22 10:32:18 +01:00
Julian Oes fa8ac612ab POSIX: use C++ for drv_hrt (file was renamed) 2018-12-22 10:32:18 +01:00
Julian Oes 5df333fa96 POSIX: include lockstep_scheduler in build 2018-12-22 10:32:18 +01:00
Julian Oes 6a78212a6b jMAVSim: update submodule 2018-12-22 10:32:18 +01:00
Julian Oes d295320e82 sitl_run.sh: lower rate for jMAVSim to 250 Hz
This should be enough for now, especially when we want to raise the
speed of the simulation.
2018-12-22 10:32:18 +01:00
Julian Oes 5ff3c40179 Added lockstep_scheduler as submodule
This is just an intermediate step until we can copy the sources over.
2018-12-22 10:32:18 +01:00
Julian Oes fa31d95fd8 Renamed drv_hrt.c to drv_hrt.cpp 2018-12-22 10:32:18 +01:00
Julian Oes db6de38b19 Work in progress to support a speed factor in SITL
These contains some rough changes trying to get SITL to speed up by a
SPEED_FACTOR.

This platform time code probably requires some more thought and refactor
but this gets a demo at 4x working.
2018-12-22 10:32:18 +01:00
Julian Oes 82a88d6a53 jMAVSim: update submodule for new -f argument
This adds the argument -f for a speed factor to speed up the simulation.
2018-12-22 10:32:18 +01:00
Julian Oes d70b0f1c8c Replace sleep with px4_sleep
This is another step to isolate time from the system.
2018-12-22 10:32:18 +01:00
Julian Oes 3f695870a4 Replace usleep in GpsDrivers 2018-12-22 10:32:18 +01:00
Julian Oes 5b9dea5604 Replacing usleep with px4_usleep
This is a step towards isolating time from the system.
2018-12-22 10:32:18 +01:00
Julian Oes e485885344 platforms: remove unused Rate class 2018-12-22 10:32:18 +01:00
PX4 Build Bot d1b44e5d6a Update submodule v2.0 to latest Sat Dec 22 00:38:12 UTC 2018
- v2.0 in PX4/Firmware (3256e67fdc5e86b5d8c6378ea24ff8a065b65ba8): https://github.com/mavlink/c_library_v2/commit/c38176a0a63556815ea117c6877ce2dd18739231
    - v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/175ab6725cc0d96827d04ffeeaf3a7797a9abdbf
    - Changes: https://github.com/mavlink/c_library_v2/compare/c38176a0a63556815ea117c6877ce2dd18739231...175ab6725cc0d96827d04ffeeaf3a7797a9abdbf

    175ab67 2018-12-17 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/eaa914c7d9789bc37c9a6a59a5bd1171634bd429
4d5fa0d 2018-12-14 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/48df7ea08abb5d87df6ccb1f9a69b91ff3b89c7a
b65cfcd 2018-12-14 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/b671d3c24d5fc6aa964cd07a4a46566d4dbd7862
8473fe2 2018-12-13 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/2b9d470011a0d62fbfc3183ee172201e5170f7af
5a186d4 2018-12-13 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/68ed09da2e341b2932d9c9d761d7baa811191dc2
2018-12-22 09:17:29 +01:00
PX4 Build Bot 582658f2e0 Update submodule matrix to latest Sat Dec 22 00:38:42 UTC 2018
- matrix in PX4/Firmware (3e5d66580520e5ae64555c5fc9252c6c661389e3): https://github.com/PX4/Matrix/commit/9c0acfba36a928b7b002eea3a9dca54a5a0c1250
    - matrix current upstream: https://github.com/PX4/Matrix/commit/18fba8221cc1840964c43f04d8c2aa21857e1b9b
    - Changes: https://github.com/PX4/Matrix/compare/9c0acfba36a928b7b002eea3a9dca54a5a0c1250...18fba8221cc1840964c43f04d8c2aa21857e1b9b

    18fba82 2018-12-16 Matthias Grob - quaternion: improve comments
a4f39c0 2018-12-16 Matthias Grob - quaternion: reuse existing dot product
2018-12-21 23:39:07 -08:00
Daniel Agar 49be26b6cf load_mon improve cpuload calculation and cleanup (#9852) 2018-12-21 22:27:58 -08:00
Alvar Martti 63651da309 FW bug in checking if landing point has been passed
* the bearing difference between the waypoints and aircraft to landing point should be wrap_pi'ed
2018-12-21 10:03:31 -08:00
Nuno Marques cfd1be584e Feature: VIO: add ODOMETRY stream (#11084)
* mavlink_messages: remove LOCAL_POSITION_NED_COV stream

* mavlink_messages.cpp: add ODOMETRY stream

* add MAV_ODOM_LP parameter to activate odometry loopback

* EKF2: add vehicle_odometry publisher

* Replace VISION_POSITION_ESTIMATE loopback with ODOMETRY

* LPE: add vehicle_odometry publisher

* set vehicle_odometry local_frame field

* mavlink_messages.cpp: ODOMETRY frame_id depends on MAV_ODOM_LP
2018-12-21 12:54:04 -05:00
Christian Rauch b3018646d5 check CONFIG_STACK_COLORATION for print_load_nuttx 2018-12-21 05:43:21 -08:00
Christian Rauch a6adc64569 check CONFIG_TASK_NAME_SIZE for print_load_nuttx 2018-12-21 05:43:21 -08:00
Christian Rauch 92117da3a8 check CONFIG_ARCH_MATH_H 2018-12-21 05:43:21 -08:00
Christian Rauch 0764c76836 check CONFIG_I2C for I2C 2018-12-21 05:43:21 -08:00
Christian Rauch 8a2e3800d8 check CONFIG_SCHED_INSTRUMENTATION for print_load_nuttx 2018-12-21 05:43:21 -08:00
Matthias Grob fce35ba9d2 fmu-v2: remove orbit support to save flash 2018-12-19 18:22:08 +01:00
Matthias Grob 3d42c495aa FlightTaskOrbit: clip radius to range 2018-12-19 18:22:08 +01:00
Matthias Grob f8171f999b mavlink: initialize orbit struct 2018-12-19 18:22:08 +01:00
Julian Oes 35f2c39f30 ROMFS: remove leftover CMakeLists.txt files
These files are copied by accident and then discovered by shellcheck.
2018-12-19 07:36:43 +00:00
Julian Oes 63ee101c51 rcS: fix exit value
Shellcheck complained about returning -1 because that's essentially 255.
2018-12-19 07:36:43 +00:00
Julian Oes 3ebf030a02 ROMFS: change shebang from #!zsh to #!/bin/sh
This was required for shellsheck.
2018-12-19 07:36:43 +00:00
Julian Oes d265aaab41 ROMFS: don't forget to prune rc.board
The startup file rc.board is copied to the build/../genromfs folder
after the pruning of the files happened. Thus, about 2000 bytes of
comments and whitespace were included in the ROMFS.

This commit moves pruning of the files in ROMFS to a separate cmake
custom command which happens after the ROMFS files have been copied and
the extra files have been added.

Testing showed that this change only affected the rc.board file as
expected.
2018-12-19 07:36:43 +00:00
Matthias Grob 25de837c23 FlightTaskOrbit: fix rotation direction in telemetry 2018-12-18 14:40:07 +01:00
Matthias Grob d4a40f5d99 px4_custom_mode: add custom sub mode orbit 2018-12-18 14:40:07 +01:00
Matthias Grob 1cee90d42f orbit_status: fix type for radius 2018-12-18 14:40:07 +01:00
Matthias Grob e708e82425 mavlink: lower orbit status frequency 5Hz 2018-12-18 14:40:07 +01:00
Matthias Grob 8b419efa2c FlightTaskOrbit: fix rotation direction from command 2018-12-18 14:40:07 +01:00
Matthias Grob 25aa2b9c8c orbit: fix telemetry message content 2018-12-18 14:40:07 +01:00
Matthias Grob 14b83f7bfc mavlink: add orbit to the normal messages
It is only actually sent out when the orbit is running.
2018-12-18 14:40:07 +01:00
Alessandro Simovic f11465bb26 orbit: publish uorb message 2018-12-18 14:40:07 +01:00
Alessandro Simovic 10913a66b4 orbit: sending telem via mavlink 2018-12-18 14:40:07 +01:00
Alessandro Simovic a08ea4764d orbit: added telem uorb msg 2018-12-18 14:40:07 +01:00
斯东Stone 1c90b917ea Fix px4_fmu-v2/v3 serial port mapping 2018-12-16 19:56:46 -08:00
Beat Küng 6a5108269e rcS tone_alarm: fix CBRK_BUZZER
tone_alarm was started before the parameters were loaded, and the first
tune was played before that as well. CBRK_BUZZER was then read as default,
ignoring the user-configured value.

We now start tone_alarm after we load the parameters. Note that a
previously published startup tone or SD card error will still be played.
2018-12-15 10:01:02 -05:00
Beat Küng cfad556a16 mixer_multirotor: use reduce_only instead of -1000 for yaw thrust reduction
This is more accurate, because if we use -1000 as lower bound, a very large
yaw command can reduce thrust more than needed.

The difference can be seen in the following example
(with roll/pitch airmode):
p_dot_sp = -1.0 # roll acceleration
q_dot_sp = 0.9 # pitch acceleration
r_dot_sp = -0.9 # yaw acceleration
2018-12-13 09:50:07 +01:00
Beat Küng 418df2516d mixer multirotor: add to CI 2018-12-13 09:50:07 +01:00
Beat Küng e8e3b00a10 refactor mixer: rename delta_outputs to desaturation_vector 2018-12-13 09:50:07 +01:00
Beat Küng 3eefc93e5d mixer_multirotor.py: avoid scientific notation for vector printf
makes it easier to compare.
2018-12-13 09:50:07 +01:00
Beat Küng 447ed18ab4 commander: use C API for MC_AIRMODE & RC_MAP_ARM_SW to remove multirotor modules dependency 2018-12-13 09:50:07 +01:00
Beat Küng c665c34d2a MC stabilized: allow yaw control at 0 throttle if yaw-airmode is selected 2018-12-13 09:50:07 +01:00
Beat Küng 24dc316973 commander: enforce yaw-airmode to have an arming switch mapped
Yaw airmode w/o arming switch is most likely not what you want and will
lead to surprising results.
2018-12-13 09:50:07 +01:00
Beat Küng cf66656258 mixer multirotor: add unit-tests
To run:
cd src/lib/mixer
make tests

This will validate the C++ implementation by taking the python
implementation as ground-truth. It runs through various actuator control
command values for all airmode variations and several mixer types.

The python script also allows to prototype new mixer algorithms.

It is not integrated into the existing build system, because it's easier
to use that way, with less dependencies, and faster testing workflow.
It could however be a bit more integrated.

Reference: https://github.com/Auterion/Flight_Control_Prototyping_Scripts/tree/master/control_allocation
2018-12-13 09:50:07 +01:00
Beat Küng c659d2bcc2 mixer: minor refactoring to reduce header include dependencies
- avoid including <px4_defines.h> from the math headers
- avoid driver include <drivers/drv_mixer.h> from the mixer
2018-12-13 09:50:07 +01:00
Beat Küng 8bcf54688a mixer: complete refactoring & add airmode for yaw
Provides a more generic desaturation algorithm, making it easier to
handle the different mixer strategies.

python reference implementation:
https://github.com/Auterion/Flight_Control_Prototyping_Scripts/tree/master/control_allocation

The behavior for non-airmode and roll/pitch airmode should be the
same as before.

CPU load is slightly higher for the non-airmode case (+0.5%), for airmode
it is the same.
2018-12-13 09:50:07 +01:00
Beat Küng 19ccab28bb mixer: use an enum for airmode 2018-12-13 09:50:07 +01:00
Beat Küng 9406fa5246 refactor mixer.h: use override keyword, fix set_airmode argument type (uint32_t -> int32_t) 2018-12-13 09:50:07 +01:00
bresch 7cc00f41d2 AirModeYaw - Change airmode type from bool to int 2018-12-13 09:50:07 +01:00
TSC21 b2fd8abf9e CI: add rostest to 'px4' and MAVROS in caktin and colcon builds 2018-12-13 02:09:31 +00:00
James Goppert 4ecb8746d6 Formatting. 2018-12-13 02:09:31 +00:00
TSC21 870c513aad readd CMAKE_RUNTIME_OUTPUT_DIRECTORY install for the posix build 2018-12-13 02:09:31 +00:00
James Goppert 78f109bbab Add ros pub test. 2018-12-13 02:09:31 +00:00
TSC21 a6121e1655 Cmake build: do not change CMAKE_RUNTIME_OUTPUT_DIRECTORY if building with catkin 2018-12-13 02:09:31 +00:00
James Goppert c7eb21be86 Fix catkin/ROS build paths. 2018-12-13 02:09:31 +00:00
David Sidrane 53bc357cda nxphlite-v3:SDHC setting is for EMI issue with GPS and FCC (#11029)
This updating of the driver setting is for EMI issue with GPS and FCC.
   With this setting the clock is sinusoidal

   N.B. sd_bench fails on SanDISK HC, but Passes SanDISK **HC1** and
   Kingston cards.

   ****Use HC1 or Kingston cards!***

   Testing done on SanDISK HC all failed sd_bench with Drive/Slew other
   than default and _PIN_OUTPUT_FAST|_PIN_OUTPUT_HIGHDRIVE

	_PIN_OUTPUT_FAST|_PIN_OUTPUT_HIGHDRIVE    Square noisy, pass SanDISK HC
        _PIN_OUTPUT_FAST|_PIN_OUTPUT_LOWDRIVE     Square noisy, pass SanDISK HC
        _PIN_OUTPUT_HIGHDRIVE|_PIN_OUTPUT_SLOW    sinusoidal fail SanDISK HC, pass SanDISK HC1
        _PIN_OUTPUT_LOWDRIVE |_PIN_OUTPUT_SLOW    sinusoidal fail SanDISK HC, pass SanDISK HC1
                              _PIN_OUTPUT_SLOW    sinusoidal fail SanDISK HC, pass SanDISK HC1
2018-12-12 20:51:57 -05:00
David Sidrane 11f9925b02 rcS,rc.serial.jinja:ensure proper unset hygiene
Delete auto generated vars, and others that were missed.
2018-12-12 15:14:11 -05:00
Daniel Agar f851978101 commander run preflight immediately (#11018)
- partially addresses #11017
2018-12-12 09:24:50 -05:00
Kārlis Seņko c1d50d35d3 Move common shmem parameter declarations to shmem.h. 2018-12-11 09:21:15 -05:00
Kārlis Seņko d1a1a1b9fe Use correct path when looking up df wrapper. 2018-12-11 09:21:15 -05:00
Kārlis Seņko 859b242cb8 Fix some dynamic linking errors.
_Stof, bsearch, param_find_changed
2018-12-11 09:21:15 -05:00
Kārlis Seņko 606bff2634 Fix paths in snapdragon upload code. 2018-12-11 09:21:15 -05:00
Kārlis Seņko 950ab879ff Make name mangling type consistent. 2018-12-11 09:21:15 -05:00
Hamish Willee 11364c0e01 Improve forcefail/terminatefail docs 2018-12-10 15:30:53 -08:00
Simone Guscetti 2c06cb71c8 FlightTask: use convetion for definition of the landing gear default value 2018-12-10 16:17:23 +01:00
Simone Guscetti 9ee3d79a96 FlightTask Manual: Gear react only on switch changes and not states 2018-12-10 16:17:23 +01:00
Simone Guscetti f4fc0cd291 FlightTAsk AutoMapper: Adapt to new message 2018-12-10 16:17:23 +01:00
Simone Guscetti be7416c823 FlightTask Auto: Adapt to new message and rename variable 2018-12-10 16:17:23 +01:00
Simone Guscetti 82d4cd6dfa position_setpoint: Change deploy gear to landing gear
- Use the values from landing_gear.msg
2018-12-10 16:17:23 +01:00
Simone Guscetti 2f7c8569cb mc_pos_ctrl: Remove gear intialisation
- Handled in the flight task
2018-12-10 16:17:23 +01:00
Simone Guscetti 1412e0494c FlightTask AutoMapper: Use deploy gear information 2018-12-10 16:17:23 +01:00
Simone Guscetti 66f85ff9ae FlightTask Auto: Save deploy gear information 2018-12-10 16:17:23 +01:00
Simone Guscetti aaddb845c4 FlightTask: Add initialisation of the landing gear 2018-12-10 16:17:23 +01:00
Simone Guscetti de185726b3 vehicle constraints: remove landing gear
- landing_gear: refactor state name
- Add the keep state to the landing gear message
- Adapt FlightTaskManual, FlightTaskAutoMapper, mc_pos_control,
to review message definition
2018-12-10 16:17:23 +01:00
Simone Guscetti 6dbed6636d FlightTasks: Add interface for landing gear 2018-12-10 16:17:23 +01:00
Simone Guscetti bf9a18a200 FlightTask: Add interface for landing gear 2018-12-10 16:17:23 +01:00
Simone Guscetti 6938b7fe02 Rename the invered state and make namespace more clear
- Addressing review comments
2018-12-10 16:17:23 +01:00
Simone Guscetti aac9221d95 msg landing_gear: change type to int8 2018-12-10 16:17:23 +01:00
Simone Guscetti ee41e3181f mc_pos_ctrl: Replace landing gear logic
- It takes the input from the constrains from the active flight task
2018-12-10 16:17:23 +01:00
Simone Guscetti 163d201c28 remove the landing gear from the attitude setpoint
- An new message is created just for the landing gear
- The old logic is repalaced by publishing this new topic
2018-12-10 16:17:23 +01:00
Matthias Grob e979d24fff commander: fix orbit failsafes for data link & rc loss 2018-12-08 22:34:57 +01:00
Matthias Grob 5b5d5ac6d5 mc_pos_control: let orbit task do its work 2018-12-08 22:34:57 +01:00
Matthias Grob 34fb52d8bd commander: add orbit state handling 2018-12-08 22:34:57 +01:00
Matthias Grob 77d37c5b7f msg: add orbit main and navigation state 2018-12-08 22:34:57 +01:00
Jake Dahl 21bcc0d2f4 mav_cmd_do_reposition now obeys the ground speed argument 2018-12-07 21:40:16 -05:00
Beat Küng dc49e259b3 logger: add separate profile for vision/avoidance
Keeps things more modular.
2018-12-07 11:51:59 +01:00
Beat Küng fced1ce33b logger: remove some unused logged topics in SITL 2018-12-07 11:51:59 +01:00
Daniel Agar d42fe1826a parameters also include all module configs when scoping disabled (#10992)
* fixes parameters on Snapdragon
2018-12-06 14:21:06 -05:00
Daniel Agar 0c60fff6bd vscode add lldb SITL debug launch targets 2018-12-05 18:25:58 -05:00
Daniel Agar 783267bbc3 vscode initial jlink debug launch 2018-12-05 15:58:41 -05:00
Daniel Agar fd8fe29ef3 vscode update targets and gdb debugging 2018-12-05 15:58:41 -05:00
dakejahl 311c0941c9 Teal One airframe improvements for full support (#10860)
* added a parameter for enabled the smart battery
* start tel1 and tel2 at 921600 and max rate
* turned up the max tx rate on mavlink streams for telem1 and telem2
* turned off mavlink stream for tel1 in 4250_teal. This is connected to TX1 FTDI UART and has issues.
* moved check to 4250 board ID to start mpu9250s for Teal airframe into fmuv4 rc.board.
2018-12-05 09:49:58 -05:00
Daniel Agar a5fa3eda30 vscode initial configuration (#10911) 2018-12-04 23:11:36 -05:00
Daniel Agar 3a036021ba ROMFS defaults drop floating point decimal 2018-12-04 22:57:53 -05:00
Daniel Agar ecbf6ea77b ROMFS multicopter airframes don't call other airframes (4001/4002)
- fixes #10980
2018-12-04 22:57:53 -05:00
PX4 Build Bot a922d4e70e Update submodule nuttx to latest Wed Dec 5 00:37:51 UTC 2018
- nuttx in PX4/Firmware (eddfa7421c4ca2eb0969498093e09fa834e920bd): https://github.com/PX4/NuttX/commit/166d898c70141d7ddb179b5ead1c5ea726574411
    - nuttx current upstream: https://github.com/PX4/NuttX/commit/d07a1d459ee9b5b56dbf06a160e8faa4c49fcd10
    - Changes: https://github.com/PX4/NuttX/compare/166d898c70141d7ddb179b5ead1c5ea726574411...d07a1d459ee9b5b56dbf06a160e8faa4c49fcd10

    d07a1d4 2018-12-04 Beat Küng - [REJECTED] arm/include/math.h: remove _PARAMS macro (#42)
2018-12-04 22:57:01 -05:00
flochir ab9e9793a0 ICM20948 integration into MPU9250 driver (#10116)
* Integrated preliminary ICM20948 support into MPU9250 driver.
Fixed temperature conversion for MPU9250/ICM20948.
* Included missing check for PX4_I2C_OBDEV_MPU9250 in main.cpp.
* Added explicit bus for internal MPU9250 on Pixhawk 2.1 to avoid implicit start
of an externally attached device with wrong orientation.
2018-12-04 22:15:02 -05:00
PX4 Build Bot 5c9aa1ca88 Update submodule micro-CDR to latest Wed Dec 5 00:38:19 UTC 2018
- micro-CDR in PX4/Firmware (3888bb163eac5c0adfc18e865ef3fb70d0532de9): https://github.com/eProsima/micro-CDR/commit/d23eda8772ecf846531ee470a81fb1be37802e7b
    - micro-CDR current upstream: https://github.com/eProsima/micro-CDR/commit/8b3546e8848e4c07c16ec55730d3ad1aa94396ab
    - Changes: https://github.com/eProsima/micro-CDR/compare/d23eda8772ecf846531ee470a81fb1be37802e7b...8b3546e8848e4c07c16ec55730d3ad1aa94396ab
2018-12-04 21:41:09 -05:00
Daniel Agar 1f8c0e79e8 cmake toolchains force cache cpu flags and don't append
- these flags were accumlating on top of each other anytime cmake had to reconfigure
2018-12-04 19:45:46 -05:00
Daniel Agar dbee6380ee cmake move custom upload helpers to boards/ 2018-12-04 19:45:46 -05:00
Matthias Grob e69049ec41 mc_pos_control: use time literals everywhere, @bkueng review input 2018-12-04 11:54:11 +01:00
Matthias Grob 096d7da4b9 mc_pos_control: fix doxygen comments, @bkueng review input 2018-12-04 11:54:11 +01:00
Matthias Grob 35a486bf6f mc_pos_control: addressed @dagar's review comments 2018-12-04 11:54:11 +01:00
Matthias Grob 513c973f01 mc_pos_control: assign events field outside of initializer
Necessary because NuttX defines pollfd differend from
the POSIX standard. The difference of field order makes
use of C++ designated initializers to compile for both
platforms impossible.
2018-12-04 11:54:11 +01:00
Matthias Grob 09e563addd mc_pos_control: fix naming of non-member time stamps 2018-12-04 11:54:11 +01:00
Matthias Grob 0ba3896068 mc_pos_control: refactor dt time difference calculation 2018-12-04 11:54:11 +01:00
Matthias Grob a310980ad2 mc_pos_control: refactor loop polling 2018-12-04 11:54:11 +01:00
Matthias Grob 013a2655e2 mc_pos_control: fix comments and spacing inconsistencies 2018-12-04 11:54:11 +01:00
Matthias Grob 8cb446c233 mc_pos_control: remove useless landed state copy
If the landed state was set before the position controller starts it
would get updated with the first poll_subscriptions() anyways. But it's
not on all posix and nuttx platforms I tested and the deleted statement
just copies the zero message into the struct which is already zero.
2018-12-04 11:54:11 +01:00
Daniel Agar 5ba56c8c2c fmu-v5 timer_config.c fix code style 2018-12-04 01:06:54 -05:00
Daniel Agar 8622fa4aac move pca8574 driver to lights 2018-12-04 01:06:54 -05:00
Daniel Agar 75b2053243 move uavcan from modules to drivers 2018-12-04 01:06:54 -05:00
Daniel Agar bbab66d974 move vmount to modules (it's not a driver) 2018-12-04 01:06:54 -05:00
Daniel Agar 9d42480f4e drivers create lights category (directory) 2018-12-04 01:06:54 -05:00
Daniel Agar f6a4616501 move ocpoc_adc driver to board directory 2018-12-04 01:06:54 -05:00
Daniel Agar 766c33799d move all navio2 drivers to emlid navio2 board directory 2018-12-04 01:06:54 -05:00
Daniel Agar 2e7c1d3ca6 move bbblue_adc to beaglebone blue board directory 2018-12-04 01:06:54 -05:00
Daniel Agar a91a26be97 move aerofc_adc to intel aerofc board directory 2018-12-04 01:06:54 -05:00
Daniel Agar 744bacd424 boards/ enforce astyle 2018-12-04 01:06:54 -05:00
Daniel Agar 1efad64f0c bebop move flow driver to board directory 2018-12-04 01:06:54 -05:00
Daniel Agar 9c29e9d4c9 move crazyflie syslink to board directory 2018-12-04 01:06:54 -05:00
Daniel Agar d4e06e517a delete drv_gpio.h, modules/gpio_led, and fmu GPIO ioctls 2018-12-03 16:30:39 +01:00
Matthias Grob c303e36ed0 vtol_att_control: small comment typo 2018-12-03 16:14:32 +01:00
Daniel Agar 93802c2710 hysteresis test increase time on cygwin (#10958) 2018-12-03 09:39:43 -05:00
Daniel Agar 38c84e6e9d rc.autostart restart shellcheck fix (161cf7) and exclude check
- fixes #10972
2018-12-03 15:11:45 +01:00
PX4 Build Bot 5083c60a87 Update submodule v2.0 to latest Mon Dec 3 00:37:56 UTC 2018
- v2.0 in PX4/Firmware (2923e40d8777ccf2581d888f8e41a48dfa93f09d): https://github.com/mavlink/c_library_v2/commit/7c47254ddc8bf70eb5e82b4c2142a3faa4fa5780
    - v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/c38176a0a63556815ea117c6877ce2dd18739231
    - Changes: https://github.com/mavlink/c_library_v2/compare/7c47254ddc8bf70eb5e82b4c2142a3faa4fa5780...c38176a0a63556815ea117c6877ce2dd18739231

    c38176a 2018-11-30 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/4c160eac64675b87f7000a9a352654182ebcfba6
057bcc4 2018-11-30 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/113731eaaf53c6cd725eb973c7cc923aa43e9c23
b1aa2b8 2018-11-29 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/8349b1cf68565c249cbad8aae0db0a466478b6a5
c3ba3f9 2018-11-29 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/5e539462241d8a088619e842c72e8030c134ab0c
077265a 2018-11-28 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/62fa8289790696a59569a79461c88f8ecb45c5ac
2018-12-03 11:16:40 +00:00
PX4 Build Bot e84d2151e2 Update submodule sitl_gazebo to latest Mon Dec 3 00:37:44 UTC 2018
- sitl_gazebo in PX4/Firmware (99c225dda2): https://github.com/PX4/sitl_gazebo/commit/7c97eeae139d86b3747ea877d8067fb3180dc4f1
    - sitl_gazebo current upstream: https://github.com/PX4/sitl_gazebo/commit/d08eb5b22d3edfb7a740c883b06f895a173b5519
    - Changes: https://github.com/PX4/sitl_gazebo/compare/7c97eeae139d86b3747ea877d8067fb3180dc4f1...d08eb5b22d3edfb7a740c883b06f895a173b5519

    d08eb5b 2018-11-27 Julian Oes - Update opencv includes
2018-12-03 10:00:57 +00:00
Daniel Agar b7b5b89969 Jenkins compile only archive first level of binaries 2018-12-02 20:05:49 -05:00
Daniel Agar 99c225dda2 Jenkinsfile deploy cleanup checkouts when done 2018-12-02 11:39:37 -05:00
TSC21 c25d122f12 update micro-CDR version and msg templates to fit the up to date version 2018-12-02 10:35:25 +01:00
David Sidrane 3e57067b35 fmu-v5:timer_config Move UI LED to 0 and condition status LEDS
If the BOARD_HAS_CONTROL_STATUS_LEDS is set the status LED will
   not be PWM controlled.

   UI LED will always be PWM controlled.
2018-12-02 10:34:04 +01:00
David Sidrane 7350808759 drv_led_pwm:Compile for either BOARD_HAS_LED_PWM or BOARD_HAS_UI_LED_PWM 2018-12-02 10:34:04 +01:00
David Sidrane 1d289f77e3 stm32:drv_led_pwm Null entry check 2018-12-02 10:34:04 +01:00
David Sidrane f3e312e70e fmu-v5:Default the Power LED on 2018-12-02 10:34:04 +01:00
TSC21 02454e5ffc update OSX install script to fit arg options to reinstall formulas and install install sim tools 2018-12-02 10:32:40 +01:00
TSC21 3e90c37d05 add nose and tornado to fit the requirements of matplotlib 2018-12-02 10:32:40 +01:00
Daniel Agar 161cf7f5d9 shellcheck fix rc.autostart return and improve globbing 2018-12-01 10:03:19 -05:00
Daniel Agar 3e9e5ed372 ROMFS move airframes to subdirectory 2018-12-01 10:03:19 -05:00
Daniel Agar 7f0d2f23b7 move atmel_same70xplained init to rc.board 2018-12-01 10:03:19 -05:00
Daniel Agar 4240abad73 move bitcraze_crazyflie init to rc.board 2018-12-01 10:03:19 -05:00
Daniel Agar 0e980c1f83 move gumstix_aerocore2 init to rc.board 2018-12-01 10:03:19 -05:00
Daniel Agar a3fed608a6 move airmind_mindpx-v2 init to rc.board 2018-12-01 10:03:19 -05:00
Daniel Agar c9a2033c5b move auav_x21-v1 init to rc.board 2018-12-01 10:03:19 -05:00
Daniel Agar a8b91c7ac9 move intel_aerofc-v1 init to rc.board 2018-12-01 10:03:19 -05:00
Daniel Agar a4830f8d7b move omnibus_f4sd init to rc.board 2018-12-01 10:03:19 -05:00
Daniel Agar 60ade5d82b move av_x1-v1 init to rc.board 2018-12-01 10:03:19 -05:00
Daniel Agar aab08ad6fc move nxp_fmuk66-v3 init to rc.board 2018-12-01 10:03:19 -05:00
Daniel Agar c6a502f150 move fmu-v2/v3 init to rc.board 2018-12-01 10:03:19 -05:00
Daniel Agar 6c2436c2ca move fmu-v4pro init to rc.board 2018-12-01 10:03:19 -05:00
Daniel Agar d940f500f6 move fmu-v4 init to rc.board 2018-12-01 10:03:19 -05:00
Daniel Agar 25799c6e75 create board specific init script and use with fmu-v5 2018-12-01 10:03:19 -05:00
Matthias Grob 94d4f0391a FlightTaskAuto: fix newline at end of file 2018-11-30 09:30:00 -05:00
Dennis Mannhart 55947d2782 exponentialFromLimits make small number const 2018-11-30 09:30:00 -05:00
Dennis Mannhart be4900f61d FlightTaskAutoMapper2: remove speed_at_target 2018-11-30 09:30:00 -05:00
Dennis Mannhart b3cde5ac44 FlightTaskAutoLine: replace NAV_ACC_RAD with _target_acceptance_radius 2018-11-30 09:30:00 -05:00
Dennis Mannhart 6110ddc8b1 math Functions constrain X_in of exponentialFromLimits function 2018-11-30 09:30:00 -05:00
Dennis Mannhart c97b2a3071 FlightTaskAuto: move method getVelocityFromAngle to FlightTaskAutoLine 2018-11-30 09:30:00 -05:00
Dennis Mannhart 23afb939f0 math Functions: exponential function with constraints 2018-11-30 09:30:00 -05:00
Dennis Mannhart 80193cd227 math Functions: replace float with T 2018-11-30 09:30:00 -05:00
bresch be2e80c186 MPC_YAW_MODE - Change max to 3 to enable trajectory alignment 2018-11-30 09:27:40 -05:00
Daniel Agar ee8e3c4527 Jenkins reduce number of builds kept (10 -> 5) 2018-11-30 08:32:25 -05:00
TSC21 88a8957841 CI: be more descriptive regarding the catkin/colcon builds 2018-11-29 19:27:33 +00:00
TSC21 5ab2babe95 CI: add 'Colcon' parallel build 2018-11-29 19:27:33 +00:00
TSC21 fa528745b5 IDL generation: add constants fields for IDL's 2018-11-29 16:43:00 +00:00
Daniel Agar 02c34763f0 tone_alarm_sim readd to sitl and drop DriverFramework
- fixes #10925
2018-11-29 07:40:22 -05:00
Dennis Mannhart 370371767f FlightTaskAutoLine: ensure that desired speed along track does not exceed maximum speed at threshold to target 2018-11-29 12:32:56 +01:00
Matthias Grob d76aec4eb2 mc_pos_control: refactor switch case logic for modes 2018-11-29 08:19:58 +01:00
Matthias Grob 38cf89ee9c mc_pos_control: also use vertical smoothing in altitude
Smoothing can be configured by MPC_POS_MODE parameter
put before only for position mode and not for altitude mode.
2018-11-29 08:19:58 +01:00
Daniel Agar 48d9484ceb commander fix and enforce code style 2018-11-28 20:42:03 -05:00
Daniel Agar 91721f2060 cmake update NuttX bloaty_compare_master helper to use new paths 2018-11-28 16:40:12 -05:00
Paul Riseborough 2c97054d40 commander notify user if EKF fails compass (#10919) 2018-11-28 13:12:35 -05:00
Daniel Agar 7996f9723f README add FMUv5 pixhawk 4 and pixhawk 4 mini 2018-11-28 12:23:42 -05:00
David Sidrane 729d1c32d3 Rename nxphlite-v3 to NXP fmuk66-v3 (#10927) 2018-11-28 12:13:21 -05:00
PX4 Build Bot ef178730b2 Update submodule sitl_gazebo to latest Wed Nov 28 01:11:11 UTC 2018
- sitl_gazebo in PX4/Firmware (dcd12b5f9d): https://github.com/PX4/sitl_gazebo/commit/5a50cb9a52737522b28abf14ce15b57de8ff2695
    - sitl_gazebo current upstream: https://github.com/PX4/sitl_gazebo/commit/7c97eeae139d86b3747ea877d8067fb3180dc4f1
    - Changes: https://github.com/PX4/sitl_gazebo/compare/5a50cb9a52737522b28abf14ce15b57de8ff2695...7c97eeae139d86b3747ea877d8067fb3180dc4f1
2018-11-27 21:25:13 -05:00
Julian Oes dcd12b5f9d sitl_gazebo: update submodule to latest master 2018-11-27 19:22:37 -05:00
Matthias Grob 93d2b092f0 appveyor: fix mkdir on existing directory 2018-11-27 15:43:45 +01:00
Daniel Agar ba6b71e619 px4fmu-v4 start ist8310 mag (optional external) 2018-11-27 09:29:48 -05:00
Daniel Agar 48df19c8df move dyn_hello to examples and restore testing 2018-11-26 14:40:14 -08:00
Daniel Agar fecdfe5fbc move posix/tests/hrt_test to systemcmds/tests/hrt_test 2018-11-26 14:40:14 -08:00
Daniel Agar 750e66f43b px4/sitl add replay module 2018-11-26 14:40:14 -08:00
Daniel Agar e45e7aa8a6 move posix/tests/hello to examples/hello and include everywhere 2018-11-26 14:40:14 -08:00
Daniel Agar 85c5fb4295 muorb test move to modules/muorb/test 2018-11-26 14:40:14 -08:00
Daniel Agar c3448c19c4 make vcdevtest a generic cdev test 2018-11-26 14:40:14 -08:00
Daniel Agar 3e0a3559a9 cmake use standard mechanisms for settings flags 2018-11-26 14:40:14 -08:00
Daniel Agar 11be2b8873 cmake split px4_base into px4_add_module, px4_add_library, px4_add_common_flags 2018-11-26 14:40:14 -08:00
Daniel Agar 36ec1a7914 Makefile quick_check switch nuttx target to px4_fmu-v5 2018-11-26 14:40:14 -08:00
Daniel Agar c258534aa5 cmake px4_add_board document and cleanup 2018-11-26 14:40:14 -08:00
Daniel Agar fa0fe4cac6 cmake remove need for platform px4_add_board_os
- explicitly set TOOLCHAIN on all NuttX targets
2018-11-26 14:40:14 -08:00
Daniel Agar f22f331e4a Makefile add board rename deprecation warning 2018-11-26 14:40:14 -08:00
Daniel Agar ec4c9da253 remove BOARD_NAME from board_config.h and set automatically 2018-11-26 14:40:14 -08:00
David Sidrane 2d052c02fa board_common:Use new PX4IO FW name on SD card and remove legacy V1 name 2018-11-26 14:40:14 -08:00
David Sidrane cadda8c263 px4fmu_test:rcS use correct name for px4io bin 2018-11-26 14:40:14 -08:00
Daniel Agar abb3817d31 boards new split VENDOR_MODEL naming convention 2018-11-26 14:40:14 -08:00
Daniel Agar f692ad04d0 boards organization 2018-11-26 14:40:14 -08:00
Matthias Grob c1f851a600 appveyor: shallow clone the main repo 2018-11-25 22:43:11 +01:00
Matthias Grob 2973b77f18 appveyor: use new 0.5 installer 2018-11-25 22:43:11 +01:00
David Sidrane b80fa5f2f5 px4fmu-v5:Remove old comment 2018-11-25 21:02:42 +00:00
Daniel Agar d4f713b286 commander cleanup home position handling 2018-11-25 21:00:51 +00:00
Ramón Hernán Roche Quintana f387fe7e65 sitl_run.sh handle spaces in paths
launch script for jmavsim failed to start if there were any spaces in
paths, string handling in paths was improved and tested.
2018-11-25 14:09:58 -05:00
Daniel Agar a4c4f356b3 Makefile handle spaces in path 2018-11-25 14:09:58 -05:00
Roman Bapst bef8b6b949 mavlink hash check: return early in case of hash check parameter (#10861)
*  a request for setting the '_HASH_CHECK' parameter is handled differently
than the same request for a standard parameter. Make sure we don't actually
try to set the parameter.

Signed-off-by: Roman <bapstroman@gmail.com>
2018-11-25 14:01:23 -05:00
CUAVcaijie eb8a3de987 add rgbled_ncp5623c driver (#10889)
Co-Authored-By: CUAVcaijie <caijie@cuav.net>
2018-11-25 13:40:51 -05:00
TSC21 1268109690 bump px4-dev-raspi container tag 2018-11-25 18:22:47 +00:00
TSC21 ddb4b27fbe set CPACK_DEBIAN_PACKAGE_SHLIBDEPS to OFF 2018-11-25 18:22:47 +00:00
Daniel Agar b9b301c38e update sitl_gazebo to latest master 2018-11-25 11:34:16 -05:00
Daniel Agar 2c33a937dd update docker images to 2018-11-22 tag
- keeping nuttx and armhf compile jobs on 2018-09-11 for now
2018-11-25 11:34:16 -05:00
PX4 Build Bot d42edfc612 Update submodule Mavlink v2.0 to latest Sun Nov 25 07:37:28 EST 2018
- Mavlink v2.0 in PX4/Firmware (d1dc8e440912e7918465163195b73531138e1e8c): https://github.com/mavlink/c_library_v2/commit/6203e2b64395cfa416b9321f633bc3256a79f722
    - Mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/7c47254ddc8bf70eb5e82b4c2142a3faa4fa5780
    - Changes: https://github.com/mavlink/c_library_v2/compare/6203e2b64395cfa416b9321f633bc3256a79f722...7c47254ddc8bf70eb5e82b4c2142a3faa4fa5780

    7c47254 2018-11-21 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/aa72b9e9806854ee822eb2fb4c70c26216113141
2018-11-25 11:34:16 -05:00
Mara Bos 3c660acca8 Add unit test for dynamically loading modules on posix. 2018-11-24 01:58:09 +01:00
Mara Bos d13836eb1e Add dynamic modules on Posix.
You can now add `DYNAMIC` as an option to `px4_add_module`, which will
cause that module to no longer be compiled into the px4 executable, but
instead produce a separate shared library file, which can be loaded and
executed with the new `dyn` command:

    pxh> dyn ./hello.px4mod start

This will load the shared object file `hello.px4mod` if it wasn't
already loaded, and execute its main function with the given arguments.
2018-11-24 01:58:09 +01:00
Mara Bos e9fb17c51a Always use FILE* for standard output.
The threads running commands for clients through the Posix daemon used
to write to a char buffer through snprintf (etc.) which was then written
directly to the file descriptor, whereas in the other case printf
(etc.) was used to write to stdout (FILE*). Both versions used some
macro's and repeated code to have the same output.

This change unifies these two cases by using a FILE* in both cases. The
(line) buffering is done by the standard C library's implementation
(just like with stdout), and px4_log.c now uses the same code in all
cases (using fprintf, etc.) for printing (colored) output.
2018-11-23 12:15:41 +01:00
bresch 20f870137b FW auto - Add parameter for flaps setting during landing 2018-11-23 10:40:27 +01:00
Daniel Agar a6684c6f9a uORB orb_exists use internal linked list instead of file path 2018-11-23 08:15:48 +01:00
Daniel Agar 023e267e9b uORB replace ORBMap with linked list 2018-11-23 08:15:48 +01:00
Daniel Agar 180cd94978 uORBDeviceNode mark all overrides 2018-11-23 08:15:48 +01:00
Daniel Agar f1bf7172e7 make vdev file flags and priv consistent with nuttx 2018-11-23 08:15:48 +01:00
Daniel Agar f9a3235709 remove unused parameter VT_AIRSPD_RULE (#10897)
- fixes #10896
2018-11-22 17:43:33 -05:00
Michael Schaeuble 43034922e2 Mavlink: Incorporate changes in UTM_GLOBAL_POSITION message 2018-11-22 16:55:30 +01:00
Michael Schaeuble a154282fef Mavlink: Use UUID for identifier in UTM_GLOBAL_POSITION 2018-11-22 16:55:30 +01:00
Michael Schaeuble 33a9eb946a Mavlink: Reduce rate of UTM_GLOBAL_POSITION stream 2018-11-22 16:55:30 +01:00
Michael Schaeuble fa4156c3d0 Mavlink: Include UTM_DATA_AVAIL_FLAGS_*_VELO_AVAILABLE flag 2018-11-22 16:55:30 +01:00
Michael Schaeuble ae4654f36a Mavlink: Include new UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE flag 2018-11-22 16:55:30 +01:00
Michael Schaeuble 15439fcc0b Mavlink: Add UTM_GLOBAL_POSITION stream 2018-11-22 16:55:30 +01:00
Michael Schaeuble 30dbfd99fb EKF: Estimate WGS84 altitude with filtered AMSL offset 2018-11-22 16:55:30 +01:00
Roman Bapst 90bfdb6f0a VTOL rate control architecture improvements (#10819)
* attitude and rate setpoint message: use 3D array for thrust demand
* FixedWingAttitudeControl: rework airspeed scaling
  * move airspeed and scaling calculation into separate method
  * if vtol in hover and airspeed disabled use minimum airspeed instead of trim airspeed
2018-11-21 20:32:40 -05:00
Daniel Agar 75c1396ed7 cmake sitl_tests silence debug message 2018-11-21 18:13:21 +01:00
Matthias Grob 919a508935 appveyor: run make test also on Windows CI 2018-11-21 14:25:11 +01:00
Matthias Grob be16baaa3c sitl_tests: exclude uorb test from Windows build
Because it was always failing from the beginning on and
we want to make sure no other tests break in the meantime
by running the currently passing tests also on Windows CI.
2018-11-21 14:25:11 +01:00
TSC21 e3af000fdb init.d-posix: make 1013_iris_vision independent of 1010_iris_opt_flow 2018-11-21 12:21:16 +01:00
TSC21 dcdddacdb2 init.d-posix: vision: set the appropriate parameters 2018-11-21 12:21:16 +01:00
TSC21 adc81aaab5 position_estimator_inav: fix covariance check logic 2018-11-21 12:21:16 +01:00
TSC21 20b3adebf4 attitude_estimator_q_main: remove epsilon comparison; fix logic 2018-11-21 12:21:16 +01:00
Daniel Agar 8566b6b53e AV-X increase logger buffer 2018-11-21 09:13:40 +01:00
PX4 Build Bot 7d54913f80 Update submodule matrix to latest Wed Nov 21 00:38:27 UTC 2018
- matrix in PX4/Firmware (4005de7b9600db8a310d52f9bf7a47a0019868d8): https://github.com/PX4/Matrix/commit/0d3bff5e006cfaa358b51e3a6d11984e3782a90e
    - matrix current upstream: https://github.com/PX4/Matrix/commit/9c0acfba36a928b7b002eea3a9dca54a5a0c1250
    - Changes: https://github.com/PX4/Matrix/compare/0d3bff5e006cfaa358b51e3a6d11984e3782a90e...9c0acfba36a928b7b002eea3a9dca54a5a0c1250

    9c0acfb 2018-11-20 Matthias Grob - Matrix: remove unsafe copyToRaw method
2018-11-20 20:35:15 -05:00
Daniel Agar 528b794841 Update submodule mavlink v2.0 to latest Wed Nov 21 00:38:04 UTC 2018
- mavlink v2.0 in PX4/Firmware (14b8108caabb99d1bad2daef31ac51fc061b3691): https://github.com/mavlink/c_library_v2/commit/408a7bedf3074bcae265ea0ce8ec5bb3519ed272
    - mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/6203e2b64395cfa416b9321f633bc3256a79f722
    - Changes: https://github.com/mavlink/c_library_v2/compare/408a7bedf3074bcae265ea0ce8ec5bb3519ed272...6203e2b64395cfa416b9321f633bc3256a79f722
2018-11-20 20:34:27 -05:00
PX4 Build Bot 68bd878877 Update submodule sitl_gazebo to latest Wed Nov 21 00:37:52 UTC 2018
- sitl_gazebo in PX4/Firmware (560a9b45ed): https://github.com/PX4/sitl_gazebo/commit/3d80f63562c24c1537e1f8423ce649c99ebc15ea
    - sitl_gazebo current upstream: https://github.com/PX4/sitl_gazebo/commit/2adc86b5bf84543091470966caf33c3b4f3ee666
    - Changes: https://github.com/PX4/sitl_gazebo/compare/3d80f63562c24c1537e1f8423ce649c99ebc15ea...2adc86b5bf84543091470966caf33c3b4f3ee666

    2adc86b 2018-11-14 Elia Tarasov - add max value for wind and wind gust means
fb20a36 2018-11-14 Elia Tarasov - add normal gaussian distribution to wind gust force and direction
bd5ce12 2018-11-14 Elia Tarasov - add normal gaussian distribution to wind force and direction
913c094 2018-11-07 Jacob Schloss - reverse order of test
7d08ef5 2018-11-07 Jacob Schloss - fall back to only enabling up to c++14 on old cmake
0fd93b0 2018-11-07 Jacob Schloss - set CMAKE_CXX_STANDARD so cmake does not append a defualt language standard
2018-11-20 20:33:13 -05:00
Eric Babyak 560a9b45ed Fix for initializing Landing Target Estimator in SITL 2018-11-20 18:16:45 +01:00
Julian Oes 62188f6151 px_romfs_pruner.py: PEP8 and comments fixes 2018-11-20 15:16:54 +01:00
Julian Oes 177d14c8ea px_romfs_pruner.py: remove deprecation warning
The open flag `U` causes a deprecation warning starting with Python 3.4.
The option to open all kinds of newlines as `\n` has been replaced with
the argument `newline=None`. However, this argument is not available for
Python 2 unless we use `io.open` instead of `open`.
2018-11-20 15:16:54 +01:00
Beat Küng 1e17a86a39 collisionprevention: fix typo in param description & minor code style 2018-11-20 14:14:13 +01:00
baumanta 053494c535 use only one parameter and enable parameter change in flight. clean up code 2018-11-20 14:11:33 +01:00
baumanta efa7e0ba77 clean up 2018-11-20 14:11:33 +01:00
baumanta f5369db245 Put parameters inside library. Get rid of unnecessary activation logic 2018-11-20 14:11:33 +01:00
baumanta dd45fa6541 change feature name from CollisionAvoidance to CollisionPrevention 2018-11-20 14:11:33 +01:00
baumanta f611eddadd unadvertise publishers in the destructor 2018-11-20 14:11:33 +01:00
Matthias Grob 81ec6c5b1e ColisionAvoidance: move instantiation to FlightTask 2018-11-20 14:11:33 +01:00
Matthias Grob 7e276bc163 CollisionAvoidance: move activation logic to library 2018-11-20 14:11:33 +01:00
baumanta 27dc60a419 Improve comments 2018-11-20 14:11:33 +01:00
baumanta ce7dc85450 Change wrong comment 2018-11-20 14:11:33 +01:00
baumanta db514fe441 Add a collision avoidance library which uses range data 2018-11-20 14:11:33 +01:00
David Sidrane 1d12827408 Commander:Replace color based LED manipulators with logical ones. 2018-11-19 14:32:47 -05:00
David Sidrane fbc143dc55 sitl:Added Logical BOARD specific LED mapping
Define the logical LED that are uses on sitl
2018-11-19 14:32:47 -05:00
David Sidrane 05ea187b1d px4nucleoF767ZI-v1:Added Logical BOARD specific LED mapping
Define the logical LED that are uses on px4nucleoF767ZI-v1
2018-11-19 14:32:47 -05:00
David Sidrane b37675fa76 px4fmu-v5:Added Logical BOARD specific LED mapping
Define the logical LED that are uses on px4fmu-v5
2018-11-19 14:32:47 -05:00
David Sidrane 26026b5d39 px4fmu-v4pro:Added Logical BOARD specific LED mapping
Define the logical LED that are uses on px4fmu-v4pro
2018-11-19 14:32:47 -05:00
David Sidrane 735830a483 px4fmu-v4:Added Logical BOARD specific LED mapping
Define the logical LED that are uses on px4fmu-v4
2018-11-19 14:32:47 -05:00
David Sidrane 90106c1fd2 px4fmu-v2:Added Logical BOARD specific LED mapping
Define the logical LED that are uses on px4fmu-v2
2018-11-19 14:32:47 -05:00
David Sidrane e40a0839e9 px4-stm32f4discovery:Added Logical BOARD specific LED mapping
Define the logical LED that are uses on px4-stm32f4discovery
2018-11-19 14:32:47 -05:00
David Sidrane 03aae61395 px4-same70xplained-v1:Added Logical BOARD specific LED mapping
Define the logical LED that are uses on px4-same70xplained-v1
2018-11-19 14:32:47 -05:00
David Sidrane 42a8a6ffac omnibus-f4sd:Added Logical BOARD specific LED mapping
Define the logical LED that are uses on omnibus-f4sd
2018-11-19 14:32:47 -05:00
David Sidrane 1da0021be9 nxphlite-v3:Added Logical BOARD specific LED mapping
Define the logical LED that are uses on nxphlite-v3
2018-11-19 14:32:47 -05:00
David Sidrane a12f26aee0 mindpx-v2:Added Logical BOARD specific LED mapping
Define the logical LED that are uses on mindpx-v2
2018-11-19 14:32:47 -05:00
David Sidrane 3c6539257f crazyflie:Added Logical BOARD specific LED mapping
Define the logical LED that are uses on crazyflie
2018-11-19 14:32:47 -05:00
David Sidrane e960978296 auav-x21:Added Logical BOARD specific LED mapping
Define the logical LED that are uses on auav-x21
2018-11-19 14:32:47 -05:00
David Sidrane aa30560d68 aerofc-v1:Added Logical BOARD specific LED mapping
Define the logical LED that are uses on aerofc-v1
2018-11-19 14:32:47 -05:00
David Sidrane 96ba6c1174 sitl led:Support logical LED operations in commander
add support for all the LEDS to support
   BOARD_HAS_CONTROL_STATUS_LEDS
2018-11-19 14:32:47 -05:00
David Sidrane 0a1dd24af6 omnibus-f4sd:led clean up code and prevent out of bounds indexing 2018-11-19 14:32:47 -05:00
David Sidrane dc29820bd9 Document the LED colors used 2018-11-19 14:32:47 -05:00
David Sidrane 98394afcc7 board common:Define default CONTROL_STATUS LED mapping
This commit is the groundwork to fix the power LED
   blinking on V5

   Background:
   ----------
   Early boards only had an AMBER LED that was used to
   indicate a High Load condition.

   This change defines the new logical inteface
   the LED_<color> should not be used in application
   code moving forward, only the minipulator macros
   should be used.

       Logical usage             Legacy default
      ------------------------+-------------
       BOARD_OVERLOAD_LED     | LED_RED

   Later boards defined BOARD_HAS_CONTROL_STATUS_LEDS
   and added the use of a BLUE and GREEN LED that were
   used as follows:

   Logical usage             Legacy default
      ------------------------+-------------
       BOARD_ARMED_LED        | LED_BLUE
       BOARD_ARMED_STATE_LED  | LED_GREEN

   With this PR a board may now define _only_ a subset
   the leds and map them at the board level to the
   color LED it wants to use.

       Logical usage             Legacy default
      ------------------------+-------------
       BOARD_OVERLOAD_LED     | LED_RED
    when BOARD_HAS_CONTROL_STATUS_LEDS is defined
       BOARD_ARMED_LED        | LED_BLUE
       BOARD_ARMED_STATE_LED  | LED_GREEN

   If any of the BOARD_{OVERLOAD|ARMED|ARMED_STATE}_LED are not
   defined. The code output generates a null action for that
   LED.
2018-11-19 14:32:47 -05:00
Daniel Agar bba475aca1 logger limit trajectory_setpoint rate 2018-11-19 09:59:22 -05:00
Daniel Agar 26bac9594f add simple SITL shutdown test 2018-11-16 16:43:19 -05:00
Daniel Agar 48ba88eaf0 pwm_out_sim add mixer saturation status publication (#10866) 2018-11-16 16:42:20 -05:00
Paul Riseborough 3ee596284d ecl: Magnetic declination use improvements
Fixes bugs causing learned or GEO lookup declination to not be used in some circumstances.

https://github.com/PX4/ecl/pull/518
https://github.com/PX4/ecl/pull/520
2018-11-16 10:25:59 -05:00
Matthias Grob 8090734fe1 appveyor: switch cache to the entire PX4 folder
to save the time running the installer for every build
which was necessary before because the folder exceedes
the maximum of 1GB cache of the appveyor free plan
2018-11-16 10:19:58 -05:00
Daniel Agar 30fe079844 qurt px4_layer fix style 2018-11-16 09:53:28 -05:00
Daniel Agar 4278dd8fb4 posix px4_layer fix style 2018-11-16 09:53:28 -05:00
TSC21 05d9932f6c logger: limit vehicle_*_odometry topics to 30hz on default logging 2018-11-16 09:44:32 +01:00
TSC21 2c111222cf logger: fix vision topics naming 2018-11-16 09:44:32 +01:00
dkang 4901f8a1dc add execption check after malloc 2018-11-16 08:15:26 +01:00
bresch 7779c0bd69 MPC - Update velocity integrator definition 2018-11-15 22:08:00 +01:00
bresch d852ce20e6 MPC - Increase max velocity integral gain to 3.0 2018-11-15 22:08:00 +01:00
bresch 0863e95a2c Add "Tracking Anti-Reset Windup" in velocity PID controller 2018-11-15 22:08:00 +01:00
Daniel Agar 88f6271061 Jenkins add tests on MacOS 2018-11-15 20:52:48 +01:00
Daniel Agar c2e0368370 Update submodule Mavlink v2.0 to latest Thu Nov 15 00:37:24 UTC 2018
- mavlink v2.0 in PX4/Firmware (0b3f4014bf751cde2a08abb578c10ae5606404b1): https://github.com/mavlink/c_library_v2/commit/32dcf73bb24516dc0d52119e624fda8987a03f62
 - mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/408a7bedf3074bcae265ea0ce8ec5bb3519ed272
    - Changes: https://github.com/mavlink/c_library_v2/compare/32dcf73bb24516dc0d52119e624fda8987a03f62...408a7bedf3074bcae265ea0ce8ec5bb3519ed272

408a7be 2018-11-13 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/f3e60ba1ca9c458364cc9538499a1335aa2feb5e
c18232f 2018-11-12 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/2c52b06e125f88f6b674db112f127dc35d7a9c71
49a94c7 2018-11-09 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/c788ca3e143fbb0fd1f90a14fd2a473673b50973
0c4b296 2018-10-29 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/387c0fd71547d71f1e89578c8ef78c6bac8d6094
40bfa6c 2018-10-29 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/4590822ebde2a5737504c832669d74310afa4b8e
ad2c30b 2018-10-26 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/38ecb35a3e3e6702b5522ac33188a53cc1fe698e
9fbf059 2018-10-24 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/30b63eb0c20160ddeeca3eef4238f370d3f3d43f
7915ad4 2018-10-23 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/2c6a8807b85317275c9d027afba7f646eb7db961
4371e84 2018-10-23 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/573e35231804ad775796472bcdcd331b4479cf4d
d67e172 2018-10-22 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/40f83b2d4ff43fa65d08bb5ebeb9186dc2e8c2a6
852935c 2018-10-16 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/d683ddc28b1254ea8645dd2a18e5765b6bab0eba
2018-11-14 20:43:53 -05:00
Mara Bos c882ca9389 On Posix: Don't shutdown (half) the connection from the client.
This triggered POLLHUP too early on Mac.
2018-11-14 17:36:29 +01:00
Julian Oes d7c34ddee4 mavlink: fix yawing to North for LOITER_TIME (#10828)
* mavlink: yaw should wrap at 2 pi, not pi
* mavlink: use newer rad/deg conversion
2018-11-13 14:32:40 -05:00
Mara Bos 9594ebf72e Use unix sockets instead of pipes for posix daemon. (#10766)
Unlike pipes, unix sockets provide bi-directional
communication with each connected client.

- No need to generate a unique uuid per client anymore.

- The client doesn't have to create its own pipe anymore.

- Since there is no risk of multiple client's writes getting mixed up,
  messages don't need to fit in a single write anymore, removing the
  limit on command length.

- Since the server can detect a connection closing, the client no longer
  needs to handle signals. When the client is killed, the connection is
  automatically closed, which will cause the server to kill the related
  px4 thread.
  Since this does not rely on handling signals and the client sending an
  additional message, this is much more reliable.

- Client is no longer a singleton.

- The protocol is simplified. Standard output is directly written to the
  socket back to the client, without wrapping it in any protocol
  message.

- Because of the simple protocol, one could now even use netcat to run a
  px4 command:

    $ echo hello | netcat -UN /tmp/px4-sock-0

Also removes a few race conditions.
2018-11-13 14:31:22 -05:00
Hamish Willee 9379c010f1 TRAJECTORY message renamed 2018-11-13 12:13:01 -05:00
Beat Küng 9a9c17b979 vehicle_attitude_setpoint: add comment that attitude sp angles can be NaN for FW 2018-11-13 09:30:18 +01:00
Beat Küng b3afa6ddac mc_pos_control: fix task activation failure for Transition 2018-11-13 09:30:18 +01:00
Beat Küng 330941c1fc FlightTaskManualAltitude: initialze yaw setpoint with NAN
Also update some comments.

In case we activate the task and don't have a locked yaw, we should
initialize the yaw setpoint with NAN to avoid any abrupt changes.
2018-11-13 09:30:18 +01:00
Beat Küng 2b7d3bd088 flight tasks: move weather vane yaw handler from Altitude to Position task 2018-11-13 09:30:18 +01:00
Beat Küng c9e52d4386 MPC_MAN_TILT_MAX: increase max limit from 90 to 180 degrees
This is especially useful for testing (the vehicle must behave correctly
even at high tilt angles).
2018-11-13 09:30:18 +01:00
Beat Küng adf1fea554 mc_att_control: fix for Rattitude mode
When switching back from rate to attitude control, the code depended on a
vehicle_control_mode topics update, but the publication frequency of that
is low. So the switch was noticeably delayed.
2018-11-13 09:30:18 +01:00
Beat Küng 36ee0297ee FlightTask.hpp: minor code cleanup 2018-11-13 09:30:18 +01:00
Beat Küng ca7acae904 mc stabilized mode: move from mc_pos_control to mc_att_control
- better in terms of dependencies:
  - the position controller code depended on position topics for yaw
  - mc_pos_control does not have to be run for Stabilized mode
- the code path is much simpler, and thus less error prone. This is
  especially important since Stabilized is often used as a fail-safe flight
  mode.
2018-11-13 09:30:18 +01:00
Beat Küng f31f63fff7 mc_att_control: use orb_publish_auto
use nullptr for instance to make sure we always get the first instance.
2018-11-13 09:30:18 +01:00
Beat Küng 00c2086dd6 mc_pos_control: simplify weathervane logic 2018-11-13 09:30:18 +01:00
Beat Küng 1946f043f1 mc_pos_control: print active flight task for 'mc_pos_control status' cmd 2018-11-13 09:30:18 +01:00
Beat Küng e7e06dfe38 fix mc_pos_control: disable flight tasks if none of them should be running
Previously when switching e.g. from stabilized from acro, the stabilized
flight task kept running and publishing setpoints.
Luckily it caused no problems, but the log showed arbitrary attitude
setpoints.
2018-11-13 09:30:18 +01:00
bresch f590137525 Fix HIL
Revert "pwm_out_sim lazily publish actuator_outputs"

This reverts commit bcad940a9f.
2018-11-12 19:21:15 +01:00
Daniel Agar 4e2bf27da6 FlightTaskAuto set WaypointType from position setpoint types 2018-11-11 10:21:41 -05:00
Daniel Agar 246b879aea require MODULE_NAME 2018-11-10 13:52:34 -05:00
David Sidrane 8d15da379b nxphlite-v3:Add HolyBro GPS on I2C 2 using ist8310 2018-11-09 15:04:51 -05:00
Beat Küng e91db7b4d2 uORBDeviceNode: move flags from SubscriberData to UpdateIntervalData
As there is only one bit used in 'flags', and it is only used in case
update_interval is not null, we can move the bit to UpdateIntervalData.

The size of UpdateIntervalData does not increase (on 32 bit).

Reduces RAM usage by 3.6KB (tested on a Pixracer).
2018-11-07 19:45:53 +08:00
bresch 90cee2d5ea Manual Smoth Vel - Override reActivate to not reset Z axis (prevented takeoff) 2018-11-06 22:17:00 +01:00
bresch c3a4fff0cd Auto traj - generate heading from trajectory velocity vector if possible 2018-11-06 22:17:00 +01:00
bresch 066d1f50c4 Auto traj - Add dedicated parameter to enable trajectory smoothing in auto mode only 2018-11-06 22:17:00 +01:00
bresch 7205e8f359 Auto traj - Add Trajectory logging
- move the update after the integration: a new computed jerk has an impact at the next epoch only
- add jerk reduction in case of too large integration time: when a jerk of "min_jerk" during dt is too much
- add jerk reduction if the integration time is larger than the predicted one and that integrating that jerk would lead to an acceleration overshoot
- rename some variables
2018-11-06 22:17:00 +01:00
bresch 2847ce20b8 Auto traj - Add parameter for gain of trajectory controller 2018-11-06 22:17:00 +01:00
bresch 2c63388fb7 Auto Traj - Disable reActivate "reset" function for AutoLineSmoothVel Flight Task 2018-11-06 22:17:00 +01:00
bresch 0209fa00bf Auto Smooth Vel - Add AutoMapper2 and AutoLineSmoothVel flight tasks 2018-11-06 22:17:00 +01:00
bresch 67c0846068 Vel smooth - Improve position lock/unlock detection 2018-11-06 22:17:00 +01:00
bresch d9edcfdc06 Trajectory - format style 2018-11-06 22:17:00 +01:00
bresch aa586ca327 Trajectory - Overload integrate function to allow for custom integration period 2018-11-06 22:17:00 +01:00
bresch 7073187a48 Trajectory - Add getters for current position and velocity. Move some getters to public section 2018-11-06 22:17:00 +01:00
bresch 6a7ce651bc Trajectory - Add position lock-unlock logic and proper initialization from controller feedback 2018-11-06 22:17:00 +01:00
bresch 84665672ad Vel smooth - Change jerk scheduling strategy 2018-11-06 22:17:00 +01:00
bresch ab7e4436b3 Vel smooth - Add Z trajectory 2018-11-06 22:17:00 +01:00
Beat Küng 787d82c9e6 VelocitySmoothing: simplify the API & fix style 2018-11-06 22:17:00 +01:00
bresch 4f668c0c2d SITL - update default velocity PID gains 2018-11-06 22:17:00 +01:00
Beat Küng d8cb6bb834 mc_pos_control_params: update jerk params (limits + defaults + description) 2018-11-06 22:17:00 +01:00
bresch 22780efcd0 Trajectory - Add time synchronization between trajectories. Split update(...) function into updateDurations(...) and integrate(...) to be able to insert time synchronization in between. 2018-11-06 22:17:00 +01:00
Beat Küng 86463e4ec7 Flight Tasks: add new trajectory smoothing flight task & library
Derivation by Mathieu Bresciani:
https://github.com/Auterion/trajectory_generator
2018-11-06 22:17:00 +01:00
Roman deed462e62 tiltrotor back-transition improvements:
- do not set zero throttle during the entire back-transition because otherwise
we need to make the back-transition really short
- added ramping up of throttle setpoint during backtransition to avoid
step inputs
- back-transition ends after back-transition time and not when motors are fully
rotated updwards. previously the vehicle would enter hover mode at high speed
which was not handled well by the mc position controller

Signed-off-by: Roman <bapstroman@gmail.com>
2018-11-06 22:10:38 +01:00
James Goppert c642025339 vehicle_attitude only based yaw control fix (#10803)
* Add attitude sub to mc_pos_control for yaw usage.

* Initialize pos control _states struct.

* Remove unnecessary init for struct in mc pos ctrl.

* Only use att topic for yaw setting in FlightTask.
2018-11-06 12:03:13 -05:00
Roman 40884a9238 FlightTaskTransition: added missing override
Signed-off-by: Roman <bapstroman@gmail.com>
2018-11-07 00:13:43 +08:00
Roman 50724bce86 mc_pos_control: support VTOL transitions again
Signed-off-by: Roman <bapstroman@gmail.com>
2018-11-07 00:13:43 +08:00
Roman fea309b606 added a flighttask for automatic vtol transitions
Signed-off-by: Roman <bapstroman@gmail.com>
2018-11-07 00:13:43 +08:00
Beat Küng df559f3042 logger: unlock the mutex for fsync & call fsync only when backend is running
- fsync can be a long blocking operation, so we need to make sure the main
  logger thread does not block during this time, when it tries to aquire
  the mutex
- fixes calling fsync on an invalid file descriptor
2018-11-07 00:08:23 +08:00
Daniel Agar 7caf9803ed delete unimplemented SENSORIOCRESET IOCTL 2018-11-06 07:43:43 +08:00
Daniel Agar b0caea9edc mpu9250 remove interface IOCTLs 2018-11-06 07:43:43 +08:00
Daniel Agar e164281a2e mpu6000 remove interface IOCTLs 2018-11-06 07:43:43 +08:00
Daniel Agar dd0baaee91 delete IOCTL SENSORIOCSQUEUEDEPTH
- only used in test routines
2018-11-06 07:43:43 +08:00
Daniel Agar d2ed091a1d delete IOCTL SENSOR_POLLRATE_MAX
- only SENSOR_POLLRATE_DEFAULT is needed
2018-11-06 07:43:43 +08:00
Daniel Agar 556a9422b5 delete IOCTL SENSOR_POLLRATE_MANUAL
- only used in self tests
2018-11-06 07:43:43 +08:00
Daniel Agar 8dfd55fc9e delete unused IOCTL SENSORIOCGPOLLRATE 2018-11-06 07:43:43 +08:00
Daniel Agar 9cd3e3d1cf distance sensors delete unused IOCTL SENSORIOCSQUEUEDEPTH 2018-11-06 07:43:43 +08:00
Daniel Agar ac04db6084 delete unnecessary drv_px4flow.h 2018-11-06 07:43:43 +08:00
Daniel Agar d76155107c delete unused IOCTL MAGIOCGRANGE 2018-11-06 07:43:43 +08:00
Daniel Agar 0ea18b2b73 delete unused IOCTL MAGIOCGSAMPLERATE 2018-11-06 07:43:43 +08:00
Daniel Agar 60a40ec131 delete unused IOCTL MAGIOCSSAMPLERATE 2018-11-06 07:43:43 +08:00
Daniel Agar 04972d196a delete unused IOCTL MAGIOCTYPE 2018-11-06 07:43:43 +08:00
Daniel Agar 114b471675 delete unnecessary drv_iridiumsbd.h 2018-11-06 07:43:43 +08:00
Daniel Agar 1f2cb8740a delete unnecessary drv_irlock.h 2018-11-06 07:43:43 +08:00
Daniel Agar 76a6cd10b1 delete unnecessary drv_gps.h 2018-11-06 07:43:43 +08:00
Daniel Agar 571364c617 delete baro_report (alias for sensor_baro_s) 2018-11-06 07:43:43 +08:00
Daniel Agar 85c2b6307c delete unused IOCTL AIRSPEEDIOCGSCALE 2018-11-06 07:43:43 +08:00
Daniel Agar acc24da0c2 delete gyro_report (alias for sensor_gyro_s) 2018-11-06 07:43:43 +08:00
Daniel Agar 42f9aa6e43 delete drv_gyro.h GYROx_DEVICE_PATH 2018-11-06 07:43:43 +08:00
Daniel Agar aaf1667b09 delete unused GYRO_SAMPLERATE_DEFAULT 2018-11-06 07:43:43 +08:00
Daniel Agar 3daf37433e delete unused IOCTL GYROIOCSSAMPLERATE 2018-11-06 07:43:43 +08:00
Daniel Agar 60c14fe8f1 delete unused IOCTL GYROIOCGSAMPLERATE 2018-11-06 07:43:43 +08:00
Daniel Agar 0d67050089 delete unused IOCTL GYROIOCTYPE 2018-11-06 07:43:43 +08:00
Daniel Agar ef65e5267a delete unused IOCTL GYROIOCGRANGE 2018-11-06 07:43:43 +08:00
Daniel Agar 068dcb37df delete unused IOCTL GYROIOCSRANGE 2018-11-06 07:43:43 +08:00
Daniel Agar aaf0b6fb5c delete unused IOCTL GYROIOCGSCALE 2018-11-06 07:43:43 +08:00
Daniel Agar f21f1a1357 delete drv_accel.h ACCELx_DEVICE_PATH 2018-11-06 07:43:43 +08:00
Daniel Agar 2a83a40491 delete accel_report (alias for sensor_accel_s) 2018-11-06 07:43:43 +08:00
Daniel Agar 22c9fb7290 delete unused IOCTL ACCELIOCGEXTERNAL 2018-11-06 07:43:43 +08:00
Daniel Agar e759e0e1a5 delete unused IOCTLs ACCELIOCSSAMPLERATE and ACCEL_SAMPLERATE_DEFAULT 2018-11-06 07:43:43 +08:00
Daniel Agar eddbd3fc4b delete unused IOCTL ACCELIOCTYPE 2018-11-06 07:43:43 +08:00
Daniel Agar 77abcab46f delete unused IOCTL ACCELIOCGRANGE 2018-11-06 07:43:43 +08:00
Daniel Agar 5d3d120705 delete unused IOCTL ACCELIOCSRANGE 2018-11-06 07:43:43 +08:00
Daniel Agar b0c3e12139 delete unused IOCTL ACCELIOCGSCALE 2018-11-06 07:43:43 +08:00
Daniel Agar 8ad59160c9 delete unused IOCTL ACCELIOCGSAMPLERATE 2018-11-06 07:43:43 +08:00
Daniel Agar f59f0d4b2d delete unused IOCTL SENSOR_POLLRATE_EXTERNAL 2018-11-06 07:43:43 +08:00
Dennis Mannhart 3b92d49b64 replace + with && 2018-11-05 21:54:19 +01:00
Dennis Mannhart 6a0a9c92fb PositionControl:
- set integral states and setpoint of reference state to 0
- set thrust to NAN if it will be computed from position and velocity control
2018-11-05 21:54:19 +01:00
Martina 44aa33be09 obstacle_distance: update distances description according to latest obstacle_distance mavlink message 2018-11-05 15:25:58 +01:00
Daniel Agar e3388ec1d6 px4fmu-v2_default disable pwm_input 2018-11-02 16:09:43 +01:00
Daniel Agar 1376e9a39e px4fmu-v2_default disable ms5525 2018-11-02 16:09:43 +01:00
Nuno Marques bba59ca067 RTPS topics: temporarly reduce the number of topics being used to send and receive (#10800) 2018-11-01 19:21:42 -04:00
Jake Dahl 387d6ffbc1 This work should be complete. Waiting for Alex to validate config settings 2018-11-01 10:49:26 -04:00
Jake Dahl e6f9caccf4 removed batt_smbus from uorb_graph create.py 2018-11-01 10:49:26 -04:00
Jake Dahl 27c6432757 added unseal() and seal() around write_flash() for enabling/disabling cell undervoltage, we found out today this wasn't being written because that address is in protected flash 2018-11-01 10:49:26 -04:00
Jake Dahl 5dbb34c841 added other bus options to the documentation 2018-11-01 10:49:26 -04:00
Jake Dahl bd807f4db2 took care of minor clang-tidy complaints 2018-11-01 10:49:26 -04:00
Jake Dahl 69b59b9d63 commented out something causing trouble with CI, it is in an unused function but I'd like to keep the comment there as a reference for future development effort 2018-11-01 10:49:26 -04:00
Jake Dahl 6ba78858e3 changed variable name 2018-11-01 10:49:26 -04:00
Jake Dahl 7fb73ae2c0 made init() a public function in posix I2C 2018-11-01 10:49:26 -04:00
Jake Dahl 7c3f1d448a trimmed includes, house keeping 2018-11-01 10:49:26 -04:00
Jake Dahl 2e732b9c0b removed unneeded file, some more clean up 2018-11-01 10:49:26 -04:00
Jake Dahl f8b9217750 batt_smbus rework 2018-11-01 10:49:26 -04:00
Jake Dahl d71fc31d8b added an SMBus base class 2018-11-01 10:49:26 -04:00
hdiethelm 33422700de lis3mdl: fix handling when multiple sensors are available (#10753)
* lis3mdl: Report calibration successful when starting with -C option
* lis3mdl: Use PX4_OK, PX4_ERROR for return value / orb_unadvertise
* Fixes #10740
2018-11-01 10:44:41 -04:00
Thunder 662c206ceb fix ControlMath.cpp mathematical derivation error (#10796) 2018-11-01 10:13:59 -04:00
Julian Oes 428c2f72bd mavlink: always acknowledge a param write
This change has two effects:
1. We always acknowledge a param write no matter if the value was
   actually changed or not. This is according to the spec:
   https://mavlink.io/en/services/parameter.html#write-parameters
2. This fixes the bug where int32 parameters were not actually acked
   because the memory of the param value was casted directly to float
   and then compared. In the case of a int32 parameter set from 0 to 1
   it would mean that the cast to float of the memory representation
   was still 0 and therefore it was assumed to be "no change" and the
   ack was omitted.
2018-11-01 00:06:22 +01:00
Jake Dahl 118e5d9607 set feedforward to zero, was set inappropriately 2018-11-01 00:05:10 +01:00
Jake Dahl b01849ce56 fixed a problem where the heater was getting stuck on. This was due to the next on time being calculated as a negative time, thus causing it to not get rescheduled in the work_queue. Also removed some includes in the header file 2018-11-01 00:05:10 +01:00
Beat Küng 52fc56a61f gps: explicitly set SPI bus speed to 1MHz
Required on RPi, the default seems to be too high.
2018-10-30 20:36:25 -04:00
Beat Küng bec43b0b28 mc_att_control: run rate controller first and increase fmu prio by one
The rate controller is now run directly after a gyro publication, and
as soon as it publishes the actuator controls, the output driver (fmu/...)
runs.

Test on a Pixracer:
Reduces fmu control latency from 219us to 134us.
If we run the rate controller last (same order as before, just increase
the prio), the latency is 201us.

CPU load is unchanged.

The drawback is that the attitude to rate setpoint generation is delayed
by one cycle (4ms), but it will be reduced to 1ms as soon as we run at
1kHz.
2018-10-30 20:20:25 -04:00
Beat Küng 95cc6a06f3 mc_att_control: separate attitude controller from rate controller update
This will allow to run the rate controller faster than the attitude
controller.
2018-10-30 20:20:25 -04:00
Beat Küng fc997dd0d5 mc_att_control: reduce minimum required dt
2ms is not enough to run at 1kHz
2018-10-30 20:20:25 -04:00
Beat Küng d552c2a362 refactor mc_att_control: move publications into separate methods
improves readability & reduces duplicated code
2018-10-30 20:20:25 -04:00
David Sidrane 71f809a20c px4_micro_hal:Add STM32 stm32_gpiosetevent 2018-10-30 19:29:15 -04:00
Hamish Willee 44f650fdc9 Add additional info to FW_LND_USETER (#10777) 2018-10-30 10:14:52 -04:00
Daniel Agar cf4b19d153 delete unused FMU_pass mixer 2018-10-30 09:18:39 -04:00
Lukas Woodtli a7d297ed57 Fix division by zero and cast of to big floats to int 2018-10-28 16:54:36 +01:00
Lukas Woodtli 6caf0d114d Fix division by zero and cast of too big floats to int 2018-10-28 16:54:36 +01:00
Mara Bos 96a33d1afc Enable __attribute__((format)) on px4 logging functions.
This makes the compiler warn about invalid format strings.
2018-10-27 12:44:51 +02:00
Mara Bos 10c20b38ad Fix many format strings.
Fixes these invalid format strings:
- A `%d` for a pointer (replaced it by `%p`)
- A 0x%08x (and a 0x%0x8!) for a pointer (replaced by %p)
- 2 cases of `%d` for a `ssize_t` (replaced it by `%zi`)
- 1 case of a %u for an `int` (replaced by %i)
- 3 cases of %d for a `long` (replaced by %ld)
- 19 cases of `%d`, `%i`, `%u` or `%lu` for a `size_t` (replaced it by `%zu`)
- An unused formatting argument (removed it)
- A missing `%d` (added it)
- A missing `%s` (added it)
- 2 cases of `%llu` for a `uint64_t` (replaced it by `"%" PRIu64`)
- 6 cases of giving a string directly as format string (replaced it by `("%s", string)`)
- 2 cases of %*-s, which should probably have been %-*s.
  (Looks like NuttX accepts (the invalid) %*-s, but other platforms don't.)
- A %04x for a `uint32_t` (replaced by "%04" PRIx32)
2018-10-27 12:44:51 +02:00
Beat Küng dc62454f0a px4fmu-v2_default: disable sf1xx distance sensor
Due to limited flash space
2018-10-26 08:02:42 +02:00
Beat Küng db7cbf1770 aerofc, crazyflie, omnibus: remove vtol module 2018-10-26 08:02:42 +02:00
Beat Küng 86673ecfcb navigator: remove dependency on vtol module by using the C param API
This is the quickest way to achieve the desired result.
Long-term we might do something else.
2018-10-26 08:02:42 +02:00
Beat Küng ee5c18a737 SDLOG_MISSION param: update description 2018-10-26 08:02:42 +02:00
Beat Küng c5d8abff00 log_writer_file: rename argument to avoid shadowing warning 2018-10-26 08:02:42 +02:00
Beat Küng 2642915a76 logger: enable mission log by default
To get it field-tested. This can be reverted for a release...
2018-10-26 08:02:42 +02:00
Beat Küng 3a462c2ba7 refactor logger: move debug buffer printf into separate method (DBGPRINT) 2018-10-26 08:02:42 +02:00
Beat Küng 234ec7f2a2 logger: add mission log to frontend, configurable via SDLOG_MISSION
- mission logs are stored in a separate directory mission_log
- It's disabled by default
- Does not increase RAM usage if disabled (if enabled, only 300 bytes)
- Log rotate does not apply to the mission logs
2018-10-26 08:02:42 +02:00
Beat Küng 4fc1c5c4f5 LogWriterFile: split long header messages that exceed the buffer length
Some message formats are longer than the 300 bytes. We can split the writes
because we have to wait until they are written anyway.
2018-10-26 08:02:42 +02:00
Beat Küng 28ac7679e0 logger: change message id from uint16_t to uint8_t
256 subscriptions are enough for now.
Reduces RAM usage by 300 bytes.
2018-10-26 08:02:42 +02:00
Beat Küng d6e820fe67 logger: add mission file to LogWriterFile backend
Not used yet, it should not affect anything, except for slight RAM
increase.
2018-10-26 08:02:42 +02:00
Beat Küng b86c7d2e8f Logger: only write subscribed topic format definitions
Previously the formats of all known uorb messages were written.

- reduces header size by about 13KB
- reduce ulog_message_format_s size to reduce required stack size.
  Largest message format is about 1000 bytes.
2018-10-26 08:02:42 +02:00
Beat Küng 0745ba9052 refactor logger: move some code inside run() into separate methods 2018-10-26 08:02:42 +02:00
Beat Küng 5eafa1b34b refactor logger: move some independent methods into separate util file 2018-10-26 08:02:42 +02:00
Beat Küng b65871b433 fix reposition: set acceptance radius
Previously the acceptance radius was 0, so the FlightTaskAutoLine was
randomly changing yaw and sometimes going into a random direction.
There is still something else wrong in there, but avoids the reposition
problem.
2018-10-25 17:05:27 +02:00
David Sidrane 3e9e55150d px4nucleoF767ZI-v1: use board_hardfault_init API 2018-10-25 07:52:37 +02:00
David Sidrane 0658d4e2e5 px4fmu-v4pro:use board_hardfault_init API 2018-10-25 07:52:37 +02:00
David Sidrane 161288ef71 px4fmu-v4:use board_hardfault_init API 2018-10-25 07:52:37 +02:00
David Sidrane 0cd2d8f4aa px4fmu-v2:use board_hardfault_init API 2018-10-25 07:52:37 +02:00
David Sidrane 9b4b831b22 px4-same70xplained-v1:Does not use hardfault_log 2018-10-25 07:52:37 +02:00
David Sidrane 4cda5513b9 omnibus-f4sd:use board_hardfault_init API and indicate on BLUE LED 2018-10-25 07:52:37 +02:00
David Sidrane e0431911f9 nxphlite-v3:No Support for BBSRAM nor hardfault 2018-10-25 07:52:37 +02:00
David Sidrane 4353476b01 mindpx-v2:use board_hardfault_init API 2018-10-25 07:52:37 +02:00
David Sidrane 365c5d3ea7 crazyflie:use board_hardfault_init API 2018-10-25 07:52:37 +02:00
David Sidrane 082aa81ee9 av-x-v1:use board_hardfault_init API 2018-10-25 07:52:37 +02:00
David Sidrane 1e35fe189a auav-x21:use board_hardfault_init API 2018-10-25 07:52:37 +02:00
David Sidrane 1856c4760d aerocore2:Make sure errors light LED 2018-10-25 07:52:37 +02:00
David Sidrane 68ce4cf11d aerofc-v1:Does not support bbsram no board_hardfault_init 2018-10-25 07:52:37 +02:00
David Sidrane 177251cc21 px4fmu-v5:use common board_hardfault_init 2018-10-25 07:52:37 +02:00
David Sidrane 74695f3cfb stm32:add stm32 and stm32f7 board_hardfault_init 2018-10-25 07:52:37 +02:00
David Sidrane 2f6a297f3d board_common:Add API for hardfault init 2018-10-25 07:52:37 +02:00
Beat Küng 294af5daad LowPassFilter2p: fix _cutoff_freq <= 0 (disabled filter)
If the filter was disabled, the apply() would always return 0.
2018-10-24 20:43:42 +02:00
Daniele Pettenuzzo d2e2b5e8ce add pmw3901 optical flow support for fmu-v5 (#10750) 2018-10-24 10:25:41 -04:00
David Sidrane 99294b2040 fmu:Add Range checking for PWM5 modes 2018-10-23 08:15:28 +02:00
Daniel Agar d832b4fe28 rc.mavlink AV-X reduce companion baudrate 2018-10-23 08:15:11 +02:00
CarlOlsson d0c69efff9 gpio_led: fixed typo 2018-10-22 09:26:06 -04:00
CarlOlsson 6499a4ffc7 board_config: fixed typo 2018-10-22 09:26:06 -04:00
CarlOlsson f15365fe97 process_sensor_data.py: update description 2018-10-22 09:26:06 -04:00
CarlOlsson db4d79358a commander: fix typo 2018-10-22 09:26:06 -04:00
CarlOlsson b85710b194 ekf2: fix typo 2018-10-22 09:26:06 -04:00
CarlOlsson 02a3528f24 commander: fix typo 2018-10-22 09:26:06 -04:00
CarlOlsson c826140c2b commander: update comment to make post takeoff ekf quality test logic more clear 2018-10-22 09:26:06 -04:00
CarlOlsson cd382d8874 voted_sensors_update: fix typo 2018-10-22 09:26:06 -04:00
CarlOlsson 7b0e0de43c ekf2: fix typo 2018-10-22 09:26:06 -04:00
CarlOlsson 6647471238 ekf2: increase maximum of EKF2_MAG_YAWLIM. This is needed on some fw platforms
in order to not constantly switch mag fusion mode in gusty winds.
2018-10-22 09:26:06 -04:00
CarlOlsson 82106cc4c1 fw_l1_control: add underscores to perf for consistency 2018-10-22 09:26:06 -04:00
CarlOlsson e6d378c9aa navigator: fix typo 2018-10-22 09:26:06 -04:00
Daniel Agar 526fa9e9dd uORB remove unnecessary priority from each subscriber 2018-10-20 19:57:08 +02:00
Daniel Agar 297c1b777b mathlib LowPassFilter2p sync with LowPassFilter2pVector3f 2018-10-20 10:34:02 -04:00
Daniel Agar efac6f2807 MC attitude control move to Vector3f LPF 2018-10-20 10:34:02 -04:00
Daniel Agar ac85230700 mathlib: add Vector3f low pass filter 2018-10-20 10:34:02 -04:00
Daniel Agar cc64661791 Update submodule nuttx to latest Sat Oct 20 00:44:04 UTC 2018
- nuttx in PX4/Firmware (31767b6b5aeb4293c2991dbfea6b810e34a34149): https://github.com/PX4/NuttX/commit/999c4357a220d9ea271475e74abd5d8ba080be27
    - nuttx current upstream: https://github.com/PX4/NuttX/commit/166d898c70141d7ddb179b5ead1c5ea726574411
    - Changes: https://github.com/PX4/NuttX/compare/999c4357a220d9ea271475e74abd5d8ba080be27...166d898c70141d7ddb179b5ead1c5ea726574411

166d898 2018-10-18 Daniel Agar - [BACKPORT] Merged in dagar/nuttx/pr-stm32_dma_per_spi (pull request #736)
0a5b1cb 2018-10-17 David Sidrane - [BACKPORT] Lampoo-master-spi-flash (pull request #735)
2018-10-19 21:22:34 -04:00
dakejahl dce4d75f5a TealOne airframe config file (#10713) 2018-10-19 20:27:50 -04:00
David Sidrane 640d10044c NuttX update with i2c Backport 2018-10-19 20:08:01 -04:00
sanderux dea385b2d2 Added geotag_images_ulog.py for enhanced geo-referencing survey images 2018-10-18 16:55:53 -04:00
Daniel Agar 50c879c2d6 land_detector: rover return not landed if disarmed 2018-10-18 12:51:52 -04:00
PX4 Build Bot 7b2418289f Update submodule ecl to latest Thu Oct 18 12:37:31 UTC 2018
- ecl in PX4/Firmware (bd71d1cd9e1e1d29f89351c43f879e6c49b727bc): https://github.com/PX4/ecl/commit/f240eaa5b089c50b957a3ab61aeb722ea57dccd9
    - ecl current upstream: https://github.com/PX4/ecl/commit/10a0fef7b7db749f5baf3384e9c900d3aa0e8140
    - Changes: https://github.com/PX4/ecl/compare/f240eaa5b089c50b957a3ab61aeb722ea57dccd9...10a0fef7b7db749f5baf3384e9c900d3aa0e8140

    10a0fef 2018-10-18 jie.zhang - EKF/control: remove unnecessary yaw_align update
8bbaf89 2018-10-17 Daniel Agar - EKF add new simple setIMUData() interface (#512)
e6cd6ef 2018-09-03 Paul Riseborough - EKF: Fix bug preventing  use of flow sensors without gyros
2c3a064 2018-09-18 Daniel Agar - README.md update Jenkins build status icon and url
2018-10-18 11:16:36 -04:00
Hamish Willee cb8a2b533d Add Plane VTail to image group metadata 2018-10-18 09:56:36 -04:00
Jake Dahl e6d78b89a2 ::write() returns number of bytes written, so I check for not zero as a pass 2018-10-17 12:42:35 -04:00
Jake Dahl cbae32a50a I missed a ::write, stupid jenkins 2018-10-17 12:42:35 -04:00
Jake Dahl edf82d3937 added return values that I check for ::read and ::write 2018-10-17 12:42:35 -04:00
Jake Dahl 39d0e0b80c changed px4_read/write to ::read/write 2018-10-17 12:42:35 -04:00
Jake Dahl 51ffee8137 removed px4_poll, something changed and broke the way I was using it. This has been tested successfully 2018-10-17 12:42:35 -04:00
Daniel Agar 6a7f3615a4 Jenkins auto metadata updates for dev guide, user guide, and QGC 2018-10-17 12:40:15 -04:00
Paul Riseborough 18f0812b33 ecl: Use master with pr-ekfGpsYaw changes merged 2018-10-17 09:48:38 -04:00
Paul Riseborough c8e17719d5 msg: Add heading data to GPS blending output log data 2018-10-17 09:48:38 -04:00
Paul Riseborough 10354f022e ekf2: Allow use of RTK GPS heading 2018-10-17 09:48:38 -04:00
Paul Riseborough e39afb148d drivers: publish GPS antenna heading offset 2018-10-17 09:48:38 -04:00
Paul Riseborough 92d2317b99 uavcan: publish GPS antenna heading offset as NAN 2018-10-17 09:48:38 -04:00
Paul Riseborough cf962afafe simulator: publish GPS antenna heading offset as NAN 2018-10-17 09:48:38 -04:00
Paul Riseborough 6a3692cf6b mavlink: publish GPS antenna heading offset as NAN 2018-10-17 09:48:38 -04:00
Paul Riseborough 9aee71bf54 msg: Add antenna array heading offset to GPS message 2018-10-17 09:48:38 -04:00
Hamish Willee 8806389f24 Remove long command option from sf1xx driver docs 2018-10-17 10:34:33 +02:00
Hamish Willee 0e2aab46c9 Add module doc for sf1xx rangefinder 2018-10-17 10:34:33 +02:00
Daniel Agar 86683944f8 px4fmu-v2_default disable lis3mdl 2018-10-17 10:27:03 +02:00
Daniel Agar 0c698baca7 AV-X mavlink network and companion defaults
- start mavlink on network by default (port 14570)
 - start mavlink for TX2 companion by default
2018-10-17 00:22:53 -04:00
PX4 Build Bot e43caeff2e Update submodule sitl_gazebo to latest Tue Oct 16 14:40:21 EDT 2018
- sitl_gazebo in PX4/Firmware (304e00f158): https://github.com/PX4/sitl_gazebo/commit/d1f0bd4367d1cab01c772bb593a3f750b2f7dce2
    - sitl_gazebo current upstream: https://github.com/PX4/sitl_gazebo/commit/3d80f63562c24c1537e1f8423ce649c99ebc15ea
    - Changes: https://github.com/PX4/sitl_gazebo/compare/d1f0bd4367d1cab01c772bb593a3f750b2f7dce2...3d80f63562c24c1537e1f8423ce649c99ebc15ea

    3d80f63 2018-10-16 Elia Tarasov - add missing dimension
4722a06 2018-10-15 Elia Tarasov - fix px4flow gyro orientation wrt camera
7e22adc 2018-10-15 Elia Tarasov - fix px4flow gyro sensor handling:
30337e7 2018-10-15 Elia Tarasov - add px4flow gyro sensor to px4flow jinja model
dcf2c95 2018-10-12 Elia Tarasov - add px4flow gyro sensor handling
0b4d4e3 2018-10-12 Elia Tarasov - replace integrated onboard gyro calculation by px4flow gyro sensor
df516e6 2018-10-11 Elia Tarasov - add check for NAN in case of no gyro is present
bbe2d67 2018-10-11 Elia Tarasov - send NAN in case of gyro absence
354e055 2018-10-11 Elia Tarasov - add default flag for gyro presence
2018-10-16 18:29:09 -04:00
Daniel Agar 13bdbde796 Update submodule mavlink v2.0 to latest Tue Oct 16 14:40:25 EDT 2018
- v2.0 in PX4/Firmware (6c822c67281ed3d36248dfe780107551b1a4eba7): https://github.com/mavlink/c_library_v2/commit/c5b465f5b455c5e6116cc5b6bf1332747a7b7494
    - v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/32dcf73bb24516dc0d52119e624fda8987a03f62
    - Changes: https://github.com/mavlink/c_library_v2/compare/c5b465f5b455c5e6116cc5b6bf1332747a7b7494...32dcf73bb24516dc0d52119e624fda8987a03f62

    32dcf73 2018-10-16 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/0ae270afc0fe9aa7595afddd2ea30c754650feb8
2018-10-16 18:28:04 -04:00
Daniel Agar d61fbbf568 move NuttX back to PX4 org 2018-10-16 18:00:19 -04:00
Friedrich Beckmann 64f23c1aed moved comment from class section to avoid PX4Buildbot confusion
The PX4BuildBot extracted the comments from the lines following
the class line which says "Plane" as the class. To avoid the
confusion for the bot I moved the comment further down.
2018-10-16 16:49:13 -04:00
Dennis Mannhart 304e00f158 ALTITUDE_THRESHOLD lower to 0.3 meters 2018-10-16 11:13:00 -04:00
Dennis Mannhart 511563d4ac mc_pos_control: enable control in xy during smooth-takeoff from ground but limit tilt 2018-10-16 11:13:00 -04:00
Dennis Mannhart 3329d69d05 mc_pos_control: replace const with constexpr 2018-10-16 11:13:00 -04:00
Dennis Mannhart 4627d5d6e4 mc_pos_control_main smooth takeoff: enable position-xy/yaw control once above 0.5m from takeoff reference 2018-10-16 11:13:00 -04:00
Dennis Mannhart 345d3278d1 mc_pos_control smooth takeoff: if velocity is valid, the control velocity in xy during takeoff 2018-10-16 11:13:00 -04:00
Dennis Mannhart 4b70584cf4 mc_pos_control takeoff: control velocity if velocity estimation is available, otherwise
just keep thrust vector pointing upward
2018-10-16 11:13:00 -04:00
Dennis Mannhart dbd1e1432a mc_pos_control: for sanity distinguish between velocity and position setpoint during
smooth-takeoff. This is only required if someone writes a FlightTask where both position
and velocity setpoints are finite
2018-10-16 11:13:00 -04:00
Dennis Mannhart e7e49d5b3c FlightTask don't require vehicle-local-positiion topic 2018-10-16 17:06:12 +02:00
Jake Dahl d3b54c3599 more changes based on suggestions 2018-10-16 09:45:28 +02:00
Jake Dahl 985c5f4d73 changed I2C init() to a public function. Removed init() from constructor of SMBus base class 2018-10-16 09:45:28 +02:00
Jake Dahl e0e411ea07 additional improvements 2018-10-16 09:45:28 +02:00
Jake Dahl ad567fa537 I should really compile before pushing, fixed a scoping error on int result 2018-10-16 09:45:28 +02:00
Jake Dahl 1e1268f84b missed a return of result 2018-10-16 09:45:28 +02:00
Jake Dahl b2482b0e43 made changes based on reviewer feedback. Also added a bool option for block_read and block_write PEC, as some devices may not use the PEC 2018-10-16 09:45:28 +02:00
Jake Dahl e5b2286756 added an SMBus base class 2018-10-16 09:45:28 +02:00
PX4 Build Bot 5f583bf587 Update submodule libuavcan to latest Mon Oct 15 20:37:29 EDT 2018
- libuavcan in PX4/Firmware (8958b42dada1e14f27c287a59b51ff26e90486a1): https://github.com/UAVCAN/libuavcan/commit/479d144ded9d5d16e234121ef9511b9ca9dfdac5
    - libuavcan current upstream: https://github.com/UAVCAN/libuavcan/commit/6174b8c10a2dbf47076ca7a7b5820a4c36c8a988
    - Changes: https://github.com/UAVCAN/libuavcan/compare/479d144ded9d5d16e234121ef9511b9ca9dfdac5...6174b8c10a2dbf47076ca7a7b5820a4c36c8a988

    6174b8c 2018-10-06 Pavel Kirienko - Link to the new forum
2018-10-15 21:08:08 -04:00
Anthony Lamping 40489afbfc jenkins: don't let ecl analysis script fail the SITL test 2018-10-15 19:52:08 -04:00
Anthony Lamping 63cc328047 jenkins: archive ekf log processing output on failure 2018-10-15 19:52:08 -04:00
Anthony Lamping 27b2dad1fb jenkins: cleanup post stage steps 2018-10-15 17:19:09 -04:00
Anthony Lamping 906559d8cf jenkins: retry clang-tidy step, max of 3 runs 2018-10-15 17:19:09 -04:00
Mark Sauder ad8539bd15 Deprecate the tap_common directory, nuttx, driver, and makefile references to tap-v1. (#10629) 2018-10-15 11:53:29 -04:00
Zack Selgrath 919957eec6 batt_smbus_main: Rearranged bus options, added TODO
-Rearranged bus options to match other drivers
-Added TODO statement because driver cannot yet start on a specific external bus
2018-10-15 11:49:25 -04:00
Zack Selgrath c8632d9eee batt_smbus_main: Fixed bus arguments from shell
- Added two external I2C bus options corresponding to newer Pixhawk hardware (px4fmu-v5)
- Switched from getopt to px4_getopt
- Fixed bus checking loop exiting early
2018-10-15 11:49:25 -04:00
Pietro De Nicolao 6d3eb0450d px_uploader.py: exit code=1 if upload was not successful (#10681) 2018-10-15 11:21:31 -04:00
PX4 Build Bot 0312fd818f Update submodule sitl_gazebo to latest Mon Oct 15 08:37:19 EDT 2018
- sitl_gazebo in PX4/Firmware (31b110c2ac): https://github.com/PX4/sitl_gazebo/commit/70ca64654061fb7a4279846d9da1ad3512cfc6ba
    - sitl_gazebo current upstream: https://github.com/PX4/sitl_gazebo/commit/d1f0bd4367d1cab01c772bb593a3f750b2f7dce2
    - Changes: https://github.com/PX4/sitl_gazebo/compare/70ca64654061fb7a4279846d9da1ad3512cfc6ba...d1f0bd4367d1cab01c772bb593a3f750b2f7dce2

    d1f0bd4 2018-10-10 Elia Tarasov - remove redundant check for gazebo major version greater than 7
a796798 2018-10-10 Elia Tarasov - change gazebo version for irlock plugin
83cadac 2018-10-10 Elia Tarasov - fix compile error for sonar plugin
aac3d20 2018-10-10 Elia Tarasov - fix compile error for lidar plugin
5a497ad 2018-10-10 Elia Tarasov - fix gps delay computation
3f0a769 2018-10-10 Elia Tarasov - fill timestamp inside plugin callback
779954c 2018-10-10 Elia Tarasov - send and recv sitl_gazebo message timestamp as unified type
46c4b29 2018-10-10 Elia Tarasov - proto: change timestamp name and type for consistency
2018-10-15 11:20:39 -04:00
fredowski a21d352388 added X-UAV Mini Talon V-Tail airframe and mixer (#10414)
* The X-UAV Mini Talon airframe with the new type Plane V-Tail uses the new AAVVTWFF_vtail mixer.
The new mixer is derived from the AAVVTWFF mixer and is a generic V-Tail mixer. I left the flaps and wheel although there are no flaps and wheels on the mini talon to keep it generic. The airframe configuration is derived from the Albatross A-Tail.
2018-10-15 09:37:22 -04:00
TSC21 31b110c2ac rtps: fix and minor cleanup of scripts and templates 2018-10-15 13:55:38 +02:00
Hamish Willee 55b9f76a16 Fix jenkins build error in tune_control 2018-10-10 19:23:09 -04:00
Dennis Mannhart ff45ee67b4 FlightTasks: remove empty line 2018-10-10 10:30:48 -04:00
Dennis Mannhart c3ba2687ac FlightTask: if not in air, reActivate the task which will set the setpoints to current
vehicle state.
2018-10-10 10:30:48 -04:00
Dennis Mannhart 1f0d559d65 PositionControl: check and set _skip_controller flag at the end of the setpoint update 2018-10-10 10:29:46 -04:00
Dennis Mannhart 2f833a26d1 mc_pos_control: check if position-control setpoint update succeeded.
refactor use_obstacle_avoidance method
2018-10-10 10:29:46 -04:00
DanielePettenuzzo b83b588fc5 irlock driver: fix bus selection argument (-b) 2018-10-10 15:20:03 +02:00
Hamish Willee 988ce71ee0 Better rendering for tune control 2018-10-10 10:30:11 +02:00
Hamish Willee a98643cb16 Add tune control docs as options 2018-10-10 10:30:11 +02:00
Hamish Willee 629933d0c8 Fix up tune control docs 2018-10-10 10:30:11 +02:00
Dennis Mannhart 6212e9c752 FlightTaskManualAltitude: use stick inputs for the brake check 2018-10-09 12:05:52 -04:00
Martina 280cb34a77 FlightTaskAuto: replace NAV_ACC_RAD with acceptance radius from triplet 2018-10-09 12:01:45 -04:00
Martina 18f4144e5a mission_block: when creating a triplet from a mission item use the default
acceptance radius from the paramters and overwrite it if the mission item
has set acceptance radius
2018-10-09 12:01:45 -04:00
TSC21 d3c1d5f019 sitl_gazebo: build with SEND_VISION_ESTIMATION_DATA set 2018-10-09 11:57:30 -04:00
Daniel Agar 4731f8c735 ADIS16477 support filtering params and enable onboard filter 2018-10-09 10:37:12 -04:00
Daniel Agar f74b96e918 AV-X DSM RC fixes (disable single wire) 2018-10-09 10:37:12 -04:00
CarlOlsson 5a10db65b6 ecl_tools: Always allocate topic data variables 2018-10-09 09:29:03 -04:00
CarlOlsson 01c2994107 ecl_tools: fix typo in title 2018-10-09 09:29:03 -04:00
CarlOlsson 8058878566 ecl_tools: add error message if topic not found in logfile 2018-10-09 09:29:03 -04:00
CarlOlsson 3424e73aa3 ecl_tools: use pyulog built in function to get dataset 2018-10-09 09:29:03 -04:00
Beat Küng 431bcbe642 MPC_THR_HOVER: reduce minimum from 20% to 10% 2018-10-09 12:09:07 +02:00
Beat Küng 48f5f8faa5 mc pos control: add MPC_THR_CURVE param
The hover thrust param also changed the thrust scaling in Stabilized mode.
However if the hover thrust is very low (e.g. below 20%), the throttle
stick input becomes very distorted.
2018-10-09 12:09:07 +02:00
Beat Küng a9def8be93 MC land detector: remove LNDMC_THR_RANGE param
- no airframe changes the default
- it does not make much sense to be able to configure the 0.1 threshold
  but the 0.3 threshold for ground contact detection cannot be configured.
2018-10-09 12:09:07 +02:00
bresch d69cba5db9 FW trim - Fix typos in FW_DTRIM_R/P/Y_VMAX 2018-10-09 10:37:22 +02:00
TSC21 0c5725d45c fix iridiumsbd_status order 2018-10-08 10:58:45 +02:00
TSC21 254a520e19 make the build stop in case of an error on the RTPS generation scripts 2018-10-08 10:58:45 +02:00
TSC21 50e46f89b6 move get_absolute_path() back to generate_microRTPS_bridge.py 2018-10-08 10:58:45 +02:00
TSC21 1e29b00860 improve verification of RTPS ID's uniqueness 2018-10-08 10:58:45 +02:00
TSC21 a7580b14ba update IDL template so it can process builtin types 2018-10-08 10:58:45 +02:00
TSC21 b11ab09d29 update RTPS/ROS2 Interface POC as Vicente Monge does not work with eProsima anymore 2018-10-08 10:58:45 +02:00
TSC21 0121964153 update Copyright notice 2018-10-08 10:58:45 +02:00
TSC21 3fdf60a1af for now, do not generate srcs/headers/idl for composed msgs: needs update on the PX4 IDL template 2018-10-08 10:58:45 +02:00
TSC21 3228e494bd radio_status: change 'fixed' field name to 'fix' so it does not clash with 'fixed' floating-point notation on the IDL generation 2018-10-08 10:58:45 +02:00
TSC21 2767f47891 tight the uorb rtps classifier 2018-10-08 10:58:45 +02:00
TSC21 840117fa2f Updated src/modules/micrortps_bridge/micro-CDR 2018-10-08 10:58:45 +02:00
TSC21 b49b9bad2f change serialization map type for int8_t 2018-10-08 10:58:45 +02:00
TSC21 d17d5d52bf move parse_yaml_msg_id_file() to uorb_rtps_classifier.py 2018-10-08 10:58:45 +02:00
TSC21 a8b0663cfe add __init__.py to msg/tools 2018-10-08 10:58:45 +02:00
TSC21 71d1b77bbe parse output from python script into readable cmake list to use; refactor RTPS scripts 2018-10-08 10:58:45 +02:00
TSC21 a9771f13d1 rtps: add uorb_rtps_classifier.py iot classify RTPS topics as "send", "receive" or "ignore" 2018-10-08 10:58:45 +02:00
Beat Küng 92a1594430 mavlink config: remove Iridium option
The user does not need to configure this, so we can hide it from the UI.
2018-10-08 08:24:44 +02:00
Hamish Willee f1130a4e10 Clarify SDLOG_MODE bit for thermal calibration 2018-10-08 07:20:49 +02:00
Simone Guscetti 62d71bf36c fmu-v5 manifest: Add some comments
Clarify which  componets is on which index for the item array
2018-10-05 07:54:44 -07:00
Simone Guscetti aa3a404fa0 fmu-v5 manifest: remove entry from list
At the moment it is only declared a component, PX4IO.
2018-10-05 07:54:44 -07:00
Simone Guscetti 0f47272628 board_common: fix typo 2018-10-05 07:54:44 -07:00
Beat Küng dae7c56109 ManualSmoothing{XY,Z}: remove unused include 2018-10-04 15:09:02 +02:00
Beat Küng e23382c6da FlightTaskManualAltitude: call FlightTaskManualStabilized::_updateHeadingSetpoints() directly
Instead of calling _updateSetpoints(), that also sets the thrust setpoint,
which is then overwritten again.
2018-10-04 15:09:02 +02:00
Beat Küng 206baa7432 Flight tasks: avoid using *= for scalar to vector assignment
It's confusing and there is a corner case where the result is incorrect:
*= 0 will not set the variable to 0 if it's already NAN.
2018-10-04 15:09:02 +02:00
Beat Küng bb756e0e12 FlightTaskAuto: remove unnecessary brackets in switch case statements 2018-10-04 15:09:02 +02:00
Beat Küng eb30b5b73e mc_pos_control_params: remove unused MPC_MANTHR_MAX params 2018-10-04 15:09:02 +02:00
Julian Oes 39e0a39224 uavcan: update submodule
This fixes the build with Python 3.7.
2018-10-04 13:46:17 +02:00
Beat Küng 09563c94ce rcS: fix typhoon_h480
The typhoon has a 6011_typhoon_h480.post script that got matched as well.
Now we exclude all files that contain a dot (apparently it's not so easy
to do generic pattern matching in a portable way, but this works).
2018-10-04 09:38:59 +02:00
Daniele Pettenuzzo a2d1f6ddce ll40ls driver: support also lidar lite v3HP (#10578) 2018-10-04 00:54:27 -04:00
Daniel Agar 6f7c572601 Update submodule sitl_gazebo to latest Wed Oct 3 18:37:46 UTC 2018 (#10643)
- sitl_gazebo in PX4/Firmware (6c34407d57): https://github.com/PX4/sitl_gazebo/commit/9d512af0075659f0ace91ec0e2f8c8a170f911fb
    - sitl_gazebo current upstream: https://github.com/PX4/sitl_gazebo/commit/1264b74493cd2f362d852530bcc7423a013f2151
    - Changes: https://github.com/PX4/sitl_gazebo/compare/9d512af0075659f0ace91ec0e2f8c8a170f911fb...1264b74493cd2f362d852530bcc7423a013f2151

1264b74 2018-09-30 TSC21 - gazebo_motor_failure_plugin: clean up and fix for Gazebo 9
77141e7 2018-09-29 TSC21 - Travis: add naming for jobs within the build matrix
e46f82a 2018-09-29 TSC21 - add new 18.04 Melodic build
5b93919 2018-09-29 TSC21 - Travis: update ROS docker container
2018-10-03 19:56:50 -04:00
Daniel Agar 357fc22d91 Update submodule v2.0 to latest Wed Oct 3 18:37:52 UTC 2018
- v2.0 in PX4/Firmware (f7a1da2261c579ef680c7d3b7a016bc4c6d13601): https://github.com/mavlink/c_library_v2/commit/e5f6257dd005b6fb3bff23d45f2b3b417b52539b
    - v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/c5b465f5b455c5e6116cc5b6bf1332747a7b7494
    - Changes: https://github.com/mavlink/c_library_v2/compare/e5f6257dd005b6fb3bff23d45f2b3b417b52539b...c5b465f5b455c5e6116cc5b6bf1332747a7b7494

    c5b465f 2018-10-01 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/bae3015ecc05299968362a4623d506ea2840ec86
2018-10-03 19:25:44 -04:00
mcsauder 2d208b1524 Edited aerofc-v1 file comments to not reference tap-v1. 2018-10-03 15:47:04 -04:00
Bart Slinger f913de3957 bebop 2 improved gains, disable rangefinder 2018-10-03 15:35:25 -04:00
Bart Slinger c762a12bfa bebop2 shutdown motors on force_failsafe 2018-10-03 15:35:25 -04:00
Beat Küng 6c34407d57 version: rebase fixes & add bbblue 2018-10-03 10:30:10 +02:00
Beat Küng afc1be2296 px4_micro_hal: fix typo 2018-10-03 10:30:10 +02:00
Beat Küng 703a5376bb bebop board config: add a separate SOC_ARCH_ID 2018-10-03 10:30:10 +02:00
Beat Küng b9a99969a7 board_get_uuid: fix alignment issues
board_get_px4_guid() called board_get_uuid() with a 2 bytes offset into an
uint8_t array. This gives no guarantees on alignment, and board_get_uuid()
casts it to an uint32_t array, leading to potentially unaligned accesses.
2018-10-03 10:30:10 +02:00
Beat Küng f0f88a3662 ver command: show the git branch name for 'ver all' 2018-10-03 10:30:10 +02:00
David Sidrane a934d6e3f2 samv7:Fixed incorrect index populating px4_guid 2018-10-03 10:30:10 +02:00
David Sidrane 03948c1ad3 kinetis:Fixed incorrect index populating px4_guid 2018-10-03 10:30:10 +02:00
Beat Küng e2a32aab76 mavlink_main: add support for autopilot_version.uid2 2018-10-03 10:30:10 +02:00
Beat Küng daf05b3854 board_common: add PX4_SOC_ARCH_ID_UNUSED = 0 to PX4_SOC_ARCH_ID_t
Just to make sure we never have an UUID == 0
2018-10-03 10:30:10 +02:00
Daniel Agar f2e10a163b fix qurt eagle board_identity 2018-10-03 10:30:10 +02:00
David Sidrane 0b17995e81 eagle:revert CMakeLists.txt to wrong sitl, add board identity API
This file was clearly clearly but built.
2018-10-03 10:30:10 +02:00
David Sidrane 66102adf43 ver:Removed UUID and MFGID 2018-10-03 10:30:10 +02:00
David Sidrane bdaff018b7 samv7:Add PX4 GUID API 2018-10-03 10:30:10 +02:00
David Sidrane 43f6c4df77 kinetis:Add PX4 GUID API 2018-10-03 10:30:10 +02:00
David Sidrane 61935e8271 qurt:Use PX4_SOC_ARCH_ID_t from board common 2018-10-03 10:30:10 +02:00
David Sidrane 4e32ca45f1 sitl:Use PX4_SOC_ARCH_ID_t from board common 2018-10-03 10:30:10 +02:00
David Sidrane d85452863d rpi:Use PX4_SOC_ARCH_ID_t from board common 2018-10-03 10:30:10 +02:00
David Sidrane 3d96e2ef60 ocpoc:Use PX4_SOC_ARCH_ID_t from board common 2018-10-03 10:30:10 +02:00
David Sidrane 5fea494a2d eagle:Use PX4_SOC_ARCH_ID_t from board common 2018-10-03 10:30:10 +02:00
David Sidrane dc59e19bbb Moved PX4_SOC_ARCH_ID from px4_micro_hal to board_common 2018-10-03 10:30:10 +02:00
David Sidrane 695a7f6839 board_common:Added missing END_DECLS from rebase 2018-10-03 10:30:10 +02:00
David Sidrane ea1722274d ver:Use Board identity API without ifdefs for overrides 2018-10-03 10:30:10 +02:00
David Sidrane 594da6247b board_common:Make board indenty API required. 2018-10-03 10:30:10 +02:00
David Sidrane 73552bdd64 sim:Use Non Arch specific Board identity API 2018-10-03 10:30:10 +02:00
David Sidrane 2f64870e78 qurt:Use Non Arch specific Board identity API 2018-10-03 10:30:10 +02:00
David Sidrane a96acbb04d ocpoc:Use Non Arch specific Board identity API 2018-10-03 10:30:10 +02:00
David Sidrane 82dcfeb576 eagle:Use Non Arch specific Board identity API 2018-10-03 10:30:10 +02:00
David Sidrane 1c779d58fb bebop:Use Non Arch specific Board identity API 2018-10-03 10:30:10 +02:00
David Sidrane bc075208d5 rpi:Use Non Arch specific Board identity API 2018-10-03 10:30:10 +02:00
David Sidrane a1abd1b632 sitil:Use Non Arch specific Board identity API 2018-10-03 10:30:10 +02:00
David Sidrane ed9223edaf board_identity:Added common no-arch specific board_identity API
This common code can be used byt posix based boars to provide
   the board_identity API.
2018-10-03 10:30:10 +02:00
David Sidrane 1ac54f977e board_common:Documentation clean up 2018-10-03 10:30:10 +02:00
David Sidrane 9709d23179 logger:Use PX4 GUID for sys_uuid 2018-10-03 10:30:10 +02:00
David Sidrane 347ac48eab posix:Added PX4 GUID API board_get_px4_guid_formated 2018-10-03 10:30:10 +02:00
David Sidrane a16ca0ccf9 sitl:Added BOARD_OVERRIDE_PX4_GUID 2018-10-03 10:30:10 +02:00
David Sidrane 7f29b04e41 sim:Added BOARD_OVERRIDE_PX4_GUID 2018-10-03 10:30:10 +02:00
David Sidrane ba336bd19e rpi:Added BOARD_OVERRIDE_PX4_GUID 2018-10-03 10:30:10 +02:00
David Sidrane a1d5cb766a ocpoc:Added BOARD_OVERRIDE_PX4_GUID 2018-10-03 10:30:10 +02:00
David Sidrane cca2fd8471 eagle:Added BOARD_OVERRIDE_PX4_GUID 2018-10-03 10:30:10 +02:00
David Sidrane 39a0021251 ver:Add PX4 GUID (MFGUID and UID will be deprecated later) 2018-10-03 10:30:10 +02:00
David Sidrane 7050657a6e board_identity:Add stm32 board_get_px4_guid and board_get_px4_guid_formated API 2018-10-03 10:30:10 +02:00
David Sidrane 1c2f8bd4c4 board_identity:Fix potential buffer over flow 2018-10-03 10:30:10 +02:00
David Sidrane f24a052355 board_common:Add PX4 GUID, deprecate other UUID API
The form of the PX4  GUID is as follows:
   offset:0         1         2         -           17
      <ARCH MSD><ARCH LSD><MSD CPU UUID>...<LSD CPU UUID>

   Where <ARCH MSD><ARCH LSD> are a monotonic ordinal number assigned by
   PX4 to a chip architecture (PX4_SOC_ARCH_ID). The 2 bytes are used to
   create a globally unique ID when prepended to a padded CPU ID.

   In the case where the CPU's UUID is shorter than 16 bytes it will be
   padded with 0's starting at offset [2] until
   PX4_CPU_MFGUID_BYTE_LENGTH-PX4_CPU_UUID_BYTE_LENGTH -1
   I.E. For the STM32
   offset:0         1     2  3  4  5  6             -            17
     <ARCH MSD><ARCH LSD>[0][0][0][0]<MSD CPU UUID>...<LSD CPU UUID>

   I.E. For as CPU with a 16 byte UUID
   offset:0         1         2         -           17
     <ARCH MSD><ARCH LSD><MSD CPU UUID>...<LSD CPU UUID>
2018-10-03 10:30:10 +02:00
David Sidrane 8bec5fc37b px4_micro_hal:Define PX4_SOC_ARCH_ID 2018-10-03 10:30:10 +02:00
Martina e73c50ad9c mc_pos_control_main: enable continuos update of vehicle_trajectory_waypoint
desired such that it's possible to use it in manual modes
2018-10-02 09:45:48 -04:00
Beat Küng 02d89575b0 px4fmu-v2: disable camera_trigger
due to limited flash space.
2018-10-02 14:14:10 +02:00
Beat Küng fb04a611c5 gps: reduce stack size
A buffer size of the gps drivers got reduced by 100 bytes.
2018-10-02 14:14:10 +02:00
Beat Küng cef6cf96f8 gps: reduce delay by reducing the sleep time
This uses now the same sleep time logic as mavlink, depending on the
baudrate.

CPU usage on a Pixracer for different sleep times:

#num reads/sec    sleep time         CPU usage
17-18             2.8ms              0.233-0.31% (this PR)
12                5ms                0.155-0.3%
9-10              10ms               0.155-0.233%
6                 20ms               0.155-0.233% (previous)
2018-10-02 14:14:10 +02:00
Beat Küng 979e8ad28b gps drivers: update submodule 2018-10-02 14:14:10 +02:00
Beat Küng 403f909e3a mavlink_receiver: simplify sleeptime calculation 2018-10-02 14:14:10 +02:00
Beat Küng 23094b9ac9 ekf2: subscribe only to 2 gps topic instances 2018-10-02 14:14:10 +02:00
Matthias Grob e167e6bec4 px_uploader: catch non-standard baud exception
to fix Cygwin upload. It failed silently but when catching it prints
"non-standard baudrates are not supported on this platform".
Discussion about platform independet FTDI detection is in issue #10429.
2018-10-02 10:01:41 +02:00
Matthias Grob ebdea6e50d px_uploader: fix code and output spacing 2018-10-02 10:01:41 +02:00
Daniel Agar 181b2f69ed Github templates add support question and documentation issue (#10613) 2018-10-01 09:44:19 -04:00
Matthias Grob bee6a6b8b0 Refactor: Use new matrix::Vector2f constructor 2018-10-01 08:10:21 -04:00
Matthias Grob ada0179cda matrix lib: update to latest version 2018-10-01 08:10:21 -04:00
Lukas Woodtli 587c2e2477 Improve the use of ubsan in SITL pipeline
Also some general minor sanitizer improvements.
2018-09-30 16:08:58 -04:00
Bart Slinger 9530b6c24d bebop 2 disable motors on kill (#10605) 2018-09-30 11:40:51 -04:00
Daniel Agar b83cb79596 Update submodule DriverFramework to latest Sun Sep 30 08:37:23 EDT 2018 (#10604)
- DriverFramework in PX4/Firmware (1ce7e8d89a16262afe07d7487e55a2ec05985627): https://github.com/PX4/DriverFramework/commit/721ace3e797f141f0950144bace6a30f6aa1325a
    - DriverFramework current upstream: https://github.com/PX4/DriverFramework/commit/9f456acb3c8d70df3cd8906123388935dd6303f6
    - Changes: https://github.com/PX4/DriverFramework/compare/721ace3e797f141f0950144bace6a30f6aa1325a...9f456acb3c8d70df3cd8906123388935dd6303f6

    9f456ac 2018-09-30 Bart Slinger - Increase DriverFramework priority to SCHED_PRIORITY_MAX
2018-09-30 10:28:52 -04:00
Daniel Agar 9d2ff820bf px4fmu-v2 disable sdp3x to save flash (#10600)
- fixes #10599
2018-09-29 11:21:21 -04:00
Paul Riseborough 72f85e4b2d ekf2: Handle blending of dissimilar rate GPS data (#10570)
A filtered update update interval is calculated for each receiver.
If dissimilar interval data is detected, blending occurs when data is received from the slower of the receivers.
If similar interval data is detected, blending occurs when receiver data with similar time stamps is available.
If no data is received from either receiver for longer than 300msec, then no blending will be performed and the most recent data will be used instead.
2018-09-29 09:23:19 -04:00
Beat Küng df9a09ce9d PreflightCheck: rename 'Estimator internal checks' to 'Position unknown' 2018-09-29 09:17:53 -04:00
Beat Küng 30cf287f7b PreflightCheck: update messages & use proper log level 2018-09-29 09:17:53 -04:00
Beat Küng af07497b21 mavlink_log: add mavlink_log_warning 2018-09-29 09:17:53 -04:00
Beat Küng ee928c20f0 PreflightCheck: improve error message in case there is no sensor data 2018-09-29 09:17:53 -04:00
Beat Küng 7f0f391fe1 GPS PreflightCheck: improve failure reporting
- previously it was possible to get a Position Control rejected message
  without further advice what was actually wrong. So now we report warnings
  even if gps is not required for arming (which could be annoying too...).
- the GPS failure message was very generic, making it hard to debug the
  cause. Now we check every bit and send an appropriate warning

All strings were checked not to exceed the maximum length of 50 characters.
2018-09-29 09:17:53 -04:00
Beat Küng f1966aa3fd PreflightChecks: improve labels by not capitalizing everything
estimator status init is not required.
2018-09-29 09:17:53 -04:00
Beat Küng 0784725ad3 ekf2: only report gps failure flags that are enabled
So that they can be used for reporting errors.
2018-09-29 09:17:53 -04:00
Beat Küng 0e1e0b997d mavlink_receiver: reduce s_variance_m_s for HIL GPS message from 1 to 0.1
1 was too high to pass the EKF2 test (EKF2_REQ_SACC which is 0.5 by default)
and thus switching into position mode in HIL was not possible.
2018-09-29 09:17:53 -04:00
Daniel Agar 066ca50ddf mission test temporarily increase landed timeout 60s -> 120s (#10596)
- revert once #10590 is resolved properly
2018-09-28 10:28:07 -04:00
Beat Küng 465d399e8f land_detector: move _parameterSub to the right place 2018-09-28 16:04:40 +02:00
Beat Küng b69dd50d90 land_detector: cleanup subscriptions & publications 2018-09-28 16:04:40 +02:00
Beat Küng 0ac5f2cd8b ulanding radar: add UART config param 2018-09-28 10:29:31 +02:00
Beat Küng a1f0f88b33 posix_ocpoc_cross.cmake: fix ulanding module
module list is now the same as posix_ocpoc_ubuntu.cmake
2018-09-28 10:29:31 +02:00
Beat Küng 079a43238f mc_pos_control: print Failsafe message only once when entering failsafe 2018-09-28 08:59:22 +02:00
Beat Küng 720b3307d8 mc_pos_control: limit flight task init failure printf's
There were cases where the console was continuously spammed with activation
failure messages.
2018-09-28 08:59:22 +02:00
Beat Küng ff69158836 mc_pos_control: add missing orb_unsubscribe 2018-09-28 08:59:22 +02:00
Beat Küng f7b65c577b mc_pos_control: refactor to use ModuleBase 2018-09-28 08:59:22 +02:00
TSC21 3a910555a1 add Jenkins catkin build 2018-09-28 08:59:04 +02:00
TSC21 324a5c1477 deactivate catkin build of dynamic libs 2018-09-28 08:59:04 +02:00
David Sidrane d3c37e0206 fmu:fix doumantation and pwm 8 useage 2018-09-28 07:48:32 +02:00
David Sidrane c7edd9f31b fmu:Add MODE_4PWM1CAP, MODE_5PWM, MODE_5PWM1CAP
This extends the  Capture support for FMU
   CHAN 5 and 6.
2018-09-28 07:48:32 +02:00
Beat Küng 719bfd1073 posix-configs: use '.' instead of 'source'
'source' is not POSIX
2018-09-27 23:39:20 +02:00
Beat Küng b972651a06 posix shell: use /bin/sh instead of bash
This uses the systems default shell:
- Ubuntu: dash
- Fedora: bash

Since bash is invoked via /bin/sh, it operates in POSIX mode:
  https://tiswww.case.edu/php/chet/bash/POSIX

- remove '# Ignore the expand_aliases command in zshell.'
  Not needed because the shell operates in POSIX mode
- [[ is bashism -> use [
- autostart_files=( $autostart_file_match )
  is not supported in dash, so use 'ls'
- shellcheck runs the dash flavor, since dash is a minimalistic shell.

Tested on dash & bash.
2018-09-27 23:39:20 +02:00
Beat Küng 37338e442f NuttX shell scripts: replace operator == with =
- NuttX supports both versions
- POSIX shell only supports '='
2018-09-27 23:39:20 +02:00
Beat Küng 4c90d2c025 module_schema: enforce serial config param names to end in _CONFIG or _CFG
For consistency & documentation
2018-09-27 23:39:20 +02:00
Julien Lecoeur a346619623 Logger: add debug_array topic 2018-09-27 12:33:12 -04:00
Julien Lecoeur cafd2f5352 Add example usage of topic debug_array in px4_mavlink_debug app 2018-09-27 12:33:12 -04:00
Julien Lecoeur cb3d86a609 Add support for mavlink message DEBUG_FLOAT_ARRAY 2018-09-27 12:33:12 -04:00
Julien Lecoeur 7f665a70e7 Update MAVLink, Thu Sep 27 07:43:26 2018 2018-09-27 12:33:12 -04:00
David Sidrane 45cf4d49f9 rcS:FMU V5 mini disable px4io 2018-09-26 23:27:23 +02:00
Bart Slinger ea96501e8c bebop 2: upload entire bin directory content 2018-09-26 21:34:22 +02:00
Bart Slinger adad22f879 make set function work in sh 2018-09-26 21:34:22 +02:00
Bart Slinger 4df88122cb Bebop 2: use sh instead of bash 2018-09-26 21:34:22 +02:00
Bart Slinger 77d053ba65 Bebop 2: update DriverFramework with MPU6050 fix 2018-09-26 21:34:22 +02:00
TSC21 2250946eaa add verification for the ID uniqueness; give list of available ID's 2018-09-26 12:01:58 +02:00
TSC21 fc980493d7 px_generate_uorb_topic_helper: add a check for the existence of the RTPS ID for each uORB topic 2018-09-26 12:01:58 +02:00
TSC21 6f4ef80389 update RTPS msg ID's 2018-09-26 12:01:58 +02:00
PX4 Build Bot 82acf6894d Update submodule nuttx to latest Tue Sep 25 23:58:20 UTC 2018
- nuttx in PX4/Firmware (1adcfeecc20620f02439093afb85f3151b2e8be1): https://github.com/PX4-NuttX/nuttx/commit/e31e94f5bd3cf68b9ed0f010724ac9122730dd21
    - nuttx current upstream: https://github.com/PX4-NuttX/nuttx/commit/7e3c8e10cd92351b905bc8d0e34e69bccd00dfea
    - Changes: https://github.com/PX4-NuttX/nuttx/compare/e31e94f5bd3cf68b9ed0f010724ac9122730dd21...7e3c8e10cd92351b905bc8d0e34e69bccd00dfea

    7e3c8e1 2018-09-21 Gregory Nutt - [BACKPORT] 510b0f7e07 Correct all ARMv7-M architectures.
2018-09-25 20:28:47 -04:00
Daniel Agar fff1cdfa51 Jenkins firmware compile readd av-x-v1_default 2018-09-25 18:32:36 -04:00
Beat Küng c2ff0b1052 rcS: start frsky_telemetry on Pixracer if not enabled already 2018-09-25 14:31:47 -04:00
David Sidrane 6ec693b716 tap-v1 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane 3f1a155e57 px4nucleoF767ZI-v1 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane f7dd2511ab px4fmu-v5 stackcheck: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane a6e77eb9a0 px4fmu-v5 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane a302c58a0d px4fmu-v4pro nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane 825d6c06f2 px4fmu-v4 stackcheck: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane dfc390bbe0 px4fmu-v4 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane 2ec56cef42 px4fmu-v2 stackcheck: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane 5148d2d94f px4fmu-v2 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane b606897743 px4flow-v2 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane ee28b9aa69 px4esc-v1 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane 65322c98ca px4cannode-v1 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane 384a1dcf66 px4cannode-v1 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane eaec63a747 px4cannode-v1 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane 233d116aee px4-stm32f4discovery nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane 7c3850902f omnibus-f4sd nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane 053fecbf20 nxphlite-v3 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane 0bd2a0be05 mindpx-v2 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane 197940eadd esc35-v1 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane 907d478f3e crazyflie nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane debb8afa0d av-x-v1 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane fe591aee5c auav-x21 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane e893aaec48 aerofc-v1 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane 0829e3c654 aerocore2 nsh: Disable ARCH_IRQPRIO & ARCH_HIPRI_INTERRUP
This insures the common exception handler will not be
   re-entered. The handler does not support nested interrupts
   and the interrupt stack pointer and context will be overwritten
   resulting in hard to debug hardfaults.

   If all the priorities are equal the NVIC prevents the
   preemption. The startup code defaults all the priorities
   to the same value 128.

   This change safeguards in 2 ways 1) By disabling
   CONFIG_ ARCH_IRQPRIO: up_prioritize_irq cannot be called.
   This will insure that all HW interrupts are at the same
   priority.

   2) By disabling CONFIG_ARCH_HIPRI_INTERRUP, the common
   exception will disable any interrupts during interrupt
   processing.
2018-09-25 12:28:03 -04:00
David Sidrane 72b5a8c0a5 libuavcan: update with Kinetis int priority disable (#10564) 2018-09-25 11:52:07 -04:00
mcsauder c390d02f1c Tidy up an OUTPUT_DEV set/unset in rc.interace and rcS. 2018-09-25 07:55:03 +02:00
Beat Küng 525531f2fc Jenkins: add module config validation to CI 2018-09-25 07:53:29 +02:00
Daniel Agar 078f5ea198 serial generate config add 10 generic serial ports 2018-09-25 07:53:29 +02:00
Beat Küng 39db2a6bf9 shellcheck: ignore SC2154 on NuttX
This is because NuttX uses a different assignment for variables.
2018-09-25 07:53:29 +02:00
Beat Küng 64912ed7f6 rc.serial.jinja: remove 'param touch' for baudrates
Can be reverted if needed later on...
2018-09-25 07:53:29 +02:00
Beat Küng 300e66ae6a SYS_COMPANION: deprecate this param
Replaced with the more generic serial config params.

rc.mavlink contains automatic transition support that can be removed after
the next release.
2018-09-25 07:53:29 +02:00
Beat Küng f0c0b6f6e8 params: remove unused SENS_EN_* params
Replaced with the more general serial config params.
2018-09-25 07:53:29 +02:00
Beat Küng f2f9a7aadc px4_module.h: remove unnecessary ; 2018-09-25 07:53:29 +02:00
Beat Küng d418a09e1d module_schema.yaml: move from test/ to validation/
It doesn't really fit to test/, and also no other existing place.
2018-09-25 07:53:29 +02:00
Beat Küng e4d4192f9c module_schema.yaml: add parameter definitions 2018-09-25 07:53:29 +02:00
Beat Küng babe300960 sf0x: avoid reopening the UART on startup
And:
- return correct return code in SF0X::init()
- remove unneeded SF0X::probe()
2018-09-25 07:53:29 +02:00
Beat Küng 52967bd654 Tools/validate_yaml: add schema validation for module yaml config files 2018-09-25 07:53:29 +02:00
Beat Küng b5e552924a serial drivers/modules: add yaml config files 2018-09-25 07:53:29 +02:00
Beat Küng dae292631c Tools/serial: use per-module serial port config params, instead of per-port 2018-09-25 07:53:29 +02:00
Beat Küng dc412e4cd5 px_process_params.py: fix default argument for --inject-xml 2018-09-25 07:53:29 +02:00
Beat Küng 546886259f boards: remove GPS_DEFAULT_UART_PORT
Not required anymore.
2018-09-25 07:53:29 +02:00
Beat Küng 98ac557ebc gpssim: remove unused uart_path 2018-09-25 07:53:29 +02:00
Beat Küng ced37fdf30 mavlink_main: use px4_get_parameter_value for baudrate, datarate and mode 2018-09-25 07:53:29 +02:00
Beat Küng a3d9b84b1e micrortps_client: use px4_get_parameter_value for baudrate 2018-09-25 07:53:29 +02:00
Beat Küng 4d05a74aeb pwm.cpp: use px4_get_parameter_value 2018-09-25 07:53:29 +02:00
Beat Küng fe924334c2 px4_cli: add px4_get_parameter_value CLI helper method 2018-09-25 07:53:29 +02:00
Beat Küng c237221a81 cmake: add serial param & ROMFS generation to the build system
- only a few configs done yet
2018-09-25 07:53:29 +02:00
Beat Küng 5bb75a7ff8 Tools/serial: add script to generate ROMFS serial startup logic & serial parameters 2018-09-25 07:53:29 +02:00
Beat Küng 15044909a4 param: add 'param touch <param_name>' command
so that params can be marked as used from scripts.
2018-09-25 07:53:29 +02:00
Beat Küng 91a1ac1b60 sf0x: add -d param to pass the serial port 2018-09-25 07:53:29 +02:00
Beat Küng 0ebf821db4 cmake configs: minor cleanup for hott telemetry
it got moved to drivers/telemetry/hott
2018-09-25 07:53:29 +02:00
TSC21 28521ea77c move parse_yaml_msg_id_file() definition to generate_microRTPS_bridge.py 2018-09-24 19:28:40 +02:00
TSC21 a50fed1bf9 generate_microRTPS_bridge: state that RTPS msg IDs definition file path is relative to the msg_dir 2018-09-24 19:28:40 +02:00
TSC21 a857f33cf0 remove redundante --rtps-ids-file arg option 2018-09-24 19:28:40 +02:00
TSC21 1cc3d95ff7 msg: templates: add 'ids' to the Context documentation 2018-09-24 19:28:40 +02:00
TSC21 0227ea3835 msg: RTPS: pass RTPS ID msg definition file as an EmPy global var 2018-09-24 19:28:40 +02:00
Beat Küng eac8f8813a flight tasks: minor cleanup (avoid using *= for assignment) 2018-09-24 13:57:37 +02:00
Beat Küng afada8ddb5 FlightTaskManualStabilized: allow attitude control with 0 throttle
With minimum throttle set to 0, it was not possible to control the attitude
anymore at 0 throttle, the vehicle would just stay level.
2018-09-24 13:57:37 +02:00
Beat Küng b93d02aee7 Revert "omnibus: (temporarily) disable the topic listener"
This reverts commit 370fddc115.

Because the topic_listener got smaller.
2018-09-24 13:25:23 +02:00
Beat Küng 62550be858 topic_listener: reduce flash space by avoiding template bloat
Use a templated callback method for the code parts that we actually need
templates, and avoid using a template for the rest of the code.

Saves around 20KB of flash.
2018-09-24 13:25:23 +02:00
Beat Küng 3453506471 logger: log vehicle_air_data and vehicle_magnetometer by default & minor cleanup
Make sure vehicle_air_data & vehicle_magnetometer are logged if ekf2 replay
is disabled.
2018-09-24 13:25:01 +02:00
Beat Küng 92bf761bf1 PreflightCheck: do not check for primary mag & inconsistencies if system has no mag 2018-09-24 13:24:38 +02:00
Martina 5a57e82072 navigator: clarify NaN return for get_yaw_acceptance 2018-09-24 11:23:01 +02:00
Martina b220e74219 navigator_main: add comment to explain yaw_acceptance usage 2018-09-24 11:23:01 +02:00
Martina 5b8ae9fb29 rename position_controller_status field from altitude_acceptance_radius
to altitude_acceptance
2018-09-24 11:23:01 +02:00
Martina 40650ee2c7 FlightTaskAuto: check avoidance progress only for multicopter 2018-09-24 11:23:01 +02:00
Martina 07eb0b697e FlightTaskAuto: don't create vectors from pointers 2018-09-24 11:23:01 +02:00
Martina ba4e633bd4 FlightTaskAuto: check avoidance progress only if avoidance is active 2018-09-24 11:23:01 +02:00
Martina cef7673969 FlightTaskAuto: calculate the new altitude acceptance radius if the vehicle
is inside the xy acceptance radius but not inside the z acceptance radius
2018-09-24 11:23:01 +02:00
Martina fffb479edf navigator_main: use the altitude acceptance radius from the pos control if
it is greater than the one in the mission item
2018-09-24 11:23:01 +02:00
Martina b8e46d3323 position_controller_status: add altitude acceptance radius 2018-09-24 11:23:01 +02:00
Martina 7031bb5a6d navigator: add yaw_acceptance getter to incorporate feedback from position
controller. The yaw acceptance is defined by the mission item. If the pos
control sets it to NAN, then the yaw at a waypoint is ignored.
2018-09-24 11:23:01 +02:00
Martina a5a204004b FlightTaskAuto: add check for xy mission progress 2018-09-24 11:23:01 +02:00
Daniel Agar 18a0b39968 sanitizers cleanup (#10551)
- add to AddressSanitizer and UndefinedBehaviorSanitizer to CMAKE_BUILD_TYPE options
 - handle environment variable helpers outside of CMake
 - add -O1 optimization
 - cleanup whitespace
2018-09-23 16:52:09 -04:00
Daniel Agar 38aa9a20f6 parameters delete unused scope 2018-09-23 13:56:04 -04:00
Daniel Agar 50d1db3372 Tools/check_submodules.sh silence normal git output 2018-09-23 13:41:59 -04:00
Daniel Agar 036734eb76 cmake git submodules handle all paths consistently
- relative to the PX4 source directory root
2018-09-23 13:41:59 -04:00
Daniel Agar 610ec9f854 Update submodule nuttx to latest Sun Sep 23 08:37:24 EDT 2018 (#10550)
- nuttx in PX4/Firmware (f3cbd3c744e9224bd55597fbfae23c56ce296544): https://github.com/PX4-NuttX/nuttx/commit/98a89513060c42215e9cd14f52a7fd7dcc08dacc
    - nuttx current upstream: https://github.com/PX4-NuttX/nuttx/commit/e31e94f5bd3cf68b9ed0f010724ac9122730dd21
    - Changes: https://github.com/PX4-NuttX/nuttx/compare/98a89513060c42215e9cd14f52a7fd7dcc08dacc...e31e94f5bd3cf68b9ed0f010724ac9122730dd21

    e31e94f 2018-09-21 David Sidrane - [REJECTED] kinetis:usbdev use CONFIG_KINETIS_USBOTG_PRIO at default
2018-09-23 10:07:42 -04:00
mcsauder a1af7ffdcf Remove whitespaces to quiet git commit trailing whitespace warnings. 2018-09-21 23:28:31 +02:00
David Sidrane d2faf5f31d platforms/nuttx/NuttX/nuttx with hardfault fix 2018-09-21 22:34:38 +02:00
MaEtUgR 2c7c876c38 mavlink_receiver: parse all 18 channels from rc_override 2018-09-21 16:26:27 +02:00
MaEtUgR 4f0e090e88 drv_rc_input: replace useless rc_input_values define 2018-09-21 16:26:27 +02:00
TSC21 5c386a737c make generation of micro-RTPS agent CMakeLists.txt optional 2018-09-21 15:55:17 +02:00
TSC21 93daec43d3 generate_microRTPS_bridge: add option to set preprocessor include paths of fastrtpsgen 2018-09-21 15:55:17 +02:00
TSC21 d708c965ec px_generate_uorb_topic_helper.py: beautify 2018-09-21 15:55:17 +02:00
TSC21 4137517d12 px_generate_uorb_topic_files.py: beautify 2018-09-21 15:55:17 +02:00
TSC21 cafc2f5e61 add Copyright notice 2018-09-21 15:55:17 +02:00
TSC21 9b028e4f6d update copyright notice 2018-09-21 15:55:17 +02:00
TSC21 0bee156e8f remove unneeded condition verfication for the package 2018-09-21 15:55:17 +02:00
TSC21 57f5bb6290 generate_microRTPS_bridge.py: beautify 2018-09-21 15:55:17 +02:00
TSC21 6eda4feb20 use os.path.join() when possible 2018-09-21 15:55:17 +02:00
TSC21 8efb2bbe10 improve ImportError verbosity for yaml 2018-09-21 15:55:17 +02:00
TSC21 43f78705ab add option to set the msg IDL dir 2018-09-21 15:55:17 +02:00
TSC21 e3560795a1 make 'build' dir creation optional 2018-09-21 15:55:17 +02:00
TSC21 f43c581a8c add errno import for fixing script running over python 3 or above 2018-09-21 15:55:17 +02:00
TSC21 1ee6c03627 add --generate-yaml option 2018-09-21 15:55:17 +02:00
TSC21 5c80fe25f5 small typo fix 2018-09-21 15:55:17 +02:00
TSC21 2cc6c03a08 change argparse logic for idl generation 2018-09-21 15:55:17 +02:00
TSC21 eedb80f76d remove unnecessary 'nargs=1' from argparse 2018-09-21 15:55:17 +02:00
TSC21 bb835382dd use a yaml file description instead of json; minor improvements and cleanup 2018-09-21 15:55:17 +02:00
TSC21 7d40c4f97e fix templates dir 2018-09-21 15:55:17 +02:00
TSC21 a323073456 load RTPS msg IDs from a JSON file and remove uorb_rtps_message_ids.py 2018-09-21 15:55:17 +02:00
TSC21 943bfbf93f generalize scripts for usage outside the PX4 Firmware dir and with other templates/packages 2018-09-21 15:55:17 +02:00
Kunal Shah 7f016b5fd4 ROS multi-vehicle simulation: fixed udp port overlap issues 2018-09-21 09:01:47 +02:00
Beat Küng 370fddc115 omnibus: (temporarily) disable the topic listener
To reduce flash usage, until we can disable the FW & VTOL modules.
2018-09-20 11:14:02 +02:00
Daniel Agar 72489e27b3 px4fmu-v2 disable SRF02 ultra sonic range finder 2018-09-20 07:57:00 +02:00
mcsauder 0ecf6436f8 Modify 500001_axialracing_ax10 to utilize rc.ugv_defaults to allow deprecating rc.axialracing_ax10_apps and rc.axialracing_ax10_defaults and update CMakeLists.txt. 2018-09-19 14:07:30 -04:00
Matthias Grob 4863b3669b appveyor: switch to toolchain 0.4
with:
- shutdown command support in SITL
- pyyaml included for RTPS message generation
2018-09-19 14:06:46 -04:00
Roman e1992a5036 ROMFS: enable weathervane by default for VTOL
Signed-off-by: Roman <bapstroman@gmail.com>
2018-09-19 13:30:32 -04:00
mcsauder 39ee1926a2 Alphabetize hardware type logic blocks and sensor specific logic blocks in rc.sensors. 2018-09-19 13:17:10 -04:00
Daniel Agar cfac2cc38e uORB advertise through uORBDeviceMaster directly 2018-09-19 10:00:45 +02:00
Roman ad88ef14e1 weathervane: use a single parameter to enable
- in auto mode we always run weather vane
- in manual model we just use it in position control mode

Signed-off-by: Roman <bapstroman@gmail.com>
2018-09-19 08:27:07 +02:00
Roman ee5007e886 weathervane params: added unit tag and minor comment update
Signed-off-by: Roman <bapstroman@gmail.com>
2018-09-19 08:27:07 +02:00
Roman 96f3feb088 weathervane: get rid of passive strategy
Signed-off-by: Roman <bapstroman@gmail.com>
2018-09-19 08:27:07 +02:00
Roman 0e835cb498 Weathervane: pass quaterionon as constant reference
Signed-off-by: Roman <bapstroman@gmail.com>
2018-09-19 08:27:07 +02:00
Roman ccaeb58708 WeatherVane lib: address review comments 2018-09-19 08:27:07 +02:00
Roman ce7272a39c WeatherVane: calculate rotation matrix directly when updating
Signed-off-by: Roman <bapstroman@gmail.com>
2018-09-19 08:27:07 +02:00
Roman d6b6a1d0b3 addressed comments from review
Signed-off-by: Roman <bapstroman@gmail.com>
2018-09-19 08:27:07 +02:00
Roman 4ad11484ca mc_pos_control: moded weathervane parameters to weathervane lib
Signed-off-by: Roman <bapstroman@gmail.com>
2018-09-19 08:27:07 +02:00
Roman 8abcf2defa mc_pos_control: use weathervane library to make vehicle turn into relative wind
Signed-off-by: Roman <bapstroman@gmail.com>
2018-09-19 08:27:07 +02:00
Roman 6038c22174 added a weathervane library
- computes a yaw-rate setpoint that tries to rotate the nose of the vehicle
into the relative wind.

Signed-off-by: Roman <bapstroman@gmail.com>
2018-09-19 08:27:07 +02:00
Daniel Agar b1c6701f01 px4io driver use common error string 2018-09-19 08:26:32 +02:00
Daniel Agar 878bd43ad1 heater driver use common error string 2018-09-19 08:26:32 +02:00
Daniel Agar 67f1e63362 drivers don't print accel and gyro filter frequency 2018-09-19 08:26:32 +02:00
garfieldG f14125c160 Mavlink NuttX network support (#10200) 2018-09-18 23:29:58 -04:00
mcsauder 31f3bcfc3a Remove logic from rc.vehicle_setup that resulted in redundantly setting the MAV_TYPE to the same initial default value set within the script. 2018-09-18 22:49:01 -04:00
Daniel Agar e3ff623df5 README.md update Jenkins build status icon and url 2018-09-18 20:18:02 -04:00
mcsauder e79fa1773d Alphabetize vehicle type logic block order and Update param set MAV_TYPE logic to only set the parameter if no MAV_TYPE was previously set. 2018-09-18 19:46:59 -04:00
Daniel Agar c7e572d2c2 commander preflight check sensors via uORB instead of IOCTL
- remove all platform defines
2018-09-18 22:24:03 +02:00
ChristophTobler f72e9e4385 pmw3901: set quality to zero if flow below threshold 2018-09-18 18:37:44 +02:00
PX4 Build Bot a4a9b02ff1 Update submodule matrix to latest Tue Sep 18 12:37:50 UTC 2018
- matrix in PX4/Firmware (6a217407806bac38328cd12903ee3aff52df14b0): https://github.com/PX4/Matrix/commit/dc3af8097798881b9b2e72a029a3c6c10abd059b
    - matrix current upstream: https://github.com/PX4/Matrix/commit/30d5a794326f41286b387581f7c21f4bdb8fa696
    - Changes: https://github.com/PX4/Matrix/compare/dc3af8097798881b9b2e72a029a3c6c10abd059b...30d5a794326f41286b387581f7c21f4bdb8fa696

    30d5a79 2018-09-14 Bart Slinger - testing float/double with Type template
707e288 2018-09-13 Bart Slinger - explicit casting
480c5f1 2018-09-13 Bart Slinger - static assert M>=N. floats to Type, arguments as const reference
7495794 2018-09-12 Bart Slinger - test zero divisions
3f2d3cf 2018-09-12 Bart Slinger - fix a div/0 condition
983a3f0 2018-09-12 Bart Slinger - use Matrix and Vector class for A and tau
98b8e2d 2018-09-12 Bart Slinger - formatting
0009328 2018-09-09 Bart Slinger - least squares solver for MxN matrices using QR householder algorithm
2018-09-18 18:36:51 +02:00
Matthias Grob fbd175c0c9 posix-shell server: switch pipe flag to read/write
to make it non-blocking and ommit opening the same
named pipe multiple times inside the same process
which seems to be not supported in cygwin.
2018-09-18 18:24:07 +02:00
Oleg Kalachev 9887c463fd mavlink_receiver: fill some missing fields in OPTICAL_FLOW_RAD handler 2018-09-18 09:53:35 +02:00
TSC21 f0c231778f fix format 2018-09-18 09:52:33 +02:00
TSC21 9566804f8c fix small typo on PX4_ISFINITE covariance verification 2018-09-18 09:52:33 +02:00
TSC21 095cdeb4b0 add a local frame of reference field to vehicle_odometry 2018-09-18 09:52:33 +02:00
TSC21 cc73f214d1 add covariance matrices index aliases 2018-09-18 09:52:33 +02:00
TSC21 1cfaccfd7b mavlink_receiver: use typedef dcmf for DCM matrices 2018-09-18 09:52:33 +02:00
TSC21 1d10c5f740 vehicle_odometry: add timestamp field 2018-09-18 09:52:33 +02:00
TSC21 6329f1a38a small fix on cov passing loop 2018-09-18 09:52:33 +02:00
TSC21 746250d86d use static_assert over covariance matrices URT array size 2018-09-18 09:52:33 +02:00
TSC21 7db57bedb7 assert over the covariance matrices URT size matching 2018-09-18 09:52:33 +02:00
TSC21 eeca8d4efe position_estimator_inav: fix inverted logic for data validation check 2018-09-18 09:52:33 +02:00
TSC21 8325724079 general fixes on VIO data access 2018-09-18 09:52:33 +02:00
TSC21 7d7ee8e4bf small rebase fix 2018-09-18 09:52:33 +02:00
TSC21 88ffd047e0 lpe: mocap and vision: set common ref timestamp 2018-09-18 09:52:33 +02:00
TSC21 7629075cae lpe: sensors: mocap: fix global ref init logic 2018-09-18 09:52:33 +02:00
TSC21 f1e0310df2 fix rebase 2018-09-18 09:52:33 +02:00
TSC21 22b8fa0414 posix_configs: add LPE iris_vision config 2018-09-18 09:52:33 +02:00
TSC21 981fd98564 position_estimator_inav: simplify validation check 2018-09-18 09:52:33 +02:00
TSC21 5865a40bf3 attitude_estimator_q: add attitude data validation check 2018-09-18 09:52:33 +02:00
TSC21 6b2fb54963 attitude_estimator_q: use vehicle_visual_odometry topic to get the heading 2018-09-18 09:52:33 +02:00
TSC21 440ebfde02 remove att_pos_mocap uORB topics 2018-09-18 09:52:33 +02:00
TSC21 8dd610ab78 replay: subscribe to vehicle_visual_odometry 2018-09-18 09:52:33 +02:00
TSC21 2f5b16a5d3 mavlink_receiver: odometry handler: simplify quaternion init 2018-09-18 09:52:33 +02:00
TSC21 607be6791c ekf2: use fmaxf instead of fmax 2018-09-18 09:52:33 +02:00
TSC21 68fce26ae7 sdlog2: update log for new vehicle_odometry uORB topics 2018-09-18 09:52:33 +02:00
TSC21 efe312d4a6 style and format clean 2018-09-18 09:52:33 +02:00
TSC21 2cc193c173 lpe: mocap: fix enum constant in boolean context 2018-09-18 09:52:33 +02:00
TSC21 04dc6bc04a simulator: add ODOMETRY Mavlink msg handler 2018-09-18 09:52:33 +02:00
TSC21 cce36e69c8 position_estimator_inav: add vehicle_odometry usage; improve inout interface 2018-09-18 09:52:33 +02:00
TSC21 183a63cce9 purge vehicle_vision_position alias 2018-09-18 09:52:33 +02:00
TSC21 8f23a073a4 ekf2: add vehicle_odometry usage and data validation check; update replay as well 2018-09-18 09:52:33 +02:00
TSC21 048ff56890 lpe: add vehicle_odometry and data validation handlers; improve inout interface 2018-09-18 09:52:33 +02:00
TSC21 7303005373 mavlink_receiver: add ODOMETRY handler; use new visual_odometry uORB msg and aliases 2018-09-18 09:52:33 +02:00
TSC21 4816adcdee mavlink_receiver: remove attitude_quatertion_cov and local_position_ned_cov handlers 2018-09-18 09:52:33 +02:00
TSC21 939216d6ff add vehicle_odometry msg 2018-09-18 09:52:33 +02:00
mcsauder 0d0fcb140c Updated rc.vtol_defaults to correct PWM_AUX behavior for VTOL airframes. Added PWM_AUX_RATE to rc.vtol_default and set parameters directly instead of environment variables. 2018-09-17 20:28:09 -04:00
Daniel Agar 73deded106 Jenkins force push metadata git updates (Devguide, userguide, QGC) 2018-09-17 15:09:43 -04:00
David Sidrane 2d800885bc NXPHlite: rc.sensors start lis3mdl (#10500) 2018-09-17 13:29:08 -04:00
Roman Bapst f361749d70 mavlink temporary workarounds for dronekit: added parameters to disable (#10422)
hash check and heartbeat forwarding

- hash check disabling: for systems where a companion link forwards messages
to QGC (e.g. via LTE) parameter streaming will be stopped as soon as QGC
sends the request to stop the stream. If the companion side for some reason
still requires the stream to be active we need to disable QGC from stopping
the stream. Normally dronekit should be responsible for filtering out the
request from QGC but apparently this is not possible.

- disable heartbeat forwarding: dronekit does seem to get confused if
heartbeats from another system other than the autopilot get forwarded to it.
Example: Sending messages from QGC via the autopilot to dronekit running on
companion computer.

Signed-off-by: Roman <bapstroman@gmail.com>
2018-09-17 13:24:20 -04:00
David Sidrane c1df899b6f fxos8701cq: Fully remove the mag to facilitate calibration (#10499)
The previous removal of the mag was not complete. It just disabled publishing. This commit conditionally removes all the the mag functionality.
2018-09-17 13:07:46 -04:00
Roman e17f0802cc tecs msg: changed flight_path_angle to height rate as clearly we are
looking at height rates

Signed-off-by: Roman <bapstroman@gmail.com>
2018-09-17 10:27:08 -04:00
PX4 Build Bot dd63a634b2 Update submodule devices to latest Mon Sep 17 00:37:44 UTC 2018
- devices in PX4/Firmware (8158cdfcf4): https://github.com/PX4/GpsDrivers/commit/aef48b04ff9b95350c4e5e507eea72a9e971d6a4
    - devices current upstream: https://github.com/PX4/GpsDrivers/commit/657514b26a0bf1b1ea2bf723b18449b04248822c
    - Changes: https://github.com/PX4/GpsDrivers/compare/aef48b04ff9b95350c4e5e507eea72a9e971d6a4...657514b26a0bf1b1ea2bf723b18449b04248822c

    657514b 2018-08-02 Alexis Paques - Adding UBX_MSG_RTCM3_* for additional messages
f9cf788 2018-08-02 Alexis Paques - Adding RTCM3 class documentation reference
6009a29 2018-08-02 Alexis Paques - Adding RTCM3 available output message IDs
2018-09-17 08:16:20 +02:00
Dion Gonano c68146c510 Update src/lib/ecl submodule tracking for required hgtErr changes 2018-09-16 21:30:20 -04:00
Dion Gonano 7691990a50 Pass through horizontal and vertial covariances 2018-09-16 21:30:20 -04:00
Roman Bapst 8158cdfcf4 navigator: set yaw_valid flag in reposition triplet (#10294)
- yaw_valid flag was always left at false which made the position controller reject the yaw setpoint of the reposition command
2018-09-16 19:29:38 -04:00
bresch 740e409016 PWM - Add PWM_MIN and PWM_MAX parameters for MAIN and AUX (#10452) 2018-09-16 18:07:29 -04:00
Daniel Agar bcad940a9f pwm_out_sim lazily publish actuator_outputs 2018-09-17 00:06:52 +02:00
Daniel Agar 9580cb8d86 SITL plane cut throttle during landing final stage 2018-09-17 00:06:52 +02:00
Julian Oes 9f7f30a166 jmavsim_run.sh: fall back to Java 9 on macOS
This checks if we are on macOS and if we have Java 8 installed. If yes,
it falls back to Java 8 by setting JAVA_HOME.

This avoids https://github.com/PX4/jMAVSim/issues/81
2018-09-16 17:40:27 -04:00
Julian Oes fec3422f54 jmavsim_run.sh: fix shebang and exit on error 2018-09-16 17:40:27 -04:00
Julian Oes 1789083ab3 jMAVSim: update to latest master
This should resolve the issues with Java 9/10.
2018-09-16 17:40:27 -04:00
Lukas Woodtli 3d29e2e76f Fix some test code related leaks (#10488)
These leaks are not critical but the address-sanitizer complains.
And it's better programming practice anyway.

Signed-off-by: Lukas Woodtli <woodtli.lukas@gmail.com>
2018-09-16 17:38:50 -04:00
Daniel Agar 3996ab1fc5 frsky_telemetry increase MAIN stack 2018-09-16 17:16:59 -04:00
Lukas Woodtli c1a58bda17 Add address sanitizer to SITL pipeline
- Environment variables for building with asan
- Docker argument for leak sanitizer
- Regex for tests to fail on sanitizer error

Signed-off-by: Lukas Woodtli <woodtli.lukas@gmail.com>
2018-09-16 09:40:53 +02:00
David Sidrane eb4f847322 nxphlite-v3:Set UART4 to have the same bufffer sizes as TELEM1
Bring UART4 bufffer sizes in alignment with FMUv2 Telem1
2018-09-14 15:38:56 -04:00
David Sidrane 153d106969 fxas21002c:Add margin to stack from RTT-Stack check 2018-09-14 15:37:20 -04:00
David Sidrane e84a7dc140 fxos8701cq:Add margin to stack from RTT-Stack check 2018-09-14 15:37:20 -04:00
David Sidrane 82576c8d4c mtd:Add margin to stack from RTT-Stack check 2018-09-14 15:37:20 -04:00
Beat Küng e2973028ab sitl_run.sh: do not kill jmavsim if model is none
I sometimes start jmavsim independently from px4, and in that case jmavsim
should not be killed. These are the commands:
./Tools/jmavsim_run.sh
make posix none
2018-09-14 17:07:40 +02:00
PX4 Build Bot fea77690ae Update submodule sitl_gazebo to latest Fri Sep 14 12:42:47 UTC 2018
- sitl_gazebo in PX4/Firmware (031885f9a90e70cd8d8aa22c774dfca1bd0c8dfb): https://github.com/PX4/sitl_gazebo/commit/821c55ca714d7acf93d8ed96af71237b8437e488
    - sitl_gazebo current upstream: https://github.com/PX4/sitl_gazebo/commit/9d512af0075659f0ace91ec0e2f8c8a170f911fb
    - Changes: https://github.com/PX4/sitl_gazebo/compare/821c55ca714d7acf93d8ed96af71237b8437e488...9d512af0075659f0ace91ec0e2f8c8a170f911fb

    9d512af 2018-09-12 Lorenz Meier - Update gazebo_wind_plugin.cpp
46d0be1 2018-09-12 Lorenz Meier - Update Wind.proto
14f09ff 2018-09-03 Elia Tarasov - fix compilation for gazebo version equal or greater 9
de86d7b 2018-08-31 Elia Tarasov - use template class vector3d from ignition::math
f3cba29 2018-08-31 Elia Tarasov - enable wind plugin
2018-09-14 17:07:22 +02:00
Beat Küng 2d5b51ed8e run-shellcheck.sh: exclude .bin files 2018-09-14 17:06:19 +02:00
Beat Küng 84c6b5ac6b fmu-v2: add bootloader binary and SYS_BL_UPDATE param for BL updates
This allows a simple-to-use bootloader update mechanism to switch from
fmu-v2 to fmu-v3 target that has more flash.
2018-09-14 17:06:19 +02:00
Roman 5847ab4607 posix main.cpp: better reporting e.g. when there are permission problems
- if somebody tries to use the shell with insufficient permissions he will be told so

Signed-off-by: Roman <bapstroman@gmail.com>
2018-09-14 14:43:08 +02:00
Roman Bapst 2d59ead1bf simulator: add MAV_TYPE to module parameters (#10476)
- this ensures that the MAV_TYPE parameter is always updated
- previously it could happen that the simulator module was using a wrong
MAV_TYPE value because it only read the parameter value at initialisation

Signed-off-by: Roman <bapstroman@gmail.com>
2018-09-13 21:56:21 -04:00
David Sidrane 3022fdb240 test_file2:test fails due to missing slash 2018-09-13 12:15:03 -07:00
David Sidrane 22a65f6c1d fmu:Fix Safety switch breakage from bc9c25a
The update check is on ORB_ID(safety) but the copy
   was from ORB_ID(actuator_armed).
2018-09-13 11:21:53 -07:00
David Sidrane 698590a5b2 Update nuttx with hardfault fix for kinetis on i2c reset 2018-09-13 06:56:00 -07:00
David Sidrane be6f6126f4 px4io:Add passive support for Enter/Exit pwm test mode
Accept PWM_SERVO_[ENTER|EXIT]_TEST_MODE as a noop.
   As long as the mixer in passthrough and armed the
   pwm test will work.
2018-09-13 08:45:36 +02:00
David Sidrane b578419e09 Bug fix fmu hard fault on pwm info
A hardfault was happening on:
    fmu stop
    fmu mode_pwm
    pwm info

   The _mixer was null and being dereferenced to access the trim
   setting that were moved to the mixer from the fmu.

   This commit fixes that but making the getter issue a warning
   and the setter fail.
2018-09-13 08:45:36 +02:00
David Sidrane 945a532260 pwm:Use test mode in steps command 2018-09-13 08:45:36 +02:00
David Sidrane 49f1540c30 pwm:Add test mode 2018-09-13 08:45:36 +02:00
David Sidrane 73b9f09920 fmu:Add test mode 2018-09-13 08:45:36 +02:00
David Sidrane efb512abea drv_pwm_output:Define test enter/exit IOCTL 2018-09-13 08:45:36 +02:00
Daniel Agar a87e81c61b Jenkins update snapdragon docker to 2018-09-12 2018-09-12 15:02:03 -04:00
Daniel Agar 8b76a87f98 OSX setup helper install pip python dependencies with sudo 2018-09-12 10:06:41 -04:00
Daniel Agar 73fe4ecd20 AV-X enable GPS for rev C board 2018-09-12 02:39:03 -04:00
Daniel Agar 90b60d44dc Jenkins update docker containers to 2018-09-11 (#10463) 2018-09-12 00:05:22 -04:00
David Sidrane c41d7ebdd3 kinetis:Bug fix PWM led update
The code was forcing the CV reload, but not resettting the count
  this would cause short and long blinks during breathing.

  this change allows the CV to update at 50Hz (20 ms) asynchronously.
  So the LED update rate of 40Hz (25) will take effect on the next
  FTM counter change, end of the prescaler counting, after CnV register
  was written.update.
                   a   b   c   d
  LED PWM   ___-___-___-___-___-___-___-___-___-___
  LED Data  ____-____-____-____-____-____-____-____-
                 a    b    c    d
2018-09-12 01:03:22 +02:00
Daniel Agar 16a23c5527 ubuntu env setup script install python deps system wide in docker 2018-09-11 15:24:55 -04:00
Daniel Agar c7ff4a87a3 ubuntu env setup script add file utility
- needed for cmake packaging
2018-09-11 15:24:55 -04:00
David Sidrane 520a81a951 nxphlite-v3:Disable internal mag due to random spikes.
This will disable the fxos8701cq internal mag on
  the NXPHlite. There are random noise spikes on the
  HIGHRES_IMU.[x|y|x]mag. Even with all other SPI
  devices shut down, the noise is still present.
2018-09-11 06:58:35 -07:00
Julian Oes a9070ce6e6 sitl_run.sh: fix process grep for jMAVSim
It seems that the oneline to find the process ID of any running jMAVSim
instance was not working correctly.
1. On Linux, the name of the process does not contain Simulator but
   jmavsim_run.jar. Also, it triggers incorrectly, if you have opened
   Simulator.java using the command line :).
2. The cutting to get the PID at the end does not work as intenteded and
   gives the username instead of PID, at least on Arch Linux. Using awk
   should fix this.
2018-09-11 14:09:41 +02:00
Daniel Agar c886d8d9af Jenkins SITL tests build grab all tags 2018-09-10 16:27:21 -04:00
Daniel Agar 33e68b3331 update ubuntu.sh setup script and python requirements.txt 2018-09-10 13:50:18 -04:00
Daniel Agar 40a68624e5 tests command ignore -Wunused-variable (#10442) 2018-09-10 11:24:57 -04:00
Hamish Willee dc878f43a8 Param docs explain how create (#10439)
This adds text to markdown output to explain how params are generated
2018-09-10 09:38:41 -04:00
Daniel Agar 56723b2ece AV-X initial networking support 2018-09-07 16:50:32 -07:00
Beat Küng 8e563c29cb DriverFramework: update submodule
MPU6050: fix implicit float to double conversion
2018-09-06 18:10:35 +02:00
Beat Küng c5b954dacc heater: fix resource leak 2018-09-06 12:20:08 +02:00
mcsauder 615348189e Remove doxy comments from private member variables. 2018-09-06 12:03:26 +02:00
mcsauder e7666aa5d8 Added an imu heater driver, formatted whitespace, standardized comments, and added doxy documentation. 2018-09-06 12:03:26 +02:00
PX4 Build Bot 039221fa93 Update submodule DriverFramework to latest Thu Sep 6 04:08:26 EDT 2018
- DriverFramework in PX4/Firmware (060463e8a7): https://github.com/PX4/DriverFramework/commit/b439556d54aa53532586e69de87cc720af4543c2
    - DriverFramework current upstream: https://github.com/PX4/DriverFramework/commit/c85f446f3ae3aa7707b4dfaf20486b0b75897042
    - Changes: https://github.com/PX4/DriverFramework/compare/b439556d54aa53532586e69de87cc720af4543c2...c85f446f3ae3aa7707b4dfaf20486b0b75897042

    c85f446 2018-09-06 Daniel Agar - mpu6050 fix abs double promotion
2018-09-06 01:36:06 -07:00
Daniel Agar 060463e8a7 parameters lib convert to c++ (#10267) 2018-09-04 09:18:28 -04:00
mcsauder 0c08b7035b Edit the init.d-posix files to set MAV_TYPE script variables, and alphabetize lists in a few places. 2018-09-04 10:23:27 +02:00
mcsauder 4ea3306ec2 Set parameters directly rather than script variables in VTOL airframe config files and alphabetize lists. 2018-09-04 10:23:27 +02:00
fredowski ad6e48c372 cmake - check directory existence before copy_directory (#10402)
Starting with cmake version 3.12 the cmake -E copy_directory
command fails if the source directory does not exist. This results
in a build failure. This fix creates the source directory before
the copy which does not harm if the source directory exists.

Closes: #10368
2018-09-03 20:27:32 -04:00
Beat Küng e5a7945ad2 cmake configs: remove posix_sitl_ekf2.cmake
Not needed anymore, use PX4_ESTIMATOR.
2018-09-03 09:01:50 -04:00
Daniel Agar d32fd27129 Jenkins SITL tests restore try to always analyze 2018-09-02 20:50:52 -04:00
Daniel Agar d7580aa676 px4fmu-v5 increase CONFIG_USERMAIN_STACKSIZE slightly 2018-09-02 16:41:41 -04:00
Daniel Agar 8fbeb6f717 cmake px4_add_git_submodule set USES_TERMINAL
- this allows interacting with the submodules check
2018-09-02 16:28:45 -04:00
Daniel Agar d6fd1c4811 rgbled_pwm increase MAIN stack 2018-09-02 16:15:03 -04:00
Daniel Agar 2dbc95382e rgbled increase MAIN stack 2018-09-02 16:15:03 -04:00
Daniel Agar ee90eb6c92 IST8310 increase MAIN stack 2018-09-02 16:15:03 -04:00
Daniel Agar 6abd0c2672 BMI055 increase MAIN stack 2018-09-02 16:15:03 -04:00
Daniel Agar ab8bf09996 tests cmd remove unused stack module option 2018-09-02 15:31:54 -04:00
Daniel Agar ea73284a1f uORB tests increase stack sizes 2018-09-02 15:31:54 -04:00
Daniel Agar 1a0472dfab sensors increase MAIN stack 2018-09-02 15:31:54 -04:00
Daniel Agar 2dd71fa73c mpu6000 increase MAIN stack 2018-09-02 15:31:54 -04:00
Daniel Agar b75fa645ce bmp280 increase MAIN stack 2018-09-02 15:31:54 -04:00
Daniel Agar 34da02f41b Jenkins compile add px4fmu-v5_stackcheck 2018-09-02 15:31:54 -04:00
Daniel Agar ac298664c7 nuttx-configs increase idle thread stack size to 750 bytes 2018-09-02 15:31:54 -04:00
Daniel Agar 55abaaf6ab uORB printf map extend floating point decimal places 2018-09-02 21:13:10 +02:00
Daniel Agar af6098b9ea uORB print_message add device_id pretty print 2018-09-02 21:13:10 +02:00
Daniel Agar 7cc0e69fcd add px4fmu-v{3,4,5} stackcheck configs 2018-09-02 14:16:04 -04:00
Daniel Agar 7e12815f81 Mavlink add RADIO_STATUS timeout and reset 2018-09-02 19:48:10 +02:00
Daniel Agar 930ac8d4fe Mavlink set telemetry_status type properly for Sik radios
- remove radio_status type since there's no type support in mavlink
2018-09-02 19:48:10 +02:00
PX4 Build Bot 4630b60c41 Update submodule ecl to latest Sat Sep 1 18:41:45 UTC 2018
- ecl in PX4/Firmware (e421c254e2): https://github.com/PX4/ecl/commit/3c74dc2ce1002db5b68a833fdd0aa964210e91f5
    - ecl current upstream: https://github.com/PX4/ecl/commit/b861594d0b2f8c476cb758f9ae22c83e14920dfe
    - Changes: https://github.com/PX4/ecl/compare/3c74dc2ce1002db5b68a833fdd0aa964210e91f5...b861594d0b2f8c476cb758f9ae22c83e14920dfe

    b861594 2018-09-01 Paul Riseborough - EKF:  enable optical flow use to bootstrap
2018-09-01 15:05:39 -04:00
PX4 Build Bot e421c254e2 Update submodule genmsg to latest Fri Aug 31 21:30:44 UTC 2018
- genmsg in PX4/Firmware (92b52c56af728741b4ac9f57e583350b0fcd7c3b): https://github.com/ros/genmsg/commit/a189fc78558e7276df59d2961cfe4f8b4de08a8b
    - genmsg current upstream: https://github.com/ros/genmsg/commit/42e364661025b8f3d51486dc513d9e29cbd308da
    - Changes: https://github.com/ros/genmsg/compare/a189fc78558e7276df59d2961cfe4f8b4de08a8b...42e364661025b8f3d51486dc513d9e29cbd308da

    42e3646 2018-08-27 Jochen Sprickerhof - Use CATKIN_GLOBAL_ETC_DESTINATION for etc (#79)
2018-08-31 18:51:44 -04:00
Daniel Agar 47db2a28e1 Update submodule mavlink v2.0 to latest Fri Aug 31 21:30:38 UTC 2018 (#10387)
- v2.0 in PX4/Firmware (21f6ca4a1f): https://github.com/mavlink/c_library_v2/commit/fe2349dea9a88fb5b873eff2a59a88125943fd61
    - v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/d8fcf0a694dc11b3f83b89a0970e3d8c4e48d418
    - Changes: https://github.com/mavlink/c_library_v2/compare/fe2349dea9a88fb5b873eff2a59a88125943fd61...d8fcf0a694dc11b3f83b89a0970e3d8c4e48d418

d8fcf0a 2018-08-30 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/580a9ce77f3653d04937c9703dbd7fb31bf0ef33
189a1d8 2018-08-27 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/1a55f0bf6101d87ee50a92869c6a31a855526fd2
2018-08-31 18:50:26 -04:00
PX4 Build Bot cbd1636d8d Update submodule matrix to latest Fri Aug 31 21:31:02 UTC 2018
- matrix in PX4/Firmware (468f28463eabc30843e606546d642adc1a62fe10): https://github.com/PX4/Matrix/commit/b815fc97c4e686a93a8074f27d1830a031b0d38d
    - matrix current upstream: https://github.com/PX4/Matrix/commit/dc3af8097798881b9b2e72a029a3c6c10abd059b
    - Changes: https://github.com/PX4/Matrix/compare/b815fc97c4e686a93a8074f27d1830a031b0d38d...dc3af8097798881b9b2e72a029a3c6c10abd059b

dc3af80 2018-08-27 Daniel Agar - constructors use array size rather than pointers
f1bee77 2018-08-27 Daniel Agar - use default constructors and skip unnecessary initialization
1bcf48b 2018-08-30 Daniel Agar - Quaternion from_dcm don't pass by value
2018-08-31 18:48:58 -04:00
PX4 Build Bot ee51fcb3c0 Update submodule ecl to latest Fri Aug 31 21:30:56 UTC 2018
- ecl in PX4/Firmware (95b83ba29715c067a30cb9501cab51264db502f1): https://github.com/PX4/ecl/commit/56b8bb08a16f0e86f7c7dfe458f0d2d3082e92e4
    - ecl current upstream: https://github.com/PX4/ecl/commit/3c74dc2ce1002db5b68a833fdd0aa964210e91f5
    - Changes: https://github.com/PX4/ecl/compare/56b8bb08a16f0e86f7c7dfe458f0d2d3082e92e4...3c74dc2ce1002db5b68a833fdd0aa964210e91f5

    3c74dc2 2018-08-30 Daniel Agar - ECL_Controller base needs virtual destructor
0d39072 2018-08-30 Daniel Agar - EKF add missing header guards
a6a1edb 2018-08-30 Kabir Mohammed - EKF : Fix type of flow data navigation variable (#499)
a53ad9c 2018-08-25 Paul Riseborough - EKF: Add missing optical flow ground motion protection
2018-08-31 18:47:11 -04:00
Daniel Agar c76187dbbb Update submodule nuttx to latest Fri Aug 31 21:30:51 UTC 2018 (#10385)
- nuttx in PX4/Firmware (0a1a2025402a387cde88132c6f8d8cc7237d2e6b): https://github.com/PX4-NuttX/nuttx/commit/bf8cce85c3f9310bcff8cdd1d979270419782a6e
    - nuttx current upstream: https://github.com/PX4-NuttX/nuttx/commit/e3b5b667aee16a699ecd6605f2d2a4adc6e95c17
    - Changes: https://github.com/PX4-NuttX/nuttx/compare/bf8cce85c3f9310bcff8cdd1d979270419782a6e...e3b5b667aee16a699ecd6605f2d2a4adc6e95c17

e3b5b66 2018-08-31 Daniel Agar - [BACKPORT] Merged in dagar/nuttx/pr-stm32f7_stackcheck-upstream (pull request #714)
2018-08-31 18:44:34 -04:00
Martina Rivizzigno 21f6ca4a1f mc_pos_control: fix desired trajectory waypoint. (#10372)
- The first waypoint contains the vehicle current position and the desired velocity setpoint
2018-08-31 17:28:15 -04:00
David Sidrane 1b6e933176 Make.defs.in:Runtime Stack Checking in Nuttx Build
Use CONFIG_ARMV7M_STACKCHECK to add the instrumentation
  for runtime stack checking
2018-08-31 13:03:39 -07:00
David Sidrane 4f2aa51767 px4_impl_os:Use the defconfig CONFIG_ARMV7M_STACKCHECK
To enable coherent runtime stack checking use the boards
  CONFIG_ARMV7M_STACKCHECK setting
2018-08-31 13:03:39 -07:00
Daniel Agar a6dabbbae7 Landing slope move to standalone library
- this is shared by both the FW position controller and navigator's
   missiong feasibility checker
2018-08-31 14:43:51 -04:00
Daniel Agar 5207c420c3 generic position controller status/feedback message 2018-08-31 14:43:51 -04:00
Daniel Agar 223dacee64 multicopter position controller use const references 2018-08-31 14:37:49 -04:00
Beat Küng e26bfd2e79 SITL: remove config_sitl_rcS_dir
Not needed anymore
2018-08-31 14:21:56 -04:00
Beat Küng 47094aa1f8 cmake configs: remove unneeded sitl files
This is all done through posix_sitl_default.cmake and env variables:
- PX4_ESTIMATOR
- replay
2018-08-31 14:21:56 -04:00
Beat Küng 1a4396c15e param_shmem: rename exit to do_exit 2018-08-31 18:11:58 +02:00
Beat Küng 4e6139d9fb Posix: add '#pragma GCC poison exit'
Generally exit() should not be used on Posix, because it exits the whole
program instead of only the task.
2018-08-31 18:11:58 +02:00
Beat Küng 9193312bd0 segway_main: avoid using exit() 2018-08-31 18:11:58 +02:00
Beat Küng 0dc8eeb118 tests: avoid using exit() 2018-08-31 18:11:58 +02:00
Beat Küng 50cdb01141 rover_steering_control: avoid using exit() 2018-08-31 18:11:58 +02:00
Beat Küng 258f7a7ff8 fixedwing_control: avoid using exit() 2018-08-31 18:11:58 +02:00
Beat Küng d5bef4a932 sf0x.cpp: avoid using exit() 2018-08-31 18:11:58 +02:00
Beat Küng fe502ffd33 fix tone_alarm: avoid using exit()
On POSIX it exits the process.
2018-08-31 18:11:58 +02:00
David Sidrane 9246110161 samv7:tone_alarm refactor for Cdev 2018-08-30 19:11:17 +02:00
David Sidrane 75d7800deb samv7:tone_alarm cleanup 2018-08-30 19:11:17 +02:00
David Sidrane 1306e28874 kinetis:tone_alarm remmove assert 2018-08-30 19:11:17 +02:00
David Sidrane a0f70be238 stm32:tone_alarm remmove assert 2018-08-30 19:11:17 +02:00
David Sidrane a063de093a posix:tonealrmsim: use workqueue 2018-08-30 19:11:17 +02:00
David Sidrane 19a8c3e49c rcs:Add comment & test 4 Mini test on all px4io init 2018-08-30 19:11:17 +02:00
David Sidrane c072fefa2c px4fmu_common:rcS:Use tune control, suport FW with no PX4IO
On FW with a px4io bin file, but not a px4io do not error

   Use tune control and have all paths in rcS indicate tunes
2018-08-30 19:11:17 +02:00
David Sidrane 6a7d98229e tap_common rcS:Use tune_control & clean up 2018-08-30 19:11:17 +02:00
David Sidrane b9a54cb4fd tap_common rc.interface:Use tune_control 2018-08-30 19:11:17 +02:00
David Sidrane 91abb36063 px4fmu_test:rcS:Use tune_control 2018-08-30 19:11:17 +02:00
David Sidrane a2dde6bc19 rc.mavlink:Use tune_control 2018-08-30 19:11:17 +02:00
David Sidrane 7d3d497831 rc.io:Use tune_control 2018-08-30 19:11:17 +02:00
David Sidrane f5295d7700 rc.interface:Use tune_control 2018-08-30 19:11:17 +02:00
David Sidrane ab26bd76ff tunes:Refactor for maintenance
Adds a single file definition to provide a single point to add
    new tunes and clearly understand, the useage: it need to be
    stopped will it not allow interruption.
2018-08-30 19:11:17 +02:00
David Sidrane 250c561963 posix simulated tone_alarm: Use tune_control
Refactor to use the tune_control interface
2018-08-30 19:11:17 +02:00
David Sidrane 1fb7046052 stm32 tone_alarm: Remove stale documentation & cleanup
Since tune control came in this driver does not have a
    have a test based interface. The module Documentation
    has been moved to tune_control

    minor cleanup and assert on workque delay of 0
2018-08-30 19:11:17 +02:00
David Sidrane ec25e4b913 stm32 tone_alarm: Remove stale documentation
Since tune control came in this driver does not have a
    have a test based interface. The module Documentation
    has been moved to tune_control
2018-08-30 19:11:17 +02:00
David Sidrane 040ffd52a1 samv7:tone_alarm:ported to tune_control 2018-08-30 19:11:17 +02:00
David Sidrane 43e60b98aa kinetis tone_alarm: Remove stale documentation & cleanup
Since tune control came in this driver does not have a
    have a test based interface. The module Documentation
    has been moved to tune_control

    minor cleanup and assert on workque delay of 0
2018-08-30 19:11:17 +02:00
David Sidrane 6b4e549ba9 kinetis tone_alarm: Remove stale documentation
Since tune control came in this driver does not have a
    have a test based interface. The module Documentation
    has been moved to tune_control
2018-08-30 19:11:17 +02:00
Daniel Agar 99ed46949e uORB_tests print pointer correctly 2018-08-30 19:04:13 +02:00
Daniel Agar d11c6af923 FlightTaskAuto don't pass position setpoint by value 2018-08-30 19:04:13 +02:00
Daniel Agar 12dd9b475e tfmini add missing PX4_ERR argument 2018-08-30 19:04:13 +02:00
Daniel Agar 323ba9f837 batt_smbus.h missing header guard 2018-08-30 19:04:13 +02:00
Daniel Agar ad321c8824 parameters test save restored parameters when finished 2018-08-30 11:29:39 -04:00
Daniel Agar 8ddb99971f tests template skip mavlink except for mavlink test 2018-08-30 11:13:24 -04:00
Roman 844671ed6d mavlink: moved to ModuleParams
Signed-off-by: Roman <bapstroman@gmail.com>
2018-08-30 11:13:24 -04:00
Daniel Agar d131fea899 vehicle trajectory limit unnecessary updates and reduce logging (#10347)
- fixes #10345
2018-08-30 09:21:13 -04:00
Paul Riseborough 94d953eef2 Tools: Fix EKF data analysis false positives
The high frequency acceleration noise levels in the gazebo models and also seen on some hardware is causing the IMU vibration check warning to fail.

The thresholds have been lifted and the reporting improved to make it clearer which sensor noise is causing the failure.
2018-08-30 09:57:18 +02:00
Bram Strack van Schijndel ca446982ab [Bebop 2] also upload mixer and config files 2018-08-30 09:48:26 +02:00
Bram Strack van Schijndel 918c397ae7 fixup! [Bebop 2] don't strip and upload to /data/ftp/internal_000 2018-08-30 09:48:26 +02:00
Bram Strack van Schijndel 0b6dc65e3c [Bebop 2] fix upload 2018-08-30 09:48:26 +02:00
Bram Strack van Schijndel b678f8bc5b [Bebop 2] don't strip and upload to /data/ftp/internal_000 2018-08-30 09:48:26 +02:00
Dennis Mannhart 16ca0be4e5 FlightTaskAuto: set reference to 0 if auto is requested but no global position available 2018-08-30 09:44:54 +02:00
Dennis Mannhart 3222f583c8 use matrix .zero 2018-08-30 09:27:48 +02:00
Dennis Mannhart e2e8d6d135 mc_pos_control_main: fix comment and remove line that is not used 2018-08-30 09:27:48 +02:00
Dennis Mannhart a24fdb93c3 FlightTaskManual: increase rc timeout to 1.5 x COM_RC_LOSS_T 2018-08-30 09:27:48 +02:00
Dennis Mannhart 1f1c9fde01 FlightTaskAuto: lock yaw once within acceptance radius 2018-08-30 09:27:48 +02:00
Dennis Mannhart 72f1fca55c mc_pos_control: lower LOITER_TIME_BEFORE_DESCEND from 1 second to 0.2 2018-08-30 09:27:48 +02:00
Dennis Mannhart 8714b216b0 FlightTaskFailsafe: comments and land with land speed if velocity in z is valid but altitude not 2018-08-30 09:27:48 +02:00
Dennis Mannhart 3d250b3b83 FlightTaskAutoLine: don't update yaw if waypoints are too close together 2018-08-30 09:27:48 +02:00
Dennis Mannhart 81c5025ad8 mc_pos_control: enter FlighttaskFailsafe if Flighttask wants to be started, but all of
the Flighttask fail. A failure of the Flighttask can occur if the demanded Flighttask does
not have the required data.
2018-08-30 09:27:48 +02:00
Dennis Mannhart 06c10f61c1 mc_pos_control: go into Failsafe only after 1 second flighttask.update() continous to fail 2018-08-30 09:27:48 +02:00
Dennis Mannhart 4d9f96bfbd FlightTaskFailure: will hover if position available, will land if velocity valid and
will land with 0.3 of hover thurst if position nor velocity is valid
2018-08-30 09:27:48 +02:00
Julian Oes d370a7c2b5 commander: remove unused HITL transition function
To my knowledge this hil transition function is not used anymore,
however, it makes sending the DO_SET_MODE command unnecessarily complex.
In my opinion the DO_SET_MODE command should only change the mode but
not other things like arming (already removed) and HITL state (this
commit).

Often times, I was seeing the error message "Set SYS_HITL to 1 and
reboot to enable HITL." when using QGC with a vehicle in HITL.

HITL is set via parameter which then has an impact in the startup script
where the CLI argument `-hil` is added to some of the commands that
require it (like commander as well).
2018-08-30 09:16:02 +02:00
Julian Oes f3e576b6f4 commander: remove set but unused HITL flag
This flag does not seem to be used anywhere.
2018-08-30 09:16:02 +02:00
Matthias Grob c87e124f13 commander: refactor COM_DISARM_LAND to param wrapper
after review comment request from @dagar. Thanks!
2018-08-30 08:05:13 +02:00
Matthias Grob 0c6bffb66a commander: make auto disarm timeout float
such that fractions of a second are configurable
2018-08-30 08:05:13 +02:00
Daniel Agar 658b957888 Jenkins build and archive all packages (#10332) 2018-08-29 12:31:14 -04:00
alessandro 74785f75bd ControlMath: Initialize vehicle_attitude_setpoint 2018-08-29 17:41:11 +02:00
Daniel Agar 715fad8bf1 commander send_vehicle_command don't ignore cmd argument
- #10359
2018-08-29 16:05:14 +02:00
mcsauder bf87270ded Doxy documenting in send_event.cpp/h and px4_module.h. 2018-08-29 09:50:21 +02:00
Jake Dahl 5a678295b3 added a check to ensure the initialize settings function succeeds. If it does not, the driver fails gracefully. This handles the case that the device is not there. 2018-08-28 18:52:23 -04:00
Kevin Lopez Alvarez c10ea132b4 PNI RM3100 magnetometer driver (#10302)
* tested on SPI (px4fmu-v4pro)
 * WIP I2C support
2018-08-28 11:44:34 -04:00
bresch 124a34e8f6 Failure Detector - Add space between Failure and Detector in @group field 2018-08-28 11:23:25 -04:00
bresch 9be0c97346 Failure Detector - use bitmask field instead of boolean in vehicle_status msg (failure_detector_status) and instead of struct in class 2018-08-28 11:23:25 -04:00
bresch 0001031e59 Failure Detector - Rename parameters and change group 2018-08-28 11:23:25 -04:00
bresch 93ba11c218 Failure Detector - Move COM_FAIL_x params to dedicated _param.c file 2018-08-28 11:23:25 -04:00
bresch 92b00ec07e Failure Detector - Do not trigger force_failsafe flag anymore 2018-08-28 11:23:25 -04:00
bresch fea91c96e8 Failure Detector - Use dedicated parameters for attitude checks 2018-08-28 11:23:25 -04:00
bresch 72f2317c95 Failure Detector - move "force_failsafe" flag inside circuit_breaker protection; remove PX4_WARN and send mavlink msg only once 2018-08-28 11:23:25 -04:00
bresch 9a6fef62ab Vehicle_Status_msg - Add attitude_failure flag to vehicle_status message 2018-08-28 11:23:25 -04:00
bresch c4c8e8d2db Failure Detector - Various cleanup and style changes.
- use pragma once guard in FailureDetector.hpp
- send Commander parent to ModuleParams and remove update_params() method
- simplify attitude checks
- FailureDetector::get_status() (previously named "get") is now a constant method that returns a constant reference
2018-08-28 11:23:25 -04:00
bresch 04c765f497 Failsafe PWM - Add PWM_MAIN/AUX_FAILx parameters to set "failsafe" values. 2018-08-28 11:23:25 -04:00
bresch b0bbc56d12 NullMixer - Send NAN instead of 0. NAN is mapped to disarmed in fmu and io. A Null mixer can now be used to set a fixed value: "disarmed" if the system is operational or "failsafe" in failsafe mode 2018-08-28 11:23:25 -04:00
bresch 4e1027f292 FailureDetector - Add check for non-zero roll/pitch failure parameters. Rename 'result' into 'updated' 2018-08-28 11:23:25 -04:00
bresch 246b3ebc23 FailureDetector - Update failure detector logic in commander. 2018-08-28 11:23:25 -04:00
bresch 7908f75b8b FailureDetector - New class, first working simple implementation. Outputs PX4_ERR messages if roll or pitch is exceeded. 2018-08-28 11:23:25 -04:00
Sebastian Verling d3bb3631ec fixed sign error in mag calibration 2018-08-28 14:28:35 +02:00
Paul Riseborough ad1c2b31d1 drivers: Always set GPS heading to NAN if not updated 2018-08-28 14:10:36 +02:00
Paul Riseborough b2c7b44935 drivers: Prevent duplicate reporting of GPS heading 2018-08-28 14:10:36 +02:00
Dennis Mannhart 3ff8cd33a1 mc_pos_control: smooth takeoff requires current position as reference 2018-08-28 10:14:54 +02:00
Daniel Agar 6142e2c4b8 uavcannode move to cdev lib 2018-08-28 09:17:53 +02:00
Daniel Agar 087c8cacb5 uavcanesc move to cdev lib 2018-08-28 09:17:53 +02:00
Daniel Agar 82ad7d77fa airspeedsim move to cdev lib 2018-08-28 09:17:53 +02:00
Daniel Agar 4da5e61f4a uavcan move to cdev lib 2018-08-28 09:17:53 +02:00
Daniel Agar d0d1967a65 samv7 adc and tone_alarm move to cdev lib 2018-08-28 09:17:53 +02:00
Daniel Agar 1e7197976d bmp280 move to cdev library 2018-08-28 09:17:53 +02:00
Daniel Agar df96cd2873 terrain_estimator construct Vector3f safely 2018-08-27 16:33:38 -04:00
Daniel Agar acff200f0d FlightTasks safer matrix usage 2018-08-27 16:33:38 -04:00
Jake Dahl 507a872546 Made changes as requested by the dev team. 2018-08-27 21:15:04 +02:00
Jake Dahl 07d606ef83 Added TI PGA460 driver functionality to PX4. 2018-08-27 21:15:04 +02:00
Daniel Agar 61db21b7f0 syslink cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar e4b9891259 led cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar 98a16fdc23 iridiumsbd cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar a40161a3ec tap_esc cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar 6e97194ce6 drivers/stm32 cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar 6ee47eef14 px4io cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar 01595947e5 px4fmu cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar 7d57ce65dc px4flow cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar 51faca0f66 pwm_out_sim cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar 3d6c1690c9 pwm_input cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar 0ff1effd98 protocol_splitter cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar fa9b968a16 ulanding cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar f2ef8708b2 tfmini cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar 483bacad87 teraranger cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar cfe34ee19c srf02 cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar ebcd3b0b2e sf1xx cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar 8cb222494a sf0x cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar 9a2def25f3 mb12xx cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar bdba733dd4 ll40ls cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar 585d3bbe55 leddar_one cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar b7bf2dd688 hc_sr04 cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar 43965c6e10 batt_smbus cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar 9b2274ea8d ms5611 cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar 1a5ffb3173 mpl3115a2 cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar 85a11fc3c3 lps25h cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar 9cc5453163 lps22hb cleanup unnecessary Device CDev usage 2018-08-27 13:14:15 -04:00
Daniel Agar dbf2d25e2f uORB move to standalone CDev
- uORB topics should not be Devices with bus, address, device id
2018-08-27 13:14:15 -04:00
Daniel Agar a2f4757e31 CDev extract from drivers Device class hierarchy
- leave CDev shim for now until all usage is updated
2018-08-27 13:14:15 -04:00
ChristophTobler 6955272316 pmw3901: add specs from datasheet to opt flow msg
without this ekf2 rejects flow
https://wiki.bitcraze.io/_media/projects:crazyflie2:expansionboards:pot0189-pmw3901mb-txqt-ds-r1.00-200317_20170331160807_public.pdf
2018-08-27 17:32:00 +02:00
Hamish Willee bbc0c28c2c Improve docs for SD Log profile 2018-08-27 09:38:00 +02:00
Daniel Agar f7a20acba6 [WIP] Jenkins code coverage updates 2018-08-27 00:04:58 +02:00
PX4 Build Bot 8731a5b2b1 Update submodule ecl to latest Sun Aug 26 01:37:45 UTC 2018
- ecl in PX4/Firmware (e4088204ee): https://github.com/PX4/ecl/commit/aa134d5a617cd90142d82039c4466aef2f009383
    - ecl current upstream: https://github.com/PX4/ecl/commit/56b8bb08a16f0e86f7c7dfe458f0d2d3082e92e4
    - Changes: https://github.com/PX4/ecl/compare/aa134d5a617cd90142d82039c4466aef2f009383...56b8bb08a16f0e86f7c7dfe458f0d2d3082e92e4

    56b8bb0 2018-08-23 dakejahl - added a checking for range_aid to determine if we are relying on the range finder as our primary source of height observation (#491)
2018-08-26 12:05:46 +02:00
Lorenz Meier 1d027f938c tfmini: fix format and fix driver start / stop logic so it works when running PX4 as threads on Linux. 2018-08-26 12:05:09 +02:00
Mohammed Kabir 38bae7d401 tfmini : restructure parsing logic to always publish latest measurement 2018-08-26 12:05:09 +02:00
Mohammed Kabir 3afa018954 tfmini : fix scheduling and modernize output
This reduces the scheduling interval to 9ms, such that the driver is always ready to read new data. Running it at exactly 100Hz is not correct since the driver and sensor measurement intervals are not "in sync", causing the driver to miss data. This causes a fill-up of the UART buffer.
2018-08-26 12:05:09 +02:00
Daniel Agar e4088204ee shellcheck ignore array references for now (SC2039) and run everywhere 2018-08-25 20:12:29 +02:00
Daniel Agar 52e1b59e60 cmake add nuttx shellcheck helper 2018-08-25 20:12:29 +02:00
Daniel Agar 096c41b041 init.d-posix/rcS replace bashism 'source' with '.' 2018-08-25 20:12:29 +02:00
Daniel Agar 642aff9786 init.d-posix replace bashism '==' with '=' 2018-08-25 20:12:29 +02:00
Daniel Agar 3c4c9131aa Jenkins add ShellCheck 2018-08-25 20:12:29 +02:00
PX4 Build Bot 2164ef8fb6 Update submodule nuttx to latest Sat Aug 25 15:12:57 UTC 2018
- nuttx in PX4/Firmware (72792cef43): https://github.com/PX4-NuttX/nuttx/commit/bf8cce85c3f9310bcff8cdd1d979270419782a6e
    - nuttx current upstream: https://github.com/PX4-NuttX/nuttx/commit/bf8cce85c3f9310bcff8cdd1d979270419782a6e
    - Changes: https://github.com/PX4-NuttX/nuttx/compare/bf8cce85c3f9310bcff8cdd1d979270419782a6e...bf8cce85c3f9310bcff8cdd1d979270419782a6e
2018-08-25 11:23:25 -04:00
Daniel Agar 72792cef43 posix-configs shell scripts use /bin/sh to maximize compatibility (#10292)
- fix ocpoc line endings
2018-08-25 11:02:37 -04:00
David Sidrane e79b9a2c1b Update nuttx with backport Kinetis i2c fix (#10325) 2018-08-25 10:10:02 -04:00
Daniel Agar efbe63c1ca Jenkins update CMAKE_BUILD_TYPE to PX4_CMAKE_BUILD_TYPE 2018-08-25 00:46:36 -04:00
Daniel Agar 92d288e8d4 Jenkins SITL tests add cmake build type choice 2018-08-25 00:26:41 -04:00
David Sidrane 28125aca3d fxos8701cq:Clean up & paramater based low pass fileter
Added paramater based low pass fileter settting from
      IMU_ACCEL_CUTOFF.

      removed gotos.
2018-08-24 23:09:55 +02:00
David Sidrane 3f65efe1b0 fxas21002c:Clean and speed up with SW, HW LPF.
Added paramater based low pass fileter settting from
  IMU_GYRO_CUTOFF.

  Added interfaces for setting the HW low pass filter.
  Set HW LPF to 64 Hz

  Changed poll rate to ODR to 800 Hz.

  Documeted the TIMER_REDUCTION value as 20% and changed it to
  250 Us / 1250 us.

  Added standby control API, to insure chip is configured in
  standby mode.

  removed tabs.

  removed gotos.
2018-08-24 23:09:55 +02:00
mcsauder de92e699bf Doxy documentation work in px4_module_params.h and px4_module.h. 2018-08-24 23:07:01 +02:00
Philipp Oettershagen c997159e32 Fixed-wing autoland: Introduce parameter to enable/disable the early activation of the landing configuration 2018-08-24 10:13:07 -04:00
Philipp Oettershagen 334aa57a5f Fixed-wing autoland: Remove the dynamic altitude acceptance calculation and just use a simple separate landing altitude acceptance radius instead. This gives users that do not use LOITER-TO-ALT waypoints more control over their landing procedure 2018-08-24 10:13:07 -04:00
Philipp Oettershagen 953cff7ba0 Fixed-wing autoland: Parameter description fixes 2018-08-24 10:13:07 -04:00
Philipp Oettershagen 20c02ae093 Fixed-wing autoland: Adapt according to @dagar's and @antiheavy's comments. 2018-08-24 10:13:07 -04:00
Philipp Oettershagen 08ceddaddb Fixed-wing autoland: ALWAYS flare when close to the ground, independently of the horizontal distance to the land WP. This avoids that we crash into the ground at negative pitch and guarantees that the flare always starts at the same altitude above ground. However, the motor shutoff still depends on the horizontal distance to the LAND WP, thus avoiding that the motor is shut off prematurely 2018-08-24 10:13:07 -04:00
Philipp Oettershagen ec4ccc1fcd Fixed-wing autoland: Use a more appropriate (i.e. mostly tighter) altitude acceptance radius than just the standard altitude acceptance parameter (which may be too large to allow a precise autoland) 2018-08-24 10:13:07 -04:00
Philipp Oettershagen 4c4f585ad5 Fixed-wing autoland: 1) The landing configuration (flaps, different airspeed) is now already set during the loiter down instead of at the start of the landing approach. This is done to avoid any mode changes (which can cause altitude/airspeed jumps) so close to the gorund. 2) A scaling factor for the TECS throttle time constant was added which allows tighter throttle control during the landing (i.e. close to the ground) than high up in the air 2018-08-24 10:13:07 -04:00
David Sidrane 790356ef6d NXPHlite-v3:Ensure bin file sizes in mtpl of 8 2018-08-23 14:26:32 -07:00
David Sidrane 19d3e562e9 NXPHlite:Track kinetis upstream CONFIG changes 2018-08-23 14:26:32 -07:00
David Sidrane add7484083 Nuttx with Missing Backports 2018-08-23 14:26:32 -07:00
David Sidrane b721b6a54a kinetis:Fixed hard fault when called with nullptr for errata
Logger was hard faulting on start due to a write to
  null pointer dereferece of errata
2018-08-23 14:26:32 -07:00
David Sidrane 454d175617 rc.mavlink:Seperate sys compaion init dependant on MAVLINK_COMPANION_DEVICE 2018-08-23 14:26:32 -07:00
David Sidrane 46b563fe3a rc.mavlink:NXPhlite Mavlink on ttyS4 and ttyACM only
NXPhlite does not have a companion link. So start
    Mavlink on ttyS4 and ttyACM only.
2018-08-23 14:26:32 -07:00
David Sidrane 2c282d0e0e rc.mavlink:Fix syntax errors 2018-08-23 14:26:32 -07:00
Daniel Agar ad4bd6b0d6 Jenkins add separate Ubuntu 18.04 posix_sitl_default build 2018-08-23 13:44:06 -04:00
Daniel Agar b39a3664bd Jenkins update cppcheck to px4-dev-base:2018-08-23 with fixed python dependencies 2018-08-23 11:17:19 -04:00
PX4 Build Bot c7779508df Update submodule ecl to latest Thu Aug 23 09:46:28 EDT 2018
- ecl in PX4/Firmware (8b6b34b8f073fc47fdce658ab5c1bccd7e1682db): https://github.com/PX4/ecl/commit/34cd1366b715d80885d71f80c72cc5d0bfde64f0
    - ecl current upstream: https://github.com/PX4/ecl/commit/aa134d5a617cd90142d82039c4466aef2f009383
    - Changes: https://github.com/PX4/ecl/compare/34cd1366b715d80885d71f80c72cc5d0bfde64f0...aa134d5a617cd90142d82039c4466aef2f009383

    aa134d5 2018-08-20 Roman - l1 position controller: make sure that a NAN roll setpoint does not keep the roll setpoint state at NAN forever
2018-08-23 10:47:13 -04:00
mcsauder 1a1a04c094 Directly set parameters in airframe config files rather than setting script variables and move the param set lines into logic blocks, and alphabetize and tidy up param set lists. 2018-08-22 10:20:07 +02:00
Beat Küng b6b935026a mavlink: switch back from _mavlink_timesync.sync_stamp to hrt_absolute_time
- the timestamp is only used for logging and log analysis. For that it's
  important to have the timestamp when a setpoint becomes active.
- there was a consistent problem with the position_setpoint_triplet
  timestamp, where the timestamp was just bogus. Timesync seems to work
  correctly though. Might be a problem on the sender side?
  For example here:
  https://logs.px4.io/plot_app?log=41918a7d-4c1d-464d-9abe-aef2c0818d92
2018-08-22 08:31:37 +02:00
Daniel Agar 0935354c0a Jenkins update cppcheck to px4io/px4-dev-base:2018-08-21 (ubuntu 18.04) 2018-08-21 15:50:36 -04:00
dakejahl f62e89638f navigator: add yaw setpoint to rcloss state (#10291)
This fixes the issue where the vehicle yaws in a seemingly random direction when RC is lost.
2018-08-21 15:05:55 -04:00
PX4 Build Bot d25b76c9c8 Update submodule sitl_gazebo to latest Tue Aug 21 01:37:53 UTC 2018
- sitl_gazebo in PX4/Firmware (7f41ead238): https://github.com/PX4/sitl_gazebo/commit/c1ca87e37b831cd4b64ac642957e701875738909
    - sitl_gazebo current upstream: https://github.com/PX4/sitl_gazebo/commit/821c55ca714d7acf93d8ed96af71237b8437e488
    - Changes: https://github.com/PX4/sitl_gazebo/compare/c1ca87e37b831cd4b64ac642957e701875738909...821c55ca714d7acf93d8ed96af71237b8437e488

    821c55c 2018-08-20 Elia Tarasov - remove unused destination socket address
37faf25 2018-08-20 Elia Tarasov - remove undecalred member function
d5ca1d4 2018-08-20 Elia Tarasov - fix default QGC udp port initialization
2018-08-21 09:43:11 +02:00
Daniel Agar 29082d0118 commander battery_failsafe state machine share strings 2018-08-21 02:38:51 -04:00
Daniel Agar 6396e486bd commander cleanup battery failsafe handling 2018-08-21 02:38:51 -04:00
Daniel Agar 7f41ead238 Update submodule mavlink v2.0 to latest Sun Aug 19 21:37:20 EDT 2018 (#10277)
- v2.0 in PX4/Firmware (485c5db21e): https://github.com/mavlink/c_library_v2/commit/6404047979cadac62fecd75070cd995f1ca66ca2
    - v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/fe2349dea9a88fb5b873eff2a59a88125943fd61
    - Changes: https://github.com/mavlink/c_library_v2/compare/6404047979cadac62fecd75070cd995f1ca66ca2...fe2349dea9a88fb5b873eff2a59a88125943fd61

    fe2349d 2018-08-11 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/141637e21e87a9c4ade90dbb9d544375294c106a
1d49e43 2018-08-09 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/f4fda461caaa0cb2c5dfed20d21a9d2a254b6c03
2018-08-20 13:26:24 -04:00
Daniel Agar 1f261862f6 Update submodule ecl to latest Sun Aug 19 21:37:24 EDT 2018 (#10276)
- ecl in PX4/Firmware (5d5841de980ca2d108d52f4652a9437507652860): https://github.com/PX4/ecl/commit/35f628e68febc54abee801797da5f92612d89116
    - ecl current upstream: https://github.com/PX4/ecl/commit/34cd1366b715d80885d71f80c72cc5d0bfde64f0
    - Changes: https://github.com/PX4/ecl/compare/35f628e68febc54abee801797da5f92612d89116...34cd1366b715d80885d71f80c72cc5d0bfde64f0

    34cd136 2018-08-12 Daniel Agar - Jenkins update PX4BuildBot credential usage
2018-08-20 13:26:08 -04:00
Martina Rivizzigno 854e4ef3de mc_pos_control_main: fix typo (#10274) 2018-08-20 10:56:43 -04:00
Hamish Willee 37aa2132e5 Make it clear up front that SDLOG is a bitmask 2018-08-20 15:12:08 +02:00
Daniel Agar 485c5db21e Mavlink implement GPS2_RAW for 2nd GPS 2018-08-19 16:49:44 +02:00
mcsauder 3a22ee48db Correct trailing whitespaces. 2018-08-18 15:15:41 -04:00
Daniel Agar 260c8a19c8 Jenkins upload airframe and parameter metadata to s3 2018-08-18 00:23:54 -04:00
Daniel Agar 5ec4a48a90 CI mission tests align with initial heading 2018-08-17 22:25:45 -04:00
Daniel Agar 7d389a35ce uORB: split uORBDevices into uORBDeviceNode and uORBDeviceMaster 2018-08-17 22:25:29 -04:00
Daniel Agar e356fd89b0 CI mission tests add FW and cleanup (#10250)
* jenkins: decrease VTOL mission alt and FW mission use simple land wps
* startup: decrease min airspeed scaling factor for landing
* jenkins: FW mission include loiter_to_alt cmd
2018-08-17 13:02:14 -04:00
Daniel Agar 5acb9dfed0 Jenkins HIL test add px4fmu-v4 2018-08-17 09:28:51 -04:00
Paul Riseborough 57052edfb2 logger: Log GPS drift data
This data is published at the GPS publication rate and only when on ground.
2018-08-17 10:44:07 +10:00
Paul Riseborough c2fcef8fc1 ekf2: Tighten preflight GPS quality checks
Enable drift checks and reduce thresholds to reduce likelihood of commencing  use of  a unstable GPS position.
Publish drift data to assist with tuning.
2018-08-17 10:44:07 +10:00
Paul Riseborough d0f733d375 ecl: use master with required publication of gps drift data 2018-08-17 10:44:07 +10:00
Paul Riseborough f100cd73ef msg: Create message for GPS drift rates
This data is only updated at 5Hz and only required pre-flight.
2018-08-17 10:44:07 +10:00
dakejahl f7147653ab Navigator RTL: Removed the condition to transition straight to RTL_LAND if the previous setpoint was of type LAND. Not only does this not normally work, as the setpoints are cleared to invalid when navigator changes nav states, but the land lat/lon is set as home.lat and home.lot which is very wrong, as the vehicle would just beeline straight towards thatlocation. (#10252) 2018-08-16 18:08:46 -04:00
PX4 Build Bot 33ac659a10 Update submodule libuavcan to latest Thu Aug 16 15:14:07 EDT 2018
- libuavcan in PX4/Firmware (9c9160e015aa68ee7efe456dae7de6fc9a819715): https://github.com/UAVCAN/libuavcan/commit/3ca697e64d52ba86c8e831d563c746827473e5e3
    - libuavcan current upstream: https://github.com/UAVCAN/libuavcan/commit/aa3650d34d9732af51ced52add24dee044eac79a
    - Changes: https://github.com/UAVCAN/libuavcan/compare/3ca697e64d52ba86c8e831d563c746827473e5e3...aa3650d34d9732af51ced52add24dee044eac79a

    aa3650d 2018-08-16 Pavel Kirienko - Merge pull request #156 from UAVCAN/master_kinetis_flexcan
0dc5751 2018-07-30 Pavel Kirienko - Merge pull request #155 from hjoertel/change-start-script
ff040ea 2018-07-30 Oertel - removed the confusing "echo ..." line (it confused Pavel)
8bb5677 2018-07-30 Oertel - replaced the depricated ifconfig command by the ip command
2018-08-16 12:49:13 -07:00
Daniel Agar 36403e9025 Mavlink expand telemetry_status and split radio_status 2018-08-16 17:32:15 +02:00
ChristophTobler f4f112424f pmw3901: add bus option and minor improvements
- remove unused distance sensor rotation
- add possibility to define SPI bus for other boards
- use SENS_FLOW_ROT param to rotate sensor
2018-08-16 17:22:33 +02:00
Beat Küng efbae51efe launch: add px4.launch script that only starts the px4 binary
This provides a clean ROS interface for external projects which is
independent from the px4 CLI interface.

It can be used with:
```
	<include file="$(find px4)/launch/px4.launch">
	</include>
```
2018-08-16 10:34:44 +02:00
ChristophTobler b14839ab2b mc_pos_ctrl: send vehicle cmd if task fails and task should be switched
without this tasks will be switched all the time and the drone starts driftig
2018-08-16 09:48:59 +02:00
Daniel Agar ce18225710 cmake px4_add_module add unity build support
- a unity build is a single compilation unit per module
2018-08-16 09:47:29 +02:00
David Sidrane 84f121ce0a px4fmu-v2:CAN2 GPIO init was over written
hardware detection was overwriting the CAN2 GPIO setting
2018-08-16 00:06:25 +02:00
Dennis Mannhart a9d83b77de ControlMath: math optimization 2018-08-15 16:19:51 +02:00
Dennis Mannhart d94778dd94 test_controlmath: replace FLT_EPSILON with 10^-6 2018-08-15 16:19:51 +02:00
Beat Küng 888d85008b rcS: use quotes to set TUNE_ERR variable (ShellCheck complained) 2018-08-15 10:13:06 -04:00
Beat Küng b3a25bb2bb posix rcS: use sed instead of grep -P
The -P argument seems not to be supported on OSX
2018-08-15 10:13:06 -04:00
David Sidrane 18ccf8dbd2 px4fmu-v2: Add detection for Pixhack V3 (#10231)
The Simple HW detection was detecting the
  Pixhack V3 as a mini.

  This commit adds further discrimination, based on
  the fact the Pixhack V3 left VDD_5V_PERIPH_EN
  floating. Where a mini ,V2, V3 HW has it connected
  to the active low enable of the VDD_5V_PERIPH and
  VDD_5V_HIGHPOWER via a 10K pull down.

  The detection enables the 40K pull up and samples
  the pin. This reads back as a logical one on the
  Pixhack V3, and a logical zero on the Mini.

  Since the float is applied some 3.3 Ms post pin setting
  at reset the 10 us should leave the 5 Volt supplies in
  the on state because of the 10K pull down.
  This is assuming typical 40K pullup 10K pull down
  This results in typical 0.66V (.875V max) on the /EN pin
  which should not be detected as a high on the TPS2041.
2018-08-15 09:24:18 -04:00
Daniel Agar 01744a9efc Jenkins px4fmu-v2 hardware test 2018-08-14 23:12:26 -04:00
Daniel Agar a2059acde5 NuttX stm32f7 configs unset ADC1 DMA 2018-08-14 20:32:28 -04:00
David Sidrane cff3d55d33 uavcanesc:Fix date in copyright 2018-08-14 09:38:15 -04:00
David Sidrane 34812be2de uavcan:Fix date in copyright 2018-08-14 09:38:15 -04:00
David Sidrane 03000bb0ef Updated apps nuttx of platforms/nuttx 2018-08-14 09:38:15 -04:00
David Sidrane 4d3aff23d7 NXPflite-v3:Hack-Fixes USB not enumerating on Virtual Box VM 2018-08-14 09:38:15 -04:00
David Sidrane dd69427cbf rc.io:Add USE_IO == yes && IO_PRESENT == yes test
On a FMU without a px4io (FMUv4, NXPhlite etc), this code should
  not be run.
2018-08-14 09:38:15 -04:00
David Sidrane 346224a0c6 NXPhlite:Fix init stack warning 2018-08-14 09:38:15 -04:00
David Sidrane ce47dc24da rcS:Added unset for TUNE_ERR 2018-08-14 09:38:15 -04:00
David Sidrane 0e382aec71 Update NuttX with Kinetis Backports 2018-08-14 09:38:15 -04:00
David Sidrane 619c9c5810 Update libuavcan submodule with Kinetis Flexcan submodule 2018-08-14 09:38:15 -04:00
David Sidrane 8d14f9db52 rcS:Fix missing TUNE_ERR 2018-08-14 09:38:15 -04:00
David Sidrane c46a405e0c rcS:NXPhlite add back UxASRT usage 2018-08-14 09:38:15 -04:00
David Sidrane 88cb57a093 update libuavcan with Kinetis support 2018-08-14 09:38:15 -04:00
David Sidrane f0663fb143 nxphlite-v3:Match probes to V3 HW 2018-08-14 09:38:15 -04:00
David Sidrane 011ebd43b8 nxphlite-v3:Enable CAN transceivers 2018-08-14 09:38:15 -04:00
David Sidrane 5c7cbc4d30 nxphlite-v3:Add uavcan 2018-08-14 09:38:15 -04:00
David Sidrane 4bd5c02455 uavcan:add architecture specific driver header 2018-08-14 09:38:15 -04:00
David Sidrane 78fcf1dc28 uavcan use the specified architecture driver 2018-08-14 09:38:15 -04:00
David Sidrane caa0700ca3 uavcan:Build system specify architecture 2018-08-14 09:38:15 -04:00
David Sidrane 0c3386d255 uavcan:virtual_can_driver removed unused arch specific header 2018-08-14 09:38:15 -04:00
David Sidrane c6cab03319 nxphlite-v3:Add Probes to defconfig 2018-08-14 09:38:15 -04:00
David Sidrane b9f2530688 Update nuttx submodule with FlexCan and PIT contrib 2018-08-14 09:38:15 -04:00
David Sidrane 9f96aa7a1e nxphlite-v3:Match bootloader VENDORSTR 2018-08-14 09:38:15 -04:00
David Sidrane e892227d1f nxphlite-v3:Fix merge issue 2018-08-14 09:38:15 -04:00
David Sidrane 5044426949 nxphlite-v3:Use non data time RTC configuration.
One a 32.768 is added (RC16) to the board this will keep time.
2018-08-14 09:38:15 -04:00
David Sidrane d466a09708 kinetis:Add MCU version decoding 2018-08-14 09:38:15 -04:00
David Sidrane f0c981312f nxphlite-v3:SDIO DMA working.
The fix ix in nuttx. This is just the defconfig changes to use
   it.

   There were 2 problems. The first was that the interrupt did
   test DINT and raise a completion events. But since DINT is
   just an indication of DMA completion, TC is a valid way to
   determine that the transfer is complete.

   The second problem is that Software Reset For DAT Line
   SDHC_SYSCTL[RSTD] clears the bits 24-0 in SDHC_PROTO
   this looses the wide bus setting DTW
2018-08-14 09:38:15 -04:00
David Sidrane 26bc2d90d8 Upates nuttx Submodule - backport USB fix 2018-08-14 09:38:15 -04:00
David Sidrane c02fab20fd kinetis:tone_alarm fixed rebase error. 2018-08-14 09:38:15 -04:00
David Sidrane f8085423fe Updated platforms/nuttx/NuttX/nuttx:as rebased on px4_firmware_nuttx-7.22+ 2018-08-14 09:38:15 -04:00
David Sidrane 9ccb9345be nxphlite-v3:bin file must be padded to multiple of 8
Flash programing on the K66 has to be units of 8 bytes. So we cache
   the write of words until there are 2 written. Then the 2 words are
   written to FLASH. This change ensure the bin file has an even
   number of (4 byte) words by padding the last section in progflash
   with 0xffffffff if needed.
2018-08-14 09:38:15 -04:00
David Sidrane 35960fb012 NXPHlite-V3:Add reset to bootloader detection
On the K66 we use the first word of the Battery backed up RAM
   as the bootloader - app communication location.
2018-08-14 09:38:15 -04:00
David Sidrane cb58fa5131 NXPHlite-V3:Prep for bootloader of 24K load address is 0x6000 2018-08-14 09:38:15 -04:00
David Sidrane 881fbd2197 Prep for Bootloader - Use NXP's VID and PID=board_id of 28 2018-08-14 09:38:15 -04:00
David Sidrane a1a03bd6ae update nxphlite-v3.prototype to use original unused board_id
Since nxphlite V1 was never released, we reused that code point.
2018-08-14 09:38:15 -04:00
David Sidrane e35be68fd4 NXPhlite work arround to internal i2c routed to external connector.
Since the only device on the bus is the barro, int or ext does
   not apply. This will be fixed on the rev > RC15.
   This defines an alias that can be used to condition the buss logic
   connection logic px4_i2c_bus_external to return external.
2018-08-14 09:38:15 -04:00
David Sidrane 678627d783 mpl3115a2 - removed old comment 2018-08-14 09:38:15 -04:00
David Sidrane 5726352040 NXPhlite grow init stack 56B 2018-08-14 09:38:15 -04:00
David Sidrane 622cd44634 Point nuttx submodule to PX4-NuttX 2018-08-14 09:38:15 -04:00
David Sidrane a4c4449b85 NXPhlite:Dedicate P10 UART as Telem 1 and disable companion 2018-08-14 09:38:15 -04:00
David Sidrane d50042f58d xnphlite:Intergrate tune control library
Tone Alarm driver was using hrt and tunes. Hence no start up tune.
  Integrated the tune control and removed note cruft.
2018-08-14 09:38:15 -04:00
David Sidrane 017e414c6a nxphlite:Updated module list to be consistent with FMUv3 2018-08-14 09:38:15 -04:00
David Sidrane 5d9a0cfc82 nxphlite-v3:Fix RGB ordering Red and Green were swapped. 2018-08-14 09:38:15 -04:00
Jan Okle 0754b3566c Enable DMA based serial driver and add polling serial driver for more data. 2018-08-14 09:38:15 -04:00
Beat Küng d2aa68f62c sitl_run.sh: use correct ROMFS path for tests 2018-08-13 21:50:14 -04:00
Beat Küng 83ea7fa45e camera_feedback: remove unused class member & call orb_unsubscribe() 2018-08-13 21:50:14 -04:00
Beat Küng 923f6239e1 posix rcS: automatically find the requested model instead of explicitly enumerating them 2018-08-13 21:50:14 -04:00
Beat Küng 4e860e357c Tools: add run-shellcheck.sh to statically analyze startup scripts
Use './Tools/run-shellcheck.sh ROMFS/px4fmu_common' to run it.
2018-08-13 21:50:14 -04:00
Beat Küng 9712f6b02a mixers: remove unneeded README
This info is on the dev-guide now
2018-08-13 21:50:14 -04:00
Beat Küng 9d66bcefd3 posix main: print script failure as an error instead of a warning 2018-08-13 21:50:14 -04:00
Beat Küng 273988c124 SITL: move all models to unified rcS startup and remove old scripts 2018-08-13 21:50:14 -04:00
Beat Küng 5ebd0116de rc.interface: allow setting a custom MIXER_FILE 2018-08-13 21:50:14 -04:00
Beat Küng e6b9806ee1 SITL: add multi-vehicle support to rcS
This also removes the HIGHRES_IMU mavlink stream to the GCS. I don't see
why it's needed and it adds noticeable CPU load.
2018-08-13 21:50:14 -04:00
Beat Küng a00f7ebf47 sitl scripts: refactor to use existing rc.vehicle_setup from NuttX 2018-08-13 21:50:14 -04:00
Beat Küng b1c56813ae gpssim: fix process name 2018-08-13 21:50:14 -04:00
Beat Küng 2baa4681d2 camera_feedback: add to SITL config 2018-08-13 21:50:14 -04:00
Beat Küng fcd3a04b07 rc.interface: remove unnecessary fmu start for RC input
RC input is now handled via rc_input module
2018-08-13 21:50:14 -04:00
Beat Küng 9ba2e91fa1 ROMFS: avoid empty 'then else' clause, it's an error in bash
Use 'if ! <cmd>' instead.
2018-08-13 21:50:14 -04:00
Beat Küng d4c7dbc93d posix rcS: automatically find matching autostart file based on SYS_AUTOSTART 2018-08-13 21:50:14 -04:00
Beat Küng 6971a92881 pwm_out_sim: reduce verbosity 2018-08-13 21:50:14 -04:00
Beat Küng 9a259cd139 param: use PX4_INFO_RAW and add 'param show -q <param_name' command 2018-08-13 21:50:14 -04:00
Beat Küng 1318e614ad SITL: handle 'make posix_sitl_shell' via unified rcS
The command is now: 'make posix none_shell'
which means: don't start a simulator and run a minimal shell only.
2018-08-13 21:50:14 -04:00
Beat Küng ab7f68f2ad ekf2 replay: refactor to use unified rcS scripts 2018-08-13 21:50:14 -04:00
Daniel Agar 34f1bbeb44 px4fmu-v2 disable errno strings 2018-08-13 22:45:34 +02:00
Beat Küng e5ed05766d px4_daemon server: fix startup race condition
The FIFO was created in the server thread, and the PX4 main thread could
already have continued and started to execute the bash script.
In that case the client tried to open the FIFO but it did not exist yet.

Client error:
ERROR [px4_daemon] pipe open fail
ERROR [px4_daemon] Could not send commands
2018-08-13 14:26:41 +02:00
Beat Küng 52168f9665 px4_daemon client: improve error output 2018-08-13 14:26:41 +02:00
Daniel Agar 96995852cb Jenkins update git credential usage 2018-08-12 13:21:00 -04:00
Daniel Agar c2142a3067 posix SITL tests don't manually stop dataman 2018-08-12 11:23:21 -04:00
Daniel Agar 5b410e5f28 doxygen update excludes and output structure
- exclude DriverFramework, parameters, libuavcan
2018-08-12 11:10:19 -04:00
Daniel Agar 7ceb79d606 parameters lib always depend on prebuild_targets 2018-08-12 10:25:24 -04:00
Alexis Paques 6b8ea8e543 Mavlink SET_ACTUATOR_CONTROL_TARGET support group_mlx (#7477)
- Allow to use the 4 groups from Mavlink
 - Allow an Offboard control of the Gimball, Gripper or servoes.
 - Fixes issue #7440

Signed-off-by: Alexis Paques <alexis.paques@gmail.com>
2018-08-12 10:08:50 -04:00
ChristophTobler 56ea4fa6fa FlightTask StraighLine: check values before dividing 2018-08-12 09:37:05 -04:00
ChristophTobler d3d549b8e6 FlightTask Smoothing: check dt before dividing 2018-08-12 09:37:05 -04:00
Dennis Mannhart 9a23295a40 heading update: do not update heading within NAV_ACC_RAD 2018-08-10 15:52:10 +02:00
Beat Küng 30fb82d9b4 fmu-v5 defconfig: increase USART3 from 1500 to 3000
This is needed for companions with high baudrate and high data rate.
Tested with 1500000 Baudrate and mavlink TX rate of ~120KB/s: no drops.

I did not test the exact limit, something like 2500 might be enough. But
we (still) have enough free RAM on FMU-v5.
2018-08-10 07:11:07 +02:00
Beat Küng f414d0c413 SYS_COMPANION: add 1500000 baud to metadata & increase the data rate 2018-08-10 07:11:07 +02:00
Martina c905a73e2e remove FLightTask Orbit from fmu-v2 target 2018-08-09 16:38:47 -04:00
Martina 2d9bbeb7ed FlightTaskAuto: use the triplets from navigator and not with the internal
ones for obstacle avoidance. Otherwise the vehicle is continuolsy in the
offtrack state. Use already comnputed yaw and yaw speed setpoints instead
of subscription
2018-08-09 16:38:47 -04:00
Martina 8096e84133 FlightTask: add padding to empty_trajectory_waypoint definition 2018-08-09 16:38:47 -04:00
Martina 10988f5bf1 FlightTask: add comment for method getAvoidanceWaypoint 2018-08-09 16:38:47 -04:00
Martina aef41a1378 remove empty lines 2018-08-09 16:38:47 -04:00
Martina da2191b721 mc_pos_control: check parameter MPC_OBS_AVOID to enable obstacle avoidance 2018-08-09 16:38:47 -04:00
Martina 0694abf916 mc_pos_control: do not execute updateSetpoint twice if obstacle avoidance
active
2018-08-09 16:38:47 -04:00
Martina 4b54050358 mc_pos_control: get empty avoidance waypoint from fligth task so that code
isn't duplicated
2018-08-09 16:38:47 -04:00
Martina ede302290b FlightTasks: add getter method to retrieve empty avoidance waypoint in the
mc_pos_control
2018-08-09 16:38:47 -04:00
Martina 8190242e02 mc_pos_control: port trajectory interface to the new mc_pos_control
structure (flight task refactor)
2018-08-09 16:38:47 -04:00
Martina b856c1048d FlightTask: add methods to get the desired trajectory waypoints 2018-08-09 16:38:47 -04:00
Martina 17a08a9de7 FlightTaskAuto: add update method to get triplets for the trajectory
interface
2018-08-09 16:38:47 -04:00
TSC21 7c7602873e assert over the type of the 'timestamp' field 2018-08-09 13:40:48 +02:00
TSC21 e6bd9bdeeb fix radio_status timestamp init 2018-08-09 13:40:48 +02:00
TSC21 91c3f1ae63 sync submodules with upstream 2018-08-09 13:40:48 +02:00
TSC21 c10e851251 replace printf with PX4_INFO_RAW 2018-08-09 13:40:48 +02:00
TSC21 c53c035ec6 px_generate_uorb_topic_files: add check and throw error if no timestamp field exists 2018-08-09 13:40:48 +02:00
TSC21 a1ac34d3e7 reformat how the passed time is printed 2018-08-09 13:40:48 +02:00
TSC21 cac84e1424 px_generate_uorb_topic_helper: do not account with the timestamp, so the struct size matches 2018-08-09 13:40:48 +02:00
TSC21 8a8cc26b13 uorb templates: remove redundant timestamp field 2018-08-09 13:40:48 +02:00
TSC21 86baa6a90a beautify some identation 2018-08-09 13:40:48 +02:00
TSC21 e932030d88 add timestamp field to uORB msgs; sync timestamp whenever possible 2018-08-09 13:40:48 +02:00
acfloria 4a08003952 Change warnings to error in case the iridium driver start failed 2018-08-08 21:13:56 +02:00
acfloria eb59407586 Fix starting the iridium driver in the start script 2018-08-08 21:13:56 +02:00
acfloria 5c6fad84e7 Improve the startup of the IridiumSBD driver
During startup retry commands several times before exiting.
Report if the startup was successful or failed.
2018-08-08 21:13:56 +02:00
acfloria 21ebcdc0ae Publish the satcom subsystem health 2018-08-08 21:13:56 +02:00
acfloria 1daaa6f5dc Shorten notification on the link switch to fit in 50 characters 2018-08-08 21:13:56 +02:00
Beat Küng 55db10d9e2 mavlink_ulog: clear potential existing ulog_stream messages on start
- the uorb behavior got recently changed so that we now need to clear
  any potential existing messages when we start log streaming.
- ulog_stream_ack should also not use a queue, since the ack is done
  synchonous between mavlink and the logger.
2018-08-08 21:12:04 +02:00
Beat Küng ffffcaeb0f px4-alias.sh_in: move to platforms/posix/src/px4-alias.sh_in 2018-08-08 21:09:39 +02:00
Anthony Lamping 0edf4513eb Jenkins: change log path 2018-08-08 21:09:39 +02:00
Beat Küng 23b12f02e7 cmake: fix install target (add bin dir which includes the symlinks and px4-alias.sh) 2018-08-08 21:09:39 +02:00
Beat Küng 4703f22d4e mixers: remove unnecessary output settings (reduce flash usage) 2018-08-08 21:09:39 +02:00
Beat Küng ac5988fd35 ROMFS cmake: do not copy init.d-posix and mixers-sitl
Otherwise these files are added to the NuttX ROMFS build.
2018-08-08 21:09:39 +02:00
Beat Küng 5363aff879 fixes for integration and unit tests
Move ros logs dir so that .ulg files are not in the same directory
(mission_test.py:: get_last_log() fails otherwise)
2018-08-08 21:09:39 +02:00
Beat Küng 0edd7c93e1 posix main: check for ROS argument 2018-08-08 21:09:39 +02:00
Beat Küng 22b47a84f5 px4_log.c: fix cygwin include 2018-08-08 21:09:39 +02:00
Beat Küng a5de82aaa8 cmake: add documentation for px4_posix_generate_alias and px4_posix_generate_symlinks 2018-08-08 21:09:39 +02:00
Beat Küng f748c8d883 fix mavros launch scripts & use non-unified startup scripts
This is to not lose any existing functionality until we have everything
unified.
2018-08-08 21:09:39 +02:00
Beat Küng ec09379813 px4_daemon: fixes for clang-tidy
Also ignore the warning:
error: calling 'system' uses a command processor [cert-env33-c,-warnings-as-errors]
2018-08-08 21:09:39 +02:00
Beat Küng efb202106f bbblue: required changes for posix shell 2018-08-08 21:09:39 +02:00
Beat Küng d480d24a4c fix perf counter: use dprintf instead of printf 2018-08-08 21:09:39 +02:00
Beat Küng b306935de0 module base: use PX4_INFO_RAW instead of printf 2018-08-08 21:09:39 +02:00
Beat Küng 26f11cb9d7 commander: use PX4_INFO for status output 2018-08-08 21:09:39 +02:00
Beat Küng f1dc8f8f48 listener: use PX4_INFO_RAW instead of printf
Ensures that clients will get the output of the listener.
2018-08-08 21:09:39 +02:00
Beat Küng e6d71680ab px4_daemon server: fix packet reading
By reading sizeof(packet), it could have happened that 2 packets at once
were read, and the second one was then ignored.
This makes sure that only one packet at a time is read.

The other 2 changes are for efficiency.
2018-08-08 21:09:39 +02:00
Beat Küng 1f0655302c px4_daemon: fix locking
It was not enough to lock individual accesses to the maps.
For example it could happen that a thread was started and exited very
quickly, before the pthread_t item was inserted into the map, such
that when the cleanup method was called, the thread and pipe fd were not
found (and fd=0=stdin was closed).
2018-08-08 21:09:39 +02:00
Beat Küng 5b171bd614 px4_daemon: fixes for packet length computation
The enum change from uint8_t to an int avoids uninitialized bytes,
which led to valgrind warnings (no error though).
2018-08-08 21:09:39 +02:00
Beat Küng 7359f44835 fix px4_log.c: avoid potential buffer overflow
The buffer length given to snprintf() is unsigned, so we must check for
an overflow after each call.

This happend for very long printf's (module documentation)
2018-08-08 21:09:39 +02:00
Beat Küng d90ac975a7 posix shell: required updates for RPi, bepob, ocpoc, eagle & exxcelsior
- RPi works
- the rest is not tested, and requires a bit more
  (such as uploading the bin/ directory)
2018-08-08 21:09:39 +02:00
Beat Küng 2454ef9240 Tools/check_submodules.sh: remove unnecessary verbose message
This was printed for all submodules.
2018-08-08 21:09:39 +02:00
Beat Küng d05b268d19 posix shell: allow to run multiple instances 2018-08-08 21:09:39 +02:00
Beat Küng c0cac0594e file paths: add PX4_STORAGEDIR & use it where appropriate 2018-08-08 21:09:39 +02:00
Beat Küng 57a85fbc61 cleanup: remove unused files 2018-08-08 21:09:39 +02:00
Beat Küng 7822e5b5c3 posix shell: lots of cleanup and fixes
- move posix-configs/SITL/init/{rcS,10016_iris,6011_typhoon_h480} to ROMFS/px4fmu_common/init.d-posix
  allows for easier unification, only one symlink is required.
  - rcS: add AUTOCNF support. Update scripts to match with behavior of PX4
    master (parameter values, some sitl driver got removed)
- add alias to allow 'set variable value' syntax in scripts to px4-alias.sh
- use px4_getopt
- use separate argument for the test_data directory
- append PATH from within the px4 binary: this simplifies the usage
  w/o the sitl_run.sh script.
- add 'source px4-alias.sh' to all existing sitl startup scripts
- move sitl mixers to ROMFS/px4fmu_common/mixers-sitl
  makes it easier to use existing mixers and sitl-specific ones.
- remove unused rcS_gazebo_delta_wing
2018-08-08 21:09:39 +02:00
Beat Küng 413c09e20e posix main: some cleanup & fixes
- argv[0] can have the form ./px4-commander
- create eeprom directory
- fix fpe signal handler
2018-08-08 21:09:39 +02:00
Beat Küng 6a49d78c4b logger: remove last references to SYS_LOGGER 2018-08-08 21:09:39 +02:00
Julian Oes 0c5c741b1a add posix shell
squashed & rebased version, not including:
- listener changes
- src/firmware renaming

Commits:

tag_to_version.py: fix Python3 error

subprocess.communicate returns bytes instead of a str which is not the
same for Python3. Therefore, we need to decode the bytes.

cmake: remove folder src/firmware

The folder src/firmware was not intuitive. Why would the binaries for
SITL be inside a src and why even inside a src/firmware folder. Also,
the rootfs was put there which made it even more confusing.

The CMakeLists.txt files are moved into cmake/ and get now called from
the main CMakeLists.txt.

qshell: support for return value

Instead of just sending commands, qshell will now also wait until
the command has finished on QURT and sent back a return value. This will
allow all modules on the DSP side to be spawned from the Linux side
meaning that we only need one config/startup file instead of two.

adb_upload: create folders before pushing

Previously the script failed if the folder on the destination was not
already existing. This therefore makes pushing easier.

posix: spawn PX4 modules in bash

This adds the possibility to spawn PX4 modules out of bash. Basically,
the main executable can now be started as a server/daemon or as a
client.
The server replaces the existing functionality of the main exe with
the pxh shell, however, it also opens a pipe that clients can talk to.

Clients can run or spawn PX4 modules or commands by connecting to the
server over the pipe. They clients will get the stdout and return value
of their commands via a client specific pipe back.

This work will allow to start all modules using a bash script similar to
the way it is done in NuttX where the NuttShell scripts the startup
scripts and starts the modules.

SITL: use new client shell in SITL

This is a first step to use the new shell capabilities for SITL.
The new startup bash script rcS merges (and therefore replaces) the two
existing scripts rcS_gazebo_iris and rcS_jmavsim_iris.

More cleanup will be necessary for the rest of the SITL startup scripts.

Snapdragon: use new shell to start all modules

Instead of different mainapp.config and px4.config files, we can now use
a unified rcS bash script which starts all the modules based on
parameters, mainly the SYS_AUTOSTART param.

Snapdragon: fix the airframe description

pxh: argv needs to end with a nullptr

The comment was wrong that argv needs an additional 0 termination.
Instead it needs a nullptr at the end.

px4_posix_tasks: variable cleanup

The px4_task_spawn_cmd function got a cleanup while debugging, however,
no functional changes.

Snapdragon: move some drivers to 4100 config

These drivers are supported by the community, so they go into the 4100
config.

Snapdragon: update 210qc platform

px4_daemon: use doxygen comments

apps.h_in: fix string printf: use .c_str()

px4_daemon: \b -> \n in printf

px4_daemon: handle error in generate_uuid (close the file on error)

posix main: some clarifications in comment (it's the symlinks not the script aliases)

cmake: remove new install command again

This one was probably wrong and untested. Installing needs revisiting.

POSIX: remove argument USES_TERMINAL

POSIX: copy init and mixer files for SITL

Instead of using non-working install commands, the mixer and startup
files are now copied as part of the build in cmake.

adb_upload.sh: remove leftover commented printf

POSIX main: just the pointer instead of memmove

POSIX main: remove chroot

chroot is removed because it hasn't been used anywhere and seems
untested.

px4_daemon: remove client pipe when cleaning up

px4_daemon: fail if the client pipe already exists

The client pipe is supposed to be specific (by UUID), so the path
shouldn't exist already.

history: limit the number of history entries

This is a protection to avoid filling the memory if we are entering a
lot of commands (e.g. auto-generated).

px4_daemon: add a threadsafe map and use it

px4_daemon: whitespace

px4_daemon: fix client parsing

Sometimes the client ends up reading more than one packet in one read.
The parsing is not made for this and would require a (ring)buffer for
it.

The solution of this commit just reads as much as needed from the pipe
which avoids having to do buffering and parsing.

posix: changes sitl_run.sh and main.cpp cleanup

This changes the paths in sitl_run.sh quite a bit to allow the px4
binary to run in the rootfs directory which should make it convenient
and very close to the NuttX variant.

Also main.cpp got a big cleanup after the big rebase with some
conflicts. Quite some functionality was removed but it has yet to be
seen if it needs to be re-added.

px4_log: cleanup log levels, now they make sense

Before DEBUG and INFO log levels where inverted which didn't make much
sense in my eyes.

dataman: fix path for bash shell

logger: fix paths for bash shell

mavlink: fix paths for bash shell

param: fix path for bash shell

inav: fix paths for bash shell

sdlog2: fix paths for bash shell

ROMFS: add forgotten mixer to list

SITL init: more models, more options

- Support for different models using the unified startup
script rcS.
- Support to choose the estimator by setting the environment variable
  PX4_ESTIMATOR.
- Support to choose the logger by setting the environment variable
  PX4_LOGGER.

rcS: fix string comparison

listener: use template file

Instead of having all of the C++ code inside the Python file it is
nicer to have a separate template file with the C++ headers, etc.

px4_log: add PX4_INFO_RAW for raw printfs

This allows to do custom formatting but is still transported over
sockets to clients.

topic_listener: use PX4_INFO_RAW instead of printf

commander: use PX4_INFO_RAW for status

listener: rewrite to classes and factory

posix: fix some argument warnings

generate_listener.py: by accident changed shebang

listener: big refactor of the generator

Hopefully this makes it easier to read and change in the future.

rcS: manually take over rebase changes

listener: remove leftover try

listener: properly clean up topic instance

rcS: take over some vehicle specific changes

posix-configs: vehicle specifics to separate files

posix-configs: remove leftover lines

uORBDevices: new PX4_INFO_RAW instead of printf

px4_log: just use printf on NuttX

listener: use less binary space, strip on NuttX

generate_listener.py: remove commented code

cmake: fix syntax error from merge

px4_daemon: fixes after rebase of apps.h/cpp fix

px4_daemon: namespace missing

posix: only create stub for fsync on QURT

unitests: reduce dependencies of param test

This makes the unit test compile and link again after the bash changes.

QURT: some compile fixes after a rebase

SITL: arg change for sitl_run.sh to use rcS_test

This allows to use a custom startup file for testing.

SITL: add the folder test_data

SITL: implement shutdown command as systemcmd

The shutdown command needs to be a proper systemcmd, otherwise the alias
and symlink generation doesn't work and we end up calling shutdown of
the host computer which is to be avoided.

px4fmu_test: same IO_pass mixer as px4fmu_default

px4fmu_test: use normal quad x mixer

There is no good reason to use a specific test mixer, except more cmake
code around it. Therefore just use the same mixer as default, and at
some point px4fmu_test and px4fmu_default can get merged

POSIX: cleanup, dir and symlink fixes

This cleans up the logic behind the symlinking and creating directories.

POSIX: correct arg order in usage info

tests: fix paths for SITL tests

POSIX: printf fix

sitl_run.sh: try to make this run on Mac as well

cmake: try to make jenkins happier

Path cleanup, the bin is no longer in src/firmware

POSIX: fix symlink logic

SITL: prefix all exported env variables

cmake: fix path for ROS tests

integrationtests: fix log path

launch: try to make tets with ROS working again

px4_defines: fix after wrong merge deconflicting

px4_defines: get paths for POSIX correct

cmake: fix cmake arguments

This was fine with cmake 3.6 but did not work with cmake 3.2.2

cmake: use cp instead of cmake -E copy

cmake -E copy does not support copying multiple files with versions <
3.5. Therefore, just use cp for now.

ROMFS: fix build error after rebase

cmake: fix paths in configs

launch: use `spawn_model` again

cmake: various fixes after big rebase

param: path fixes after rebase

posix platform: fixes after rebase

test_mixer: fix screwed up rebase
2018-08-08 21:09:39 +02:00
David Sidrane 7bdfac786d uavcannode:Boards do the CAN GPIO init 2018-08-08 15:09:01 -04:00
David Sidrane b577bfc461 uavcanesc:Boards do the CAN GPIO init 2018-08-08 15:09:01 -04:00
David Sidrane 4b863aa108 uavcan:Boards do the CAN GPIO init 2018-08-08 15:09:01 -04:00
David Sidrane e88bad3b47 px4cannode-v1:Board does CAN GPIO init 2018-08-08 15:09:01 -04:00
David Sidrane ef43dee1d6 px4nucleoF767ZI-v1:Board does CAN GPIO init 2018-08-08 15:09:01 -04:00
David Sidrane fbb1c65221 px4fmu-v5:Board does CAN GPIO init 2018-08-08 15:09:01 -04:00
David Sidrane 5da93ad7c5 px4fmu-v4pro:Board does CAN GPIO init 2018-08-08 15:09:01 -04:00
David Sidrane f2fbffab84 px4fmu-v4:Board does CAN GPIO init 2018-08-08 15:09:01 -04:00
David Sidrane 35b010aeed omnibus-f4sd:Does not have uavcan 2018-08-08 15:09:01 -04:00
David Sidrane 33ee4dafa0 nxphlite-v3:Board does CAN GPIO init 2018-08-08 15:09:01 -04:00
David Sidrane d8300bfd8e mindpx-v2:Board does CAN GPIO init 2018-08-08 15:09:01 -04:00
David Sidrane 1a007c139c mindpx-v2:Add On board reset 2018-08-08 15:09:01 -04:00
David Sidrane e0b7314607 av-x-v1:Board does CAN GPIO init 2018-08-08 15:09:01 -04:00
David Sidrane 885fed0402 px4fmu-v2:Board does CAN GPIO init 2018-08-08 15:09:01 -04:00
David Sidrane dc4c09e5f4 aerofc-v1:Does not have uavcan 2018-08-08 15:09:01 -04:00
David Sidrane 9a3963d0cf aerocore2:Board does CAN GPIO init 2018-08-08 15:09:01 -04:00
David Sidrane 5517d84433 auav-x21:Board does CAN GPIO init 2018-08-08 15:09:01 -04:00
David Sidrane d6987ac674 auav-x21:Add On board reset 2018-08-08 15:09:01 -04:00
David Sidrane 866721cb33 libuavcan:Update Submodule to latest master 2018-08-08 15:09:01 -04:00
Daniel Agar a7f3012c1c delete all dokuwiki helpers 2018-08-08 14:07:59 -04:00
ChristophTobler adfb54243c FlightTasks: fix typo and improve comment 2018-08-08 13:44:49 +02:00
ChristophTobler f6e1ab9034 FlightTasks: cmake - add and remove tasks
add possibility to add additional tasks or to remove upstream tasks
2018-08-08 13:44:49 +02:00
ChristophTobler 89cc53755c FlightTasks: set variable for python args 2018-08-08 13:44:49 +02:00
ChristophTobler 4bbde0df8c FlightTasks: move FlightTask to own folder/lib
fix header includes
add cmake subdirectories dynamically
2018-08-08 13:44:49 +02:00
ChristophTobler 1b1b3b5484 FlightTasks: Move AutoMapper to own folder and create lib
AutoLine now depends on AutoMapper
2018-08-08 13:44:49 +02:00
ChristophTobler 8090708f76 FlightTasks: generate tasks depending on target
- rename flight tasks to use camelCase
- add core tasks to flight tasks cmake
- add additional tasks in targets (TODO)
- add templates
- generate hpp and cpp which contain all specified tasks
2018-08-08 13:44:49 +02:00
ChristophTobler 34203f7e8c FlightTasks: add header lib for sport 2018-08-08 13:44:49 +02:00
ChristophTobler 584838de30 FlightTasks: rename libs to use CamelCase convention 2018-08-08 13:44:49 +02:00
ChristophTobler b68fd5e0a7 Flight Tasks: CMake/folder restructure (no code change)
put flight tasks in separate folder and create a lib for each
goal is to select tasks for targets (e.g. because of flash issue)
2018-08-08 13:44:49 +02:00
Daniel Agar 9551dcb497 logger increase log_writer_file stack 1072 -> 1150 2018-08-07 17:21:15 +02:00
Beat Küng 81f0b64ad3 gps: add SER_GPS1_BAUD param to configure the baudrate
The default is auto-detect, but some GPS devices might not like that, such
as the Trimble MB-Two.
2018-08-07 02:07:49 +02:00
Beat Küng db9d25505d gps: update submodule (fix sign of heading offset) 2018-08-07 02:07:49 +02:00
Alessandro Simovic aad1ff0209 mission_block: explicit type conversion 2018-08-06 16:17:11 +02:00
Alessandro Simovic b527187a10 mission_block: swapped "param6" for "altitude" for consistency 2018-08-06 16:17:11 +02:00
Alessandro Simovic 337133e9fa use double LAT/LONG fields instead of float params for storing ROI settings 2018-08-06 16:17:11 +02:00
Alessandro Simovic 1448285b1c mavlink_mission: respect integer MAV_CMD in ROI settings as well
Otherwise the conversion from mavlink_mission_item to mission_item
will cause the latitude and longitude of the ROI to be off by a factor of 1e7
in the case of INT mode.
2018-08-06 16:17:11 +02:00
Bob-F a40c983137 updated submodule src/lib/DriverFramework 2018-08-06 13:32:36 +02:00
Bob-F cc3727bfbd skip creation of self-pointing link 2018-08-06 13:32:36 +02:00
Bob-F e056aa3204 Roll back change that handles absent test_data directory 2018-08-06 13:32:36 +02:00
Bob-F 082ef85773 handled a document issue and the case of absent test_data directory 2018-08-06 13:32:36 +02:00
Bob-F f2e3c0b6e9 Replaced a NULL with nullptr to fix an issue in make clang-tidy-quiet 2018-08-06 13:32:36 +02:00
Bob-F a9bb274001 Renamed mavlink wifi interface name and enabled land_detector 2018-08-06 13:32:36 +02:00
Bob-F 0368c26177 removed a sleep in init.c 2018-08-06 13:32:36 +02:00
Bob-F 627ea3b23e update according to pull request review comments 2018-08-06 13:32:36 +02:00
Bob-F 7c62fe885d Fixed an issue of documentation inconsistency 2018-08-06 13:32:36 +02:00
Bob-F adf411fdd8 Fixed style issue with Astyle 3.1 2018-08-06 13:32:36 +02:00
Bob-F 2ece14bad1 Port PX4 to BeagleBone Blue Board using library librobotcontrol instead of a submodule 2018-08-06 13:32:36 +02:00
Beat Küng e989c80205 replay: fix potential invalid memory access
_subscriptions is a vector that is resized when needed. However there could
still be references to elements in the vector when the resize happens.
These references then become invalid.
Using a vector of pointers fixes that.
2018-08-06 07:15:51 +02:00
Beat Küng e4485fc8cf ekf2 replay: use correct timestamp for attitude publication 2018-08-06 07:15:51 +02:00
Andreas Antener e0dc5ae7f4 px4iofirmware: only set mixer trims when they got updated 2018-08-05 23:24:57 +02:00
Andreas Antener 5500dfc550 px4iofirmware: moved the simple register updates down to the fall-through block, moved the sbus rate update up so it doesn't get called on each of the other updates which would set the wrong value 2018-08-05 23:24:57 +02:00
Andreas Antener 4db149f6e7 mixer: set/get_trim needs to return the amount of channels consumed by the mixer even if the mixer doesn't support trims (or is empty) 2018-08-05 23:24:57 +02:00
Andreas Antener f298d4bb4f mixer: use global new line check for parsing the heli mixer 2018-08-05 23:24:57 +02:00
Trevor Joynson ec2c230633 Remove conflicting optimization flags (-mcpu includes -march) (#10165) 2018-08-05 10:09:38 -04:00
mcsauder 722e891730 Add doxy styling to method comments and update comments, replace goto statements with stop() calls and return statements. 2018-08-05 09:54:46 +02:00
Daniel Agar 3261c5178c Jenkins update Devguide, Userguide, QGC metadata directly from pipeline 2018-08-04 19:02:23 -04:00
Daniel Agar 459ad7528f python scripts code coverage (#10157) 2018-08-04 18:22:08 -04:00
Daniel Agar d21fdf9988 pwm_out_sim: replace usleep with sleep
- the valid values are 0-999999
2018-08-05 00:19:11 +02:00
Daniel Agar d3f5c06ba7 Jenkins add unit test build with address sanitizier 2018-08-04 14:49:09 -04:00
Daniel Agar 36ff6202a9 Jenkins unit tests coverage force pass for now 2018-08-04 14:49:09 -04:00
Daniel Agar c3cf5e6822 Jenkins codecov.io add Flags for unit and mission tests 2018-08-04 13:21:49 -04:00
Daniel Agar 4af7025996 Jenkins move bloaty to Analysis stage of main pipeline 2018-08-04 13:08:59 -04:00
Daniel Agar 90f4e77a80 Jenkinsfile add new Analysis stage (#10150) 2018-08-04 12:51:51 -04:00
Daniel Agar a889ad8e8c Jenkins move all compile jobs to dedicated pipeline (#10149) 2018-08-04 12:23:46 -04:00
PX4 Jenkins 1d4ef1e6fa Update submodule micro-CDR to latest Sat Aug 4 01:27:00 UTC 2018
- micro-CDR in PX4/Firmware (1332d4dbc224a2980c37572be951d247a5698b9b): https://github.com/eProsima/micro-CDR/commit/92efe34b65622aef3d41315230cec0bce37a27e3
    - micro-CDR current upstream: https://github.com/eProsima/micro-CDR/commit/8125eac84c11d70ce148da4b67b2d73d46bf6c33
    - Changes: https://github.com/eProsima/micro-CDR/compare/92efe34b65622aef3d41315230cec0bce37a27e3...8125eac84c11d70ce148da4b67b2d73d46bf6c33

    8125eac 2018-08-03 Ricardo González Moreno - Merge commit 'c571c7f22602d88d2415ea46c19fb5d81e0260f1' into hotfix/enable_language
c571c7f 2018-08-03 Ricardo González Moreno - Squashed 'cmake/common/' changes from a4f9b91..9e7f35b
99cb75d 2018-08-02 Ricardo González Moreno - Hardening the warnings.
775a847 2018-08-02 Ricardo González Moreno - Removed warnings in windows.
cd13d68 2018-08-01 Ricardo González Moreno - Changing jenkins support to toolset.
6f2c623 2018-07-31 Ricardo González Moreno - Added files to support jenkins.
2018-08-04 10:07:25 -04:00
Daniel Agar 76848456bb Jenkins split SITL tests into separate pipeline (#10144) 2018-08-03 23:57:44 -04:00
Daniel Agar 3b5460a54a Update submodule mavlink v2.0 to latest Sat Aug 4 01:26:42 UTC 2018 (#10143)
- v2.0 in PX4/Firmware (ca3e4a5318): https://github.com/mavlink/c_library_v2/commit/2c4b0e9ff26ce4900a72335912e2604a1e9948de
    - v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/6404047979cadac62fecd75070cd995f1ca66ca2
    - Changes: https://github.com/mavlink/c_library_v2/compare/2c4b0e9ff26ce4900a72335912e2604a1e9948de...6404047979cadac62fecd75070cd995f1ca66ca2

6404047 2018-08-03 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/b4871443354d607298b6f67bedd6c473c69c659a
d0fb5b8 2018-08-03 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/1ba233efffb54a7ed634160cd11855b3f5021b74
2018-08-03 22:34:19 -04:00
mcsauder 21aea5bf6c Rename commander.cpp to Commander.cpp and update CMakeLists.txt. 2018-08-03 22:06:05 -04:00
Daniel Agar ca3e4a5318 Update submodule mavlink v2.0 to latest Thu Aug 2 20:26:39 CDT 2018 (#10140)
- v2.0 in PX4/Firmware (5cac32de66): https://github.com/mavlink/c_library_v2/commit/7014d02d665d5e8fa33f084f7c5f4dbcfd61b4b0
    - v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/2c4b0e9ff26ce4900a72335912e2604a1e9948de
    - Changes: https://github.com/mavlink/c_library_v2/compare/7014d02d665d5e8fa33f084f7c5f4dbcfd61b4b0...2c4b0e9ff26ce4900a72335912e2604a1e9948de

    2c4b0e9 2018-08-02 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/a31cd350d4c2046f2378fe64bb7b3da1cfa829f4
63f79b0 2018-08-02 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/8879d8e2f1ca51dbc0f4e57da0075076b1ade973
193557c 2018-08-01 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/e77128069d785b47dcc13033d555896ce28acf4c
2018-08-03 19:36:32 -04:00
Daniel Agar d04aef65d0 estimator_status reduce size of n_states 2018-08-03 17:42:48 -04:00
Daniel Agar 0626527d2c EKF2 estimator_status fill n_states and use correct type for health_flags and timeout_flags 2018-08-03 17:42:48 -04:00
Daniel Agar 2bf90574ed estimator_status separate LPE only flags and comment 2018-08-03 17:42:48 -04:00
Daniel Agar da68ea0d11 estimator_status delete unused nan_flags 2018-08-03 17:42:48 -04:00
Daniel Agar 92bfdea1e3 commander delete non-existant methods and cleanup 2018-08-03 17:38:16 -04:00
Daniel Agar 05ca1defee commander consolidate estimator checks in new method 2018-08-03 17:38:16 -04:00
Daniel Agar c415477caf calibration parameter category consistency 2018-08-03 16:48:49 +02:00
Daniel Agar bbe18ed5fd EKF2_MAG_DECL move to system category 2018-08-03 16:48:49 +02:00
Beat Küng a6f93c30d9 Revert "Move px4io firmware update logic block to rc.io."
This reverts commit 0928112a80.
2018-08-03 10:46:12 -04:00
Mark Sauder 002b8b6a9c Mavlink: add SCALED_IMU2 and SCALED_IMU3 (#9556)
- correct a gyro variable type, and add magnetometer values to ScaledIMU messages.
2018-08-03 09:33:17 -04:00
Dennis Mannhart 4a91074aaa FlightTaskAuto: add comment 2018-08-03 08:24:34 +02:00
Dennis Mannhart a24b614dec FlightTaskAutoLine: generate heading along track if yaw setpoint is not valid 2018-08-03 08:24:34 +02:00
Dennis Mannhart e0f505ec57 mc_pos_control_param: MPC_YAW_MODE remove option "set by waypoint" because that
is executed at any time if triplet as valid yaw waypoint
2018-08-03 08:24:34 +02:00
Dennis Mannhart 02feb10865 FlightTaskAuto: triplet yaw-setpoint has priority over MPC_YAW_MODE.
Add MPC_YAW_MODE option for heading along trajectory, which will be the same as
option 0 (heading towards target) if trajectory is straight line
2018-08-03 08:24:34 +02:00
Dennis Mannhart 694f49c80a FlightTaskAuto: method for computing heading from 2D vector 2018-08-03 08:24:34 +02:00
Dennis Mannhart 6cd16f345e FlightTaskAuto: set heading based on yaw mode 2018-08-03 08:24:34 +02:00
Dennis Mannhart f0282bcd8f FlightTaskAuto/Line: make params protected and add NAC_ACC_RAD and MPC_YAW_MODE 2018-08-03 08:24:34 +02:00
Dennis Mannhart 27812ad7ac mc_pos_control_params: add MPC_YAW_MODE for heading during auto 2018-08-03 08:24:34 +02:00
Dennis Mannhart d704a2d675 mission_param: remove MIS_YAWMODE 2018-08-03 08:24:34 +02:00
Dennis Mannhart c76621bdb2 RLT: set yaw to current yaw during climb 2018-08-03 08:24:34 +02:00
Dennis Mannhart 998a95db55 mission.h: remove MIS_YAWMODE 2018-08-03 08:24:34 +02:00
Dennis Mannhart e61131cf9c mission heading_sp_update: remove everthing except of MC and ROI logic. 2018-08-03 08:24:34 +02:00
Dennis Mannhart a3ca016c1d loiter.h: remove yawmode param 2018-08-03 08:24:34 +02:00
Dennis Mannhart f0140a6290 loiter: remove yaw_mode param and logic 2018-08-03 08:24:34 +02:00
Daniel Agar 2302c64004 listener: add optional rate and cleanup existing arguments 2018-08-03 06:50:41 +02:00
Jake Dahl 5cac32de66 added STACK_MAIN to CMakeLists.txt and bumped up the stack from 1024 default to 1100 2018-08-02 23:46:36 +02:00
Jake Dahl 58e81ef66b multiply current measurement by -1 to force positive value for current being sunk 2018-08-02 23:46:36 +02:00
Jake Dahl b9a60f0f29 removed comment copy/paste from GPS driver
A line was too long, shrunk it
2018-08-02 23:46:36 +02:00
Jake Dahl 3f550bf408 resolved merge conflicts 2018-08-02 23:46:36 +02:00
Beat Küng 79ba6b0d39 lsm303d: improve error output 2018-08-02 16:09:36 +02:00
Beat Küng 5437d55518 rc.sensors: try to start ist8310 on PX4FMU_V2
The Pixhack v3 comes with an external IST8310 in the GPS.
2018-08-02 16:09:36 +02:00
Beat Küng 8ef4f12b61 rc.sensors: fix BOARD_FMUV3, it was unset too early
It's used further down again.
2018-08-02 16:09:36 +02:00
Beat Küng bc9c25a376 fmu: fix safety button
- use the orb topic safety to check the safety state, because the actual
  safety state can come from the IO
- fix initialization if circuit breaker is set
2018-08-02 15:48:35 +02:00
Beat Küng 4c572577b2 px4io: unadvertise topics 2018-08-02 15:48:35 +02:00
mcsauder 0928112a80 Move px4io firmware update logic block to rc.io. 2018-08-02 12:19:23 +02:00
Dennis Mannhart 7723860f37 remove unused constant 2018-08-02 09:23:17 +02:00
Dennis Mannhart a06ff4a2ce FlightTaskAuto/Mapper/Line: move landing gear to mapper; fix comments 2018-08-02 09:23:17 +02:00
Dennis Mannhart 338ca3104c FlightTaskAutoLine: remove activate method bc uses same impl as FlightTaskAutoMapper 2018-08-02 09:23:17 +02:00
Martina 3fe2646d80 FlightTaskAuto: add comments and fix variable naming convention 2018-08-02 09:23:17 +02:00
Martina e13ca0d990 FlightTaskAuto: fix triplet reset 2018-08-02 09:23:17 +02:00
Martina f379035a3b FlightTaskAuto: move generation of the the internal waypoints to FlightTaskAuto such that they are available to all derived classes.
Change logic to update the internal triplets only when the navigator triplets have changed or when the vehicle state has changed.
2018-08-02 09:23:17 +02:00
Martina ade254394e fix parameters subscription 2018-08-02 09:23:17 +02:00
Martina 3f2f399b91 FlightTaskAutoMapper: clean-up and fix comments 2018-08-02 09:23:17 +02:00
Martina d85481be6d Restructure FlightTaskAutoLine:
-add FlightTaskAutoMapper that handles the different types of waypoint and
generates setpoints for all types except of position and loiter
- FlightTaskAutoLine generates the setpoint types position and loiter if
the flight between waypoint is a straight line
2018-08-02 09:23:17 +02:00
Daniel Agar 253323601a wind_estimator status print last publication 2018-08-02 08:07:01 +02:00
Daniel Agar ad41744670 wind_estimator add param to enable and start 2018-08-02 08:07:01 +02:00
Daniel Agar 6f204c4913 FlightTask initialize _dist_to_bottom
- fixes Coverity CID 306248
2018-08-02 08:06:08 +02:00
Daniel Agar 36fdd3a127 FlightTaskManualPosition initialize all fields
- fixes Coverity CID 306259
2018-08-02 08:06:08 +02:00
Daniel Agar 99b9eaea68 mavlink timesync avoid unintended integer divide
- fixes Coverity CID 306260
2018-08-02 08:06:08 +02:00
Daniel Agar a90c7659ad FlightTasks local position setpoint don't use copyRaw
- fixes Coverity CID 268659
2018-08-02 08:06:08 +02:00
Daniel Agar 568a5f1c4c delete ACCELIOCSELFTEST and GYROIOCSELFTEST 2018-08-02 08:05:52 +02:00
Daniel Agar 31c08c7ffb mpu9250 mag delete MAGIOCSHWLOWPASS and MAGIOCGHWLOWPASS 2018-08-02 08:05:52 +02:00
Daniel Agar bb9c38a480 delete MAGIOCSELFTEST 2018-08-02 08:05:52 +02:00
Daniel Agar daee7a4e4e commander preflight delete individual sensor selftest 2018-08-02 08:05:52 +02:00
Daniel Agar 92ff391c97 ekf2 fix GPS fix_type comparison
- fixes Coverity CID 306253
2018-08-02 07:46:43 +10:00
Lorenz Meier 18c46f562a Update README.md 2018-08-01 20:08:55 +02:00
Lorenz Meier ebb1ef623a Update README.md 2018-08-01 20:08:37 +02:00
Daniel Agar 2750541bfb appveyor limit branch builds (#10112) 2018-08-01 14:03:03 -04:00
Daniel Agar b5092bd183 Update submodule micro-CDR to latest Tue Jul 31 20:26:41 CDT 2018 (#10110)
- micro-CDR in PX4/Firmware (8f2facbac528cf94b6ac86828e58801c8c572994): https://github.com/eProsima/micro-CDR/commit/df48e526feca3bd140b0adf12c3c847a6d78ed79
    - micro-CDR current upstream: https://github.com/eProsima/micro-CDR/commit/92efe34b65622aef3d41315230cec0bce37a27e3
    - Changes: https://github.com/eProsima/micro-CDR/compare/df48e526feca3bd140b0adf12c3c847a6d78ed79...92efe34b65622aef3d41315230cec0bce37a27e3
2018-08-01 14:02:24 -04:00
Roman Bapst 8b1381ead9 update ecl l1 and usage for new roll angle setpoint slew rate limit (#10005)
* added ability to slew rate limit the roll angle output of the l1 controller
* FixedWingPositionControl: this avoids the steps in roll angle setpoint which occur when the controller
switches to a new waypoint
* GroundRoverPositionControl: adapted to new l1 API
2018-08-01 14:01:41 -04:00
Daniel Agar ac0988d519 travis-ci coverity properly run and submit scan
- the ignored warning (-Wno-missing-field-initializers) can be dropped in the future when GCC 4.8 is no longer supported
2018-08-01 13:50:42 -04:00
Daniel Agar 639a066cac Update submodule mavlink v2.0 to latest Tue Jul 31 20:26:26 CDT 2018 (#10070)
- v2.0 in PX4/Firmware (6d662c5531): https://github.com/mavlink/c_library_v2/commit/fb2c4f819819e2348285bc9e03ab711ceb6c4cc1
    - v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/7014d02d665d5e8fa33f084f7c5f4dbcfd61b4b0
    - Changes: https://github.com/mavlink/c_library_v2/compare/fb2c4f819819e2348285bc9e03ab711ceb6c4cc1...7014d02d665d5e8fa33f084f7c5f4dbcfd61b4b0
2018-08-01 13:32:12 -04:00
Daniel Agar daeb2d8417 travis-ci update coverity_scan build dependencies (#10107) 2018-08-01 10:18:26 -04:00
Daniel Agar 6d662c5531 AV-X configure i2c network switch at init 2018-07-31 21:44:38 +02:00
Beat Küng 4b42cfaa6c simulator_mavlink: improve error output 2018-07-31 11:51:15 +02:00
Beat Küng 2c148f07bd cdev: delete the prev_pollset in unlocked state
Because it uses a semaphore.
2018-07-31 11:49:45 +02:00
mcsauder 1fe526b8eb Updated and added full stops to comments and did some comment/whitespace formatting in the startup scripts. 2018-07-31 09:06:03 +02:00
Beat Küng 13f2315314 CDev: add DEVICE_POLL_DEBUG macro that removes all poll debug output from the build by default
Reduces 'uorb_tests latency_test' by about 1us
2018-07-30 23:06:32 +02:00
Beat Küng 99fd1f7213 CDev::poll_notify_one: remove checking the semaphore counter
The check is unnecessary. In the worst case the semaphore gets unlocked
twice, but it's not an issue because the waiter is only interested in the
first sem_post(), and the semaphore is then not used anymore.
2018-07-30 23:06:32 +02:00
Beat Küng 72773b75c3 CDev::poll: disable IRQs instead of using an expensive semaphore
poll() is one of the heavily used methods and thus needs to be optimized
as much as possible.

Test on Pixracer: uorb_tests latency_test
Before:
uORB note: ---------------- LATENCY TEST ------------------
INFO  [uorb_tests] mean:     40.4320 us
INFO  [uorb_tests] std dev:   1.3466 us
INFO  [uorb_tests] min:      39 us
INFO  [uorb_tests] max:      57 us
INFO  [uorb_tests] missed topic updates: 0
This Patch:
uORB note: ---------------- LATENCY TEST ------------------
INFO  [uorb_tests] mean:     31.3480 us
INFO  [uorb_tests] std dev:   1.4584 us
INFO  [uorb_tests] min:      30 us
INFO  [uorb_tests] max:      45 us
INFO  [uorb_tests] missed topic updates: 0
2018-07-30 23:06:32 +02:00
Beat Küng fbd553c528 uorb tests: improve & extend latency test output
- min/max
- std dev
- number of missed updates
2018-07-30 23:06:32 +02:00
Beat Küng 00ebffb0dd uorb tests: run at max priority & increase stack size
- running at max priority significantly decreases jitter for the latency
  test, providing more consistent results
- stack size increase is required for the latency test
2018-07-30 23:06:32 +02:00
Beat Küng 1514ec3a5a top: use SCHED_PRIORITY_MAX instead of 255 to specify the priority 2018-07-30 23:06:32 +02:00
rolandash 12f96adbe2 delete member value initialization in constructor. 2018-07-30 22:54:20 +02:00
rolandash 506d761d58 use local brightness variable. 2018-07-30 22:54:20 +02:00
rolandash c1830fd9ce format spaces. 2018-07-30 22:54:20 +02:00
rolandash 7d68c52835 correct indent. 2018-07-30 22:54:20 +02:00
rolandash 82d5ac56a9 fixed rgb pwm led breathing. 2018-07-30 22:54:20 +02:00
TSC21 ca42483794 update msgs fields from camelCase to snake_case so rosidl_generate_interfaces() is able to generate code for ROS IDL files 2018-07-30 21:40:28 +02:00
Daniel Agar 553d68b80f Makefile add doxygen helper 2018-07-30 21:36:35 +02:00
Dennis Mannhart 00e09524f7 SearchMin and BezierQuad: replace define with static constexpr (#10050) 2018-07-30 12:28:27 -04:00
Daniel Agar 6660418c31 rc_input make RC_SCAN_STRING static constexpr 2018-07-30 10:32:56 -04:00
Daniel Agar 0069141ffc px4fmu increase actuator controls poll timeout 2018-07-30 10:32:56 -04:00
Daniel Agar cdf828cbda rc_input don't store cycle_timestamp 2018-07-30 10:32:56 -04:00
Daniel Agar 46254420be rc_input add perf counters 2018-07-30 10:32:56 -04:00
Daniel Agar 658237f36a px4fmu move RC input to new rc_input driver 2018-07-30 10:32:56 -04:00
Daniel Agar 4e05f26659 ms4525 driver extend to support ms4515 2018-07-30 10:24:40 +02:00
mcsauder ac8f44268b Added remaining two channels of PWM_AUX_DIS disarm parameter set commands, remove trailing whitespace from pwm_params_aux.c and pwm_params_main.c, gps/params.c and added block comment headers to separate sections instead of whitespace. 2018-07-30 09:36:44 +02:00
Daniel Agar 56a7c63789 version lib fix BUILD_URI properly 2018-07-30 09:30:23 +02:00
Daniel Agar 28610a2b62 AV-X lps22hb only start on SPI 2018-07-30 00:36:05 -04:00
Daniel Agar 4f0c9c501a lps22hb cleanup startup options 2018-07-30 00:36:05 -04:00
Daniel Agar a4a040aa45 ADIS16477 run onboard self test during init 2018-07-29 18:09:34 -04:00
Daniel Agar cc1c37ffd1 ADIS16477 improve reset and probe logic 2018-07-29 18:09:34 -04:00
Daniel Agar cc96e5ec5e sensor messages remove unused fields and improve comments 2018-07-29 21:04:21 +02:00
Dennis Mannhart fc8a05f636 estimataor reset counter: set Flighttaskcounter equal reset-counter during activation (#10035)
- fixes #10033
2018-07-28 10:08:58 -04:00
Daniel Agar 921e9f6e09 commander params fix COM_VEL_FS_EVH unit
- fixes #10028
2018-07-28 10:03:19 -04:00
Daniel Agar 5e6b35758a commander params fix COM_OF_LOSS_T unit 2018-07-28 10:03:19 -04:00
Beat Küng 1fb5353a60 rc: add unit test for CRSF RC
Also cleanup other RC unit tests
2018-07-28 15:23:09 +02:00
Beat Küng 6e24bbbaaf fmu: add CRSF RC and Telemetry support
- Telemetry is only enabled on omnibus, since on Pixhawk it seems we cannot
  write to the RC UART due to how the board is wired
- For the Telemetry the UART needs to be opened RW
2018-07-28 15:23:09 +02:00
Beat Küng 04dbd40723 rc lib: add CRSF Crossfire protocol (RC and Telemetry) 2018-07-28 15:23:09 +02:00
Beat Küng 74e4619042 rc lib: cleanup, move structs out of common_rc.h 2018-07-28 15:23:09 +02:00
Beat Küng 388b963dd8 refactor fmu: fix naming convention for raw_rc_count & raw_rc_values 2018-07-28 15:23:09 +02:00
Beat Küng 3816145d59 fmu: fix init & use of _control_subs
0 is a valid file descriptor, init (all) to -1 instead
2018-07-28 15:23:09 +02:00
Beat Küng 49fe19c20f uavcan_main: fix init & use of _control_subs
0 is a valid file descriptor
2018-07-28 15:23:09 +02:00
Beat Küng 442d4410ca pwm_out_sim: cleanup, avoid unnecessary & incorrect init of _control_subs
These need to be set to -1.
2018-07-28 15:23:09 +02:00
Daniel Agar be3af59c76 lsm303agr flip z axis and properly set scaling and range 2018-07-28 15:22:20 +02:00
Daniel Agar 14cf92d8b2 lsm303agr split main 2018-07-28 15:22:20 +02:00
Daniel Agar 3d3855e87b AV-X configure default serial on UART5 (J116) 2018-07-28 03:21:01 -07:00
Roman 37f59ad4f5 mavlink: fixed nullptr dereferencing in case unknown mavlink message is
forwarded

Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-27 18:41:51 +02:00
Julian Oes 462cf131d5 mavlink: add sysid to UUID
To avoid that multiple SITL instances have the same UUID we add the
mavlink system ID to the UUID which is sent via mavlink.

This should resolve the case where multiple vehicles show up with the
same UUID in simulation.

Note that the UUID show in `ver` will still be the same for all
instances.
2018-07-27 11:49:28 +02:00
Matthias Grob 83c0888d80 Appveyor: finally found all install, build and path bugs, commented 2018-07-26 23:10:06 +02:00
Matthias Grob a31e851fd8 Appveyor: enable build cache and better download command 2018-07-26 23:10:06 +02:00
Matthias Grob cb57cf6ab5 Appveyor: switch to msi installer 0.3 2018-07-26 23:10:06 +02:00
Matthias Grob 3b1dcc8185 Cygwin: add appveyor sitl build 2018-07-26 23:10:06 +02:00
Beat Küng 382f989c9d ecl submodule: fix commit hash
The current commit hash points to a deleted branch.
2018-07-26 13:47:51 +02:00
Lorenz Meier c86dbe60a0 Increased mixer load buffer to allow larger mixer structures to fit.
This allows to load mixers with more inputs.
2018-07-26 08:39:01 +02:00
Daniel Agar 77751d4822 EKF2 set param EKF2_MAG_DECL volatile 2018-07-26 08:32:09 +02:00
Paul Riseborough 77f0883cb9 ekf2: Reinstate saving of mag declination for use next start
This capability was removed unintentionally by previous changes.
Requires ecl version with updated declination accessor function
2018-07-26 08:32:09 +02:00
mcsauder 8da1e67050 Move OUTPUT_MODE logic from rcS to rc.interface. 2018-07-26 08:17:52 +02:00
Jake Dahl 57dfcee842 added a check for not maybe_landed upon takeoff 2018-07-26 07:49:14 +02:00
Daniel Agar d7b2b48bad tap_esc increase stack 1100 -> 1180 bytes 2018-07-26 07:48:01 +02:00
Jake Dahl 4144a53cd6 added a check to ensure the current position setpoint is valid 2018-07-26 07:46:24 +02:00
Jake Dahl a1ff4a8a67 removed unneccessary includes, eliminated namespace on math, changed date
changed a comment

reverted a file back to master
2018-07-26 07:46:24 +02:00
Jake Dahl 21db15ff4f If already in landing, go straight to state RTL_LAND. Also cleaned up the comments 2018-07-26 07:46:24 +02:00
Jake Dahl 130cdf25bf prevent RTL if already landing 2018-07-26 07:46:24 +02:00
Jake Dahl 7c84e77312 we used to check if we have actually landed not mission reached in navigator 2018-07-26 07:45:00 +02:00
Daniel Agar 100f9553ce tests clang-tidy ignore modernize-pass-by-value 2018-07-25 08:50:10 +02:00
Dennis Mannhart 9c0a6eb87a clang modernize: remove void argument 2018-07-25 08:50:10 +02:00
Dennis Mannhart 40f2388295 test_search_min: remove printf 2018-07-25 08:50:10 +02:00
Dennis Mannhart 609d412217 BezierQuad: use template type Tp for default 2018-07-25 08:50:10 +02:00
Dennis Mannhart 7559610a7b BezierQuad: update description, replace Data with Vector3_t 2018-07-25 08:50:10 +02:00
Dennis Mannhart 6ddf214bbd BezierQuad: set cached_arc_length once computed 2018-07-25 08:50:10 +02:00
Dennis Mannhart fe48e06f9d add tests for Bezier and Golden Section Search libraries 2018-07-25 08:50:10 +02:00
Dennis Mannhart c8842665da mathlib: add golden section search 2018-07-25 08:50:10 +02:00
Dennis Mannhart 90f95bca0e add Bezier library 2018-07-25 08:50:10 +02:00
Daniel Agar 5ec010372c rcS preserve accel, gyro, and temp cal parameters 2018-07-25 07:48:19 +02:00
PX4 Jenkins b98f5aaf7e Update submodule micro-CDR to latest Tue Jul 24 20:26:29 CDT 2018
- micro-CDR in PX4/Firmware (eca3a58a36d7367d5d5ca4a6289585e13003cf51): https://github.com/eProsima/micro-CDR/commit/890b118196a253540bc175096fa53d7733005d7b
    - micro-CDR current upstream: https://github.com/eProsima/micro-CDR/commit/df48e526feca3bd140b0adf12c3c847a6d78ed79
    - Changes: https://github.com/eProsima/micro-CDR/compare/890b118196a253540bc175096fa53d7733005d7b...df48e526feca3bd140b0adf12c3c847a6d78ed79

    df48e52 2018-07-11 Luis Enrique Muñoz Martín - Removed some inline modifiers
c77a49f 2018-07-11 Luis Enrique Muñoz Martín - indent
4f659ab 2018-07-11 Luis Enrique Muñoz Martín - Removed unused images.
d3a5b4a 2018-07-11 Luis Enrique Muñoz Martín - Removed old files.
2018-07-25 07:31:02 +02:00
Matthias Grob 152c6db212 Fix logger signed unsigned error with GCC 7.3 in Cygwin (#10009) 2018-07-24 17:39:45 -04:00
Julian Oes 80cac6561f sensors: no temperature compensation in HITL
Temperature compensation is not supported in HITL. Therefore, don't try
and fail. This basically removes the confusing error message that we get
in HITL.
2018-07-24 18:56:36 +02:00
mcsauder ee3e34cd06 Move UART mapping comments back to top level rcS script. Deprecate PWM_ACHDIS and replace with PWM_AUX_OUT and set PWM_AUX_DIS value directly in vtol airframe config files. Replace tone_alarm instances with tune_control and default tune enums, and relocate an OUTPUT_MODE == fmu logic block in rcS. 2018-07-24 18:44:55 +02:00
Daniel Agar 4818e3abe0 ROMFS cmake combine copy, rc.autostart, prune steps 2018-07-24 10:50:24 -04:00
ChristophTobler 9aa6dad514 FlightTask orbit: make format 2018-07-24 15:03:53 +02:00
MaEtUgR e8d2f1c2be FlightTaskOrbit: execute MAVLink orbit command
Latest QGC daily supports sending an orbit command. This commit applies
the correct radius, rotation direction, velocity and center position.
Still missing is a check to have global position available and applying
x,y coordinates and altitude independently.
2018-07-24 15:03:53 +02:00
MaEtUgR 7c068e47ab FlightTaskOrbit: fix acceleration limit inverting velocity
The formula only calculated the absolute value of the velocity and
the sign (rotation direction) got lost in that case.
2018-07-24 15:03:53 +02:00
MaEtUgR 12290c27e6 FlightTask: update global reference
For the geo.h C library to convert between global and local frame
we need an up to date global reference which is currently inside the
vehicle_local_position message.
2018-07-24 15:03:53 +02:00
MaEtUgR 7d4fcccf83 FlightTasks: fix switch case style 2018-07-24 15:03:53 +02:00
MaEtUgR e95d795b08 FlightTasks: use member function as check for constistency 2018-07-24 15:03:53 +02:00
MaEtUgR 6472b579dc FlightTaskOrbit: switch rotation direction
Switch to positive tangential velocity being clockwise because with NED
frame z-axis points down and mathematically positive around the z-axis
results in clockwise yaw rotation when seen from above. Also MAVLink
messages and other components in PX4 are defined this way.
2018-07-24 15:03:53 +02:00
MaEtUgR 8d88fa2fca FlightTasks: fix multiple comments 2018-07-24 15:03:53 +02:00
MaEtUgR 675b6bbabc mathlib: fix comment typo 2018-07-24 15:03:53 +02:00
MaEtUgR 3b7d31de75 FlightTasks: reintroduce vehicle command handling
The handling for vehicle commands inside the FlightTasks library
was already there but commented out because the previously used
MAVLink messages were tied to the specific application we used and
there was no clean common message definition. Because there is now
a well defined message for the orbit task I'm uncommenting and using
the working message handling again here.
2018-07-24 15:03:53 +02:00
MaEtUgR 5dae404fb2 vehicle_commands: add VEHICLE_CMD_DO_ORBIT 2018-07-24 15:03:53 +02:00
Matthias Grob 93bab20510 FlightTaskOrbit: switch to FlightTaskAltitudeSmooth
Nice smooth altitude control is already provided by the existing
flight task for altitude mode. We inherit from it to resuse the
functionality and just all its update first not altering the setpoints
for the z-axis it produced.
2018-07-24 15:03:53 +02:00
Matthias Grob ce49ac0259 FlightTaskOrbit: better member descriptions 2018-07-24 15:03:53 +02:00
Matthias Grob 26e3dbec2e FlightTaskOrbit: name member constants start with underscore 2018-07-24 15:03:53 +02:00
Matthias Grob 2b6926fe9d FlightTaskOrbit: speed up stick input to a fixed time frame
Maximum velocity achievable in 4 seconds,
maximum radius achievable in 8 seconds for futher testing.
These should be parameters as soon as it works fine.
2018-07-24 15:03:53 +02:00
Matthias Grob 33ba041120 FlightTaskOrbit: improve yaw tracking with feed-forward
To make the vehicle front always point exactly to the center and not
lag behind.
2018-07-24 15:03:53 +02:00
Matthias Grob c2223030d9 FlightTaskOrbit: add acceleration limit & unify checks 2018-07-24 15:03:53 +02:00
Matthias Grob 79aaa59715 FlightTaskOrbit: adapt comments to convention and 2018 2018-07-24 15:03:53 +02:00
Matthias Grob 993d76c0da FlightTaskOrbit: fix vehicle yawing to the center
I accidentally swapped yaw setpoint and yawspeed setpoint when switching
to the new setpointinterface in 309237c4a2
2018-07-24 15:03:53 +02:00
Daniel Agar 1481015675 ROMFS cmake update dependency handling 2018-07-24 09:12:44 +02:00
ChristophTobler 99e58e2923 FlightTask StraightLine: make format 2018-07-24 08:40:05 +02:00
Matthias Grob 7e547e6322 FlightTask StraightLine: use 2D Vector and remove newline 2018-07-24 08:40:05 +02:00
ChristophTobler ccd8a47015 FlightTask StraightLine: set origin and target at the same time
This avoids issues with reseting/calculating the max vel/acc
2018-07-24 08:40:05 +02:00
ChristophTobler 9e8c3ff0dc FlightTask StraightLine: check if target and origin are the same 2018-07-24 08:40:05 +02:00
ChristophTobler 8998714130 FlightTask StraightLine: remove unused target reached flag 2018-07-24 08:40:05 +02:00
ChristophTobler 090db6a115 FlightTask StraightLine: set max vel/acc/dec if value is bigger 2018-07-24 08:40:05 +02:00
ChristophTobler c619009364 FlightTask StraightLine: replace powf(x,2) with x*x
Apparently this is faster
2018-07-24 08:40:05 +02:00
Beat Küng 7753dd4b4e refactor uorb: inline orb_publish_auto
It is a very small core function that needs to be fast.
2018-07-23 22:32:17 +02:00
Beat Küng 875ee794ef sensors: do not advertise topics before we have valid data
Modules generally do not check for a valid timestamp, thus we need to avoid
publishing invalid data.

This is for example problematic in the attitude_estimator_q, if the
system has no mag: it will copy the (invalid) data and then fails to
initialize, as there is no more mag data coming in.
2018-07-23 22:32:17 +02:00
Beat Küng f4fef5efc8 attitude_estimator_q: cleanup output, remove unnecessary topic init 2018-07-23 22:32:17 +02:00
Beat Küng 97fe5f928a mavlink_orb_subscription: remove unneeded checks
not needed anymore after the previous commit
2018-07-23 22:32:17 +02:00
Beat Küng 2fe5e7735a uorb: allow an orb subscription to retrieve data that was published prior to subscribe 2018-07-23 22:32:17 +02:00
Beat Küng 3f615695b6 ROMFS: fix some cmake issues
- every incremental rebuild extended ${config_romfs_files_list}, the
  chached variable was never reset
- cmake -E copy_directory did not remove deleted files

remaining issue: removing a file from the ROMFS & px4_add_romfs_files()
does not trigger the px_romfs_pruner.py COMMANDs to be re-executed.
2018-07-23 18:23:46 +02:00
ChristophTobler 8b3716c0df FlightTask StraightLine: remove 10% safety margin 2018-07-23 12:54:39 +02:00
ChristophTobler 7e0976f0ef FlightTaskStraightLine: fix braking distance corner cases
check if target vel is bigger than desired vel
accelerate if already inside braking distance but vel is lower
2018-07-23 12:54:39 +02:00
ChristophTobler e527a51de6 FlightTaskStraightLine: add descriptions for defines 2018-07-23 12:54:39 +02:00
ChristophTobler 37d4f714b2 FlightTaskStraightLine: replace define with parameter 2018-07-23 12:54:39 +02:00
ChristophTobler ebceac5fff FlightTasks: add lib for setpoints on a straight line 2018-07-23 12:54:39 +02:00
Beat Küng 3f03288a95 omnibus: add support for Hobbywing XRotor F4 G2
It has an ICM-20602 IMU
2018-07-23 11:04:17 +02:00
Kurt Kiefer b111489825 PX4IO: re-enable handling digital rssi
The px4io driver was ignoring the contents of PX4IO_P_RAW_RC_NRSSI
since digital rssi wasn't working properly. This change was made in
commit 41b127d40.

Now that PX4IO_P_RAW_RC_NRSSI is returning valid values for digital
rssi, we can re-enable its use.
2018-07-23 08:16:51 +02:00
Kurt Kiefer 7a5a135739 PX4IO Firmware: promote rssi to static storage
The controls_tick() rate exceeds the rate at which RC receivers
provide digital rssi. As such, most ticks set PX4IO_P_RAW_RC_NRSSI
to 0.

This change promotes the controls_tick() local variable 'rssi' to
static storage so that it doesn't have to be updated every tick to
keep the correct value in PX4IO_P_RAW_RC_NRSSI.
2018-07-23 08:16:51 +02:00
Daniel Agar b1d3bb0403 stop ignoring Wmissing-field-initializers and fix (#9912) 2018-07-22 12:45:52 -04:00
Paul Riseborough fc65939f0e ekf2: Add support for use of multiple GPS receivers (#9765) 2018-07-22 12:18:30 -04:00
Daniel Agar afe82ffb31 Update submodule mavlink v2.0 to latest Sat Jul 21 21:26:19 EDT 2018
- v2.0 in PX4/Firmware (8feac97399): https://github.com/mavlink/c_library_v2/commit/f2ae3ada7990d6fea25c5206057375e0c4d05672
    - v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/fb2c4f819819e2348285bc9e03ab711ceb6c4cc1
    - Changes: https://github.com/mavlink/c_library_v2/compare/f2ae3ada7990d6fea25c5206057375e0c4d05672...fb2c4f819819e2348285bc9e03ab711ceb6c4cc1

fb2c4f8 2018-07-19 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/de22395191208df6c42e243a6d7993e6a364e48a
550c3f5 2018-07-19 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/fe88d5fd12f94066a42b80ed44f7284c9b9e72a3
404f50f 2018-07-18 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/3940532218b0a1a9491d3f0fa5eec8d4555693ad
2018-07-22 09:45:02 -04:00
Paul Riseborough a37580ceac mc_pos_control: remove un-used parameter 2018-07-22 17:42:31 +10:00
Paul Riseborough 73a7aa75a8 FlightTasks: update terrain hold transition logic.
Use pre-existing MPC_HOLD_MAX_XY parameter for speed threshold.
Use _stick_expo variable for stick movement check.
Update documentation.
2018-07-22 17:42:31 +10:00
Paul Riseborough dd3fb84db8 mc_pos_control: Fix parameter description error 2018-07-22 17:42:31 +10:00
Paul Riseborough c9ca27e7c2 ekf2: Update documentation for EKF2_RNG_AID parameter 2018-07-22 17:42:31 +10:00
Paul Riseborough 7ff23f7859 posix-configs: Update optical flow SITL test parameter defaults
Use baro for height in EKF.
Use terrain hold mode in height controller.
2018-07-22 17:42:31 +10:00
Paul Riseborough 2baa6caacb FlightTasks: Fix transition between use of local and ground height (+2 squashed commits)
Squashed commits:
[ed2a243] FlightTasks: Preserve control loop tuning when applying max altitude limit
[b33b947] FlightTasks: Add terrain hold function

This new mode of altitude control uses terrain following when holding position and normal altitude control when moving.
2018-07-22 17:42:31 +10:00
Paul Riseborough 82780e33b9 mc_pos_control: Add parameter support for terrain hold function
This new mode of altitude control uses terrain following when holding position and normal altitude control when moving.
2018-07-22 17:42:31 +10:00
mcsauder 14a8afb61d Formatted whitespace and comments, standardized comment block styles and single line comments, and added capitalization and full stops to comments wherever appropriate. 2018-07-22 08:44:30 +02:00
Kurt Kiefer a114450f51 spektrum_rssi: clear PX4IO_P_SETUP_FEATURES_ADC_RSSI when valid
When we're getting valid rssi input from the telemetry receiver,
clear the flag PX4IO_P_SETUP_FEATURES_ADC_RSSI in r_setup_features.
2018-07-22 08:42:30 +02:00
Kurt Kiefer fc16dce8f1 spektrum_rssi: initialize rssi lookup as constexpr
Rather than initializing the rssi percentage lookup table at runtime
on the heap, we would like it to be stored in flash.

This change pre-computes the rssi lookup table.
2018-07-22 08:42:30 +02:00
Kurt Kiefer 597372bec9 Gather RSSI data from Spektrum Telemetry receivers
On SPM4649T receivers with firmware versions at least 1.1RC9, the
serial data will contain an rssi value in dbm, as outlined in the
Remote Receiver Interfacing document section 8.3.1.

If the value received is greater than or equal to zero, the receiver
does not support rssi data, and the incoming value will be ignored.
However, if the value is negative, we can use the rssi value.

When we have a valid rssi, it gets mapped to a percentage from 0 to
100 as expected by mavlink. This mapping is constructed as a
logarithmic function over Spektrum's published minimum and maximum
rssi values, -92dBm to -42dBm as 0 to 100:
100 Log10[1 + (x - min) * (9 / (max - min))]

This change updates all calls to the dsm input rountes to return
the rssi value.

Note that one place this doesn't work with the px4io enabled.
There is a comment left in the absence of analog rssi that:
"we do not actually get digital RSSI regs[PX4IO_P_RAW_RC_NRSSI]".
This restriction has been left in place, as removing it exposes a
problem where the frequency of the control tick is greater than
that of valid dsm frames so the rssi isn't valid every cycle.
2018-07-22 08:42:30 +02:00
Daniel Agar 8feac97399 docker update all to 2018-07-19 tagged image 2018-07-21 15:52:19 -04:00
mcsauder ec16a4d063 Migrate LOGGER_BUF argument to rc.logging, group OUTPUT_MODE instances closer together by relocating UAVCAN logic block in rcS, and alphabetize hardware specific logic in rc.sensors. 2018-07-20 19:01:33 +02:00
David Sidrane 5ae39229b8 manifest:Clean up using synbolic constants 2018-07-20 18:29:58 +02:00
David Sidrane 45f210e544 fmu:Use Compile time & run time Safety switch control
Platforms that provide HW versioning tend to have
   more FLASH and can have a PX4IO as an option.
   (E.G.) FMUv5. This change provides run time
   decision to control the safety switch on
   platfors that have BOARD_HAS_VERSIONING.

   On platforms with no versioning and have
   BOARD_HAS_STATIC_MANIFEST defined as a 1
   The decision is compile time only. When a PX4IO
   is present the fmu control of the safety is
   not built.
2018-07-20 18:29:58 +02:00
David Sidrane 3ea3c1f537 px4fmu-v5:Runtime Safety LED support.
Safety Switch is HW version dependent on having an PX4IO
   So we init to a benign state with the _INIT definition
   and use the non _INIT verion in the driver if the run time
   decision is we do not have a PX4IO
2018-07-20 18:29:58 +02:00
David Sidrane 3136521493 px4fmu-v5:Fix led toggle.
The phyical led read was not returing the logical state
    of the LED. Since they are active low, when on it was
    returning 0 and the the negation operation in togggle
    was makeing that a 1 which it already was.
2018-07-20 18:29:58 +02:00
David Sidrane 1db1155697 px4fmu-v5:Comment and define SAFETY LED and Button so FMU can use
Safety Switch is HW version dependent on having an PX4IO
  So we init to a benign state with the _INIT definition
  and provide the the non _INIT one for the driver to make a run time
  decision to use it.

  We also define the FMU GPIO_BTN_SAFETY and GPIO_LED_SAFETY alias
  so the px4fmu will drrive will be built with the safety switch
  code at compile time and have runtime control via the manifest
2018-07-20 18:29:58 +02:00
David Sidrane c9cf17c432 px4fmu-v5:define BOARD_HAS_CONTROL_STATUS_LEDS
FMUv5 supports status LEDs.
2018-07-20 18:29:58 +02:00
David Sidrane 0b60df5fe0 px4fmu-v2:Added HW manifest (only support PX4IO) for now
This is the beginning of the manifest support on FMUv2/v3
   it only provide PX4_MFT_PX4IO for now.
2018-07-20 18:29:58 +02:00
David Sidrane 08e04e3c5c px4fmu-v4pro:Comment GPIO_BTN_SAFETY_FMU is inited and not used 2018-07-20 18:29:58 +02:00
David Sidrane 4330d6dad5 px4fmu-v4pro::Define BOARD_HAS_STATIC_MANIFEST as 1
When BOARD_HAS_STATIC_MANIFEST is defined with a value of 1
   and the board_config provides the BOARD_USES_PX4IO_VERSION
   then the board_common will define
   PX4_MFT_HW_SUPPORTED_PX4_MFT_PX4IO
2018-07-20 18:29:58 +02:00
David Sidrane 3b0427c2a5 auav-x21:Define BOARD_HAS_STATIC_MANIFEST as 1
When BOARD_HAS_STATIC_MANIFEST is defined with a value of 1
    and the board_config provides the BOARD_USES_PX4IO_VERSION
    then the board_common will define
    PX4_MFT_HW_SUPPORTED_PX4_MFT_PX4IO
2018-07-20 18:29:58 +02:00
David Sidrane 68aa5664b0 px4io:Use manifest query mechanism 2018-07-20 18:29:58 +02:00
David Sidrane 840b3ae985 px4fmu-v5:manifest add initial query mechanism 2018-07-20 18:29:58 +02:00
David Sidrane a0cc4dc345 Fix typo 2018-07-20 18:29:58 +02:00
David Sidrane f2cb7b0ade board_common:Add underpinning for board manifest query 2018-07-20 18:29:58 +02:00
David Sidrane 5b4da90d60 fmuv2:Added State information for FMUv2 questionable hardware
This HW does not respond to the GPIO query consistantly
   and should be treated like regular FMUv2
2018-07-20 18:29:58 +02:00
David Sidrane 7524a318cc px4fmuv5:Fix display order to ver rev 2018-07-20 18:29:58 +02:00
David Sidrane 7a4ac739f1 Fix Stack warning 2018-07-20 18:29:58 +02:00
Daniel Agar 345f6367a5 av-x remove mc_pos_control_tests 2018-07-20 09:26:18 +02:00
Dennis Mannhart 18a3c08659 mc_pos_control: idle to armed state delay controlled by parameter MPC_IDLE_TKF 2018-07-20 09:26:18 +02:00
Dennis Mannhart ab1ae1fb4e mc_pos_control_main: trigger failsafe if no setpoint along D-direction is valid 2018-07-20 09:26:18 +02:00
ChristophTobler 9362f844f4 position control: fix failsafe thrust
invert direction to point upwards and increase to 70% of throttle range between min and hover
2018-07-20 09:26:18 +02:00
ChristophTobler 7cc85885a4 position control: set _skip_controller before calling _interfaceMapping()
Without this failsafe will be overwritten
2018-07-20 09:26:18 +02:00
ChristophTobler 80867343ab mc_pos_control: trigger failsafe if no pos, vel or thrust pair is valid 2018-07-20 09:26:18 +02:00
Dennis Mannhart 260284571d mc_pos_control: move failsafe logic into method 2018-07-20 09:26:18 +02:00
Dennis Mannhart ac2c49218d mc_pos_control: remove mavlink_log_info 2018-07-20 09:26:18 +02:00
Dennis Mannhart f11a65a74f mc_pos_control: fix overwrite for state velocity 2018-07-20 09:26:18 +02:00
Dennis Mannhart f2d559a4c2 mc_pos_control: minor refactor 2018-07-20 09:26:18 +02:00
Matthias Grob cc0bc05156 mc_att_control: remove useless parameter MC_YAW_FF
It scales the yawspeed setpoint arbitrarily by default with 0.5.
This makes no sense because when you give a setpoint of 1rad/s then
you expect the setpoint to get executed. If you want manual yawspeed
response to be less agressive on the stick use the scaling parameter
for the stick MPC_MAN_Y_MAX.
2018-07-20 09:26:18 +02:00
Dennis Mannhart b5731e0ccd FlightTaskOffboard: only start task if control mode flags are met 2018-07-20 09:26:18 +02:00
Dennis Mannhart bf4ac7a9d6 mc_pos_control: for terrain following use range sensor climbrate for velocity estimate 2018-07-20 09:26:18 +02:00
Dennis Mannhart eb7139bc56 FlightTaskManualAltitude: respect maximum altitude if there is a valid distance sensor 2018-07-20 09:26:18 +02:00
Dennis Mannhart c907e7a9dc FlighttaskManualAlititude: replace SENS_FLOW_MINRNG with hagl_min 2018-07-20 09:26:18 +02:00
Dennis Mannhart 4af9d79986 FlighttaskManualPosition: check if estimator velocity maximum is finite
before applying limits
2018-07-20 09:26:18 +02:00
MaEtUgR efed766919 FlightTasks: small rebase naming and typo fixes 2018-07-20 09:26:18 +02:00
Dennis Mannhart e51e1bbe74 mc_pos_control: replace legacy refactor
Until now we replaced legacy position controller functionality inside
the flight task architecture to split up the huge position control
module into the different tasks and have a modular setup with a clear
setpoint interface. This commit removes all the legacy code and hard
switches to using the flight task architecture for multicopter.

This is done because maintaining and testing everything in parallel is
not sustainable. The architecture is by now tested to cover all basic
legacy functionality and missing corner cases can be fixed a lot easier
with the new architecture.
2018-07-20 09:26:18 +02:00
Dennis Mannhart 29fb5089bd FlightTasks: construct all tasks in constructor 2018-07-20 09:26:18 +02:00
Dennis Mannhart b1530d1a81 FlightTasks: create struct that contains FlightTask and FlightTaskIndex 2018-07-20 09:26:18 +02:00
Dennis Mannhart 83cc2b0e72 FlightTaskAuto: reset lock position to NAN 2018-07-20 09:26:18 +02:00
Dennis Mannhart c12dcb4eed FlightTaskAuto: take care of case when triplet.lat/lon are invalid, which corresponds
to position lock.
2018-07-20 09:26:18 +02:00
Dennis Mannhart 65ad6edaf0 ManualSmoothingXY: remove empty lines 2018-07-20 09:26:18 +02:00
Dennis Mannhart b9d5189fe5 ManualSmoothing: direction change with maximum acceleration 2018-07-20 09:26:18 +02:00
Dennis Mannhart a5e8eb23ad PositionControl: saturate thrust integral 2018-07-20 09:26:18 +02:00
Dennis Mannhart 5ffcb6af01 PositionControl: set vel_dot to 0 if NAN 2018-07-20 09:26:18 +02:00
Dennis Mannhart 33d0a4e8ed FlightTaskAuto: replace target with destination for checks 2018-07-20 09:26:18 +02:00
Dennis Mannhart 92e93639d3 FlightTaskAuto: require valid position in 3D 2018-07-20 09:26:18 +02:00
Dennis Mannhart c4c01358b9 FlightTaskManualAltitude: do terrain following when distance sensor active and
below minimum distance to ground.
2018-07-20 09:26:18 +02:00
Dennis Mannhart bd85f5f993 FlightTask: set min_distance_to_ground to NAN as default and when
distance sensor is used to SENS_FLOW_MINRNG
2018-07-20 09:26:18 +02:00
Dennis Mannhart 80775d588b vehicle constraints: minimum distance to ground. currently used when distance sensor
is available
2018-07-20 09:26:18 +02:00
Dennis Mannhart ee7d5c3f38 FlightTaskAuto: remove unused member variable 2018-07-20 09:26:18 +02:00
Dennis Mannhart 7b13803e2c PositionControl: for thrust setpoints only use MPC_MANTHR_MIN for minimum thrust 2018-07-20 09:26:18 +02:00
Dennis Mannhart f30bf215db MulticopterLanddetector: adjust minimum throttle if climb-reate is not enabled 2018-07-20 09:26:18 +02:00
Dennis Mannhart e408870857 FlightTaskManual: remove unused override 2018-07-20 09:26:18 +02:00
Dennis Mannhart be6f3a5b48 FlightTaskOffboard: valid position and velocity is required 2018-07-20 09:26:18 +02:00
Dennis Mannhart bd2de0e585 FlightTaskAuto: valid target is required and valid reference 2018-07-20 09:26:18 +02:00
Dennis Mannhart 4713f47668 FlightTaskManualPosition: valid position/velocity in xy required 2018-07-20 09:26:18 +02:00
Dennis Mannhart 72a213aff7 FlightTaskManualAltitude: valid altitude/climb-rate is required 2018-07-20 09:26:18 +02:00
Dennis Mannhart fc4fa169df FlightTaskManualStabilized: valid yaw is required 2018-07-20 09:26:18 +02:00
Dennis Mannhart 2af253fa9f FlightTaskManual: sticks not to be finite
activation method not needed
2018-07-20 09:26:18 +02:00
Dennis Mannhart 6a7a7d7ff7 FlightTask: check if states are valid. if not valid, set them to NAN 2018-07-20 09:26:18 +02:00
Dennis Mannhart e8620708b3 PositionControl: set states to zero if not valid 2018-07-20 09:26:18 +02:00
Dennis Mannhart b2af9c3f58 FlightTasks: error to char string message 2018-07-20 09:26:18 +02:00
Dennis Mannhart afd02aca92 FlightTask: fail activation if required states are not available 2018-07-20 09:26:18 +02:00
Dennis Mannhart e6f6e2085c ControlMath: remove false comment 2018-07-20 09:26:18 +02:00
Dennis Mannhart 3ea7f8783f FlightTaskManualAltitude: fix comment 2018-07-20 09:26:18 +02:00
Dennis Mannhart 414f38b677 test_controlmath: work around for internal compiler error: in trunc_int_for_mode, at explow.c:55 2018-07-20 09:26:18 +02:00
Dennis Mannhart c56ae130a7 test_controlmath remove static 2018-07-20 09:26:18 +02:00
Dennis Mannhart 9c7c60ddc8 remove mc_pos_control_tests 2018-07-20 09:26:18 +02:00
Dennis Mannhart 89c266e699 by value to reference 2018-07-20 09:26:18 +02:00
Dennis Mannhart a0c3c80b37 FlightTaskManualStabilized make reset counter for heading static 2018-07-20 09:26:18 +02:00
Dennis Mannhart 68dd2d739a ManualSmoothingXY indent 2018-07-20 09:26:18 +02:00
Dennis Mannhart 1317844a94 ManualSmoothingXY fix comments and style 2018-07-20 09:26:18 +02:00
Dennis Mannhart 250afd49a9 ManualSmoothingZ: update comments 2018-07-20 09:26:18 +02:00
Dennis Mannhart 216279b576 FlightTask: activate tasks with setpoints in use 2018-07-20 09:26:18 +02:00
Dennis Mannhart 389f897b04 mc_pos_control: member initialization during deceleration 2018-07-20 09:26:18 +02:00
Dennis Mannhart 46f91154a4 Smoothing: initialize ModuleParam in body of constructor because of compiler error 2018-07-20 09:26:18 +02:00
Dennis Mannhart 9c2ec3c229 PositionControl: add control states structure 2018-07-20 09:26:18 +02:00
Dennis Mannhart bf15e852ff style-check 2018-07-20 09:26:18 +02:00
Dennis Mannhart cfe7d64a42 cmake/configs: remove module test for mc_pos_control 2018-07-20 09:26:18 +02:00
Dennis Mannhart c6055c979a systemcmds/tests: add test_controlmath 2018-07-20 09:26:18 +02:00
Dennis Mannhart 90a7d836fc ControlMath:: add legacy cross_sphere_line method 2018-07-20 09:26:18 +02:00
Dennis Mannhart c2343589d8 move cross_sphere_line_test method into test_controlmath.cpp
remove mc_pos_control_tests since empty
move test_controlmath.cpp into systemcmds/tests directory
2018-07-20 09:26:18 +02:00
Dennis Mannhart 09b7d0f659 the static keywork is a workaround for an internal bug of GCC
"internal compiler error: in trunc_int_for_mode, at explow.c:55"
2018-07-20 09:26:18 +02:00
Dennis Mannhart 742e9f7b15 FlightTaskManualStabilzied: check for absolute yaw 2018-07-20 09:26:18 +02:00
Dennis Mannhart cfa412b55f make format 2018-07-20 09:26:18 +02:00
Dennis Mannhart afbeafebd8 replace heading_reset_counter 2018-07-20 09:26:18 +02:00
Dennis Mannhart 9ec47f2b74 replace reset counter logic for estimator reset for manual controlled mode 2018-07-20 09:26:18 +02:00
MaEtUgR 70802ba15a FlightTaskManual: Yaw lock with deadzone and expo
More than a year ago I started the easy to use math::Functions to handle
the always used mathematical SISO functions to be tested and available.

I switched x, y and z stick input to the freesh programmed deadzone and
exponential functions from the library to unify and clarify their use.
I just realized yaw was left over because it lead to a drift problem in
certain new use cases.

Now I'm just adding the yaw stick to the already well working method.
2018-07-20 09:26:18 +02:00
Dennis Mannhart 8a3c7f9e41 PositionControl: style check 2018-07-20 09:26:18 +02:00
Dennis Mannhart 2519d97aa2 PositionControl: add failsafe 2018-07-20 09:26:18 +02:00
Dennis Mannhart 2017e394b3 speed limitation during auto-takoff: remove from legacy and add to FlightTask 2018-07-20 09:26:18 +02:00
Dennis Mannhart dcdbdbd8eb FlightTaskAuto: need to remove check for yaw valid since there is a
bug in the navigator where this flag is not correctly set.
2018-07-20 09:26:18 +02:00
Dennis Mannhart 740f1f284f FlightTaskOffboard: enable triplet type takeoff, land etc 2018-07-20 09:26:18 +02:00
Dennis Mannhart 1099dd8c7d FlightTaskOffboard: first commit similar in logic to legacy code
FlightTaskOffboard: ensure supported offboard setpoints
2018-07-20 09:26:18 +02:00
Dennis Mannhart dca378fbfd FollowMe: legacy implementation. NOTE: FOLLOW-ME is already broken on legacy code. 2018-07-20 09:26:18 +02:00
Dennis Mannhart 547cdc051c FlightTask: apply gear switch depending on task 2018-07-20 09:26:18 +02:00
Dennis Mannhart c637ccb65f FlightTaskAutoLine: move altitude above ground computaiton to method 2018-07-20 09:26:18 +02:00
Dennis Mannhart 3ea0a53192 FlightTask: set landing gear up boolean to false 2018-07-20 09:26:18 +02:00
Dennis Mannhart cdb723e54c vehicle_constraints: landing gear up boolean 2018-07-20 09:26:18 +02:00
Dennis Mannhart 7d7a2dffbf Smoothing-classes: initialize to parameters 2018-07-20 09:26:18 +02:00
Dennis Mannhart 5ef2a61be5 ManualSmoothingXY: ensure that maximum speed is correctly propagated to the smoothing class 2018-07-20 09:26:18 +02:00
Dennis Mannhart 9df337e243 FlightTaskManualPosition: adjust scale based on vehicle maximum allowed speed sent by estimator 2018-07-20 09:26:18 +02:00
Dennis Mannhart 66d5f2ffd2 FlightTaskAuto: reference update only if refence altitude has not bee set. 2018-07-20 09:26:18 +02:00
Dennis Mannhart 45810ec2b4 PositionControl: replace constraint structure with new constraint message structure 2018-07-20 09:26:18 +02:00
Dennis Mannhart 9e740f1aff FlightTaskManualAlt/Position/Sport: replace limits with constraint member structure 2018-07-20 09:26:18 +02:00
Dennis Mannhart 6f704bd1e4 FlightTaskManualStabilized: replace limit with new member constraints structure 2018-07-20 09:26:18 +02:00
Dennis Mannhart dbb222e6ed FlightTaskAutoLine: set landing constraints and reset constraints 2018-07-20 09:26:18 +02:00
Dennis Mannhart 4d6539b076 FlightTaskAuto: override default constraints 2018-07-20 09:26:18 +02:00
Dennis Mannhart 962c2eff61 FlightTask: rename mehtod and add default parameter for constraints 2018-07-20 09:26:18 +02:00
Dennis Mannhart edb2e3256f FlightTask: getConstraints method and member 2018-07-20 09:26:18 +02:00
Dennis Mannhart 9f11f1afcf vehicle constraint message: fix range comment 2018-07-20 09:26:18 +02:00
Dennis Mannhart 0f4be12646 msg: first draft of vehicle_constraints message 2018-07-20 09:26:18 +02:00
Dennis Mannhart 51d4c1f305 FlightTasks: add getter method for constraints 2018-07-20 09:26:18 +02:00
Dennis Mannhart 63871bb4a5 FlightTaskManualAltitude: update comments 2018-07-20 09:26:18 +02:00
Dennis Mannhart 19bd7a9163 FlightTaskManualAltitude: terrain following 2018-07-20 09:26:18 +02:00
Dennis Mannhart ccd0be82ba FlightTaskManualAltitude: if flow is on, ensure minimum altitude 2018-07-20 09:26:18 +02:00
Dennis Mannhart 93ebb60b84 FlightTaskAutoLine: distance to bottom depending on the mode 2018-07-20 09:26:18 +02:00
Dennis Mannhart e1bc7a8e0a FlightTask.cpp resetSetpoints if subsctiption fails 2018-07-20 09:26:18 +02:00
Dennis Mannhart 5a4701c7de Flighttask: update comments 2018-07-20 09:26:18 +02:00
Dennis Mannhart 97be84b0e4 FlightTask: introduce method for limits and adjust accordingly for all the tasks 2018-07-20 09:26:18 +02:00
Dennis Mannhart 73b4f452cc FlightTask: add distance to bottom 2018-07-20 09:26:18 +02:00
Dennis Mannhart 1759e181dc FlightTaskAutoLine: legacy support velocity ramp at low altitude 2018-07-20 09:26:18 +02:00
Dennis Mannhart 7d30db1395 FlightTaskAuto: subscribe to home position 2018-07-20 09:26:18 +02:00
Dennis Mannhart 24e6e4041f PositionControl: format clean up 2018-07-20 09:26:18 +02:00
Dennis Mannhart 89c0259b2a PositionControl: replace overwrite with ModuleParams updateParams method 2018-07-20 09:26:18 +02:00
Dennis Mannhart 6d716f2d26 px4_module_params: make updateParams virtual 2018-07-20 09:26:18 +02:00
Dennis Mannhart 4c1fcca294 PositionControl.cpp: replace all params with ModuleParams type. Add method that overwrites
parameter values
2018-07-20 09:26:18 +02:00
Dennis Mannhart 7dbc368779 PositionControl.hpp: inherit from ModuleParams and replace params with ModuleParams type 2018-07-20 09:26:18 +02:00
Dennis Mannhart aef6b9216e FlightTasksAuto/Line: replace BlockParams with module params 2018-07-20 09:26:18 +02:00
Dennis Mannhart 6cfb89a8e8 test_controlmath rebase fix: EPS to FLT_EPSILON 2018-07-20 09:26:18 +02:00
Dennis Mannhart caa773008a PositionControl: degrees to radians 2018-07-20 09:26:18 +02:00
Dennis Mannhart 4a9e5941b6 mc_pos_control and FlightTaskAuto rebase fix 2018-07-20 09:26:18 +02:00
Dennis Mannhart 4761f0a344 PositionControl: bug fix Pv replacement with Pp 2018-07-20 09:26:18 +02:00
Dennis Mannhart 83f6398e93 ControlMath: comments refactor 2018-07-20 09:26:18 +02:00
Dennis Mannhart 19743bcaec FlightTaskAuto: comments refactor 2018-07-20 09:26:18 +02:00
Dennis Mannhart c01fab089a PositionControl parameter renaming. Use the the name as stored in the metadata 2018-07-20 09:26:18 +02:00
Dennis Mannhart cf59c2a2ac PositionControl/mc_pos_control: update comments 2018-07-20 09:26:18 +02:00
Dennis Mannhart 673945f28b PositionControl: check if constraints are below global maximum 2018-07-20 09:26:18 +02:00
Dennis Mannhart 1cde38f82f FlightTaskAuto: always update yaw 2018-07-20 09:26:18 +02:00
Dennis Mannhart 29391acbca FlightTaskAutoLine: fix greater sign 2018-07-20 09:26:18 +02:00
Dennis Mannhart 60a9b45c88 Positioncontrol: limit velocity upwards during smooth takeoff 2018-07-20 09:26:18 +02:00
Dennis Mannhart 0f4eb8e766 PositionControl: add integral reset methods 2018-07-20 09:26:18 +02:00
Dennis Mannhart 65a9cd171f PositionControl: variable replacement 2018-07-20 09:26:18 +02:00
Dennis Mannhart e2ac12ef2c FlightTask: comment fixes 2018-07-20 09:26:18 +02:00
Dennis Mannhart c6b5731086 test_controlmath: add first few tests for constrain function in xy 2018-07-20 09:26:18 +02:00
Dennis Mannhart c60481614e ControlMath constrainxy: fix one of the condition 2018-07-20 09:26:18 +02:00
Dennis Mannhart 386b70dc58 ControlMath: add derivation and simplify computation 2018-07-20 09:26:18 +02:00
Dennis Mannhart 99de97a528 FlightTaskAuto: fix global reference update 2018-07-20 09:26:18 +02:00
Dennis Mannhart b7f729e432 FlightTask: split _evalutateVehiclePosition into _evaluateVehicleLocalPosition
and _evaluateVehicleGlobalPosition
2018-07-20 09:26:18 +02:00
Dennis Mannhart 913932ff9e FlightTask: move geo-lib include to FlightTaskAuto where it is required
for conversion from global to local
2018-07-20 09:26:18 +02:00
Dennis Mannhart 10bd3a50ba PositionControl: parameter subscription declaration 2018-07-20 09:26:18 +02:00
Dennis Mannhart b20bd076a0 FlightTaskAuto: always update type 2018-07-20 09:26:18 +02:00
Dennis Mannhart 7f68417d19 PositionControl: make distinction for throttle minimum depending on mode 2018-07-20 09:26:18 +02:00
Dennis Mannhart 59087afac8 FlightTaskManualStabilized: replace minimum throttle with minum throttle specific for stabilized 2018-07-20 09:26:18 +02:00
Dennis Mannhart 65603d7de7 FlightTaskAutoLine: don't reset during normal operation 2018-07-20 09:26:18 +02:00
Dennis Mannhart 26ca17e329 comment fix 2018-07-20 09:26:18 +02:00
Dennis Mannhart 08a89ccdbb FlightTaskAutoLine: if previous type was idle, set thrust to NAN again to ensure
thrust is not used. Also, if previous was not a loiter or position type, then reset
setpoints to current state. This is needed because during line following, the
previous setpoints are requires and cannot be NAN.
2018-07-20 09:26:18 +02:00
Dennis Mannhart 5f293cceac FlightTaskAutoLine: first activate and then reset 2018-07-20 09:26:18 +02:00
Dennis Mannhart 6da47b4a85 FlightTaskAutoLine: move method 2018-07-20 09:26:18 +02:00
Dennis Mannhart 3d034823b0 FlightTaskAutoLine: introduce previous type which used to reset setpoints 2018-07-20 09:26:18 +02:00
Dennis Mannhart a401778038 FlightTask: remove global to local map 2018-07-20 09:26:18 +02:00
Dennis Mannhart 0efbbdc227 FlightTaskAutoLine: replace xy/z setpoints with FlightTask base setpoints 2018-07-20 09:26:18 +02:00
Dennis Mannhart 37bfd8e01a FlightTaskAuto: always update cruise speed 2018-07-20 09:26:18 +02:00
Dennis Mannhart 3083de0979 FlightTaskAuto: typo fix 2018-07-20 09:26:18 +02:00
Dennis Mannhart fbe8a558b2 FlightTaskIndex: add AutoLine 2018-07-20 09:26:18 +02:00
Dennis Mannhart 288ee2362e FlightTaskAuto: remove warning message 2018-07-20 09:26:18 +02:00
Dennis Mannhart f62c3c3b8a FlightTaskAutoLine: simplify logic by setting setpoints directly 2018-07-20 09:26:18 +02:00
Dennis Mannhart 338130a9b4 FlightTaskAuto: simplify logic by just updating waypoints if anything has changed 2018-07-20 09:26:18 +02:00
Dennis Mannhart 171c19c3ca FlightTaskAutoLine: override _reset method 2018-07-20 09:26:18 +02:00
Dennis Mannhart e2347c30f6 FlightTaskAuto: comment fix 2018-07-20 09:26:18 +02:00
Dennis Mannhart 69ea4df45c FlightTaskAuto: pure virtual reset method 2018-07-20 09:26:18 +02:00
Dennis Mannhart 2c385e6967 FlightTaskAuto: remove unused include 2018-07-20 09:26:18 +02:00
Dennis Mannhart 3ae07843e9 position control: remove empty space 2018-07-20 09:26:18 +02:00
Dennis Mannhart 9ff4d13c2c mc_pos_control: remove unused method 2018-07-20 09:26:18 +02:00
Dennis Mannhart 75fb1b28b9 mc_pos_control: set thrust to zero if in idle 2018-07-20 09:26:18 +02:00
Dennis Mannhart 1fb8eaf6c6 mavlink_messages: add yawspeed to local position setpoint sent over mavlink 2018-07-20 09:26:18 +02:00
Dennis Mannhart 816f2d12d5 FlightTaskAuto minor clean up 2018-07-20 09:26:18 +02:00
Dennis Mannhart ae0f02f67d ControlMath: by value to reference 2018-07-20 09:26:18 +02:00
Dennis Mannhart 3c40aa0d9c PositionControl: if valid velocity and position setpoint available, always prioritize
velocity setpoint generated from position error over velocity feedforward
2018-07-20 09:26:18 +02:00
Dennis Mannhart 5551021d23 FlightTaskAutoLine: check if yaw_wp is finite 2018-07-20 09:26:18 +02:00
Dennis Mannhart 558a0f892c PositionControl: auto takeoff with constant speed
PositionControl: remove takeoff logic

mc_pos_control: takeoff logic for flighttask

mc_pos_control: smooth takeoff throttle start at 0
2018-07-20 09:26:18 +02:00
Dennis Mannhart 6e62beb560 FlightTaskAuto: abstract class for mapping triplets to quadruple
FlightTaskAuto: add type that corresponds to triplet type

FligthTaskAuto: set all setpoints if invalid in xy

FlightTaskAuto: cast triplet type to WaypointType

FlightTaskAutoLine: class for px4 legacy auto

FlightTaskAutoLine: methods prototype

FlightTaskAuto: change sp to wp (=Waypoint)
add params

FlightTaskAutoLine: follow waypoints along line based on flight state
2018-07-20 09:26:18 +02:00
David Sidrane 89a902524a px_uploader:Revert the rebooting text to have baudrate
Using the port name is platform dependent. It may give not
  provide the correct feedback. The port can be ttyS, or ftdi
  or CDC/ACM. While it is true that buadrate does not matter on
  CDC/ACM. It is better to give more information about what the
  code is doing before filtering by the port name.
2018-07-19 11:23:15 -07:00
Matthias Grob ade70cbbdf cmake px4_base: switch visibility.h back to relative include path (#9981) 2018-07-19 09:49:04 -04:00
mcsauder 4f937a2ff6 Migrate px4io logic into rc.io. 2018-07-19 13:56:03 +02:00
mcsauder bccda56ed3 Re-order hardware specific logic in rc.interface. 2018-07-19 10:35:18 +02:00
mcsauder 6f63553824 Move MNT_MODE_IN / MOUNT_MODE_OUT logic block to rc.interface and move dataman, send_event, and load_mon startup just below uorb and tone_alarm startup in the rcS script. 2018-07-19 10:35:18 +02:00
mcsauder 1fa2a6d26e Continued work to group/condense/consolidate logic in rcS. 2018-07-19 10:35:18 +02:00
DanielePettenuzzo ee9a336d62 add PX4_I2C_BUS_EXPANSION2 support in px4flow driver 2018-07-19 09:31:51 +02:00
vkotaru 96920e0370 AUTOPILOT_HOST address for Raspberrypi2/3 included in posix CMakeLists.txt 2018-07-18 22:31:32 +02:00
Beat Küng 6dda641cc0 omnibus-f4sd defconfig: change USB vendor & product strings to match with the bootloader
This fixes automatic upload. Since ed95dced0f the NuttX string
is used for device detection, but Linux uses the bootloader's USB vendor
and product strings.
So the NuttX strings must match with the ones from the bootloader.
2018-07-18 22:30:45 +02:00
Daniel Agar 3293fe47f9 mavlink submodule update to latest 2018-07-18 05:12:39 -04:00
Martina 24413c6192 mavlink_messages: rename MavlinkStreamTrajectory -> MavlinkStreamTrajectoryRepresentationWaypoints 2018-07-18 05:12:39 -04:00
Martina c9d27b65ef mavlink_main: stream trajetcory_presententation_waypoints instead of trajectory 2018-07-18 05:12:39 -04:00
Martina 02d360c33a update trajectory message to trajectory_representation_waypoint as in mavlink 2018-07-18 05:12:39 -04:00
David Sidrane f12acd7b0f px_uploader:Platform and Timming indepentant Serial detection
The correct determination of Windowed mode is critical to
   maximise the speed on a USB based upload.

   This commit bases the detection of a Serial (FTDI) on the
   fact a CDC ACM port (USB) does not really have a baud rate.
   We bump the baud rate to 233% of the requested baud rate to
   see if the SYNC is acked. If it is Acked it must be a USB
   port and Windowed mode is turned off. This removes unnessary
   baud rate based delays from the proframing logic. If it is a
   real Serial port getSync will not get the ACK and Windowed
   mode is turned on.
2018-07-18 08:11:11 +02:00
Beat Küng c166ea9ed5 sensors: fix potential busy loop when a gyro driver is stopped
When a gyro driver is stopped, the topic is unadvertised and
orb_group_count() returns a smaller count. This can have the effect, that
we poll on a certain gyro fd, but since _gyro.subscription_count is reduced
we never do the orb_copy for that fd.

This cannot happen when armed. And only someone playing with the shell
can trigger it (sensor failures do not have that effect).
2018-07-18 08:10:13 +02:00
Beat Küng 891a09f488 sensors: make sure to do an orb_copy, even if a gyro is disabled
This makes sure that poll() never returns immediately.
accel & mag are only updated to keep the code in sync.
2018-07-18 08:10:13 +02:00
Beat Küng 28d70f5f79 logger: remove unneeded topics from the default set
Should some of these be of interest to someone, we should create a profile.
2018-07-18 08:10:13 +02:00
mcsauder 1d7dbdddca Add pwm failsafe -c argument to rc.interface, reference issue #9775. 2018-07-18 08:05:31 +02:00
mcsauder 71ceb0cfd6 Copy/paste logic in rc.interface to group MIXER and MIXER_AUX logic, alphabetize hardware list in rc.interface, alphabetize set/unset lists in rcS, and add -p argument to pwm failsafe calls per issue #9775. 2018-07-18 08:05:31 +02:00
Daniel Agar 50b5e124d5 cmake fix BUILD_URI 2018-07-17 21:03:27 -04:00
Daniel Agar 8985403c00 FMU relocate MOT_SLEW_MAX and THR_MDL_FAC parameters centrally 2018-07-17 19:59:41 -04:00
Daniel Agar c26ca49f36 PWM parameters centralize under sensors and add aux 7&8 2018-07-17 19:59:41 -04:00
Daniel Agar 24d742ed51 FMU PWM parameters respect instance for MAIN/AUX usage 2018-07-17 19:59:41 -04:00
Julian Oes 11d4c32cd4 px_uploader: fix unknown variables 2018-07-17 07:44:58 -07:00
Julian Oes 8b91a68fea px_uploader: white space PEP8 fixes 2018-07-17 07:44:58 -07:00
mcsauder f9a6c13d55 Group instances of UAVCAN logic into a single block and copy/paste/regroup OUTPUT_MODE logic to form on block of code handling OUTPUT_MODE. 2018-07-17 09:33:50 +02:00
David Sidrane 6f665aee55 board_common:Update description to include paramater. 2018-07-17 08:53:29 +02:00
David Sidrane a7a1607689 fmu & px4io:Use uORB Publish Auto 2018-07-17 08:53:29 +02:00
David Sidrane 33c9459ebe fmu:Use extended board_supports_single_wire APU with UxART 2018-07-17 08:53:29 +02:00
David Sidrane d0d361ef92 sbus:Add comment that turning off the single wire has not effect 2018-07-17 08:53:29 +02:00
David Sidrane ec73e73934 px4fmu-v5:Support board_supports_single_wire query by UxART 2018-07-17 08:53:29 +02:00
David Sidrane ab49b42f1c board_common:Extend board_supports_single_wire API to use UxART_BASE 2018-07-17 08:53:29 +02:00
David Sidrane b6d01c36af px4fmu-v5:Support RX TX swap 2018-07-17 08:53:29 +02:00
David Sidrane 8076b103bc px4fmu-v5:Provide RC_UXART_BASE to use board_common UxART based INVERT_RC_INPUT 2018-07-17 08:53:29 +02:00
David Sidrane 7dfd26cd8f nxphlite-v3:Provide RC_UXART_BASE to use board_common UxART based INVERT_RC_INPUT 2018-07-17 08:53:29 +02:00
David Sidrane f48481fcbd fmu:Use extended rc_io_invert API with UxART 2018-07-17 08:53:29 +02:00
David Sidrane c291566c3e fmu:Remove gpio config on GPIO_SBUS_INV it is done in board_init 2018-07-17 08:53:29 +02:00
David Sidrane 8cc358dff8 px4fmu-v5:extend board_rc_input to pass UxART 2018-07-17 08:53:29 +02:00
David Sidrane bf36d272bf nxphlite-v3:extend board_rc_input to pass UxART 2018-07-17 08:53:29 +02:00
David Sidrane 70a453f148 px4nucleoF767ZI-v1:Provide board_common INVERT_RC_INPUT with GPIO based invert 2018-07-17 08:53:29 +02:00
David Sidrane 28a669a637 px4fmu-v4pro:Provide board_common INVERT_RC_INPUT with GPIO based invert 2018-07-17 08:53:29 +02:00
David Sidrane 05b9b5e533 px4fmu-v4:Provide board_common INVERT_RC_INPUT with GPIO based invert 2018-07-17 08:53:29 +02:00
David Sidrane 407fe692d8 mindpx-v2:Provide board_common INVERT_RC_INPUT with GPIO based invert 2018-07-17 08:53:29 +02:00
David Sidrane 9fc37606fd tap-v1:Use board_common default nop INVERT_RC_INPUT 2018-07-17 08:53:29 +02:00
David Sidrane 3debee9563 aerofc-v1:Use board_common default nop INVERT_RC_INPUT 2018-07-17 08:53:29 +02:00
David Sidrane b08a0d50f8 aerocore2:Use board_common default nop INVERT_RC_INPUT 2018-07-17 08:53:29 +02:00
David Sidrane c57928343c Create INVERT_RC_INPUT default usages 2018-07-17 08:53:29 +02:00
David Sidrane 6f3783221f px4fmu-v5:Enable CONFIG_STM32F7_USART_SINGLEWIRE
FMUv5 has singlewire support
2018-07-17 08:53:29 +02:00
David Sidrane 657af126b0 Update nuttx submodule with USART_SINGLEWIRE support on f7 2018-07-17 08:53:29 +02:00
David Sidrane cba7410e49 fmu:Use board_supports_single_wire when calling sbus_config 2018-07-17 08:53:29 +02:00
David Sidrane 7ea592016e px4fmu-v5:Use board_supports_single_wire
This is a stubbed out version that will rely on the hardware
   manifest moving forward.
2018-07-17 08:53:29 +02:00
David Sidrane 13a972cfe6 px4fmu-v5:Add place holder for hardware manifest 2018-07-17 08:53:29 +02:00
David Sidrane d986c14591 board_common:add board_supports_single_wire API 2018-07-17 08:53:29 +02:00
PX4 Jenkins d390524437 Update submodule sitl_gazebo to latest Mon Jul 16 20:26:32 CDT 2018
- sitl_gazebo in PX4/Firmware (a08fc0c3ff3cfb4bba57035c98b0a7398b0c2a19): https://github.com/PX4/sitl_gazebo/commit/ac54b8fdddd9b21dbe6d59deaf46494864858bc9
    - sitl_gazebo current upstream: https://github.com/PX4/sitl_gazebo/commit/c1ca87e37b831cd4b64ac642957e701875738909
    - Changes: https://github.com/PX4/sitl_gazebo/compare/ac54b8fdddd9b21dbe6d59deaf46494864858bc9...c1ca87e37b831cd4b64ac642957e701875738909

    c1ca87e 2018-07-16 Elia Tarasov - add support for gazebo version greater or equal 9
eb4494d 2018-07-16 Elia Tarasov - load rotation signs from sdf model file
c00b9ee 2018-07-16 Elia Tarasov - add default constants for rotation signs
36360c5 2018-07-16 Elia Tarasov - add rotation signs to class variables
2018-07-16 22:40:47 -04:00
PX4 Jenkins 35089bf008 Update submodule jMAVSim to latest Mon Jul 16 20:26:26 CDT 2018
- jMAVSim in PX4/Firmware (e2eb84042e): https://github.com/PX4/jMAVSim/commit/e0e8b6ca473a6eecc3ee2984ea414e321f6808c6
    - jMAVSim current upstream: https://github.com/PX4/jMAVSim/commit/136e92eb8a0131b63c165d5f32dd74c3a2b28993
    - Changes: https://github.com/PX4/jMAVSim/compare/e0e8b6ca473a6eecc3ee2984ea414e321f6808c6...136e92eb8a0131b63c165d5f32dd74c3a2b28993

    136e92e 2018-07-16 Hamish Willee - Merge pull request #77 from PX4/readme-update-for-blender
78b653e 2018-07-10 alessandro - typo fix
9734edf 2018-06-20 alessandro - Addressing review comments from #77
a197e76 2018-06-19 Alessandro Simovic - readme: added instructions for Blender
2018-07-16 22:40:25 -04:00
mcsauder e2eb84042e Group hardware specific logic in rcS, deprecate the MODE parameter from rcS, and update comments. 2018-07-16 16:43:01 +02:00
Paul Riseborough 4e3f7bdcc6 ekf2: Move range min/max checks to inside the ecl library 2018-07-16 21:59:04 +10:00
Philipp Oettershagen da2fbf60b5 distance sensors: Improve variable naming / description 2018-07-16 21:59:04 +10:00
Philipp Oettershagen 35bde5c9fc LL40LS: Implement driver-specific filtering based on the datasheet and experiments 2018-07-16 21:59:04 +10:00
Beat Küng e1f2360560 gps: remove unused field _baudrate_changed & _mode_changed 2018-07-16 12:18:37 +02:00
Beat Küng 4d71686ac6 gps: add GPS_YAW_OFFSET param & properly initialize _baudrate 2018-07-16 12:18:37 +02:00
Beat Küng a947ad2506 gps: remove unused code & fix _mode_auto initialization 2018-07-16 12:18:37 +02:00
Beat Küng 43c2970fb9 vehicle_gps_position: add heading field 2018-07-16 12:18:37 +02:00
Beat Küng a8463a5226 gpssim: cleanup (remove unused fields) 2018-07-16 12:18:37 +02:00
Beat Küng 5ae1c658a9 Revert "Add heading to true north to GPS report"
This reverts commit 89e49166fa.
2018-07-16 12:18:37 +02:00
Daniel Agar 50ae8c9c6f airspeed.msg update incorrect comments 2018-07-16 01:09:19 -04:00
Daniel Agar 3b580514ae delete unused airspeed.true_airspeed_unfiltered_m_s 2018-07-16 01:09:19 -04:00
Daniel Agar 9a4de09325 sensors remove airspeed negative check 2018-07-16 01:09:19 -04:00
Philipp Oettershagen 79f172eb92 Navigator: Fix fixed-wing first order altitude hold (#9850)
i.e. the altitude reference oscillations caused by it in LOITER mode
2018-07-15 23:54:08 -04:00
Daniel Agar c141081d47 sitl_gazebo update to latest with baro noise fix 2018-07-15 21:12:27 -04:00
johannes 62ea0b6ddb ecl-ekf tools: fix division by zero warning by dividing by epsilon 2018-07-15 21:12:27 -04:00
johannes 45483f8cc3 ecl ekf tools: print check failures and warnings (for IMU) to stdout 2018-07-15 21:12:27 -04:00
johannes 78d8061aaf ecl-ekf tools: set exit code to -1 for failed analysis, pipe args
- process_log_data: exit with code -1 if whole system analysis fails
- batch_process_logdata and process_log_data: pipe sensor safety
margin argument to the arguments of the superseeding scripts
- reduce minimum flight length for analysis to 50 samples
2018-07-15 21:12:27 -04:00
Daniel Agar effeae93cc GPS initialize all class members in definition 2018-07-15 20:34:31 +02:00
Daniel Agar 94dd6abd9f GPS organize status print 2018-07-15 20:34:31 +02:00
Lorenz Meier ff626a19f6 GPS driver: Initialize heading field for all drivers, reduce UBX hold-off time for config reset. 2018-07-15 20:34:31 +02:00
Lorenz Meier e2333d7d5c GPS driver: Keep stack to required size for app boot 2018-07-15 20:34:31 +02:00
Lorenz Meier b3b83afa6a GPS: Update device driver 2018-07-15 20:34:31 +02:00
Lorenz Meier 5dd981a7be GPS driver: Initialize baud rate and improve output 2018-07-15 20:34:31 +02:00
Lorenz Meier 16dd82ab60 Update GPS driver submodule 2018-07-15 20:34:31 +02:00
Lorenz Meier 493a84638d GPS driver: Add RTCM parsing 2018-07-15 20:34:31 +02:00
Lorenz Meier 89e49166fa Add heading to true north to GPS report
This is used by multi-antenna RTK systems.
2018-07-15 20:34:31 +02:00
Lorenz Meier 2931b85f0e GPS: Add support for RTK GPS units
This includes the Trimble MB-TWO and similar devices. Tested including GPX streams.
2018-07-15 20:34:31 +02:00
Daniel Agar c199ca5193 msg generated print support boolean 2018-07-15 20:33:16 +02:00
Daniel Agar bb49ac1933 gitignore remove obsolete 2018-07-15 17:59:07 +02:00
Daniel Agar 45daa8d091 gitignore gdb history 2018-07-15 17:59:07 +02:00
Lorenz Meier 57c7e1a3eb Uploader: Ensure that we are not entering windowed mode on USB links 2018-07-15 16:15:21 +02:00
TSC21 ceae2f8896 update sitl_gazebo submodule 2018-07-13 20:58:44 +02:00
David Sidrane 05936f2ff7 px_uploader.py:Speed Improvments on Serial
The __getSync was costing about 16Ms per call.
  The commit uses a window based approch allowing
  the SYNC,<results> to be read all at one time.
  and delaying for programing based on transport
  time + 1 Ms;
  THe improvment at 2Mbps is >4 minutes to ~37
  seconds
2018-07-13 17:29:31 +02:00
Daniel Agar 0c0b761c87 mavlink update POSITION_TARGET_GLOBAL_INT publish
- publish continuously in position control mode when there's a valid
   setpoint
 - optionally fill in the velocity and acceleration setpoints when
   available
 - fixes #9841
2018-07-13 15:30:25 +02:00
Daniel Agar 1ea63e4955 mavlink MOUNT_ORIENTATION use math::degrees 2018-07-13 15:30:06 +02:00
Daniel Agar f26c3ac014 mavlink properly wrap heading fields
- fixes #9867
2018-07-13 15:30:06 +02:00
Beat Küng 5e3e486527 px4_posix.h: avoid defining PX4_F_RDONLY as O_RDONLY
- There is an assumption un uORB that PX4_F_RDONLY is not 0.
- But O_RDONLY is 0 on Linux. orb_exists passes 0 to px4_open, which in
  uORB::DeviceNode::open leads to an unnecessary allocation of
  SubscriberData()
- PX4_F_RDONLY is only used in combination with px4_open, never with open()

However even if it was wrong/unexpected, it did not cause any problems,
just the unnecessary allocation.
2018-07-13 11:30:23 +02:00
mcsauder ab788ceba7 Update sd card logic statment and comment. 2018-07-13 11:02:26 +02:00
mcsauder f2970071a7 Acronym correction. 2018-07-13 11:02:26 +02:00
mcsauder 2512f6e30e Format and comment fw, mc, vtol, and ugv vehicle apps and default startup scripts. 2018-07-13 11:02:26 +02:00
Daniel Agar 8537863848 delete sdlog2 2018-07-13 09:02:59 +02:00
Nuno Marques 83fd5a5fd1 Update micro-CDR to latest and fix API usage (#9651)
* uorb_microcdr: msg.cpp.template: update API for how the buffer length is obtained
* micrortps_bridge: CMakeLists: temporarily deactivate check endianness option
2018-07-12 18:04:15 -04:00
Mark Sauder 72de9a901d Move additional logic block to rc.vehicle_setup, add rc.vehicle_setup to init.d/CMakeLists.txt, and relocate sd card logic block higher up in rcS. (#9896) 2018-07-12 16:45:19 -04:00
Martina 84d22fe0c6 logger: trajectory_waypoint -> vehicle_trajectory_waypoint 2018-07-12 16:36:11 -04:00
Martina e7cf2c5675 remove unused trajectory_bezier message 2018-07-12 16:36:11 -04:00
Martina 5cd0da95cc mc_pos_control_params: add type boolean to MPC_OBS_AVOID parameter 2018-07-12 16:36:11 -04:00
Martina 064a6dd2fd mc_pos_control: fix rebase mistake 2018-07-12 16:36:11 -04:00
Martina d6ea735b18 make format 2018-07-12 16:36:11 -04:00
Martina 492e40a139 mc_pos_control: enable obstacle avoidance only in mission and rtl 2018-07-12 16:36:11 -04:00
Martina f42095af8f mavlink_messages: refactor to use vehicle_trajectory_waypoint instead of trajectory_waypoint message 2018-07-12 16:36:11 -04:00
Martina da2df5708b mc_pos_control: refactor to use vehicle_trajectory_waypoint 2018-07-12 16:36:11 -04:00
Martina 2a40d001de mavlink_receiver: refatcor to use vehicle_trajectory_waypoint 2018-07-12 16:36:11 -04:00
Martina 00bc70a49c trajectory_waypoint: refactor to contain information about one of the 5
points of the trajectory
2018-07-12 16:36:11 -04:00
Martina c15f2e45d6 add vehicle_trajectory_waypoint message 2018-07-12 16:36:11 -04:00
Martina 53a528b01b nuttx_omnibus-f4sd_default: disable bl_update, wind_estimator, gnd_att_control, gnd_pos_control to save flash 2018-07-12 16:36:11 -04:00
Martina f3a7886fbf trajectory_bezier: remove yaw_speed define 2018-07-12 16:36:11 -04:00
Martina 87cd110044 mavlink_receiver: make format 2018-07-12 16:36:11 -04:00
Martina 33b1b13432 mc_pos_control: replace define with parameter to enable/disable obstacle
avoidance
2018-07-12 16:36:11 -04:00
Martina 6cceca6fe5 mc_pos_control_params: add parameter to enable and disable obstacle
avoidance
2018-07-12 16:36:11 -04:00
Martina 8662c71d82 logger: enable trajectory_waypoint and trajectory_waypoint_desired logging 2018-07-12 16:36:11 -04:00
Martina c9fcc6b7d5 trajectory_waypoint: add comment to explain the use of the two topics
trajectory_waypoint and trajectory_waypoint_desired
2018-07-12 16:36:11 -04:00
Martina 1144b66a70 mc_pos_control: temporary solution to enable and disable the execution of
obstacle avoidance waypoints
2018-07-12 16:36:11 -04:00
Martina c5d62b5524 mc_pos_control: use local frame position setpoint from triplets calculated
in the pos_control and not coming from navigator. Refactor method
update_avoidance_waypoint_desired since all waypoints have the same type
2018-07-12 16:36:11 -04:00
Martina 26ca09f824 mc_pos_control: fix typo 2018-07-12 16:36:11 -04:00
Martina 35cf00dd5e trajectory message: change sp to wp 2018-07-12 16:36:11 -04:00
Martina 59c7fc5d96 mc_pos_control: use one method to wrap yaw speed instead of triplicate
code
2018-07-12 16:36:11 -04:00
Martina 8b20c66cfc mc_pos_control: use desired velocity to calculate vel_sp_along_track_prev
if obstacle avoidance is running
2018-07-12 16:36:11 -04:00
Martina d39b969e72 mc_pos_control: refactor the update of the desired waypoints for avoidance
to eliminate duplicated code
2018-07-12 16:36:11 -04:00
Martina 9bdc9aada2 mc_pos_control: use defines for point size and number of points in
trajectory_waypoint
2018-07-12 16:36:11 -04:00
Martina c84e651edd trajectory_waypoint: add defines for point size and number of points 2018-07-12 16:36:11 -04:00
Martina a11c6235fe mc_pos_control: uses consistent naming for desired waypoints 2018-07-12 16:36:11 -04:00
Martina 272d7ca4cd mc_pos_control: use consistent naming for position waypoints 2018-07-12 16:36:11 -04:00
Martina 3fa094cb6b mc_pos_control: use same notation for velocity waypoints 2018-07-12 16:36:11 -04:00
Martina 6e7f1d249e bezier: fix index description 2018-07-12 16:36:11 -04:00
Martina 31d675fd95 mc_pos_control: add interface to send desired position and velocity
waypoint to the obstacle avoidance module
2018-07-12 16:36:11 -04:00
Martina b33a708215 mc_pos_control: add vel_sp_desired to send desired velocity to the
obstacle avoidance
2018-07-12 16:36:11 -04:00
Martina 47f2db67b6 mc_pos_control: execute yaw or yaw speed of the obstacle avoidance
waypoint
2018-07-12 16:36:11 -04:00
Martina df19610e69 mc_pos_control: add execution of position waypoint coming from the
obstacle avoidance
2018-07-12 16:36:11 -04:00
Martina 5d6771753d mc_pos_control: add execution of velocity waypoint coming from the
obstacle avoidance module
2018-07-12 16:36:11 -04:00
Martina f511d3a399 mc_pos_control: add method to constrain velocity setpoint 2018-07-12 16:36:11 -04:00
Martina 14444af38c mc_pos_control: subscribe to trajectory_waypoint message 2018-07-12 16:36:11 -04:00
Martina f3ce7be1e3 mavlink_messages: stream TRAJECTORY mavlink message with data from
uORB trajectory_waypoint as input path to a obstacle avoidance node
2018-07-12 16:36:11 -04:00
Martina 5ef26dd862 mavlink_receiver: decode mavlink message TRAJECTORY in uORB msgs
trajectory_waypoint or trajectory_bezier depending on the mav trajectory
representation type
2018-07-12 16:36:11 -04:00
Martina e59a29197e replace obstacle_avoidance message with trajectory_waypoint and trajectory_bezier 2018-07-12 16:36:11 -04:00
ChristophTobler 82e0547f6e add first draft of the avoidance msg 2018-07-12 16:36:11 -04:00
Beat Küng e1a7472738 MavlinkOrbSubscription::update: improve performance & fix corner case
- reorders operations, such that the most expensive one (orb_copy) is done
  only when really needed.
- corner case: when the topic was not advertised yet, orb_stat() would fail
  and then update() was called, which succeeds for the first advertisement.
  In that case the timestamp was incorrectly set to 0 and true was
  returned.
  The next call would again return true, because the timestamp was updated,
  but the topic data was still the same.

Reduces CPU load by ~2% on a Pixracer.
2018-07-12 21:31:38 +02:00
Beat Küng 060b130128 mavlink: add optional disable_sharing flag to add_orb_subscription
This is a more generic solution for 532a97041, and also enables it for
vehicle_command_ack's.

In addition it avoids using a timestamp for subscription update checking,
because it does not work well together with orb queuing.
2018-07-12 21:31:38 +02:00
Mark Sauder bb86c5f200 Breakout rc.vehicle_setup from rcS. (#9892) 2018-07-12 14:50:47 -04:00
Daniel Agar 21cc34befb GPS driver increase stack 2018-07-12 08:12:05 +02:00
mcsauder e12acc4b28 Migrate hardware specific mavlink stream cases to rc.mavlink. 2018-07-12 08:10:59 +02:00
mcsauder 8b71bb4562 Breakout rc.mavlink from rcS script. 2018-07-11 09:38:58 +02:00
Thomas Stastny 8a7919bcb6 fw att+pos ctrl: use enum for flaps configs 2018-07-11 08:08:13 +02:00
Thomas Stastny 0c3399433d fw att+pos ctrl: add takeoff flaps setting 2018-07-11 08:08:13 +02:00
Beat Küng 3f0a398a25 Omnibus F4 SD: fix UART4
- do not configure RSSI GPIO pin
- disable serial console on UART4
2018-07-10 19:39:50 +02:00
Beat Küng 93da0416fa frsky_telemetry: add a '-m <mode>' CLI param
Can be used to avoid auto-detection.

Strangely on the Omnibus via UART4, the auto-detection for single-wire
S.Port did not work when connecting via battery (it works via USB) -
S.Port got detected instead.
Might be a board-specific issue.
2018-07-10 19:39:50 +02:00
mcsauder 9386ab6afe Breakout rc.thermal_cal from rcS and group set/unset parameters at the beginning and end of the rcS script. Revert commit 2a3d66cf45 to reduce px4fmu-v2_default flash size. Standardize tabs/whitespaces across all files in the init.d directory. 2018-07-10 08:59:38 -04:00
Daniel Agar 33f7318400 Jenkins archive av_x binaries 2018-07-09 03:29:20 -04:00
mcsauder cf7dd383b1 Update ADC voltage calculation instances to avoid divide by integer. 2018-07-09 07:51:15 +02:00
Daniel Agar 850b1ad6a7 EKF2 split output predictor and publish attitude immediately (#9832)
* EKF2 split output predictor and publish attitude immediately

* ecl: incorporate magic number tidy up
2018-07-09 08:11:24 +10:00
Beat Küng 58c8c50174 frsky_telemetry: add scanning timeout parameter, and set it to 15s
This frees unused RAM in case frsky telemetry is not connected.
2018-07-08 23:24:17 +02:00
Beat Küng f3292c7741 frsky_telemetry: add S.Port single-wire support
If S.Port is connected via external inverter or an uninverted signal is
used, the UART needs to be put into half-duplex mode.

This can be used to get uninverted S.Port:
https://oscarliang.com/uninverted-sbus-smart-port-frsky-receivers/

It is not needed for the Pixracer FrSky port.
2018-07-08 23:24:17 +02:00
Beat Küng 1feccfcc81 frsky_telemetry: increase stack size by 52 bytes
As indicated in previous logs (268 bytes left).
2018-07-08 23:24:17 +02:00
Beat Küng 898eb95623 frsky_telemetry cleanup: remove err, use px4_getopt 2018-07-08 23:24:17 +02:00
Lorenz Meier 84770f195d Create PULL_REQUEST_TEMPLATE.md 2018-07-08 23:19:24 +02:00
Daniel Agar e4be8eccc9 bmi055 add measure interval perf counter 2018-07-08 20:14:34 +02:00
Daniel Agar 0da8125ac0 bmi055 remove unused reset retries perf counter 2018-07-08 20:14:34 +02:00
Daniel Agar adf6ea3596 bmi055 remove unused gyro duplicates perf counter 2018-07-08 20:14:34 +02:00
Daniel Agar 734fc1bf8d bmi055 remove cdev read (gyro_reads) perf counter 2018-07-08 20:14:34 +02:00
Daniel Agar 7bc364207e bmi055 remove cdev read (accel_reads) perf counter 2018-07-08 20:14:34 +02:00
Daniel Agar cd07e756b9 bmi055 name separate accel and gyro perf counters properly 2018-07-08 20:14:34 +02:00
Daniel Agar b6399dbdf0 bmi055 remove common good_transfers perf counter 2018-07-08 20:14:34 +02:00
Daniel Agar eef325e2af bmi055 split accel and gyro headers 2018-07-08 20:14:34 +02:00
Daniel Agar 4c5ace9b75 mpu6000 add interval perf counter and delete unused 2018-07-08 20:14:34 +02:00
Daniel Agar 13c2c8c89b ADIS16477 use checksum to verify transfer and populate gyro device id 2018-07-08 10:18:13 -04:00
Daniel Agar 4e4724f9eb add ST LSM303AGR driver (mag only) 2018-07-08 10:18:13 -04:00
Daniel Agar 74c20a0fd5 ADIS16477 reset on init and increase delay 2018-07-08 10:18:13 -04:00
Daniel Agar 00c34d8a2b AV-X board support 2018-07-08 10:18:13 -04:00
Daniel Agar dec03873bc px_uploader add small delay before checking CRC result 2018-07-07 15:55:53 +02:00
Daniel Agar 8647f0e527 px4fmu-v2 disable teraranger distance sensor 2018-07-06 16:17:33 +02:00
Daniel Agar 13ecc71fe2 px4fmu-v2 disable tfmini distance sensor 2018-07-06 16:17:33 +02:00
Daniel Agar 29d1226c70 px4fmu-v2 only enable ms4525, ms5525, sd3px airspeed sensors 2018-07-06 16:17:33 +02:00
Daniel Agar 4e77f8c783 px4fmu-v2_default sort driver list 2018-07-06 16:17:33 +02:00
Oleg Kalachev 532a970410 mavlink: fix transmitting vehicle commands 2018-07-05 22:38:02 +02:00
Daniel Agar 9fa882119d fw_pos_ctrl_l1 remove unnecessary orb rate limits 2018-07-05 12:16:44 -04:00
Beat Küng ec137489be px4flow: add documentation for i2c_frame and i2c_integral_frame 2018-07-05 15:23:47 +00:00
Beat Küng 3aa1721450 px4flow: refactor f and f_integral into a class attribute 2018-07-05 15:23:47 +00:00
alessandro 51ee9eaaf4 typo 2018-07-05 14:17:55 +02:00
Alessandro Simovic 11933ac239 rc_loss_alarm: removed unused var 2018-07-05 14:17:55 +02:00
Alessandro Simovic 155089c800 Addressed review comments from #9769 2018-07-05 14:17:55 +02:00
Alessandro Simovic df257c6555 Added parameters for enabling/disabling specific event tasks 2018-07-05 14:17:55 +02:00
Alessandro Simovic 1982957bef Added/moved namespaces in events module 2018-07-05 14:17:55 +02:00
Alessandro Simovic c684275018 moved rc_loss_alarm into the event module 2018-07-05 14:17:55 +02:00
Alessandro Simovic 9a4b26cd32 rc_loss_alarm: addressing review comments (#9769) 2018-07-05 14:17:55 +02:00
Alessandro Simovic 701d87912e rc_loss_alarm: replaced hard with soft tabs 2018-07-05 14:17:55 +02:00
Alessandro Simovic 6fa80d2034 rc_loss_alarm: require RC be seen at least once 2018-07-05 14:17:55 +02:00
Alessandro Simovic 96a0594078 rc_loss_alarm: formatting 2018-07-05 14:17:55 +02:00
Alessandro Simovic 0f2c710237 rc_loss_alarm: hiding all but default constructor 2018-07-05 14:17:55 +02:00
Alessandro Simovic d2b9197587 rc_loss_alarm: sorting function definitions 2018-07-05 14:17:55 +02:00
Alessandro Simovic c8ff5f09d4 rc_loss_alarm: Added some custom commands 2018-07-05 14:17:55 +02:00
Alessandro Simovic c0db004294 rc_loss_alarm: Added basic functionality 2018-07-05 14:17:55 +02:00
Daniel Agar 278e4cef84 uORB fix ORB_COMMUNICATOR defined sections
- keep portions of internal add/remove helpers
2018-07-05 07:03:27 +00:00
Bram Strack van Schijndel 05fc506a56 [df_ms5607_wrapper] convert to mbar, fix error_count, device_id 2018-07-05 08:07:54 +02:00
DanielePettenuzzo 5cb6753572 i2c.h: include board_config 2018-07-03 17:33:18 +02:00
DanielePettenuzzo 84f937a098 airspeed sensor: use bus_option array from i2c.h instead of one in each driver 2018-07-03 17:33:18 +02:00
DanielePettenuzzo 6cb17839ee distance sensors: remove bus_option array and add it to i2c.h header 2018-07-03 17:33:18 +02:00
DanielePettenuzzo e15d390f65 rc.sensors: fix 2018-07-03 17:33:18 +02:00
DanielePettenuzzo 0cc5a41bb8 rc.sensors: start all i2c distance sensor with -a flag 2018-07-03 17:33:18 +02:00
DanielePettenuzzo c13d69a610 distance sensor drivers: change all open and close to px4_open and px4_close 2018-07-03 17:33:18 +02:00
DanielePettenuzzo 8f4e9228bf mb12xx driver: add -b and -a flags to choose i2c busses and remove nuttx stuff such as exit functions 2018-07-03 17:33:18 +02:00
DanielePettenuzzo fed6c9ae34 srf02 driver: add -b and -a flags to choose i2c busses and remove nuttx stuff such as exit functions 2018-07-03 17:33:18 +02:00
DanielePettenuzzo 5b259a008a vl53lxx driver: add -b, -a and -R flags to choose i2c busses and sensor rotation and remove nuttx stuff such as exit functions 2018-07-03 17:33:18 +02:00
DanielePettenuzzo 040662ff04 sf1xx driver: add -b and -a flags to choose i2c busses and remove nuttx stuff such as exit functions 2018-07-03 17:33:18 +02:00
DanielePettenuzzo 7d281b2619 teraranger driver: add -b and -a flags to choose i2c busses and remove nuttx stuff such as exit functions 2018-07-03 17:33:18 +02:00
Roman 9d1fa8cee2 esc_calibration: adjust timeout when waiting for user to connect battery
to 20 seconds

Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-03 07:05:38 +00:00
Roman 5d87eed41c esc_calibration: use hrt_elapsed_time instead of manually calculating the diff
Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-03 07:05:38 +00:00
Roman 73577df994 esc_calibration: use batter status connected flag instead of checking voltage
Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-03 07:05:38 +00:00
Roman beb8c3e152 esc_calibration: use predefined literals
Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-03 07:05:38 +00:00
Roman 8b629454de esc_calibration: increase safety and initialise all data
- do not do calibration if not very sure that battery is not connected
- initialise all structs and variables

Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-03 07:05:38 +00:00
Roman e1117d175b ROMFS: updated deltaquad autoconfig params
Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-03 08:53:30 +02:00
Hamish Willee 4a45d79f52 Delete STM32F4Discovery support/link 2018-07-03 07:21:46 +02:00
Lorenz Meier c8ce120c92 PX4 Flow: modernize output and replace warnx() with PX4_INFO/WARN 2018-07-02 21:44:29 +00:00
Hamish Willee 7402d8223b Fix up references to pixhawk.org 2018-07-02 13:11:15 +02:00
Roman 863cd52714 ROMFS: fixed some naming inconsistencies for the HITL VTOL model
Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-02 13:09:35 +02:00
Roman 220068acb6 ROMFS: use more appropriate autostart ID for standard vtol hitl
Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-02 13:09:35 +02:00
Roman d70e90f174 ROMFS: remove unnecessary params from hitl vtol config
Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-02 13:09:35 +02:00
Roman b37ff23708 ROMFS: indicate that the hitl vtol config is for the gazebo standard vtol model
Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-02 13:09:35 +02:00
Roman 1dea998be5 ROMFS: clean up quad x tailsitter mixer files
- use mixer for the simulation to the sitl mixer dir
- do not use virtual elevator in the mixer for the real vehicle

Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-02 13:09:35 +02:00
Roman 484a939779 added MAV_TYPE to standard vtol hitl config
Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-02 13:09:35 +02:00
Roman 9546daadea ROMFS: added autostart and mixer file for standard vtol in hitl
Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-02 13:09:35 +02:00
Daniel Agar fb3e3b1cad uORB::DeviceNode initialize _publisher 2018-07-01 16:30:31 -04:00
Daniel Agar 8599495082 uORB add ORB_COMMUNICATOR define to enable remote uORB 2018-07-01 16:03:03 +00:00
Philipp Oettershagen 6579b7254a Change TECS max sink rate minimum value, because very fragile aircraft might not be able to sustain higher max sink rates 2018-07-01 10:42:27 -04:00
Philipp Oettershagen a76c4c55d4 Decrease default flare altitude. The previous value was way too high for any small aircraft. It was also unsafe because after the flar, pitch is currently controlled open-loop, which means that stall can potentially happen during the flare 2018-07-01 10:42:27 -04:00
Philipp Oettershagen 8f09a20478 Update TECS integrator gain parameter description to represent the changes in https://github.com/PX4/ecl/commit/ccfba4997147658d8340f7efa351c19299120704 2018-07-01 10:42:27 -04:00
Daniel Agar 9ce83f2208 fix all sign-compare warnings 2018-07-01 09:36:55 +00:00
Daniel Agar cf74166801 double promotion warning fix or ignore per module 2018-07-01 09:36:55 +00:00
Daniel Agar 11d348ec4f microbench split into hrt, math, matrix, uorb 2018-07-01 09:25:22 +00:00
Daniel Agar ea0a80d4d1 microbench add uorb and matrix test 2018-07-01 09:25:22 +00:00
Daniel Agar 3ba97297d5 tests simple timing microbenchmark 2018-07-01 09:25:22 +00:00
Daniel Agar 02d4405a62 c++11 default destructors 2018-06-30 19:55:08 -04:00
Daniel Agar c39ac93ca8 device integrator cleanup initialization 2018-06-30 19:55:08 -04:00
Daniel Agar 33a71c929d Update submodule mavlink v2.0 to latest Fri Jun 29 21:33:36 EDT 2018 (#9814)
- mavlink v2.0 in PX4/Firmware (16d67ed179): https://github.com/mavlink/c_library_v2/commit/f5c0ba684659fbc6c6c5f8777bd30e0b3c32fdef
    - mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/e550f4124bc331848aad3d691b27ec941a94c1e5
    - Changes: https://github.com/mavlink/c_library_v2/compare/f5c0ba684659fbc6c6c5f8777bd30e0b3c32fdef...e550f4124bc331848aad3d691b27ec941a94c1e5

    e550f41 2018-06-29 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/9e9398d5d1d8d1eab689086b73b1258b595969bb
4fae56b 2018-06-27 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/174fc3aad7ce26be66979051261bfd1e5e2dde1e
2018-06-30 19:47:00 -04:00
Daniel Agar aaaf67f9c3 cmake don't automatically enable ccache if already enabled 2018-06-30 19:59:00 +00:00
Daniel Agar 73f825e4b3 cmake toolchain enable double fpu for cortex-m7 2018-06-30 19:57:51 +00:00
Giovanni Carbone 16d67ed179 frsky_telemetry improved com port init (fix #9783), minor refactor (#9798)
* frsky_telemetry added support for hw flow control com port and minor improvements

* DTYPE tested OK. Return 0 for unix compatibility, whitespace removed. Full test start - status- stop - start -status OK
2018-06-29 21:41:53 +00:00
acfloria 17df184953 Fix sending first High Latency message 2018-06-29 16:49:30 +00:00
acfloria ca1f7a4a19 Reenable the MissionManager for the Iridium mavlink instance
The MissionManager handles the MAVLINK_MSG_ID_MISSION_SET_CURRENT command which should also be supported for SatCom.
2018-06-29 16:49:30 +00:00
acfloria 8825bbed29 Increase the stack size for the IridiumSBD driver 2018-06-29 16:49:30 +00:00
Paul Riseborough a04468ba9f ekf2: Fix EKF preflight check fail false positives
Uses a relaxed yaw innovation check threshold for fixed wing vehicle that can recover from larger yaw errors after takeoff.
Replaces the peak hold with decay filtering applied to the magnetic yaw innovations with a conventional lowpass filter. This prevents mag heading innovation transients caused by preflight handling from failing the check, but catches persistent errors. Sign swapping of innovations due to angle wrapping is not a problem due to the way that innovations are calculated inside the EKF, so a simple LPF sufficient.
2018-06-29 16:36:38 +00:00
Julian Oes 6ff9fd2209 calibration: remove warning message
The calibration warning was only used in the ESC calibration and in all
cases it actually meant that the calibration failed. In order to keep
the API as small as possible, I've deprecated the warning string and
converted the warning messages to failed messages.
2018-06-29 16:07:32 +00:00
Florian Achermann 02116c0a80 mavlink: Indicate if the instance did not start correctly (#9744) 2018-06-29 10:11:27 -04:00
Thomas Stastny 8551d2eb9d mission feasibility: add small tolerance to fw landing slope alt 2018-06-29 12:10:53 +00:00
Julian Oes 193993c54f px_uploader: fix typo and Python 3 issue 2018-06-29 08:46:45 +00:00
Julian Oes b0ec64efe8 px_uploader: fixed a couple small PEP8 warnings 2018-06-29 08:46:45 +00:00
Julian Oes 48edf9b65e px_uploader: remove commented out line 2018-06-29 08:46:45 +00:00
Mark Sauder d3c169b1e0 Fix whitespaces in PreflightCheck.cpp, tilt_quad.aux.mix, and tilt_quad.main.mix 2018-06-28 20:20:32 -04:00
Julian Oes 4e43cc3518 px_uploader.py fix flashing issue (#9792)
This fixes a problem where the pyserial write call gets stuck.
It happens on a specific Fedora 28 system with internal USB ports as
well as USB hubs.
It is not clear why the problem is resolved but it is clearly
reproducible that with a timeout of 0, the write can get stuck and with
a timeout > 0 it works every time.

The exception added as part of this commit makes sense but has never
been triggered in my testing.
2018-06-28 20:18:22 -04:00
Daniel Agar 96f47d4772 EKF2 add perf counters (#9795) 2018-06-28 17:28:03 -04:00
Daniel Agar 7efdec1469 cmake nuttx skip upload helper without cdcacm 2018-06-28 19:35:36 +00:00
Daniel Agar ed95dced0f cmake nuttx upload use vendor and product string 2018-06-28 19:35:36 +00:00
Daniel Agar e78b9a063f px_uploader cleanup status messages and print used percentage 2018-06-28 19:35:36 +00:00
MaEtUgR 6a06417096 rpi_rc_in: replace chinese comments with english ones 2018-06-28 15:33:24 +02:00
PX4 Jenkins dee5635f79 Update submodule sitl_gazebo to latest Wed Jun 27 21:26:29 EDT 2018
- sitl_gazebo in PX4/Firmware (18abeb1118): https://github.com/PX4/sitl_gazebo/commit/3c7d18d0a52657106a3a7190c54006ed6b442071
    - sitl_gazebo current upstream: https://github.com/PX4/sitl_gazebo/commit/fcee53fc4c6ef734204fd74eeed2db5b767027ad
    - Changes: https://github.com/PX4/sitl_gazebo/compare/3c7d18d0a52657106a3a7190c54006ed6b442071...fcee53fc4c6ef734204fd74eeed2db5b767027ad

    fcee53f 2018-06-22 TSC21 - vision: by default, do not send ODOMETRY Mavlink msgs
2018-06-28 07:11:10 +00:00
PX4 Jenkins 18abeb1118 PX4-NuttX/nuttx branch test: px4_firmware_nuttx-7.22+
NuttX:
 - https://github.com/PX4-NuttX/nuttx/tree/px4_firmware_nuttx-7.22+
 - https://github.com/PX4-NuttX/nuttx/commit/d5c12b24fa5349791220ce44a46b96f345ec77c1

Changes from PX4-NuttX/nuttx (https://github.com/PX4-NuttX/nuttx/commit/f57752b6f16f54bd50188024475657c6a7a1604c) in current PX4/master (bb8e653469)
https://github.com/PX4-NuttX/nuttx/compare/f57752b6f16f54bd50188024475657c6a7a1604c...d5c12b24fa5349791220ce44a46b96f345ec77c1

d5c12b2 (HEAD, origin/px4_firmware_nuttx-7.22+, origin/HEAD, px4_firmware_nuttx-7.22+) [BACKPORT] stm32f7:I2C reset Configure I2C pins as GPIO output

Apps:
 - https://github.com/PX4-NuttX/apps/tree/px4_firmware_nuttx-7.22+
 - https://github.com/PX4-NuttX/apps/commit/36806ba3d84c0fa07ed86857d4c92a997b7cd194

Changes from PX4-NuttX/apps (https://github.com/PX4-NuttX/apps/commit/36806ba3d84c0fa07ed86857d4c92a997b7cd194) in current PX4/master (bb8e653469)
https://github.com/PX4-NuttX/apps/compare/36806ba3d84c0fa07ed86857d4c92a997b7cd194...36806ba3d84c0fa07ed86857d4c92a997b7cd194
2018-06-27 20:21:02 -04:00
Beat Küng bb8e653469 mc_att_control: keep integral enabled based on land detector
Previously the rate controller disabled updating the integral below 20%
throttle. This is not ideal for several reasons:
- some racers already hover with 20% throttle.
- for acro it is important to always keep the integral enabled, it has a
  noticeable effect on flight performance.
2018-06-27 09:11:23 +00:00
Beat Küng bf1c11a33c commander: move comment to the right place
It's now the same way as in the ARM logic further down.
2018-06-27 10:41:21 +02:00
Beat Küng 02fc68a53e commander arming: disable stick (dis-)arming when arming switch/button is used
A reason for using switch arming in the first place is that you cannot
accidentally disarm in-air with the sticks during acrobatic flights.

It also adds a low-throttle arming requirement for switch arming.
2018-06-27 10:41:21 +02:00
Beat Küng db2b010630 commander arming: add a grace period of 5 seconds to allow re-arming w/o preflight checks
This changes the arming logic such that the preflight checks don't need
to be satisfied if arming happens < 5 seconds after the last disarming.
This allows to recover from accidental in-air disarming.
2018-06-27 10:41:21 +02:00
Beat Küng 8c3cf0167c commander arming_state_transition: respect fRunPreArmChecks properly
if fRunPreArmChecks was set to false, there were still cases where the
preflight checks could be called. This fixes that.

arming_state_transition() with fRunPreArmChecks=false is only called
when entering & leaving preflight calibration mode.
All other places use fRunPreArmChecks=true, which means there is no change
for these.
2018-06-27 10:41:21 +02:00
Beat Küng 469b5f98e2 commander Preflight::preflightCheck: transition condition_system_sensors_initialized only to true
- this matches the logic in arming_state_transition()
- if Commander::preflight_check was run in armed state and the checks
  failed, disarming was not possible anymore
  (because disarming checks for condition_system_sensors_initialized).
  That is currently not the case, but the existing logic is way too fragile.

Alternative solution: check if armed in Preflight::preflightCheck, and
only transition to false if disarmed (but also respect the re-arming
grace period).
2018-06-27 10:41:21 +02:00
Daniel Agar 9eae8e7c5b Update submodule libuavcan to latest Wed Jun 27 01:27:03 UTC 2018 (#9779)
- libuavcan in PX4/Firmware (fab974fde713b9de0ece1b85239d9dc52622052e): https://github.com/UAVCAN/libuavcan/commit/231b221b64265db4e98f86e53721316f9e17e143
    - libuavcan current upstream: https://github.com/UAVCAN/libuavcan/commit/dfcdf22eda16ff06847976fd6c7f40671fc92eb5
    - Changes: https://github.com/UAVCAN/libuavcan/compare/231b221b64265db4e98f86e53721316f9e17e143...dfcdf22eda16ff06847976fd6c7f40671fc92eb5

    dfcdf22 2018-06-26 Pavel Kirienko - Merge pull request #142 from thirtytwobits/feature/issue141
529a376 2018-06-21 Dixon, Scott - Issue #141 Add Vagrantfile to automate dev environment
2018-06-27 00:09:19 -04:00
Beat Küng 0ac1ef12c7 gpssim: unadvertise gps topics 2018-06-26 15:51:17 +02:00
Nuno Marques bb19c2bc8b Jenkins: add LPE CI test (#9762) 2018-06-26 01:15:13 -04:00
PX4 Jenkins a5d5d5e38e Update submodule nuttx to latest Mon Jun 25 21:26:34 EDT 2018
- nuttx in PX4/Firmware (537fe886015be0ccb6b691a8a2802fb29d17c410): https://github.com/PX4-NuttX/nuttx/commit/63775322bf25adb406594f8e610122fe0cef2f7a
    - nuttx current upstream: https://github.com/PX4-NuttX/nuttx/commit/f57752b6f16f54bd50188024475657c6a7a1604c
    - Changes: https://github.com/PX4-NuttX/nuttx/compare/63775322bf25adb406594f8e610122fe0cef2f7a...f57752b6f16f54bd50188024475657c6a7a1604c

    f57752b 2018-06-25 Daniel Agar - Merged in dagar/nuttx/pr-fixCompileError (pull request #660)
2018-06-26 06:42:42 +02:00
Beat Küng ddde968a6f mavlink: allow resetting streams to their default via 'mavlink stream' command 2018-06-25 12:19:56 +02:00
Beat Küng ec15fc333b mavlink: add 'mavlink status streams' command
Displays all enabled streams and their configured rates.
Example output:
instance #1:
        Name                Rate Config (current) [Hz] Message Size (if active) [B]
        HEARTBEAT                       1.00 (1.000)    21
        STATUSTEXT                     20.00 (6.320)
        COMMAND_LONG                  unlimited
        ALTITUDE                        1.00 (0.316)
        ATTITUDE                       25.00 (7.900)    40
        ATTITUDE_TARGET                10.00 (3.160)    49
        ESTIMATOR_STATUS                1.00 (0.316)    44
        EXTENDED_SYS_STATE              1.00 (0.316)    14
        GLOBAL_POSITION_INT            10.00 (3.160)    40
        GPS_RAW_INT                     1.00 (0.316)    62
        HOME_POSITION                   0.50 (0.158)
        RC_CHANNELS                     5.00 (1.580)
        SERVO_OUTPUT_RAW_0              1.00 (0.316)    49
        SYS_STATUS                      5.00 (1.580)    43
        SYSTEM_TIME                     1.00 (0.316)    24
        VFR_HUD                        25.00 (7.900)    32
        WIND_COV                        2.00 (0.632)
2018-06-25 12:19:56 +02:00
Beat Küng 84841236cb mavlink: allow resetting mavlink streams to default via MAV_CMD_SET_MESSAGE_INTERVAL
This implementation does not need more resources.
It's not super efficient in terms of runtime, but it's also not something
that is called often.
2018-06-25 12:19:56 +02:00
Beat Küng 333fd9cf45 mavlink: improve status output
- add datarate
- add UDP remote port
- add partner IP
2018-06-25 12:19:56 +02:00
Beat Küng f59412ba65 mavlink: only enable HIL_ACTUATOR_CONTROLS in hil if link has enough bandwidth
Plus correct return value.
Iridium links are below that.
2018-06-25 12:19:56 +02:00
Beat Küng 4553992760 mavlink: refactor get_client_source_address() to return a reference instead of a pointer 2018-06-25 12:19:56 +02:00
Daniel Agar aa270fcd89 Mission feasibility: remove 2/3rds distance warnings that don't reject a mission (#9743) 2018-06-23 10:39:23 -04:00
PX4 Jenkins 1a363be2e7 Update submodule sitl_gazebo to latest Sat Jun 23 01:30:51 UTC 2018
- sitl_gazebo in PX4/Firmware (1dd67e7787): https://github.com/PX4/sitl_gazebo/commit/b5a92095bfb1b6a218a80f58ad9fe09c89ef4598
    - sitl_gazebo current upstream: https://github.com/PX4/sitl_gazebo/commit/3c7d18d0a52657106a3a7190c54006ed6b442071
    - Changes: https://github.com/PX4/sitl_gazebo/compare/b5a92095bfb1b6a218a80f58ad9fe09c89ef4598...3c7d18d0a52657106a3a7190c54006ed6b442071

    3c7d18d 2018-06-19 TSC21 - travis: add -DBUILD_ROS_INTERFACE=ON option to catkin build
e89cf8f 2018-06-17 TSC21 - travis: use catkin build tools
f7a1c4b 2018-06-19 Elia Tarasov - remove unnecessary mavros libs and duplicate CMake message
c495c57 2018-06-19 Elia Tarasov - remove unnecessary dependecies
5c861a5 2018-06-19 Elia Tarasov - remove executable node
7d69268 2018-06-19 Elia Tarasov - remove redundant includes
6ba0eeb 2018-06-19 Elia Tarasov - remove redundant ros packages
9c69a95 2018-06-18 Elia Tarasov - modify target node name and add needed libs
147cb56 2018-06-17 elia - move class member function definitions to implementation file
dc24fcc 2018-06-17 elia - add undefined class varibales
2018-06-23 10:35:22 -04:00
Daniel Agar 6b02fc083e cmake PMP fetch FlameGraph to build directory 2018-06-23 15:00:51 +02:00
PX4 Jenkins 1dd67e7787 Update submodule v2.0 to latest Fri Jun 22 01:28:36 UTC 2018
- v2.0 in PX4/Firmware (5e76f2dca7530404173601b4a231778381d4f3cc): https://github.com/mavlink/c_library_v2/commit/033fa8e7a4a75a0c3f17cea57e3be8966e05f770
    - v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/f5c0ba684659fbc6c6c5f8777bd30e0b3c32fdef
    - Changes: https://github.com/mavlink/c_library_v2/compare/033fa8e7a4a75a0c3f17cea57e3be8966e05f770...f5c0ba684659fbc6c6c5f8777bd30e0b3c32fdef

    f5c0ba6 2018-06-19 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/40f8149d642892b87c61acf3fb63d2512d06a22a
2018-06-22 09:42:40 -04:00
Daniel Agar d21cf7123e version library add ECL 2018-06-22 08:46:30 +02:00
Daniel Agar 2a3d66cf45 px4fmu-v2_default include bl_update 2018-06-21 07:40:08 +02:00
DanielePettenuzzo 325fe16178 airspeed drivers: add PX4_I2C_BUS_ONBOARD as possible bus 2018-06-21 07:37:53 +02:00
DanielePettenuzzo 82b3e57abb rc.sensors: look for airspeed sensors on all busses 2018-06-21 07:37:53 +02:00
DanielePettenuzzo 035f240e76 ets_airspeed: add -a flag to scan all i2c busses during start 2018-06-21 07:37:53 +02:00
DanielePettenuzzo 670c3cbf4e sdp3x_airspeed: add -a flag to scan all i2c busses during start 2018-06-21 07:37:53 +02:00
DanielePettenuzzo fd675084cc ms5525_airspeed: add -a flag to scan all i2c busses during start 2018-06-21 07:37:53 +02:00
DanielePettenuzzo cf816fe556 ms4525_airspeed: remove i2c_bus parameter from start function (it tries all busses) 2018-06-21 07:37:53 +02:00
DanielePettenuzzo 5f3ea2f7ba ms4525_airspeed: change start_bus from bool to int 2018-06-21 07:37:53 +02:00
DanielePettenuzzo c231b6834d ms4525_airspeed: remove PX4_I2C_ALL 2018-06-21 07:37:53 +02:00
DanielePettenuzzo fa35731e02 ms4525_airspeed: add -a flag to scan all i2c busses during start 2018-06-21 07:37:53 +02:00
Philipp Oettershagen 7a82c777b2 LandDetector FW: Fix param min/max values and descriptions as well as some variable names which were wrong/outdated (#9708) 2018-06-20 16:13:33 -04:00
korigod 4dfd77a0cd cmake: add nuttx force-upload target (#9717)
If the PX4FMUv2 board does not have the v5 uploader, it's not possible
to check the silicon revision to make sure it's safe to upload the
firmware which is more than 1 MB. However, if the user is sure the
silicon revision is not affected by this errata, he can upload the
firmware using px4_uploader.py with --force argument. This commit adds
`force-upload` make target to do it more convenient way.

Signed-off-by: Andrei Korigodski <akorigod@gmail.com>
2018-06-20 10:37:01 -04:00
Ricardo Marques bf0a1f05fb Tilt-Quadrotor Mixer and Airframe files (#9496) 2018-06-20 10:35:05 -04:00
Beat Küng 6a7751496b df_ms5611_wrapper: fix initialization of error_count & device_id 2018-06-20 08:28:33 +02:00
Paul Riseborough 4a0b41bbc0 ekf2: Enable use of flow sensors not fitted with gyros (#9703)
* ecl: Update to version allowing use of flow sensors without gyros

* msg: Update description for optical_flow

Adds advice for publishing gyro rate integral message when no rate gyro is fitted.
2018-06-20 10:28:58 +10:00
Julien Lecoeur c73944c7a2 Mavlink: initialize _ping_stats
Uninitialized `_ping_stats.last_ping_time` caused ping statistics to be printed even when no ping was received.
2018-06-19 13:00:36 +02:00
2292 changed files with 124993 additions and 117467 deletions
+160
View File
@@ -0,0 +1,160 @@
#!/usr/bin/env groovy
pipeline {
agent none
stages {
stage('Build') {
agent {
docker {
image 'px4io/px4-dev-ros-kinetic:2019-03-08'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
}
}
steps {
sh 'export'
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
sh 'make px4_sitl_default'
sh 'make px4_sitl_default sitl_gazebo'
sh 'make px4_sitl_default package'
sh 'ccache -s'
stash(name: "px4_sitl_package", includes: "build/px4_sitl_default/*.bz2")
archiveArtifacts(artifacts: "build/px4_sitl_default/*.bz2", fingerprint: true, onlyIfSuccessful: true)
}
post {
always {
sh 'make distclean'
}
}
} // stage Build
stage('ROS Tests') {
steps {
script {
def missions = [
[
name: "FW",
test: "mavros_posix_test_mission.test",
mission: "FW_mission_1",
vehicle: "plane"
],
[
name: "MC_box",
test: "mavros_posix_test_mission.test",
mission: "MC_mission_box",
vehicle: "iris"
],
[
name: "MC_offboard_att",
test: "mavros_posix_tests_offboard_attctl.test",
mission: "",
vehicle: "iris"
],
[
name: "MC_offboard_pos",
test: "mavros_posix_tests_offboard_posctl.test",
mission: "",
vehicle: "iris"
],
[
name: "VTOL_standard",
test: "mavros_posix_test_mission.test",
mission: "VTOL_mission_1",
vehicle: "standard_vtol"
],
[
name: "VTOL_tailsitter",
test: "mavros_posix_test_mission.test",
mission: "VTOL_mission_1",
vehicle: "tailsitter"
],
[
name: "VTOL_tiltrotor",
test: "mavros_posix_test_mission.test",
mission: "VTOL_mission_1",
vehicle: "tiltrotor"
],
[
name: "MC_avoidance",
test: "mavros_posix_test_avoidance.test",
mission: "avoidance",
vehicle: "iris_obs_avoid",
run_script: "rostest_avoidance_run.sh"
],
]
def test_nodes = [:]
for (def i = 0; i < missions.size(); i++) {
test_nodes.put(missions[i].name, createTestNode(missions[i]))
}
parallel test_nodes
} // script
} // steps
} // stage ROS Tests
} //stages
environment {
CCACHE_DIR = '/tmp/ccache'
CI = true
}
options {
buildDiscarder(logRotator(numToKeepStr: '10', artifactDaysToKeepStr: '30'))
timeout(time: 60, unit: 'MINUTES')
}
} // pipeline
def createTestNode(Map test_def) {
return {
node {
cleanWs()
docker.image("px4io/px4-dev-ros-kinetic:2019-03-08").inside('-e HOME=${WORKSPACE}') {
stage(test_def.name) {
def run_script = test_def.get('run_script', 'rostest_px4_run.sh')
def test_ok = true
sh('export')
unstash('px4_sitl_package')
sh('tar -xjpvf build/px4_sitl_default/px4-px4_sitl_default*.bz2')
// run test
try {
sh('px4-px4_sitl_default*/px4/test/' + run_script + ' ' + test_def.test + ' mission:=' + test_def.mission + ' vehicle:=' + test_def.vehicle)
} catch (exc) {
// save all test artifacts for debugging
archiveArtifacts(allowEmptyArchive: false, artifacts: '.ros/**/*.ulg, .ros/**/rosunit-*.xml, .ros/**/rostest-*.log')
test_ok = false
}
// log analysis
// process ekf log data
try {
sh('px4-px4_sitl_default*/px4/Tools/ecl_ekf/process_logdata_ekf.py .ros/log/*/*.ulg')
} catch (exc) {
// save log analysis artifacts for debugging
archiveArtifacts(allowEmptyArchive: false, artifacts: '.ros/**/*.pdf, .ros/**/*.csv')
// FIXME: don't let the script to fail the build
// test_ok = false
}
// upload log to flight review (https://logs.px4.io/)
sh('px4-px4_sitl_default*/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/log/*/*.ulg')
if (!test_ok) {
error('ROS Test failed')
}
} // stage
cleanWs()
} // docker.image
} // node
} // return
} // createTestNode
+153
View File
@@ -0,0 +1,153 @@
#!/usr/bin/env groovy
pipeline {
agent none
stages {
stage('Build') {
agent {
docker {
image 'px4io/px4-dev-ros-kinetic:2019-03-08'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
}
}
steps {
sh 'export'
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
sh 'make px4_sitl_default'
sh 'make px4_sitl_default sitl_gazebo'
sh 'make px4_sitl_default package'
sh 'ccache -s'
stash(name: "px4_sitl_package", includes: "build/px4_sitl_default/*.bz2")
//archiveArtifacts(artifacts: "build/px4_sitl_default/*.bz2", fingerprint: true, onlyIfSuccessful: true)
}
post {
always {
sh 'make distclean'
}
}
} // stage Build
stage('ROS Tests') {
steps {
script {
def missions = [
[
name: "FW",
test: "mavros_posix_test_mission.test",
mission: "FW_mission_1",
vehicle: "plane"
],
[
name: "MC_box",
test: "mavros_posix_test_mission.test",
mission: "MC_mission_box",
vehicle: "iris"
],
[
name: "MC_offboard_att",
test: "mavros_posix_tests_offboard_attctl.test",
mission: "",
vehicle: "iris"
],
[
name: "MC_offboard_pos",
test: "mavros_posix_tests_offboard_posctl.test",
mission: "",
vehicle: "iris"
],
[
name: "VTOL_standard",
test: "mavros_posix_test_mission.test",
mission: "VTOL_mission_1",
vehicle: "standard_vtol"
],
[
name: "VTOL_tailsitter",
test: "mavros_posix_test_mission.test",
mission: "VTOL_mission_1",
vehicle: "tailsitter"
],
[
name: "VTOL_tiltrotor",
test: "mavros_posix_test_mission.test",
mission: "VTOL_mission_1",
vehicle: "tiltrotor"
],
]
def test_nodes = [:]
for (def i = 0; i < missions.size(); i++) {
test_nodes.put(missions[i].name, createTestNode(missions[i]))
}
parallel test_nodes
} // script
} // steps
} // stage ROS Tests
} //stages
environment {
CCACHE_DIR = '/tmp/ccache'
CI = true
PX4_CMAKE_BUILD_TYPE = 'AddressSanitizer'
}
options {
buildDiscarder(logRotator(numToKeepStr: '10', artifactDaysToKeepStr: '30'))
timeout(time: 60, unit: 'MINUTES')
}
} // pipeline
def createTestNode(Map test_def) {
return {
node {
cleanWs()
docker.image("px4io/px4-dev-ros-kinetic:2019-03-08").inside('-e HOME=${WORKSPACE}') {
stage(test_def.name) {
def test_ok = true
sh('export')
unstash('px4_sitl_package')
sh('tar -xjpvf build/px4_sitl_default/px4-px4_sitl_default*.bz2')
// run test
try {
sh('px4-px4_sitl_default*/px4/test/rostest_px4_run.sh ' + test_def.test + ' mission:=' + test_def.mission + ' vehicle:=' + test_def.vehicle)
} catch (exc) {
// save all test artifacts for debugging
archiveArtifacts(allowEmptyArchive: false, artifacts: '.ros/**/*.ulg, .ros/**/rosunit-*.xml, .ros/**/rostest-*.log')
test_ok = false
}
// log analysis
// process ekf log data
try {
sh('px4-px4_sitl_default*/px4/Tools/ecl_ekf/process_logdata_ekf.py .ros/log/*/*.ulg')
} catch (exc) {
// save log analysis artifacts for debugging
archiveArtifacts(allowEmptyArchive: false, artifacts: '.ros/**/*.pdf, .ros/**/*.csv')
// FIXME: don't let the script to fail the build
// test_ok = false
}
// upload log to flight review (https://logs.px4.io/)
sh('px4-px4_sitl_default*/px4/Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/log/*/*.ulg')
if (!test_ok) {
error('ROS Test failed')
}
} // stage
cleanWs()
} // docker.image
} // node
} // return
} // createTestNode
+182
View File
@@ -0,0 +1,182 @@
#!/usr/bin/env groovy
pipeline {
agent none
stages {
stage('ROS Tests') {
steps {
script {
def missions = [
[
name: "FW",
test: "mavros_posix_test_mission.test",
mission: "FW_mission_1",
vehicle: "plane"
],
[
name: "MC_box",
test: "mavros_posix_test_mission.test",
mission: "MC_mission_box",
vehicle: "iris"
],
[
name: "MC_offboard_att",
test: "mavros_posix_tests_offboard_attctl.test",
mission: "",
vehicle: "iris"
],
[
name: "MC_offboard_pos",
test: "mavros_posix_tests_offboard_posctl.test",
mission: "",
vehicle: "iris"
],
[
name: "VTOL_standard",
test: "mavros_posix_test_mission.test",
mission: "VTOL_mission_1",
vehicle: "standard_vtol"
],
[
name: "VTOL_tailsitter",
test: "mavros_posix_test_mission.test",
mission: "VTOL_mission_1",
vehicle: "tailsitter"
],
[
name: "VTOL_tiltrotor",
test: "mavros_posix_test_mission.test",
mission: "VTOL_mission_1",
vehicle: "tiltrotor"
],
]
def test_nodes = [:]
for (def i = 0; i < missions.size(); i++) {
test_nodes.put(missions[i].name, createTestNode(missions[i]))
}
parallel test_nodes
} // script
} // steps
} // stage ROS Tests
stage('Coverage') {
parallel {
stage('code coverage (python)') {
agent {
docker {
image 'px4io/px4-dev-base-bionic:2019-03-08'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps {
sh 'export'
sh 'make distclean'
sh 'make python_coverage'
withCredentials([string(credentialsId: 'FIRMWARE_CODECOV_TOKEN', variable: 'CODECOV_TOKEN')]) {
sh 'curl -s https://codecov.io/bash | bash -s - -F python'
}
sh 'make distclean'
}
}
stage('unit tests') {
agent {
docker {
image 'px4io/px4-dev-base-bionic:2019-03-08'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps {
sh 'export'
sh 'make distclean'
sh 'make px4_sitl_test test_results_junit'
withCredentials([string(credentialsId: 'FIRMWARE_CODECOV_TOKEN', variable: 'CODECOV_TOKEN')]) {
sh 'curl -s https://codecov.io/bash | bash -s - -F unittest'
}
sh 'make distclean'
}
}
} // parallel
} // stage Coverage
} //stages
environment {
CCACHE_DIR = '/tmp/ccache'
CI = true
CTEST_OUTPUT_ON_FAILURE = 1
PX4_CMAKE_BUILD_TYPE = 'Coverage'
}
options {
buildDiscarder(logRotator(numToKeepStr: '10', artifactDaysToKeepStr: '30'))
timeout(time: 60, unit: 'MINUTES')
}
} // pipeline
def createTestNode(Map test_def) {
return {
node {
cleanWs()
docker.image("px4io/px4-dev-ros-kinetic:2019-03-08").inside('-e HOME=${WORKSPACE}') {
stage(test_def.name) {
def test_ok = true
sh('export')
checkout(scm)
// run test
try {
sh('make distclean')
sh('ccache -z')
sh('make px4_sitl_default')
sh('make px4_sitl_default sitl_gazebo')
sh('ccache -s')
sh('make rostest_run TEST_FILE=' + test_def.test + ' TEST_MISSION=' + test_def.mission + ' TEST_VEHICLE=' + test_def.vehicle)
} catch (exc) {
// save all test artifacts for debugging
archiveArtifacts(allowEmptyArchive: false, artifacts: '.ros/**/*.ulg, .ros/**/rosunit-*.xml, .ros/**/rostest-*.log')
test_ok = false
}
// log analysis
withCredentials([string(credentialsId: 'FIRMWARE_CODECOV_TOKEN', variable: 'CODECOV_TOKEN')]) {
sh 'curl -s https://codecov.io/bash | bash -s - -F sitl_mission_${STAGE_NAME}'
// process log data (with python code coverage)
try {
//sh('coverage run -p Tools/ecl_ekf/process_logdata_ekf.py .ros/log/*/*.ulg')
sh('Tools/ecl_ekf/process_logdata_ekf.py .ros/log/*/*.ulg')
} catch (exc) {
// save log analysis artifacts for debugging
archiveArtifacts(allowEmptyArchive: false, artifacts: '.ros/**/*.pdf, .ros/**/*.csv')
// FIXME: don't let the script to fail the build
// test_ok = false
}
// upload log to flight review (https://logs.px4.io/) with python code coverage
sh('coverage run -p Tools/upload_log.py -q --description "${JOB_NAME}: ${STAGE_NAME}" --feedback "${JOB_NAME} ${CHANGE_TITLE} ${CHANGE_URL}" --source CI .ros/log/*/*.ulg')
// upload python code coverage to codecov.io
sh 'curl -s https://codecov.io/bash | bash -s - -X gcov -F sitl_python_${STAGE_NAME}'
}
if (!test_ok) {
error('ROS Test failed')
}
} // stage
cleanWs()
} // docker.image
} // node
} // return
} // createTestNode
+153
View File
@@ -0,0 +1,153 @@
#!/usr/bin/env groovy
pipeline {
agent none
stages {
stage('Build') {
steps {
script {
def build_nodes = [:]
def docker_images = [
armhf: "px4io/px4-dev-armhf:2019-03-08",
base: "px4io/px4-dev-base-bionic:2019-03-08",
nuttx: "px4io/px4-dev-nuttx:2019-03-08",
ros: "px4io/px4-dev-ros-kinetic:2019-03-08",
rpi: "px4io/px4-dev-raspi:2019-03-08",
snapdragon: "lorenzmeier/px4-dev-snapdragon:2018-09-12"
]
def armhf_builds = [
target: ["aerotenna_ocpoc_ubuntu"],
image: docker_images.armhf,
archive: false
]
def base_builds = [
target: ["px4_sitl_rtps"],
image: docker_images.base,
archive: false
]
def nuttx_builds_archive = [
target: [
"px4_fmu-v2_default", "px4_fmu-v2_fixedwing", "px4_fmu-v2_lpe", "px4_fmu-v2_multicopter", "px4_fmu-v2_rover", "px4_fmu-v2_test",
"px4_fmu-v3_default",
"px4_fmu-v4_default",
"px4_fmu-v4pro_default",
"px4_fmu-v5_default", "px4_fmu-v5_fixedwing", "px4_fmu-v5_multicopter", "px4_fmu-v5_rover", "px4_fmu-v5_rtps", "px4_fmu-v5_stackcheck",
"intel_aerofc-v1_default", "auav_x21_default", "av_x-v1_default", "bitcraze_crazyflie_default", "airmind_mindpx-v2_default",
"nxp_fmuk66-v3_default", "omnibus_f4sd_default"],
image: docker_images.nuttx,
archive: true
]
def nuttx_builds_other = [
target: ["px4_cannode-v1_default", "px4_esc-v1_default", "thiemar_s2740vc-v1_default"],
image: docker_images.nuttx,
archive: false
]
def rpi_builds = [
target: ["emlid_navio2_cross", "parrot_bebop_default"],
image: docker_images.rpi,
archive: false
]
def snapdragon_builds = [
target: ["atlflight_eagle_qurt-default", "atlflight_eagle_default"],
image: docker_images.snapdragon,
archive: false
]
def docker_builds = [
armhf_builds, base_builds, nuttx_builds_archive, nuttx_builds_other, rpi_builds, snapdragon_builds
]
for (def build_type = 0; build_type < docker_builds.size(); build_type++) {
for (def build_target = 0; build_target < docker_builds[build_type].target.size(); build_target++) {
build_nodes.put(docker_builds[build_type].target[build_target],
createBuildNode(docker_builds[build_type].archive, docker_builds[build_type].image, docker_builds[build_type].target[build_target])
)
}
}
parallel build_nodes
} // script
} // steps
} // stage Build
// TODO: actually upload artifacts to S3
// stage('S3 Upload') {
// agent {
// docker { image 'px4io/px4-dev-base-bionic:2019-03-08' }
// }
// options {
// skipDefaultCheckout()
// }
// when {
// anyOf {
// branch 'master'
// branch 'beta'
// branch 'stable'
// branch 'pr-jenkins' // for testing
// }
// }
// steps {
// sh 'echo "uploading to S3"'
// }
// }
} // stages
environment {
CCACHE_DIR = '/tmp/ccache'
CI = true
}
options {
buildDiscarder(logRotator(numToKeepStr: '2', artifactDaysToKeepStr: '14'))
timeout(time: 60, unit: 'MINUTES')
}
}
def createBuildNode(Boolean archive, String docker_image, String target) {
return {
// TODO: fix the snapdragon image
bypass_entrypoint = ''
if (docker_image == 'lorenzmeier/px4-dev-snapdragon:2018-09-12') {
bypass_entrypoint = ' --entrypoint=""'
}
node {
docker.withRegistry('https://registry.hub.docker.com', 'docker_hub_dagar') {
docker.image(docker_image).inside('-e CCACHE_BASEDIR=${WORKSPACE} -v ${CCACHE_DIR}:${CCACHE_DIR}:rw' + bypass_entrypoint) {
stage(target) {
try {
sh('export')
checkout(scm)
sh('make distclean')
sh('git fetch --tags')
sh('ccache -z')
sh('make ' + target)
sh('ccache -s')
sh('make sizes')
if (archive) {
archiveArtifacts(allowEmptyArchive: false, artifacts: 'build/*/*.px4, build/*/*.elf, build/*/*.bin', fingerprint: true, onlyIfSuccessful: true)
}
sh('make ' + target + ' package')
archiveArtifacts(allowEmptyArchive: true, artifacts: 'build/*/*.tar.bz2', fingerprint: true, onlyIfSuccessful: true)
archiveArtifacts(allowEmptyArchive: true, artifacts: 'build/*/*.deb', fingerprint: true, onlyIfSuccessful: true)
}
catch (exc) {
throw (exc)
}
finally {
sh('make distclean')
}
}
}
}
}
}
}
+87
View File
@@ -0,0 +1,87 @@
#!/usr/bin/env groovy
pipeline {
agent none
stages {
stage('Build') {
parallel {
stage('px4_sitl_default (OSX)') {
agent {
label 'mac'
}
environment {
CCACHE_BASEDIR = "${env.WORKSPACE}"
}
steps {
sh 'export'
sh 'make distclean'
sh 'ccache -z'
sh 'make px4_sitl_default'
sh 'ccache -s'
}
post {
always {
sh 'make distclean'
}
}
} // stage px4_sitl_default
stage('px4_fmu-v5_default (OSX)') {
agent {
label 'mac'
}
environment {
CCACHE_BASEDIR = "${env.WORKSPACE}"
}
steps {
sh 'export'
sh 'make distclean'
sh 'ccache -z'
sh 'make px4_fmu-v5_default'
sh 'ccache -s'
}
post {
always {
sh 'make distclean'
}
}
} // stage px4_fmu-v5_default
stage('sitl tests (OSX)') {
agent {
label 'mac'
}
environment {
CCACHE_BASEDIR = "${env.WORKSPACE}"
}
steps {
sh 'export'
sh 'make distclean'
sh 'ccache -z'
sh 'make tests'
sh 'ccache -s'
}
post {
always {
sh 'make distclean'
}
}
} // stage sitl tests
} // parallel
} // stage Build
} // stages
environment {
CCACHE_CPP2 = '1'
CCACHE_DIR = '/tmp/ccache'
CI = true
}
options {
buildDiscarder(logRotator(numToKeepStr: '10', artifactDaysToKeepStr: '30'))
timeout(time: 120, unit: 'MINUTES')
}
}
+366
View File
@@ -0,0 +1,366 @@
#!/usr/bin/env groovy
pipeline {
agent none
stages {
stage('Build') {
parallel {
stage('px4_fmu-v2_test') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2019-03-08'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps {
sh 'export'
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
sh 'make px4_fmu-v2_default'
sh 'make sizes'
sh 'ccache -s'
stash includes: 'build/px4_fmu-v2_default/px4_fmu-v2_default.elf', name: 'px4_fmu-v2_test'
}
post {
always {
sh 'make distclean'
}
}
}
stage('px4_fmu-v3_default') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2019-03-08'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps {
sh 'export'
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
sh 'make px4_fmu-v3_default'
sh 'make sizes'
sh 'ccache -s'
stash includes: 'build/px4_fmu-v3_default/px4_fmu-v3_default.elf', name: 'px4_fmu-v3_default'
}
post {
always {
sh 'make distclean'
}
}
}
stage('px4_fmu-v4_default') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2019-03-08'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps {
sh 'export'
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
sh 'make px4_fmu-v4_default'
sh 'make sizes'
sh 'ccache -s'
stash includes: 'build/px4_fmu-v4_default/px4_fmu-v4_default.elf', name: 'px4_fmu-v4_default'
}
post {
always {
sh 'make distclean'
}
}
}
stage('px4_fmu-v4pro_default') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2019-03-08'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps {
sh 'export'
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
sh 'make px4_fmu-v4pro_default'
sh 'make sizes'
sh 'ccache -s'
stash includes: 'build/px4_fmu-v4pro_default/px4_fmu-v4pro_default.elf', name: 'px4_fmu-v4pro_default'
}
post {
always {
sh 'make distclean'
}
}
}
stage('px4_fmu-v5_default') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2019-03-08'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps {
sh 'export'
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
sh 'make px4_fmu-v5_default'
sh 'make sizes'
sh 'ccache -s'
stash includes: 'build/px4_fmu-v5_default/px4_fmu-v5_default.elf', name: 'px4_fmu-v5_default'
}
post {
always {
sh 'make distclean'
}
}
}
stage('px4_fmu-v5_stackcheck') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2019-03-08'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps {
sh 'export'
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
sh 'make px4_fmu-v5_stackcheck'
sh 'make sizes'
sh 'ccache -s'
stash includes: 'build/px4_fmu-v5_stackcheck/px4_fmu-v5_stackcheck.elf', name: 'px4_fmu-v5_stackcheck'
}
post {
always {
sh 'make distclean'
}
}
}
stage('nxp_fmuk66-v3_default') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2019-03-08'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps {
sh 'export'
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
sh 'make nxp_fmuk66-v3_default'
sh 'make sizes'
sh 'ccache -s'
stash includes: 'build/nxp_fmuk66-v3_default/nxp_fmuk66-v3_default.elf', name: 'nxp_fmuk66-v3_default'
}
post {
always {
sh 'make distclean'
}
}
}
} // parallel
} // stage Build
stage('Flash and Run') {
parallel {
stage('px4_fmu-v2_test') {
agent {
label 'px4_fmu-v2'
}
steps {
script {
try {
sh 'export'
sh 'find /dev/serial'
unstash 'px4_fmu-v2_test'
sh 'platforms/nuttx/Debug/jlink_gdb_upload.sh build/px4_fmu-v2_test/px4_fmu-v2_test.elf'
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600'
//sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
} catch (Exception err) {
// always report passed for now
currentBuild.result = 'SUCCESS'
}
} // script
}
options {
timeout(time: 600, unit: 'SECONDS')
}
}
stage('px4_fmu-v3_default') {
agent {
label 'px4_fmu-v3'
}
steps {
script {
try {
sh 'export'
sh 'find /dev/serial'
unstash 'px4_fmu-v3_default'
sh 'platforms/nuttx/Debug/jlink_gdb_upload.sh build/px4_fmu-v3_default/px4_fmu-v3_default.elf'
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600'
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
} catch (Exception err) {
// always report passed for now
currentBuild.result = 'SUCCESS'
}
} // script
}
options {
timeout(time: 600, unit: 'SECONDS')
}
}
stage('px4_fmu-v4_default') {
agent {
label 'px4_fmu-v4'
}
steps {
script {
try {
sh 'export'
sh 'find /dev/serial'
unstash 'px4_fmu-v4_default'
sh 'platforms/nuttx/Debug/jlink_gdb_upload.sh build/px4_fmu-v4_default/px4_fmu-v4_default.elf'
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600'
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
} catch (Exception err) {
// always report passed for now
currentBuild.result = 'SUCCESS'
}
} // script
}
options {
timeout(time: 600, unit: 'SECONDS')
}
}
stage('px4_fmu-v4pro_default') {
agent {
label 'px4_fmu-v4pro'
}
steps {
script {
try {
sh 'export'
sh 'find /dev/serial'
unstash 'px4_fmu-v4pro_default'
sh 'platforms/nuttx/Debug/jlink_gdb_upload.sh build/px4_fmu-v4pro_default/px4_fmu-v4pro_default.elf'
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600'
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
} catch (Exception err) {
// always report passed for now
currentBuild.result = 'SUCCESS'
}
} // script
}
options {
timeout(time: 600, unit: 'SECONDS')
}
}
stage('px4_fmu-v5_default') {
agent {
label 'px4_fmu-v5'
}
steps {
script {
try {
sh 'export'
sh 'find /dev/serial'
unstash 'px4_fmu-v5_default'
sh './platforms/nuttx/Debug/jlink_gdb_upload.sh build/px4_fmu-v5_default/px4_fmu-v5_default.elf'
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600'
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
} catch (Exception err) {
// always report passed for now
currentBuild.result = 'SUCCESS'
}
} // script
}
options {
timeout(time: 600, unit: 'SECONDS')
}
}
stage('px4_fmu-v5_stackcheck') {
agent {
label 'px4_fmu-v5'
}
steps {
script {
try {
sh 'export'
sh 'find /dev/serial'
unstash 'px4_fmu-v5_stackcheck'
sh './platforms/nuttx/Debug/jlink_gdb_upload.sh build/px4_fmu-v5_stackcheck/px4_fmu-v5_stackcheck.elf'
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600'
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
} catch (Exception err) {
// always report passed for now
currentBuild.result = 'SUCCESS'
}
} // script
}
options {
timeout(time: 600, unit: 'SECONDS')
}
}
stage('nxp_fmuk66-v3_default') {
agent {
label 'nxp_fmuk66-v3'
}
steps {
script {
try {
sh 'export'
sh 'find /dev/serial'
unstash 'nxp_fmuk66-v3_default'
sh './platforms/nuttx/Debug/jlink_gdb_upload.sh build/nxp_fmuk66-v3_default/nxp_fmuk66-v3_default.elf'
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI*` --baudrate 57600'
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
} catch (Exception err) {
// always report passed for now
currentBuild.result = 'SUCCESS'
}
} // script
}
options {
timeout(time: 600, unit: 'SECONDS')
}
}
} // parallel
} // stage Flash
} // stages
environment {
CCACHE_DIR = '/tmp/ccache'
CI = true
}
options {
buildDiscarder(logRotator(numToKeepStr: '20', artifactDaysToKeepStr: '30'))
timeout(time: 60, unit: 'MINUTES')
}
}
+1
View File
@@ -1,5 +1,6 @@
Checks: '*
,-cert-dcl50-cpp
,-cert-env33-c
,-cert-err34-c
,-cert-err58-cpp
,-cert-msc30-c
@@ -1,5 +1,5 @@
---
name: Feature request
name: 🚀 Feature Request
about: Suggest an idea for this project
---
@@ -0,0 +1,10 @@
---
name: ⛔ Support Question
about: See [PX4 Discuss](http://discuss.px4.io/) for questions about using PX4.
---
We use GitHub issues only to discuss PX4 bugs and new features. For
questions about using PX4 or related components, please use [PX4 Discuss](http://discuss.px4.io/).
Thanks!
@@ -0,0 +1,9 @@
---
name: ⛔ Documentation Issue
about: See https://github.com/PX4/Devguide for documentation issues
---
PX4 has dedicated repositories for developer documentation (https://github.com/PX4/Devguide) and user documentation (https://github.com/PX4/px4_user_guide).
Thanks!
+12 -49
View File
@@ -1,55 +1,18 @@
# Configuration for probot-stale - https://github.com/probot/stale
# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale Issue or Pull Request is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 90
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 14
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
# Issues with these labels will never be considered stale
exemptLabels:
- priority-crtical
- pinned
- security
- "[Status] Maybe Later"
# Set to true to ignore issues in a project (defaults to false)
exemptProjects: true
# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: true
# Label to use when marking as stale
staleLabel: status/STALE
# Comment to post when marking as stale. Set to `false` to disable
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed in 2 weeks if no further activity occurs. Thank you
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when removing the stale label.
# unmarkComment: >
# Your comment here.
# Comment to post when closing a stale Issue or Pull Request.
closeComment: >
Closing as stale.
# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 10
# Limit to only `issues` or `pulls`
# only: issues
# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
# pulls:
# daysUntilStale: 30
# markComment: >
# This pull request has been automatically marked as stale because it has not had
# recent activity. It will be closed if no further activity occurs. Thank you
# for your contributions.
# issues:
# exemptLabels:
# - confirmed
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: >
Closing as stale.
+4 -11
View File
@@ -8,14 +8,13 @@
.cproject
.DS_Store
.gdbinit
.gdb_history
.project
.settings
.swp
.~lock.*
Testing/
Packages/*
s3deploy-branch/
s3deploy-archive/
build/*
build_*/
core
@@ -33,18 +32,11 @@ tags
.pydevproject
.ropeproject
*.orig
src/modules/uORB/topics/*
src/platforms/nuttx/px4_messages/*
src/platforms/ros/px4_messages/*
Firmware.zip
*.generated.h
.vagrant
*.pretty
xcode
src/platforms/posix/px4_messages/
src/platforms/posix-arm/px4_messages/
src/platforms/qurt/px4_messages/
ROMFS/*/*/rc.autostart
rootfs/
*.autosave
CMakeLists.txt.user
@@ -60,8 +52,6 @@ GTAGS
.idea
cmake-build-*/
.vscode
posix-configs/SITL/init/test/*_generated
/airframes.md
@@ -69,5 +59,8 @@ posix-configs/SITL/init/test/*_generated
/parameters.md
/parameters.xml
/modules
/msg/ros/*.msg
*.gcov
.coverage
.coverage.*
+18 -18
View File
@@ -2,18 +2,18 @@
path = mavlink/include/mavlink/v2.0
url = https://github.com/mavlink/c_library_v2.git
branch = master
[submodule "src/modules/uavcan/libuavcan"]
path = src/modules/uavcan/libuavcan
url = https://github.com/UAVCAN/libuavcan.git
branch = master
[submodule "src/drivers/uavcan/libuavcan"]
path = src/drivers/uavcan/libuavcan
url = https://github.com/PX4/uavcan.git
branch = px4
[submodule "msg/tools/genmsg"]
path = msg/tools/genmsg
url = https://github.com/ros/genmsg.git
branch = indigo-devel
url = https://github.com/PX4/genmsg.git
branch = px4
[submodule "msg/tools/gencpp"]
path = msg/tools/gencpp
url = https://github.com/ros/gencpp.git
branch = indigo-devel
url = https://github.com/PX4/gencpp.git
branch = px4
[submodule "Tools/jMAVSim"]
path = Tools/jMAVSim
url = https://github.com/PX4/jMAVSim.git
@@ -34,26 +34,26 @@
path = src/lib/ecl
url = https://github.com/PX4/ecl.git
branch = master
[submodule "cmake/cmake_hexagon"]
path = cmake/cmake_hexagon
url = https://github.com/ATLFlight/cmake_hexagon.git
branch = master
[submodule "boards/atlflight/cmake_hexagon"]
path = boards/atlflight/cmake_hexagon
url = https://github.com/PX4/cmake_hexagon.git
branch = px4
[submodule "src/drivers/gps/devices"]
path = src/drivers/gps/devices
url = https://github.com/PX4/GpsDrivers.git
branch = master
[submodule "src/modules/micrortps_bridge/micro-CDR"]
path = src/modules/micrortps_bridge/micro-CDR
url = https://github.com/eProsima/micro-CDR.git
branch = master
url = https://github.com/PX4/micro-CDR.git
branch = px4
[submodule "platforms/nuttx/NuttX/nuttx"]
path = platforms/nuttx/NuttX/nuttx
url = https://github.com/PX4-NuttX/nuttx.git
branch = px4_firmware_nuttx-7.22+
url = https://github.com/PX4/NuttX.git
branch = px4_firmware_nuttx-7.28+
[submodule "platforms/nuttx/NuttX/apps"]
path = platforms/nuttx/NuttX/apps
url = https://github.com/PX4-NuttX/apps.git
branch = px4_firmware_nuttx-7.22+
url = https://github.com/PX4/NuttX-apps.git
branch = px4_firmware_nuttx-7.28+
[submodule "cmake/configs/uavcan_board_ident"]
path = cmake/configs/uavcan_board_ident
url = https://github.com/PX4/uavcan_board_ident.git
+11 -40
View File
@@ -1,55 +1,26 @@
# Build and autotest script for PX4 Firmware
# http://travis-ci.org
sudo: required
services:
- docker
language: cpp
git:
depth: 2000
depth: 100
submodules: false
env:
global:
# COVERITY_SCAN_TOKEN
- secure: "Q4IAcmo1r5cr/UvhcixQa6QN5e5eTcP7FeidzEbX2+BA38yo2BH5O9YQCvZe2AI1Na8ZCjVx3H2luGgDwOKgzAIAjXjZ2KbmXYc6Ns/j/BXScY05dCCzYEhXKD98NZxIKH9lLN9pYDGRA8pChGRJnVlFOr1JHHHnB801+osHy7M="
# AWS KEY: $PX4_AWS_KEY
- secure: "XknnZHWBbpHbN4f3fuAVwUztdLIu8ej4keC3aQSDofo3uw8AFEzojfsQsN9u77ShWSIV4iYJWh9C9ALkCx7TocJ+xYjiboo10YhM9lH/8u+EXjYWG6GHS8ua0wkir+cViSxoLNaMtmcb/rPTicJecAGANxLsIHyBAgTL3fkbLSA="
# AWS SECRET: $PX4_AWS_SECRET
- secure: "h6oajlW68dWIr+wZhO58Dv6e68dZHrBLVA6lPXZmheFQBW6Xam1HuLGA0LOW6cL9TnrAsOZ8g4goB58eMQnMEijFZKi3mhRwZhd/Xjq/ZGJOWBUrLoQHZUw2dQk5ja5vmUlKEoQnFZjDuMjx8KfX5ZMNy8A3yssWZtJYHD8c+bk="
matrix:
fast_finish: true
include:
- env: BUILD_TARGET=coverity_scan
dist: trusty
- os: linux
dist: xenial
if: branch = coverity_scan
allow_failures:
- env: BUILD_TARGET=tests_coverage
cache:
ccache: true
before_install:
# install dependencies for the coverity build (target and branch), otherwise exit early
- if [[ "${TRAVIS_BRANCH}" = "coverity_scan" ]]; then
sudo pip install empy jinja2 numpy toml;
echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-;
fi
# use git:// to fetch instead of https://
- git config --global url."git://".insteadOf https://
- echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
install:
- export PATH=$HOME/.local/bin:$PATH
- pip install --user --upgrade pip
- pip install --user -r Tools/setup/requirements.txt
script:
- ./Tools/docker_run.sh make ${BUILD_TARGET}
after_success:
# upload code coverage
- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
[ "${BUILD_TARGET}" = "tests_coverage" ] && bash <(curl -s https://codecov.io/bash) -F unittests;
fi
- make
addons:
coverity_scan:
@@ -58,5 +29,5 @@ addons:
description: "Build submitted via Travis CI"
notification_email: ci@px4.io
build_command_prepend: "make distclean"
build_command: "make posix_sitl_default"
build_command: "make px4_sitl_default"
branch_pattern: coverity_scan
+6
View File
@@ -0,0 +1,6 @@
.cortex-debug.peripherals.state.json
.cortex-debug.registers.state.json
compile_commands.json
# C/C++ extension does some local caching in this folder
ipch/
+26
View File
@@ -0,0 +1,26 @@
{
"configurations": [
{
"name": "Linux",
"intelliSenseMode": "gcc-x64",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"browse": {
"path": [
"${workspaceFolder}/src/",
"${workspaceFolder}/src/lib/",
"${workspaceFolder}/src/lib/matrix",
"${workspaceFolder}/src/platforms",
"${workspaceFolder}/platforms/",
"."
],
"limitSymbolsToIncludedHeaders": true
},
"compileCommands": "${workspaceFolder}/.vscode/compile_commands.json",
"configurationProvider": "vector-of-bool.cmake-tools"
}
],
"version": 4
}
+5
View File
@@ -0,0 +1,5 @@
[
{
"name": "PX4 detect"
}
]
+63
View File
@@ -0,0 +1,63 @@
CONFIG:
default: px4_sitl_default
choices:
px4_sitl_default:
short: px4_sitl
buildType: RelWithDebInfo
settings:
CONFIG: px4_sitl_default
px4_sitl_default_Debug:
short: px4_sitl (Debug)
buildType: Debug
settings:
CONFIG: px4_sitl_default
px4_sitl_default_ASan:
short: px4_sitl (Address Sanitizer)
buildType: AddressSanitizer
settings:
CONFIG: px4_sitl_default
px4_fmu-v2_default:
short: px4_fmu-v2
buildType: MinSizeRel
settings:
CONFIG: px4_fmu-v2_default
px4_fmu-v3_default:
short: px4_fmu-v3
buildType: MinSizeRel
settings:
CONFIG: px4_fmu-v3_default
px4_fmu-v4_default:
short: px4_fmu-v4
buildType: MinSizeRel
settings:
CONFIG: px4_fmu-v4_default
px4_fmu-v4pro_default:
short: px4_fmu-v4pro
buildType: MinSizeRel
settings:
CONFIG: px4_fmu-v4pro_default
px4_fmu-v5_default:
short: px4_fmu-v5
buildType: MinSizeRel
settings:
CONFIG: px4_fmu-v5_default
airmind_mindpx-v2_default:
short: airmind_mindpx-v2
buildType: MinSizeRel
settings:
CONFIG: airmind_mindpx-v2_default
av_x-v1_default:
short: av-x
buildType: MinSizeRel
settings:
CONFIG: av_x-v1_default
intel_aerofc-v1_default:
short: intel_aerofc-v1
buildType: MinSizeRel
settings:
CONFIG: intel_aerofc-v1_default
nxp_fmuk66-v3_default:
short: nxp_fmuk66-v3
buildType: MinSizeRel
settings:
CONFIG: nxp_fmuk66-v3_default
+18
View File
@@ -0,0 +1,18 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"ajshort.ros",
"chiehyu.vscode-astyle",
"dan-c-underwood.arm",
"github.vscode-pull-request-github",
"marus25.cortex-debug",
"ms-python.python",
"ms-vscode.cpptools",
"peterjausovec.vscode-docker",
"twxs.cmake",
"uavcan.dsdl",
"vector-of-bool.cmake-tools",
"wholroyd.jinja"
]
}
+194
View File
@@ -0,0 +1,194 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "SITL shell",
"type": "cppdbg",
"request": "launch",
"program": "${command:cmake.launchTargetPath}",
"args": [
"${workspaceFolder}/ROMFS/px4fmu_common",
"-s",
"etc/init.d-posix/rcS",
"-t",
"${workspaceFolder}/test_data"
],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/build/px4_sitl_default/tmp",
"environment": [
{
"name": "PX4_SIM_MODEL",
"value": "shell"
}
],
"externalConsole": false,
"linux": {
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "PX4 ignore wq signals",
"text": "handle SIGCONT nostop noprint nopass",
"ignoreFailures": true
}
]
},
"osx": {
"MIMode": "lldb",
"setupCommands": [
{
"text": "pro hand -p true -s false -n false SIGCONT",
}
]
}
},
{
"name": "SITL jmavsim iris",
"type": "cppdbg",
"request": "launch",
"program": "${command:cmake.launchTargetPath}",
"args": [
"${workspaceFolder}/ROMFS/px4fmu_common",
"-s",
"etc/init.d-posix/rcS",
"-t",
"${workspaceFolder}/test_data"
],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/build/px4_sitl_default/tmp",
"environment": [
{
"name": "PX4_SIM_MODEL",
"value": "iris"
}
],
"externalConsole": false,
"preLaunchTask": "jmavsim",
"postDebugTask": "jmavsim kill",
"linux": {
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "PX4 ignore wq signals",
"text": "handle SIGCONT nostop noprint nopass",
"ignoreFailures": true
}
]
},
"osx": {
"MIMode": "lldb",
"setupCommands": [
{
"text": "pro hand -p true -s false -n false SIGCONT",
}
]
}
},
{
"name": "SITL gazebo iris",
"type": "cppdbg",
"request": "launch",
"program": "${command:cmake.launchTargetPath}",
"args": [
"${workspaceFolder}/ROMFS/px4fmu_common",
"-s",
"etc/init.d-posix/rcS",
"-t",
"${workspaceFolder}/test_data"
],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/build/px4_sitl_default/tmp",
"environment": [
{
"name": "PX4_SIM_MODEL",
"value": "iris"
}
],
"externalConsole": false,
"preLaunchTask": "gazebo iris",
"postDebugTask": "gazebo kill",
"linux": {
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "PX4 ignore wq signals",
"text": "handle SIGCONT nostop noprint nopass",
"ignoreFailures": true
}
]
},
"osx": {
"MIMode": "lldb",
"setupCommands": [
{
"text": "pro hand -p true -s false -n false SIGCONT",
}
]
}
},
{
"name": "px4_fmu-v2 (jlink) ",
"executable": "${command:cmake.launchTargetPath}",
"request": "launch",
"type": "cortex-debug",
"servertype": "jlink",
"device": "STM32F427VI",
"svdFile": "${workspaceRoot}/../cmsis-svd/data/STMicro/STM32F427.svd",
"interface": "swd"
},
{
"name": "px4_fmu-v3 (jlink)",
"executable": "${command:cmake.launchTargetPath}",
"request": "launch",
"type": "cortex-debug",
"servertype": "jlink",
"device": "STM32F427VI",
"svdFile": "${workspaceRoot}/../cmsis-svd/data/STMicro/STM32F427.svd",
"interface": "swd"
},
{
"name": "px4_fmu-v4 (jlink)",
"executable": "${command:cmake.launchTargetPath}",
"request": "launch",
"type": "cortex-debug",
"servertype": "jlink",
"device": "STM32F427VI",
"svdFile": "${workspaceRoot}/../cmsis-svd/data/STMicro/STM32F427.svd",
"interface": "swd"
},
{
"name": "px4_fmu-v4pro (jlink)",
"executable": "${command:cmake.launchTargetPath}",
"request": "launch",
"type": "cortex-debug",
"servertype": "jlink",
"device": "STM32F469VI",
"svdFile": "${workspaceRoot}/../cmsis-svd/data/STMicro/STM32F469.svd",
"interface": "swd"
},
{
"name": "px4_fmu-v5 (jlink)",
"executable": "${command:cmake.launchTargetPath}",
"request": "launch",
"type": "cortex-debug",
"servertype": "jlink",
"device": "STM32F765VI",
"svdFile": "${workspaceRoot}/../cmsis-svd/data/STMicro/STM32F7x5.svd",
"interface": "swd"
},
]
}
+91
View File
@@ -0,0 +1,91 @@
{
"astyle.astylerc": "${workspaceFolder}/Tools/astyle/astylerc",
"astyle.c.enable": true,
"astyle.cpp.enable": true,
"breadcrumbs.enabled": true,
"cmake.autoRestartBuild": true,
"cmake.buildDirectory": "${workspaceFolder}/build/${variant:CONFIG}",
"cmake.buildBeforeRun": true,
"cmake.configureOnOpen": true,
"cmake.copyCompileCommands": "${workspaceFolder}/.vscode/compile_commands.json",
"cmake.debugConfig": {
"name": "SITL shell (gdb)",
"type": "cppdbg",
"request": "launch",
"program": "${command:cmake.launchTargetPath}",
"args": [
"${workspaceFolder}/ROMFS/px4fmu_common",
"-s",
"etc/init.d-posix/rcS",
"-t",
"${workspaceFolder}/test_data"
],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/build/px4_sitl_default/tmp",
"environment": [
{
"name": "PX4_SIM_MODEL",
"value": "shell"
}
],
"externalConsole": false,
"linux": {
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "PX4 ignore wq signals",
"text": "handle SIGCONT nostop noprint nopass",
"ignoreFailures": true
}
]
},
"osx": {
"MIMode": "lldb",
"setupCommands": [
{
"text": "pro hand -p true -s false -n false SIGCONT",
}
]
}
},
"C_Cpp.clang_format_fallbackStyle": "none",
"C_Cpp.configurationWarnings": "Disabled",
"C_Cpp.default.cppStandard": "c++11",
"C_Cpp.default.cStandard": "c99",
"C_Cpp.default.intelliSenseMode": "gcc-x64",
"C_Cpp.errorSquiggles": "Disabled",
"C_Cpp.formatting": "Disabled",
"C_Cpp.intelliSenseEngine": "Default",
"C_Cpp.intelliSenseEngineFallback": "Disabled",
"debug.toolBarLocation": "docked",
"editor.insertSpaces": false,
"editor.minimap.maxColumn": 120,
"editor.minimap.renderCharacters": false,
"editor.minimap.showSlider": "always",
"editor.smoothScrolling": true,
"editor.suggest.localityBonus": true,
"editor.tabSize": 8,
"editor.wordWrapColumn": 120,
"explorer.openEditors.visible": 0,
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
"git.detectSubmodulesLimit": 20,
"files.associations": {
"*.jinja": "jinja"
},
"search.exclude": {
"build/**": true
},
"search.showLineNumbers": true,
"window.title": "${dirty} ${activeEditorMedium}${separator}${rootName}",
"workbench.editor.enablePreview": false,
"workbench.editor.enablePreviewFromQuickOpen": false,
"workbench.editor.highlightModifiedTabs": true,
"workbench.settings.enableNaturalLanguageSearch": false,
"workbench.statusBar.feedback.visible": false
}
+97
View File
@@ -0,0 +1,97 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "jmavsim",
"type": "shell",
"command": "Tools/jmavsim_run.sh",
"isBackground": true,
"args": [
"-r",
"500"
],
"options": {
"cwd": "${workspaceRoot}"
},
"presentation": {
"reveal": "always",
"panel": "dedicated"
},
"problemMatcher": [
{
"pattern": [
{
"regexp": ".",
"file": 1,
"location": 2,
"message": 3
}
],
"background": {
"activeOnStart": true,
"beginsPattern": ".",
"endsPattern": ".",
}
}
]
},
{
"label": "jmavsim kill",
"type": "shell",
"command": "kill $(ps aux | grep jmavsim | grep -v 'grep' | awk '{print $2}')",
"problemMatcher": []
},
{
"label": "gazebo build",
"type": "shell",
"command": "make px4_sitl_default sitl_gazebo",
"options": {
"cwd": "${workspaceRoot}"
},
"problemMatcher": []
},
{
"label": "gazebo iris",
"type": "shell",
"dependsOn": "gazebo build",
"options": {
"cwd": "${workspaceRoot}",
"env": {
"GAZEBO_PLUGIN_PATH": "${workspaceRoot}/build/px4_sitl_default/build_gazebo",
"GAZEBO_MODEL_PATH": "${workspaceRoot}/Tools/sitl_gazebo/models"
}
},
"command": "gzserver --verbose ${workspaceRoot}/Tools/sitl_gazebo/worlds/iris.world",
"isBackground": true,
"presentation": {
"reveal": "always",
"panel": "dedicated"
},
"problemMatcher": [
{
"pattern": [
{
"regexp": ".",
"file": 1,
"location": 2,
"message": 3
}
],
"background": {
"activeOnStart": true,
"beginsPattern": ".",
"endsPattern": ".",
}
}
]
},
{
"label": "gazebo kill",
"type": "shell",
"command": "killall gzserver",
"problemMatcher": []
},
]
}
+1 -1
View File
@@ -61,7 +61,7 @@ flags = [
'c++',
'-undef', # get rid of standard definitions to allow us to include arm math header
'-I', os.path.join(os.path.expanduser("~"),'gcc-arm-none-eabi-4_7-2013q3/arm-none-eabi/include'),
'-I', 'Build/px4io-v2_default.build/nuttx-export/include/',
'-I', 'Build/px4_io-v2_default.build/nuttx-export/include/',
'-I', './NuttX/nuttx/arch/arm/include',
'-include', './src/include/visibility.h',
'-I', './src',
+253 -126
View File
@@ -1,6 +1,6 @@
############################################################################
#
# Copyright (c) 2017 PX4 Development Team. All rights reserved.
# Copyright (c) 2017 - 2019 PX4 Development Team. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -40,7 +40,7 @@
# * Common functions should be included in px_base.cmake.
#
# * OS/ board specific fucntions should be include in
# px_impl_${OS}.cmake or px4_impl_${OS}_${BOARD}.cmake.
# px_impl_${PX4_PLATFORM}.cmake or px4_impl_${PX4_PLATFORM}_${PX4_BOARD}.cmake.
#
# Formatting
# ---------------------------------------------------------------------------
@@ -92,9 +92,9 @@
# ---------------------------------------------------------------------------
#
# * If referencing a string variable, don't put it in quotes.
# Don't do "${OS}" STREQUAL "posix",
# instead type ${OS} STREQUAL "posix". This will throw an
# error when ${OS} is not defined instead of silently
# Don't do "${PX4_PLATFORM}" STREQUAL "posix",
# instead type ${PX4_PLATFORM} STREQUAL "posix". This will throw an
# error when ${PX4_PLATFORM} is not defined instead of silently
# evaluating to false.
#
#=============================================================================
@@ -104,16 +104,16 @@ cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
set(PX4_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
set(PX4_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
list(APPEND CMAKE_MODULE_PATH "${PX4_SOURCE_DIR}/cmake")
list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/cmake)
#=============================================================================
# git
#
include(common/px4_git)
include(px4_git)
execute_process(
COMMAND git describe --always --tags
OUTPUT_VARIABLE git_tag
OUTPUT_VARIABLE PX4_GIT_TAG
OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
)
@@ -132,28 +132,116 @@ define_property(GLOBAL PROPERTY PX4_MODULE_PATHS
# configuration
#
set(CONFIG "posix_sitl_default" CACHE STRING "desired configuration")
set(CONFIG "px4_sitl_default" CACHE STRING "desired configuration")
string(REPLACE "_" ";" config_args ${CONFIG})
list(GET config_args 0 OS)
list(GET config_args 1 BOARD)
list(GET config_args 2 LABEL)
include(px4_add_module)
set(config_module_list)
set(config_df_driver_list)
set(THREADS "4" CACHE STRING "number of threads to use for external build processes")
set(DEBUG_PORT "/dev/ttyACM0" CACHE STRING "debugging port")
# find PX4 config
# look for in tree board config that matches CONFIG input
if(NOT PX4_CONFIG_FILE)
file(GLOB_RECURSE board_configs
RELATIVE "${PX4_SOURCE_DIR}/boards"
"boards/*.cmake"
)
set(PX4_CONFIGS ${board_configs} CACHE STRING "PX4 board configs" FORCE)
foreach(filename ${board_configs})
# parse input CONFIG into components to match with existing in tree configs
# the platform prefix (eg nuttx_) is historical, and removed if present
string(REPLACE ".cmake" "" filename_stripped ${filename})
string(REPLACE "/" ";" config ${filename_stripped})
list(LENGTH config config_len)
if(${config_len} EQUAL 3)
list(GET config 0 vendor)
list(GET config 1 model)
list(GET config 2 label)
set(board "${vendor}${model}")
# <VENDOR>_<MODEL>_<LABEL> (eg px4_fmu-v2_default)
# <VENDOR>_<MODEL>_default (eg px4_fmu-v2) # allow skipping label if "default"
if ((${CONFIG} MATCHES "${vendor}_${model}_${label}") OR # match full vendor, model, label
((${label} STREQUAL "default") AND (${CONFIG} STREQUAL "${vendor}_${model}")) # default label can be omitted
)
set(PX4_CONFIG_FILE "${PX4_SOURCE_DIR}/boards/${filename}" CACHE FILEPATH "path to PX4 CONFIG file" FORCE)
break()
endif()
# <BOARD>_<LABEL> (eg px4_fmu-v2_default)
# <BOARD>_default (eg px4_fmu-v2) # allow skipping label if "default"
if ((${CONFIG} MATCHES "${board}_${label}") OR # match full board, label
((${label} STREQUAL "default") AND (${CONFIG} STREQUAL "${board}")) # default label can be omitted
)
set(PX4_CONFIG_FILE "${PX4_SOURCE_DIR}/boards/${filename}" CACHE FILEPATH "path to PX4 CONFIG file" FORCE)
break()
endif()
# LEGACY form
# <OS>_<BOARD>_<LABEL> (eg nuttx_px4_fmu-v2_default)
string(REGEX REPLACE "^nuttx_|^posix_|^qurt_" "" config_no_os ${CONFIG}) # ignore OS prefix
if ((${config_no_os} MATCHES "${board}_${label}"))
set(PX4_CONFIG_FILE "${PX4_SOURCE_DIR}/boards/${filename}" CACHE FILEPATH "path to PX4 CONFIG file" FORCE)
break()
endif()
# LEGACY form special case to ease board layout transition (2018-11-18)
# match board with model and label only: eg sitl_default -> px4_sitl_default
if ((${config_no_os} MATCHES "${model}_${label}"))
set(PX4_CONFIG_FILE "${PX4_SOURCE_DIR}/boards/${filename}" CACHE FILEPATH "path to PX4 CONFIG file" FORCE)
break()
endif()
endif()
endforeach()
endif()
if(NOT PX4_CONFIG_FILE)
message(FATAL_ERROR "PX4 config file not set, try one of ${PX4_CONFIGS}")
endif()
message(STATUS "PX4 config file: ${PX4_CONFIG_FILE}")
include(px4_add_board)
include(${PX4_CONFIG_FILE})
message(STATUS "PX4 config: ${PX4_CONFIG}")
message(STATUS "PX4 platform: ${PX4_PLATFORM}")
if (ENABLE_LOCKSTEP_SCHEDULER)
add_definitions(-DENABLE_LOCKSTEP_SCHEDULER)
message(STATUS "PX4 lockstep: enabled")
else()
message(STATUS "PX4 lockstep: disabled")
endif()
# external modules
set(EXTERNAL_MODULES_LOCATION "" CACHE STRING "External modules source location")
if (NOT EXTERNAL_MODULES_LOCATION STREQUAL "")
get_filename_component(EXTERNAL_MODULES_LOCATION "${EXTERNAL_MODULES_LOCATION}" ABSOLUTE)
endif()
include(platforms/${OS}/cmake/px4_impl_os.cmake)
include(configs/${CONFIG})
list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/platforms/${OS}/cmake)
set_property(GLOBAL PROPERTY PX4_MODULE_CONFIG_FILES)
include(platforms/${PX4_PLATFORM}/cmake/px4_impl_os.cmake)
list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/platforms/${PX4_PLATFORM}/cmake)
if(EXISTS "${PX4_SOURCE_DIR}/platforms/${PX4_PLATFORM}/cmake/init.cmake")
include(init)
endif()
# CMake build type (Debug Release RelWithDebInfo MinSizeRel Coverage)
if (NOT CMAKE_BUILD_TYPE)
if (${OS} STREQUAL "nuttx")
if (${PX4_PLATFORM} STREQUAL "nuttx")
set(PX4_BUILD_TYPE "MinSizeRel")
else()
set(PX4_BUILD_TYPE "RelWithDebInfo")
@@ -162,13 +250,12 @@ if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE ${PX4_BUILD_TYPE} CACHE STRING "Build type" FORCE)
endif()
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug;Release;RelWithDebInfo;MinSizeRel;Coverage")
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug;Release;RelWithDebInfo;MinSizeRel;Coverage;AddressSanitizer;UndefinedBehaviorSanitizer")
#=============================================================================
message(STATUS "PX4 VERSION: ${git_tag}")
message(STATUS "CONFIG: ${CONFIG}")
message(STATUS "Build Type: ${CMAKE_BUILD_TYPE}")
message(STATUS "PX4 version: ${PX4_GIT_TAG}")
message(STATUS "cmake build type: ${CMAKE_BUILD_TYPE}")
#=============================================================================
# project definition
@@ -182,17 +269,29 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PX4_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PX4_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PX4_BINARY_DIR})
# For the catkin build process, unset build of dynamically-linked binaries
# and do not change CMAKE_RUNTIME_OUTPUT_DIRECTORY
if (NOT CATKIN_DEVEL_PREFIX)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PX4_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PX4_BINARY_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PX4_BINARY_DIR})
else()
SET(BUILD_SHARED_LIBS OFF)
endif()
#=============================================================================
# Setup install paths
if (${OS} STREQUAL "posix")
if (${PX4_PLATFORM} STREQUAL "posix")
include(common/coverage)
include(common/sanitizers)
# This makes it possible to dynamically load code which depends on symbols
# inside the px4 executable.
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_ENABLE_EXPORTS ON)
include(coverage)
include(sanitizers)
# Define GNU standard installation directories
include(GNUInstallDirs)
@@ -200,38 +299,26 @@ if (${OS} STREQUAL "posix")
if (NOT CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "Install path prefix" FORCE)
endif()
# cmake testing only on posix
enable_testing()
include(CTest)
endif()
#=============================================================================
# require px4 module interface
set(px4_required_interface
px4_os_prebuild_targets
px4_os_add_flags
)
foreach(cmd ${px4_required_interface})
if (NOT COMMAND ${cmd})
message(FATAL_ERROR "${CONFIG} must implement ${cmd}")
endif()
endforeach()
set(px4_required_config config_module_list)
foreach(conf ${px4_required_config})
if (NOT DEFINED ${conf})
message(FATAL_ERROR "cmake/${CONFIG} must define ${conf}")
endif()
endforeach()
#=============================================================================
# ccache
#
option(CCACHE "Use ccache if available" ON)
find_program(CCACHE_PROGRAM ccache)
if (CCACHE AND CCACHE_PROGRAM AND NOT DEFINED ENV{CCACHE_DISABLE})
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
get_filename_component(ccache_real_path ${CCACHE_PROGRAM} REALPATH)
get_filename_component(cxx_real_path ${CMAKE_CXX_COMPILER} REALPATH)
get_filename_component(cxx_abs_path ${CMAKE_CXX_COMPILER} ABSOLUTE)
if ("${ccache_real_path}" STREQUAL "${cxx_real_path}")
message(STATUS "ccache enabled via symlink (${cxx_abs_path} -> ${cxx_real_path})")
else()
message(STATUS "ccache enabled (export CCACHE_DISABLE=1 to disable)")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
endif()
endif()
#=============================================================================
@@ -250,72 +337,37 @@ if (CATKIN_DEVEL_PREFIX)
endif()
find_package(PythonInterp REQUIRED)
px4_find_python_module(jinja2 REQUIRED)
#=============================================================================
# check required toolchain variables
#
set(required_variables CMAKE_C_COMPILER_ID CMAKE_CXX_COMPILER_ID)
foreach(var ${required_variables})
if (NOT ${var})
message(FATAL_ERROR "Toolchain/config must define ${var}")
endif()
endforeach()
# print full c compiler version
execute_process(COMMAND ${CMAKE_C_COMPILER} --version
OUTPUT_VARIABLE c_compiler_version
OUTPUT_STRIP_TRAILING_WHITESPACE
)
STRING(REGEX MATCH "[^\n]*" c_compiler_version_short ${c_compiler_version})
message(STATUS "C compiler: ${c_compiler_version_short}")
# print full c++ compiler version
execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version
OUTPUT_VARIABLE cxx_compiler_version
OUTPUT_STRIP_TRAILING_WHITESPACE
)
STRING(REGEX MATCH "[^\n]*" cxx_compiler_version_short ${cxx_compiler_version})
message(STATUS "C++ compiler: ${cxx_compiler_version_short}")
#=============================================================================
# external libraries
#
px4_os_prebuild_targets(OUT prebuild_targets
BOARD ${BOARD}
THREADS ${THREADS})
option(PYTHON_COVERAGE "Python code coverage" OFF)
if(PYTHON_COVERAGE)
message(STATUS "python coverage enabled")
set(PYTHON_EXECUTABLE coverage run -p)
else()
# run normally (broken under coveragepy)
px4_find_python_module(jinja2 REQUIRED)
endif()
#=============================================================================
# build flags
#
px4_os_add_flags(
BOARD ${BOARD}
C_FLAGS c_flags
CXX_FLAGS cxx_flags
OPTIMIZATION_FLAGS optimization_flags
EXE_LINKER_FLAGS exe_linker_flags
INCLUDE_DIRS include_dirs
LINK_DIRS link_dirs
DEFINITIONS definitions)
px4_join(OUT CMAKE_EXE_LINKER_FLAGS LIST "${CMAKE_EXE_LINKER_FLAGS};${exe_linker_flags}" GLUE " ")
px4_join(OUT CMAKE_C_FLAGS LIST "${CMAKE_C_FLAGS};${c_flags};${optimization_flags}" GLUE " ")
px4_join(OUT CMAKE_CXX_FLAGS LIST "${CMAKE_CXX_FLAGS};${cxx_flags};${optimization_flags}" GLUE " ")
include(px4_add_common_flags)
px4_add_common_flags()
px4_os_add_flags()
#=============================================================================
# message, and airframe generation
#
include(common/px4_metadata)
include(px4_metadata)
add_subdirectory(msg EXCLUDE_FROM_ALL)
px4_generate_airframes_xml(BOARD ${BOARD})
px4_generate_airframes_xml(BOARD ${PX4_BOARD})
#=============================================================================
# DriverFramework
#
px4_add_git_submodule(TARGET git_driverframework PATH "src/lib/DriverFramework")
set(OS ${PX4_PLATFORM})
add_subdirectory(src/lib/DriverFramework/framework)
# List the DriverFramework drivers
@@ -357,16 +409,56 @@ if (NOT EXTERNAL_MODULES_LOCATION STREQUAL "")
endforeach()
endif()
#=============================================================================
# Testing - Automatic unit and integration testing with CTest
#
# optionally enable cmake testing (supported only on posix)
option(CMAKE_TESTING "Configure test targets" OFF)
if (${PX4_CONFIG} STREQUAL "px4_sitl_test")
set(CMAKE_TESTING ON)
endif()
if(CMAKE_TESTING)
include(CTest) # sets BUILD_TESTING variable
endif()
# enable test filtering to run only specific tests with the ctest -R regex functionality
set(TESTFILTER "" CACHE STRING "Filter string for ctest to selectively only run specific tests (ctest -R)")
# if testing is enabled download and configure gtest
list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/cmake/gtest/)
include(px4_add_gtest)
if(BUILD_TESTING)
include(gtest)
endif()
add_custom_target(test_results
COMMAND GTEST_COLOR=1 ${CMAKE_CTEST_COMMAND} --output-on-failure -T Test -R ${TESTFILTER} USES_TERMINAL
DEPENDS
px4
examples__dyn_hello
test_mixer_multirotor
USES_TERMINAL
COMMENT "Running tests"
WORKING_DIRECTORY ${PX4_BINARY_DIR})
set_target_properties(test_results PROPERTIES EXCLUDE_FROM_ALL TRUE)
#=============================================================================
# subdirectories
#
add_library(parameters_interface INTERFACE)
include(px4_add_library)
add_subdirectory(src/lib EXCLUDE_FROM_ALL)
add_subdirectory(src/platforms/common EXCLUDE_FROM_ALL)
add_subdirectory(src/modules/systemlib EXCLUDE_FROM_ALL) # TODO: split into libraries in platform layer
add_subdirectory(src/platforms EXCLUDE_FROM_ALL)
add_subdirectory(src/modules/uORB EXCLUDE_FROM_ALL) # TODO: platform layer
add_subdirectory(src/drivers/boards EXCLUDE_FROM_ALL)
if(EXISTS "${PX4_BOARD_DIR}/CMakeLists.txt")
add_subdirectory(${PX4_BOARD_DIR})
endif()
foreach(module ${config_module_list})
add_subdirectory(src/${module})
endforeach()
@@ -376,26 +468,12 @@ add_subdirectory(src/lib/parameters EXCLUDE_FROM_ALL)
target_link_libraries(parameters_interface INTERFACE parameters)
# firmware added last to generate the builtin for included modules
add_subdirectory(platforms/${OS})
#=============================================================================
# generate custom target to print for all executable and module cmake targets
#
if (all_posix_cmake_targets)
list(SORT all_posix_cmake_targets)
px4_join(OUT posix_cmake_target_list LIST ${all_posix_cmake_targets} GLUE "\\n")
add_custom_target(list_cmake_targets
COMMAND sh -c "printf \"${posix_cmake_target_list}\\n\""
COMMENT "List of cmake targets that can be matched by PX4_NO_OPTIMIZATION:"
VERBATIM
)
endif()
add_subdirectory(platforms/${PX4_PLATFORM})
#=============================================================================
# uORB graph generation: add a custom target 'uorb_graph'
#
set(uorb_graph_config ${BOARD})
set(uorb_graph_config ${PX4_BOARD})
set(graph_module_list "")
foreach(module ${config_module_list})
@@ -442,20 +520,69 @@ if (BUILD_DOXYGEN)
endif()
endif()
#=============================================================================
# Metadata - helpers for generating documentation
#
add_custom_target(metadata_airframes
COMMAND ${CMAKE_COMMAND} -E make_directory ${PX4_BINARY_DIR}/docs
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_process_airframes.py
-v -a ${PX4_SOURCE_DIR}/ROMFS/px4fmu_common/init.d
--markdown ${PX4_BINARY_DIR}/docs/airframes.md
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_process_airframes.py
-v -a ${PX4_SOURCE_DIR}/ROMFS/px4fmu_common/init.d
--xml ${PX4_BINARY_DIR}/docs/airframes.xml
COMMENT "Generating full airframe metadata (markdown and xml)"
USES_TERMINAL
)
file(GLOB_RECURSE yaml_config_files ${PX4_SOURCE_DIR}/src/modules/*.yaml
${PX4_SOURCE_DIR}/src/drivers/*.yaml ${PX4_SOURCE_DIR}/src/lib/*.yaml)
add_custom_target(metadata_parameters
COMMAND ${CMAKE_COMMAND} -E make_directory ${PX4_BINARY_DIR}/docs
COMMAND ${PYTHON_EXECUTABLE}
${PX4_SOURCE_DIR}/Tools/serial/generate_config.py --all-ports --params-file ${PX4_SOURCE_DIR}/src/generated_serial_params.c --config-files ${yaml_config_files}
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/src/lib/parameters/px_process_params.py
--src-path `find ${PX4_SOURCE_DIR}/src -maxdepth 4 -type d`
--inject-xml ${PX4_SOURCE_DIR}/src/lib/parameters/parameters_injected.xml
--markdown ${PX4_BINARY_DIR}/docs/parameters.md
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/src/lib/parameters/px_process_params.py
--src-path `find ${PX4_SOURCE_DIR}/src -maxdepth 4 -type d`
--inject-xml ${PX4_SOURCE_DIR}/src/lib/parameters/parameters_injected.xml
--xml ${PX4_BINARY_DIR}/docs/parameters.xml
COMMENT "Generating full parameter metadata (markdown and xml)"
USES_TERMINAL
)
add_custom_target(metadata_module_documentation
COMMAND ${CMAKE_COMMAND} -E make_directory ${PX4_BINARY_DIR}/docs
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_process_module_doc.py -v --src-path ${PX4_SOURCE_DIR}/src
--markdown ${PX4_BINARY_DIR}/docs/modules
COMMENT "Generating module documentation"
USES_TERMINAL
)
add_custom_target(all_metadata
DEPENDS
metadata_airframes
metadata_parameters
metadata_module_documentation
)
#=============================================================================
# packaging
#
# Important to having packaging at end of cmake file.
#
set(CPACK_PACKAGE_NAME ${PROJECT_NAME}-${CONFIG})
set(CPACK_PACKAGE_VERSION ${git_version})
set(CPACK_PACKAGE_NAME ${PROJECT_NAME}-${PX4_CONFIG})
set(CPACK_PACKAGE_VERSION ${PX4_GIT_TAG})
set(CPACK_PACKAGE_CONTACT ${package-contact})
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF) # TODO: review packaging for linux boards
set(CPACK_DEBIAN_PACKAGE_SECTION "devel")
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "The PX4 Pro autopilot.")
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${CONFIG}-${git_tag}")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${git_version}")
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PX4_CONFIG}-${PX4_GIT_TAG}")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${PX4_GIT_TAG}")
set(CPACK_SOURCE_GENERATOR "ZIP;TBZ2")
set(CPACK_PACKAGING_INSTALL_PREFIX "")
set(CPACK_SET_DESTDIR "OFF")
@@ -470,4 +597,4 @@ else()
set(CPACK_GENERATOR "ZIP")
endif()
include(CPack)
include(CPack)
+1 -1
View File
@@ -16,7 +16,7 @@ git checkout -b mydescriptivebranchname
### Edit and build the code
The [developer guide](http://dev.px4.io/) explains how to set up the development environment on Mac OS, Linux or Windows. Please take note of our [coding style](http://px4.io/dev/code_style) when editing files.
The [developer guide](http://dev.px4.io/) explains how to set up the development environment on Mac OS, Linux or Windows. Please take note of our [coding style](https://dev.px4.io/master/en/contribute/code.html) when editing files.
### Commit your changes
+2448 -121
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -62,7 +62,7 @@
"name": "PX4: make and upload",
"working_dir": "${project_path}",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"cmd": ["make upload px4fmu-v2_default -j8"],
"cmd": ["make upload px4_fmu-v2_default -j8"],
"shell": true
},
{
Vendored
+518 -631
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,6 +1,6 @@
BSD 3-Clause License
Copyright (c) 2012 - 2018, PX4 Development Team
Copyright (c) 2012 - 2019, PX4 Development Team
All rights reserved.
Redistribution and use in source and binary forms, with or without
+204 -122
View File
@@ -1,6 +1,6 @@
############################################################################
#
# Copyright (c) 2015 - 2017 PX4 Development Team. All rights reserved.
# Copyright (c) 2015 - 2019 PX4 Development Team. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -48,16 +48,19 @@ endif
#
# Example usage:
#
# make px4fmu-v2_default (builds)
# make px4fmu-v2_default upload (builds and uploads)
# make px4fmu-v2_default test (builds and tests)
# make px4_fmu-v2_default (builds)
# make px4_fmu-v2_default upload (builds and uploads)
# make px4_fmu-v2_default test (builds and tests)
#
# This tells cmake to build the nuttx px4fmu-v2 default config in the
# directory build/nuttx_px4fmu-v2_default and then call make
# This tells cmake to build the nuttx px4_fmu-v2 default config in the
# directory build/px4_fmu-v2_default and then call make
# in that directory with the target upload.
# explicity set default build target
all: posix_sitl_default
# explicity set default build target
all: px4_sitl_default
# define a space character to be able to explicitly find it in strings
space := $(subst ,, )
# Parsing
# --------------------------------------------------------------------
@@ -98,7 +101,7 @@ else
PX4_MAKE_ARGS = -j$(j) --no-print-directory
endif
SRC_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
SRC_DIR := $(shell dirname "$(realpath $(lastword $(MAKEFILE_LIST)))")
# check if replay env variable is set & set build dir accordingly
ifdef replay
@@ -114,17 +117,61 @@ endif
ifdef PX4_CMAKE_BUILD_TYPE
CMAKE_ARGS += -DCMAKE_BUILD_TYPE=${PX4_CMAKE_BUILD_TYPE}
else
# Address Sanitizer
ifdef PX4_ASAN
CMAKE_ARGS += -DCMAKE_BUILD_TYPE=AddressSanitizer
endif
# Memory Sanitizer
ifdef PX4_MSAN
CMAKE_ARGS += -DCMAKE_BUILD_TYPE=MemorySanitizer
endif
# Thread Sanitizer
ifdef PX4_TSAN
CMAKE_ARGS += -DCMAKE_BUILD_TYPE=ThreadSanitizer
endif
# Undefined Behavior Sanitizer
ifdef PX4_UBSAN
CMAKE_ARGS += -DCMAKE_BUILD_TYPE=UndefinedBehaviorSanitizer
endif
endif
# Functions
# --------------------------------------------------------------------
# describe how to build a cmake config
define cmake-build
+@$(eval PX4_CONFIG = $(1))
+@$(eval BUILD_DIR = $(SRC_DIR)/build/$(PX4_CONFIG)$(BUILD_DIR_SUFFIX))
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(BUILD_DIR)/Makefile ]; then rm -rf $(BUILD_DIR); fi
+@if [ ! -e $(BUILD_DIR)/CMakeCache.txt ]; then mkdir -p $(BUILD_DIR) && cd $(BUILD_DIR) && cmake $(SRC_DIR) -G"$(PX4_CMAKE_GENERATOR)" $(CMAKE_ARGS) -DCONFIG=$(PX4_CONFIG) || (rm -rf $(BUILD_DIR)); fi
+@$(PX4_MAKE) -C $(BUILD_DIR) $(PX4_MAKE_ARGS) $(ARGS)
@$(eval BUILD_DIR = "$(SRC_DIR)/build/$(1)")
@# check if the desired cmake configuration matches the cache then CMAKE_CACHE_CHECK stays empty
@$(call cmake-cache-check)
@# make sure to start from scratch when switching from GNU Make to Ninja
@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(BUILD_DIR)/Makefile ]; then rm -rf $(BUILD_DIR); fi
@# only excplicitly configure the first build, if cache file already exists the makefile will rerun cmake automatically if necessary
@if [ ! -e $(BUILD_DIR)/CMakeCache.txt ] || [ $(CMAKE_CACHE_CHECK) ]; then \
mkdir -p $(BUILD_DIR) \
&& cd $(BUILD_DIR) \
&& cmake "$(SRC_DIR)" -G"$(PX4_CMAKE_GENERATOR)" $(CMAKE_ARGS) \
|| (rm -rf $(BUILD_DIR)); \
fi
@# run the build for the specified target
@cmake --build $(BUILD_DIR) -- $(PX4_MAKE_ARGS) $(ARGS)
endef
# check if the options we want to build with in CMAKE_ARGS match the ones which are already configured in the cache inside BUILD_DIR
define cmake-cache-check
@# change to build folder which fails if it doesn't exist and CACHED_CMAKE_OPTIONS stays empty
@# fetch all previously configured and cached options from the build folder and transform them into the OPTION=VALUE format without type (e.g. :BOOL)
@$(eval CACHED_CMAKE_OPTIONS = $(shell cd $(BUILD_DIR) 2>/dev/null && cmake -L 2>/dev/null | sed -n 's/\([^[:blank:]]*\):[^[:blank:]]*\(=[^[:blank:]]*\)/\1\2/gp' ))
@# transform the options in CMAKE_ARGS into the OPTION=VALUE format without -D
@$(eval DESIRED_CMAKE_OPTIONS = $(shell echo $(CMAKE_ARGS) | sed -n 's/-D\([^[:blank:]]*=[^[:blank:]]*\)/\1/gp' ))
@# find each currently desired option in the already cached ones making sure the complete configured string value is the same
@$(eval VERIFIED_CMAKE_OPTIONS = $(foreach option,$(DESIRED_CMAKE_OPTIONS),$(strip $(findstring $(option)$(space),$(CACHED_CMAKE_OPTIONS)))))
@# if the complete list of desired options is found in the list of verified options we don't need to reconfigure and CMAKE_CACHE_CHECK stays empty
@$(eval CMAKE_CACHE_CHECK = $(if $(findstring $(DESIRED_CMAKE_OPTIONS),$(VERIFIED_CMAKE_OPTIONS)),,y))
endef
COLOR_BLUE = \033[0;94m
@@ -134,10 +181,8 @@ define colorecho
+@echo -e '${COLOR_BLUE}${1} ${NO_COLOR}'
endef
# Get a list of all config targets cmake/configs/*.cmake
ALL_CONFIG_TARGETS := $(basename $(shell find "$(SRC_DIR)/cmake/configs" -maxdepth 1 ! -name '*_common*' ! -name '*_sdflight_*' -name '*.cmake' -print | sed -e 's:^.*/::' | sort))
# Strip off leading nuttx_
NUTTX_CONFIG_TARGETS := $(patsubst nuttx_%,%,$(filter nuttx_%,$(ALL_CONFIG_TARGETS)))
# Get a list of all config targets boards/*/*.cmake
ALL_CONFIG_TARGETS := $(shell find boards -maxdepth 3 -mindepth 3 ! -name '*common*' ! -name '*sdflight*' -name '*.cmake' -print | sed -e 's/boards\///' | sed -e 's/\.cmake//' | sed -e 's/\//_/g' | sort)
# ADD CONFIGS HERE
# --------------------------------------------------------------------
@@ -145,32 +190,47 @@ NUTTX_CONFIG_TARGETS := $(patsubst nuttx_%,%,$(filter nuttx_%,$(ALL_CONFIG_TARGE
# All targets.
$(ALL_CONFIG_TARGETS):
$(call cmake-build,$@)
@$(eval PX4_CONFIG = $@)
@$(eval CMAKE_ARGS += -DCONFIG=$(PX4_CONFIG))
@$(call cmake-build,$(PX4_CONFIG)$(BUILD_DIR_SUFFIX))
# Abbreviated config targets.
# Filter for only default targets to allow omiting the "_default" postfix
CONFIG_TARGETS_DEFAULT := $(patsubst %_default,%,$(filter %_default,$(ALL_CONFIG_TARGETS)))
$(CONFIG_TARGETS_DEFAULT):
@$(eval PX4_CONFIG = $@_default)
@$(eval CMAKE_ARGS += -DCONFIG=$(PX4_CONFIG))
@$(call cmake-build,$(PX4_CONFIG)$(BUILD_DIR_SUFFIX))
# nuttx_ is left off by default; provide a rule to allow that.
$(NUTTX_CONFIG_TARGETS):
$(call cmake-build,nuttx_$@)
all_config_targets: $(ALL_CONFIG_TARGETS)
all_default_targets: $(CONFIG_TARGETS_DEFAULT)
all_nuttx_targets: $(NUTTX_CONFIG_TARGETS)
posix: px4_sitl_default
posix: posix_sitl_default
broadcast: posix_sitl_broadcast
# board reorganization deprecation warnings (2018-11-22)
define deprecation_warning
$(warning $(1) has been deprecated and will be removed, please use $(2)!)
endef
px4fmu-%_default:
$(call deprecation_warning, ${@},$(subst px4fmu,px4_fmu,$@))
$(MAKE) $(subst px4fmu,px4_fmu, $@)
posix_sitl_default:
$(call deprecation_warning, ${@},px4_sitl_default)
$(MAKE) px4_sitl_default
# All targets with just dependencies but no recipe must either be marked as phony (or have the special @: as recipe).
.PHONY: all posix broadcast all_nuttx_targets
.PHONY: all posix px4_sitl_default all_config_targets all_default_targets
# Multi- config targets.
eagle_default: posix_eagle_default qurt_eagle_default
eagle_rtps: posix_eagle_rtps qurt_eagle_default
eagle_legacy_default: posix_eagle_legacy qurt_eagle_legacy
excelsior_default: posix_excelsior_default qurt_excelsior_default
excelsior_rtps: posix_excelsior_rtps qurt_excelsior_default
excelsior_legacy_default: posix_excelsior_legacy qurt_excelsior_legacy
eagle_default: atlflight_eagle_default atlflight_eagle_qurt-default
eagle_rtps: atlflight_eagle_rtps atlflight_eagle_qurt-rtps
.PHONY: eagle_default eagle_rtps eagle_legacy_default
.PHONY: excelsior_default excelsior_rtps excelsior_legacy_default
excelsior_default: atlflight_excelsior_default atlflight_excelsior_qurt-default
excelsior_rtps: atlflight_excelsior_rtps atlflight_excelsior_qurt-rtps
.PHONY: eagle_default eagle_rtps
.PHONY: excelsior_default excelsior_rtps
# Other targets
# --------------------------------------------------------------------
@@ -182,41 +242,37 @@ qgc_firmware: px4fmu_firmware misc_qgc_extra_firmware
# px4fmu NuttX firmware
px4fmu_firmware: \
check_px4io-v2_default \
check_px4fmu-v2_default \
check_px4fmu-v3_default \
check_px4fmu-v4_default \
check_px4fmu-v4pro_default \
check_px4fmu-v5_default \
check_px4_io-v2_default \
check_px4_fmu-v2_default \
check_px4_fmu-v3_default \
check_px4_fmu-v4_default \
check_px4_fmu-v4pro_default \
check_px4_fmu-v5_default \
sizes
misc_qgc_extra_firmware: \
check_aerocore2_default \
check_aerofc-v1_default \
check_auav-x21_default \
check_crazyflie_default \
check_mindpx-v2_default \
check_px4fmu-v2_lpe \
check_tap-v1_default \
check_nxp_fmuk66-v3_default \
check_intel_aerofc-v1_default \
check_auav_x21_default \
check_bitcraze_crazyflie_default \
check_airmind_mindpx-v2_default \
check_px4_fmu-v2_lpe \
sizes
# Other NuttX firmware
alt_firmware: \
check_nxphlite-v3_default \
check_px4-same70xplained-v1_default \
check_px4-stm32f4discovery_default \
check_px4cannode-v1_default \
check_px4esc-v1_default \
check_px4nucleoF767ZI-v1_default \
check_s2740vc-v1_default \
check_px4_cannode-v1_default \
check_px4_esc-v1_default \
check_auav_esc35-v1_default \
check_thiemar_s2740vc-v1_default \
sizes
# builds with RTPS
check_rtps: \
check_px4fmu-v3_rtps \
check_px4fmu-v4_rtps \
check_px4fmu-v4pro_rtps \
check_posix_sitl_rtps \
check_px4_fmu-v3_rtps \
check_px4_fmu-v4_rtps \
check_px4_fmu-v4pro_rtps \
check_px4_sitl_rtps \
sizes
.PHONY: sizes check quick_check check_rtps uorb_graphs
@@ -225,10 +281,10 @@ sizes:
@-find build -name *.elf -type f | xargs size 2> /dev/null || :
# All default targets that don't require a special build environment
check: check_posix_sitl_default px4fmu_firmware misc_qgc_extra_firmware alt_firmware tests check_format
check: check_px4_sitl_default px4fmu_firmware misc_qgc_extra_firmware alt_firmware tests check_format
# quick_check builds a single nuttx and posix target, runs testing, and checks the style
quick_check: check_posix_sitl_default check_px4fmu-v4pro_default tests check_format
quick_check: check_px4_sitl_test check_px4_fmu-v5_default tests check_format
check_%:
@echo
@@ -239,119 +295,153 @@ check_%:
uorb_graphs:
@./Tools/uorb_graph/create_from_startupscript.sh
@./Tools/uorb_graph/create.py --src-path src --exclude-path src/examples --file Tools/uorb_graph/graph_full
@$(MAKE) --no-print-directory px4fmu-v2_default uorb_graph
@$(MAKE) --no-print-directory px4fmu-v4_default uorb_graph
@$(MAKE) --no-print-directory posix_sitl_default uorb_graph
@$(MAKE) --no-print-directory px4_fmu-v2_default uorb_graph
@$(MAKE) --no-print-directory px4_fmu-v4_default uorb_graph
@$(MAKE) --no-print-directory px4_sitl_default uorb_graph
.PHONY: coverity_scan
coverity_scan: posix_sitl_default
coverity_scan: px4_sitl_default
# Documentation
# --------------------------------------------------------------------
.PHONY: parameters_metadata airframe_metadata module_documentation px4_metadata
.PHONY: parameters_metadata airframe_metadata module_documentation px4_metadata doxygen
parameters_metadata:
@python $(SRC_DIR)/src/lib/parameters/px_process_params.py -s `find $(SRC_DIR)/src -maxdepth 4 -type d` --inject-xml $(SRC_DIR)/src/lib/parameters/parameters_injected.xml --markdown
@python $(SRC_DIR)/src/lib/parameters/px_process_params.py -s `find $(SRC_DIR)/src -maxdepth 4 -type d` --inject-xml $(SRC_DIR)/src/lib/parameters/parameters_injected.xml --xml
@$(MAKE) --no-print-directory px4_sitl_default metadata_parameters
airframe_metadata:
@python $(SRC_DIR)/Tools/px_process_airframes.py -v -a $(SRC_DIR)/ROMFS/px4fmu_common/init.d --markdown
@python $(SRC_DIR)/Tools/px_process_airframes.py -v -a $(SRC_DIR)/ROMFS/px4fmu_common/init.d --xml
@$(MAKE) --no-print-directory px4_sitl_default metadata_airframes
module_documentation:
@python $(SRC_DIR)/Tools/px_process_module_doc.py -v --markdown $(SRC_DIR)/modules --src-path $(SRC_DIR)/src
@$(MAKE) --no-print-directory px4_sitl_default metadata_module_documentation
px4_metadata: parameters_metadata airframe_metadata module_documentation
doxygen:
@mkdir -p "$(SRC_DIR)"/build/doxygen
@cd "$(SRC_DIR)"/build/doxygen && cmake "$(SRC_DIR)" $(CMAKE_ARGS) -G"$(PX4_CMAKE_GENERATOR)" -DCONFIG=px4_sitl_default -DBUILD_DOXYGEN=ON
@$(PX4_MAKE) -C "$(SRC_DIR)"/build/doxygen
@touch "$(SRC_DIR)"/build/doxygen/Documentation/.nojekyll
# Astyle
# --------------------------------------------------------------------
.PHONY: check_format format
check_format:
$(call colorecho,'Checking formatting with astyle')
@$(SRC_DIR)/Tools/astyle/check_code_style_all.sh
@cd $(SRC_DIR) && git diff --check
@"$(SRC_DIR)"/Tools/astyle/check_code_style_all.sh
@cd "$(SRC_DIR)" && git diff --check
format:
$(call colorecho,'Formatting with astyle')
@$(SRC_DIR)/Tools/astyle/check_code_style_all.sh --fix
@"$(SRC_DIR)"/Tools/astyle/check_code_style_all.sh --fix
# Testing
# --------------------------------------------------------------------
.PHONY: tests tests_coverage tests_mission tests_mission_coverage tests_offboard rostest
.PHONY: tests tests_coverage tests_mission tests_mission_coverage tests_offboard tests_avoidance
.PHONY: rostest python_coverage
tests:
@$(MAKE) --no-print-directory posix_sitl_default test_results \
ASAN_OPTIONS="color=always:check_initialization_order=1:detect_stack_use_after_return=1" \
UBSAN_OPTIONS="color=always"
$(eval CMAKE_ARGS += -DCONFIG=px4_sitl_test)
$(eval CMAKE_ARGS += -DTESTFILTER=$(TESTFILTER))
$(eval ARGS += test_results)
$(eval ASAN_OPTIONS += color=always:check_initialization_order=1:detect_stack_use_after_return=1)
$(eval UBSAN_OPTIONS += color=always)
$(call cmake-build,px4_sitl_test)
tests_coverage:
@$(MAKE) clean
@$(MAKE) --no-print-directory posix_sitl_default test_coverage_genhtml PX4_CMAKE_BUILD_TYPE=Coverage
@echo "Open $(SRC_DIR)/build/posix_sitl_default/coverage-html/index.html to see coverage"
@$(MAKE) --no-print-directory px4_sitl_default test_coverage_genhtml PX4_CMAKE_BUILD_TYPE=Coverage
@echo "Open "$(SRC_DIR)"/build/px4_sitl_default/coverage-html/index.html to see coverage"
rostest: posix_sitl_default
@$(MAKE) --no-print-directory posix_sitl_default sitl_gazebo
rostest: px4_sitl_default
@$(MAKE) --no-print-directory px4_sitl_default sitl_gazebo
tests_mission: rostest
@$(SRC_DIR)/test/rostest_px4_run.sh mavros_posix_tests_missions.test
@"$(SRC_DIR)"/test/rostest_px4_run.sh mavros_posix_tests_missions.test
rostest_run: px4_sitl_default
@$(MAKE) --no-print-directory px4_sitl_default sitl_gazebo
@"$(SRC_DIR)"/test/rostest_px4_run.sh $(TEST_FILE) mission:=$(TEST_MISSION) vehicle:=$(TEST_VEHICLE)
tests_mission_coverage:
@$(MAKE) clean
@$(MAKE) --no-print-directory posix_sitl_default PX4_CMAKE_BUILD_TYPE=Coverage
@$(MAKE) --no-print-directory posix_sitl_default sitl_gazebo PX4_CMAKE_BUILD_TYPE=Coverage
@$(SRC_DIR)/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=vtol_new_1 vehicle:=standard_vtol
@$(MAKE) --no-print-directory posix_sitl_default generate_coverage
@$(MAKE) --no-print-directory px4_sitl_default PX4_CMAKE_BUILD_TYPE=Coverage
@$(MAKE) --no-print-directory px4_sitl_default sitl_gazebo PX4_CMAKE_BUILD_TYPE=Coverage
@"$(SRC_DIR)"/test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=VTOL_mission_1 vehicle:=standard_vtol
@$(MAKE) --no-print-directory px4_sitl_default generate_coverage
tests_offboard: rostest
@$(SRC_DIR)/test/rostest_px4_run.sh mavros_posix_tests_offboard_attctl.test
@$(SRC_DIR)/test/rostest_px4_run.sh mavros_posix_tests_offboard_posctl.test
@"$(SRC_DIR)"/test/rostest_px4_run.sh mavros_posix_tests_offboard_attctl.test
@"$(SRC_DIR)"/test/rostest_px4_run.sh mavros_posix_tests_offboard_posctl.test
tests_avoidance: rostest
@"$(SRC_DIR)"/test/rostest_avoidance_run.sh mavros_posix_test_avoidance.test
python_coverage:
@mkdir -p "$(SRC_DIR)"/build/python_coverage
@cd "$(SRC_DIR)"/build/python_coverage && cmake "$(SRC_DIR)" $(CMAKE_ARGS) -G"$(PX4_CMAKE_GENERATOR)" -DCONFIG=px4_sitl_default -DPYTHON_COVERAGE=ON
@$(PX4_MAKE) -C "$(SRC_DIR)"/build/python_coverage
@$(PX4_MAKE) -C "$(SRC_DIR)"/build/python_coverage metadata_airframes
@$(PX4_MAKE) -C "$(SRC_DIR)"/build/python_coverage metadata_parameters
#@$(PX4_MAKE) -C "$(SRC_DIR)"/build/python_coverage module_documentation # TODO: fix within coverage.py
@coverage combine `find . -name .coverage\*`
@coverage report -m
# static analyzers (scan-build, clang-tidy, cppcheck)
# --------------------------------------------------------------------
.PHONY: scan-build posix_sitl_default-clang clang-tidy clang-tidy-fix clang-tidy-quiet cppcheck
.PHONY: scan-build px4_sitl_default-clang clang-tidy clang-tidy-fix clang-tidy-quiet
.PHONY: cppcheck shellcheck_all validate_module_configs
scan-build:
@export CCC_CC=clang
@export CCC_CXX=clang++
@rm -rf $(SRC_DIR)/build/posix_sitl_default-scan-build
@rm -rf $(SRC_DIR)/build/scan-build/report_latest
@mkdir -p $(SRC_DIR)/build/posix_sitl_default-scan-build
@cd $(SRC_DIR)/build/posix_sitl_default-scan-build && scan-build cmake $(SRC_DIR) -GNinja -DCONFIG=posix_sitl_default
@scan-build -o $(SRC_DIR)/build/scan-build cmake --build $(SRC_DIR)/build/posix_sitl_default-scan-build
@find $(SRC_DIR)/build/scan-build -maxdepth 1 -mindepth 1 -type d -exec cp -r "{}" $(SRC_DIR)/build/scan-build/report_latest \;
@rm -rf "$(SRC_DIR)"/build/px4_sitl_default-scan-build
@rm -rf "$(SRC_DIR)"/build/scan-build/report_latest
@mkdir -p "$(SRC_DIR)"/build/px4_sitl_default-scan-build
@cd "$(SRC_DIR)"/build/px4_sitl_default-scan-build && scan-build cmake "$(SRC_DIR)" -GNinja -DCONFIG=px4_sitl_default
@scan-build -o "$(SRC_DIR)"/build/scan-build cmake --build "$(SRC_DIR)"/build/px4_sitl_default-scan-build
@find "$(SRC_DIR)"/build/scan-build -maxdepth 1 -mindepth 1 -type d -exec cp -r "{}" "$(SRC_DIR)"/build/scan-build/report_latest \;
posix_sitl_default-clang:
@mkdir -p $(SRC_DIR)/build/posix_sitl_default-clang
@cd $(SRC_DIR)/build/posix_sitl_default-clang && cmake $(SRC_DIR) $(CMAKE_ARGS) -G"$(PX4_CMAKE_GENERATOR)" -DCONFIG=posix_sitl_default -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
@$(PX4_MAKE) -C $(SRC_DIR)/build/posix_sitl_default-clang
px4_sitl_default-clang:
@mkdir -p "$(SRC_DIR)"/build/px4_sitl_default-clang
@cd "$(SRC_DIR)"/build/px4_sitl_default-clang && cmake "$(SRC_DIR)" $(CMAKE_ARGS) -G"$(PX4_CMAKE_GENERATOR)" -DCONFIG=px4_sitl_default -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
@$(PX4_MAKE) -C "$(SRC_DIR)"/build/px4_sitl_default-clang
clang-tidy: posix_sitl_default-clang
@cd $(SRC_DIR)/build/posix_sitl_default-clang && $(SRC_DIR)/Tools/run-clang-tidy.py -header-filter=".*\.hpp" -j$(j) -p .
clang-tidy: px4_sitl_default-clang
@cd "$(SRC_DIR)"/build/px4_sitl_default-clang && "$(SRC_DIR)"/Tools/run-clang-tidy.py -header-filter=".*\.hpp" -j$(j) -p .
# to automatically fix a single check at a time, eg modernize-redundant-void-arg
# % run-clang-tidy-4.0.py -fix -j4 -checks=-\*,modernize-redundant-void-arg -p .
clang-tidy-fix: posix_sitl_default-clang
@cd $(SRC_DIR)/build/posix_sitl_default-clang && $(SRC_DIR)/Tools/run-clang-tidy.py -header-filter=".*\.hpp" -j$(j) -fix -p .
clang-tidy-fix: px4_sitl_default-clang
@cd "$(SRC_DIR)"/build/px4_sitl_default-clang && "$(SRC_DIR)"/Tools/run-clang-tidy.py -header-filter=".*\.hpp" -j$(j) -fix -p .
# modified version of run-clang-tidy.py to return error codes and only output relevant results
clang-tidy-quiet: posix_sitl_default-clang
@cd $(SRC_DIR)/build/posix_sitl_default-clang && $(SRC_DIR)/Tools/run-clang-tidy.py -header-filter=".*\.hpp" -j$(j) -p .
clang-tidy-quiet: px4_sitl_default-clang
@cd "$(SRC_DIR)"/build/px4_sitl_default-clang && "$(SRC_DIR)"/Tools/run-clang-tidy.py -header-filter=".*\.hpp" -j$(j) -p .
# TODO: Fix cppcheck errors then try --enable=warning,performance,portability,style,unusedFunction or --enable=all
cppcheck: posix_sitl_default
@mkdir -p $(SRC_DIR)/build/cppcheck
@cppcheck -i$(SRC_DIR)/src/examples --enable=performance --std=c++11 --std=c99 --std=posix --project=$(SRC_DIR)/build/posix_sitl_default/compile_commands.json --xml-version=2 2> $(SRC_DIR)/build/cppcheck/cppcheck-result.xml > /dev/null
@cppcheck-htmlreport --source-encoding=ascii --file=$(SRC_DIR)/build/cppcheck/cppcheck-result.xml --report-dir=$(SRC_DIR)/build/cppcheck --source-dir=$(SRC_DIR)/src/
cppcheck: px4_sitl_default
@mkdir -p "$(SRC_DIR)"/build/cppcheck
@cppcheck -i"$(SRC_DIR)"/src/examples --enable=performance --std=c++11 --std=c99 --std=posix --project="$(SRC_DIR)"/build/px4_sitl_default/compile_commands.json --xml-version=2 2> "$(SRC_DIR)"/build/cppcheck/cppcheck-result.xml > /dev/null
@cppcheck-htmlreport --source-encoding=ascii --file="$(SRC_DIR)"/build/cppcheck/cppcheck-result.xml --report-dir="$(SRC_DIR)"/build/cppcheck --source-dir="$(SRC_DIR)"/src/
shellcheck_all:
@"$(SRC_DIR)"/Tools/run-shellcheck.sh "$(SRC_DIR)"/ROMFS/px4fmu_common/
@make px4_fmu-v5_default shellcheck
validate_module_configs:
@find "$(SRC_DIR)"/src/modules "$(SRC_DIR)"/src/drivers "$(SRC_DIR)"/src/lib -name *.yaml -type f -print0 | xargs -0 "$(SRC_DIR)"/Tools/validate_yaml.py --schema-file "$(SRC_DIR)"/validation/module_schema.yaml
# Cleanup
# --------------------------------------------------------------------
.PHONY: clean submodulesclean submodulesupdate gazeboclean distclean
clean:
@rm -rf $(SRC_DIR)/build
@rm -rf "$(SRC_DIR)"/build
submodulesclean:
@git submodule foreach --quiet --recursive git clean -ff -x -d
@@ -371,6 +461,7 @@ distclean: gazeboclean
@git submodule deinit -f .
@git clean -ff -x -d -e ".project" -e ".cproject" -e ".idea" -e ".settings" -e ".vscode"
# Help / Error
# --------------------------------------------------------------------
# All other targets are handled by PX4_MAKE. Add a rule here to avoid printing an error.
@@ -378,26 +469,17 @@ distclean: gazeboclean
$(if $(filter $(FIRST_ARG),$@), \
$(error "$@ cannot be the first argument. Use '$(MAKE) help|list_config_targets' to get a list of all possible [configuration] targets."),@#)
#help:
# @echo
# @echo "Type 'make ' and hit the tab key twice to see a list of the available"
# @echo "build configurations."
# @echo
empty :=
space := $(empty) $(empty)
# Print a list of non-config targets (based on http://stackoverflow.com/a/26339924/1487069)
help:
@echo "Usage: $(MAKE) <target>"
@echo "Where <target> is one of:"
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | \
awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | \
egrep -v -e '^[^[:alnum:]]' -e '^($(subst $(space),|,$(ALL_CONFIG_TARGETS) $(NUTTX_CONFIG_TARGETS)))$$' -e '_default$$' -e '^(posix|eagle|Makefile)'
egrep -v -e '^[^[:alnum:]]' -e '^($(subst $(space),|,$(ALL_CONFIG_TARGETS)))$$' -e '_default$$' -e '^(posix|eagle|Makefile)'
@echo
@echo "Or, $(MAKE) <config_target> [<make_target(s)>]"
@echo "Use '$(MAKE) list_config_targets' for a list of configuration targets."
# Print a list of all config targets.
list_config_targets:
@for targ in $(patsubst nuttx_%,[nuttx_]%,$(ALL_CONFIG_TARGETS)); do echo $$targ; done
@for targ in $(patsubst %_default,%[_default],$(ALL_CONFIG_TARGETS)); do echo $$targ; done
+16
View File
@@ -0,0 +1,16 @@
Please use [PX4 Discuss](http://discuss.px4.io/) or [Slack](http://slack.px4.io/) to align on pull requests if necessary. You can then open draft pull requests to get early feedback.
**Describe problem solved by the proposed pull request**
A clear and concise description of the problem this proposed change will solve. E.g. For this use case I ran into...
**Test data / coverage**
How was it tested? What cases were covered? Logs uploaded to https://review.px4.io/ and screenshots of the important plot parts.
**Describe your preferred solution**
A clear and concise description of what you have implemented.
**Describe possible alternatives**
A clear and concise description of alternative solutions or features you've considered.
**Additional context**
Add any other related context or media.
+9 -9
View File
@@ -1,12 +1,12 @@
# PX4 Pro Drone Autopilot
# PX4 Drone Autopilot
[![Releases](https://img.shields.io/github/release/PX4/Firmware.svg)](https://github.com/PX4/Firmware/releases) [![DOI](https://zenodo.org/badge/22634/PX4/Firmware.svg)](https://zenodo.org/badge/latestdoi/22634/PX4/Firmware)
[![Build Status](http://ci.px4.io:8080/buildStatus/icon?job=Firmware/master)](http://ci.px4.io:8080/blue/organizations/jenkins/Firmware/activity) [![Coverity Scan](https://scan.coverity.com/projects/3966/badge.svg?flat=1)](https://scan.coverity.com/projects/3966?tab=overview)
[![Build Status](http://ci.px4.io:8080/buildStatus/icon?job=PX4/Firmware/master)](http://ci.px4.io:8080/blue/organizations/jenkins/PX4%2FFirmware/activity)
[![Slack](https://px4-slack.herokuapp.com/badge.svg)](http://slack.px4.io)
This repository holds the [PX4 Pro](http://px4.io) flight control solution for drones, with the main applications located in the [src/modules](https://github.com/PX4/Firmware/tree/master/src/modules) directory. It also contains the PX4 Drone Middleware Platform, which provides drivers and middleware to run drones.
This repository holds the [PX4](http://px4.io) flight control solution for drones, with the main applications located in the [src/modules](https://github.com/PX4/Firmware/tree/master/src/modules) directory. It also contains the PX4 Drone Middleware Platform, which provides drivers and middleware to run drones.
* Official Website: http://px4.io (License: BSD 3-clause, [LICENSE](https://github.com/PX4/Firmware/blob/master/LICENSE))
* [Supported airframes](https://docs.px4.io/en/airframes/airframe_reference.html) ([portfolio](http://px4.io/#airframes)):
@@ -19,7 +19,7 @@ This repository holds the [PX4 Pro](http://px4.io) flight control solution for d
## PX4 Users
The [PX4 User Guide](https://docs.px4.io/en/) explains how to assemble [supported vehicles](https://docs.px4.io/en/airframes/airframe_reference.html) and fly drones with PX4.
The [PX4 User Guide](https://docs.px4.io/en/) explains how to assemble [supported vehicles](https://docs.px4.io/en/airframes/airframe_reference.html) and fly drones with PX4.
See the [forum and chat](https://docs.px4.io/en/#support) if you need help!
@@ -75,7 +75,7 @@ The PX4 Dev Team syncs up on a [weekly dev call](https://dev.px4.io/en/contribut
* [José Roberto de Souza](https://github.com/zehortigoza)
* [Raspberry Pi / Navio](https://github.com/PX4/Firmware/labels/raspberry_pi) - [Beat Kueng](https://github.com/bkueng)
* [Airmind MindPX / MindRacer](https://github.com/PX4/Firmware/labels/mindpx) - [Henry Zhang](https://github.com/iZhangHui)
* RTPS/ROS2 Interface - [Vicente Monge](https://github.com/vicenteeprosima)
* RTPS/ROS2 Interface - [Nuno Marques](https://github.com/TSC21)
See also [About Us](http://px4.io/about-us/#development_team) (px4.io) and the [contributors list](https://github.com/PX4/Firmware/graphs/contributors) (Github).
@@ -90,13 +90,13 @@ This repository contains code supporting these boards:
* [Pixhawk](https://docs.px4.io/en/flight_controller/pixhawk.html)
* [Pixhawk Mini](https://docs.px4.io/en/flight_controller/pixhawk_mini.html)
* [Pixfalcon](https://docs.px4.io/en/flight_controller/pixfalcon.html)
* FMUv3.x [Pixhawk 2](https://pixhawk.org/modules/pixhawk2)
* FMUv3.x [Pixhawk 2](https://docs.px4.io/en/flight_controller/pixhawk-2.html)
* FMUv4.x
* [Pixracer](https://docs.px4.io/en/flight_controller/pixracer.html)
* [Pixhawk 3 Pro](https://docs.px4.io/en/flight_controller/pixhawk3_pro.html)
* FMUv5.x (ARM Cortex M7, future Pixhawk)
* [STM32F4Discovery](http://www.st.com/en/evaluation-tools/stm32f4discovery.html) (basic support) [Tutorial](https://pixhawk.org/modules/stm32f4discovery)
* [Gumstix AeroCore](https://www.gumstix.com/aerocore-2/) (only v2)
* FMUv5.x (ARM Cortex M7)
* [Pixhawk 4](https://docs.px4.io/en/flight_controller/pixhawk4.html)
* [Pixhawk 4 mini](https://docs.px4.io/en/flight_controller/pixhawk4_mini.html)
* [Airmind MindPX V2.8](http://www.mindpx.net/assets/accessories/UserGuide_MindPX.pdf)
* [Airmind MindRacer V1.2](http://mindpx.net/assets/accessories/mindracer_user_guide_v1.2.pdf)
* [Bitcraze Crazyflie 2.0](https://docs.px4.io/en/flight_controller/crazyflie2.html)
+186 -38
View File
@@ -33,9 +33,11 @@
message(STATUS "ROMFS: ${config_romfs_root}")
set(config_romfs_files_list)
set(romfs_src_dir ${PX4_SOURCE_DIR}/ROMFS/${config_romfs_root})
set(romfs_temp_dir ${PX4_BINARY_DIR}/genromfs/${config_romfs_root})
set(romfs_gen_root_dir ${PX4_BINARY_DIR}/genromfs)
set_property(GLOBAL PROPERTY PX4_ROMFS_FILES)
set_property(GLOBAL PROPERTY PX4_ROMFS_CMAKE_FILES)
#=============================================================================
#
@@ -57,64 +59,210 @@ set(romfs_temp_dir ${PX4_BINARY_DIR}/genromfs/${config_romfs_root})
# )
#
function(px4_add_romfs_files)
foreach(arg IN LISTS ARGN)
list(APPEND config_romfs_files_list
${CMAKE_CURRENT_SOURCE_DIR}/${arg}
)
endforeach()
set_property(GLOBAL APPEND PROPERTY PX4_ROMFS_CMAKE_FILES ${CMAKE_CURRENT_LIST_FILE})
set(config_romfs_files_list ${config_romfs_files_list} CACHE INTERNAL "ROMFS file list")
foreach(arg IN LISTS ARGN)
set_property(GLOBAL APPEND PROPERTY PX4_ROMFS_FILES ${CMAKE_CURRENT_LIST_DIR}/${arg})
endforeach()
endfunction()
# get list of all ROMFS files
add_subdirectory(${romfs_src_dir})
# directory setup
# copy all romfs files, process airframes, prune comments
add_custom_command(OUTPUT ${romfs_temp_dir}/init.d/rcS ${romfs_temp_dir}/init.d/rc.autostart
COMMAND cmake -E copy_directory ${romfs_src_dir} ${romfs_temp_dir}
# copy all romfs files, process airframes
get_property(romfs_cmake_files GLOBAL PROPERTY PX4_ROMFS_CMAKE_FILES)
get_property(romfs_copy_files GLOBAL PROPERTY PX4_ROMFS_FILES)
get_property(module_config_files GLOBAL PROPERTY PX4_MODULE_CONFIG_FILES)
file(GLOB jinja_templates ${PX4_SOURCE_DIR}/Tools/serial/*.jinja)
if (px4_constrained_flash_build)
set(added_arguments --constrained-flash)
endif()
add_custom_command(
OUTPUT
${romfs_gen_root_dir}/init.d/rcS
${romfs_gen_root_dir}/init.d/rc.serial
${romfs_gen_root_dir}/init.d/rc.autostart
romfs_copy.stamp
COMMAND ${CMAKE_COMMAND} -E remove_directory ${romfs_gen_root_dir}
# TODO: we should only copy the files in ${romfs_copy_files}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${romfs_src_dir} ${romfs_gen_root_dir}
COMMAND ${CMAKE_COMMAND} -E remove_directory ${romfs_gen_root_dir}/init.d-posix
COMMAND ${CMAKE_COMMAND} -E remove_directory ${romfs_gen_root_dir}/mixers-sitl
COMMAND ${CMAKE_COMMAND} -E remove ${romfs_gen_root_dir}/mixers/CMakeLists.txt
COMMAND ${CMAKE_COMMAND} -E remove ${romfs_gen_root_dir}/init.d/CMakeLists.txt
COMMAND ${CMAKE_COMMAND} -E remove ${romfs_gen_root_dir}/init.d/airframes/CMakeLists.txt
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_process_airframes.py
-a ${romfs_temp_dir}/init.d
-s ${romfs_temp_dir}/init.d/rc.autostart
--board ${BOARD}
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_romfs_pruner.py
--folder ${romfs_temp_dir} --board ${BOARD}
--airframes-path ${romfs_gen_root_dir}/init.d
--start-script ${romfs_gen_root_dir}/init.d/rc.autostart
--board ${PX4_BOARD}
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/serial/generate_config.py
--rc-dir ${romfs_gen_root_dir}/init.d
--serial-ports ${board_serial_ports} ${added_arguments}
--config-files ${module_config_files} #--verbose
COMMAND ${CMAKE_COMMAND} -E touch romfs_copy.stamp
DEPENDS
${config_romfs_files_list}
${PX4_SOURCE_DIR}/Tools/px_romfs_pruner.py
${PX4_SOURCE_DIR}/ROMFS/${config_romfs_root}/init.d/rcS
${jinja_templates}
${module_config_files}
${romfs_cmake_files}
${romfs_copy_files}
${PX4_SOURCE_DIR}/Tools/px_process_airframes.py
${PX4_SOURCE_DIR}/Tools/serial/generate_config.py
COMMENT "ROMFS: copying, generating airframes"
)
set(romfs_dependencies)
list(APPEND romfs_dependencies
${romfs_temp_dir}/init.d/rcS
${romfs_temp_dir}/init.d/rc.autostart
)
# copy extras into ROMFS
set(extras_dependencies)
# copy px4io binary if configured
if (config_io_board)
list(APPEND romfs_dependencies
if(config_io_board)
list(APPEND extras_dependencies
copy_px4io_bin
${fw_io_bin}
)
endif()
# create romfs.img
add_custom_command(OUTPUT romfs.img
COMMAND ${CMAKE_COMMAND} -E remove -f romfs.img romfs.txt
COMMAND ${GENROMFS} -f romfs.img -d ${romfs_temp_dir} -V "NSHInitVol" -v > romfs.txt 2>&1
DEPENDS ${romfs_dependencies}
if(config_bl_file)
file(MAKE_DIRECTORY ${PX4_BINARY_DIR}/romfs_extras)
configure_file(${config_bl_file} ${PX4_BINARY_DIR}/romfs_extras COPYONLY)
list(APPEND extras_dependencies
${config_bl_file}
)
endif()
set(OPTIONAL_BOARD_RC)
list(APPEND OPTIONAL_BOARD_RC
rc.board_defaults
rc.board_sensors
rc.board_extras
)
foreach(board_rc_file ${OPTIONAL_BOARD_RC})
if(EXISTS "${PX4_BOARD_DIR}/init/${board_rc_file}")
message(STATUS "ROMFS: Adding ${board_rc_file}")
add_custom_command(
OUTPUT
${romfs_gen_root_dir}/init.d/${board_rc_file}
${board_rc_file}.stamp
COMMAND ${CMAKE_COMMAND} -E copy ${PX4_BOARD_DIR}/init/${board_rc_file} ${romfs_gen_root_dir}/init.d/${board_rc_file}
COMMAND ${CMAKE_COMMAND} -E touch ${board_rc_file}.stamp
DEPENDS
${PX4_BOARD_DIR}/init/${board_rc_file}
romfs_copy.stamp
COMMENT "ROMFS: copying ${board_rc_file}"
)
list(APPEND extras_dependencies
${board_rc_file}.stamp
)
endif()
endforeach()
add_custom_command(OUTPUT romfs_extras.stamp
COMMAND ${CMAKE_COMMAND} -E make_directory ${romfs_gen_root_dir}/extras/
COMMAND ${CMAKE_COMMAND} -E make_directory ${PX4_BINARY_DIR}/romfs_extras/
COMMAND ${CMAKE_COMMAND} -E copy_directory ${PX4_BINARY_DIR}/romfs_extras/ ${romfs_gen_root_dir}/extras/
COMMAND ${CMAKE_COMMAND} -E touch romfs_extras.stamp
DEPENDS
romfs_copy.stamp
${extras_dependencies}
COMMENT "ROMFS: copying extras"
)
# create nsh_romfsimg.c
add_custom_command(OUTPUT nsh_romfsimg.c
COMMAND ${CMAKE_COMMAND} -E remove -f nsh_romfsimg.c
COMMAND xxd -i romfs.img nsh_romfsimg.c
COMMAND sed 's/unsigned/const unsigned/g' nsh_romfsimg.c > nsh_romfsimg.c.tmp && mv nsh_romfsimg.c.tmp nsh_romfsimg.c
DEPENDS romfs.img
add_custom_command(
OUTPUT romfs_pruned.stamp
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_romfs_pruner.py --folder ${romfs_gen_root_dir} --board ${PX4_BOARD}
COMMAND ${CMAKE_COMMAND} -E touch romfs_pruned.stamp
DEPENDS
romfs_copy.stamp
romfs_extras.stamp
${PX4_SOURCE_DIR}/Tools/px_romfs_pruner.py
COMMENT "ROMFS: pruning"
)
if("${CONFIG_FS_CROMFS}" STREQUAL "y")
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/gencromfs
COMMAND make --no-print-directory --silent -f Makefile.host gencromfs
COMMAND ${CMAKE_COMMAND} -E copy gencromfs ${CMAKE_BINARY_DIR}/gencromfs
DEPENDS ${PX4_SOURCE_DIR}/platforms/nuttx/NuttX/nuttx/tools/gencromfs.c
WORKING_DIRECTORY ${NUTTX_DIR}/tools
)
# create nsh_romfsimg.c
add_custom_command(OUTPUT nsh_romfsimg.c
COMMAND ${CMAKE_COMMAND} -E remove -f nsh_romfsimg.c
COMMAND ${CMAKE_BINARY_DIR}/gencromfs ${romfs_gen_root_dir} nsh_romfsimg.c
DEPENDS
${CMAKE_BINARY_DIR}/gencromfs
romfs_pruned.stamp
COMMENT "ROMFS: generating image"
)
else()
# create romfs.img
find_program(GENROMFS genromfs)
if(NOT GENROMFS)
message(FATAL_ERROR "genromfs not found")
endif()
add_custom_command(
OUTPUT
romfs.img
romfs.txt
COMMAND ${CMAKE_COMMAND} -E remove -f romfs.img romfs.txt
COMMAND ${GENROMFS} -f romfs.img -d ${romfs_gen_root_dir} -V "NSHInitVol" -v > romfs.txt 2>&1
DEPENDS romfs_pruned.stamp
COMMENT "ROMFS: generating image"
)
# create nsh_romfsimg.c
find_program(XXD xxd)
if(NOT XXD)
message(FATAL_ERROR "xxd not found")
endif()
find_program(SED sed)
if(NOT SED)
message(FATAL_ERROR "sed not found")
endif()
add_custom_command(OUTPUT nsh_romfsimg.c
COMMAND ${CMAKE_COMMAND} -E remove -f nsh_romfsimg.c
COMMAND ${XXD} -i romfs.img nsh_romfsimg.c
COMMAND ${SED} 's/unsigned/const unsigned/g' nsh_romfsimg.c > nsh_romfsimg.c.tmp && ${CMAKE_COMMAND} -E rename nsh_romfsimg.c.tmp nsh_romfsimg.c
DEPENDS romfs.img
)
endif()
add_library(romfs STATIC nsh_romfsimg.c)
add_dependencies(romfs prebuild_targets)
set_target_properties(romfs PROPERTIES LINKER_LANGUAGE C)
# shellcheck
find_program(SHELLCHECK_PATH shellcheck)
if(SHELLCHECK_PATH)
# TODO: fix SC2086, SC2166
add_custom_target(shellcheck
COMMAND ${SHELLCHECK_PATH} --shell=sh
--exclude=SC2121 # SC2121: To assign a variable, use just 'var=value'
--exclude=SC2086 # SC2086: Double quote to prevent globbing and word splitting.
--exclude=SC2166 # SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
--exclude=SC2154 # SC2154: <var> is referenced but not assigned (NuttX uses different asssignment)
--exclude=SC2164 # SC2164: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
`find ${romfs_gen_root_dir}/init.d -type f`
DEPENDS ${romfs_gen_root_dir}/init.d/rc.autostart
WORKING_DIRECTORY ${romfs_gen_root_dir}
USES_TERMINAL
)
endif()
+5
View File
@@ -0,0 +1,5 @@
px4fmuv3_bl.bin: Bootloader binary of the PX4 Bootloader
(https://github.com/PX4/Bootloader)
based on commit 184b813699a9cfd6f43a5a21556a06b4372baf5f
for the target px4fmuv3_bl
Binary file not shown.
@@ -0,0 +1,13 @@
#!/bin/sh
#
# @name 3DR Iris Quadrotor SITL
#
# @type Quadrotor Wide
#
# @maintainer Julian Oes <julian@oes.ch>
#
sh /etc/init.d/rc.mc_defaults
set MIXER quad_w
@@ -0,0 +1,12 @@
#!/bin/sh
#
# @name IF750A SITL
# InspiredFlight 750 Auterion edition. Gazebo Only.
#
# @type Quadrotor
#
sh /etc/init.d/rc.mc_defaults
set MIXER quad_x
@@ -0,0 +1,29 @@
#!/bin/sh
#
# @name 3DR Iris Quadrotor SITL (Optical Flow)
#
# @type Quadrotor Wide
#
sh /etc/init.d-posix/10016_iris
if [ $AUTOCNF = yes ]
then
# EKF2
param set EKF2_AID_MASK 2
param set EKF2_EVP_NOISE 0.05
param set EKF2_EVA_NOISE 0.05
# INAV
param set INAV_LIDAR_EST 1
param set INAV_W_XY_FLOW 1
param set INAV_W_XY_GPS_P 0
param set INAV_W_XY_GPS_V 0
param set INAV_W_Z_GPS_P 0
# LPE: Flow-only mode
param set LPE_FUSION 242
param set LPE_FAKE_ORIGIN 1
param set MPC_ALT_MODE 2
fi
@@ -0,0 +1,3 @@
# shellcheck disable=SC2154
mavlink stream -r 50 -s DISTANCE_SENSOR -u $udp_gcs_port_local
@@ -0,0 +1,18 @@
#!/bin/sh
#
# @name 3DR Iris Quadrotor SITL (irlock)
#
# @type Quadrotor Wide
#
sh /etc/init.d-posix/10016_iris
if [ $AUTOCNF = yes ]
then
# enable fusion of landing target velocity
param set LTEST_MODE 1
param set PLD_HACC_RAD 0.1
fi
# Start up Landing Target Estimator module
landing_target_estimator start
@@ -0,0 +1,13 @@
#!/bin/sh
#
# @name 3DR Iris Quadrotor SITL (rplidar)
#
# @type Quadrotor Wide
#
sh /etc/init.d-posix/10016_iris
if [ $AUTOCNF = yes ]
then
param set LPE_FUSION 242
fi
@@ -0,0 +1,28 @@
#!/bin/sh
#
# @name 3DR Iris Quadrotor SITL (Vision)
#
# @type Quadrotor Wide
#
sh /etc/init.d-posix/10016_iris
if [ $AUTOCNF = yes ]
then
# EKF2: Vision position and heading
param set EKF2_AID_MASK 24
param set EKF2_EV_DELAY 5
# INAV: trust more on the vision input
param set INAV_W_XY_VIS_P 9
param set INAV_W_Z_VIS_P 7
param set INAV_W_XY_GPS_P 0
param set INAV_W_XY_GPS_V 0
param set INAV_W_Z_GPS_P 0
# LPE: Vision + baro
param set LPE_FUSION 132
# AEQ: External heading set to use vision input
param set ATT_EXT_HDG_M 1
fi
@@ -0,0 +1,3 @@
# shellcheck disable=SC2154
mavlink stream -r 30 -s ODOMETRY -u $udp_gcs_port_local
@@ -0,0 +1,16 @@
#!/bin/sh
#
# @name Solo
#
# @type Quadrotor
#
sh /etc/init.d/rc.mc_defaults
if [ $AUTOCNF = yes ]
then
param set MC_PITCHRATE_P 0.15
param set MC_ROLLRATE_P 0.15
fi
set MIXER quad_x
@@ -0,0 +1,14 @@
#!/bin/sh
#
# @name 3DR Iris Quadrotor SITL (Obstacle Avoidance)
#
# @type Quadrotor Wide
#
sh /etc/init.d-posix/10016_iris
if [ $AUTOCNF = yes ]
then
param set COM_OBS_AVOID 1
param set MPC_XY_CRUISE 5.0
fi
@@ -0,0 +1,2 @@
# shellcheck disable=SC2154
mavlink start -x -u 14558 -r 4000000 -m onboard -o 14541 # add mavlink stream for SDK
@@ -0,0 +1,8 @@
#!/bin/sh
#
# @name Hippocampus UUV
#
sh /etc/init.d/rc.mc_defaults
set MIXER uuv_quad_x
@@ -0,0 +1,44 @@
#!/bin/sh
#
# @name Plane SITL
#
sh /etc/init.d/rc.fw_defaults
if [ $AUTOCNF = yes ]
then
param set EKF2_ARSP_THR 8
param set EKF2_FUSE_BETA 1
param set EKF2_MAG_ACCLIM 0
param set EKF2_MAG_YAWLIM 0
param set FW_LND_AIRSPD_SC 1
param set FW_LND_ANG 8
param set FW_THR_LND_MAX 0
param set FW_P_TC 0.5
param set FW_PR_FF 0.40
param set FW_PR_I 0.05
param set FW_PR_P 0.05
param set FW_R_TC 0.7
param set FW_RR_FF 0.20
param set FW_RR_I 0.02
param set FW_RR_P 0.22
param set FW_W_EN 1
param set MIS_LTRMIN_ALT 30
param set MIS_TAKEOFF_ALT 30
param set NAV_ACC_RAD 15
param set NAV_DLL_ACT 2
param set NAV_LOITER_RAD 50
param set RWTO_TKOFF 1
param set WEST_EN 1
fi
set MIXER_FILE etc/mixers-sitl/plane_sitl.main.mix
set MIXER custom
@@ -0,0 +1,6 @@
#!/bin/sh
#
# @name Plane SITL with camera
#
sh /etc/init.d-posix/1030_plane
@@ -0,0 +1,50 @@
#!/bin/sh
#
# @name Standard VTOL
#
# @type Standard VTOL
#
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF = yes ]
then
param set FW_AIRSPD_MAX 25
param set FW_AIRSPD_MIN 14
param set FW_AIRSPD_TRIM 16
param set MC_ROLLRATE_P 0.3
param set MIS_LTRMIN_ALT 10
param set MIS_TAKEOFF_ALT 10
param set MIS_YAW_TMT 10
param set MPC_ACC_HOR_MAX 2
param set MPC_ACC_HOR_MAX 2
param set MPC_THR_MIN 0.1
param set MPC_TKO_SPEED 1
param set MPC_XY_P 0.8
param set MPC_XY_VEL_D 0.005
param set MPC_XY_VEL_I 0.2
param set MPC_XY_VEL_P 0.15
param set MPC_Z_VEL_MAX_DN 1.5
param set NAV_ACC_RAD 5
param set NAV_LOITER_RAD 80
param set VT_F_TRANS_DUR 5
param set VT_F_TRANS_THR 0.75
param set VT_ARSP_TRANS 16
param set VT_MOT_COUNT 4
param set VT_TYPE 2
param set WEST_EN 1
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
param set V19_VT_ROLLDIR 0
fi
set MAV_TYPE 22
set MIXER_FILE etc/mixers-sitl/standard_vtol_sitl.main.mix
set MIXER custom
@@ -0,0 +1,50 @@
#!/bin/sh
#
# @name Quadrotor + Tailsitter
#
# @type VTOL Quad Tailsitter
#
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF = yes ]
then
param set FW_AIRSPD_MAX 25
param set FW_AIRSPD_MIN 14
param set FW_AIRSPD_TRIM 16
param set MC_ROLLRATE_P 0.3
param set MIS_LTRMIN_ALT 10
param set MIS_TAKEOFF_ALT 10
param set MIS_YAW_TMT 10
param set MPC_ACC_HOR_MAX 2
param set MPC_ACC_HOR_MAX 2
param set MPC_THR_MIN 0.1
param set MPC_TKO_SPEED 1
param set MPC_XY_P 0.15
param set MPC_XY_VEL_D 0.005
param set MPC_XY_VEL_I 0.2
param set MPC_XY_VEL_P 0.05
param set MPC_Z_VEL_MAX_DN 1.5
param set MPC_Z_VEL_P 0.8
param set NAV_ACC_RAD 5
param set NAV_LOITER_RAD 80
param set VT_F_TRANS_DUR 1.5
param set VT_F_TRANS_THR 0.7
param set VT_MOT_COUNT 0
param set VT_TYPE 0
param set WEST_EN 1
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
param set V19_VT_ROLLDIR 0
fi
set MAV_TYPE 20
set MIXER_FILE etc/mixers-sitl/quad_x_vtol.main.mix
set MIXER custom
@@ -0,0 +1,53 @@
#!/bin/sh
#
# @name VTOL Tiltrotor
#
# @type VTOL Tiltrotor
#
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF = yes ]
then
param set FW_AIRSPD_MAX 25
param set FW_AIRSPD_MIN 14
param set FW_AIRSPD_TRIM 16
param set MC_ROLLRATE_P 0.3
param set MIS_LTRMIN_ALT 10
param set MIS_TAKEOFF_ALT 10
param set MIS_YAW_TMT 10
param set MPC_ACC_HOR_MAX 2
param set MPC_ACC_HOR_MAX 2
param set MPC_THR_MIN 0.1
param set MPC_TKO_SPEED 1
param set MPC_XY_P 0.15
param set MPC_XY_VEL_D 0.005
param set MPC_XY_VEL_I 0.2
param set MPC_XY_VEL_P 0.05
param set MPC_Z_VEL_MAX_DN 1.5
param set MPC_Z_VEL_P 0.8
param set NAV_ACC_RAD 5
param set NAV_LOITER_RAD 80
param set VT_F_TRANS_DUR 1.5
param set VT_F_TRANS_THR 0.75
param set VT_MOT_COUNT 4
param set VT_TILT_FW 3.1415
param set VT_TILT_TRANS 1.2
param set VT_ELEV_MC_LOCK 0
param set VT_TYPE 1
param set WEST_EN 1
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
param set V19_VT_ROLLDIR 0
fi
set MAV_TYPE 21
set MIXER_FILE etc/mixers-sitl/tiltrotor_sitl.main.mix
set MIXER custom
@@ -0,0 +1,37 @@
#!/bin/sh
#
# @name Rover
#
sh /etc/init.d/rc.ugv_defaults
if [ $AUTOCNF = yes ]
then
param set GND_L1_DIST 5
param set GND_SP_CTRL_MODE 1
param set GND_SPEED_D 3
param set GND_SPEED_I 0.001
param set GND_SPEED_IMAX 0.125
param set GND_SPEED_P 0.25
param set GND_SPEED_THR_SC 1
param set GND_SPEED_TRIM 4
param set GND_THR_CRUISE 0.3
param set GND_THR_IDLE 0
param set GND_THR_MAX 0.5
param set GND_THR_MIN 0
param set GND_WR_D 1.2
param set GND_WR_I 0.9674
param set GND_WR_IMAX 0.1
param set GND_WR_P 2
param set MIS_LTRMIN_ALT 0.01
param set MIS_TAKEOFF_ALT 0.01
param set NAV_ACC_RAD 0.5
param set NAV_LOITER_RAD 2
param set CBRK_AIRSPD_CHK 162128
fi
set MAV_TYPE 10
set MIXER_FILE etc/mixers-sitl/rover_sitl.main.mix
@@ -0,0 +1,28 @@
#!/bin/sh
#
# @name Typhoon H480 SITL
#
# @type Hexarotor x
#
sh /etc/init.d/rc.mc_defaults
if [ $AUTOCNF = yes ]
then
param set MC_PITCHRATE_P 0.1
param set MC_ROLLRATE_P 0.05
param set MPC_XY_VEL_I 0.2
param set MPC_XY_VEL_P 0.15
param set RTL_DESCEND_ALT 10
param set RTL_LAND_DELAY 0
param set TRIG_INTERFACE 3
param set TRIG_MODE 4
param set MNT_MODE_IN 0
param set MAV_PROTO_VER 2
fi
set MAV_TYPE 13
set MIXER hexa_x
@@ -0,0 +1,10 @@
mixer append /dev/pwm_output0 etc/mixers/mount_legs.aux.mix
mavlink start -x -u 14558 -r 4000 -f -m onboard -o 14530
# shellcheck disable=SC2154
mavlink stream -r 10 -s MOUNT_ORIENTATION -u $udp_gcs_port_local
# shellcheck disable=SC2154
mavlink stream -r 50 -s ATTITUDE_QUATERNION -u $udp_offboard_port_local
mavlink stream -r 10 -s MOUNT_ORIENTATION -u $udp_offboard_port_local
@@ -0,0 +1,18 @@
#!/bin/sh
# EKF2 replay script
publisher_rules_file="orb_publisher.rules"
cat <<EOF > "$publisher_rules_file"
restrict_topics: sensor_combined, vehicle_gps_position, vehicle_land_detected
module: replay
ignore_others: false
EOF
uorb start
param set SDLOG_DIRS_MAX 7
ekf2 start -r
logger start -f -t -b 1000 -p vehicle_attitude
sleep 0.2
replay start
+265
View File
@@ -0,0 +1,265 @@
#!/bin/sh
# PX4 commands need the 'px4-' prefix in bash.
# (px4-alias.sh is expected to be in the PATH)
# shellcheck disable=SC1091
. px4-alias.sh
SCRIPT_DIR="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)"
#
# Main SITL startup script
#
# check for ekf2 replay
# shellcheck disable=SC2154
if [ "$replay_mode" = "ekf2" ]
then
sh etc/init.d-posix/rc.replay
exit 0
fi
# initialize script variables
set AUX_MODE none
set IO_PRESENT no
set LOG_FILE bootlog.txt
set MAV_TYPE none
set MIXER none
set MIXER_AUX none
set MIXER_FILE none
set OUTPUT_MODE sim
set PWM_OUT none
set SDCARD_MIXERS_PATH etc/mixers
set USE_IO no
set VEHICLE_TYPE none
set LOGGER_BUF 1000
set RUN_MINIMAL_SHELL no
# Use the variable set by sitl_run.sh to choose the model settings.
if [ "$PX4_SIM_MODEL" = "shell" ]; then
set RUN_MINIMAL_SHELL yes
else
# Find the matching Autostart ID (file name has the form: [0-9]+_${PX4_SIM_MODEL})
# TODO: unify with rc.autostart generation
# shellcheck disable=SC2012
REQUESTED_AUTOSTART=$(ls "$SCRIPT_DIR" | sed -n 's/^\([0-9][0-9]*\)_'${PX4_SIM_MODEL}'$/\1/p')
if [ -z "$REQUESTED_AUTOSTART" ]; then
echo "Error: Unknown model '$PX4_SIM_MODEL'"
exit 1
fi
fi
# clear bootlog
[ -f $LOG_FILE ] && rm $LOG_FILE
uorb start
if [ -f eeprom/parameters ]
then
param load
fi
# exit early when the minimal shell is requested
[ $RUN_MINIMAL_SHELL = yes ] && exit 0
# Use environment variable PX4_ESTIMATOR to choose estimator.
if [ "$PX4_ESTIMATOR" = "ekf2" ]; then
param set SYS_MC_EST_GROUP 2
elif [ "$PX4_ESTIMATOR" = "lpe" ]; then
param set SYS_MC_EST_GROUP 1
elif [ "$PX4_ESTIMATOR" = "inav" ]; then
param set SYS_MC_EST_GROUP 0
fi
if param compare SYS_AUTOSTART $REQUESTED_AUTOSTART
then
set AUTOCNF no
else
set AUTOCNF yes
fi
# multi-instance setup
# shellcheck disable=SC2154
param set MAV_SYS_ID $((px4_instance+1))
simulator_tcp_port=$((4560+px4_instance))
udp_offboard_port_local=$((14580+px4_instance))
udp_offboard_port_remote=$((14540+px4_instance))
udp_gcs_port_local=$((14570+px4_instance))
if [ $AUTOCNF = yes ]
then
param set SYS_AUTOSTART $REQUESTED_AUTOSTART
param set BAT_N_CELLS 3
param set CAL_ACC0_ID 1376264
param set CAL_ACC1_ID 1310728
param set CAL_ACC_PRIME 1376264
param set CAL_GYRO0_ID 2293768
param set CAL_GYRO_PRIME 2293768
param set CAL_MAG0_ID 196616
param set CAL_MAG_PRIME 196616
param set CBRK_AIRSPD_CHK 0
param set COM_DISARM_LAND 0.1
param set COM_OBL_ACT 2
param set COM_OBL_RC_ACT 0
param set COM_OF_LOSS_T 5
param set COM_RC_IN_MODE 1
param set EKF2_AID_MASK 1
param set EKF2_ANGERR_INIT 0.01
param set EKF2_HGT_MODE 0
param set EKF2_GBIAS_INIT 0.01
# LPE: GPS only mode
param set LPE_FUSION 145
param set MIS_TAKEOFF_ALT 2.5
param set MC_PITCH_P 6
param set MC_PITCHRATE_P 0.2
param set MC_ROLL_P 6
param set MC_ROLLRATE_P 0.2
param set MPC_ALT_MODE 0
param set MPC_HOLD_MAX_Z 2
param set MPC_Z_VEL_I 0.15
param set MPC_Z_VEL_P 0.6
param set MPC_XY_P 0.8
param set MPC_XY_VEL_P 0.2
param set MPC_XY_VEL_I 0.02
param set MPC_XY_VEL_D 0.016
param set MPC_JERK_MIN 10
param set MPC_JERK_MAX 20
param set MPC_ACC_HOR_MAX 3
param set NAV_ACC_RAD 2
param set NAV_DLL_ACT 2
param set RTL_DESCEND_ALT 5
param set RTL_LAND_DELAY 5
param set RTL_RETURN_ALT 30
# By default log from boot until first disarm.
param set SDLOG_MODE 1
# enable default, estimator replay and vision/avoidance logging profiles
param set SDLOG_PROFILE 131
param set SDLOG_DIRS_MAX 7
param set SENS_BOARD_ROT 0
param set SENS_BOARD_X_OFF 0.000001
param set SENS_DPRES_OFF 0.001
param set SYS_RESTART_TYPE 2
param set WEST_EN 0
fi
# Adapt timeout parameters if simulation runs faster or slower than realtime.
if [ ! -z $PX4_SIM_SPEED_FACTOR ]; then
COM_DL_LOSS_T_LONGER=$(echo "$PX4_SIM_SPEED_FACTOR * 10" | bc)
echo "COM_DL_LOSS_T set to $COM_DL_LOSS_T_LONGER"
param set COM_DL_LOSS_T $COM_DL_LOSS_T_LONGER
COM_RC_LOSS_T_LONGER=$(echo "$PX4_SIM_SPEED_FACTOR * 1" | bc)
echo "COM_RC_LOSS_T set to $COM_RC_LOSS_T_LONGER"
param set COM_RC_LOSS_T $COM_RC_LOSS_T_LONGER
COM_OF_LOSS_T_LONGER=$(echo "$PX4_SIM_SPEED_FACTOR * 10" | bc)
echo "COM_OF_LOSS_T set to $COM_OF_LOSS_T_LONGER"
param set COM_OF_LOSS_T $COM_OF_LOSS_T_LONGER
fi
# Autostart ID
autostart_file=''
for f in etc/init.d-posix/"$(param show -q SYS_AUTOSTART)"_*
do
filename=$(basename "$f")
case "$filename" in
*\.*)
# ignore files that contain a dot (e.g. <vehicle>.post)
;;
*)
autostart_file="$f"
;;
esac
done
if [ ! -e "$autostart_file" ]; then
echo "Error: no autostart file found ($autostart_file)"
exit 1
fi
sh "$autostart_file"
dataman start
replay tryapplyparams
simulator start -s -c $simulator_tcp_port
tone_alarm start
gyrosim start
accelsim start
barosim start
gpssim start
sensors start
commander start
navigator start
if param compare WEST_EN 1
then
wind_estimator start
fi
if ! param compare MNT_MODE_IN -1
then
vmount start
fi
if param greater TRIG_MODE 0
then
camera_trigger start
camera_feedback start
fi
if [ ${VEHICLE_TYPE} = fw -o ${VEHICLE_TYPE} = vtol ]
then
if param compare CBRK_AIRSPD_CHK 0
then
measairspeedsim start
fi
fi
# Configure vehicle type specific parameters.
# Note: rc.vehicle_setup is the entry point for rc.interface,
# rc.fw_apps, rc.mc_apps, rc.ugv_apps, and rc.vtol_apps.
#
sh etc/init.d/rc.vehicle_setup
# GCS link
mavlink start -x -u $udp_gcs_port_local -r 4000000
mavlink stream -r 50 -s POSITION_TARGET_LOCAL_NED -u $udp_gcs_port_local
mavlink stream -r 50 -s LOCAL_POSITION_NED -u $udp_gcs_port_local
mavlink stream -r 50 -s GLOBAL_POSITION_INT -u $udp_gcs_port_local
mavlink stream -r 50 -s ATTITUDE -u $udp_gcs_port_local
mavlink stream -r 50 -s ATTITUDE_QUATERNION -u $udp_gcs_port_local
mavlink stream -r 50 -s ATTITUDE_TARGET -u $udp_gcs_port_local
mavlink stream -r 50 -s SERVO_OUTPUT_RAW_0 -u $udp_gcs_port_local
mavlink stream -r 20 -s RC_CHANNELS -u $udp_gcs_port_local
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u $udp_gcs_port_local
# API/Offboard link
mavlink start -x -u $udp_offboard_port_local -r 4000000 -m onboard -o $udp_offboard_port_remote
# execute autostart post script if any
[ -e "$autostart_file".post ] && sh "$autostart_file".post
# Run script to start logging
sh etc/init.d/rc.logging
mavlink boot_complete
replay trystart
@@ -1,13 +0,0 @@
#!nsh
#
# @name HIL Quadcopter X
#
# @type Simulation
# @class Copter
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
sh /etc/init.d/4001_quad_x
param set SYS_HITL 1
@@ -1,26 +0,0 @@
#!nsh
#
# @name Quadrotor X Tailsitter
#
# @type VTOL Quad Tailsitter
# @class VTOL
#
# @maintainer Roman Bapst <roman@px4.io>
#
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
then
param set VT_MOT_COUNT 4
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 0
param set VT_ELEV_MC_LOCK 1
fi
set MIXER quad_x_vtol
set PWM_OUT 1234
set PWM_MAX 2000
set PWM_RATE 400
set MAV_TYPE 20
@@ -1,87 +0,0 @@
#!nsh
#
# @name Sparkle Tech Ranger VTOL
#
# @type Standard VTOL
# @class VTOL
#
# @maintainer Andreas Antener <andreas@uaventure.com>
#
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
then
param set VT_TYPE 2
param set VT_MOT_COUNT 4
param set VT_IDLE_PWM_MC 1180
param set MAV_TYPE 22
param set VT_ARSP_TRANS 15.0
param set VT_B_TRANS_DUR 4.0
param set VT_TRANS_MIN_TM 5.0
param set VT_F_TRANS_THR 0.6
param set VT_TRANS_TIMEOUT 30.0
param set FW_AIRSPD_MAX 22.0
param set FW_AIRSPD_MIN 14.0
param set FW_AIRSPD_TRIM 16.0
param set FW_L1_PERIOD 25.0
param set FW_PR_P 0.060
param set FW_P_RMAX_NEG 40.0
param set FW_P_RMAX_POS 40.0
param set FW_RR_FF 0.4
param set FW_RR_P 0.04
param set FW_R_RMAX 40.0
param set MC_PITCHRATE_D 0.004
param set MC_PITCHRATE_I 0.0
param set MC_PITCHRATE_MAX 60.0
param set MC_PITCHRATE_P 0.21
param set MC_PITCH_P 4.0
param set MC_ROLLRATE_D 0.004
param set MC_ROLLRATE_I 0.002
param set MC_ROLLRATE_MAX 60.0
param set MC_ROLLRATE_P 0.24
param set MC_ROLL_P 4.0
param set MC_YAWRATE_I 0.02
param set MC_YAWRATE_MAX 40.0
param set MC_YAWRATE_P 0.18
param set MC_YAWRATE_MAX 40.0
param set MC_YAWRAUTO_MAX 40.0
param set MIS_TAKEOFF_ALT 2.5
param set MIS_YAW_TMT 20.0
param set MPC_ACC_HOR_MAX 1.0
param set MPC_HOLD_MAX_XY 0.5
param set MPC_HOLD_MAX_Z 0.5
param set MPC_LAND_SPEED 1.0
param set MPC_MANTHR_MIN 0.05
param set MPC_MAN_Y_MAX 120.0
param set MPC_THR_MIN 0.07
param set MPC_TILTMAX_AIR 35.0
param set MPC_TILTMAX_LND 20.0
param set MPC_TKO_SPEED 1.0
param set MPC_XY_P 0.3
param set MPC_XY_VEL_MAX 3.0
param set MPC_XY_VEL_P 0.05
param set MPC_Z_P 0.5
param set MPC_Z_VEL_P 0.1
param set NAV_ACC_RAD 3.0
param set PWM_AUX_REV1 1
param set PWM_AUX_REV2 1
param set PWM_AUX_REV3 1
param set PWM_AUX_REV4 1
fi
set MIXER quad_x
set PWM_OUT 1234
set PWM_RATE 400
set MIXER_AUX vtol_AAERT
set PWM_ACHDIS 5
set PWM_AUX_DISARMED 950
set MAV_TYPE 22
-40
View File
@@ -1,40 +0,0 @@
#!nsh
#
# @name CruiseAder Claire
#
# @type VTOL Tiltrotor
# @class VTOL
#
# @maintainer Samay Siga <samay_s@icloud.com>
#
# @board px4fmu-v2 exclude
#
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
then
param set VT_TYPE 1
param set VT_TILT_MC 0.08
param set VT_TILT_TRANS 0.5
param set VT_TILT_FW 0.9
param set VT_MOT_COUNT 4
param set VT_FW_MOT_OFFID 13
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 1
fi
set MIXER claire
set PWM_OUT 1234
set PWM_RATE 400
set PWM_MAX 2000
set MIXER_AUX claire
set PWM_AUX_RATE 50
set PWM_AUX_RATE 123
set PWM_AUX_MIN 1000
set PWM_AUX_MAX 2000
set PWM_AUX_DISARMED 1000
set MAV_TYPE 21
@@ -1,83 +0,0 @@
#!nsh
#
# @name E-flite Convergence
#
# @type VTOL Tiltrotor
# @class VTOL
#
# @maintainer Andreas Antener <andreas@uaventure.com>
#
# @output MAIN1 Motor right
# @output MAIN2 Motor left
# @output MAIN3 Motor back
# @output MAIN4 empty
# @output MAIN5 Tilt servo right
# @output MAIN6 Tilt servo left
# @output MAIN7 Elevon right
# @output MAIN8 Elevon left
#
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
then
param set VT_MOT_COUNT 3
param set VT_FW_MOT_OFFID 3
param set VT_IDLE_PWM_MC 1200
param set VT_TYPE 1
param set VT_B_TRANS_DUR 1.0
param set VT_FW_DIFTHR_EN 1
param set VT_FW_DIFTHR_SC 0.17
param set VT_FW_PERM_STAB 0
param set VT_F_TRANS_DUR 1.2
param set VT_F_TR_OL_TM 4.0
param set VT_TILT_FW 1.0
param set VT_TILT_MC 0.0
param set VT_TILT_TRANS 0.45
param set VT_TRANS_MIN_TM 1.2
param set VT_TRANS_P2_DUR 1.3
param set FW_L1_PERIOD 17
param set FW_MAN_R_MAX 50.0
param set FW_ACRO_X_MAX 270
param set FW_ACRO_Y_MAX 270
param set FW_ACRO_Z_MAX 180
param set FW_PR_FF 0.5
param set FW_PR_P 0.08
param set FW_PSP_OFF 5.0
param set FW_P_LIM_MAX 30
param set FW_P_LIM_MIN -30
param set FW_P_RMAX_NEG 60
param set FW_P_RMAX_POS 60
param set FW_RR_FF 0.33
param set FW_RR_P 0.11
param set FW_YR_FF 0.3
param set FW_YR_P 0.05
param set MC_PITCHRATE_D 0.003
param set MC_PITCHRATE_P 0.15
param set MC_PITCH_P 6.0
param set MC_ROLLRATE_D 0.003
param set MC_ROLLRATE_P 0.15
param set MC_ROLL_P 6.0
param set MC_YAWRATE_MAX 120
param set MC_YAWRATE_P 0.27
param set MC_YAW_FF 0.35
param set MC_YAW_P 2.5
param set MC_YAWRATE_P 0.3
param set MPC_LAND_SPEED 1.2
param set MPC_TKO_SPEED 2.5
param set MPC_Z_VEL_MAX_UP 3.0
param set CBRK_AIRSPD_CHK 162128
param set FW_ARSP_MODE 2
param set SENS_BOARD_ROT 8
fi
set MIXER vtol_convergence
set PWM_OUT 1234
set PWM_RATE 400
set MAV_TYPE 21
@@ -1,18 +0,0 @@
#!nsh
#
# @name Generic Flying Wing
#
# @type Flying Wing
# @class Plane
#
# @maintainer
#
sh /etc/init.d/rc.fw_defaults
if [ $AUTOCNF == yes ]
then
fi
set MIXER fw_generic_wing
-15
View File
@@ -1,15 +0,0 @@
#
#!nsh
#
# @name Viper
#
# @type Flying Wing
# @class Plane
#
# @maintainer Simon Wilks <simon@uaventure.com>
#
sh /etc/init.d/rc.fw_defaults
set MIXER Viper
-43
View File
@@ -1,43 +0,0 @@
#!nsh
#
# @name Parrot Bebop Frame
#
# @type Quadrotor x
# @class Copter
#
# @board px4fmu-v2 exclude
# @board px4fmu-v3 exclude
# @board px4fmu-v4 exclude
# @board px4fmu-v4pro exclude
# @board px4fmu-v5 exclude
# @board aerofc-v1 exclude
#
# @maintainer Michael Schaeuble
#
sh /etc/init.d/rc.mc_defaults
#
# Load default params for this platform
#
if [ $AUTOCNF == yes ]
then
# Set all params here, then disable autoconfig
param set MC_ROLL_P 6.5
param set MC_ROLLRATE_P 0.109999999403953552
param set MC_ROLLRATE_I 0.0
param set MC_ROLLRATE_D 0.0006
param set MC_PITCH_P 6.5
param set MC_PITCHRATE_P 0.1
param set MC_PITCHRATE_I 0.0
param set MC_PITCHRATE_D 0.000799999
param set MC_YAW_P 1.049999
param set MC_YAWRATE_P 0.05
param set MC_YAWRATE_I 0.001
param set MC_YAWRATE_D 0.0
param set MC_YAW_FF 0.7
fi
set OUTPUT_MODE bebop
set USE_IO no
set MIXER bebop
-95
View File
@@ -1,95 +0,0 @@
#!nsh
#
# @name 3DR Solo
#
# @type Quadrotor x
# @class Copter
#
# @board px4fmu-v2 exclude
# @board px4fmu-v4 exclude
# @board px4fmu-v4pro exclude
# @board px4fmu-v5 exclude
# @board aerofc-v1 exclude
#
# @maintainer Andreas Antener <andreas@uaventure.com>
#
sh /etc/init.d/rc.mc_defaults
if [ $AUTOCNF == yes ]
then
# tuning
param set MC_PITCHRATE_P 0.11
param set MC_ROLLRATE_P 0.11
param set MPC_MANTHR_MIN 0.08
param set MPC_XY_VEL_MAX 3.0
param set MPC_Z_VEL_MAX_DN 2.0
# INAV: higher GPS weights for better altitude control
param set INAV_W_Z_BARO 0.3
param set INAV_W_Z_GPS_P 0.8
param set INAV_W_Z_GPS_V 0.8
# takeoff, land and RTL settings
param set MIS_TAKEOFF_ALT 4.0
param set COM_DISARM_LAND 1
param set RTL_LAND_DELAY 1
param set RTL_DESCEND_ALT 5.0
param set RTL_RETURN_ALT 15.0
param set MPC_TILTMAX_LND 8.0
param set MPC_LAND_SPEED 0.4
param set MPC_HOLD_MAX_Z 1.5
param set MPC_TKO_JMPSPD 2.0
param set MPC_TKO_SPEED 1.5
# setup
# main board rotation: pitch 180
param set SENS_BOARD_ROT 12
# solo external mag rotation
param set CAL_MAG0_ROT 30
# no safety switch
param set CBRK_IO_SAFETY 22027
# battery voltage not available yet
param set CBRK_SUPPLY_CHK 894281
# RC configuration
param set RC_MAP_MODE_SW 5
param set RC_MAP_PITCH 2
param set RC_MAP_ROLL 1
param set RC_MAP_THROTTLE 3
param set RC_MAP_YAW 4
param set RC1_DZ 10
param set RC1_MAX 1988
param set RC1_MIN 1003
param set RC1_REV 1
param set RC1_TRIM 1499
param set RC2_DZ 10
param set RC2_MAX 1987
param set RC2_MIN 1023
param set RC2_REV -1
param set RC2_TRIM 1499
param set RC3_DZ 10
param set RC3_MAX 1877
param set RC3_MIN 1023
param set RC3_REV 1
param set RC3_TRIM 1023
param set RC4_DZ 10
param set RC4_MAX 1998
param set RC4_MIN 1012
param set RC4_REV 1
param set RC4_TRIM 1500
param set RC5_DZ 10
param set RC5_MAX 2000
param set RC5_MIN 1000
param set RC5_REV 1
param set RC5_TRIM 1500
fi
set MIXER quad_x
set PWM_OUT 1234
set MIXER_AUX none
# enable high-speed link on telem 1
set MAVLINK_F "-d /dev/ttyS1 -b 921600 -r 80000 -m onboard -x"
-48
View File
@@ -1,48 +0,0 @@
#!nsh
#
# @name Reaper 500 Quad
#
# @type Quadrotor H
# @class Copter
#
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 motor 4
# @output MAIN5 feed-through of RC AUX1 channel
# @output MAIN6 feed-through of RC AUX2 channel
#
# @maintainer Blankered
#
sh /etc/init.d/rc.mc_defaults
if [ $AUTOCNF == yes ]
then
param set MC_ROLL_P 6.5
param set MC_ROLLRATE_P 0.14
param set MC_ROLLRATE_I 0.1
param set MC_ROLLRATE_D 0.004
param set MC_PITCH_P 6.0
param set MC_PITCHRATE_P 0.14
param set MC_PITCHRATE_I 0.09
param set MC_PITCHRATE_D 0.004
param set MC_YAW_P 4
param set NAV_ACC_RAD 2.0
param set RTL_RETURN_ALT 30.0
param set RTL_DESCEND_ALT 10.0
param set PWM_MIN 1100
param set PWM_MAX 1900
param set PWM_AUX_DISARMED 950
fi
set MIXER quad_h
set PWM_RATE 50
set PWM_OUT 1234
set MIXER_AUX pass
set PWM_AUX_RATE 50
set PWM_AUX_OUT 1234
-65
View File
@@ -1,65 +0,0 @@
#!nsh
#
# @name Crazyflie 2.0
#
# @board px4fmu-v2 exclude
# @board px4fmu-v3 exclude
# @board px4fmu-v4 exclude
# @board px4fmu-v4pro exclude
# @board px4fmu-v5 exclude
# @board aerofc-v1 exclude
#
# @type Quadrotor x
# @class Copter
#
# @maintainer Dennis Shtatov <densht@gmail.com>
#
sh /etc/init.d/4001_quad_x
if [ $AUTOCNF == yes ]
then
param set COM_RC_IN_MODE 1
param set BAT_N_CELLS 1
param set BAT_CAPACITY 240
param set BAT_SOURCE 1
param set PWM_DISARMED 0
param set PWM_MIN 0
param set PWM_MAX 255
param set SYS_COMPANION 20
param set MC_PITCHRATE_D 0.002
param set MC_PITCHRATE_I 0.2
param set MC_PITCHRATE_P 0.07
param set MC_PITCH_P 6.5
param set MC_ROLLRATE_D 0.002
param set MC_ROLLRATE_I 0.2
param set MC_ROLLRATE_P 0.07
param set MC_ROLL_P 6.5
param set MC_YAW_P 3.0
param set EKF2_HGT_MODE 2
param set EKF2_AID_MASK 3
param set EKF2_OF_DELAY 10
param set MPC_THR_HOVER 0.7
param set MPC_MANTHR_MAX 1.0
param set MPC_THR_MAX 1.0
param set MPC_Z_P 1.5
param set MPC_Z_VEL_I 0.3
param set MPC_Z_VEL_P 0.4
param set MPC_HOLD_MAX_XY 0.1
param set MPC_MAX_FLOW_HGT 3
param set IMU_GYRO_CUTOFF 100
param set IMU_ACCEL_CUTOFF 30
param set MC_DTERM_CUTOFF 70
param set SYS_FMU_TASK 1
param set CBRK_SUPPLY_CHK 894281
param set CBRK_USB_CHK 197848
param set SDLOG_PROFILE 1
param set EKF2_MAG_TYPE 1
param set EKF2_ABL_LIM 2.0
param set MC_AIRMODE 1
param set NAV_RCL_ACT 3
param set SENS_FLOW_MINRNG 0.05
fi
set PWM_MIN none
set PWM_MAX none
set PWM_DISARMED none
# Will run the motors at 328.125 kHz (recommended)
set PWM_RATE 3921
+3 -70
View File
@@ -32,87 +32,20 @@
############################################################################
px4_add_romfs_files(
1000_rc_fw_easystar.hil
1001_rc_quad_x.hil
2100_standard_plane
2105_maja
2106_albatross
24001_dodeca_cox
3000_generic_wing
3030_io_camflyer
3031_phantom
3032_skywalker_x5
3033_wingwing
3034_fx79
3035_viper
3036_pigeon
3037_parrot_disco_mod
3100_tbs_caipirinha
4001_quad_x
4002_quad_x_mount
4003_qavr5
4004_H4_680mm
4009_qav250
4010_dji_f330
4011_dji_f450
4012_quad_x_can
4013_bebop
4020_hk_micro_pcb
4030_3dr_solo
4031_3dr_quad
4040_reaper
4050_generic_250
4051_s250aq
4060_dji_matrice_100
4070_aerofc
4080_zmr250
4090_nanomind
4900_crazyflie
5001_quad_+
6001_hexa_x
7001_hexa_+
8001_octo_x
9001_octo_+
10015_tbs_discovery
10016_3dr_iris
10017_steadidrone_qu4d
10018_tbs_endurance
11001_hexa_cox
12001_octo_cox
12002_steadidrone_mavrik
13000_generic_vtol_standard
13001_caipirinha_vtol
13002_firefly6
13003_quad_tailsitter
13004_quad+_tailsitter
13005_vtol_AAERT_quad
13006_vtol_standard_delta
13007_vtol_AAVVT_quad
13008_QuadRanger
13009_vtol_spt_ranger
13010_claire
13012_convergence
13013_deltaquad
14001_tri_y_yaw+
14002_tri_y_yaw-
15001_coax_heli
16001_helicopter
50000_generic_ground_vehicle
50001_axialracing_ax10
50002_traxxas_stampede_2wd
rc.axialracing_ax10_apps
rc.axialracing_ax10_defaults
rc.fw_apps
rc.fw_defaults
rc.interface
rc.io
rc.logging
rc.mavlink
rc.mc_apps
rc.mc_defaults
rcS
rc.sensors
rc.thermal_cal
rc.ugv_apps
rc.ugv_defaults
rc.vehicle_setup
rc.vtol_apps
rc.vtol_defaults
)
@@ -1,4 +1,4 @@
#!nsh
#!/bin/sh
#
# @name HILStar (XPlane)
#
@@ -17,9 +17,10 @@
sh /etc/init.d/rc.fw_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set BAT_N_CELLS 3
param set FW_AIRSPD_MAX 20
param set FW_AIRSPD_MIN 12
param set FW_AIRSPD_TRIM 14
@@ -41,8 +42,10 @@ then
param set FW_RR_I 0.1
param set FW_RR_IMAX 0.2
param set FW_RR_P 0.3
param set RWTO_TKOFF 1
fi
param set SYS_HITL 1
set MIXER AERT
@@ -1,4 +1,4 @@
#!nsh
#!/bin/sh
#
# @name Team Blacksheep Discovery
#
@@ -22,7 +22,7 @@
sh /etc/init.d/rc.mc_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set MC_ROLL_P 6.5
param set MC_ROLLRATE_P 0.1
@@ -35,7 +35,7 @@ then
param set MC_YAW_P 2.8
param set MC_YAWRATE_P 0.28
param set MC_YAWRATE_I 0.1
param set MC_YAWRATE_D 0.0
param set MC_YAWRATE_D 0
fi
set MIXER quad_w
@@ -1,4 +1,4 @@
#!nsh
#!/bin/sh
#
# @name 3DR Iris Quadrotor
#
@@ -20,21 +20,21 @@
sh /etc/init.d/rc.mc_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
# TODO tune roll/pitch separately
param set MC_ROLL_P 7.0
param set MC_ROLL_P 7
param set MC_ROLLRATE_P 0.15
param set MC_ROLLRATE_I 0.05
param set MC_ROLLRATE_D 0.004
param set MC_PITCH_P 7.0
param set MC_PITCH_P 7
param set MC_PITCHRATE_P 0.15
param set MC_PITCHRATE_I 0.05
param set MC_PITCHRATE_D 0.004
param set MC_YAW_P 2.5
param set MC_YAWRATE_P 0.25
param set MC_YAWRATE_I 0.25
param set MC_YAWRATE_D 0.0
param set MC_YAWRATE_D 0
param set BAT_V_DIV 12.27559
param set BAT_A_PER_V 15.39103
@@ -1,4 +1,4 @@
#!nsh
#!/bin/sh
#
# @name Steadidrone QU4D
#
@@ -22,23 +22,22 @@
sh /etc/init.d/rc.mc_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set MC_ROLL_P 7.0
param set BAT_N_CELLS 4
param set MC_ROLL_P 7
param set MC_ROLLRATE_P 0.13
param set MC_ROLLRATE_I 0.05
param set MC_ROLLRATE_D 0.004
param set MC_PITCH_P 7.0
param set MC_PITCH_P 7
param set MC_PITCHRATE_P 0.19
param set MC_PITCHRATE_I 0.05
param set MC_PITCHRATE_D 0.004
param set MC_YAW_P 4.0
param set MC_YAW_P 4
param set MC_YAWRATE_P 0.2
param set MC_YAWRATE_I 0.1
param set MC_YAWRATE_D 0.0
param set MC_YAW_FF 0.5
param set BAT_N_CELLS 4
param set MC_YAWRATE_D 0
fi
set MIXER quad_w
@@ -1,4 +1,4 @@
#!nsh
#!/bin/sh
#
# @name Team Blacksheep Discovery Endurance
#
@@ -22,25 +22,26 @@
sh /etc/init.d/rc.mc_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set BAT_N_CELLS 6
param set BAT_V_EMPTY 3.5
param set MC_ROLL_P 7.0
param set MC_ROLL_P 7
param set MC_ROLLRATE_P 0.08
param set MC_ROLLRATE_I 0.02
param set MC_ROLLRATE_D 0.003
param set MC_PITCH_P 7.0
param set MC_PITCH_P 7
param set MC_PITCHRATE_P 0.13
param set MC_PITCHRATE_I 0.02
param set MC_PITCHRATE_D 0.005
param set MC_YAW_P 2.8
param set MC_YAWRATE_P 0.2
param set MC_YAWRATE_I 0.1
param set MC_YAWRATE_D 0.0
param set MC_YAWRATE_D 0
param set MPC_XY_VEL_MAX 2
param set PWM_MIN 1080
fi
@@ -0,0 +1,21 @@
#!/bin/sh
#
# @name HIL Quadcopter X
#
# @type Simulation
# @class Copter
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
sh /etc/init.d/rc.mc_defaults
set MIXER quad_x
set PWM_OUT 1234
if [ $AUTOCNF = yes ]
then
param set COM_DISARM_LAND 5
fi
param set SYS_HITL 1
@@ -0,0 +1,75 @@
#!/bin/sh
#
# @name HIL Standard VTOL QuadPlane
#
# @type Standard VTOL
# @class VTOL
#
# @maintainer Roman Bapst <roman@auterion.com>
#
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF = yes ]
then
param set BAT_N_CELLS 3
param set COM_DISARM_LAND 5
param set COM_RC_IN_MODE 1
param set EKF2_AID_MASK 1
param set EKF2_ANGERR_INIT 0.01
param set EKF2_GBIAS_INIT 0.01
param set EKF2_HGT_MODE 0
param set EKF2_MAG_TYPE 1
param set FW_AIRSPD_MAX 25
param set FW_AIRSPD_MIN 14
param set FW_AIRSPD_TRIM 16
param set MC_PITCH_P 6
param set MC_PITCHRATE_P 0.2
param set MC_ROLL_P 6
param set MC_ROLLRATE_P 0.3
param set MIS_LTRMIN_ALT 10
param set MIS_TAKEOFF_ALT 10
param set MIS_YAW_TMT 10
param set MPC_ACC_HOR_MAX 2
param set MPC_ACC_HOR_MAX 2
param set MPC_THR_MIN 0.1
param set MPC_TKO_SPEED 1
param set MPC_XY_P 0.8
param set MPC_XY_VEL_D 0.005
param set MPC_XY_VEL_I 0.2
param set MPC_XY_VEL_P 0.15
param set MPC_Z_VEL_I 0.15
param set MPC_Z_VEL_MAX_DN 1.5
param set MPC_Z_VEL_P 0.6
param set NAV_ACC_RAD 5
param set NAV_DLL_ACT 2
param set NAV_LOITER_RAD 80
param set RTL_DESCEND_ALT 10
param set RTL_LAND_DELAY 0
param set RTL_RETURN_ALT 30
param set SDLOG_DIRS_MAX 7
param set SYS_RESTART_TYPE 2
param set VT_F_TRANS_THR 0.75
param set VT_MOT_COUNT 4
param set VT_TYPE 2
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
param set V19_VT_ROLLDIR 0
fi
param set SYS_HITL 1
set MAV_TYPE 22
set MIXER standard_vtol_hitl
set PWM_OUT 1234
@@ -1,4 +1,4 @@
#!nsh
#!/bin/sh
#
# @name Generic Hexarotor coaxial geometry
#
@@ -0,0 +1,17 @@
#!/bin/sh
#
# @name SIH Quadcopter X
#
# @type Simulation
# @class Copter
#
# @maintainer Romain Chiappinelli <romain.chiap@gmail.com>
#
sh /etc/init.d/rc.mc_defaults
set MIXER quad_x
set PWM_OUT 1234
# set SYS_HITL to 2 to start the SIH and avoid sensors startup
param set SYS_HITL 2
@@ -1,4 +1,4 @@
#!nsh
#!/bin/sh
#
# @name Generic 10" Octo coaxial geometry
#
@@ -1,4 +1,4 @@
#!nsh
#!/bin/sh
#
# @name Steadidrone MAVRIK
#
@@ -19,29 +19,28 @@
sh /etc/init.d/rc.mc_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set MC_PITCH_P 4.0
param set MC_PITCH_P 4
param set MC_PITCHRATE_P 0.24
param set MC_PITCHRATE_I 0.09
param set MC_PITCHRATE_D 0.013
param set MC_PITCHRATE_MAX 180.0
param set MC_PITCHRATE_MAX 180
param set MC_ROLL_P 4.0
param set MC_ROLL_P 4
param set MC_ROLLRATE_P 0.16
param set MC_ROLLRATE_I 0.07
param set MC_ROLLRATE_D 0.009
param set MC_ROLLRATE_MAX 180.0
param set MC_ROLLRATE_MAX 180
param set MC_YAW_P 3.0
param set MC_YAW_P 3
param set MC_YAWRATE_P 0.2
param set MC_YAWRATE_I 0.1
param set MC_YAWRATE_D 0.0
param set MC_YAW_FF 0.5
param set MC_YAWRATE_D 0
param set MPC_HOLD_MAX_XY 0.25
param set MPC_THR_MIN 0.15
param set MPC_Z_VEL_MAX_DN 2.0
param set MPC_Z_VEL_MAX_DN 2
param set BAT_N_CELLS 4
fi
@@ -1,4 +1,4 @@
#!nsh
#!/bin/sh
#
# @name Generic Quadplane VTOL
#
@@ -20,18 +20,21 @@
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set PWM_AUX_DIS5 950
param set PWM_RATE 400
param set VT_TYPE 2
param set VT_MOT_COUNT 4
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
param set V19_VT_ROLLDIR 0
fi
set MIXER quad_x
set PWM_OUT 1234
set PWM_RATE 400
set MIXER_AUX vtol_AAERT
set PWM_ACHDIS 5
set PWM_AUX_DISARMED 950
set MAV_TYPE 22
set MIXER quad_x
set MIXER_AUX vtol_AAERT
set PWM_OUT 1234
@@ -1,4 +1,4 @@
#!nsh
#!/bin/sh
#
# @name Caipiroshka Duo Tailsitter
#
@@ -15,32 +15,35 @@
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set MC_ROLL_P 6.0
param set MC_ROLL_P 6
param set MC_ROLLRATE_P 0.12
param set MC_ROLLRATE_I 0.002
param set MC_ROLLRATE_D 0.003
param set MC_ROLLRATE_FF 0.0
param set MC_ROLLRATE_FF 0
param set MC_PITCH_P 4.5
param set MC_PITCHRATE_P 0.3
param set MC_PITCHRATE_I 0.002
param set MC_PITCHRATE_D 0.003
param set MC_PITCHRATE_FF 0.0
param set MC_PITCHRATE_FF 0
param set MC_YAW_P 3.8
param set MC_YAW_FF 0.5
param set MC_YAWRATE_P 0.22
param set MC_YAWRATE_I 0.02
param set MC_YAWRATE_D 0.0
param set MC_YAWRATE_FF 0.0
param set MC_YAWRATE_D 0
param set MC_YAWRATE_FF 0
param set VT_MOT_COUNT 2
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 0
param set MAV_TYPE 19
param set VT_ELEV_MC_LOCK 0
param set VT_MOT_COUNT 2
param set VT_TYPE 0
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
param set V19_VT_ROLLDIR 0
fi
set MAV_TYPE 19
set MIXER caipirinha_vtol
set PWM_OUT 1234
@@ -1,4 +1,4 @@
#!nsh
#!/bin/sh
#
# @name BirdsEyeView Aerobotics FireFly6
# @type VTOL Tiltrotor
@@ -20,39 +20,42 @@
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set MC_ROLL_P 7.0
param set MC_ROLL_P 7
param set MC_ROLLRATE_P 0.19
param set MC_ROLLRATE_I 0.002
param set MC_ROLLRATE_D 0.005
param set MC_ROLLRATE_FF 0.0
param set MC_PITCH_P 7.0
param set MC_ROLLRATE_FF 0
param set MC_PITCH_P 7
param set MC_PITCHRATE_P 0.14
param set MC_PITCHRATE_I 0.002
param set MC_PITCHRATE_D 0.004
param set MC_PITCHRATE_FF 0.0
param set MC_YAW_P 4.0
param set MC_YAW_FF 0.5
param set MC_PITCHRATE_FF 0
param set MC_YAW_P 4
param set MC_YAWRATE_P 0.22
param set MC_YAWRATE_I 0.02
param set MC_YAWRATE_D 0.0
param set MC_YAWRATE_FF 0.0
param set MC_YAWRATE_D 0
param set MC_YAWRATE_FF 0
param set PWM_RATE 400
param set VT_FW_MOT_OFFID 34
param set VT_IDLE_PWM_MC 1080
param set VT_MOT_COUNT 6
param set VT_TILT_MC 0.08
param set VT_TILT_TRANS 0.5
param set VT_TILT_FW 0.9
param set VT_MOT_COUNT 6
param set VT_FW_MOT_OFFID 34
param set VT_IDLE_PWM_MC 1080
param set VT_ELEV_MC_LOCK 0
param set VT_TYPE 1
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
param set V19_VT_ROLLDIR 0
fi
set MIXER firefly6
set PWM_OUT 12345678
set PWM_RATE 400
set MAV_TYPE 21
set MIXER firefly6
set MIXER_AUX firefly6
set MAV_TYPE 21
set PWM_OUT 12345678
@@ -0,0 +1,31 @@
#!/bin/sh
#
# @name Quadrotor X Tailsitter
#
# @type VTOL Quad Tailsitter
# @class VTOL
#
# @maintainer Roman Bapst <roman@px4.io>
#
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF = yes ]
then
param set PWM_MAX 2000
param set PWM_RATE 400
param set VT_MOT_COUNT 4
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 0
param set VT_ELEV_MC_LOCK 1
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
param set V19_VT_ROLLDIR 0
fi
set MAV_TYPE 20
set MIXER quad_x_vtol
set PWM_OUT 1234
@@ -1,4 +1,4 @@
#!nsh
#!/bin/sh
#
# @name Quadrotor + Tailsitter
#
@@ -16,22 +16,27 @@
#
# @maintainer Roman Bapst <roman@px4.io>
#
# @board px4fmu-v2 exclude
# @board px4_fmu-v2 exclude
#
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set VT_MOT_COUNT 4
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 0
param set VT_ELEV_MC_LOCK 1
param set PWM_MAX 2000
param set PWM_RATE 400
param set VT_MOT_COUNT 4
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 0
param set VT_ELEV_MC_LOCK 1
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
param set V19_VT_ROLLDIR 0
fi
set MAV_TYPE 20
set MIXER quad_+_vtol
set PWM_OUT 1234
set PWM_MAX 2000
set PWM_RATE 400
set MAV_TYPE 20
@@ -1,4 +1,4 @@
#!nsh
#!/bin/sh
#
# @name Fun Cub Quad VTOL
#
@@ -20,32 +20,30 @@
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set VT_TYPE 2
param set VT_MOT_COUNT 4
param set VT_F_TRANS_THR 0.75
param set VT_ARSP_TRANS 12
param set VT_ARSP_BLEND 6
param set PWM_AUX_DIS5 950
param set MC_ROLL_P 6.0
param set PWM_RATE 400
param set MC_ROLL_P 6
param set MC_ROLLRATE_P 0.17
param set MC_ROLLRATE_I 0.002
param set MC_ROLLRATE_D 0.004
param set MC_ROLLRATE_FF 0.0
param set MC_PITCH_P 6.0
param set MC_ROLLRATE_FF 0
param set MC_PITCH_P 6
param set MC_PITCHRATE_P 0.19
param set MC_PITCHRATE_I 0.002
param set MC_PITCHRATE_D 0.004
param set MC_PITCHRATE_FF 0.0
param set MC_PITCHRATE_FF 0
param set MC_YAW_P 2.8
param set MC_YAW_FF 0.5
param set MC_YAWRATE_P 0.22
param set MC_YAWRATE_I 0.02
param set MC_YAWRATE_D 0.0
param set MC_YAWRATE_FF 0.0
param set MC_YAWRATE_D 0
param set MC_YAWRATE_FF 0
param set MC_YAWRATE_MAX 40
param set MC_YAWRAUTO_MAX 40
param set MPC_YAWRAUTO_MAX 40
param set FW_PR_FF 0.5
param set FW_PR_I 0.02
@@ -57,17 +55,20 @@ then
param set FW_RR_P 0.05
param set FW_THR_CRUISE 0.75
param set VT_ARSP_BLEND 6
param set VT_ARSP_TRANS 12
param set VT_F_TRANS_THR 0.75
param set VT_MOT_COUNT 4
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 2
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
param set V19_VT_ROLLDIR 0
fi
set MIXER quad_x
set PWM_OUT 1234
set PWM_RATE 400
set MIXER_AUX vtol_AAERT
set PWM_ACHDIS 5
set PWM_AUX_DISARMED 950
set MAV_TYPE 22
set MIXER quad_x
set MIXER_AUX vtol_AAERT
set PWM_OUT 1234
@@ -1,4 +1,4 @@
#!nsh
#!/bin/sh
#
# @name Generic quad delta VTOL
#
@@ -18,46 +18,45 @@
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set VT_TYPE 2
param set VT_MOT_COUNT 4
param set VT_F_TRANS_THR 0.75
param set MC_ROLL_P 6.5
param set MC_ROLLRATE_P 0.15
param set MC_ROLLRATE_I 0.01
param set MC_ROLLRATE_D 0.003
param set MC_ROLLRATE_FF 0.0
param set MC_ROLLRATE_FF 0
param set MC_PITCH_P 6.5
param set MC_PITCHRATE_P 0.15
param set MC_PITCHRATE_I 0.01
param set MC_PITCHRATE_D 0.003
param set MC_PITCHRATE_FF 0.0
param set MC_PITCHRATE_FF 0
param set MC_YAW_P 3.5
param set MC_YAW_FF 0.5
param set MC_YAWRATE_P 0.2
param set MC_YAWRATE_I 0.1
param set MC_YAWRATE_D 0.0
param set MC_YAWRATE_FF 0.0
param set MC_YAWRATE_D 0
param set MC_YAWRATE_FF 0
param set MC_YAWRATE_MAX 50
param set MC_YAWRAUTO_MAX 20
param set MPC_XY_P 0.8
param set MPC_XY_VEL_P 0.1
param set MPC_ACC_HOR_MAX 2.0
param set MPC_ACC_HOR_MAX 2
param set MPC_YAWRAUTO_MAX 20
param set PWM_AUX_DIS3 950
param set PWM_RATE 400
param set VT_MOT_COUNT 4
param set VT_F_TRANS_THR 0.75
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 2
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
param set V19_VT_ROLLDIR 0
fi
set MIXER quad_x
set PWM_OUT 1234
set PWM_RATE 400
set MIXER_AUX vtol_delta
set PWM_ACHDIS 3
set PWM_AUX_DISARMED 950
set MAV_TYPE 22
set MIXER quad_x
set MIXER_AUX vtol_delta
set PWM_OUT 1234
@@ -1,4 +1,4 @@
#!nsh
#!/bin/sh
#
# @name Generic AAVVT v-tail plane airframe with Quad VTOL.
#
@@ -10,42 +10,42 @@
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set VT_TYPE 2
param set VT_MOT_COUNT 4
param set VT_F_TRANS_THR 0.75
param set MC_ROLL_P 7.0
param set MC_ROLL_P 7
param set MC_ROLLRATE_P 0.15
param set MC_ROLLRATE_I 0.002
param set MC_ROLLRATE_D 0.003
param set MC_ROLLRATE_FF 0.0
param set MC_PITCH_P 7.0
param set MC_ROLLRATE_FF 0
param set MC_PITCH_P 7
param set MC_PITCHRATE_P 0.12
param set MC_PITCHRATE_I 0.002
param set MC_PITCHRATE_D 0.003
param set MC_PITCHRATE_FF 0.0
param set MC_PITCHRATE_FF 0
param set MC_YAW_P 2.8
param set MC_YAW_FF 0.5
param set MC_YAWRATE_P 0.22
param set MC_YAWRATE_I 0.02
param set MC_YAWRATE_D 0.0
param set MC_YAWRATE_FF 0.0
param set MC_YAWRATE_D 0
param set MC_YAWRATE_FF 0
param set MC_YAWRATE_MAX 40
param set MC_YAWRAUTO_MAX 40
param set MPC_YAWRAUTO_MAX 40
param set PWM_AUX_DIS5 950
param set PWM_RATE 400
param set VT_F_TRANS_THR 0.75
param set VT_MOT_COUNT 4
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 2
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
param set V19_VT_ROLLDIR 0
fi
set MIXER quad_x
set PWM_OUT 1234
set PWM_RATE 400
set MIXER_AUX vtol_AAVVT
set PWM_ACHDIS 5
set PWM_AUX_DISARMED 950
set MAV_TYPE 22
set MIXER quad_x
set MIXER_AUX vtol_AAVVT
set PWM_OUT 1234
@@ -1,4 +1,4 @@
#!nsh
#!/bin/sh
#
# @name QuadRanger
#
@@ -10,40 +10,9 @@
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set VT_TYPE 2
param set VT_MOT_COUNT 4
param set VT_F_TRANS_THR 0.75
param set PWM_AUX_REV1 1
param set PWM_AUX_REV2 1
param set MC_ROLL_P 7.0
param set MC_ROLLRATE_P 0.15
param set MC_ROLLRATE_I 0.1
param set MC_ROLLRATE_D 0.004
param set MC_ROLLRATE_FF 0.0
param set MC_PITCH_P 7.0
param set MC_PITCHRATE_P 0.15
param set MC_PITCHRATE_I 0.1
param set MC_PITCHRATE_D 0.004
param set MC_PITCHRATE_FF 0.0
param set MC_YAW_P 3.5
param set MC_YAW_FF 0.7
param set MC_YAWRATE_P 0.6
param set MC_YAWRATE_I 0.04
param set MC_YAWRATE_D 0.0
param set MC_YAWRATE_FF 0.0
param set MC_YAWRATE_MAX 40.0
param set MC_YAWRAUTO_MAX 40.0
param set MPC_ACC_HOR_MAX 2.0
param set MPC_Z_VEL_MAX_DN 1.5
param set MPC_TKO_SPEED 1.5
param set MPC_LAND_SPEED 0.8
param set FW_THR_CRUISE 65.0
param set FW_THR_CRUISE 65
param set FW_PR_P 0.08
param set FW_PR_FF 0.5
param set FW_RR_P 0.05
@@ -51,21 +20,49 @@ then
param set MIS_YAW_TMT 10
param set VT_ARSP_TRANS 15.0
param set VT_ARSP_BLEND 8.0
param set VT_B_TRANS_DUR 4.0
param set MC_ROLL_P 7
param set MC_ROLLRATE_P 0.15
param set MC_ROLLRATE_I 0.1
param set MC_ROLLRATE_D 0.004
param set MC_ROLLRATE_FF 0
param set MC_PITCH_P 7
param set MC_PITCHRATE_P 0.15
param set MC_PITCHRATE_I 0.1
param set MC_PITCHRATE_D 0.004
param set MC_PITCHRATE_FF 0
param set MC_YAW_P 3.5
param set MC_YAWRATE_P 0.6
param set MC_YAWRATE_I 0.04
param set MC_YAWRATE_D 0
param set MC_YAWRATE_FF 0
param set MC_YAWRATE_MAX 40
param set VT_MOT_COUNT 4
param set MPC_ACC_HOR_MAX 2
param set MPC_Z_VEL_MAX_DN 1.5
param set MPC_TKO_SPEED 1.5
param set MPC_LAND_SPEED 0.8
param set MPC_YAWRAUTO_MAX 40
param set PWM_AUX_DIS5 950
param set PWM_AUX_REV1 1
param set PWM_AUX_REV2 1
param set PWM_RATE 400
param set VT_ARSP_TRANS 15
param set VT_ARSP_BLEND 8
param set VT_B_TRANS_DUR 4
param set VT_F_TRANS_THR 0.75
param set VT_IDLE_PWM_MC 1080
param set VT_MOT_COUNT 4
param set VT_TYPE 2
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
param set V19_VT_ROLLDIR 0
fi
set MIXER quad_x
set PWM_OUT 1234
set PWM_RATE 400
set MIXER_AUX vtol_AAERT
set PWM_ACHDIS 5
set PWM_AUX_DISARMED 950
set MAV_TYPE 22
set MIXER quad_x
set MIXER_AUX vtol_AAERT
set PWM_OUT 1234
@@ -0,0 +1,89 @@
#!/bin/sh
#
# @name Sparkle Tech Ranger VTOL
#
# @type Standard VTOL
# @class VTOL
#
# @maintainer Andreas Antener <andreas@uaventure.com>
#
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF = yes ]
then
param set FW_AIRSPD_MAX 22
param set FW_AIRSPD_MIN 14
param set FW_AIRSPD_TRIM 16
param set FW_L1_PERIOD 25
param set FW_PR_P 0.060
param set FW_P_RMAX_NEG 40
param set FW_P_RMAX_POS 40
param set FW_RR_FF 0.4
param set FW_RR_P 0.04
param set FW_R_RMAX 40
param set MC_PITCHRATE_D 0.004
param set MC_PITCHRATE_I 0
param set MC_PITCHRATE_MAX 60
param set MC_PITCHRATE_P 0.21
param set MC_PITCH_P 4
param set MC_ROLLRATE_D 0.004
param set MC_ROLLRATE_I 0.002
param set MC_ROLLRATE_MAX 60
param set MC_ROLLRATE_P 0.24
param set MC_ROLL_P 4
param set MC_YAWRATE_I 0.02
param set MC_YAWRATE_MAX 40
param set MC_YAWRATE_P 0.18
param set MIS_TAKEOFF_ALT 2.5
param set MIS_YAW_TMT 20
param set MPC_ACC_HOR_MAX 1
param set MPC_HOLD_MAX_XY 0.5
param set MPC_HOLD_MAX_Z 0.5
param set MPC_LAND_SPEED 1
param set MPC_MANTHR_MIN 0.05
param set MPC_MAN_Y_MAX 120
param set MPC_THR_MIN 0.07
param set MPC_TILTMAX_AIR 35
param set MPC_TILTMAX_LND 20
param set MPC_TKO_SPEED 1
param set MPC_XY_P 0.3
param set MPC_XY_VEL_MAX 3
param set MPC_XY_VEL_P 0.05
param set MPC_Z_P 0.5
param set MPC_Z_VEL_P 0.1
param set MPC_YAWRAUTO_MAX 40
param set NAV_ACC_RAD 3
param set PWM_AUX_REV1 1
param set PWM_AUX_REV2 1
param set PWM_AUX_REV3 1
param set PWM_AUX_REV4 1
param set PWM_AUX_DIS5 950
param set PWM_RATE 400
param set VT_ARSP_TRANS 15
param set VT_B_TRANS_DUR 4
param set VT_F_TRANS_THR 0.6
param set VT_IDLE_PWM_MC 1180
param set VT_MOT_COUNT 4
param set VT_TRANS_MIN_TM 5
param set VT_TRANS_TIMEOUT 30
param set VT_TYPE 2
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
param set V19_VT_ROLLDIR 0
fi
set MAV_TYPE 22
set MIXER quad_x
set MIXER_AUX vtol_AAERT
set PWM_OUT 1234
@@ -0,0 +1,43 @@
#!/bin/sh
#
# @name CruiseAder Claire
#
# @type VTOL Tiltrotor
# @class VTOL
#
# @maintainer Samay Siga <samay_s@icloud.com>
#
# @board px4_fmu-v2 exclude
#
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF = yes ]
then
param set PWM_AUX_DISARMED 1000
param set PWM_AUX_MAX 2000
param set PWM_AUX_MIN 1000
param set PWM_AUX_RATE 50
param set PWM_MAX 2000
param set PWM_RATE 400
param set VT_MOT_COUNT 4
param set VT_FW_MOT_OFFID 13
param set VT_IDLE_PWM_MC 1080
param set VT_TILT_FW 0.9
param set VT_TILT_MC 0.08
param set VT_TILT_TRANS 0.5
param set VT_ELEV_MC_LOCK 0
param set VT_TYPE 1
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
param set V19_VT_ROLLDIR 0
fi
set MAV_TYPE 21
set MIXER claire
set MIXER_AUX claire
set PWM_OUT 1234
@@ -0,0 +1,89 @@
#!/bin/sh
#
# @name E-flite Convergence
#
# @type VTOL Tiltrotor
# @class VTOL
#
# @maintainer Andreas Antener <andreas@uaventure.com>
#
# @output MAIN1 Motor right
# @output MAIN2 Motor left
# @output MAIN3 Motor back
# @output MAIN4 empty
# @output MAIN5 Tilt servo right
# @output MAIN6 Tilt servo left
# @output MAIN7 Elevon right
# @output MAIN8 Elevon left
#
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF = yes ]
then
param set CBRK_AIRSPD_CHK 162128
param set FW_ARSP_MODE 2
param set FW_L1_PERIOD 17
param set FW_MAN_R_MAX 50
param set FW_ACRO_X_MAX 270
param set FW_ACRO_Y_MAX 270
param set FW_ACRO_Z_MAX 180
param set FW_PR_FF 0.5
param set FW_PR_P 0.08
param set FW_PSP_OFF 5
param set FW_P_LIM_MAX 30
param set FW_P_LIM_MIN -30
param set FW_P_RMAX_NEG 60
param set FW_P_RMAX_POS 60
param set FW_RR_FF 0.33
param set FW_RR_P 0.11
param set FW_YR_FF 0.3
param set FW_YR_P 0.05
param set MC_PITCHRATE_D 0.003
param set MC_PITCHRATE_P 0.15
param set MC_PITCH_P 6
param set MC_ROLLRATE_D 0.003
param set MC_ROLLRATE_P 0.15
param set MC_ROLL_P 6
param set MC_YAWRATE_MAX 120
param set MC_YAWRATE_P 0.27
param set MC_YAW_P 2.5
param set MC_YAWRATE_P 0.3
param set MPC_LAND_SPEED 1.2
param set MPC_TKO_SPEED 2.5
param set MPC_Z_VEL_MAX_UP 3
param set PWM_RATE 400
param set SENS_BOARD_ROT 8
param set VT_B_TRANS_DUR 1
param set VT_F_TRANS_DUR 1.2
param set VT_F_TR_OL_TM 4
param set VT_FW_DIFTHR_EN 1
param set VT_FW_DIFTHR_SC 0.17
param set VT_FW_MOT_OFFID 3
param set VT_FW_PERM_STAB 0
param set VT_IDLE_PWM_MC 1200
param set VT_MOT_COUNT 3
param set VT_TILT_FW 1
param set VT_TILT_MC 0
param set VT_TILT_TRANS 0.45
param set VT_TRANS_MIN_TM 1.2
param set VT_TRANS_P2_DUR 1.3
param set VT_ELEV_MC_LOCK 0
param set VT_TYPE 1
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
param set V19_VT_ROLLDIR 0
fi
set MAV_TYPE 21
set MIXER vtol_convergence
set PWM_OUT 1234
@@ -1,6 +1,6 @@
#!nsh
#!/bin/sh
#
# @name DeltaQuad
# @name Vertical Technologies DeltaQuad
#
# @type Standard VTOL
# @class VTOL
@@ -19,21 +19,22 @@
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set VT_TYPE 2
param set VT_MOT_COUNT 4
param set VT_F_TRANS_THR 1
param set VT_DWN_PITCH_MAX 8
param set VT_FW_QC_P 55
param set VT_FW_QC_R 55
param set VT_TRANS_MIN_TM 8
param set VT_B_TRANS_DUR 5
param set VT_WV_LND_EN 1
param set VT_WV_LTR_EN 1
param set VT_FWD_THRUST_SC 2
param set VT_F_TRANS_DUR 1
param set VT_IDLE_PWM_MC 1025
param set BAT_CAPACITY 23000
param set BAT_N_CELLS 4
param set BAT_R_INTERNAL 0.0025
param set COM_DISARM_LAND 5
param set CBRK_AIRSPD_CHK 162128
param set CBRK_IO_SAFETY 22027
param set EKF2_GPS_POS_X -0.12
param set EKF2_IMU_POS_X -0.12
param set EKF2_TAU_VEL 0.5
param set EKF2_GPS_P_GATE 10
param set EKF2_GPS_V_GATE 10
param set FW_ARSP_MODE 2
param set FW_L1_PERIOD 25
@@ -51,14 +52,19 @@ then
param set FW_T_SINK_MAX 3
param set FW_T_SINK_MIN 1
param set FW_T_VERT_ACC 6
param set FW_THR_CRUISE 0.68
param set FW_T_HRATE_P 0.1
param set FW_THR_CRUISE 0.70
param set FW_THR_SLEW_MAX 1
param set FW_MAN_P_MAX 30
param set FW_P_LIM_MAX 20
param set FW_P_LIM_MAX 15
param set FW_P_LIM_MIN -25
param set FW_P_RMAX_NEG 45
param set FW_P_RMAX_POS 45
param set FW_R_RMAX 50
param set FW_THR_MIN 0.55
param set FW_BAT_SCALE_EN 1
param set FW_THR_ALT_SCL 2.7
param set FW_T_RLL2THR 20
param set LNDMC_ALT_MAX 9999
param set LNDMC_XY_VEL_MAX 1
@@ -68,28 +74,31 @@ then
param set MC_ROLLRATE_P 0.16
param set MC_ROLLRATE_I 0.01
param set MC_ROLLRATE_D 0.003
param set MC_ROLLRATE_FF 0.0
param set MC_ROLLRATE_FF 0
param set MC_ROLLRATE_MAX 80
param set MC_PITCH_P 6.5
param set MC_PITCHRATE_P 0.15
param set MC_PITCHRATE_I 0.05
param set MC_PITCHRATE_D 0.003
param set MC_PITCHRATE_FF 0.0
param set MC_PITCHRATE_FF 0
param set MC_PITCHRATE_MAX 80
param set MC_YAW_P 3.5
param set MC_YAW_FF 0.5
param set MC_YAWRATE_P 0.2
param set MC_YAWRATE_I 0.1
param set MC_YAWRATE_D 0.0
param set MC_YAWRATE_FF 0.0
param set MC_YAWRATE_D 0
param set MC_YAWRATE_FF 0
param set MC_YAWRATE_MAX 20
param set MC_YAWRAUTO_MAX 20
param set MC_AIRMODE 1
param set MIS_DIST_1WP 100
param set MIS_DIST_WPS 100000
param set MIS_TAKEOFF_ALT 15
param set MPC_XY_P 0.8
param set MPC_XY_VEL_P 0.1
param set MPC_XY_VEL_MAX 4
param set MPC_ACC_HOR_MAX 2.0
param set MPC_LAND_SPEED 1.5
param set MPC_XY_VEL_MAX 5
param set MPC_ACC_HOR_MAX 2
param set MPC_LAND_SPEED 1.2
param set MPC_MAN_R_MAX 30
param set MPC_TILTMAX_LND 35
param set MPC_Z_VEL_MAX 1.5
@@ -97,28 +106,59 @@ then
param set MPC_Z_VEL_MAX_DN 1.5
param set MPC_HOLD_MAX_XY 0.5
param set MPC_HOLD_MAX_Z 0.5
param set MPC_TKO_RAMP_T 0.8
param set MPC_XY_CRUISE 5
param set MPC_TILTMAX_AIR 25
param set MPC_TILTMAX_LND 25
param set MPC_YAWRAUTO_MAX 20
param set CBRK_AIRSPD_CHK 162128
param set CBRK_IO_SAFETY 22027
param set NAV_DLL_ACT 0
param set NAV_LOITER_RAD 100
param set EKF2_GPS_POS_X -0.12
param set EKF2_IMU_POS_X -0.12
param set EKF2_TAU_VEL 0.5
param set PWM_AUX_DISARMED 950
param set SYS_COMPANION 57600
param set PWM_MAIN_DIS5 1500
param set PWM_MAIN_DIS6 1500
param set PWM_MAIN_DIS7 900
param set PWM_MAIN_DIS8 900
param set PWM_RATE 400
param set SENS_BOARD_ROT 18
# TELEM2 config
param set MAV_1_CONFIG 102
param set MAV_1_RATE 5000
param set MAV_1_FORWARD 1
param set SER_TEL2_BAUD 57600
param set VT_TYPE 2
param set VT_MOT_COUNT 4
param set VT_F_TRANS_THR 1
param set VT_DWN_PITCH_MAX 8
param set VT_FW_QC_P 55
param set VT_FW_QC_R 55
param set VT_TRANS_MIN_TM 15
param set VT_B_TRANS_DUR 8
param set VT_WV_LND_EN 1
param set VT_WV_LTR_EN 1
param set VT_FWD_THRUST_SC 4
param set VT_F_TRANS_DUR 1
param set VT_IDLE_PWM_MC 1025
param set VT_B_REV_OUT 0.5
param set VT_B_TRANS_THR 0.7
param set VT_FW_PERM_STAB 1
param set VT_TRANS_TIMEOUT 22
param set VT_F_TRANS_RAMP 4
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
param set V19_VT_ROLLDIR 0
fi
set MIXER deltaquad
set PWM_OUT 1234
set PWM_RATE 400
param set PWM_MAIN_DIS5 1500
param set PWM_MAIN_DIS6 1500
param set PWM_MAIN_DIS7 900
param set PWM_MAIN_DIS8 900
set MIXER_AUX pass
set PWM_AUX_OUT 12345
set PWM_AUX_DISARMED 950
set MAV_TYPE 22
set MIXER deltaquad
set MIXER_AUX pass
set PWM_OUT 1234
set PWM_AUX_OUT 12345
@@ -0,0 +1,84 @@
#!/bin/sh
#
# @name BabyShark VTOL
#
# @type Standard VTOL
# @class VTOL
#
# @maintainer Silvan Fuhrer <silvan@auterion.com>
#
# @output MAIN1 Ailerons
# @output MAIN2 A-tail left
# @output MAIN3 Pusher motor
# @output MAIN4 A-tail right
# @output MAIN5 motor 1
# @output MAIN6 motor 2
# @output MAIN7 motor 3
# @output MAIN8 motor 4
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF = yes ]
then
param set FW_AIRSPD_MAX 28
param set FW_AIRSPD_MIN 17
param set FW_AIRSPD_TRIM 23
param set FW_CLMBOUT_DIFF 0.1
param set FW_L1_R_SLEW_MAX 40
param set FW_LND_EARLYCFG 1
param set FW_P_LIM_MAX 25
param set FW_P_LIM_MIN -25
param set FW_R_LIM 35
param set FW_THR_CRUISE 0.7
param set FW_THR_MIN 0.25
param set FW_THR_SLEW_MAX 0.6
param set FW_T_HRATE_FF 0
param set IMU_GYRO_CUTOFF 40
param set MC_DTERM_CUTOFF 15
param set MC_PITCHRATE_MAX 60
param set MC_ROLLRATE_MAX 60
param set MC_YAWRATE_I 0.15
param set MC_YAWRATE_MAX 40
param set MC_YAWRATE_P 0.3
param set MPC_MAN_TILT_MAX 25
param set MPC_MAN_Y_MAX 40
param set MPC_SPOOLUP_TIME 2
param set MPC_THR_HOVER 0.45
param set MPC_TILTMAX_AIR 25
param set MPC_TKO_RAMP_T0.8
param set MPC_VEL_MANUAL 3
param set MPC_XY_VEL_MAX 3.5
param set MPC_Z_VEL_MAX_UP 2
param set MPC_YAWRAUTO_MAX 40
param set PWM_MAIN_DIS3 1000
param set PWM_MAIN_MIN3 1120
param set PWM_MIN 950
param set V19_VT_ROLLDIR 0
param set VT_ARSP_TRANS 19
param set VT_B_TRANS_DUR 9
param set VT_ELEV_MC_LOCK 0
param set VT_FWD_THRUST_SC 1.2
param set VT_FW_MOT_OFFID 5678
param set VT_F_TRANS_DUR 8
param set VT_F_TRANS_THR 0.85
param set VT_F_TR_OL_TM 7
param set VT_IDLE_PWM_MC 1000
param set VT_MOT_COUNT 8
param set VT_PSHER_RMP_DT 2
param set VT_TRANS_MIN_TM 6
param set VT_TYPE 2
fi
set MAV_TYPE 22
set MIXER babyshark
set MIXER_AUX pass
set PWM_OUT 5678
@@ -1,4 +1,4 @@
#!nsh
#!/bin/sh
#
# @name Generic Tricopter Y+ Geometry
#
@@ -18,4 +18,3 @@ sh /etc/init.d/rc.mc_defaults
set MIXER tri_y_yaw+
set PWM_OUT 1234
@@ -1,4 +1,4 @@
#!nsh
#!/bin/sh
#
# @name Generic Tricopter Y- Geometry
#
@@ -1,4 +1,4 @@
#!nsh
#!/bin/sh
#
# @name Esky (Big) Lama v4
#
@@ -16,16 +16,8 @@
sh /etc/init.d/rc.mc_defaults
set MIXER coax
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set NAV_ACC_RAD 2.0
param set RTL_RETURN_ALT 30.0
param set RTL_DESCEND_ALT 10.0
param set PWM_DISARMED 900
param set PWM_MIN 1075
param set PWM_MAX 1950
param set MC_ROLL_P 6.5
param set MC_ROLLRATE_P 0.17
param set MC_ROLLRATE_I 0.05
@@ -37,18 +29,26 @@ then
param set MC_PITCHRATE_D 0.005
param set MC_PITCHRATE_FF 0
param set MC_YAW_P 2
param set MC_YAW_FF 0.5
param set MC_YAWRATE_P 0.1
param set MC_YAWRATE_I 0.1
param set MC_YAWRATE_D 0.0
param set MC_YAWRATE_D 0
param set MC_YAWRATE_FF 0
fi
# use PWM parameters for throttle channel
set PWM_OUT 34
set PWM_RATE 400
param set NAV_ACC_RAD 2
param set PWM_AUX_RATE 50
param set PWM_DISARMED 900
param set PWM_MIN 1075
param set PWM_MAX 1950
param set PWM_RATE 400
param set RTL_RETURN_ALT 30
param set RTL_DESCEND_ALT 10
fi
# This is the gimbal pass mixer
set MIXER_AUX pass
set PWM_AUX_RATE 50
# use PWM parameters for throttle channel
set PWM_AUX_OUT 1234
set PWM_OUT 34
@@ -1,4 +1,4 @@
#!nsh
#!/bin/sh
#
# @name Blade 130X
#
@@ -23,35 +23,34 @@ set MIXER blade130
#set PWM_OUT 1234
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set MC_ROLL_P 5.0
param set MC_ROLLRATE_P 0.0
param set MC_ROLLRATE_I 0.0
param set MC_ROLLRATE_D 0.0
param set ATT_BIAS_MAX 0
param set CBRK_IO_SAFETY 22027
param set MC_ROLL_P 5
param set MC_ROLLRATE_P 0
param set MC_ROLLRATE_I 0
param set MC_ROLLRATE_D 0
param set MC_ROLLRATE_FF 0.15
param set MC_PITCH_P 6.5
param set MC_PITCHRATE_P 0.0
param set MC_PITCHRATE_I 0.0
param set MC_PITCHRATE_D 0.0
param set MC_PITCHRATE_P 0
param set MC_PITCHRATE_I 0
param set MC_PITCHRATE_D 0
param set MC_PITCHRATE_FF 0.15
param set MC_YAW_P 3.0
param set MC_YAW_P 3
param set MC_YAWRATE_P 0.1
param set MC_YAWRATE_I 0.0
param set MC_YAWRATE_D 0.0
param set MC_YAW_FF 0.0
param set MC_ROLLRATE_MAX 720.0
param set MC_PITCHRATE_MAX 720.0
param set MC_YAWRATE_MAX 400.0
param set MC_ACRO_R_MAX 360.0
param set MC_ACRO_P_MAX 360.0
param set PWM_MIN 1075
param set MC_YAWRATE_I 0
param set MC_YAWRATE_D 0
param set MC_ROLLRATE_MAX 720
param set MC_PITCHRATE_MAX 720
param set MC_YAWRATE_MAX 400
param set MC_ACRO_R_MAX 360
param set MC_ACRO_P_MAX 360
param set MPC_THR_MIN 0.06
param set MPC_MANTHR_MIN 0.06
param set ATT_BIAS_MAX 0.0
param set CBRK_IO_SAFETY 22027
param set PWM_MIN 1075
fi
@@ -1,4 +1,4 @@
#!nsh
#!/bin/sh
#
# @name Standard Plane
#
@@ -21,10 +21,13 @@
sh /etc/init.d/rc.fw_defaults
if [ $AUTOCNF = yes ]
then
param set PWM_AUX_RATE 50
param set PWM_RATE 50
fi
set MIXER AETRFG
set PWM_RATE 50
set PWM_AUX_RATE 50
# rate must be set by group (see pwm info)
# throttle is in the same group as servos
# Rate must be set by group (see pwm info).
# Throttle is in the same group as servos.

Some files were not shown because too many files have changed in this diff Show More