Compare commits

...

1177 Commits

Author SHA1 Message Date
Daniel Agar 4f6faac2c8 ECL fix for v1.10.0 release 2019-12-12 12:59:24 -05:00
Julian Oes 5934ad7513 navigator: fix VTOL RTL corner case
This fixes a corner case for VTOL RTL with RTL_TYPE 1.
RTL_TYPE 1 means that the VTOL skips all waypoints on RTL and jumps to
the land waypoint at the end.

During a mission in fixedwing mode it will continue to fly in fixedwing
mode and then do a transition before landing.

However, if RTL is engaged right at the moment of the front transition,
the transition waypoint is not inserted and the VTOL will try to land in
fixedwing mode at the mission land location.

This corner case is fixed in this patch by also considering the
"transition after takeoff" state.
2019-12-11 14:09:35 +01:00
Daniel Agar b803fa9e77 px4_work_queue: increase hp_default stack 1500 -> 1600 bytes 2019-12-09 17:36:33 -05:00
Beat Küng 7ee74099ab fix mavlink: fixes for mavlink on USB instance
Open the UART after adding the instance: mavlink_open_uart() might block,
and in that case the parent task waiting for mavlink to be started times
out.

And while waiting for the USB UART device to come up:
- check for _task_should_exit
- check for check_requested_subscriptions()

Side-effects when USB is not plugged in during boot:
- reduces boot duration by 100ms
- fixes duplicate instance name in 'top':
 201 mavlink_if0                     1  0.000  1328/ 2572 100 (100)  w:sig  3
 204 mavlink_if0                   572  4.221  1632/ 2540 100 (100)  w:sig  4
- 'mavlink stop-all' now stops the usb instance as well
2019-12-06 15:25:39 +01:00
Beat Küng 08e36de020 mavlink: remove unused get_uart_fd(unsigned index) method 2019-12-06 15:25:39 +01:00
Julian Oes c17c54b61b navigator: fix triplet resetting/publication logic
The navigator has a notion of resetting the triplets which means the
triplet setpoints are set to invalid and therefore not to be used by
downstream modules such as flight tasks.

However, before this patch, the triplets were not published if invalid
meaning that a valid triplet would stay the truth until a new valid
triplet would get published.

E.g. this lead to the corner case case where we publish a valid triplet
with an IDLE setpoint on ground in HOLD and then don't update the
triplet while flying in POSCTL mode. Later, when RTL is engaged, the
flight task will use IDLE until navigator (which runs slower) has
published the next triplet.

The fix involves two main changes:
- Publish invalid triplets to avoid stale triplets.
- Avoid publishing the triplet on every iteration in manual modes by not
  setting `_pos_sp_triplet_published_invalid_once = false`.

When testing this I realized that a mission upload during RTL would stop
RTL. This is because the mission is updated while the mission navigation
mode is not active and reset_triplets() is called from there. This is
now only done for the case where we are actually in mission navigation
mode. The fact that a mission is updated when not active also seems
wrong and is something to fix another time.
2019-11-25 09:59:45 -05:00
Beat Küng 865cf56cd2 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-11-25 10:25:34 +01:00
Beat Küng 667a04b3f2 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-11-25 10:25:34 +01:00
Beat Küng 8e8d6deea5 refactor uorb: rename published to advertised
No semantic change (yet)
2019-11-25 10:25:34 +01:00
Beat Küng 0e9fde2055 uORBDeviceNode: use px4::atomic instead of volatile for _generation
_generation is read in a multi-threaded context w/o locking.
2019-11-25 10:25:34 +01:00
Julian Oes 20ede04cf1 vmount: tell user how to use vmount test
This confused me, so hopefully it will help the next user, e.g. me.
2019-11-22 12:22:19 -05:00
Julian Oes 1e3a522245 vmount: remove commented out code 2019-11-22 12:22:19 -05:00
Julian Oes 3b446c0015 vmount: set correct MAV_MOUNT_MODE 2019-11-22 12:22:19 -05:00
Matthias Grob 0312159f00 mc_pos_control: reset velocity derivatives 2019-11-20 11:10:09 +01:00
Nik Langrind 4e126c061c px4io: When running HITL, don't publish actuator_outputs. Fixes #13471.
When running in HITL mode, pwm_out_sim publishes actuator_outputs.

px4io unconditionally publishes the uOrb actuator_outputs. When HITL
is configured, the px4io copy of the uOrb has all zeros.

The result is that there are two publications, one valid, and one
all-zeros. This causes the HIL_ACTUATOR_CONTROLS mavlink message
to be incorrect (all-zeros) and the SERVO_OUTPUTS_RAW mavlink
message to be inconsistent, as it takes the data from one or the
other uOrb randomly each cycle.

The fix is to let px4io know that HITL is in effect when it is
started, and modify px4io to suppress publication in this case.

This is a bigger more complicated fix than I would like, but I
think it is conceptually correct.

Signed-off-by: Nik Langrind <langrind@gmail.com>
2019-11-20 10:26:17 +01:00
David Sidrane 1b313c675c fmuk66-v3:Fix hang on SDIO card removal/reinsertion
The interrupt driven card detect logic was enabled
   but the auto mounter was not. That interrupt was
   calling mmcsd_mediachange.

   There is a reentrancy issues in the kinetis callback logic.
   Toplevel calls mmcsd_mediachange calls SDIO_CALLBACKENABLE
   that calls kinetis_callbackenable that calls kinetis_callback
   that calls mmcsd_mediachange.
2019-11-15 14:11:30 -05:00
Julian Oes cacf821452 ak09916: fix mag spikes
This fixes spuriously occuring mag spikes in the external mag of Here2.

The reason for the spikes was that the fact that the I2C registers were
not read out correctly as suggested in the datasheet.

Before we were reading out ST1, data, and ST2 in one pass and ignoring
the data ready bit (DRDY) in ST1. This meant that we could run into race
conditions where the data was not ready when we started reading and
being updated as the registers are read.

Instead, we need to check the read the ST1 register first to check the
data ready bit and then read the data and ST2 if the data is ready. By
reading ST2 we then trigger the next measurement in the chip.
2019-11-13 10:55:38 +01:00
Julian Oes 474b8028d0 ak09916: cleanup only
Note: the author name was removed because this file has almost no
resemblence with the code written by that author 4 years ago, has been
copied to new places, and was initially commited without author anyway.

Also, my opinion is that the version control system should take care of
attribution, and not outdated comments.
2019-11-13 10:55:38 +01:00
Matthias Grob 748b664ad0 Reposition landing gear check so that it is not overwritten by setpoint operations. (#13412) 2019-11-07 14:35:05 -05:00
Beat Küng 37cc877c80 smbus: fix invalid memory access in read_word()
read_word() expected 3 bytes (uint16_t + PEC byte), but was passed an
address to an uint16_t value.

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

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

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

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

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

* ekf2: use InnovLpf filter class in preflight checks

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

* ekf2: Move pre-flight checks into separate function

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

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

* ekf2: Add optical flow pre-flight check

* ekf2: Combine FirstOrderLpf and InnovationLpf in single class

* ekf2: check vel_pos_innov when ev_pos is active as well

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

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

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

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

* ekf2: set variable const whenever possible

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

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

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

Works with HIL too.
2019-10-21 09:42:08 +02:00
Beat Küng 380247168d mixer_module: avoid using an enum as px4::atomic argument
Does not compile on MacOS.
2019-10-21 09:42:08 +02:00
Beat Küng 0871802568 mixer_module: add support for test_motor (motor_test CLI command) 2019-10-21 09:42:08 +02:00
Beat Küng 349469cf75 refactor pwm_out_sim: use mixer_module and run on work queue
Tested with SITL + HITL
2019-10-21 09:42:08 +02:00
Beat Küng 2837152983 refactor mixer_module: move some code in update() into separate methods 2019-10-21 09:42:08 +02:00
Beat Küng 72a8be538a mixer_module: more robust logic to set 'stop_motors' flag
Checking the first output_limited for a disarmed value is fragile.
For example a disarmed value might be within the range of min/max output
values and could then be triggered while armed.
2019-10-21 09:42:08 +02:00
Hamish Willee 177da1f923 RTL params - proposed updates 2019-10-21 09:08:27 +03:00
RomanBapst 4cc7bb7296 addressed review comments
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-10-21 09:08:27 +03:00
RomanBapst b1a9d4b4c7 updated rtl parameter descriptions.
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-10-21 09:08:27 +03:00
TSC21 2930b55732 microRTPS: templates: only decode ros2_distro when possible and nedeed 2019-10-20 16:08:32 +01:00
Daniel Agar 981f8d5d90 systemcmds/tests: IntrusiveQueue and List fix memory leaks 2019-10-20 10:46:44 -04:00
Daniel Agar 687a3a15c5 top: decrease priority below IMU sensor WQ threads
- otherwise top can potentially disrupt with sensor sampling
2019-10-19 13:44:24 -04:00
modaltb 3bbf1cc868 Add support for ModalAI FC1 2019-10-19 12:23:23 -04:00
Nick Steele 070d75496d Handle MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN 'Do nothing for autopilot' 2019-10-18 15:57:50 -04:00
Matthias Grob 08ec6a28f0 mc_att_control: remove TPA
because it's mostly unused and we have thrust curve correction
see parameter THR_MDL_FAC
2019-10-18 15:54:09 -04:00
Julian Oes f9ddbd7e2a mpu6000: remove factory test for fmu-v2 2019-10-18 15:00:41 -04:00
Matthias Grob 22c4bb498c FlightTaskDescend: set no vertical thrust when commanding velocity 2019-10-18 16:18:19 +02:00
Julian Oes de90543d6f FlightTasks: add Descend task to land without GPS
This adds a flight task to catch the case where we want to do an
emergency descent without GPS but only a baro.

Previously, this would lead to the navigator land class being called
without position estimates which then made the flight tasks fail and
react with a flight task failsafe. This however meant that landed was
never detected and a couple of confusing error messages.

This applies if NAV_RCL_ACT is set to 3 "land".
2019-10-18 16:18:19 +02:00
Matthias Grob 5f53ae1253 mc_pos_control: execute failsafe with invalid setpoints 2019-10-18 16:18:19 +02:00
Martina Rivizzigno 95dc522b99 update sitl_gazebo submodule 18/10/2019 2019-10-18 11:43:58 +01:00
Julian Oes d3da4a92e0 msg: don't implement print_message for fmu-v2
This saves about 3.4k of flash for fmu-v2.
2019-10-18 11:54:24 +02:00
Mark Sauder e9c9fb8239 fix multicopter land detector: do not update parameters every cycle (#13212)
And add updateParams() call in LandDetector::_update_params().
2019-10-18 09:25:41 +02:00
Matthias Grob cefa7ec5dc arch.sh: use nproc instead of grepping /proc/cpuinfo 2019-10-17 12:48:04 -04:00
Tanja Baumann be1f966e5f Collision prevention: Option to enable flying outside FOV and rename parameters (new CP group)
* rename parameters to allow more descriptive names under CP group
* add option to enable moving where there is no data
* add test for param CP_GO_NO_DATA

Co-Authored-By: Martina Rivizzigno <martina@rivizzigno.it>
2019-10-17 11:23:50 -04:00
Julian Oes 2fcddd9b8d mavlink: fix uninitialized mavlink warnings 2019-10-17 08:44:53 -04:00
Julian Oes ec95378821 logger: fix uninitialized coverity warnings 2019-10-17 08:44:53 -04:00
Julian Oes 8e625285fc platforms: initialize strings
This might fix a warning about argv being a TAINTED_SCALAR further down.
2019-10-17 08:44:53 -04:00
Timothy Scott cf8f03f190 Changed listener to not busy-wait (#13157)
* Changed listener to not busy-wait
2019-10-17 11:29:36 +02:00
Nicolas de Palezieux 40bb209fd2 dshot telemetry: enable telemetry publishing for setups with only one ESC 2019-10-17 11:13:38 +02:00
Daniel Agar 6ccb4af8b0 CollisionPrevention: remove unnecessary double precision floating point math 2019-10-17 08:44:33 +02:00
Daniel Agar e942d3a3b2 FlightTasks: remove unnecessary double precision floating point math 2019-10-17 08:44:33 +02:00
Beat Küng 25aded36ec WorkQueue: avoid potential semaphore counter overflow
This could happen in the following cases:
- IRQ/publisher rate is faster than the processing rate, and therefore
  WorkQueue::Add is called at a higher rate
- a long-running or stuck task that blocks the work queue a long time

Both cases are not expected to happen under 'normal' circumstances (if the
system runs as expected).
2019-10-16 18:29:26 +02:00
Beat Küng 2296c9acfa uavcan_virtual_can_driver: fix invalid use of px4_sem_getvalue
sem_getvalue returns 0 on success, -1 on error, and never a value > 0.
2019-10-16 18:29:26 +02:00
Beat Küng 884621415d dataman: fix invalid use of px4_sem_timedwait
px4_sem_timedwait expects an absolute time (from CLOCK_REALTIME), but a
relative time was provided.

This is only relevant if FLASH_BASED_DATAMAN is set (only on Intel aero).
2019-10-16 18:29:26 +02:00
Daniel Agar bde36f0f4a ROMFS: rc.vtol_defaults limit inner loop rate (#13196)
- temporary remedy for https://github.com/PX4/Firmware/issues/13149
2019-10-16 12:27:06 -04:00
ThomasRigi 17c17f26a9 VTOL GPSF: fix fixed bank loiter (#12778)
* GPS Failsafe fix for VTOL
* navigator: use new uORB API for VTOL publication
2019-10-16 17:57:44 +02:00
TSC21 412c364e90 microRTPS bridge: templates: do not change naming of topics based on the fasrtpsgen version 2019-10-16 16:16:11 +01:00
Matthias Grob a053b7f69b vtol_att_control_main: only reset thrust when disarmed
to see flaps moving according to attitude control before arming
and not have tailsitter elevons move to follow north heading.
2019-10-16 16:30:38 +02:00
Julien Lecoeur 4cc7b1319f Fix param update in mc_att_control
ModuleParams::updateParams() was never called
2019-10-16 08:17:04 -04:00
Beat Küng 17551a99f8 io_timer: fix potential invalid memory access 2019-10-16 13:13:17 +02:00
Beat Küng 617f37afbf mixer_{multicopter,helicopter}: add buffer size check
Fixes a potential buffer overflow if an MC/helicopter mixer is used that
exceeds the number of physical pins.
This is not a useful/flyable configuration, but the system still should
not crash.
2019-10-16 13:13:17 +02:00
Beat Küng 173337e49c uORBManager: print errno for advertisement failures
Helps with debugging.
2019-10-16 13:13:17 +02:00
Matthias Grob 45a53726d6 LandDetector: switch to uORB::Publication 2019-10-16 00:47:01 -04:00
Matthias Grob 679e4fedf5 LandDetector: switch land flags to properies instead of one state 2019-10-16 00:47:01 -04:00
modaltb 1e1549a169 Add support for Bosch BMP388 barometer 2019-10-15 23:33:49 -04:00
Ilya Petrov c58cfce6be do not check VP fusion during GPS startup
This is solution for https://github.com/PX4/Firmware/issues/11864
2019-10-15 17:01:20 +01:00
kamilritz a4e035d338 Add param to choose vision observation noise source 2019-10-15 16:06:37 +01:00
RomanBapst 6bfb50df8a run arm authorization as last pre-arm check, as it used to be implemented
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-10-15 15:44:24 +01:00
Matthias Grob e843090383 Replace a lot of memset with {} initializers 2019-10-15 10:01:03 -04:00
Matthias Grob b8f70e865c voted_senors_update: remove memset 0 initializations because of zero initializer in header 2019-10-15 10:01:03 -04:00
Matthias Grob 185e2811dc gyro_calibration: use constexpr instead of const 2019-10-15 10:01:03 -04:00
Matthias Grob 09faa4647b ekf2_params: correct typo 2019-10-15 10:01:03 -04:00
TSC21 bfab544a64 Jenkins CI: reactivate Catkin build stage 2019-10-15 10:42:14 +01:00
Mark Sauder 0cbb693a8d Add return INFINITY; to the LandDetector class _get_max_altitude() method declaration (#12343) 2019-10-15 08:19:53 +02:00
Matthias Grob 9f639d1f3b mc_att_control: move rate control to RateControl class
This makes the controller more modular, more readable and hence
better maintainable.
2019-10-15 07:46:47 +02:00
TSC21 97e1edc835 microRTPS: templates: fix support for ROS2 Dashing 2019-10-14 23:17:27 +01:00
TSC21 f91770f9cd generate_microRTPS_bridge: fix fastrtpsgen version check handler 2019-10-14 21:23:27 +01:00
Daniel Agar c51475640e mavlink: only send ATTITUDE/ATTITUDE_QUATERNION msgs on vehicle_attitude update
- fixes #13182
2019-10-14 15:47:22 -04:00
mcsauder fb12ddb69a Cherry pick the directory and voted_sensors_update.h from PR #9756.
Consolidate _update_params() methods for improved inheritance from the LandDetector base class.
Move common uORB::Subscriptions to the base class for inheritance.
Deprecate redundant override methods.
2019-10-14 21:25:57 +02:00
David Sidrane c44e4b9578 imu/mpu6000: support ICM20689 rev 4 ID 2019-10-14 15:17:43 -04:00
Silvan Fuhrer 51374aec7b px4_fmu-v5: add here2 mag to startup
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-10-14 15:16:33 -04:00
Nick b72d010c34 Update vehicle_local_position.ref_alt comment to reflect how ref_alt is being used in PX4 2019-10-14 12:33:25 -04:00
Matthias Grob bb91db2057 AttitudeControlTest: fix adaptAntipodal() function 2019-10-14 18:23:22 +02:00
Matthias Grob 83dfa227a7 AttitudeControlTest: include all corner case combinations
Which revealed antipodal quaternion corner cases when
the first element is zero.
2019-10-14 18:23:22 +02:00
Matthias Grob 511828bfd2 AttitudeControlTest: add first controller convergence test 2019-10-14 18:23:22 +02:00
TSC21 10e3bcd138 ulog stream msgs: rename 'sequence' fields as they are protected names in fastrtpsgen 2019-10-14 16:37:17 +01:00
TSC21 88a7e3df09 microRTPS bridge: fix templates for ROS2 usage 2019-10-14 16:37:17 +01:00
BazookaJoe1900 3007b0876c mavlink: add protection against setting wrong type of parameters 2019-10-14 11:18:08 -04:00
Travis Bottalico 5324c37d04 Add support for voxlpm (I2C power monitor) 2019-10-14 11:08:56 -04:00
Jin Chengde 13c3ae3b52 FW RWTO: add throttle_ramp_time parameter RWTO_RAMP_TIME
* add throttle_ramp_time parameter support fixed wing runway takeoff
2019-10-14 11:07:33 -04:00
Matthias Grob 7e2fb6b4da arch.sh: switch permissions of pip install (again)
after testing the right solution on a fresh installation
2019-10-14 10:54:09 -04:00
Martina Rivizzigno 123f769306 enable safe landing test 2019-10-14 10:53:13 -04:00
Martina Rivizzigno 7f4ddde378 enable avoidance test 2019-10-14 10:53:13 -04:00
Matthias Grob 001da78089 mc_pos_control: improve failsafe handling
See issue #12307

Since commander should still handle all failsafes we should only run
into this case as last resort to not crash.
If all failsafe actions are disabled but data is missing
e.g. RC loss action disabled but flying in manual and no RC
this can be tested.
2019-10-14 15:07:09 +02:00
Matthias Grob 068f56d66f FlightTasks: fix switchTask() comment typo 2019-10-14 15:07:09 +02:00
Daniel Agar 97efbde6f4 WIP: commander re-evaluate RC mode switch when local position becomes valid 2019-10-14 14:16:24 +02:00
Matthias Grob 093d3b76d9 PULL_REQUEST_TEMPLATE: change order of titles (#13174) 2019-10-14 13:11:44 +02:00
ToppingXu 35e0554ace navigator: fix save mission state. (#12468) 2019-10-14 11:58:42 +02:00
Daniel Agar 04ea84908e Update submodule mavlink v2.0 to latest Sun Oct 13 08:37:21 EDT 2019
- mavlink v2.0 in PX4/Firmware (c09ea2a9b0): https://github.com/mavlink/c_library_v2/commit/31cc5bb39e1cb69f5e608e8e2cac8a4d57332e1c
    - mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/c549ee329842e6182bc0dd72369a83fc0deb8f6e
    - Changes: https://github.com/mavlink/c_library_v2/compare/31cc5bb39e1cb69f5e608e8e2cac8a4d57332e1c...c549ee329842e6182bc0dd72369a83fc0deb8f6e
2019-10-13 13:47:06 -05:00
Matthias Grob c09ea2a9b0 arch.sh: don't execute pip as root
otherwise packages get installed in
/root/.local/lib/python3.7/site-packages
2019-10-12 08:38:39 +02:00
Matthias Grob 50c5150471 arch.sh: work around gazebo AUR build error and correct comments 2019-10-12 08:38:39 +02:00
Matthias Grob bba464d722 arch.sh: enable multicore gazebo compilation 2019-10-12 08:38:39 +02:00
Matthias Grob 7dd1be65ca arch.sh: add gazebo installation 2019-10-12 08:38:39 +02:00
Beat Küng 803a71928f fmu-v3: enable DShot
Disables RX DMA on TEL4 and IO debug serial port
2019-10-11 08:14:17 +02:00
Beat Küng 82106105b7 parameters: defer auto-saving to after disarming for flash-based params
This is especially important for DShot, that does not update when the CPU
stalls.
2019-10-11 08:14:17 +02:00
Beat Küng 67500123e3 fmu-v5: add dshot support
But only on the first 4 FMU outputs, as the next ones conflict with px4io
serial dma (UART8_RX)

RX DMA is disabled on the GPS port as well (conflicts with TIM1).
2019-10-11 08:14:17 +02:00
Beat Küng 8a9744d05a dshot: allow boards to enable dshot only on a subset of the timers 2019-10-11 08:14:17 +02:00
Beat Küng 93a12436a3 parameters: update perf counter for flash-based param_save_default() 2019-10-11 08:14:17 +02:00
Beat Küng a545f7ee16 mixer_module: extend printf status output 2019-10-11 08:14:17 +02:00
Beat Küng b080679146 kakutef7, kopis airframe: enable dshot & telemetry 2019-10-11 08:14:17 +02:00
Beat Küng d0a7490222 dshot: update timer generation before DMA request
This reloads the timer configuration before triggering DMA. Without that,
in rare cases, there were 17 bits sent instead of 16.
The 1. bit (1. pulse) was always wrong (too much), the rest of the bits
were the correct DShot packet that was meant to be sent.
2019-10-11 08:14:17 +02:00
Beat Küng 7445c25fcc dshot: check if DMA still in progress
No other functional change, just restructuring.
2019-10-11 08:14:17 +02:00
Beat Küng 182efaa757 dshot: reduce static buffer size
And handle failures of up_dshot_init().

On Omnibus: reduces memory usage if dshot is enabled by ~1.0KB.
The buffer is roughly 1KB in size.
2019-10-11 08:14:17 +02:00
Beat Küng e78250ab8d dshot telemetry: retrieve & print ESC info with 'dshot esc_info' CLI command 2019-10-11 08:14:17 +02:00
Beat Küng 26648ad0b9 dshot: add support to send commands via CLI
This enables the possibility to permanently reverse motor directions :)
2019-10-11 08:14:17 +02:00
Beat Küng 65f3c7f93d dshot: add telemetry and publish esc_status message 2019-10-11 08:14:17 +02:00
Beat Küng d44302c03b module_schema.yaml: add 'decimal' and 'increment' for floats 2019-10-11 08:14:17 +02:00
Beat Küng 4c4ce09005 esc_status: trim the message and remove unused fields 2019-10-11 08:14:17 +02:00
Beat Küng 69c10dcaac dshot: move implementation to a separate directory & library
So that the static memory overhead is not added to targets w/o dshot
2019-10-11 08:14:17 +02:00
Beat Küng 775916ef11 kakutef7: enable dshot 2019-10-11 08:14:17 +02:00
Beat Küng 23dbd9426a dshot: handle dcache, flush cache before DMA transfer 2019-10-11 08:14:17 +02:00
Beat Küng 3234aca53b px4_micro_hal: add PX4_ARCH_DCACHE_LINESIZE definition 2019-10-11 08:14:17 +02:00
Beat Küng 132dcdaf25 beta75x airframe: enable DShot600 2019-10-11 08:14:17 +02:00
Igor Mišić 543a057f80 fmu-v4: add dshot timer config 2019-10-11 08:14:17 +02:00
Beat Küng ac82c5114b omnibusf4sd: add dshot timer config 2019-10-11 08:14:17 +02:00
Beat Küng d8ef1b59b9 ROMFS: add dshot startup support 2019-10-11 08:14:17 +02:00
Beat Küng a161be6ec8 dshot: add dshot driver
Supports all DShot modes, but no telemetry yet.
It includes the modes and capture configuration from FMU so that it serves
as drop-in replacement.
2019-10-11 08:14:17 +02:00
Beat Küng f3eea85bef MOT_ORDERING, MC_AIRMODE: move param def to mixer_module and 'Mixer Output' group 2019-10-11 08:14:17 +02:00
Beat Küng 2a492a8e47 fmu: remove unused include and variable 2019-10-11 08:14:17 +02:00
Igor Mišić 5bd9659301 stm32 timers: add dshot implementation 2019-10-11 08:14:17 +02:00
TSC21 061ee15139 update sitl_gazebo submodule (10/10/2019) 2019-10-10 15:51:09 +02:00
Dusan Zivkovic ab2e235333 Commander: bugfix: get all available messages on the subsystem_info topic 2019-10-10 13:12:31 +02:00
Dusan Zivkovic b6f21fa76e voted_sensors_update: fix style 2019-10-10 10:31:56 +02:00
Dusan Zivkovic 316a188e8e voted_sensors_update: parameter CAL_*_EN enables sensor with id CAL_*_ID 2019-10-10 10:31:56 +02:00
Dusan Zivkovic d3e79c4726 voted_sensors_update: set priority properly in case of late mag subscriptions or sensors enabled param changes 2019-10-10 10:31:56 +02:00
Matthias Grob 7f63ed8202 Arch setup script (#13111)
* ubuntu.sh: fix space and capitalization

* Add setup script for Arch Linux

* arch.sh: remove numerous confirmations, added some base packages

* setup scripts: adjust messages according to review
2019-10-10 08:59:11 +02:00
Julian Oes 307dc3e32d mavlink: fix boot complete without lockstep
Without lockstep the actual monotonic clock of the host computer is
used. Therefore, this time is likely much more than 20 seconds and the
check if the boot complete happened in time will fail immediately.

Therefore, it probably makes more sense to count the time from the first
mavlink creation.
2019-10-10 08:58:34 +02:00
Julian Oes ea35923d3a navigator: bugfix to prevent NaN setpoints
The asinf function is NaN outside of -1 to 1. Therefore, it probably
makes sense to constrain the input to prevent NaN setpoints further down
the line.
2019-10-09 08:36:34 -06:00
Matthias Grob ca711fecc7 Commander: improve message for RC override event 2019-10-09 15:34:46 +02:00
mcsauder f9a5c91f8c Deprecate vehicle_attitude_sub from MulticopterLandDetector as it is no longer utilized. 2019-10-09 09:48:17 +02:00
Lasse 5ac0a3043b Clarify Documentation of THR_MDL_FAC
The documentation of the thrust model parameter `THR_MDL_FAC` did not
mention both thrust and "PWM" being relative values. Also the use of the
term PWM could be misleading, since the model is applicable to CAN ESCs
as well.

This commit rephrases the user documentation string and a few source
code comments, but no logic changes are made.

Closes PX4/Firmware#13105
2019-10-09 08:06:51 +02:00
Matthias Grob c1faea8d32 Commander: add const qualifiers for clarity 2019-10-09 08:03:07 +02:00
Matthias Grob 63f2c009c7 PreflightCheck: refactor failureDetectorCheck return value 2019-10-09 08:03:07 +02:00
Matthias Grob 8e0ee88e0a PreflightCheck: add const qualifiers to parameters
to help readability
2019-10-09 08:03:07 +02:00
Matthias Grob c570dc9315 PreflightCheck: remove goto from imu consistency check 2019-10-09 08:03:07 +02:00
mcsauder 6066300757 Set a default signal_quality value in the MavlinkReciever::handle_message_distance_sensor() method. 2019-10-08 21:19:47 +01:00
mcsauder 5ccba5541d Added missing fields and a TODO with commented field to the MavlinkReciever::handle_message_distance_sensor(). 2019-10-08 21:19:47 +01:00
dusan19 8c4d32ff4b navigator: when setting pos_sp_triplet yaw, also set the yaw valid flag to true 2019-10-07 20:53:40 -04:00
Julian Oes 741f6787a7 mavlink: disable sending RC override
This was added to enable a Pixhawk to be used as an RC input for e.g.
SITL. As far as we're aware of that's not really used. However, sending
this can cause issues if multiple Pixhawks are in the same network.
Also, is uses up some of the MAVLink bandwidth.

Therefore, it's probably best to remove that feature for now.
2019-10-07 09:59:17 -04:00
TSC21 9a4a02a255 uorb_rtps_message_ids.yaml: fix typo 2019-10-07 12:58:15 +01:00
Julian Oes 5e663b9321 Remove eigen leftovers
It looks like we're not using Eigen for a while now.
2019-10-07 12:04:50 +02:00
BazookaJoe1900 02e861b16e enable silent compare of parameter (#12850)
Remove false errors after comparing parameters that doesn't exists.
as described in #12832
2019-10-07 09:50:11 +02:00
Matthias Grob 05446c0875 ubuntu.sh: correct output during ccache installation (#13106) 2019-10-07 09:14:00 +02:00
Daniel Agar 941a3258b6 Update submodule mavlink v2.0 to latest Sun Oct 6 12:38:38 UTC 2019 (#13100)
- mavlink v2.0 in PX4/Firmware (91badceb27): https://github.com/mavlink/c_library_v2/commit/d4a4a4314b8912015e999e17a3f66afee434a9cd
    - mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/31cc5bb39e1cb69f5e608e8e2cac8a4d57332e1c
    - Changes: https://github.com/mavlink/c_library_v2/compare/d4a4a4314b8912015e999e17a3f66afee434a9cd...31cc5bb39e1cb69f5e608e8e2cac8a4d57332e1c
2019-10-06 10:41:21 -04:00
TSC21 91badceb27 Update submodule sitl_gazebo to latest Sun Oct 06 11:02:54 GMT 2019 2019-10-06 11:40:02 +01:00
Nuno Marques 5a8aa04970 CI: bump container tags to 2019-10-04 (#13095)
* bump container tags to 2019-10-04

* docker_run: update container name and tag

* generate_microRTPS_bridge.py: force FastRTPSGen to version 1.0 if the result of 'fastrtpsgen -version' command is not a number

* CI: temporarly disable avoidance and safe landing tests

* CI: try to revive tiltrotor test
2019-10-06 01:21:04 -04:00
Matthias Grob c8f3f07ff7 matrix: pull explicit constructors 2019-10-05 11:46:07 -04:00
TSC21 474c406147 CI: microRTPS: deploy templates to px4_ros_com 2019-10-04 16:56:03 +01:00
TSC21 e7b0384f05 fix FastRTPSGen version verification 2019-10-04 16:56:03 +01:00
TSC21 9c00f3de02 microRTPS bridge: CMake: add verbosity regarding the FastRTPSGen version 2019-10-04 16:56:03 +01:00
TSC21 5c0f01a8b8 microRTPS bridge: try/catch FastRTPSGen errors 2019-10-04 16:56:03 +01:00
TSC21 2677e12024 microRTPS bridge: templates: Publisher.cpp.em: close 'if' statement 2019-10-04 16:56:03 +01:00
TSC21 8846092c59 readd console output removal 2019-10-04 16:56:03 +01:00
TSC21 1970ef875f micrortps bridge: clean templates; add backwards compatibility; add ROS2 compatibility 2019-10-04 16:56:03 +01:00
TSC21 278d2fd21f first push on supporting ROS2 Dashing and IDL 4.2 2019-10-04 16:56:03 +01:00
Daniel Agar f885d2274a Revert "vtol_att_control: update parameter strings to class enum"
This reverts commit 5351f886ec.
2019-10-03 11:28:51 -04:00
Daniel Agar a5895e5a99 Revert "commander: update parameter strings to class enum"
This reverts commit c322f1d156.
2019-10-03 11:28:44 -04:00
PX4 Build Bot 5f040fe24c Update submodule ecl to latest Wed Oct 2 20:37:33 EDT 2019
- ecl in PX4/Firmware (4d0ac1a400cc007af392c99bbfa809d59d3e7ecd): https://github.com/PX4/ecl/commit/b78429aa60257157c53a8a43c1c29646560de124
    - ecl current upstream: https://github.com/PX4/ecl/commit/f005e0ea8f33d10dd014a0700e712426540bb58a
    - Changes: https://github.com/PX4/ecl/compare/b78429aa60257157c53a8a43c1c29646560de124...f005e0ea8f33d10dd014a0700e712426540bb58a

    f005e0e 2019-09-27 kamilritz - Remove deprecated ev_innov_gate param
2019-10-03 00:26:16 -04:00
PX4 Build Bot cee8c31649 Update submodule matrix to latest Wed Oct 2 20:37:38 EDT 2019
- matrix in PX4/Firmware (cb369cb6a75cae71035d72a3bacecce3e109f971): https://github.com/PX4/Matrix/commit/c34e8dc98fd05ea55dcd4c9fc551b11a3d23a601
    - matrix current upstream: https://github.com/PX4/Matrix/commit/973999a4d3c6d4d85bf0153230974fd9571f7846
    - Changes: https://github.com/PX4/Matrix/compare/c34e8dc98fd05ea55dcd4c9fc551b11a3d23a601...973999a4d3c6d4d85bf0153230974fd9571f7846

    973999a 2019-09-23 Matthias Grob - Fix some template type conversions and style
2019-10-03 00:25:18 -04:00
Mark Sauder 3ce58f7102 sensors: organize vars in voted_sensors_update.h 2019-10-02 19:54:38 -04:00
Daniel Agar e3bbac0447 land_detector: move to same WQ as estimator
- the primary data sources of the land detector run from the same WQ so
don't lose anything by serializing these modules
2019-10-02 19:44:46 -04:00
Daniel Agar c639444ef9 intel aerofc-v1 disable sih module to save flash 2019-10-02 19:44:46 -04:00
Daniel Agar 315141873e NuttX boards reduce CONFIG_MAX_TASKS 64 -> 32 (default) 2019-10-02 19:44:46 -04:00
Daniel Agar 7baf474940 mc_pos_control: move to WQ 2019-10-02 19:44:46 -04:00
Daniel Agar 3c623af903 ekf2: move to WQ with uORB callback scheduling 2019-10-02 19:44:46 -04:00
Daniel Agar 5351f886ec vtol_att_control: update parameter strings to class enum 2019-10-02 19:43:32 -04:00
Daniel Agar c322f1d156 commander: update parameter strings to class enum 2019-10-02 19:43:32 -04:00
Mark Sauder 508ffa1b39 land_detector: Remove recently added vehicle_attitude.timestamp check from MulticopterLandDetector::_get_maybe_landed_state(). (#13072)
PR #12681 added a check to the MulticopterLandDetector::_get_maybe_landed_state() method for a valid vehicle_attitude.timstamp value to finish work in PR #9756. It was discovered that the addition of that check leaves it possible to fly in acro mode without a valid attitude and auto-disarm can engage, allowing the multicopter to fall out of the sky.
2019-10-02 16:31:06 -04:00
Daniel Agar d537f3ec6b vscode: restore editor.smoothScrolling to default 2019-10-02 16:24:53 -04:00
mcsauder 2644742b37 Deprecate RoverLandDetector virtual methods that are redundant. 2019-10-02 16:02:30 -04:00
Jacob Dahl 5842c0c2fb UAVCAN: add battery support (uavcan::equipment::power::BatteryInfo) 2019-10-02 13:08:43 -04:00
Daniel Agar 26364d44c9 px4_work_queue: command line status output and shutdown empty queues
* adds a work_queue systemcmd that will bring a tree view of all active work queues and work items
 * WorkQueues now track attached WorkItems and will shutdown when the last WorkItem is detached
2019-10-02 12:23:17 -04:00
garfieldG cc1d86bc0b @value will be printed with Whitespace in start of line for serial_config parameters 2019-10-02 10:34:10 +02:00
Daniel Agar 0fe271b7f5 CollisionPrevention add more distance_sensor orientations 2019-10-01 21:05:37 -04:00
Daniel Agar 5126e6ea61 cmake: use gold linker if available 2019-10-01 20:44:07 -04:00
Daniel Agar 3687677095 cmake: show sitl_gazebo build output and improve rebuild 2019-10-01 14:22:30 -04:00
Daniel Agar 27f459c14e px4io: move to uORB::Publication<> 2019-10-01 12:24:27 -04:00
Julian Oes fa9ac6ecf6 github: tone stalebot down
My suggestion is to re-configure stale bot so it just adds the label
stale but does not close the issue/PR.

This enables us to look for outdated issues using the stale label and
close them.

This brings these advantages:
- No more endless re-opening of PRs and issues which is not fun (and I
  will eventually give up on).
- Less stalebot comment noise. (Because it is handy to look for all
  issues/PRs without any comments to see what is unanswered).
- I'm not listed as "participating" in all the issues/PRs just because
  I was just fighting the stalebot.
- Less notifications meaning we can see anything in the noise.
2019-10-01 10:35:28 -04:00
Daniel Agar 2989ce981c rc_input: move to uORB::PublicationMulti<> 2019-09-30 18:41:23 -04:00
Daniel Agar 6941077218 FlightTasks: orbit and obstacle test use new uORB::Publication<> 2019-09-30 18:26:01 -04:00
Daniel Agar 045f6233d4 FlightTasks: switch to uORB::Subscription
- delete SubscriptionArray
 - all FlightTasks are now responsible for updating their own subscriptions (typically in updateInitialize()).
2019-09-30 18:16:36 -04:00
dvornikov-aa ad728cc0c7 sf1xx: Fix max distance for SF/LW20/b 2019-09-30 20:10:57 +01:00
Daniel Agar a557f3ffe4 bitcraze crazyflie add dmesg and console buffer 2019-09-30 14:29:54 -04:00
Daniel Agar 62bc0ab8ad CollisionPrevention: limit collision warning to every 3 seconds and minor cleanup
- whitespace and formatting fixes
 - mark locals const for readability
2019-09-30 10:48:12 -04:00
Daniel Agar 34b03d5659 frsky_telemetry: move to uORB::Subscription 2019-09-30 10:28:03 +02:00
Daniel Agar 0af942ce12 Jenkins hardware skip sd_bench on px4_fmu-v5_stackcheck 2019-09-29 20:29:34 -04:00
Daniel Agar 030e22c724 adc test shorten 2019-09-29 20:29:34 -04:00
Daniel Agar c8e59c4e39 parameter_update use uORB::Subscription consistently 2019-09-29 10:49:03 -04:00
garfieldG bbb96cbd0c Mavlink startup script per board
-moved rc.mavlink to the boards optional rc additions (now it's called rc.board_mavlink) to handle board specific mavlink needs (mavlink over usb, ethernet, additional streams, etc.)
-mavlink module will be responsible to usb defaults, therefore less args are needed to be passed to mavlink module if one wants to use mavlink over usb.
-the way to check if connection is usb is by it's designated variable and not by config mode.
2019-09-29 10:46:08 -04:00
Daniel Agar fdefaf1ad3 lights/blinkm: move to uORB::Subscription 2019-09-28 18:34:20 -04:00
Daniel Agar ec061a7cfd telemetry/bst: move to uORB::Subscription 2019-09-28 18:19:38 -04:00
Daniel Agar 105bbef3bf commander: rc_calibration move to uORB::Subscription 2019-09-28 16:43:53 -04:00
Julian Oes ce4290c8d4 mavlink: typo fix att -> act 2019-09-28 16:40:13 -04:00
Julian Oes b0035e5704 mavlink: prevent race if shut down immediately
If we do mavlink stop-all right after mavlink start, we do a perf_free
before actually having stopped the threads accessing the perf counters.
2019-09-28 16:40:13 -04:00
Daniel Agar 0486d69240 delete obsolete segway example 2019-09-28 15:05:50 -04:00
Daniel Agar fd67bd0680 uORB: SubscriptionCallback cleanup naming 2019-09-28 13:43:56 -04:00
Kjkinney 3f9b3fb4da px4_log: publish all PX4_INFO messages as well (#12954) 2019-09-27 14:04:30 -04:00
Daniel Agar 637d52c74f frsky_telemetry: increase stack by 60 bytes 2019-09-27 11:37:29 -04:00
mcsauder 4f71c4e123 Change #defines to static constexpr types in LidateLite.h, updated the docs link in ll40ls.cpp, and shortened comments to allow uniform indentation in LidarLiteI2C.h. 2019-09-27 07:55:53 +01:00
mcsauder 9023030931 LidarLite driver minor comment updates/formatting and change instances of OK to PX4_OK. 2019-09-27 07:55:53 +01:00
mcsauder 7b16c3482d Refactor the ll40ls namespace driver methods to more closely match the cm8jl65, mappydot, leddar_one, and other distance sensor driver implementations. 2019-09-27 07:55:53 +01:00
kamilritz 8ce4a15778 Update frame in mavlink receiver odometry to newest mavlink 2019-09-26 14:48:20 -04:00
kamilritz 9c46a89f64 Update EKF_AID_MASK 2019-09-26 14:48:20 -04:00
Silvan Fuhrer bfbc9dda91 VTOL: fix front transition rate publication (enable FW attitude controller to run instantly when transition is started). For that the vehicle_status_poll is moved before vehicle_control_module_poll in FW att C
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-09-26 11:39:55 -04:00
kritz 190c817a9e ekf2: update to latest ecl version [continued] (#13023)
* ekf2: update to latest ecl version

Includes compatibility changes for renamed variables.

* ekf2: Add write of odometry velocity data

Co-Authored-By: kritz <kritz@ethz.ch>

* ekf2: Modify parameters to enable control of vision velocity fusion

* ekf2: Update to latest ecl with timestamp messages
2019-09-26 10:21:53 +02:00
Daniel Agar dedd257433 CollisionPrevention: fix integer rounding (#13028) 2019-09-26 09:45:55 +02:00
Daniel Agar 3031f94ded mavlink: optimize normal mode for typical GCS usage over serial radio 2019-09-25 14:08:04 -04:00
Daniel Agar 2366abefd8 nxp/fmuk66-v3: readd uavcan
* this was accidentally dropped earlier this year
2019-09-25 13:42:59 -04:00
Daniel Agar 88fb6f7b8e cm8jl65: move to PX4Rangefinder and cleanup
* cm8jl65 split out header and main
* cm8jl65: move to PX4Rangefinder
* PX4Rangefinder: move signal_quality handling to PX4Rangefinder
2019-09-25 12:52:45 -04:00
Daniel Agar a217e15c5f Jenkins temporarily disable Catkin build 2019-09-25 10:45:12 -04:00
Mark Sauder db8e203a7a Update the Integrator class local variable dt from double to float and utilize the hrt_abstime typedef. (#12935) 2019-09-25 14:41:54 +02:00
Julian Oes 0b368d043f mavlink: always check stream subscriptions (#13018)
This fixes the regression where we saw this in SITL:
ERROR [mavlink] system boot did not complete in 20 seconds

The reason was that the stream subscription requests were not checked
because the while loop was not running yet because mavlink was not
booted completely.
By moving the stream subscription requests into a function we can run
them even if we don't run the rest of the loop.
2019-09-25 14:37:08 +02:00
Daniel Agar b6db872303 listener fix incorrect "never published" cases (#13006)
- fixes #12955
2019-09-25 10:46:13 +02:00
Matthias Grob bc8781d130 Appveyor: update to Windows Toolchain v0.6 (#13016) 2019-09-25 10:43:04 +02:00
Mark Sauder 4a6742c3e6 Deprecate the non-functioning HC_SR04 driver. (#13021) 2019-09-25 10:34:50 +02:00
Julian Kent 07d656e971 Guidance feature for Collision Prevention (#13017)
* add guidance

* remove COL_PREV_ANG and replace with COL_PREV_CNG

* safe max ranges per bin

* increase default value for colprev delay to account for tracking delay

* update parameter description

* fix and extend testing

* add handling for overlapping sensor data

* fix decision process for overlapping sensors
2019-09-24 17:00:04 +02:00
bresch 6139812293 FailureDetector - use standard topic subscription for attitude topic and
pass vehicle_status from commander instead of subscribing to it.
2019-09-24 14:17:58 +02:00
bresch 000c1e364c FailureDetector - Ignore attitude check for MC in acro and rattude, and FW in manual, acro and rattitude modes 2019-09-24 14:17:58 +02:00
kamilritz 35c50f693f Add missing id for vehicle_visual_odometry_aligned for rtps 2019-09-24 10:49:33 +01:00
Matthias Grob 6a5ca6e336 FlightTask: use inline assignment initializer for reset_counters struct 2019-09-24 10:34:08 +02:00
bresch 679b1659eb AutoLineSmoothVel - Reorganize functions declarations to match cpp file 2019-09-24 10:34:08 +02:00
bresch c811cf4784 FlightTask - Move ekf reset counter monitoring logic in the base FlihtTask
Each child FlightTask can simply implement what it wants to do in case
of an EKF reset event by overriding one of the _ekfResetHandler functions
2019-09-24 10:34:08 +02:00
kritz 7427768e70 ECL reference frame alignment fix (#12771)
* Fix EKF frame alignemen in ECL

* Remove empty lines

* Add initalization for ev_odom

* Only use yaw covariance for angErr

* Improve frame naming in comments

* Use copyTo

* Add aligned as suffix

* Add missing vehicle_visual_odometry_aligned
2019-09-23 14:24:52 -04:00
Matthias Grob 412b44ff6e Commander: allow RC to override during RTL 2019-09-23 12:42:33 +02:00
Matthias Grob 4f44fde080 Commander: remove not disarming by RC message
Refactoring the condition to be more clear.
2019-09-23 12:42:33 +02:00
Christian Clauss 41516fbd55 Old style exceptions are Python 3 syntax errors 2019-09-22 17:47:37 -04:00
Daniel Agar bc35251799 Update submodule mavlink v2.0 to latest Sun Sep 22 08:37:26 EDT 2019
- mavlink v2.0 in PX4/Firmware (09bd7bbcab7ba508043018eefbe020ff74d79c66): https://github.com/mavlink/c_library_v2/commit/be2f1fbe0a8235ff4632e7df1d54c89a3c8615bd
    - mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/d4a4a4314b8912015e999e17a3f66afee434a9cd
    - Changes: https://github.com/mavlink/c_library_v2/compare/be2f1fbe0a8235ff4632e7df1d54c89a3c8615bd...d4a4a4314b8912015e999e17a3f66afee434a9cd
2019-09-22 14:23:56 -04:00
bazooka joe fb3a91cc4f added circuit_breaker_enabled_by_val()
added and using circuit_breaker_enabled_by_val() where possible instead of circuit_breaker_enabled() which search for cbrk parameters by name, which is extensive process.
2019-09-22 13:55:40 -04:00
cclauss c18104d48b Use print() function in both Python 2 and Python 3
Legacy __print__ statements are syntax errors in Python 3 but __print()__ function works as expected in both Python 2 and Python 3.
2019-09-22 13:54:24 -04:00
mcsauder cdbe4a3ee8 Refactor the terraranger driver. 2019-09-22 12:23:25 -04:00
PX4 Build Bot c67a7536d4 Update submodule matrix to latest Sun Sep 22 08:37:30 EDT 2019
- matrix in PX4/Firmware (8b1f9546aabfe6ab2a0431f1d5af6dcc976d4f59): https://github.com/PX4/Matrix/commit/60c9c99dcc44ea12bed0c3f9b95d01e2aa6d7d9e
    - matrix current upstream: https://github.com/PX4/Matrix/commit/c34e8dc98fd05ea55dcd4c9fc551b11a3d23a601
    - Changes: https://github.com/PX4/Matrix/compare/60c9c99dcc44ea12bed0c3f9b95d01e2aa6d7d9e...c34e8dc98fd05ea55dcd4c9fc551b11a3d23a601

    c34e8dc 2019-09-17 Matthias Grob - helper: consider matrices with the same NANs and INFINITYs equal
bbaa938 2019-09-17 Matthias Grob - helper: consider NAN equal to NAN such that vectors can be compared exactly
33a6291 2019-09-17 Matthias Grob - Matrix: add proper print function testing
b0b7d72 2019-09-17 Matthias Grob - Multiplication test: fix division resulting in NAN
3747232 2019-09-17 Matthias Grob - LeastSquaresSolver: Fix nasty GCC compile optimization error
5844b0e 2019-09-16 Matthias Grob - Implement one float equality check and use it everywhere
1e80807 2019-09-16 Matthias Grob - test: Add uncovered equality checks with NAN and INFINITE
a374f37 2019-09-16 Matthias Grob - Include helper_functions like all other library components
2019-09-22 11:34:53 -04:00
Daniel Agar fe4f6c186e Mavlink: ifdef networking code 2019-09-21 13:46:01 -04:00
Daniel Agar 86dc4c5a00 cmake generate vscode launch.json 2019-09-21 13:06:49 -04:00
PX4 Build Bot 42ca17ce77 Update submodule v2.0 to latest Thu Sep 19 20:38:28 EDT 2019
- v2.0 in PX4/Firmware (103595e866882191593136495a52825c455d2026): https://github.com/mavlink/c_library_v2/commit/ac40c0329e88b70ae5db4c1467ed5853d305af54
    - v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/be2f1fbe0a8235ff4632e7df1d54c89a3c8615bd
    - Changes: https://github.com/mavlink/c_library_v2/compare/ac40c0329e88b70ae5db4c1467ed5853d305af54...be2f1fbe0a8235ff4632e7df1d54c89a3c8615bd

    be2f1fb 2019-09-17 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/b21a2652249a27a151b38cd3da5c4ac9d51fcb69
d465e22 2019-09-17 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/af677f748aa2c3268f71db6f3a1c867530b51894
5631a1e 2019-09-16 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/2876e4c06e707519a8770b661abaac008feef703
05a4389 2019-09-16 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/77a18b1cb7d4667b669e0429d86082ed38b79886
2019-09-20 11:41:27 +02:00
bresch 6f3868b5ba ManualVelocitySmoothing - Fix unlock initialization 2019-09-19 17:31:49 +02:00
bresch 0153e1b126 Matrix - Explicitly cast array[3] to Vector3f
Use .xy() for Vector2 -> Vector3 assignment
2019-09-19 17:31:49 +02:00
bresch f405bf506b AltitudeSmoothVel - Use ManualVelocitySmoothingZ class instead of re-implementing the logic 2019-09-19 17:31:49 +02:00
bresch ce96d98621 ManualVelocitySmoothing - Cosmetic changes (renaming, indentation,..)
Set the classes as final and set destructor to non-virtual
2019-09-19 17:31:49 +02:00
bresch 7cdb2364e9 ManualVelocitySmoothingXY - Add simple unit test 2019-09-19 17:31:49 +02:00
bresch f5d7eb4d87 Refactor FlightTaskManualPositionSmoothVel 2019-09-19 17:31:49 +02:00
bresch 080eedfd02 ManualPositionSmoothVel - Split large function into smaller ones, split XY and Z axes
Next step is to move as much as possible to a library in order to
reuse the Z axis in the Altitude FlightTask
2019-09-19 17:31:49 +02:00
Dennis Mannhart 453b6a39e4 TrajMath: move from FlightTasks/Utility into mathlib library because the function is also used by other libraries 2019-09-19 14:09:44 +02:00
Dennis Mannhart e6b7062442 TrajMath: replace type placeholder with floats 2019-09-19 14:09:44 +02:00
bresch e9ab6a75ba MC rate control - Scale the integrator with K during the integration
part to avoid having to scale its saturation separately. This is
required to avoid premature saturation of the integrator when using
the K term.
Also remove double saturation of the integrator
2019-09-19 14:05:28 +02:00
bresch 67e528ec0c Takeoff - allow publishing NAN longitude and latitude
A NAN is interpreted in the FlightTaskAuto as a non-valid global coordinate and sets a local position.
If a zero is sent instead, the global coordinate is recognized as valid and will be executed.
This is a problem when the global position is gained for the first time after takeoff and that a valid global reference did not exist before
2019-09-19 14:03:58 +02:00
Nico van Duijn 549a962553 EKF2: move handling of invalid range into ECL (#12988)
* ekf2: Move handling of invalid range finder data inside ecl library

The ecl library EKF is able to use vehicle motion and in-air status to better determine when the default on-ground range finder reading can be used.
The description for the EKF2_MIN_RNG parameter has been updated to make its use clearer.
2019-09-19 11:29:34 +02:00
Matthias Grob fa13f63db6 ekf2: temporarily hardcode new quality information to unkown
until priseborough's and nicovanduijn's pr #12950
2019-09-18 22:01:36 -04:00
Matthias Grob c8d0eba1d2 Update ecl and matrix to safe matrix access 2019-09-18 22:01:36 -04:00
Matthias Grob 1ecbf8efd2 test_matrix: remove duplicate namespace accesses 2019-09-18 22:01:36 -04:00
Julian Kent 2d4ecab3b0 Remove unsafe access to .data() and _data in Matrix 2019-09-18 22:01:36 -04:00
Daniel Agar 78bf12f0db px4_tasks: reduce POSITION_CONTROL priority
* this is to prevent the loss of any sensor data or estimator time slip in the event of a position controller or flight task overrun
2019-09-18 09:55:06 -04:00
Daniel Agar 494f35d5f4 Mavlink: wait for boot complete before sending or receiving anything 2019-09-18 09:07:55 -04:00
Daniel Agar be61d93d64 tfmini split out header and main 2019-09-17 21:50:59 -04:00
Daniel Agar 9b7ef7141f tfmini cleanup and use PX4Rangefinder 2019-09-17 21:50:59 -04:00
Nico van Duijn 18eaeb564d PMW3901 improvements (#12977)
* PMW3901: use frame count and quality metric

* PMW3901: set qual to 0 for unsuccessful SPI reads

* PMW3901: improve comment for collect_time

* PMW3901: set qual to zero for huge flow values
2019-09-17 10:54:56 -04:00
Maximilian Laiacker 72e93a9c36 fixed total flight time counting bug
After landing it can happen that a second take off is detected and then the _takeoff_time is rest, resulting in a wrong total flight time counter. With this fix the flight time is reliably counted from the first take off until the vehicle is disarmed. Normally the vehicle will not spend much time armed after landing, if it does the flight time will be off but this is the same as before this fix. This fix was tested in several flight experiments.
2019-09-17 14:52:27 +02:00
Daniel Agar c13835c0f0 replay module split replay_main.cpp into separate compilation units 2019-09-17 14:33:04 +02:00
Matthias Grob 270e12a4df VelocitySmoothing: refactor local scope t variables instead of array 2019-09-17 09:27:00 +02:00
bresch da8ac8cafb VelocitySmoothing - Clean up updateTraj function based on Matthias' comments 2019-09-17 09:27:00 +02:00
bresch b82fa68893 VelocitySmoothingTest - Fix typo and use "zero" instead of "null" 2019-09-17 09:27:00 +02:00
bresch 42cedb7fda VelocitySmoothing - Change direction of "brake" as braking means that
only the T3 part is required and that the jerk applied during T3 is the
opposite of the one defined by "_direction".
2019-09-17 09:27:00 +02:00
bresch 8490266be8 VelocitySmoothing - (Re)set _state_init every time _state is (re)set 2019-09-17 09:27:00 +02:00
bresch 654938f6a1 VelocitySmoothing - Cosmetic changes (new lines, reorganize functions),
regroup both updateTraj functions and edit some comments
2019-09-17 09:27:00 +02:00
bresch 0b765a1642 AltitudeSmoothVel - Update to use new implementation of VelocitySmoothing
Remove jerk reduction (not needed in the new implementation)
2019-09-17 09:27:00 +02:00
bresch 862454827e VelocitySmoothingTest - Test that the trajectory is always within the constraints 2019-09-17 09:27:00 +02:00
bresch 8cc2a7018e VelocitySmoothing - Re-enable time stretch, integrate dt to get local time.
Also split a few functions into smaller ones for readability, fix
formatting, use geters to get the current state of the trajectory
instead of return arguments.
2019-09-17 09:27:00 +02:00
bresch c7696488fe VelocitySmoothing - Improve computation of the direction of the trajectory by predicting the velocity at zero acceleration instead of the current velocity
This helps when the current velocity is smaller than the target but that
the acceleration is too large such that the velocity will overshoot.
Without this check, the algorithm increases the acceleration which leads
to an even larger overshoot.
2019-09-17 09:27:00 +02:00
bresch 052932fa95 VelocitySmoothingTest - Update unit test to use the same parameters ordering (time, setpoint) as the VelocitySmoothing class 2019-09-17 09:27:00 +02:00
bresch c13499e64b test_velocity_smothing - Update test script to use new polynomial evaluation algorithm 2019-09-17 09:27:00 +02:00
bresch a03cc495ce VelocitySmoothing - Refactor class to use polynomial evaluation instead of numerical integration
This solves many numerical issues when the trajectory is close to the
primary NE axes (small velocities). It is also more robust when dt is
large and has some jitter.
2019-09-17 09:27:00 +02:00
Hamish Willee 0c0b261ff2 ubuntu.sh - remove modemmanager 2019-09-17 00:38:14 -04:00
Daniel Agar 5507f14bb2 Jenkins HIL disable rgbled 2019-09-15 17:17:09 -04:00
Daniel Agar ed6c7cc806 cmake remove unused/broken _no_optimization_for_target 2019-09-15 17:16:38 -04:00
Daniel Agar 251831f7af cmake px4_add_library remove unused PX4_LIBRARIES property 2019-09-15 17:16:38 -04:00
Daniel Agar dc46b6a749 cmake px4_add_module MAIN is always present (required) 2019-09-15 17:16:38 -04:00
Daniel Agar fb7521eb5e cmake px4_base -> px4_parse_function_args 2019-09-15 14:36:38 -04:00
Daniel Agar d256fb8770 cmake px4_find_python_module move to standalone file 2019-09-15 14:36:38 -04:00
Daniel Agar d27dfcd921 NuttX CMakeLists.txt extract helpers (jlink, upload, etc) 2019-09-15 14:36:38 -04:00
Daniel Agar f2189dd045 CMakeLists.txt extract top level helpers (ccache, doxygen, metadata, etc) 2019-09-15 14:36:38 -04:00
Matthias Grob d4f984fea5 FlightTaskAutoLineSmooth: Fix comment to be style compliant 2019-09-13 18:10:05 +02:00
bresch 47401d1177 AutoLineSmoothVel - Replace min/max absolute constraints with a function named constrainAbs
This function constrain the absolute value of some value but keeps the original sign.
2019-09-13 17:46:01 +02:00
bresch 3c5b24037a AutoLineSmoothVel - Improve virtual pilot logic that provides velocity setpoints to the trajectory generator.
Constrain the generated velocities in the NE inertial frame rather than
just constraining the norm.
2019-09-13 17:46:01 +02:00
bresch 59f54a7fd8 mathlib - Add FLT_EPSILON deadzone in sign computation 2019-09-13 17:46:01 +02:00
mcsauder 410dd85289 Comment out the ll40ls (LidarLite) driver from the fmu-v2 build. 2019-09-13 11:03:13 -04:00
Nico van Duijn a26865c279 drivers: set CM8JL65 signal_quality invalid beyond bounds 2019-09-13 10:42:10 -04:00
Martina Rivizzigno 78279f6587 Unit tests for Obstacle Avoidance interface (#12816)
* FlighTask: remove legacy definition of empty_trajectory_wapoint

* add unit tests for the ObstacleAvoidance interface
2019-09-12 14:37:31 +02:00
Julian Kent 39451b811a Do syscall for time once, outside of loop 2019-09-11 12:34:59 -04:00
Julian Kent b27d6a958a Account for the time since range data arrived 2019-09-11 12:34:59 -04:00
Hamish Willee 94ef585f76 Link to missing params docs 2019-09-11 09:17:00 -04:00
Hamish Willee fd10220a34 Ubuntu.sh: check for requirements.txt 2019-09-11 09:15:44 -04:00
Daniel Agar 6277710fac Github actions simple cpp build 2019-09-10 17:07:51 -04:00
Daniel Agar df01eda550 systemcmds/tests: delete obsolete test_sensors 2019-09-10 16:37:33 -04:00
Silvan Fuhrer 702c6f6df4 FW pos C: fix altitude control for VTOL/FW by also publishing attitude sp if in altitude, not only if position or velocity controlled
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-09-10 13:20:07 -04:00
Silvan Fuhrer 92b824e218 VTOL attitude controller: run update_vtol_state only if mc or fw att sp changed, such that pusher support in hover works again
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-09-10 13:52:33 +02:00
Silvan Fuhrer 1b2403a87f VTOL land detector: trigger land detector in fixed-wing mode if disarmed.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-09-10 13:46:43 +02:00
Julian Kent a8fbe6bba2 Remove references to pow(x,0.5), use sqrt instead (#12928)
* Remove references to pow(x,0.5), use sqrt instead

* Update matrix library
2019-09-10 13:29:39 +02:00
Patrick Servello 47e668eb86 simulator and dumpfile fix minor resource leaks
* Certain conditional branches returned before closing the file handler.
2019-09-09 13:24:07 -04:00
Daniel Agar a5e6c880fe Update submodule mavlink v2.0 to latest Mon Sep 9 12:38:36 UTC 2019
- mavlink v2.0 in PX4/Firmware (65db4b70fd76afe122c1aed404de60e978ead294): https://github.com/mavlink/c_library_v2/commit/d5d131cf710ceaa93d26884ea12de8de95804985
    - mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/ac40c0329e88b70ae5db4c1467ed5853d305af54
    - Changes: https://github.com/mavlink/c_library_v2/compare/d5d131cf710ceaa93d26884ea12de8de95804985...ac40c0329e88b70ae5db4c1467ed5853d305af54
2019-09-09 12:29:42 -04:00
mcsauder e4509486e8 Correct a typo and create a #define for the LeddarOne FOV. 2019-09-06 11:59:29 +02:00
mcsauder aea139bc1b Correct the LeddarOne FOV and deprecate the unneeded _distance_sensor_topic after migrating to PX4RangeFinder. 2019-09-06 11:59:29 +02:00
mcsauder ddd9a97d42 Modify the LeddarOne driver class to utilize the PX4RangeFinder library. 2019-09-06 11:59:29 +02:00
mcsauder 94d39e4466 Return from LeddarOne::collect() via LeddarOne::measure() and alphabetize #includes. 2019-09-06 11:59:29 +02:00
mcsauder f31ac44289 Const correctness and fix leddar_one::test(). 2019-09-06 11:59:29 +02:00
mcsauder c0e8b37d96 Add collect() validation to the LeddarOne::init() method, format whitespace and console output.
Reduce measure/collect timing logic complexity to use ScheduleOnInterval() rather than SchuleDelayed().
2019-09-06 11:59:29 +02:00
mcsauder 04073f2c71 Deprecate the LeddarOne request() and publish() methods to match other distance sensor driver classes and fix perf counter errata. 2019-09-06 11:59:29 +02:00
Tanja Baumann f3c5ca6015 Collision Prevention: support multiple sensors and frames (#12883)
* build internal sensor map

* Extend testing coverage

* Update matrix library
2019-09-06 08:38:56 +02:00
Hamish Willee eb81f4bce2 ubuntu.sh: Add note to reboot computer 2019-09-06 08:02:02 +02:00
Hamish Willee 0b049fa4d7 Add updated ccache for Ubuntu 16.04 dev scripts 2019-09-06 08:02:02 +02:00
Julien Lecoeur 7bea81f02c Add board orientation ROLL_90_YAW_270 2019-09-05 20:41:32 -07:00
Daniel Agar c75954fef8 lib/led: temporarily ignore implicit fallthrough warning 2019-09-04 20:03:02 -07:00
Julian Oes c8d13bacf2 pwm_out_sim: don't advertise garbage 2019-09-04 09:21:54 -07:00
TSC21 f6a5c7cca9 qshell: rename qshell sequence fields so they can be parsed on fastrtpsgen 2019-09-04 17:04:28 +01:00
PX4 Build Bot 69475a172b Update submodule ecl to latest Wed Sep 4 08:37:31 EDT 2019
- ecl in PX4/Firmware (da6970329175df98ff46b2d9ddfa467ba438bb2e): https://github.com/PX4/ecl/commit/62fa464e4dd6cb5e585d23bd353aa50a469879f7
    - ecl current upstream: https://github.com/PX4/ecl/commit/3b32ee41660afd4785c374355e0fdefdae83e9b9
    - Changes: https://github.com/PX4/ecl/compare/62fa464e4dd6cb5e585d23bd353aa50a469879f7...3b32ee41660afd4785c374355e0fdefdae83e9b9

    3b32ee4 2019-09-02 bresch - Flow aiding - Reset state when flow is enabled only if it is the only position/velocity aiding sensor. Until now, it was alway resetting if the vehicle does not have gps or external vision. This caused a reset/glitch at every stop (when range data gets valid)
be368f3 2019-08-28 kamilritz - Update comment
c5abfe6 2019-08-28 kamilritz - remove canonicalize and adapt comments
67512d8 2019-08-22 kamilritz - Update matrix library for CI
a2ff415 2019-08-22 kamilritz - Fix get frame aligning quaternion function
53eac6e 2019-08-21 kamilritz - Canonicalize alignment quaternion
933c32c 2019-08-20 kamilritz - Enable local frame alignment also without using it
ea352a6 2019-08-20 kamilritz - Dont use mag suffix for magnitude
05196db 2019-08-20 kamilritz - Fix alignment of local frame
2019-09-04 08:09:36 -07:00
BazookaJoe1900 6ab5c2170e remove unused pca8574 and oreoled drivers 2019-09-04 08:05:08 -07:00
Nico van Duijn b4709d229a PMW3901: use quality metric 2019-09-04 08:03:04 -07:00
Claudio Micheli 5fd483dbf8 ll40ls: fixed typo errors.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-09-04 15:27:16 +01:00
Claudio Micheli 6a8b25a1b9 ll40ls: simplified probe logic and lowered max readable distance.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-09-04 15:27:16 +01:00
Claudio Micheli 59f61b3107 ll40ls: fix v3hp signal quality and modified probe to detect v3hp.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-09-04 15:27:16 +01:00
Claudio Micheli 327529d063 ll40ls: unify maximum operational distance to 35m
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-09-04 15:27:16 +01:00
Claudio Micheli fcdd2fabeb ll40ls: refactor driver start on i2c.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-09-04 15:27:16 +01:00
Claudio Micheli 5eefd9409b ll40ls: [Wingtra docet] fix for properly resetting v3 and v3hp modules.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-09-04 15:27:16 +01:00
Claudio Micheli 7799f4c68b ll40ls: fix for lidar lite v3hp
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-09-04 15:27:16 +01:00
Julian Oes 5e9cae11f8 controllib: fix for undefined sanitizer 2019-09-03 11:54:09 -05:00
Julian Oes 78d3986013 platforms: fix main function signature 2019-09-03 11:52:54 -05:00
Daniel Agar f1339038ca px4_fmu-v5_stackcheck disable roboclaw and pca9685 to reduce flash 2019-09-03 08:03:32 -07:00
Claudio Micheli b6bba0428a uavcan: fix limit actuator poll interval.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-09-03 09:35:01 -05:00
Silvan Fuhrer d5fdc55460 fmu-v5: add baro again in startup
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-09-03 13:48:34 +02:00
JaeyoungLim 09dab07071 Enable support for global position setpoints with SET_POSITION_TARGET_GLOBAL_INT (#12819) 2019-09-03 11:21:41 +02:00
Daniel Agar 9bc19fd732 IMU_GYRO_RATEMAX add common options 2019-09-02 23:53:26 -05:00
Daniel Agar f280977ed0 mavlink: update orb_publish to uORB::Publication<> 2019-09-02 23:51:54 -05:00
Daniel Agar 20e6adc4ca sensors: update orb_publish to uORB::Publication<> 2019-09-02 20:44:03 -04:00
Daniel Agar c8f77d438d load_mon: update orb_publish to uORB::Publication<> 2019-09-02 20:41:34 -04:00
Daniel Agar 4d9f2bf776 add IMU_GYRO_RATEMAX to optionally limit gyro control publication rate 2019-09-02 20:06:50 -04:00
bazooka joe 49c74ab021 add new parameter LIGHT_EN_BLINKM to start blinkm lights 2019-09-02 20:02:00 -04:00
Daniel Agar 7162000e80 fw_pos_control_l1: update orb_publish to uORB::Publication<> 2019-09-02 16:20:44 -04:00
Daniel Agar e83026f106 fw_att_control: update orb_publish to uORB::Publication<> 2019-09-02 16:20:44 -04:00
Daniel Agar b0f82ee8ac CollisionPrevention: update orb_publish to uORB::Publication<> 2019-09-02 15:35:34 -04:00
Daniel Agar 9f5f9c577e uavcan: limit actuator controls poll interval
* rather than only in UavcanEscController updates
2019-09-02 14:21:54 -04:00
Daniel Agar 6938955b8d vtol_att_control: limit state updates to input availability and always publish both FW/MC actuator controls 2019-09-02 14:13:33 -04:00
Daniel Agar 06cf801121 SENS_BARO_QNH set reboot_required
- fixes https://github.com/PX4/Firmware/issues/12866
2019-09-02 13:40:34 -04:00
Daniel Agar 3c8a41aff7 px4_fmu-v2 variants disable mpu9250 2019-09-02 12:42:18 -04:00
Daniel Agar 0c11ab1e5e Update submodule mavlink v2.0 to latest Mon Sep 2 12:38:04 UTC 2019 (#12868)
- mavlink v2.0 in PX4/Firmware (51a0a59d2c65869a79e85d7d43c0917db2b5ff06): https://github.com/mavlink/c_library_v2/commit/e26d03dbf858d3b04babb4fe106ecc831ac9b906
    - mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/d5d131cf710ceaa93d26884ea12de8de95804985
    - Changes: https://github.com/mavlink/c_library_v2/compare/e26d03dbf858d3b04babb4fe106ecc831ac9b906...d5d131cf710ceaa93d26884ea12de8de95804985
2019-09-02 11:53:30 -04:00
BazookaJoe1900 8a45c6145b add new parameter SENS_EN_PMW3901 to start pmw3901 optical flow 2019-09-02 11:08:51 -04:00
Julien Lecoeur 47355333ad Clarify comment 2019-09-02 10:47:40 -04:00
Julien Lecoeur ced201bdb5 IO: respect actuator_armed.prearmed flag 2019-09-02 10:47:40 -04:00
Julien Lecoeur 9c50f5ea08 Add parameter COM_PREARM_MODE
Condition to enter the prearmed state, an intermediate state between disarmed and armed
 * in which non-throttling actuators are active.
 *
 * @value 0 Disabled
 * @value 1 Safety button
 * @value 2 Always
2019-09-02 10:47:40 -04:00
Julian Kent bc58bed960 Add test for jerk reduction 2019-09-02 14:51:18 +02:00
Julian Kent 865157228f Add collision prevention velocity limitations also based on max accel/jerk 2019-09-02 14:51:18 +02:00
Mark Sauder 60e5e0821a land_detector: Add and max_altitude and timestamp validity checks to MulticopterLandDetector class. (#12681)
* Rename local camelCase vars to snake_case and control_mode -> vehicle_control_mode to match typdef with established class convention.
2019-09-02 00:30:46 -04:00
Daniel Agar c180d63441 delete accidental systemlib/param/param_new.c 2019-09-01 20:42:41 -04:00
Hamish Willee a77fc9aca9 Add docker gazebo dependencies 2019-09-01 20:18:52 -04:00
Hamish Willee ceaf134092 Change java to openjdk like docker 2019-09-01 20:18:52 -04:00
Hamish Willee 33ae0bb705 ubuntu.py: update to dual install to Python2 2019-09-01 20:18:52 -04:00
Daniel Agar 82bcfcb710 boards/px4/fmu-v5x remove alternate configs until default is complete 2019-09-01 18:48:55 -04:00
mcsauder 0817ee40f8 Add generic vtol tailsitter airframe/mixer and incorporate modifications from PR 9849 in 4001_quad_x and 13001_caipirinha_vtol. 2019-09-01 18:35:14 -04:00
Matthias Grob 328544ae2e deltaquad: remove deprecated parameter MAN_R_MAX 2019-09-01 14:56:59 -04:00
Daniel Agar 891aae0377 commander increase cpu overload threshold
* the large 20% margin is no longer appropriate now that nearly all work in the system is
scheduled (moved out of ISRs) and represented in the load percentage
 * closes https://github.com/PX4/Firmware/issues/12753
2019-09-01 14:55:05 -04:00
Daniel Agar 9aad996b04 PMW3901 add register write delay (TIME_us_TSWW) 2019-09-01 14:19:46 -04:00
Daniel Agar ab92f3ab7d pmw3901 split out header and main 2019-09-01 14:19:46 -04:00
Daniel Agar 41e544727c pmw3901 cleanup and updates
- includes updates from PixArt
2019-09-01 14:19:46 -04:00
Silvan Fuhrer ff6577ce5f EKF and AirspeedSelector: publish multiple wind estimate topic instances and log them all
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-09-01 14:05:06 -04:00
Daniel Agar 10ed88db57 VTOL airframes update legacy VT_MOT_COUNT parameter 2019-09-01 13:09:48 -04:00
BazookaJoe1900 e3b60cd9e7 rc.sensors: moved common ms5611 start to rc.board_sensors per board 2019-09-01 12:55:50 -04:00
Daniel Agar 9c6d4e28ea fxos8701cq cleanup and move to PX4Accelerometer/PX4Magnetomer 2019-09-01 12:08:52 -04:00
Daniel Agar ee9f65b38b fxos8701cq split out header and main 2019-09-01 12:08:52 -04:00
Beat Küng f0ee0b5d49 MixingOutput: make scheduling configurable
And make sure fmu calls MixingOutput::updateSubscriptions on startup even
if no mixer is loaded, so that it gets scheduled.
2019-08-31 10:05:00 -04:00
Beat Küng a2ebbe9066 pwm_limit: rename to output_limit
As there is nothing pwm-specific about it.
2019-08-31 10:05:00 -04:00
Beat Küng 1bee984bb0 MC_AIRMODE: move parameter definition to mixer_module
Makes sure that the parameter is included for the builds that need it.
2019-08-31 10:05:00 -04:00
Beat Küng 077b229655 MixingOutput: make mixer loading thread-safe 2019-08-31 10:05:00 -04:00
Beat Küng d3fb610fde mixer_module: create MixingOutput library and use in fmu
This should be a pure refactoring, no functional change.
2019-08-31 10:05:00 -04:00
Beat Küng 0ec6e79a0a fmu: remove unused _num_failsafe_set 2019-08-31 10:05:00 -04:00
Beat Küng 1d577802cf fmu: remove unused write() interface 2019-08-31 10:05:00 -04:00
Beat Küng 5b87b81b90 fmu: fix comments & documentation 2019-08-31 10:05:00 -04:00
Matthias Grob d3c7d06288 FlightTaskOrbit: don't apply yaw feed forward in circle approach
The yaw pointing towards the center makes sense since that's the approach
direction anyways. But with the yaw feed forward results in a weird looking
bias when not orbiting yet.
2019-08-31 14:25:39 +02:00
Matthias Grob 7774b150a9 FlightTaskOrbit: only reapproach circle if center changed
The condition that the vehicle is more than 3m away from the circle line
was too sloppy. That often happens when the radius is changed by sticks.
A reapproach is only necessary when the center is moved and that's only
possible through the orbit command.
2019-08-31 14:25:39 +02:00
Matthias Grob cca7596bcd FlightTaskOrbit: use StraightLine library to approach circle
The initial approach to the circle to orbit on was very agressive since
it was just the controller trying to stay on the circle reaching the
limits. Now there's first an approach phase in which the vehicle reaches
the circle trajeectory in a smooth perpendicular line before starting the
orbit execution.
2019-08-31 14:25:39 +02:00
Matthias Grob 345ad06d7e StraightLine: rewrite old implementation
Before it was:
- not used anywhere
- copied from an old mission implementation version
- didn't plan in advance
- had a lot of broken cases
- dependent on a lot of parameters

I'm starting with a new relatively simple implementation that works as
expected for a minimum viable implementation and can be improved over time.
The first version is used to approach the circle path in Orbit mode to
verify the interface and get testing such that it gets eventually used
everywhere.
2019-08-31 14:25:39 +02:00
Daniel Agar 78ef8aab2d STACK_MAIN increase default 1024 -> 2048 2019-08-30 19:11:51 -07:00
kritz 9ed2daef48 Fixing and simplifying mavlink odometry handling (#12793)
* Fixing and simplify mavlink odometry
2019-08-30 06:33:13 -07:00
Beat Küng 43fdcd7876 px4_middleware: remove that header and move px4::init to px4_init.h
delete include:
for i in $(grep -rl 'px4_middleware.h' src platforms); do sed -i '/#include <px4_middleware.h/d' $i; done
2019-08-30 07:59:44 +02:00
Beat Küng f32abe8534 src/platforms: move remaining source files to platforms/common 2019-08-30 07:59:44 +02:00
Beat Küng f8e0441e7b src/platforms/common: move to platforms/common
Script to update include paths:
for i in $(grep -rl 'include <px4_work_queue' src platforms); do sed -i 's/#include <px4_work_queue/#include <px4_platform_common\/px4_work_queue/' $i; done
2019-08-30 07:59:44 +02:00
Beat Küng 5d0e72040c src/platforms/posix: move to platforms/posix/src/px4/common and src/drivers/driver_framework_wrapper 2019-08-30 07:59:44 +02:00
Beat Küng fa8165a1c3 platforms/posix/src: move to platforms/posix/src/px4/common 2019-08-30 07:59:44 +02:00
Beat Küng 8cbb3852ba src/platforms/qurt: move to src/drivers 2019-08-30 07:59:44 +02:00
Beat Küng 3bdfd8ce8d ToneAlarmInterface: move to drivers/drv_tone_alarm
It belongs there since it's not a library providing the implementation, but
just declaring the interface.
2019-08-30 07:59:44 +02:00
Beat Küng f3fccf53f6 src/drivers/{kinetis,stm32}: move to arch-specific directories 2019-08-30 07:59:44 +02:00
Beat Küng 3003e7d0fc drv_led_pwm: move to arch-specific directory 2019-08-30 07:59:44 +02:00
Beat Küng bd1b267baa NuttX hrt: move into arch-specific directory 2019-08-30 07:59:44 +02:00
Beat Küng 1cb6c36a00 adc: refactor into arch-specific directories 2019-08-30 07:59:44 +02:00
Beat Küng ab43a83bed platform: restructure (NuttX) architecture-specific code
updated: tone_alarm, px4io_serial, px4_micro_hal
2019-08-30 07:59:44 +02:00
Daniel Agar 2fa3ee9336 Jenkins hardware add Modal AI v5m/v5x 2019-08-30 00:40:22 -04:00
Silvan Fuhrer db4b4719c3 BabyShark VTOL: update config file
- increased transition throttle
 - enable airmode
 - increased max roll angle

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-08-29 09:58:20 -04:00
bresch fe73cef224 TestVelocitySmoothing - Split time synchronization and final state checks into two different test functions
Also improve the comments
2019-08-29 15:20:53 +02:00
bresch 94d15931f2 TestVelocitySmoothing - Remove useless function override, use ceil instead of ceilf and remove line duplicate 2019-08-29 15:20:53 +02:00
bresch 5b82fa3a0f TestVelocitySmoothing - add check for time synchronization and final acceleration 2019-08-29 15:20:53 +02:00
bresch f40d571858 VelocitySmoothing - add zero setpoint test 2019-08-29 15:20:53 +02:00
bresch c59bcc686c VelocitySmothing - Add gtest script 2019-08-29 15:20:53 +02:00
roangel 1e510f5a44 [FlightTasks] Added class enum for FlightTasks errors (#12822) 2019-08-29 14:48:52 +02:00
Daniel Agar 497a053bc1 fxas21002c fix perf counter typo and add interval 2019-08-29 00:37:24 -04:00
Daniel Agar e8dcd8c2fc cmake nuttx ignore linking target warning 2019-08-28 22:50:23 -04:00
Daniel Agar 2bb00e1f28 Jenkins snapdragon always pass sanity check for now 2019-08-28 21:49:40 -04:00
PX4 Build Bot 511438d6ef Update submodule matrix to latest Thu Aug 29 00:42:01 UTC 2019
- matrix in PX4/Firmware (341c0ae739753db98dcd0711e91f621c1666b16d): https://github.com/PX4/Matrix/commit/56b069956da141da244926ed7000e89b2ba6c731
    - matrix current upstream: https://github.com/PX4/Matrix/commit/cc084e0791535e8426780e6a4f05794804db1b82
    - Changes: https://github.com/PX4/Matrix/compare/56b069956da141da244926ed7000e89b2ba6c731...cc084e0791535e8426780e6a4f05794804db1b82

    cc084e0 2019-08-26 Martina Rivizzigno - matrix: add method to check all values are nan (#82)
84b3da2 2019-08-22 kritz - Canonical Quaternion with tests (#81)
2019-08-28 21:45:09 -04:00
Daniel Agar 690aeef186 drivers/gps: increase task stack 2019-08-28 21:20:45 -04:00
Daniel Agar 3ee78cb36a safety_button set STACK_MAIN 2019-08-28 21:20:45 -04:00
Daniel Agar aebf244464 mc_pos_control: takeoff fix implicit switch fallthrough 2019-08-28 18:16:28 -04:00
Daniel Agar 5a5e15d384 Update submodule mavlink v2.0 to latest Wed Aug 28 15:06:44 UTC 2019
- mavlink v2.0 in PX4/Firmware (f0881530b255eb6f7cdbbed12d8da453e59f09dc): https://github.com/mavlink/c_library_v2/commit/dc26ccd71dcb0138b23176233eade1c04a09b462
    - mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/e26d03dbf858d3b04babb4fe106ecc831ac9b906
    - Changes: https://github.com/mavlink/c_library_v2/compare/dc26ccd71dcb0138b23176233eade1c04a09b462...e26d03dbf858d3b04babb4fe106ecc831ac9b906
2019-08-28 13:31:39 -04:00
Daniel Agar 0c736fc98b Jenkins add bloaty SITL and disable ccache 2019-08-28 12:22:39 -04:00
Daniel Agar 7ee1043932 gitattributes *.bin, *.pdf, and *.png are binary
* fixes #12818
2019-08-28 11:01:35 -04:00
roangel e50dd7c364 replay: close replay log file after replay is finished, then exit (#11264) 2019-08-28 08:13:50 +02:00
Daniel Agar a20b508d7e gitignore remove core 2019-08-27 08:59:48 -04:00
Daniel Agar 2f10c315b5 listener print all instances by default 2019-08-26 16:07:41 +02:00
TSC21 693d89583d RTPS: add check for ID space 2019-08-25 23:04:09 +01:00
TSC21 1fa43a707f uorb_rtps_message_ids: enlarge id space for base type msgs 2019-08-25 23:04:09 +01:00
TSC21 062b693fea uorb_rtps_classifier: improve way to check base type of alias 2019-08-25 23:04:09 +01:00
TSC21 ac6ee972d3 airspeed_validated: move it out of the alias space 2019-08-25 23:04:09 +01:00
Julien Lecoeur 32fb4a9585 px4io: force io firmware build
This fixes incremental build of the px4io firmware on targets that use the px4io driver.

fixes #11042
2019-08-25 09:48:50 -04:00
Daniel Agar b1d59c8817 px4fmu split safety button into new driver 2019-08-24 17:14:17 -04:00
alessandro 2cb26dd5f5 GPS: Prevent injection from choking the driver (#12710)
Sending a continuous stream of injection messages can cause the
GPS driver to get stuck indefinitely in the handling loop.
2019-08-23 19:12:20 -04:00
Hyon Lim 0262a699c1 UVify Core board support and airframes (Draco, Draco-R, IFO) (#12337)
* also includes minor changes to make it easy to keep in sync with px4_fmu-v4
2019-08-23 17:02:25 -04:00
Claudio Micheli ec5d36d9c7 UAVCAN esc: relax threshold for detecting offline escs.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-08-23 11:40:53 -04:00
Claudio Micheli f3eafdc296 Fix wrong initialization of PWM_AUX_RATE.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-08-23 15:37:57 +02:00
Julian Oes a7c541d7e2 version: more tests to check tags with - prefix 2019-08-23 13:18:52 +02:00
Julian Oes 3fa3cbd28a version: add beta tag
This adds the "beta" tag and adds a dash before "rc" or "beta".
2019-08-23 13:18:52 +02:00
Julian Oes c3529baa5b jMAVSim: disable GUI using HEADLESS=1
@katzfey added the option to run jMAVSim without GUI. Now we just need
to read the HEADLESS env variable to use it.
2019-08-23 09:27:42 +02:00
Daniel Agar 3c0f4f9ace Jenkins hardware snapdragon build with CCACHE_BASEDIR and dump logs 2019-08-22 16:20:39 -04:00
Daniel Agar 331b533b3d Jenkins hardware linux add CCACHE_BASEDIR for rpi build 2019-08-22 15:46:39 -04:00
Daniel Agar e7e477962c snapdragon fix sanity test and add to Jenkins hardware 2019-08-22 15:11:32 -04:00
Daniel Agar b45f459ef1 Jenkins add linux (raspberry pi) build and test 2019-08-22 15:09:04 -04:00
Julian Oes 68078795c0 px_update_git_header.py: allow -beta/-rc in tag
This changes two things:
- This adds "-beta" as a valid tag suffix.
- This changes "rc" without "-" to "-rc". "rc" without is now described
  as deprecated and with "-rc" is preferred.
2019-08-22 18:45:50 +02:00
bresch f4b40865af SmoothVel - Fix altitude lock logic.
It was broken because _velocity_setpoint is used for input and output
and was assumed to be the input at a place where it was already overwitten
To clarify this, the input setpoint is renamed "target"
2019-08-22 16:43:41 +02:00
Julian Oes dd2d5c029f platforms: match usb-Hex_ProfiCNC device (#12772)
This means that we are able to detect and flash the Pixhawk Cube Black.
2019-08-22 01:32:39 -07:00
Todd Colten b55ae09f00 FW: set default RTL_TYPE = 1 for fixed wing
This change adds the line "param set RTL_TYPE 1" to the default init scripts for fixed wing.  Similar to the other PR that sets default RTL_TYPE=1 for VTOLs, RTL_TYPE=1 should be default for normal fixed wings as well.  Reference: https://github.com/PX4/Firmware/pull/12746/files
2019-08-22 08:47:50 +02:00
JaeyoungLim 950dbc1d2e Rover: Enable Offboard support for Rover position control 2019-08-21 12:04:19 -04:00
Daniel Agar ccdc2dffa9 WQ decrease att_pos_ctrl stack 2019-08-21 11:59:50 -04:00
Julien Lecoeur 7fa885c7b3 Document the behaviour of TERMINATE and LOCKDOWN in comments 2019-08-21 07:56:20 -07:00
Julien Lecoeur 85c2e7d65d Offboard failsafe actions: cleanup and move to dedicated functions 2019-08-21 07:56:20 -07:00
Julien Lecoeur 84eeacfb38 Offboard failsafe actions: add DISABLED, LOCKDOWN and TERMINATE options 2019-08-21 07:56:20 -07:00
Julien Lecoeur 4c9288d993 Commander: cleanup COM_POSCTL_NAVL parameter
- move to px4::params
- use enum
2019-08-21 07:56:20 -07:00
Julien Lecoeur 907b6ccf46 fmu: fix implicit fallthrough 2019-08-21 07:56:20 -07:00
Julien Lecoeur d41f72f092 Re-enable implicit-fallthrough warning 2019-08-21 07:56:20 -07:00
Beat Küng 7f6a9e587f logger: fix multiple format definitions for multi-instance topics
With https://github.com/PX4/Firmware/pull/12123 all multi-instance topics
lead to repeated format definitions in the ULog file.
2019-08-21 10:47:31 -04:00
Julian Kent 5c68880b56 Reset parameters in test setup, not teardown 2019-08-21 14:53:41 +02:00
Julian Kent ddd4181b39 Don't run each functional test in a different process 2019-08-21 14:53:41 +02:00
Julian Kent 63140f1d61 Do a single setup of uORB/Parameters instead of once every test 2019-08-21 14:53:41 +02:00
Jaeyoung-Lim 914417f580 Enable offboard local position setpoints for fixed wing position control 2019-08-21 12:12:29 +02:00
Silvan Fuhrer 536f073d02 VTOL: set RTL_TYPE default for VTOL to 1 (return to home via mission landing if available) 2019-08-21 10:15:06 +02:00
Silvan Fuhrer 8a8cc3b52b Navigator: VTOL: set heading of transition of a VTOL_TAKEOFF to the VTOL_TAKEOFF waypoint (and enforce heading)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-08-21 10:08:04 +02:00
Silvan Fuhrer b1d38ee050 Navigator: VTOL: fix mission yawing timeout (MIS_YAW_TMT)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-08-21 10:08:04 +02:00
Silvan Fuhrer ab28f1e4f7 Navigator: VTOL: disable weather vane during yaw aligning before front transition
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-08-21 10:08:04 +02:00
baumanta af0d63250c check velocity_setpoint instead of sticks in altitude mode 2019-08-21 10:02:40 +02:00
baumanta d168d5049f check vel_setpoint instead of stick input for position lock 2019-08-21 10:02:40 +02:00
Silvan Fuhrer 5a736c9af8 update babyshark VTOl config
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-08-21 05:23:25 +02:00
Daniel Agar 5d813224c8 PX4 SPI default to thread locking mode 2019-08-20 21:36:21 -04:00
Daniel Agar 7d248e0f45 px4fmu: move to WQ with uORB callback scheduling (#12224) 2019-08-20 20:24:12 -04:00
Daniel Agar b439e08e24 tone_alarm move to uORB::Subscription 2019-08-20 19:44:03 -04:00
Daniel Agar 5ae408382b led drivers and controller move to uORB::Subscription 2019-08-20 14:03:23 -04:00
Daniel Agar 41dee3875e VTOL: only run on actuator publications corresponding to VTOL mode 2019-08-20 13:50:34 -04:00
Tanja Baumann be233f6bc7 Collision Prevention: don't allow moving outside sensor FOV (#12741)
* don't allow moving outside FOV

* Update parameters in tests
2019-08-20 17:01:13 +02:00
Daniel Agar d38dfcfcd3 uORB::Subscription fix initialization but not yet published case
- otherwise uORB::Subscription will erroneously report published after the first successful initialization of an unpublished topic
2019-08-20 10:28:09 -04:00
Daniel Agar 6cf55ac83a av_x-v1 fix timer_config clock bit 2019-08-19 15:22:08 -04:00
Daniel Agar 737f5d4e3d px4io fix code style 2019-08-19 15:11:39 -04:00
dlwalter 310fd80405 added logic to encode NAN as INT16_MAX to transfer to IO from FMU 2019-08-19 21:08:11 +02:00
Hamish Willee c1c253d9be TRIG_PINS: clarify TRIG_PINS on FMU (#12714) 2019-08-19 14:45:59 +02:00
garfieldG 1958275495 drivers/boards/common: now checks if board has "px4-io" in its name instead of just "io" 2019-08-19 08:45:42 -04:00
Beat Küng a7eed520b4 commander: refactor module usage output 2019-08-19 10:54:56 +02:00
Beat Küng d64d3170c0 commander unit tests: enable preflight checks
- the last check expects pre_arm to run so we need to enable the
  preflight checks. This is closer to the real system.
- as a result we need to enable HIL for other tests so that the sensors
  are not checked.
2019-08-19 10:54:56 +02:00
Beat Küng 878ed8136c commander: add 'commander arm -f' command to force arming
This allows to bypass preflight and prearm checks.
During development there are regular cases where I just want to arm the
board/vehicle no matter what, and the preflight checks are guaranteed to
fail (e.g. sensors uncalibrated, inconsistent, powered via USB, etc.).
Allowing an easy and quick way to arm (assuming you know what you are
doing) helps to speed up development considerably and is less frustrating.
2019-08-19 10:54:56 +02:00
Beat Küng b8dba34fd0 commander arming_state_transition: do not call prearm_check if !fRunPreArmChecks
Reason: if you don't want preflight checks, you don't want prearm checks
either (these are the circuit breakers, like usb connected check).

The other changes are cleanup and rework of operations.

In most cases, arming_state_transition is called with fRunPreArmChecks set
to true, so no change in behavior.

The cases with fRunPreArmChecks=false are:
- unit tests
- in_arming_grace_period=true (quick arming after disarm)
- VEHICLE_CMD_PREFLIGHT_CALIBRATION (does not transition to armed)
2019-08-19 10:54:56 +02:00
Daniel Agar f9f2afd856 add .gitattributes to force all line endings to LF
- this improves the windows development experience when moving between cygwin, WSL, and native tools
 - cmd and bat files are left alone (we don't currently have any)
2019-08-18 14:13:26 -04:00
Daniel Agar 646519fa0d vscode disable selection drag and drop 2019-08-18 12:59:03 -04:00
Daniel Agar 24041370c0 vscode github pull request default merge method squash 2019-08-18 12:59:03 -04:00
Daniel Agar 3c33962e78 vscode disable telemetry and experiments 2019-08-18 12:59:03 -04:00
Daniel Agar 404984c355 vscode settings sort git ignoreLimitWarning 2019-08-18 12:59:03 -04:00
Daniel Agar 929b48099e vscode files watcher exclude build folder 2019-08-18 12:59:03 -04:00
Daniel Agar 6515c11048 vscode make astyle default formatter 2019-08-18 12:59:03 -04:00
Daniel Agar f3aba02654 vscode recommended extensions update docker and ros 2019-08-17 20:12:34 -04:00
Daniel Agar 24764c676e Jenkins hardware run logger and attempt to stop modules 2019-08-17 13:43:10 -04:00
Daniel Agar 67644e29b7 Jenkins hardware print AUX pwm info 2019-08-17 13:43:10 -04:00
Daniel Agar b9fc3ed2ab Jenkins hardware select airframe 4001 on fmu-v4 2019-08-17 13:43:10 -04:00
Daniel Agar 17c46623f9 Jenkins hardware default airframe 4001 -> 13000 (run all controllers) 2019-08-17 11:03:26 -04:00
Daniel Agar b8cdec65cc Jenkins hardware target general px4_fmu-v5 2019-08-17 11:03:26 -04:00
Daniel Agar 7adc43b795 px4_fmu-v5: add critical section monitor build (#12724) 2019-08-16 21:48:09 -04:00
Daniel Agar acc7067596 Jenkins hardware run adc test 2019-08-16 19:05:55 -04:00
Daniel Agar 76b9198522 kinetis/adc move to new WQ 2019-08-16 19:05:55 -04:00
Daniel Agar 746f13d2d4 stm32/adc move to new WQ 2019-08-16 19:05:55 -04:00
Daniel Agar 6e7e2b6e3b px4_fmu-v5: add irqmonitor build (#12723) 2019-08-16 19:01:16 -04:00
fghanei b28dda3926 rpi_rc_in: fix typo that was causing build to fail rpi 2019-08-16 15:52:49 -04:00
Daniel Agar 48f5ab2896 Update submodule mavlink v2.0 to latest Fri Aug 16 12:37:56 UTC 2019 (#12717)
- mavlink v2.0 in PX4/Firmware (be3d09c700): https://github.com/mavlink/c_library_v2/commit/0385f82286df78d51b06e5e325b13e2411ba2170
    - mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/dc26ccd71dcb0138b23176233eade1c04a09b462
    - Changes: https://github.com/mavlink/c_library_v2/compare/0385f82286df78d51b06e5e325b13e2411ba2170...dc26ccd71dcb0138b23176233eade1c04a09b462

    dc26ccd 2019-08-15 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/e5597b68bd5a98bf689aa056c623da480e7ef17a
2019-08-16 14:20:45 -04:00
Daniel Agar dacaabe92e introduce sensor_gyro_control message for vehicle_angular_velocity (#12145) 2019-08-16 13:53:59 -04:00
Daniele Pettenuzzo be3d09c700 uavcan: add optical flow support (Here Flow)
* move uavcan dsdlc generation to module
 * 20200.Measurement.uavcan sync with upstream project (https://github.com/OpenMotorDrive/flow/blob/master/dsdl/com/hex/equipment/flow/20200.Measurement.uavcan)

Signed-off-by: DanielePettenuzzo <daniele@px4.io>
2019-08-15 12:22:29 -04:00
Mathieu Bresciani dab66e92d3 Fix typo 2019-08-15 14:31:23 +02:00
Dennis Mannhart bf25c462b2 Orbit failsafe: switch internal_state to Posctrl such that Manual-Positionctrl is activated after failsafe recovery. This is needed because Orbit can only be invoked via vehicle_command msg. 2019-08-15 14:31:23 +02:00
Daniele Pettenuzzo 82ecf4d942 motor_ramp: set fmu in test mode and cleanup (#11249)
and restore pwm min after test
2019-08-15 09:42:07 +02:00
mcsauder d4fedca1ee Rename _accel_horz_lp -> _xy_accel_filtered to standardize naming, use time literal, and delete unneeded #includes in the FixedwingLandDetector class. 2019-08-14 23:10:20 -04:00
Martina 0414d59ee9 mavlink_main: stream OBSTACLE_DISTANCE to GCS 2019-08-14 13:32:15 -04:00
Julian Oes 82bee2bf54 mavlink: match commands aimed at any sysid/compid
When we send a command to any sysid or any compid, we need to match an
ack from a specific sysid or compid. If we don't do that, we keep
sending retransmissions and eventually time out.
2019-08-14 13:29:07 -04:00
Julian Oes a4fb18a6c4 commander: fix arming auth param translation
The int32 param COM_ARM_AUTH is mapped to a packed struct. However, this
struct was not actually packed (anymore) and therefore the values were
applied incorrectly.

I fixed this by applying the packed attribute. By using a union with a
int32_t I could rid of the warning about address-of-packed-member.
2019-08-14 13:29:07 -04:00
Daniel Agar b7f0db62ba mRo Control Zero F7 initial board support 2019-08-14 13:13:27 -04:00
Beat Küng 5cadb0aab1 px_mkfw: add git commit hash to .px4 file 2019-08-14 12:37:20 -04:00
mcsauder 9e055e9b21 Implement ModuleParams inheritance in the VtolLandDetector class. Requires PR #12356. 2019-08-14 11:58:14 -04:00
Jimmy Johnson 9e3493bd6e Update commander_params.c
Addressing parameter description syntax
2019-08-14 14:17:33 +02:00
Jimmy Johnson 3ab5932adf updating pre-takeoff and landding values to defaults 2019-08-14 14:17:33 +02:00
Jimmy Johnson 963467b4df splitting preflight and land disarm times into 2 parameters 2019-08-14 14:17:33 +02:00
Mark Owen e25db01620 Mavlink: Fix forwarding of messages with target system/component id (#12559)
Mavlink does not correctly forward messages that have the target_system or target_component routing fields in the message.

Some investigation revealed that the Mavlink::forward_message function is incorrectly utilizing the mavlink_msg_entry_t.target_system_ofs and mavlink_msg_entry_t.target_component_ofs fields. These offsets are intended to be used relative to the start of the message payload. But, as implemented, these offsets are incorrectly being used relative to the start of the message. This pull-request corrects that problem.

I also correctly made use of the mavlink_msg_entry_t.flags field to determine if a message contains a target_system or target component field. The previous check incorrectly assumed that they would always be non-zero if present.

Signed-off-by: Mark Owen <maowen801@gmail.com>
2019-08-13 07:16:09 -07:00
Beat Küng 166639be3a logger: unconditionally call _writer.notify()
The file writer thread could get into a state where it blocked infinitely
on pthread_cond_wait() (or rather until the logging stops).

This is very rare and the following conditions must be met:
- the buffer is almost empty (<4KB filled), so that the writer thread does
  not write anything.
- an fsync call is scheduled (happens once every second)
- the fsync call takes a long time (several 100ms), during which time the
  complete log buffer fills up.

The main thread would then get into dropout state where it does not call
_writer.notify() anymore.

Notifying the writer thread on every loop update of the main thread fixes
that.

It does not increase resource usage.
2019-08-12 08:07:37 +02:00
Mark Sauder 6abf2203a3 sensors: uniform initialization and whitespace formatting in voted_sensors_update.h 2019-08-10 02:14:22 -04:00
Daniel Agar 6413525645 uORB::PublicationQueued don't unadvertise on destruction (#12674)
* this is a bit of a hack for vehicle_command and vehicle_command_ack usage
2019-08-09 12:45:02 -04:00
Daniel Agar b5a01532ae vtol_att_control move to WQ with uORB callback scheduling (#12229)
* add perf counters for cycle time and interval
2019-08-09 12:44:11 -04:00
jie.zhang decb9a8982 mc_pos_control_main: Fixed missing semicolon 2019-08-09 17:00:43 +02:00
Julian Kent d70b024ec7 GTest functional tests that include parameters and uORB messaging (#12521)
* Add kdevelop to gitignore

* Add test stubs

* Rename px4_add_gtest to px4_add_unit_gtest

* Add infrastructure to run functional tests

* Add example tests with parameters and uorb messages

* Fix memory issues in destructors in uORB manager and CDev

* Add a more real-world test of the collision prevention
2019-08-09 15:10:09 +02:00
bresch 4eb9c7d812 Create TrajMath library and move waypoint speed calculations in it 2019-08-09 12:04:48 +02:00
bresch b1698b78bc AutoSmoothVel - scale down acc_hor using traj_p parameter in the computation of the maximum waypoint entrance speed 2019-08-09 12:04:48 +02:00
bresch de10f1e04d MC auto - Modify yaw_sp_aligned to take mis_yaw_error tolerance.
Add check for this flag in AutoLine
2019-08-09 12:04:48 +02:00
Dennis Mannhart 9e9b2ab9e8 FlightTaskAutoLine/SmoothVel: stop at waypoint if altitude is has not been reached yet 2019-08-09 12:04:48 +02:00
bresch 255c911155 AutoSmoothVel - Compute desired speed at target based on angle between previous-current and current-next waypoints
Also remove crosstrack P controller that produces overshoots when the
acceptance radius is large (crosstrack error is suddenly large at
waypoint switch).
2019-08-09 12:04:48 +02:00
Silvan Fuhrer 07895cd3b6 Airspeed Selector: resolve conflics for wind estimate topic publishing after rebase
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-08-09 10:55:05 +02:00
Silvan Fuhrer d129fcccd5 Omnibus: take out local_position_estimator from build as was out of flash after ecl update for airspeed selection module
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-08-09 10:55:05 +02:00
Silvan Fuhrer 5bc6979796 AirspeedSelector: added RTPS ID for airspeed_validated message
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-08-09 10:55:05 +02:00
Silvan Fuhrer cedf14e2ba Airspeed Selector: repurpose wind estimator into an airspeed (selection, validation) module.
This new airspeed module does:
  -runns an airspeed validator for every airspeed sensor present, which checks measurement validity and estimates an airspeed scale
  -selects another airspeed sensor if for the current one a failure is detected
  -estimates airspeed with groundspeed-windspeed if no valid airspeed sensor is present
  -outputs airspeed_validated topic

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-08-09 10:55:05 +02:00
Silvan Fuhrer 970e362e9a Increased stack of lp work queue as with new airspeed modudle it was getting low
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-08-09 10:55:05 +02:00
Silvan Fuhrer 50dc8aee7a Airspeed Selector: added airspeed validator class
This validator takes measurements from a single airspeed sensor and:
    -checks validity of measurement
    -can estimate an airspeed scale factor (estimation enabled with parameter setting) to accout for errors in airspeed due due placement of sensor

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-08-09 10:55:05 +02:00
Silvan Fuhrer 248e1818e2 Airspeed Selector: changes in airspeed library to account for new EAS state (equivalent airspeed)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-08-09 10:55:05 +02:00
Claudio Micheli aae16cc594 uavcan esc: use time literals for timeout checks.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-08-09 09:41:17 +02:00
Claudio Micheli 2eb9fb9ed6 Commander: move esc_status as local variable.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-08-09 09:41:17 +02:00
Claudio Micheli 5fe7992af5 mixer_group: improved get_multirotor_count () code readbility.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-08-09 09:41:17 +02:00
Claudio Micheli 09d79b221f Simplified esc_status healthiness logic.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-08-09 09:41:17 +02:00
Claudio Micheli 8a2d05be4f Improved code comment for condition_escs_error topic.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-08-09 09:41:17 +02:00
Claudio Micheli 75c336c00c uavcan_main: replaced printf messages with PX4_INFO
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-08-09 09:41:17 +02:00
Claudio Micheli 1e04d718f6 uavcan escs: Modified esc_status reporting to have _rotor_count published.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-08-09 09:41:17 +02:00
Claudio Micheli 187a025dfe Commander: added esc_status prearm checks
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-08-09 09:41:17 +02:00
Claudio Micheli d06c679252 uavcan esc: added timeout checks to escs.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-08-09 09:41:17 +02:00
Claudio Micheli 03637fa6f1 Added topics to esc_status and vehicle_status_flags.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-08-09 09:41:17 +02:00
Mark Sauder 056c8000a1 MultiCopterLandDetector: Implement ModuleParams inheritance (#12356) 2019-08-09 07:57:42 +02:00
Daniel Agar 2f222d6cbf containers/List add nullptr check 2019-08-09 07:55:13 +02:00
Daniel Agar 9481b3b232 Update submodule mavlink v2.0 to latest Fri Aug 9 02:59:05 UTC 2019 (#12669)
- mavlink v2.0 in PX4/Firmware (e8a11086eb): https://github.com/mavlink/c_library_v2/commit/72832840733f0d78cda7e2071a6bf6c7fc3f9273
    - mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/0385f82286df78d51b06e5e325b13e2411ba2170
    - Changes: https://github.com/mavlink/c_library_v2/compare/72832840733f0d78cda7e2071a6bf6c7fc3f9273...0385f82286df78d51b06e5e325b13e2411ba2170
2019-08-09 00:15:38 -04:00
PX4 Build Bot 34ed454ea9 Update submodule ecl to latest Fri Aug 9 02:59:11 UTC 2019
- ecl in PX4/Firmware (e93e676c38bc3ce2e57c20a8dc33ffe377826903): https://github.com/PX4/ecl/commit/d38164fc8e68b740405669127138e550c3c7375c
    - ecl current upstream: https://github.com/PX4/ecl/commit/62fa464e4dd6cb5e585d23bd353aa50a469879f7
    - Changes: https://github.com/PX4/ecl/compare/d38164fc8e68b740405669127138e550c3c7375c...62fa464e4dd6cb5e585d23bd353aa50a469879f7

    62fa464 2019-07-17 RomanBapst - WindEstimator: added support for pre-set airspeed scale factor
a7d9c73 2019-07-09 Silvan Fuhrer - Wind estimator: added wind_estimator_reset state (to indicate if wind estimator was reset in last fusion-cycle)
09f29db 2019-07-02 Silvan Fuhrer - added option to fix airspeed scaling to 1
2019-08-08 23:39:43 -04:00
Daniel Agar e8a11086eb create uORB::PublicationMulti for multi publications 2019-08-08 21:01:56 -04:00
Daniel Agar 0a0c404a08 mavlink receiver move to uORB::Publication 2019-08-08 21:01:56 -04:00
David Sidrane 21782603b3 px4_fmu-v5x: add networking
* fixed dropped CONFIG_LIBC_FLOATINGPOINT=y
* fix RMII TX pinning
* update platforms/nuttx/NuttX/nuttx w/ f7 eth
2019-08-08 20:38:56 -04:00
mcsauder 887b55269a Delete whitespace to quiet githooks. 2019-08-08 18:56:26 -04:00
Daniel Agar c6aaa606da sensors angular velocity and acceleration publishers fix auto usage
- if the primary gyro or accel change this will cause the callback to be registered multiple times
2019-08-08 11:36:27 -04:00
Daniel Agar c66fc85630 fw_pos_control_l1: move to WQ with uORB callback scheduling 2019-08-07 23:13:21 -04:00
Daniel Agar cab0aee2a0 fw_att_control: move to WQ with uORB callback scheduling 2019-08-07 22:54:44 -04:00
Daniel Agar 0955fd2d58 NuttX boards reduce CONFIG_NFILE_DESCRIPTORS 54 -> 20 2019-08-07 21:23:27 -04:00
Daniel Agar e43e37cc46 fw_pos_control_l1 add new simple min groundspeed 2019-08-07 18:50:42 +02:00
Matthias Grob 161429f8c6 voted_sensors_update: refactor to camelCase function names 2019-08-07 18:44:39 +02:00
Matthias Grob 89a0a3acb6 PreflightCheck: improve output in case of mag inconsistency 2019-08-07 18:44:39 +02:00
Matthias Grob fe37ee2b7f voted_sensors_update: refactor out matrix:: because of using namespace 2019-08-07 18:44:39 +02:00
Matthias Grob 45187e1aa8 Improve magnetometer inconsistency check
To check directional difference between the magnetometer field vectors
instead of vector component difference.
2019-08-07 18:44:39 +02:00
Daniel Agar 83e532d339 logger move to uORB::SubscriptionInterval (#12123) 2019-08-07 11:02:16 -04:00
baumanta e91614c791 change angle parmeter to degrees 2019-08-07 15:29:13 +02:00
baumanta f80a539faa add unit for coll prev angle 2019-08-07 15:29:13 +02:00
baumanta 14f128b89d add parameter for detection angle 2019-08-07 15:29:13 +02:00
baumanta 150b5df7cb change size of reaction angle 2019-08-07 15:29:13 +02:00
baumanta b26d3ac9d4 no slinding in collision prevention (roll jerk fix) 2019-08-07 15:29:13 +02:00
Daniel Agar a917f22b65 sensors: create vehicle_acceleration module (#12597) 2019-08-07 05:05:48 -04:00
bresch 50fbb56737 Yaw mode 3 - Add check for minimum distance to target in MPC_YAW_MODE 3 (along trajectory) to be consistent with the other yaw modes 2019-08-07 10:30:34 +02:00
Martina 119e5e3182 Revert "CollisionPrevention only process distance_sensor updates"
This reverts commit 839787568c.
2019-08-07 04:01:50 -04:00
Daniel Agar 6e781c2289 InvenSense ICM20948 move to PX4Accelerometer, PX4Gyroscope, PX4Magnetometer helpers 2019-08-06 23:36:31 -04:00
Daniel Agar 5421ef5535 NuttX increase HPWORK and LPWORK stack by 256 bytes 2019-08-06 23:15:07 -04:00
Daniel Agar 4c329c3b4b simple circleci.com px4_fmu-v5 build & archive example 2019-08-06 19:07:21 -04:00
Daniel Agar 7b179776e2 vehicle_angular_velocity: sensor_selection callback
- needed to update the main sensor_gyro subscription if the primary
stops responding
2019-08-06 14:23:57 -04:00
Daniel Agar b945e28e08 uORB fix vehicle_angular_velocity RTPS id 2019-08-06 13:39:56 -04:00
Daniel Agar 2ad12d7977 sensors: create vehicle_angular_velocity module (#12596)
* split out filtered sensor_gyro aggregation from mc_att_control and move to wq:rate_ctrl
2019-08-06 12:55:25 -04:00
Daniel Agar bf0eaf4d54 bloaty fix master comparison
- jenkins add new sections and segments output
2019-08-06 11:57:53 -04:00
Daniel Agar 6f2d1d55f6 logger use uORB::PublicationQueued for ulog_stream
- queue depth is now set by the msg
2019-08-06 11:07:59 -04:00
Daniel Agar 5b511eaa1a logger move non-logged subscriptions to uORB::Subscription 2019-08-06 11:07:59 -04:00
Daniel Agar 9d701a077d NuttX reduce stack for interrupts, HPWORK, LPWORK 2019-08-06 11:00:55 -04:00
Daniel Agar bf474028ff px4flow add parameter to enable (SENS_EN_PX4FLOW)
- fixes https://github.com/PX4/Firmware/issues/12571
2019-08-06 10:55:35 -04:00
garfieldG d3ba9c59e0 mavlink: added check if instance mode is serial when trying to find if instance exists (#12642) 2019-08-06 10:53:07 -04:00
David Sidrane 5a1c46deeb fmuv5x:Use ADC3 for HW VER/REV detection
fmu-v5x:hrt needs to be running for ADC time out

       Fixes bug introduced in 320d2e adding platform layer.
2019-08-06 10:46:37 -04:00
David Sidrane 890f805b37 adc:Add that ability to select an ADC 2019-08-06 10:46:37 -04:00
David Sidrane 0ebb87357f fmu-v5:hrt needs to be running for ADC time out
Fixes bug introduced in 320d2e adding platform layer.
2019-08-06 10:46:37 -04:00
Daniel Agar 8f5b7de498 uORB::Subscription minor API cleanup
* the forceInit() method was combined with the existing subscribe()
 * delete unused last_update()
2019-08-06 10:28:49 -04:00
RomanBapst cfba41d2f4 posix configs: set trigger interface to mavlink as it's the only one
supported on posix

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-08-06 08:08:56 +02:00
RomanBapst cd85f584cf camera trigger: do not try to start if interface was not created
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-08-06 08:08:56 +02:00
David Sidrane f21dc82c24 Add i2cdetect to K66 2019-08-05 19:40:32 -04:00
David Sidrane e8d874cf34 i2cdetect do not exceed 100Khz 2019-08-05 19:40:32 -04:00
Daniel Agar 64f105b530 Update submodule nuttx to latest Mon Aug 5 20:30:34 UTC 2019 (#12636)
- nuttx in PX4/Firmware (be76f909beadfe80415b733c020695efb042adef): https://github.com/PX4/NuttX/commit/b4013dcd4a9ec8edf412277fa3e4dccd419089c1
    - nuttx current upstream: https://github.com/PX4/NuttX/commit/14f4dc735a6f092b7acbf5861c0b9f1ed5e19216
    - Changes: https://github.com/PX4/NuttX/compare/b4013dcd4a9ec8edf412277fa3e4dccd419089c1...14f4dc735a6f092b7acbf5861c0b9f1ed5e19216

    14f4dc7 2019-08-05 David Sidrane - [BACKPORT] kinetis:i2c transfer ensure correct result returned
2019-08-05 13:32:46 -07:00
Daniel Agar a6777ca4f1 uORB add RTPS message id for new wheel_encoders msg 2019-08-05 12:34:48 -04:00
Martina Rivizzigno 19ad80385e ObstacleAvoidance: update empty_trajectory_waypoint 2019-08-05 16:05:40 +02:00
Martina Rivizzigno e0893c383d increase mc_pos_control stack from 1300 to 1500 2019-08-05 16:05:40 +02:00
Martina Rivizzigno d29f2ff60c ObstacleAvoidance: use hysteresis on z to check progress towards the goal 2019-08-05 16:05:40 +02:00
Martina Rivizzigno 39e59d6cc4 add point type (mavlink command associated with wp) in Obstacle Avoidance interface 2019-08-05 16:05:40 +02:00
Andrei Korigodski 4d5f922e7a commander: use shutdown_if_allowed() to check for shutdown safety
Signed-off-by: Andrei Korigodski <akorigod@gmail.com>
2019-08-05 05:55:33 -07:00
Andrei Korigodski 5133453822 vehicle_status: replace ARMING_STATE_REBOOT with ARMING_STATE_SHUTDOWN
Signed-off-by: Andrei Korigodski <akorigod@gmail.com>
2019-08-05 05:55:33 -07:00
Andrei Korigodski 4a330c6e0a commander: do not reboot on USB disconnect when armed
Signed-off-by: Andrei Korigodski <akorigod@gmail.com>
2019-08-05 05:55:33 -07:00
mcsauder 2e3926b577 Fix a corner case that prevented mavlink config streams from being indexed appropriately when USB is not connected at boot.
Break out Mavlink class constructor logic into set_instance() and set_channel() methods. and add const specifiers and default arguments to Mavlink::mavlink_open_uart().
2019-08-05 05:02:20 -07:00
Matej Frančeškin 3d993773ae Mavlink FTP: Fix for wrong component id in retry 2019-08-05 13:51:10 +02:00
RomanBapst 43d006aff2 mavlink command sender: give channels more time to request command
- if a channel receives an ack for a command, do not immediately remove the
command item from the send queue but wait until the next ack timeout occurs.
This gives other mavlink channels time to try to put identical commands into
the send queue.

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-08-05 12:07:05 +02:00
RomanBapst 71791fa8f8 mavlink_command_sender: don't try to resend command to instance which
did not request this command

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-08-05 12:07:05 +02:00
RomanBapst 807cfc8aac mavlink: fix race condition in mavlink_command_sender
- if we receive an ack for a command through a specific mavlink channel
then do not drop the corresponding command in the queue if this specific
mavlink channel did not issue the command. If we don't do this we can
end up in a situation where we associate an ack coming through a specific
mavlink channel to a command in the queue which was not requested by this mavlink channel.
Moreover, the actual command for which the ack was meant remains in the
queue and eventually triggers a timeout.

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-08-05 12:07:05 +02:00
Timothy Scott 830d576f45 Changed wheel encoder publication to multi-instance 2019-08-05 02:45:33 -07:00
Timothy Scott 3850322046 Added module.yaml and serial port configuration. 2019-08-05 02:45:33 -07:00
Timothy Scott 35dae9e285 More code cleanup 2019-08-05 02:45:33 -07:00
Timothy Scott ee5a790ecb Removed some parameters 2019-08-05 02:45:33 -07:00
Timothy Scott 834ae3128f Implemented reading speed from the Roboclaw 2019-08-05 02:45:33 -07:00
Timothy Scott 2406aa8b50 Further fixing up parameters 2019-08-05 02:45:33 -07:00
Timothy Scott 2b79684f29 Added parameters 2019-08-05 02:45:33 -07:00
Timothy Scott ffe505b76b Fixed timeout error handling 2019-08-05 02:45:33 -07:00
Timothy Scott e6dc847360 Minor cleanup 2019-08-05 02:45:33 -07:00
Timothy Scott 71067a7e2d Fixed timeout handling 2019-08-05 02:45:33 -07:00
Timothy Scott f780191c5a Fixed disarming 2019-08-05 02:45:33 -07:00
Timothy Scott b5cf8416b6 Publishing encoder message at regular intervals 2019-08-05 02:45:33 -07:00
Timothy Scott 60da26978f Ongoing encoder work 2019-08-05 02:45:33 -07:00
Timothy Scott 0b3f636603 Ongoing encoder work 2019-08-05 02:45:33 -07:00
Timothy Scott 6ea03bee58 Ongoing work to update RoboClaw driver 2019-08-05 02:45:33 -07:00
Daniel Agar cfdabb26d7 update all docker tags 2019-03-08 -> 2019-07-29 2019-08-05 00:19:18 -04:00
Daniel Agar 030508a71d cmake make bloaty available everywhere and improve output 2019-08-05 00:19:18 -04:00
Daniel Agar a2288b1e16 AV-X board_config.h fix ADIS16497 chip select 2019-08-05 00:14:03 -04:00
TSC21 618ce49479 rtps: ids: add missing aliased topics 2019-08-04 20:04:19 +01:00
TSC21 47f5b23419 rtps: generation scripts: make indexing of lists possible in both Python 2 and 3 2019-08-04 20:04:19 +01:00
Daniel Agar e69398c09f introduce uORB::PublicationQueued and transition most orb_advertise_queue usage 2019-08-04 10:08:09 -04:00
Daniel Agar 839787568c CollisionPrevention only process distance_sensor updates 2019-08-04 10:04:09 -04:00
Daniel Agar 34598fe353 mavlink uavcan parameters initialize value 2019-08-03 15:05:34 -04:00
Daniel Agar 6a6bc4be58 drivers helper classes remove empty publication (forced advertise)
- this is no longer necessary with all publications outside of ISRs
2019-08-03 14:08:45 -04:00
Daniel Agar 483280236b mavlink use all ORB battery_status instances instead of BOARD_NUMBER_BRICKS 2019-08-03 13:36:42 -04:00
Daniel Agar 991669073e Jenkins HIL run sd_bench and configure as multicopter 2019-08-03 11:22:31 -04:00
Daniel Agar dcccbbe584 Mavlink receiver ODOMETRY fix code style 2019-08-02 21:36:20 -04:00
Nick Steele b203bc15df Fix rotation of odometry velocities from body frame to local frame in the mavlink receiver odometry handler
Summary:
PX4 assumed that odometry orientation was a way to rotate data from parent frame to child frame, so to rotate child to parent, it was taking the inverse rotation of the odometry orientation,
but orientation rotates the parent frame to the child frame, whereas for data, it represents a rotation from child to parent; hence, the rotation inverse operations were removed.

Test Plan: Checked that vehicle_mocap_odometry and vehicle_local_position gave correct linear velocities. Also visualized px4 output twist in rviz.
2019-08-02 23:15:47 +01:00
Daniel Agar 77694183b2 delete position_estimator_inav 2019-08-02 17:38:28 -04:00
Karl Schwabe d301c22665 Bosch BMI088 initial driver 2019-08-02 13:38:36 -04:00
PX4 Build Bot 5f962401cb Update submodule DriverFramework to latest Fri Aug 2 08:39:05 EDT 2019
- DriverFramework in PX4/Firmware (eda49a4b63): https://github.com/PX4/DriverFramework/commit/06277ef49fb8c9fad18d56ef40e8bc9fe1655a65
    - DriverFramework current upstream: https://github.com/PX4/DriverFramework/commit/c7d2fe2d4f5954b9042af4edf7e5aeb21dbdd129
    - Changes: https://github.com/PX4/DriverFramework/compare/06277ef49fb8c9fad18d56ef40e8bc9fe1655a65...c7d2fe2d4f5954b9042af4edf7e5aeb21dbdd129

    c7d2fe2 2019-07-23 Andrii Beregovenko - Fix missing symbol from librobotcontrol
2019-08-02 10:36:38 -04:00
Timothy Scott 39a5799e65 Mavlink: fixed temperature for batteries (#12605) 2019-08-02 10:09:03 -04:00
Martina Rivizzigno 959a35b3bd add safe_landing_planner to CI 2019-08-02 09:12:02 -04:00
Martina Rivizzigno 14501dfdf2 update local_planner ci to avoidance stable release 0.3.0 2019-08-02 09:12:02 -04:00
Martina Rivizzigno c2a5fc0520 Jenkinsfile-SITL_tests: bump kinetic container to 2019-07-29 tag 2019-08-02 09:12:02 -04:00
Daniel Agar eda49a4b63 PixArt PAW3902 optical motion tracking driver (#12576) 2019-08-01 23:43:26 -04:00
Mark Sauder e0c85c8831 ll40ls: correct a write_reg issue (#12604)
* deprecate a goto statement
 * migrate to uniform initialization in LidarLite base class.
2019-08-01 23:41:05 -04:00
PX4 Build Bot 8609be28a7 Update submodule v2.0 to latest Thu Aug 1 18:09:13 EDT 2019
- v2.0 in PX4/Firmware (d0f1a551e9): https://github.com/mavlink/c_library_v2/commit/18cf6ff2fc0e51e4555b19fc31e8b06eb38bdd79
    - v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/72832840733f0d78cda7e2071a6bf6c7fc3f9273
    - Changes: https://github.com/mavlink/c_library_v2/compare/18cf6ff2fc0e51e4555b19fc31e8b06eb38bdd79...72832840733f0d78cda7e2071a6bf6c7fc3f9273

    7283284 2019-07-26 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/9c1d1feec0f2bd7ee7f408bed53f3de90a16c537
51a62d5 2019-07-23 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/06e378b91a620d20d99fe1476d57bc41e7210b18
477a5b6 2019-07-11 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/6e06b09b9ceb1d03c8f54e91494ab84901d33d9c
2a9615b 2019-07-10 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/e2c91dcc8c389a02a5e2f02b18662a951af7a33d
cd2a362 2019-07-07 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/8b75e0a5a74429c98aa0b33a8b65fe3a7384d38d
beb7890 2019-06-27 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/95031e31a5eec47dc951fc09e2939071b8cf3c2b
614164b 2019-06-27 PX4BuildBot - autogenerated headers for rev https://github.com/mavlink/mavlink/tree/595037a9fbd95ab51d84497f7d1cff3f998ba76e
2019-08-02 00:30:10 +01:00
Daniel Agar f7c9acbdab Update submodule nuttx to latest Thu Aug 1 18:09:20 EDT 2019 (#12603)
- nuttx in PX4/Firmware (210dbb5b8365eb003453695aa4711044bb6d49be): https://github.com/PX4/NuttX/commit/257e1730dca1faafdf3a694ba53da423f46d569c
    - nuttx current upstream: https://github.com/PX4/NuttX/commit/b4013dcd4a9ec8edf412277fa3e4dccd419089c1
    - Changes: https://github.com/PX4/NuttX/compare/257e1730dca1faafdf3a694ba53da423f46d569c...b4013dcd4a9ec8edf412277fa3e4dccd419089c1

    b4013dc 2019-08-01 David Sidrane - [BACKPORT] stm32l4:serial add HW HS on UART 4 & 5
4380c12 2019-08-01 David Sidrane - [BACKPORT] stm32h7:serial add HW HS on UART 4 & 5
0ff3e6c 2019-08-01 David Sidrane - [BACKPORT] stm32:serial add HW HS on UART 4 & 5
316126f 2019-07-31 David Sidrane - [BACKPORT] stm32f7:serial add HW HS on UART 4 & 5
2019-08-01 16:14:45 -07:00
Matthias Grob d0f1a551e9 manual_contol_setpoint: fix mode slot numbering (#12578)
* This fix is necessary because usually uORB structs get initialized with
all zeros and then get filled with the fields that are actually in use.
 * The number 0 for the mode slot was already commanding to switch to the
mode in slot one even though for example the joystick input via mavlink
does not use this mechanism at all.
2019-08-01 12:27:58 -04:00
Anthony Lamping 5d986f2030 posix: add argument to change the CWD (#12482) 2019-08-01 12:25:35 -04:00
Daniel Agar 4bf9344913 camera_trigger: move to new WQ and uORB::Subscription 2019-08-01 12:24:12 -04:00
Daniel Agar bc9fb26ccd commander esc_calibration move to uORB::Subscrition 2019-07-31 20:30:05 -04:00
Burak Saruhan 7789e2de88 sensors: mag reload calibration parameters when first seen (#12586)
* fixes UAVCAN MAG calibration application after reboot
2019-07-31 15:22:59 -04:00
Daniel Agar 29c50da1f6 ll40ls: cleanup and create PX4Rangerfinder helper class (#12567) 2019-07-31 15:17:35 -04:00
dvornikov-aa e9397eeb75 ll40ls: fix LIDAR-Lite v3 initialization (#12453) 2019-07-31 13:00:30 -04:00
Matej Frančeškin 1600b0fd82 Mavlink FTP - return ENOENT when directory doesn't exist (#12589) 2019-07-31 15:22:46 +02:00
Timothy Scott eaaf66e46b INA226::init Restored return OK in trigger mode
Restore return state that was lost in e4926373e6
2019-07-31 03:20:46 -07:00
garfieldG 487addbba5 rc.autostart: add error reporting (#12527)
-Fixed bug : cd to /etc/init.d/airframes, but no cd after
-Added error report to user if value of SYS_AUTOSTART param value is incorrect
2019-07-31 07:37:40 +02:00
David Sidrane a90c87a791 px4fmu-v5x:BMI055->BMI088 (#12582) 2019-07-30 15:54:17 -07:00
David Sidrane 0300a380cf fmuv5x:Missing define PX4_SPI_BUS_SENSORS 2019-07-30 10:49:03 -04:00
David Sidrane 423dd23ff1 fmu-v5x:SPI fix Typo on SPI4 causing assertion 2019-07-30 10:49:03 -04:00
David Sidrane 25b95dcd0c px4fmu-v5x:Fix up start script
Fix commandline for bmm150
    Add 2 internal bmp388 - needs works
    Add 2 ina2662
2019-07-30 10:49:03 -04:00
David Sidrane 72c742f53d px4_fmuv5x:Update to master single wire 2019-07-30 10:49:03 -04:00
David Sidrane 7c1d616187 px4_fmuv5x:Fix GPS 2019-07-30 10:49:03 -04:00
David Sidrane 7eb7db476c px4_fmuv5x:Fixed SDMMC DMA 2019-07-30 10:49:03 -04:00
David Sidrane 13e777c2ce px4_fmuv5x:Use slot 0 with SDMMC2 2019-07-30 10:49:03 -04:00
Daniel Agar 0e949a36ee task_stack_info increase task_name length to match NuttX CONFIG_TASK_NAME_SIZE 2019-07-30 10:47:10 -04:00
Daniel Agar 0dc8119c89 listener print strings 2019-07-30 10:47:10 -04:00
PX4 Build Bot ca74b3fef1 Update submodule nuttx to latest Mon Jul 29 12:38:24 UTC 2019
- nuttx in PX4/Firmware (0654fdcf0ec7e45cc1e1ca5cc38de6c5e36417bc): https://github.com/PX4/NuttX/commit/feb5b6f1743fc3376008013f7dbd16dbc8501f10
    - nuttx current upstream: https://github.com/PX4/NuttX/commit/257e1730dca1faafdf3a694ba53da423f46d569c
    - Changes: https://github.com/PX4/NuttX/compare/feb5b6f1743fc3376008013f7dbd16dbc8501f10...257e1730dca1faafdf3a694ba53da423f46d569c

    257e173 2019-07-26 David Sidrane - [BACKPORT] stm32f7:If only one SDMMC it is slot 0
2019-07-29 10:59:28 -04:00
Daniel Agar 75531125a2 lsm303d split out header and main 2019-07-29 10:57:51 -04:00
Daniel Agar 87200d7954 lsm303d driver move to PX4Accelerometer/PX4Magnetometer and cleanup 2019-07-29 10:57:51 -04:00
Daniel Agar 203d9327ee osd/atxxxx move to new WQ and uORB::Subscription 2019-07-29 10:52:33 -04:00
RomanBapst b75d2ce982 set trajectory generating flight task as default (MPC_POS_MODE = 3)
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-07-29 10:37:26 -04:00
RomanBapst a8071589bc increase default fixed wing rate controller I term
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-07-29 10:37:26 -04:00
RomanBapst 77fd290b0c added default expo for yaw and x/y/z velocity demand in position mode
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-07-29 10:37:26 -04:00
RomanBapst 81ae85015f changed defaults of MPC acceleration limit parameters
- vehicle will fly less aggressive
- it does not make sense to set the lower acceleration limit to something
that exceeds gravity if most of the vehicles do not support reverse thrust

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-07-29 10:37:26 -04:00
RomanBapst a5d3e10c67 MPC_MAN_Y_MAX: changed default from 200 to 150 deg/s
- we have set the maximum yaw-rate MC_YAWRATE_MAX to 200 degrees and it
makes senses to leave a bit of margin between what the user can demand
and what the limits of the vehicle are

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-07-29 10:37:26 -04:00
RomanBapst f0cdd9be60 MPC_Z_VEL_I: changed default from 0.02 to 0.1
- generally better attitude tracking
- much better altitude control immediately after takeoff (hover throttle offset)
- faster landing detection

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-07-29 10:37:26 -04:00
Daniel Agar be99d2f111 sih: fix code style 2019-07-28 11:18:02 -04:00
Daniel Agar 09eaef82f6 sih: move to PX4Accelerometer/PX4Gyroscope/PX4Magnetometer/PX4Barometer helpers 2019-07-28 11:18:02 -04:00
Mark Sauder f432f74611 ulanding: refactor driver to utilize ScheduledWorkQueue class inheritance (#11894)
* Migrate variable initialization from constructor list to declaration uniform initialization, format whitespace, alphabetize/group/order variables and methods in ulanding.cpp.

* Refactor the uLanding driver to utilize the ScheduledWorkQueue.
2019-07-28 10:51:01 -04:00
Anthony Lamping ff8e70f6b3 jenkins: archive catkin test logs on failure 2019-07-28 10:25:36 -04:00
Daniel Agar 97445b60aa commander preflightcheck update orb usage to uORB::SubscriptionData 2019-07-28 10:22:47 -04:00
Daniel Agar 1d191cc141 px4flow driver move to new WQ and cleanup 2019-07-26 20:03:21 -04:00
Daniel Agar a462bfeb53 vscode add v5x variant (for cmake configure) 2019-07-26 12:59:27 -04:00
PX4 Build Bot 36534d5bab Update submodule ecl to latest Fri Jul 26 12:38:35 UTC 2019
- ecl in PX4/Firmware (83316cf7b0484e7ba7f9b61201dea7215185da49): https://github.com/PX4/ecl/commit/e1751188fd15b799cbfae86bd7373bb91206069b
    - ecl current upstream: https://github.com/PX4/ecl/commit/d38164fc8e68b740405669127138e550c3c7375c
    - Changes: https://github.com/PX4/ecl/compare/e1751188fd15b799cbfae86bd7373bb91206069b...d38164fc8e68b740405669127138e550c3c7375c

    d38164f 2019-07-21 Jaeyoung-Lim - Fix flag for initialization
2019-07-26 12:04:07 -04:00
TSC21 eb951ede6a urtps templates: minor cleanup 2019-07-26 15:05:54 +02:00
TSC21 11a28665b7 px_generate_uorb_topic_files: cleanup uneeded conditions 2019-07-26 15:05:54 +02:00
TSC21 85bcfd7d72 generate_microRTPS_bridge: remove commented code 2019-07-26 15:05:54 +02:00
TSC21 2b4c878e77 rebase: sync up submodules 2019-07-26 15:05:54 +02:00
TSC21 c15e54445e increase cutoff margin for alias matching 2019-07-26 15:05:54 +02:00
TSC21 5b2d952e4b add checker for multitopic msg naming 2019-07-26 15:05:54 +02:00
TSC21 3d9f83a4f2 microRTPS_bridge: structural change to make possible to generate pub/sub code for multi-topics/aliased msgs 2019-07-26 15:05:54 +02:00
TSC21 a747116eab microRTPS bridge: make mandatory that all the uORB messages have their RTPS id 2019-07-26 15:05:54 +02:00
Julian Oes 98dfa30838 commander: fix disarming for rovers
We have to ignore the landed flag for rovers, it doesn't really apply
for them.
2019-07-26 02:52:38 -07:00
Julian Oes 308d91e5ff commander: prevent potential disarms in-air
This fixes the terrifying case where the drone disarms in-air just
because it receives a MAVLink disarm command. We now check param2 for a
magic number which enforces arming/disarming.

This is added to the mavlink protocol in:
https://github.com/mavlink/mavlink/pull/1162
2019-07-26 02:52:38 -07:00
Daniel Agar 71613ac631 Jenkins fetch all tags 2019-07-25 11:14:16 -04:00
Timothy Scott 57352ae3bd Reinstated rover CI test 2019-07-25 10:53:39 -04:00
Timothy Scott 80f2603b17 Fixed timing of rover pos control 2019-07-25 10:53:39 -04:00
Beat Küng 4f090980ab kakutef7 board_config: remove usb valid defines
Otherwise 'system_power' gets published with voltage5v_v = 0, as there is
no 5V sensing pin, leading to Avionics Power Low preflight check failures.
2019-07-25 10:38:57 -04:00
Beat Küng 72ddf3e0aa tune_control: use orb queue advertisement consistently 2019-07-25 10:38:57 -04:00
Beat Küng c869cb0ea5 validate_yaml.py: fix for python3
RuntimeError: dictionary changed size during iteration
2019-07-25 10:38:57 -04:00
Beat Küng 8e5aaff76b airframes: add Kopis 2 2019-07-25 10:38:57 -04:00
Matthias Grob 5afa404b7f appveyor: fix PX4 version format check
by removing shallow clone such that we can infer the version from the
last tag
2019-07-25 10:36:58 -04:00
David Sidrane e296297ab7 Revert "hotfix for logger: use '%i' instead of '%zu'"
This reverts commit e6aa035209.
  Root cause was fixe in Nuttx and backported
2019-07-25 05:28:46 -07:00
David Sidrane df0599913e Firmwarte master with nuttx printf backport 2019-07-25 05:28:46 -07:00
RomanBapst c0053409a3 ak09916: fixed driver not reporting magnetometer as external
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-07-25 13:17:08 +02:00
Hamish Willee 2b8337e5e2 Add units for EKF2_RNG_A_HMAX and EKF2_RNG_A_VMAX (#12545) 2019-07-25 08:09:35 +02:00
Julien Lecoeur 8f47535b54 ROMFS: fix airframe incremental build 2019-07-24 05:40:53 -07:00
Julien Lecoeur 24c2846750 ROMFS: add explicit dependency to parser scripts 2019-07-24 05:40:53 -07:00
RomanBapst 2fbb70d9ca mc_att_control: output zero throttle in manual mode when landed
- MPC_MANTHR_MIN is used as minimum throttle in attitude control mode when
the vehicle is in air. This is useful to retain some control around roll and
pitch axis if airmode is not enabled and the user demands zero throttle.
However, when the vehicle is landed there is not need to keep the throttle
at a higher value than zero.

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-07-23 17:12:45 +02:00
Beat Küng ac5669deb4 CI: ensure 'git fetch --tags' is executed for all Firmware builds 2019-07-23 13:16:43 +02:00
Beat Küng 05ff7bb731 version: validate format of the git tag
This fails the build if a wrong version tag is used.
A wrong tag leads to wrong reporting in QGC, and incorrect error messages
about minimum required PX4 version.
It also leads to wrong statistics on Flight Review.
2019-07-23 13:16:43 +02:00
Timothy Scott 2ed8ebf889 rover_pos_control: refactor to ModuleBase and use C++ Param API 2019-07-23 11:16:52 +02:00
Julien Lecoeur e23e3d7bae Airframe parser: add docs 2019-07-22 13:02:45 +02:00
Julien Lecoeur daeba4e75f Add airframe .post scripts on NuttX targets 2019-07-22 13:02:45 +02:00
Matthias Grob e964af9262 commander_params: enable RC override by default
It doesn't affect fixed wing flying anymore. I disabled it for the
deltaquad since I presume @sanderux prefers to have the feature disabled
even when flying in multicopter mode.
2019-07-22 09:57:37 +02:00
Matthias Grob 706500f19c Commander: make RC override multicopter only
AAs discussed in the devcall this functionality is only useful for
rotary-wing (multicopter) flying since it's a big safety hazard to
accidentally bring a fixed wing out of an auto mode e.g. a mission
and fly away in a straight line or into an obstacle.
2019-07-22 09:57:37 +02:00
Matthias Grob 5c1ab06343 Commander: pure refactor of RC override conditions 2019-07-22 09:57:37 +02:00
Bob Long 84a0d16386 Clarify weird behavior of the LIS3MDL
See issue #12514
2019-07-21 12:08:26 -04:00
Beat Küng b71bae414b param: fix potential nullptr dereferencing on param import
NuttX 7.28 seemed to handle this gracefully, but officially passing NULL
results in undefined behavior, and with 7.29 leads to a hardfault.

This happens on configs with flash-based params, on the first unsuccessful
import attempt.
2019-07-19 09:55:08 +02:00
Matthias Grob aaad71faab commander_params: enable automatic disarming after land detection by default 2019-07-18 14:36:50 +02:00
Daniel Agar 9986a88697 mavlink: split BATTERY_STATUS from SYS_STATUS update and handle all bricks (#12034) 2019-07-18 13:32:41 +02:00
Timothy Scott 51d4239eee Commented out rover SITL test 2019-07-17 16:52:24 +02:00
Timothy Scott ecf396443f Minor bugfix 2019-07-17 10:47:56 +02:00
Timothy Scott b9a2c9daf8 Fixed uninitialized variable 2019-07-17 10:47:16 +02:00
Mark Sauder 4a02475dd1 rcS: reduce a few LOC in AUTOCNF logic (#12467)
* Set/unset rcS vars at beginning and end of rcS script and reduce a few LOC checking SYS_AUTOCONFIG with improved logic.

* Restore current placement of set/unset vars in rcS script to leave only the SYS_AUTOCONFIG logic modification.

* Replace set AUTOCNF no after inadvertent deletion.
2019-07-16 16:48:25 +02:00
Beat Küng e6aa035209 hotfix for logger: use '%i' instead of '%zu'
Work-around for https://github.com/PX4/Firmware/issues/12485.

This can be reverted after the root-cause is fixed.
2019-07-16 13:11:41 +02:00
bresch ea0e164145 FlightTask - Rename state_prev to last_setpoint 2019-07-16 13:09:09 +02:00
bresch 37a9b90945 FlightTask - Move checkSetpoints function in each FlightTask to be tailored to the specific needs and avoid checking all the setpoints 2019-07-16 13:09:09 +02:00
bresch 24811cf550 FlightTask smoothVel - Initialize ekf reset counters when task is activated 2019-07-16 13:09:09 +02:00
bresch 1414f50cea FlightTask - When switching task, pass the last setpoints of the previous task to the new task
This is done to allow proper initialization of the new FlightTask and
give it a chance to continue the setpoints without discontinuity. The
function checkSetpoints replaces the setpoints containing NANs with an
estimate of the state. The estimate is usually the current estimate of
the EKF or zero.
The transition FlightTask also provides an estimate of the current
acceleration to properly initialize the next FlightTask after
back-transition. This avoid having to initialize the accelerations to
zero knowing that the actual acceleration is usually far from zero.
2019-07-16 13:09:09 +02:00
bresch d24c415fd7 PID rate controller - Add controller gain to support Ideal PID form (ISA standard) 2019-07-16 10:24:19 +02:00
Timothy Scott 7c05073044 Fixed overflowing tslc. 2019-07-16 09:43:58 +02:00
Timothy Scott e25ad348e8 Added message handler for UTM_GLOBAL_POSITION 2019-07-16 09:43:58 +02:00
Anthony Lamping efad34e55e jenkins: pub_test needs to start px4 in daemon mode 2019-07-16 09:39:01 +02:00
Beat Küng f613581b70 Jenkinsfile-compile: add kakutef7 to nuttx build targets 2019-07-16 08:09:22 +02:00
Beat Küng 84bca7e4d0 shellcheck: disable SC2181
The combination of 'if mycmd' and a logical expression is not supported in
NuttX.
2019-07-16 08:09:22 +02:00
Beat Küng d95aae4619 Generic-arm-none-eabi-gcc-cortex-m7: use SP float depending on NuttX config
Not all m7 boards support double, as for example the STM32F745.
2019-07-16 08:09:22 +02:00
Beat Küng 6e833ed7a8 boards: add Holybro KakuteF7 2019-07-16 08:09:22 +02:00
Beat Küng 098afad9e0 missing SD card error tune: play only twice instead of repeating endlessly 2019-07-16 08:09:22 +02:00
Beat Küng f803e54eee ToneAlarmInterface: add support for non-pwm-based buzzers 2019-07-16 08:09:22 +02:00
Beat Küng 92c2d7ae36 CBRK_BUZZER: allow to disable startup sound
The 'if [ $LOG_FILE = /dev/null ]' block can be removed, because
STARTUP_TUNE is already set in that case.
2019-07-16 08:09:22 +02:00
Beat Küng d8da9db04c fix atxxxx osd driver: use correct device id 2019-07-16 08:09:22 +02:00
Beat Küng 5fe4c61b42 rc_input: add RC_PORT_CONFIG param to configure RC port
The parameter will only be available if the board defines an 'RC' serial
port in SERIAL_PORTS (in default.cmake).
2019-07-16 08:09:22 +02:00
Beat Küng b7a0e1ef03 boards: simplify RC port configuration by using NuttX ioctl's
A board only needs to define:
 #define RC_SERIAL_PORT                     "/dev/ttyS4"

Then it can optionally define one or more of the following:
 #define RC_SERIAL_SWAP_RXTX
 #define RC_SERIAL_SINGLEWIRE
 #define RC_INVERT_INPUT(_invert_true) px4_arch_gpiowrite(GPIO_SBUS_INV, _invert_true)
2019-07-16 08:09:22 +02:00
Beat Küng 9a1ad97c11 fix ToneAlarmInterface: correct TOME_ALARM_CLOCK for timer 13 and 14 2019-07-16 08:09:22 +02:00
Beat Küng a3c920db7d board_defaults: remove unnecessary 'set MIXER_AUX none'
On all of these boards '$USE_IO = no' will hold.
2019-07-16 08:09:22 +02:00
Beat Küng 4b0afff33a fmu-v5 init.c: remove unused include 2019-07-16 08:09:22 +02:00
Beat Küng fcb7372554 atxxxx: fix comment 2019-07-16 08:09:22 +02:00
Beat Küng 1112828dcf adc: allow board to not define BOARD_ADC_HIPOWER_5V_OC or BOARD_ADC_PERIPH_5V_OC 2019-07-16 08:09:22 +02:00
Beat Küng 5d8710d539 bmp280: fix device_id initialization 2019-07-16 08:09:22 +02:00
Martina Rivizzigno 1fb80612f3 CollisionPrevention: address https://github.com/PX4/Firmware/pull/12179
review comments
2019-07-15 10:58:00 +02:00
Martina Rivizzigno ac67d5603f CollisionPrevention: compute the attitude_sensor_frame outside for loop 2019-07-15 10:58:00 +02:00
Martina Rivizzigno 560c9f972a CollisionPrevention: use the maximum timestamp between offboard and
distance sensor such that if one of the two fails the vehicle goes into
failsafe, do not switch off CollisionPrevention if it fails
2019-07-15 10:58:00 +02:00
Martina Rivizzigno 8aad105265 mc_pos_control: increase stack size by 100 bytes 2019-07-15 10:58:00 +02:00
Martina Rivizzigno 02bdc2c46b CollisionPrevention: use FlightTasks convention for private/public methods,
add doxygen on header file
2019-07-15 10:58:00 +02:00
Martina Rivizzigno 8637a9255e CollisionPrevention: add failsafe for stale distance data 2019-07-15 10:58:00 +02:00
Martina Rivizzigno 0ee770e853 logger: log obstacle_distance_fused instead of obstacle_distance 2019-07-15 10:58:00 +02:00
Martina Rivizzigno ff6a4d9e71 stream mavlink message OBSTACLE DISTANCE 2019-07-15 10:58:00 +02:00
Martina Rivizzigno e6e4d846fb add uORB message obstacle_distance_fused with data from offboard
obstacle_distance and distance sensor
2019-07-15 10:58:00 +02:00
Martina Rivizzigno a9b1946bea CollisionPrevention: make sure that vehicle tilt compensation is
correct for all sensor orientation
2019-07-15 10:58:00 +02:00
Martina Rivizzigno 2439dc09ae CollisionPrevention: refactor code to make it more readable 2019-07-15 10:58:00 +02:00
Martina Rivizzigno b6eea508bb CollisionPrevention: make sure that the timestamp is updated for distance
sensors even if they are out of range
2019-07-15 10:58:00 +02:00
Martina Rivizzigno 09bfb00c88 Obstacle_distance: use only one increment in float directly
CollisionPrevention: rename a few variables to make the code more readable
2019-07-15 10:58:00 +02:00
Martina Rivizzigno d216b45202 cm8jl65: use paramter to set sensor orientation 2019-07-15 10:58:00 +02:00
Martina Rivizzigno 6a0ed6af93 cm8jl65: add field of view 2019-07-15 10:58:00 +02:00
Martina Rivizzigno 5b24f28ac7 CollisionPrevention: map distance_sensor data to obstacle distance 2019-07-15 10:58:00 +02:00
Martina Rivizzigno aff131774e simulator mavlink: add horizontal and vertical fov + quaterion orientation
to distance sensor
2019-07-15 10:58:00 +02:00
Martina Rivizzigno 02c3765c1b obstacle_distance: add fields from mavlink extension 2019-07-15 10:58:00 +02:00
Martina Rivizzigno d375402b5b distance_sensor: add horiontal and vertical fov, add quaternion for sensor orientation 2019-07-15 10:58:00 +02:00
Daniel Agar 53c5b6d24f px4_fmu-v2_multicopter disable batt_smbus
- saves a bit of flash
2019-07-12 15:57:35 -04:00
BazookaJoe1900 7be5d15502 px4fmu: cleanup - removed duplicate const MAX_ACTUATORS definition 2019-07-11 18:25:56 -04:00
bresch e5128ac7b9 Cosmetic - Use c++ list initialization 2019-07-11 17:46:44 +02:00
bresch 15ec73629b MPC auto - Add MPC_YAW_MODE: towards waypoint (yaw first) mode. This mode ensures that
the vehicle yaws towards the next waypoint before accelerating. This is
required for drones with front vision and aerodynamic multicopters such
as standard vtol planes or highspeed multirotors.
2019-07-11 17:46:44 +02:00
Timothy Scott 2ed00c9cb6 Rover: Rewrote gnd_pos_control and removed gnd_att_control (#12239) 2019-07-11 09:39:13 -04:00
Beat Küng 3743e6d8fb yaml: use safe_load(f) instead of load(f, Loader=yaml.FullLoader)
yaml.FullLoader is not always defined
2019-07-11 10:20:06 +02:00
Hamish Willee 27ef1899c7 Fix up MAV_X_RATE as html tag doesn't render (#12449)
* Fix up MAV_X_RATE as html tag doesn't render

* Update src/modules/mavlink/module.yaml

Co-Authored-By: Beat Küng <beat-kueng@gmx.net>
2019-07-11 08:07:20 +02:00
Mark Sauder 4e5974f1ca srf02 driver: Move member variable initialization to declarations, standardize against other drivers and format. (#11891)
* Migrate variable initialization from constructor list to declarations, standardize whitespace formatting, and alphabetize/organize order of methods and variables in srf02.cpp.

* Increase stack allocation size for the srf02 driver main.
2019-07-10 23:05:02 -04:00
Daniel Agar d4cd1d0d2e NuttX stm32f7 fully re-enable dcache with write back (#12435)
- fixes https://github.com/PX4/Firmware/issues/12216
 - includes latest PX4/NuttX and apps update 7.29+
2019-07-10 19:08:12 -04:00
Daniel Agar dc10a68539 NuttX and apps update 7.29 2019-07-10 12:58:35 -04:00
Daniel Agar fbd3386c39 Jenkins Hardware ensure buzzer is disabled on test rack 2019-07-10 09:50:29 -04:00
Alexis Paques 453ecfeb55 YAML: use Loaders and safe_load (#11910) 2019-07-10 15:15:29 +02:00
Fabian Schilling 6da8ce94f1 Fix off-by-one error in tgt_system (SDF version) 2019-07-10 14:49:18 +02:00
Fabian Schilling 5e39e14e7c Fix off-by-one error in tgt_system parameter 2019-07-10 14:49:18 +02:00
Daniel Agar 7ace66a2b9 Jenkins hardware increase timeout 10 -> 20 minutes 2019-07-09 21:08:07 -04:00
Beat Küng aa86bf5f92 landdetector flight time: fix cast to 64 bits
`_param_total_flight_time_low.get()` is an int32_t and gets sign-extended
if cast directly to uint64_t. To avoid that we first cast to uint32_t.
2019-07-09 20:26:40 -04:00
Daniel Agar 321c2c0392 boards don't use px4_add_library for drivers_board
- this prevents low level board support from using PX4 logging, uORB, etc
2019-07-09 19:09:47 -04:00
Roman Bapst b54a43fccc UAVCAN driver: support throttle linearization (THR_MLD_FAC parameter)
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-07-09 15:10:54 -04:00
Matej Frančeškin 2aa05e3914 Mavlink FTP - process only messages that have our component id 2019-07-09 20:21:15 +02:00
Silvan Fuhrer fdcb0f06d6 Babyshark VTOL: updated config file (new smooth flight task, detuned position control,
improved land detector, included autopilot rotation)

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-07-09 15:38:40 +02:00
bresch 6df1600357 Auto - Update velocity setpoint generator to avoid overshoot at high cruise speed.
The linear mapping from position error to cruise velocity is changed by
a combination of that linear mapping and a nonlinear function containing
the maximum acceleration and jerk to avoid overshoots at waypoints due to
overoptimistic breaking distance.
2019-07-09 09:46:45 +02:00
Jacob Dahl 59c555aec3 Multicopter Auto: Adjustable land speed via RC (#12220) 2019-07-08 23:55:21 -04:00
mcsauder c1e4970841 Delete uneccessary #includes from the lights driver directory. 2019-07-08 23:45:01 -04:00
mcsauder f3af3217c7 Delete unnecessary #includes from the irlock driver. 2019-07-08 23:45:01 -04:00
mcsauder b495ddbdd3 Delete unnecessary #includes from the imu driver directory. 2019-07-08 23:45:01 -04:00
mcsauder be414f7ab1 Alphabetize the heater driver #include list. 2019-07-08 23:45:01 -04:00
mcsauder 35e5327cc9 Delete unnecessary #includes in the gps driver directory. 2019-07-08 23:45:01 -04:00
mcsauder 2ef6e18640 Delete unnecessary #includes in the differential_pressure drivers directory. 2019-07-08 23:45:01 -04:00
mcsauder 2a3b98a463 Deprecate unneeded #includes from the camera_capture driver. 2019-07-08 23:45:01 -04:00
mcsauder b10cb2a24e Deprecate unnecessary #includes from the batt_smbus driver. 2019-07-08 23:45:01 -04:00
mcsauder d1e46737a3 Organize, alphabetize, and deprecate unneeded #includes from the barometer drivers. 2019-07-08 21:32:52 -04:00
Daniel Agar aff13f6f64 rc.fw_defaults: reduce EPH/EPV failsafe values from 5x to 3x MC 2019-07-08 17:50:54 -04:00
BazookaJoe1900 df45124d02 black sheep telemetry add new TEL_BST_EN parameter to enable 2019-07-08 16:30:22 -04:00
Daniel Agar 6ea5853161 px4_fmu-v2_multicopter sync with px4_fmu-v2_default 2019-07-08 14:49:58 -04:00
Daniel Agar 58b74e241e px4_fmu-v2 disable mpu9250 2019-07-08 14:49:58 -04:00
Daniel Agar 26f6794aa9 px4_fmu-v2 re-enable CONSTRAINED_FLASH build
- this limits console output at boot
2019-07-08 14:49:58 -04:00
Daniel Agar 15d1543f95 create systemcmds/i2cdetect tool to scan i2c bus 2019-07-06 10:28:16 -04:00
PX4 Build Bot d9c90ed31a Update submodule ecl to latest Fri Jul 5 12:38:36 UTC 2019
- ecl in PX4/Firmware (590b55cb222ec68d4bbb61208f301102607b6161): https://github.com/PX4/ecl/commit/a036cf82cc92ef6572ea7ee960cfff4d305c01fa
    - ecl current upstream: https://github.com/PX4/ecl/commit/e1751188fd15b799cbfae86bd7373bb91206069b
    - Changes: https://github.com/PX4/ecl/compare/a036cf82cc92ef6572ea7ee960cfff4d305c01fa...e1751188fd15b799cbfae86bd7373bb91206069b

    e175118 2019-06-28 bresch - EKF - Initialize _deadrekon_time_exceeded to true. If no sample have been received, deadrekoning and local position should be invalid.
2019-07-05 16:46:31 -04:00
Mathieu Bresciani e54075abe8 MC pos control - Force cruise and manual speeds below max speed. (#12404)
- Force hover thrust between min and max thrust
2019-07-05 15:40:28 -04:00
David Sidrane ea0da3a3b6 px4/fmu-v5x: GPIO ADC had bad definition 2019-07-05 12:23:06 -04:00
RomanBapst 7c8fa82e76 rtl cone angle: expose a few values to the user
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-07-05 18:05:09 +02:00
RomanBapst 81ee40eac8 rtl: implemented RTL based on cone shape
- user defines a cone half angle which defines the RTL altitude behavior
- if vehicle is outside the cone it will climb until it intersects the cone
and then return at this altitude.
- if vehicle is inside the cone or above the predefined return altitude (RTL_RETURN_ALT)
then it will return at the current altitude

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-07-05 18:05:09 +02:00
Timothy Scott f7a460427b Changed name of mixer to be shorter 2019-07-05 18:00:15 +02:00
CarlOlsson 12fcddd288 fmu: remove unused functions 2019-07-04 22:08:00 -04:00
Silvan Fuhrer 9b46c1d8a9 Upated Babyshark VTOL config and vtol_defaults
Updated the babyshark default  parameters for improved flight performance,
as well as two MPC parameters in vtol_defaults for smoother hovering with VTOLS"

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-07-04 11:26:01 -04:00
Nicolas de Palezieux 2f1cfa60f4 precland: store result of _target_pose_sub.update() for later use
- Fixes #12391
2019-07-04 11:02:14 -04:00
BazookaJoe1900 72a449490a Mavlink: Use MAV_BROADCAST only in context of ethernet 2019-07-03 14:02:37 -04:00
Fabian Schilling d139bc5a7c Use bc to support floating point PX4_SIM_SPEED_FACTOR 2019-07-03 16:54:29 +02:00
Timothy Scott dce1dda871 Fixed incorrect timestamps 2019-07-03 14:39:59 +02:00
Beat Küng a2471fb539 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:43:59 +02:00
alessandro fecb32f88d Parameter for virtual battery in SITL (#12299)
* New parameter for virtual battery in SITL

* Update src/modules/simulator/simulator_mavlink.cpp

Co-Authored-By: Beat Küng <beat-kueng@gmx.net>

* Updated description for parameter SIM_BAT_MIN_PCT
2019-07-02 15:53:18 +02:00
Daniel Agar 9bfc4f2d54 Analog Device ADIS16477 move to PX4Accelerometer/PX4Gyroscope and cleanup 2019-07-01 22:53:27 -04:00
Daniel Agar 9450496eb4 Analog Devices ADIS16497 move to PX4Accelerometer/PX4Gyroscope and cleanup 2019-07-01 22:47:31 -04:00
Daniel Agar cdadb393b7 Analog Device ADIS16448 cleanup
- move to PX4Accelerometer, PX4Gyroscope, PX4Magnetometer helpers
 - add barometer support (using PX4Barometer)
2019-07-01 16:02:00 -04:00
dlwalter cbdfc0c587 px4_fmu-v5: rc.board_sensors start lis3mdl optional external magnetometer 2019-07-01 14:52:14 -04:00
Daniel Agar 6ef61e5c19 landing_target_estimator: update to uORB Subscription and Publication 2019-07-01 10:35:41 -04:00
Daniel Agar 38da0f95aa rc_input move to uORB::Subscription 2019-07-01 10:35:26 +02:00
Daniel Agar 4f445cd7f8 vscode add av_x-v1 debug target 2019-06-30 19:05:54 -04:00
Daniel Agar 7f9415ba46 systemcmds/top: increase stack 200 bytes
- this is necessary after most boards increased CONFIG_MAX_TASKS 32 -> 64
2019-06-30 18:37:41 -04:00
Daniel Agar d1298f2c37 Jenkins HITL exit upload monitor on nsh> 2019-06-29 17:18:22 -04:00
Daniel Agar c165a6f71b attitude_estimator_q: move most orb subscriptions to uORB::Subscription 2019-06-29 15:51:49 -04:00
Mark Sauder 423219c60e pga460: Change variable initialization to uniform initialization style, format whitespace, and change baud rate unsigned to speed_t type. (#11861) 2019-06-28 21:52:16 -04:00
Mark Sauder db96b6c08d cm8jl65: Refactor driver, employ uniform initialization, format, and deprecate ringbuffer and IOCTL. (#11853)
* Move cm8jl65 class member variable initialization from constructor list to declarations.  Format whitespace and move method doxy comments  to declarations.

* Refactor the cm8jl65 driver start() method, and rename info()->status().

* Continued refactoring of the cm8jl65 driver class:
 - Condense all class files into a single *.cpp file and give class scope resolution to previously unscoped methods.
 - Refactor cm8jl65 namespace level driver entry methods to reduce code and improve clarity.
 - Breakout CDev specific initialization LOC into the device_init() method.
 - Move the endian modification inside of the crc16_calc() method.

* Deprecate the hardware ringbuffer, _class_instance, and ioctl() from the cm8jl65 driver.
2019-06-28 21:46:02 -04:00
Daniel Agar 4b778fd0c2 navigator: fix vehicle_status update (#12364) 2019-06-28 21:35:29 -04:00
Mark Sauder 5857cf4799 LeddarOne: Refactor the driver to standardize against other distance sensor drivers. (#11858)
* Migrate remaining member variable intialization to declarations and employ uniform initialization style. Copy/paste help() and main() methods to the bottom of the file to match convention with other distance sensor drivers.

* Refactor the LeddarOne driver class to give scope resultion to the methods that were global and to standardize the implementation against most of the other distance sensor drivers.

* Deprecate _reports member var, use of hardware ring buffer, and LeddarOne::read() method.

* Deprecate commented (dead) code from the LeddarOne class init() method.

* Refactor the LeddarOne class cycle() and collect() methods and create measure() method to untangle the previous logic implementation.
2019-06-28 21:29:44 -04:00
PX4 Build Bot 309322ce98 Update submodule sitl_gazebo to latest Fri Jun 28 12:37:57 UTC 2019
- sitl_gazebo in PX4/Firmware (7bba5a7287): https://github.com/PX4/sitl_gazebo/commit/95adbb11f8deef06fb132bf0eb85c19e6ca00f6e
    - sitl_gazebo current upstream: https://github.com/PX4/sitl_gazebo/commit/22df9475ca0d157e2db066a20f64c35906bf7f25
    - Changes: https://github.com/PX4/sitl_gazebo/compare/95adbb11f8deef06fb132bf0eb85c19e6ca00f6e...22df9475ca0d157e2db066a20f64c35906bf7f25

    22df947 2019-06-27 Martina Rivizzigno - Range.proto: fix indentation
8ef5625 2019-05-28 Martina Rivizzigno - update sonar message to match mavlink distance sensor definition
e04ff96 2018-12-04 Martina - get distance sensor orientation from the vehicle model instead of hard-coding it in the gazebo interface, add horizontal and vertical fov
2019-06-28 16:43:49 +01:00
Daniele Pettenuzzo 55b5e7552c mavlink: add new extvisionmin mode (#12279)
Signed-off-by: DanielePettenuzzo <daniele@px4.io>
2019-06-28 10:44:22 -04:00
Mark Sauder c22ed9397e land_detector: Implement ModuleParams inheritance in the FixedwingLandDetector class. 2019-06-28 10:26:59 -04:00
RomanBapst 0b2af5c519 FixedWingAttitudeControl: don't lock integrator during transition
- airframes that are not well trimmed rely on the integrator to learn
the offset. This change can help improve altitude hold during transitions

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-06-28 09:54:40 -04:00
RomanBapst 7bba5a7287 vtol_configs: replaced VT_MOT_COUNT with VT_MOT_ID
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-06-27 20:14:10 +02:00
RomanBapst afd95b14cf vtol_att_control: use VT_MOT_ID instead of VT_MOT_COUNT
- VT_MOT_COUNT assumed that motors were always the first outputs. This
does not have to be true always. VT_MOT_ID allows to specify precisely how
many motors we have for hovering and to which channel they are connected.

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-06-27 20:14:10 +02:00
RomanBapst 2c74216028 ekf2: fixed calculation of static pressure error
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-06-27 18:11:53 +02:00
Mark Sauder 1466d11acc land_detector: cleanup actuator_armed and battery_status naming
* Rename _arming -> _actuator_armed
 * Rename _battery -> _battery_status in the MulticopterLandDetector class.
2019-06-27 12:02:14 -04:00
Mark Sauder 94c1f21473 mb12xx: Refactor driver class to allow for multiple sensors and cleanup (#11859)
* Migrate mb12xx driver class member variable initialization to declarations.
Format whitespace and alphabetize/group/order var declarations.
Refactor driver reset() and mb12xx_main() methods for readability.
Deprecate usage of IOCTL.

* Deprecate the _reports ringbuffer, _class_instance, and read() method and minor formatting in the mb12xx driver.

* Add time_literal usage and #define MB12XX_BUS_SPEED.

* Refactor the mb12xx driver to mirror the mappy_dot driver implementation and create functionality for multiple sensors.

* Add stack size for the mb12xx driver.
2019-06-27 11:59:40 -04:00
Mathieu Bresciani c5deba53a2 mc_pos_control: Explicitly convert tilt variables to radians during check and assignments 2019-06-27 11:38:21 -04:00
Lorenz Meier 748ff7f50a Update README.md
Clarify the naming of FMU versions to not confuse users once the new industrial FMUv5X standard is established.
2019-06-27 08:28:32 +02:00
Anthony Lamping 49966f4c46 launch: multiple sdf models (#12306) 2019-06-26 15:20:49 -04:00
David Sidrane 6fcc4cc6a2 WIP Digital PM Support 2019-06-26 14:34:02 -04:00
David Sidrane 1cf4a2d953 Added Suport for ICM 20602 on PX4_SPI_BUS_SENSORS1 2019-06-26 14:34:02 -04:00
David Sidrane e5b6adc7f3 fmu-v5X VER REV Combined 2019-06-26 14:34:02 -04:00
David Sidrane 31dfaee76a fmuv5x board support 2019-06-26 14:34:02 -04:00
mcsauder 6e9f706b12 Standardize remaining class member variable naming convention in the MulticopterLandDetector class. 2019-06-26 14:06:56 -04:00
mcsauder df662245a2 Standardize class member variable naming convention in the LandDetector class. 2019-06-26 14:06:56 -04:00
mcsauder 6b6d82447e Standardize class member variable naming convention in the MulticopterLandDetector class. 2019-06-26 14:06:56 -04:00
mcsauder 3f0159d784 Standardize class member variable naming convention in the VtolLandDetector class. 2019-06-26 14:06:56 -04:00
mcsauder 2b9ad179a2 Standardize class member variable naming convention in the FixedWingLandDetector class. 2019-06-26 14:06:56 -04:00
Lorenz Meier 7ba658d573 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:24:16 -04:00
mcsauder d7cfebe0a3 Add check_params(true) call to the LandDetector start() method. Break out _update_total_flight_time() method in the LandDetector class. 2019-06-26 09:23:02 +02:00
mcsauder f783982edb Revert changes to the check_params(const bool force) declaration/definition to match current PX4:master. 2019-06-26 09:23:02 +02:00
mcsauder 0ec7efcfc4 Delete _measure_interval and redundant parentheses in LandDetector.h. 2019-06-26 09:23:02 +02:00
mcsauder faa3c3dc6f Refactor the LandDetector class to
- Reduce duplicate code in LandDetector _check_params() method.
 - Standardize naming cases.
 - Implement DEFINE_PARAMETERS() macro.
2019-06-26 09:23:02 +02:00
Angel 46662072d1 Missed conversion to radians in AutoMapper and AutoMapper2 2019-06-25 14:01:35 +02:00
Daniel Agar 6d9bf18ca6 Revert "VTOL: add parameter to prevent flight if roll direction was not checked"
This reverts commit 5f06c6a1aa.
2019-06-25 09:26:20 +02:00
Matthias Grob 5002b13bda 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 18:26:27 +02:00
Matthias Grob 443381327e Airframes: rename normal S500 to generic and remove PX4 defaults 2019-06-24 18:26:27 +02:00
Matthias Grob c22825ee45 Airframes: add Holybro S500 Kit which was tested at dev summit 2019-06-24 18:26:27 +02:00
Daniel Agar d96c97ed48 Update submodule jMAVSim to latest Sat Jun 22 12:37:52 UTC 2019 (#12316)
- jMAVSim in PX4/Firmware (fb8630c267): https://github.com/PX4/jMAVSim/commit/883413f8b97cc53d48491d6ff3630d6efd2e2467
    - jMAVSim current upstream: https://github.com/PX4/jMAVSim/commit/def7501bc0536b8d1050f65d09c7dfbebcc0ce61
    - Changes: https://github.com/PX4/jMAVSim/compare/883413f8b97cc53d48491d6ff3630d6efd2e2467...def7501bc0536b8d1050f65d09c7dfbebcc0ce61

    def7501 2019-06-18 romain-chiap - SIH support: add display-only mode for simulation-in-hardware (#101)
2019-06-22 15:42:08 +02:00
Ildar Sadykov fb8630c267 Adding VTOL Octoplane airframe type (#12303)
* Srcparser updated, default script for VTOL octoplane added.
2019-06-22 14:13:29 +02:00
Beat Küng 64ac8c18d2 mc airframes: increase I gains a bit
Previous commit allows to increase them again.
Partially reverts commit 6c3e79f361.
2019-06-22 13:23:19 +02:00
Beat Küng ea31f34d09 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-22 13:23:19 +02:00
JaeyoungLim 4c4bcc5fdb Mavlink: Fill in thrust field correctly for offboard rates setpoints on fixed wing (#12311)
* Fill in thrust field for rates sp
2019-06-20 17:17:32 +02:00
PX4 Build Bot 4831a4b0cf Update submodule ecl to latest Tue Jun 18 20:37:33 EDT 2019
- ecl in PX4/Firmware (4673dd0a0c9b90fcab84a26e75812a5c7172d1af): https://github.com/PX4/ecl/commit/0f49eb34a08e499a26d749ed981429047f2100ff
    - ecl current upstream: https://github.com/PX4/ecl/commit/a036cf82cc92ef6572ea7ee960cfff4d305c01fa
    - Changes: https://github.com/PX4/ecl/compare/0f49eb34a08e499a26d749ed981429047f2100ff...a036cf82cc92ef6572ea7ee960cfff4d305c01fa

    a036cf8 2019-06-14 Paul Riseborough - EKF: Remove use of of quaternion self product operator and fix delta rotation sign
0e946f2 2019-06-14 Paul Riseborough - EKF: Remove use of quaternion self product operator and fix delta rotation sign error
ad7f7af 2019-05-21 CarlOlsson - ekf: correct quaternion multiplication order
d6351bd 2019-05-21 CarlOlsson - EKF: update comment
7612fa4 2019-05-30 Paul Riseborough - EKF: Don't start using GPS for height until all validity checks have passed
cef2ba5 2019-05-08 Roman - implemented Kahan summation algorithm for adding process noise to delta angle- and delta velocity bias variance
2019-06-19 11:38:49 +10:00
SalimTerryLi e0f3fc8d00 Mavlink receiver SET_ATTITUDE_TARGET fill the correct throttle field by checking its frametype in offboard mode (#12149) 2019-06-18 02:06:41 +02:00
Julian Oes 46c00ca6a4 vscode: add PX4_SIM_SPEED_FACTOR
This env variable can be changed to adapt the simulation speed.
2019-06-18 01:56:49 +02:00
Julian Oes 1cee945a22 vscode: use lockstep
This changes the VSCode debugging to use lockstep. For lockstep, the
rate needs to be 250 Hz.
2019-06-18 01:56:49 +02:00
Julian Oes e1671571c8 jMAVSim: use PX4_SIM_SPEED_FACTOR, not cli arg
In order to be consistent between Gazebo and jMAVSim we should be using
the env variable PX4_SIM_SPEED_FACTOR in the same way. This enables
vscode to set the speed using the env variable.
2019-06-18 01:56:49 +02:00
Julian Oes fea284f728 vscode: start gzclient GUI for Gazebo simulation 2019-06-18 01:55:21 +02:00
alessandro 2deab6c607 commander: refactored state-machine strings
- Follow-up changes to https://github.com/PX4/Firmware/pull/11796
2019-06-17 20:09:05 +02:00
Daniel Agar 136962d125 uORB Subscription callbacks with WorkItem scheduling on publication (#12207) 2019-06-17 16:26:06 +02:00
Beat Küng beaba44e5b mc mixer: prioritize roll/pitch over yaw for full airmode
Improves roll/pitch tracking in situations of large yaw demands.
2019-06-17 13:17:18 +02:00
mcsauder 8811c8315c Modify the update_params() comment to better reflect what is taking place in mavlink_receiver.h. 2019-06-17 09:41:30 +02:00
mcsauder 742c22d099 Rename _param_sub to _param_update_sub and initialize. Re-define and re-implement the update_params() method and only call if parameters have been updated. 2019-06-17 09:41:30 +02:00
mcsauder c92b8b03cd Move variable initialization from constructor to declarations in MavlinkReceiver class, alphabetize var lists. Added update_params() method to ensure that parameters subscribed to are updated routinely. 2019-06-17 09:41:30 +02:00
Patrick Brünn b402c9697d hardfault_log: fix NULL terminator truncation
building "make omnibus_f4sd_default" with gcc 8.2.1 failes with:
hardfault_log.c:315:7: error: 'strncat' specified bound 30 equals destination size

gcc8 introduced -Wstringop-truncation, which will warn about NULL terminator
truncation.

This patch fixes two similar issues:
- strncpy() makes no sense if we want to copy without NULL terminator
- strncat() needs space to append the NULL terminator

fixes #12283
2019-06-17 08:15:34 +02:00
Daniel Agar 7c4bf6ddae Mavlink ODOMETRY (331) support MAV_FRAME_BODY_FLU 2019-06-16 13:23:57 -04:00
Daniel Agar 09e09863b5 Update submodule mavlink v2.0 to latest Sun Jun 16 00:37:57 UTC 2019
- mavlink v2.0 in PX4/Firmware (067eb41d23252cbc5725f98e63ea56a2951da317): https://github.com/mavlink/c_library_v2/commit/70c1b4ef2db3244df23196bf2e47e369e2e8b78a
    - mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/18cf6ff2fc0e51e4555b19fc31e8b06eb38bdd79
    - Changes: https://github.com/mavlink/c_library_v2/compare/70c1b4ef2db3244df23196bf2e47e369e2e8b78a...18cf6ff2fc0e51e4555b19fc31e8b06eb38bdd79
2019-06-15 23:22:45 -04:00
Daniel Agar 115b8f83ef Update submodule sitl_gazebo to latest Sun Jun 16 00:37:52 UTC 2019
- sitl_gazebo in PX4/Firmware (648e7de249): https://github.com/PX4/sitl_gazebo/commit/f2593dbcc2980dd15714925931fbb0e46a63a4b2
    - sitl_gazebo current upstream: https://github.com/PX4/sitl_gazebo/commit/95adbb11f8deef06fb132bf0eb85c19e6ca00f6e
    - Changes: https://github.com/PX4/sitl_gazebo/compare/f2593dbcc2980dd15714925931fbb0e46a63a4b2...95adbb11f8deef06fb132bf0eb85c19e6ca00f6e

    95adbb1 2019-06-08 David Jablonski - fix gstreamer package finding for ubuntu
2019-06-15 23:21:12 -04:00
Mark Sauder f1c66749e3 vl53lxx: migrate variable initialization from constructor list to declaration uniform initialization (#11896)
* Format whitespace
 * Alphabetize/group/order variables and methods.
 * Deprecate IOCTL usage and simplify a few methods.
2019-06-15 23:18:46 -04:00
David Sidrane f96c47ae1b stm32f7 bootloader update support (#11394)
* micro_hal: F7 add flash
* micro_hal: F7 non up_progmem functions
* bl_update: Add F7 Support
2019-06-15 21:46:46 -04:00
JaeyoungLim d7d0bd2764 Mavlink: Enable gimbal control using SET_ACTUATOR_CONTROL_TARGET while controlling the vehicle offboard (#12146)
* Stop ignoring setpoints when actuator setpoints are for the gimbal
2019-06-15 21:35:41 -04:00
Daniel Agar 106ee280c5 land_detector initiate cycle immediately
- fixes #12190
2019-06-15 21:30:09 -04:00
Kabir Mohammed ce784d1ef0 Sensordots Mappydot+ driver (#12147)
* Add MappyDot+ driver capable of utilizing multiple sensors on a single i2c bus.
2019-06-15 21:13:51 -04:00
Mark Sauder eaa3d4a24f tfmini: migrate driver class member variable initialization to declarations (#11893)
* format whitespace
 * alphabetize/group/order var/method declarations 
 * added a default port to start the tfmini driver without requiring arguments.
2019-06-15 21:01:36 -04:00
Daniel Agar 4e360064d9 commander refactor and cleanup offboard control mode 2019-06-15 20:45:26 -04:00
Daniel Agar 648e7de249 drivers/px4io move to uORB::Subscription 2019-06-15 20:14:10 -04:00
Daniel Agar 1657b5030a wind_estimator always copy attitude and local position data 2019-06-15 19:42:48 -04:00
Daniel Agar a175c4407d Jenkins add rover SITL test 2019-06-15 17:55:44 -04:00
Daniel Agar e7add33c12 Jenkins HIL print fmu status and pwm info 2019-06-15 16:59:04 -04:00
Daniel Agar 5f20d3cf3b Jenkins HIL increase boot timeout for stackcheck build
- px4_fmu-v5_stackcheck remove extra drivers (to try and get the system
usuable)
2019-06-15 16:59:04 -04:00
Daniel Agar e6799e90ad Jenkins HIL disable buzzer and remove redundant px4_fmu-v5 test 2019-06-15 15:06:02 -04:00
Daniel Agar 81c914a092 Jenkins HIL test run various commands to inspect system 2019-06-15 14:29:00 -04:00
Daniel Agar d30e30a2a6 Jenkins HIL run more tests 2019-06-15 11:31:01 -04:00
Daniel Agar 4910bed45b mavlink send_statustext_critical() remove redundant print 2019-06-15 10:14:41 -04:00
Daniel Agar 8e0e846e6e Jenkins hardware target different V5 variants 2019-06-14 14:48:44 -04:00
David Sidrane 6eb4cf0ceb Add CUAV 5+ and Nano to fmu-v5 manifest
* rcS: Set SYS_USE_IO for Nano
2019-06-14 13:19:41 -04:00
Daniel Agar bf08b60b8f vscode launch.json add nxp_fmuk66-v3 2019-06-14 11:35:12 -04:00
Daniel Agar 5e058ae290 vscode launch.json add black magic probe debug config 2019-06-14 10:31:42 -04:00
Daniel Agar fe2dff649c vscode launch.json (debug configurations) cleanup naming and sort list 2019-06-14 10:31:42 -04:00
Matthias Grob 146a3866c0 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-14 06:54:10 -07:00
Daniel Agar 61512f063a vscode debug linux vs osx handle external console properly 2019-06-14 08:27:37 -04:00
Daniel Agar fd18a6c0e6 vscode improve fmu-v2/v3/v4/v4pro/v5 debug targets 2019-06-14 08:27:37 -04:00
bresch 83d90410ff Jerk-limited auto mode - use MPC_ACC_HOR instead of MPC_ACC_HOR_MAX
as written in the parameter desctiption
2019-06-14 09:56:56 +02:00
Daniel Agar a4a130fe53 tests free test containers in IntrusiveQueue and List 2019-06-13 10:47:27 -04:00
Daniel Agar aee8f13289 List fix remove() and update testing 2019-06-13 10:47:27 -04:00
Daniel Agar 1623de8bd0 IntrusiveQueue add remove method, iterators, and update test 2019-06-13 10:47:27 -04:00
Timothy Scott 327354705b Fixed filename 2019-06-13 10:04:26 +02:00
Timothy Scott c4bb6b53e8 Changed soft stop check 2019-06-13 10:04:26 +02:00
Timothy Scott 21760a5856 Changed constant name to UNMANNED_GROUND_VEHICLE 2019-06-13 10:04:26 +02:00
Timothy Scott 714c90b9db Updated code style to fix confusing if conditions 2019-06-13 10:04:26 +02:00
Timothy Scott a134da6e12 Removed is_rotor_wing, replaced with vehicle_type 2019-06-13 10:04:26 +02:00
Timothy Scott 2ca40bfc65 Changed navigator to properly separate xy and z distance to waypoint 2019-06-13 10:04:26 +02:00
Daniel Agar 6816f2a4ce commander force offboard control update when first entering mode
- fixes #12241
2019-06-12 20:25:05 -04:00
Matthias Grob 048cca7bc4 vtol_att_control: apply multicopter takeoff hotfix also for vtol (#12250)
Please see reference:
https://github.com/PX4/Firmware/issues/12171
2019-06-12 13:59:29 -04:00
Mark Sauder ae6fed4f29 Migrate remaining variable initializations from constructor list to declarations in mavlink_main.cpp/h. 2019-06-12 12:53:09 -04:00
Martina Rivizzigno 7a586d2b60 ObstacleAvoidance: hysteresis on failsafe 2019-06-12 16:42:02 +02:00
Daniel Agar 79d4c09d59 uORB::Publication simplify and cleanup
- base class is now template
 - drop linked list
 - virtualization no longer required
2019-06-12 08:48:19 -04:00
PX4 Build Bot 57fc6eb4b8 Update submodule devices to latest Tue Jun 11 20:38:48 EDT 2019
- devices in PX4/Firmware (96e8e25a85a334872f2e46786d7c2f546ed846df): https://github.com/PX4/GpsDrivers/commit/a4999f111d13bcb209754823a3c503fa659a0d15
    - devices current upstream: https://github.com/PX4/GpsDrivers/commit/69e38ecc846df03f0bb71aa136bcc830dd3316a9
    - Changes: https://github.com/PX4/GpsDrivers/compare/a4999f111d13bcb209754823a3c503fa659a0d15...69e38ecc846df03f0bb71aa136bcc830dd3316a9

    69e38ec 2019-06-06 Andreas Antener - sbf: report vertical velocity DOWN (converted from UP)
c803bad 2019-06-05 Andreas Daniel Antener - SBF Updates (#43)
2019-06-12 08:01:31 +02:00
Bharat Tak 1ebf5d04d9 logger: add Ulog sync bytes at 1Hz and tagged log message definition (#12144) 2019-06-11 11:00:54 +02:00
PX4 Build Bot 736a1c4778 Update submodule ecl to latest Mon Jun 10 12:38:13 UTC 2019
- ecl in PX4/Firmware (e80050ce8c261e9b5c1cf7e1e8c62f32db08099f): https://github.com/PX4/ecl/commit/54ac147ae8930f1c280a0bd5c25fa90eaf4c6e0d
    - ecl current upstream: https://github.com/PX4/ecl/commit/0f49eb34a08e499a26d749ed981429047f2100ff
    - Changes: https://github.com/PX4/ecl/compare/54ac147ae8930f1c280a0bd5c25fa90eaf4c6e0d...0f49eb34a08e499a26d749ed981429047f2100ff

    0f49eb3 2019-05-24 RomanBapst - fixed method which calculates validity of terrain estimate
cd34ab8 2019-05-24 Daniel Agar - mathlib delete floorf in favor of math.h
340d85a 2019-05-27 Robert de Vries - EKF: fix variable names in estimator_interface.h
90b4c7c 2019-05-24 Matthias Grob - mathlib: fix floorf indentation
710c529 2019-05-23 Sebastian Verling - fixed calculation of magentic table values by using floor instead of int casting
2019-06-10 10:42:37 -07:00
Daniel Agar 32a89a1834 rename empy templates (*.template) to proper file extension (.em) 2019-06-10 10:42:00 -07:00
Daniel Agar bef7a9ba8e NuttX boards increase task limit 32 -> 64 (#12230) 2019-06-10 09:42:36 -04:00
Daniel Agar 070df61daf Update submodule mavlink v2.0 to latest Mon Jun 10 12:37:58 UTC 2019 (#12232)
- mavlink v2.0 in PX4/Firmware (b69bf26721b61a8dd026e3c28b201a5baa72d2df): https://github.com/mavlink/c_library_v2/commit/60df2613725c21f3eedc51251285f80a22e7d07d
    - mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/70c1b4ef2db3244df23196bf2e47e369e2e8b78a
    - Changes: https://github.com/mavlink/c_library_v2/compare/60df2613725c21f3eedc51251285f80a22e7d07d...70c1b4ef2db3244df23196bf2e47e369e2e8b78a
2019-06-10 09:10:49 -04:00
Daniel Agar 9db4d87587 Update submodule sitl_gazebo to latest Mon Jun 10 12:37:51 UTC 2019
- sitl_gazebo in PX4/Firmware (b0176dc88a): https://github.com/PX4/sitl_gazebo/commit/a0b0eb8df12b11e8f63d3cc766dee97cefa32ab7
    - sitl_gazebo current upstream: https://github.com/PX4/sitl_gazebo/commit/af00ac4dfc5cfb25140254c5cae2a225944fc1c1
    - Changes: https://github.com/PX4/sitl_gazebo/compare/a0b0eb8df12b11e8f63d3cc766dee97cefa32ab7...af00ac4dfc5cfb25140254c5cae2a225944fc1c1

af00ac4 2019-06-07 Lukas Woodtli - Add support for unit tests on macOS
3a81838 2019-06-04 Lukas Woodtli - Add support to build and run unit tests with catkin
c59d214 2019-05-11 Lukas Woodtli - Add unit tests for gps plugin
860e1ce 2018-09-20 Lukas Woodtli - Add unit tests for gimbal controller plugin
2019-06-10 09:09:49 -04:00
BazookaJoe1900 b0176dc88a Pr cleanup board files (#12218)
Clear non exist functions definitions
Added RC Serial note before its relevant definitions
2019-06-08 15:48:53 -07:00
Daniel Agar 8a0beb83db templates/module move print_usage() to bottom of file 2019-06-08 03:23:50 -07:00
Daniel Agar 910e938943 tune_control move usage() to bottom of file 2019-06-08 03:23:50 -07:00
Daniel Agar cfa58dfc36 led_control move usage() to bottom of file 2019-06-08 03:23:50 -07:00
Daniel Agar c223de8a50 vmount move usage() to bottom of file and format 2019-06-08 03:23:50 -07:00
Daniel Agar 933dd1357e navigator move print_usage() to bottom of file 2019-06-08 03:23:50 -07:00
Daniel Agar d9c5fb0500 mc_att_control move print_usage() to bottom of file and format 2019-06-08 03:23:50 -07:00
Daniel Agar 97c2dba2fa logger move print_usage() to bottom of file and format 2019-06-08 03:23:50 -07:00
Daniel Agar e428829b84 drivers/heater move print_usage() to bottom of file and format" 2019-06-08 03:23:50 -07:00
Daniel Agar 6c495bc4a3 leddar_one move help to bottom and format 2019-06-08 03:23:50 -07:00
Daniel Agar 63d582464e mc_pos_control move print_usage() to bottom of file and format 2019-06-08 03:23:50 -07:00
Julian Oes d2c824c534 gpssim: don't advertize uninitialized data
According to valgrind uninitialized bytes were being advertized.
2019-06-07 17:10:35 -04:00
Daniel Agar 90bf26b239 CollisionPrevention move orb subscriptions to uORB::Subscription 2019-06-07 09:22:35 -04:00
Daniel Agar 5669df4ca4 mc_pos_control move orb subscriptions to new uORB::Subscription 2019-06-07 09:22:35 -04:00
Daniel Agar be02ad3514 fw_att_control move orb subscriptions to uORB::Subscription 2019-06-06 20:02:02 -04:00
Daniel Agar 4bef573497 fw_pos_control_l1 move to new uORB::Subscription 2019-06-06 20:00:02 -04:00
Daniel Agar 528d2f61a0 sensors partially move to new uORB::Subscription 2019-06-06 19:07:17 -04:00
Daniel Agar 55c9786157 PX4Magnetometer implement MAGIOCGSCALE (copy out scale)
- fixes #12193
2019-06-06 14:10:13 -04:00
Beat Küng ab0466eddf omnibus: enable dmesg buffer (3kb)
without LPE running, we have about 17.6 kb more free RAM.
2019-06-06 11:11:44 -04:00
Beat Küng 223e3c6429 aerofc rc.board_defaults: remove wrong parameter settings
This was a regression.
2019-06-06 11:11:44 -04:00
Beat Küng 73102dc3c4 SYS_MC_EST_GROUP: add q estimator only option and activate on omnibus 2019-06-06 11:11:44 -04:00
Beat Küng 1321f96b59 omnibus rc.board_defaults: remove flash-based params transition logic 2019-06-06 11:11:44 -04:00
Beat Küng 5c715978e8 param compare/greater: do not print 'parameter not found' message
Reduces clutter in the boot output (now that we have it in the log).
On omnibus for example we see:
ERROR [param] Parameter SENS_EN_BATT not found
ERROR [param] Parameter SENS_EN_LL40LS not found
ERROR [param] Parameter SENS_EN_LL40LS not found
ERROR [param] Parameter SENS_EN_MB12XX not found
ERROR [param] Parameter SENS_EN_PGA460 not found
ERROR [param] Parameter SENS_EN_SF1XX not found
ERROR [param] Parameter SENS_EN_TRANGER not found
2019-06-06 09:16:49 -04:00
Julian Kent 0553d4d01e Fix px_uploader.py to work in 16.04 with Python 2.7.
Before, the pyserial check would fail before it could check for the
VERSION that the Python 2.7 version contains. This fixes it to check
for the VERSION independently.
2019-06-06 09:13:54 -04:00
Tanja Baumann fcec3b3efc px4_fmu-v4: increase uart buffer sizes for vision algorithms (#12199) 2019-06-06 09:01:42 -04:00
Daniel Agar 3796dda209 ekf2 move most orb subscriptions to uORB::Subscription 2019-06-06 08:22:15 +02:00
Daniel Agar cecd009ddc mc_att_control: fix vehicle_rates_setpoint_poll() error due to merge timing 2019-06-05 21:18:02 -04:00
Daniel Agar ca5651bd8b heater move to new WQ and uORB::Subscription 2019-06-05 20:38:42 -04:00
Daniel Agar 4c42cac380 mc_att_control move most orb subscriptions to uORB::Subscription 2019-06-05 20:37:47 -04:00
Daniel Agar c0e735c88a vtol_att_control move to new uORB::Subscription 2019-06-05 20:33:20 -04:00
Daniel Agar 71d58c9278 wind_estimator move to new WQ (lp_default) and uORB::Subscription 2019-06-05 20:31:16 -04:00
Daniel Agar e4ad994763 navigator move to new uORB::Subscription 2019-06-05 20:28:44 -04:00
David Sidrane 79eb74be3f Fix bmp280 on FMUv4 2019-06-05 15:43:53 -04:00
Daniel Agar 9d726cb0c4 bmi160 move to PX4Accelerometer and PX4Gyroscope and cleanup (#12128) 2019-06-05 11:25:18 -07:00
bresch ac4458460d FailureDetector - update hysteresis to comply with new interface 2019-06-05 16:53:08 +02:00
bresch 57c2085ce4 IO driver - Recover flight termination state from IO after FMU reboot in air 2019-06-05 16:53:08 +02:00
bresch c75f71abc2 IO failsafe - apply failsafe values to outputs when in failsafe.
This is required because otherwise, IO would output disarmed values if
FMU goes into a disarmed state.
2019-06-05 16:53:08 +02:00
bresch 96da46d1aa Failsafe - cosmetic changes 2019-06-05 16:53:08 +02:00
bresch 776b1a28de IO mixer - cleanup FMU timeout check (comments and indentation) 2019-06-05 16:53:08 +02:00
bresch c576c57d7b protocol.h - comment style update 2019-06-05 16:53:08 +02:00
bresch 4b8febf558 Flight termination IO - reword flight termination flag description 2019-06-05 16:53:08 +02:00
bresch 158463d0a0 Flight termination - Rename "flightterm" variables and defines to "flighttermination". 2019-06-05 16:53:08 +02:00
bresch 5becc24a1f Failure detector - in failure detector preflight check, get
vehicle_status as const type. Also use FAILURE_NONE enum to check for a
failure
2019-06-05 16:53:08 +02:00
bresch 33a94c8191 Failure detector - change snake_case function names to camelCase 2019-06-05 16:53:08 +02:00
bresch ee1f8f457b px4io - rename safety_param_val to circuit_breaker_io_enabled and change its type to bool since circuit_breaker_enabled returns a boolean 2019-06-05 16:53:08 +02:00
bresch 03ad4ffd47 FailureDetector - Add is_failure() function to simplify the interface; the user does not need to check the bitmask 2019-06-05 16:53:08 +02:00
bresch d3c9436f84 flight termination - rename in_flight_termination to flight_termination_triggered 2019-06-05 16:53:08 +02:00
bresch e8705f08c4 quad_x_main - rename parachute output to failsafe output 2019-06-05 16:53:08 +02:00
bresch 4eaf6e77be Flight termination - Always send flag to IO without checking the circuit breaker. The circuit breaker is used inside IO to decide if it has to go into failsafe if FMU dies and also controls is the FailureDetector sets the force_failsafe flag. The other sources of flight termination (rc loss, geo fence, ...) are not disabled by the circuit breaker 2019-06-05 16:53:08 +02:00
bresch 59265f6663 Failure detector - Add flight termination comments, make format 2019-06-05 16:53:08 +02:00
bresch 0655f7603b FailureDetector - Increase min value of FD_FAIL_P/R to 60 degrees 2019-06-05 16:53:08 +02:00
bresch d19614a94f MC Lnd detector - Remove double include 2019-06-05 16:53:08 +02:00
bresch 38345be41a FailureDetector - Add roll and pitch failures hysteresis 2019-06-05 16:53:08 +02:00
bresch a72de95c94 Failure detector - Disable flight termination by default. Modify FD_FAIL parameters description 2019-06-05 16:53:08 +02:00
bresch 81bb7888de Failure Detector - Add Failure Detector check to preflight checks 2019-06-05 16:53:08 +02:00
bresch c73875cbf8 quad x mixer - Add null mixer for parachute triggering 2019-06-05 16:53:08 +02:00
bresch 34fca5a552 PWM - Remove unused MIXERADDSIMPLE 2019-06-05 16:53:08 +02:00
bresch 7b531bcaef Failure Detector - Play TONE_PARACHUTE_RELEASE_TUNE when force failsafe is set 2019-06-05 16:53:08 +02:00
bresch d655c33faa IO mixer - Change default mixer to DISARMED and allow to set outputs to failsafe if FMU does not respond and if flight termination circuit breaker is not set 2019-06-05 16:53:08 +02:00
bresch 6fb1b4886c IO - Send flight termination circuit breaker state to IO through PX4IO_P_SETUP_ENABLE_FLIGHTTERM 2019-06-05 16:53:08 +02:00
bresch 796631db20 PX4IO driver - use "curcuit_breaker_enabled" function instead of manually checking its value 2019-06-05 16:53:08 +02:00
bresch 19bf080313 PX4ioFirmware - Clean should_arm, should_arm_nothrottle and should_always_enable_pwm indentation for better understanding 2019-06-05 16:53:08 +02:00
bresch ba93f9b983 FailureDetector - Update failure detector logic in commander. 2019-06-05 16:53:08 +02:00
bresch 664fff4a24 Px4io Driver - Remove unimplemented prototype 2019-06-05 16:53:08 +02:00
bresch b64a2a884b Circuit Breaker - Disable flight termination circuit breaker by default (reverts ab40008) -> Allow flight termination 2019-06-05 16:53:08 +02:00
bresch 50d75dc7a6 IOFirmware - Properly clear the alarm flags 2019-06-05 16:53:08 +02:00
Thomas Gubler cf15cef066 Param "User Flight Profile" : improve documentation 2019-06-05 06:45:43 -07:00
Thomas Gubler d8a4d70fce Add Param "User Flight Profile"
This param has no effect within the Firmware.

The param can be used for example:

* in log post processing to have context about the flight
* in ground stations to adapt the UI automatically
2019-06-05 06:45:43 -07:00
Daniel Agar 1d5684823d disable -fassociative-math (within -funsafe-math-optimizations) 2019-06-05 14:54:29 +02:00
Julian Oes e7d0cabb52 logger: fix uninitialized member variable
This was reported by Coverity Scan.
2019-06-05 14:46:03 +02:00
bresch d5298fccbd PWM_REV - Clarify use case. The user shoul not be tempted to use that
parameter to reverse the direction of a rotor.
2019-06-05 09:10:06 +02:00
Daniel Agar f2b4480e6b GPS driver update to uORB::Subscription 2019-06-05 08:18:02 +02:00
Julian Oes bece63866d platforms: remove px4_backtrace 2019-06-05 08:16:19 +02:00
Julian Oes 35074aaffd posix: remove segfault handler
I could not get a core dump without removing the segfault handler, hence
this change.
2019-06-05 08:16:19 +02:00
Julian Oes f3620f7018 Remove all leftover PX4_BACKTRACE calls 2019-06-05 08:16:19 +02:00
Julian Oes 5273e2af04 Tools: remove decode_backtrace.py
This hasn't been used in a while and didn't quite work with the
backtraces produced anyway.
2019-06-05 08:16:19 +02:00
Daniel Agar a1b96ba3a5 mpu9250 delete unused perf counters 2019-06-04 20:31:47 -04:00
Daniel Agar 26e041c43c WQ increase stacks from 1200 to 1250 bytes 2019-06-04 20:24:51 -04:00
Daniel Agar 574f7e9f00 batt_smbus move to new WQ 2019-06-04 19:54:06 -04:00
Daniel Agar 3faab909d7 commander move most orb subscriptions to uORB::Subscription 2019-06-04 18:44:51 -04:00
Daniel Agar 777b615cf9 land_detector move to PX4 WQ hp_default 2019-06-04 18:10:21 -04:00
Daniel Agar 53aa4130a8 land_detector move orb subscriptions to uORB::Subscription 2019-06-04 18:10:21 -04:00
baumanta 2320088541 use position controller parameters for limitation instead of acceleration/jerk 2019-06-04 16:47:33 +02:00
baumanta c497d94616 publish a minimal message for logging/debugging 2019-06-04 16:47:33 +02:00
baumanta 09e1d4888c use velocity component in bin direction instead of norm 2019-06-04 16:47:33 +02:00
baumanta 33cd032c35 camelcase function name, initialize c++11 style 2019-06-04 16:47:33 +02:00
baumanta e7d17cc265 consider acceleration ramp-up time 2019-06-04 16:47:33 +02:00
baumanta ab792093e1 fix wrong if clause 2019-06-04 16:47:33 +02:00
baumanta 23c23e3aa5 clean up 2019-06-04 16:47:33 +02:00
baumanta f50a1d58b0 bugfixes and cleanup 2019-06-04 16:47:33 +02:00
baumanta 4212ae8b87 sign bug fix and clean up 2019-06-04 16:47:33 +02:00
baumanta 60befdce5b change collision prevention algorithm 2019-06-04 16:47:33 +02:00
baumanta 8427cd3051 constant acceleration breaking for collision prevention 2019-06-04 16:47:33 +02:00
Julian Oes 6f9598c76a topic_listener: document how to exit
This was left out when the feature was added.
2019-06-04 09:24:00 -04:00
Daniel Agar ceac68e69d uORB remove unused SubscriptionInterval and SubscriptionIntervalData 2019-06-04 09:17:34 -04:00
Beat Küng d68dcb9cf7 log_writer_file: increase stack size by 20 bytes
Seems to be due to the console buffer.
2019-06-04 11:57:54 +02:00
Beat Küng 0d71eeccbf console buffer: write to log as 'boot_console_output' message 2019-06-04 11:57:54 +02:00
Beat Küng 08b8ee4831 replace fprintf(stderr with PX4_{INFO/WARN} 2019-06-04 11:57:54 +02:00
Beat Küng d947818654 console: add simple dmesg functionality (enable only on v5) 2019-06-04 11:57:54 +02:00
bresch 2307c7c390 Geofence - Rename _warning_action_on to _geofence_warning_action_on
since it is only set by the geofence logic. Simplify conditions in IF
statements.
2019-06-04 08:35:56 +02:00
bresch f8f967f073 Geofence - Change from "re-engage geofence failsafe every 10s when
outside the fence" to "engage geofence failsafe on transition". This
way, the pilot is not stucked in the non flight zone and can switch to
a manual mode and fly back or trigger RTL.
2019-06-04 08:35:56 +02:00
bresch 427b2e6636 Geofence - Do not trigger geofence failsafe while in low battery
failsafe action.
Also move geofence flags from static variables declared into the if
statement to private members of the class.
2019-06-04 08:35:56 +02:00
pedro-roque a707403eaf mc_att_ctrl: added yawrate control from offboard.
This commit adds Roll Pitch Yawrate Thrust (RPYrT) setpoint control to the
PX4 stack, enabling the UAV to follow specific yawrates sent from
offboard. It also introduces individual body_rate flags, along the
lines of mavros.

Tested on a MoCap enabled flight arena in KTH Royal Institute of
Technology, Stockholm. The MAV receives RPYrT setpoints from an
external PID controller to stabilize around position setpoints.
The UAV is also externally disturbed to assess the stability to
external unmodeled events.

Fixed Kabir comments.

Removed deprecated ignore_bodyrate.

Fixed integration test.
2019-06-04 08:26:09 +02:00
Matthias Grob ac002db25c MAVLink/Commander: @Pedro-Roque's offboard yawrate handling 2019-06-04 08:26:09 +02:00
Daniel Agar 579cbbb42c mavlink move to new lightweight uORB::Subscription 2019-06-03 17:06:21 -04:00
Daniel Agar 2c63e335e9 uORB::Subscription subscribe directly to uORB device node object 2019-06-03 17:06:21 -04:00
Daniel Agar 2d1c60bc85 SITL offboard ATT test reduce Z boundary requirement
- fixes #12155
2019-06-03 12:31:12 -04:00
rfauvet 755eccbe60 simulator: fixing missing declaration
The "len" variable was not defined and gave me an error, declaring it as "int" fixed it
2019-06-03 10:02:36 -04:00
mcsauder 8966ad59c7 Add distance sensor id to the the MavlinkStreamDistanceSensor class and format whitespace in mavlink_messages.cpp. 2019-06-01 14:23:49 -04:00
Daniel Agar 32fb2bae8c InvenSense MPU9250 move to PX4Accelerometer and PX4Gyroscope helpers 2019-05-31 21:43:30 -04:00
Daniel Agar cd45d8fc68 fxas21002c split out main and header 2019-05-31 18:20:32 -04:00
Daniel Agar b57dff8594 fxas21002c move to PX4Gyroscope and cleanup 2019-05-31 18:20:32 -04:00
Daniel Agar c8ea198a78 uavcan cmake FATAL_ERROR if platform isn't set
- this indicates a build system error
2019-05-31 12:20:50 -04:00
Daniel Agar 43e3fc707d simulator move to PX4Accelerometer, PX4Gyroscope, PX4Magnetometer, PX4Barometer helpers (#12081) 2019-05-30 21:07:26 -04:00
Daniel Agar 4a4d323a97 Update submodule mavlink v2.0 to latest Thu May 30 13:05:26 UTC 2019 (#12127)
- mavlink v2.0 in PX4/Firmware (a10b1afb54): https://github.com/mavlink/c_library_v2/commit/4b80386684d6823d43a87c53b28dc62570bfd42b
    - mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/60df2613725c21f3eedc51251285f80a22e7d07d
    - Changes: https://github.com/mavlink/c_library_v2/compare/4b80386684d6823d43a87c53b28dc62570bfd42b...60df2613725c21f3eedc51251285f80a22e7d07d
2019-05-30 21:01:47 -04:00
Daniel Agar f85c15e247 board common create generic dma allocator (from fat_dma_alloc) 2019-05-30 19:31:40 -04:00
Daniel Agar bf12583d80 fw_pos_control_l1 replace FW_LND_THRTC_SC param description < character
- fixes #12124
2019-05-30 18:03:03 -04:00
Daniel Agar e4926373e6 INA226 move to new WQ and cleanup 2019-05-30 10:22:15 -07:00
Daniel Agar a10b1afb54 vtol_att_control vtol_type enum -> enum class 2019-05-30 09:04:08 -04:00
bresch d13dfdcd24 AutoLineSmoothVel - Remove duplicate of _yaw_sp_prev update. This is done in the Auto FlightTask, _limit_yaw_rate 2019-05-30 11:14:44 +02:00
bresch a7cf981c8c AutoLineSmoothVel - Reduce jerk if acceleration, velocity and desired velocity are small to help the optimizer to converge towards zero 2019-05-30 11:14:44 +02:00
bresch 3499b6ff89 AutoLineSmoothVel - Do not generate heading from trajectory if the velocity vector is smaller than 10cm/s
This is done to avoid generating large yaw changes when the velocity
vector is small; for example when switching into loiter or reaching the
last waypoint.
2019-05-30 11:14:44 +02:00
Daniel Agar 21c791e959 listener exit with ctrl-c, escape, or q 2019-05-30 10:53:06 +02:00
Julian Oes 2ac8841f35 vtol/fw/mc: fix VTOL enum shadowing
This changes the enums used for various VTOL states to enum classes
which makes them type-safe and should avoid shadowing.

This change was motivated by a Clang warning about shadowing of the
enum const TRANSITION_TO_FW which was declared twice, once in
vtol_type.h and once in standard.h.

This change only removes the shadowing but presumably these enums could
be cleaned up and consolidated further.
2019-05-29 23:51:10 -04:00
Daniel Agar 4b3f68f90c cmake and Tools/setup.sh default to python3 2019-05-29 20:48:22 -04:00
Daniel Agar f593e3de9c AK09916 move to new WQ, PX4Magnetometer, and cleanup 2019-05-29 13:59:08 -04:00
Daniel Agar a523e18c13 ST L3GD20 move to PX4Gyroscope helper 2019-05-29 13:56:18 -04:00
Martina Rivizzigno 119ccc4256 ObstacleAvoidance: fix comment 2019-05-29 15:16:33 +02:00
Martina Rivizzigno 61f69ed139 ObstacleAvoidance: use convention for paramter name 2019-05-29 15:16:33 +02:00
Martina Rivizzigno 1e8582974c do not update desired setpoints and waypoints if the oa is disabled 2019-05-29 15:16:33 +02:00
Martina Rivizzigno 0963dc9af1 ObstacleAvoidance: fix bug in requesting update of the mission item.
During takeoff you're always in the condition within xy acceptance radius
and more than altitude radius away from the takeoff waypoint
2019-05-29 15:16:33 +02:00
Martina Rivizzigno 9e8575b71b do not overwrite with obstacle avoidance yaw setpoints if external yaw
handling is enabled
2019-05-29 15:16:33 +02:00
Martina Rivizzigno 44b8b4f79f send velocity setpoint to enable proper takeoff/land 2019-05-29 15:16:33 +02:00
Julian Oes b135503447 wqueue: check before dereferencing
This was found by coverity.
2019-05-29 08:57:46 -04:00
Julian Oes 29915cbc6d BlockingQueue: default initialize _data
This was reported by coverity.
2019-05-29 08:57:46 -04:00
Julian Oes 4d7a1afd92 Revert "Revert "simulator: remove hack for diff_pressure noise""
This reverts commit 2142459027.
2019-05-29 08:56:33 -04:00
Beat Küng ed9d25a75a logger: add arming/disarming via AUX1 RC channel logging mode 2019-05-29 11:41:22 +02:00
Beat Küng 721f9f901f log_writer_file: fix race condition for fast consecutive stop & start calls 2019-05-29 11:41:22 +02:00
Beat Küng 03332aaa20 PX4Accelerometer,PX4Gyroscope: set_sample_rate requires a filter update 2019-05-29 09:15:52 +02:00
Beat Küng 6da78c956e SYS_COMPANION: remove this parameter
It was already deprecated.
2019-05-29 09:15:52 +02:00
Beat Küng 6e2b70cbcd posix: restore original SEGV signal handler upon first entry of our handler
The current SEGV handling on posix is not useful: as soon as our handler
is left, it's triggered again, infinitely.
This patch changes to restore the original handler, so the OS can create
a core dump, etc.
2019-05-29 08:30:52 +02:00
Mohammed Kabir b334b75886 Move optical flow drivers to own subdirectory 2019-05-28 23:23:38 -04:00
Daniel Agar 6627c60e5b load_mon move from NuttX LPWORK to PX4 work queue lp_default 2019-05-28 09:40:36 -04:00
Beat Küng 5d6cc7d033 ekf2: reduce GPS initialization time for SITL from 10s to 0.5s
Speeds up SITL startup.
2019-05-28 10:45:38 +02:00
Daniel Agar f7ff82c754 Bosch BMI055 IMU cleanup
- move to PX4Accelerometer and PX4Gyroscope helpers
2019-05-27 18:03:32 -04:00
Daniel Agar 03924704d5 Jenkins SITL tests temporarily disable tiltrotor 2019-05-27 15:23:08 +02:00
TSC21 bd87bee632 px4_posix.h: add px4_exit() 2019-05-27 15:22:37 +02:00
Matthias Grob 8a84472795 Hysteresis: switch unit test file name to convention 2019-05-27 09:57:50 +02:00
Julian Oes b29e5e3adb hysteresis: remove dependency/side effect on time 2019-05-27 09:57:50 +02:00
Julian Oes 7b9562e3b1 hysteresis: move out of systemlib, move to gtest
This moves the hysteresis test out of the systemlib and makes it its own
small library. Since it still depends on hrt_absolute_time this does not
link yet. My attempt to get all link dependencies together failed.
2019-05-27 09:57:50 +02:00
Daniel Agar b849991494 Update submodule mavlink v2.0 to latest Mon May 27 00:38:40 UTC 2019
- mavlink v2.0 in PX4/Firmware (61367199aca6aa135462db93c8c8063946876ad4): https://github.com/mavlink/c_library_v2/commit/57000134021fb8d5c2c6281e3783ce29bb35bc17
    - mavlink v2.0 current upstream: https://github.com/mavlink/c_library_v2/commit/4b80386684d6823d43a87c53b28dc62570bfd42b
    - Changes: https://github.com/mavlink/c_library_v2/compare/57000134021fb8d5c2c6281e3783ce29bb35bc17...4b80386684d6823d43a87c53b28dc62570bfd42b
2019-05-27 00:13:12 -04:00
Daniel Agar b3505bfbf4 Update submodule sitl_gazebo to latest Mon May 27 00:38:33 UTC 2019
- sitl_gazebo in PX4/Firmware (88127380e7): https://github.com/PX4/sitl_gazebo/commit/3062d287c322fabf1b41b8e33518eb449d4ac6ed
    - sitl_gazebo current upstream: https://github.com/PX4/sitl_gazebo/commit/a0b0eb8df12b11e8f63d3cc766dee97cefa32ab7
    - Changes: https://github.com/PX4/sitl_gazebo/compare/3062d287c322fabf1b41b8e33518eb449d4ac6ed...a0b0eb8df12b11e8f63d3cc766dee97cefa32ab7

 - a0b0eb8 2019-05-10 bazooka joe - Calculate iris inertia from the body colision parameters assuming that the body is homogenic cube. that fixes impossible inertia matrix
 - 113605b 2019-03-27 Elia Tarasov - fix gimbal_controller timestep sign
2019-05-26 23:57:26 -04:00
Daniel Agar 88127380e7 vscode add linker script extension to recommended 2019-05-25 14:21:45 -04:00
Daniel Agar d83a35a503 Update README.md
Co-Authored-By: LorenzMeier <lorenz@px4.io>
2019-05-25 20:08:36 +02:00
Daniel Agar 782d2033c0 Update README.md
Fix link for Roman

Co-Authored-By: LorenzMeier <lorenz@px4.io>
2019-05-25 20:08:36 +02:00
Lorenz Meier c3a58c31d3 Update the README to clarify component ownership
This represents more closely the actual maintenance model.
2019-05-25 20:08:36 +02:00
Beat Küng 800266741b Merge pull request #12063 from PX4/fix_custom_tune
fix tunes: make sure a custom tune gets played
2019-05-25 17:58:44 +02:00
Daniel Agar 9ab9a29a01 astyle don't enforce style in build output 2019-05-25 17:58:19 +02:00
Martina Rivizzigno a18f3e5d45 reset the position lock only if current triplet latitude and longitude
are valid
2019-05-24 21:40:42 +02:00
Daniel Agar c4c3bbbfb0 uORB simplify handling of subscriptions with configured intervals 2019-05-24 14:57:46 -04:00
Daniel Agar 8e6708bdcb qmc5883 move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 5e427b4e46 adis16497 move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 5ebb0d5d96 rpi_rc_in move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar da6210151c tone_alarm move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 8c3821c806 bst move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 525fdc87c7 pmw3901 move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 104b1010bf pca9685 move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 8f1b4f693b rm3100 move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 8176fe1b6e lsm303agr move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar dffaf544ab lis3mdl move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 537c139134 bmm150 move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 78d35f2677 linux_sbus move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 4dd017cd59 rgbled_pwm move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 23f7a662c6 rgbled_ncp5623c move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 6ec7730bf1 rgbled move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 4ac48f154d pca8574 move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar e7f539f29a oreoled move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar d8dd592d20 blinkm move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar cdb207804d irlock move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 835a38f6dc vl53lxx move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 593aaa48ca tfmini move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar eb8fbaf93d teraranger move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar a1f3f2112b srf02 move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 592037851a sf1xx move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar a6bbf0b945 sf0x move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar ce3b5103fc mb12xx move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 22b89034d9 ll40ls move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 4d41dcaee2 leddar_one move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 9a0f145fc0 hc_sr04 move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 6ef42e2c52 cm8jl65 move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar e73dd73ea7 mpl3115a2 move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar b8befe36b9 lps25h move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 9003aeb216 lps22hb move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 1e7c6be839 bmp280 move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar e1bc975065 drivers/differential_pressure move all to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 83d3ead821 ist8310 move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar ec0d1d6f62 lsm303d move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 8b4ecc6947 icm20948 move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar fc7f1ca598 fxos8701cq move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar d4ece2c7bb fxas21002c move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 9fa865d490 bmi160 move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 370f0f73ce bma180 move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar e27a8e1010 bmi055 move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar be3653f761 l3gd20 move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 427c49ac43 adis16477 move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 6113caaa33 adis16448 move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 16b26c1927 mpu6000 move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 70947920b8 hmc5883 move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar 56024cda79 ms5611 move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar ea734f634d mpu9250 move to px4 work queue 2019-05-24 12:58:55 -04:00
Daniel Agar e9ca5d5aba PX4 general work queue 2019-05-24 12:58:55 -04:00
Beat Küng f58079bc5d pxh.cpp: fix invalid reference if words is empty
This can happen for example if 'line' is a space.
2019-05-24 11:06:41 -04:00
Matthias Grob 6eb29fca9d vscode: remove matter of taste tabs customization 2019-05-24 10:06:06 -04:00
1590 changed files with 73350 additions and 59387 deletions
+16 -2
View File
@@ -8,7 +8,7 @@ pipeline {
stage('Build') {
agent {
docker {
image 'px4io/px4-dev-ros-kinetic:2019-03-08'
image 'px4io/px4-dev-ros-melodic:2019-10-24'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
}
}
@@ -61,6 +61,13 @@ pipeline {
vehicle: "iris"
],
[
name: "Rover 1",
test: "mavros_posix_test_mission.test",
mission: "rover_mission_1",
vehicle: "rover"
],
[
name: "VTOL_standard",
test: "mavros_posix_test_mission.test",
@@ -86,6 +93,13 @@ pipeline {
vehicle: "iris_obs_avoid",
run_script: "rostest_avoidance_run.sh"
],
[
name: "MC_safe_landing",
test: "mavros_posix_test_safe_landing.test",
mission: "MC_safe_landing",
vehicle: "iris_obs_avoid",
run_script: "rostest_avoidance_run.sh"
],
]
@@ -116,7 +130,7 @@ def createTestNode(Map test_def) {
return {
node {
cleanWs()
docker.image("px4io/px4-dev-ros-kinetic:2019-03-08").inside('-e HOME=${WORKSPACE}') {
docker.image("px4io/px4-dev-ros-melodic:2019-10-24").inside('-e HOME=${WORKSPACE}') {
stage(test_def.name) {
def run_script = test_def.get('run_script', 'rostest_px4_run.sh')
def test_ok = true
+25 -3
View File
@@ -8,7 +8,7 @@ pipeline {
stage('Build') {
agent {
docker {
image 'px4io/px4-dev-ros-kinetic:2019-03-08'
image 'px4io/px4-dev-ros-melodic:2019-10-24'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
}
}
@@ -61,6 +61,13 @@ pipeline {
vehicle: "iris"
],
[
name: "Rover 1",
test: "mavros_posix_test_mission.test",
mission: "rover_mission_1",
vehicle: "rover"
],
[
name: "VTOL_standard",
test: "mavros_posix_test_mission.test",
@@ -79,6 +86,20 @@ pipeline {
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"
],
[
name: "MC_safe_landing",
test: "mavros_posix_test_safe_landing.test",
mission: "MC_safe_landing",
vehicle: "iris_obs_avoid",
run_script: "rostest_avoidance_run.sh"
],
]
@@ -110,8 +131,9 @@ def createTestNode(Map test_def) {
return {
node {
cleanWs()
docker.image("px4io/px4-dev-ros-kinetic:2019-03-08").inside('-e HOME=${WORKSPACE}') {
docker.image("px4io/px4-dev-ros-melodic:2019-10-24").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')
@@ -120,7 +142,7 @@ def createTestNode(Map test_def) {
// 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)
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
+19 -9
View File
@@ -35,6 +35,13 @@ pipeline {
vehicle: "iris"
],
[
name: "Rover 1",
test: "mavros_posix_test_mission.test",
mission: "rover_mission_1",
vehicle: "rover"
],
[
name: "VTOL_standard",
test: "mavros_posix_test_mission.test",
@@ -47,12 +54,12 @@ pipeline {
mission: "VTOL_mission_1",
vehicle: "tailsitter"
],
[
name: "VTOL_tiltrotor",
test: "mavros_posix_test_mission.test",
mission: "VTOL_mission_1",
vehicle: "tiltrotor"
],
// [
// name: "VTOL_tiltrotor",
// test: "mavros_posix_test_mission.test",
// mission: "VTOL_mission_1",
// vehicle: "tiltrotor"
// ],
]
@@ -72,13 +79,14 @@ pipeline {
stage('code coverage (python)') {
agent {
docker {
image 'px4io/px4-dev-base-bionic:2019-03-08'
image 'px4io/px4-dev-base-bionic:2019-10-24'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps {
sh 'export'
sh 'make distclean'
sh 'git fetch --tags'
sh 'make python_coverage'
withCredentials([string(credentialsId: 'FIRMWARE_CODECOV_TOKEN', variable: 'CODECOV_TOKEN')]) {
sh 'curl -s https://codecov.io/bash | bash -s - -F python'
@@ -91,13 +99,14 @@ pipeline {
stage('unit tests') {
agent {
docker {
image 'px4io/px4-dev-base-bionic:2019-03-08'
image 'px4io/px4-dev-base-bionic:2019-10-24'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps {
sh 'export'
sh 'make distclean'
sh 'git fetch --tags'
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'
@@ -128,7 +137,7 @@ def createTestNode(Map test_def) {
return {
node {
cleanWs()
docker.image("px4io/px4-dev-ros-kinetic:2019-03-08").inside('-e HOME=${WORKSPACE}') {
docker.image("px4io/px4-dev-ros-melodic:2019-10-24").inside('-e HOME=${WORKSPACE}') {
stage(test_def.name) {
def test_ok = true
sh('export')
@@ -138,6 +147,7 @@ def createTestNode(Map test_def) {
// run test
try {
sh('make distclean')
sh 'git fetch --tags'
sh('ccache -z')
sh('make px4_sitl_default')
sh('make px4_sitl_default sitl_gazebo')
+9 -8
View File
@@ -9,11 +9,10 @@ pipeline {
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",
armhf: "px4io/px4-dev-armhf:2019-10-24",
base: "px4io/px4-dev-base-bionic:2019-10-24",
nuttx: "px4io/px4-dev-nuttx:2019-10-24",
rpi: "px4io/px4-dev-raspi:2019-10-24",
snapdragon: "lorenzmeier/px4-dev-snapdragon:2018-09-12"
]
@@ -36,14 +35,16 @@ pipeline {
"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",
"px4_fmu-v5x_default",
"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"],
"holybro_kakutef7", "modalai_fc-v1_default", "mro_ctrl-zero-f7_default", "nxp_fmuk66-v3_default", "omnibus_f4sd_default",
"uvify_core_default"],
image: docker_images.nuttx,
archive: true
]
def nuttx_builds_other = [
target: ["px4_cannode-v1_default", "px4_esc-v1_default", "thiemar_s2740vc-v1_default"],
target: ["px4_esc-v1_default", "thiemar_s2740vc-v1_default"],
image: docker_images.nuttx,
archive: false
]
@@ -81,7 +82,7 @@ pipeline {
// TODO: actually upload artifacts to S3
// stage('S3 Upload') {
// agent {
// docker { image 'px4io/px4-dev-base-bionic:2019-03-08' }
// docker { image 'px4io/px4-dev-base-bionic:2019-10-24' }
// }
// options {
// skipDefaultCheckout()
+3
View File
@@ -18,6 +18,7 @@ pipeline {
steps {
sh 'export'
sh 'make distclean'
sh 'git fetch --tags'
sh 'ccache -z'
sh 'make px4_sitl_default'
sh 'ccache -s'
@@ -39,6 +40,7 @@ pipeline {
steps {
sh 'export'
sh 'make distclean'
sh 'git fetch --tags'
sh 'ccache -z'
sh 'make px4_fmu-v5_default'
sh 'ccache -s'
@@ -60,6 +62,7 @@ pipeline {
steps {
sh 'export'
sh 'make distclean'
sh 'git fetch --tags'
sh 'ccache -z'
sh 'make tests'
sh 'ccache -s'
+690 -95
View File
@@ -11,7 +11,7 @@ pipeline {
stage('px4_fmu-v2_test') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2019-03-08'
image 'px4io/px4-dev-nuttx:2019-10-24'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
@@ -20,10 +20,10 @@ pipeline {
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
sh 'make px4_fmu-v2_default'
sh 'make px4_fmu-v2_test'
sh 'make sizes'
sh 'ccache -s'
stash includes: 'build/px4_fmu-v2_default/px4_fmu-v2_default.elf', name: 'px4_fmu-v2_test'
stash includes: 'build/px4_fmu-v2_test/px4_fmu-v2_test.elf', name: 'px4_fmu-v2_test'
}
post {
always {
@@ -35,7 +35,7 @@ pipeline {
stage('px4_fmu-v3_default') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2019-03-08'
image 'px4io/px4-dev-nuttx:2019-10-24'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
@@ -59,7 +59,7 @@ pipeline {
stage('px4_fmu-v4_default') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2019-03-08'
image 'px4io/px4-dev-nuttx:2019-10-24'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
@@ -83,7 +83,7 @@ pipeline {
stage('px4_fmu-v4pro_default') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2019-03-08'
image 'px4io/px4-dev-nuttx:2019-10-24'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
@@ -107,7 +107,7 @@ pipeline {
stage('px4_fmu-v5_default') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2019-03-08'
image 'px4io/px4-dev-nuttx:2019-10-24'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
@@ -128,10 +128,58 @@ pipeline {
}
}
stage('px4_fmu-v5_critmonitor') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2019-10-24'
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_critmonitor'
sh 'make sizes'
sh 'ccache -s'
stash includes: 'build/px4_fmu-v5_critmonitor/px4_fmu-v5_critmonitor.elf', name: 'px4_fmu-v5_critmonitor'
}
post {
always {
sh 'make distclean'
}
}
}
stage('px4_fmu-v5_irqmonitor') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2019-10-24'
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_irqmonitor'
sh 'make sizes'
sh 'ccache -s'
stash includes: 'build/px4_fmu-v5_irqmonitor/px4_fmu-v5_irqmonitor.elf', name: 'px4_fmu-v5_irqmonitor'
}
post {
always {
sh 'make distclean'
}
}
}
stage('px4_fmu-v5_stackcheck') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2019-03-08'
image 'px4io/px4-dev-nuttx:2019-10-24'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
@@ -152,10 +200,34 @@ pipeline {
}
}
stage('px4_fmu-v5x_default') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2019-10-24'
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-v5x_default'
sh 'make sizes'
sh 'ccache -s'
stash includes: 'build/px4_fmu-v5x_default/px4_fmu-v5x_default.elf', name: 'px4_fmu-v5x_default'
}
post {
always {
sh 'make distclean'
}
}
}
stage('nxp_fmuk66-v3_default') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2019-03-08'
image 'px4io/px4-dev-nuttx:2019-10-24'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
@@ -188,22 +260,45 @@ pipeline {
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
sh 'export'
sh 'find /dev/serial'
unstash 'px4_fmu-v2_test'
// flash board and watch bootup
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'
// configure
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set CBRK_BUZZER 782097"' // disable buzzer
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB_MAXBRT 0"' // disable rgbled
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB1_MAXBRT 0"' // disable rgbled_ncp5623c
// status commands
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "adc test"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dataman status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dmesg"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "fmu status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "free"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /dev"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /obj"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mavlink status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mtd status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param show"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "perf latency"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "perf"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ps"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "pwm info"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "sd_bench -r 2"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "sensors status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "top once"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "uorb status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ver all"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "work_queue status"'
// ensure buzzer is disabled for the next test
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set CBRK_BUZZER 782097"' // disable buzzer
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB_MAXBRT 0"' // disable rgbled
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB1_MAXBRT 0"' // disable rgbled_ncp5623c
}
options {
timeout(time: 600, unit: 'SECONDS')
timeout(time: 20, unit: 'MINUTES')
}
}
@@ -212,22 +307,70 @@ pipeline {
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
sh 'export'
sh 'find /dev/serial'
unstash 'px4_fmu-v3_default'
// flash board and watch bootup
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'
// configure
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set CBRK_BUZZER 782097"' // disable buzzer
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB_MAXBRT 0"' // disable rgbled
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB1_MAXBRT 0"' // disable rgbled_ncp5623c
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set SYS_AUTOSTART 13000"' // generic multicopter
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "reboot"' // reboot to apply
// run logger
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "logger on"'
// status commands
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "adc test"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "commander check"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "commander status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dataman status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dmesg"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "fmu status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "free"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "logger status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /dev"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /etc"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /obj"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /proc"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mavlink status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mavlink status streams"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mtd status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param show"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "perf latency"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "perf"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ps"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "pwm info -d /dev/pwm_output1"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "pwm info"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "px4io status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "sd_bench -r 2"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "sensors status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "top once"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "uorb status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "uorb top -1"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ver all"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "work_queue status"'
// run tests
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
// ensure buzzer is disabled for the next test
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set CBRK_BUZZER 782097"' // disable buzzer
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB_MAXBRT 0"' // disable rgbled
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB1_MAXBRT 0"' // disable rgbled_ncp5623c
// manually stop everything
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "commander stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mavlink stop-all"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ekf2 stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "navigator stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dataman stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "logger stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "fmu stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "px4io stop"'
}
options {
timeout(time: 600, unit: 'SECONDS')
timeout(time: 20, unit: 'MINUTES')
}
}
@@ -236,22 +379,67 @@ pipeline {
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
sh 'export'
sh 'find /dev/serial'
unstash 'px4_fmu-v4_default'
// flash board and watch bootup
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'
// configure
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set CBRK_BUZZER 782097"' // disable buzzer
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB_MAXBRT 0"' // disable rgbled
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB1_MAXBRT 0"' // disable rgbled_ncp5623c
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set SYS_AUTOSTART 4001"' // generic multicopter
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "reboot"' // reboot to apply
// run logger
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "logger on"'
// status commands
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "adc test"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "commander check"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "commander status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dataman status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dmesg"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "fmu status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "free"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "logger status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /dev"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /etc"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /obj"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /proc"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mavlink status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mavlink status streams"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mtd status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param show"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "perf latency"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "perf"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ps"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "pwm info"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "sd_bench -r 2"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "sensors status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "top once"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "uorb status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "uorb top -1"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ver all"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "work_queue status"'
// run tests
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
// ensure buzzer is disabled for the next test
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set CBRK_BUZZER 782097"' // disable buzzer
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB_MAXBRT 0"' // disable rgbled
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB1_MAXBRT 0"' // disable rgbled_ncp5623c
// manually stop everything
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "commander stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mavlink stop-all"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ekf2 stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "navigator stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dataman stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "logger stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "fmu stop"'
}
options {
timeout(time: 600, unit: 'SECONDS')
timeout(time: 20, unit: 'MINUTES')
}
}
@@ -260,22 +448,70 @@ pipeline {
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
sh 'export'
sh 'find /dev/serial'
unstash 'px4_fmu-v4pro_default'
// flash board and watch bootup
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'
// configure
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set CBRK_BUZZER 782097"' // disable buzzer
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB_MAXBRT 0"' // disable rgbled
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB1_MAXBRT 0"' // disable rgbled_ncp5623c
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set SYS_AUTOSTART 13000"' // generic multicopter
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "reboot"' // reboot to apply
// run logger
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "logger on"'
// status commands
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "adc test"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "commander check"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "commander status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dataman status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dmesg"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "fmu status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "free"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "logger status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /dev"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /etc"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /obj"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /proc"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mavlink status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mavlink status streams"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mtd status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param show"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "perf latency"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "perf"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ps"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "pwm info -d /dev/pwm_output1"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "pwm info"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "px4io status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "sd_bench -r 2"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "sensors status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "top once"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "uorb status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "uorb top -1"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ver all"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "work_queue status"'
// run tests
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
// ensure buzzer is disabled for the next test
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set CBRK_BUZZER 782097"' // disable buzzer
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB_MAXBRT 0"' // disable rgbled
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB1_MAXBRT 0"' // disable rgbled_ncp5623c
// manually stop everything
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "commander stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mavlink stop-all"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ekf2 stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "navigator stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dataman stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "logger stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "fmu stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "px4io stop"'
}
options {
timeout(time: 600, unit: 'SECONDS')
timeout(time: 20, unit: 'MINUTES')
}
}
@@ -284,22 +520,224 @@ pipeline {
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
sh 'export'
sh 'find /dev/serial'
unstash 'px4_fmu-v5_default'
// flash board and watch bootup
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'
// configure
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set CBRK_BUZZER 782097"' // disable buzzer
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB_MAXBRT 0"' // disable rgbled
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB1_MAXBRT 0"' // disable rgbled_ncp5623c
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set SYS_AUTOSTART 13000"' // generic multicopter
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "reboot"' // reboot to apply
// run logger
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "logger on"'
// status commands
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "adc test"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "commander check"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "commander status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dataman status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dmesg"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "fmu status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "free"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "logger status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /dev"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /etc"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /obj"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /proc"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mavlink status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mavlink status streams"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mtd status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param show"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "perf latency"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "perf"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ps"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "pwm info -d /dev/pwm_output1"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "pwm info"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "px4io status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "sd_bench -r 2"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "sensors status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "top once"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "uorb status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "uorb top -1"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ver all"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "work_queue status"'
// run tests
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
// ensure buzzer is disabled for the next test
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set CBRK_BUZZER 782097"' // disable buzzer
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB_MAXBRT 0"' // disable rgbled
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB1_MAXBRT 0"' // disable rgbled_ncp5623c
// manually stop everything
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "commander stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mavlink stop-all"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ekf2 stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "navigator stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dataman stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "logger stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "fmu stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "px4io stop"'
}
options {
timeout(time: 600, unit: 'SECONDS')
timeout(time: 20, unit: 'MINUTES')
}
}
stage('px4_fmu-v5_critmonitor') {
agent {
label 'px4_fmu-v5'
}
steps {
sh 'export'
sh 'find /dev/serial'
unstash 'px4_fmu-v5_critmonitor'
// flash board and watch bootup
sh './platforms/nuttx/Debug/jlink_gdb_upload.sh build/px4_fmu-v5_critmonitor/px4_fmu-v5_critmonitor.elf'
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600'
// configure
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set CBRK_BUZZER 782097"' // disable buzzer
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB_MAXBRT 0"' // disable rgbled
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB1_MAXBRT 0"' // disable rgbled_ncp5623c
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set SYS_AUTOSTART 13000"' // generic multicopter
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "reboot"' // reboot to apply
// run logger
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "logger on"'
// status commands
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "adc test"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "commander check"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "commander status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dataman status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dmesg"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "fmu status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "free"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "logger status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /dev"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /etc"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /obj"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /proc"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mavlink status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mavlink status streams"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mtd status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param show"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "perf latency"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "perf"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ps"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "pwm info -d /dev/pwm_output1"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "pwm info"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "px4io status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "sd_bench -r 2"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "sensors status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "top once"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "uorb status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "uorb top -1"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ver all"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "work_queue status"'
// critmon
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "critmon_start; sleep 5; critmon_stop"'
// run tests
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
// critmon
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "critmon_start; sleep 5; critmon_stop"'
// ensure buzzer is disabled for the next test
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set CBRK_BUZZER 782097"' // disable buzzer
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB_MAXBRT 0"' // disable rgbled
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB1_MAXBRT 0"' // disable rgbled_ncp5623c
// manually stop everything
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "commander stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mavlink stop-all"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ekf2 stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "navigator stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dataman stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "logger stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "fmu stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "px4io stop"'
}
options {
timeout(time: 20, unit: 'MINUTES')
}
}
stage('px4_fmu-v5_irqmonitor') {
agent {
label 'px4_fmu-v5'
}
steps {
sh 'export'
sh 'find /dev/serial'
unstash 'px4_fmu-v5_irqmonitor'
// flash board and watch bootup
sh './platforms/nuttx/Debug/jlink_gdb_upload.sh build/px4_fmu-v5_irqmonitor/px4_fmu-v5_irqmonitor.elf'
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600'
// configure
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set CBRK_BUZZER 782097"' // disable buzzer
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB_MAXBRT 0"' // disable rgbled
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB1_MAXBRT 0"' // disable rgbled_ncp5623c
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set SYS_AUTOSTART 13000"' // generic multicopter
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "reboot"' // reboot to apply
// irqinfo
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "irqinfo"'
// run logger
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "logger on"'
// status commands
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "adc test"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "commander check"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "commander status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dataman status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dmesg"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "fmu status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "free"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "logger status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /dev"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /etc"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /obj"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /proc"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mavlink status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mavlink status streams"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mtd status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param show"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "perf latency"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "perf"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ps"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "pwm info -d /dev/pwm_output1"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "pwm info"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "px4io status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "sd_bench -r 2"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "sensors status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "top once"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "uorb status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "uorb top -1"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ver all"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "work_queue status"'
// irqinfo
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "irqinfo"'
// run tests
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
// irqinfo
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "irqinfo"'
// ensure buzzer is disabled for the next test
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set CBRK_BUZZER 782097"' // disable buzzer
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB_MAXBRT 0"' // disable rgbled
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB1_MAXBRT 0"' // disable rgbled_ncp5623c
// manually stop everything
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "commander stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mavlink stop-all"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ekf2 stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "navigator stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dataman stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "logger stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "fmu stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "px4io stop"'
}
options {
timeout(time: 20, unit: 'MINUTES')
}
}
@@ -313,9 +751,49 @@ pipeline {
sh 'export'
sh 'find /dev/serial'
unstash 'px4_fmu-v5_stackcheck'
// flash board and watch bootup
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_*`'
// status commands
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "adc test"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dataman status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dmesg"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "fmu status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "free"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /dev"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /obj"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mavlink status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mavlink status streams"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mtd status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param show"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "perf latency"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "perf"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ps"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "pwm info -d /dev/pwm_output1"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "pwm info"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "px4io status"'
//sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "sd_bench -r 2"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "sensors status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "top once"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "uorb status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ver all"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "work_queue status"'
// run tests
// sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`' // TODO: currently unusably slow
// ensure buzzer is disabled for the next test
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set CBRK_BUZZER 782097"' // disable buzzer
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB_MAXBRT 0"' // disable rgbled
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB1_MAXBRT 0"' // disable rgbled_ncp5623c
// manually stop everything
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "commander stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mavlink stop-all"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ekf2 stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "navigator stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dataman stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "logger stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "fmu stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "px4io stop"'
} catch (Exception err) {
// always report passed for now
currentBuild.result = 'SUCCESS'
@@ -323,7 +801,79 @@ pipeline {
} // script
}
options {
timeout(time: 600, unit: 'SECONDS')
timeout(time: 20, unit: 'MINUTES')
}
}
stage('px4_fmu-v5x_default') {
agent {
label 'px4_fmu-v5x'
}
steps {
sh 'export'
sh 'find /dev/serial'
unstash 'px4_fmu-v5x_default'
// flash board and watch bootup
sh './platforms/nuttx/Debug/jlink_gdb_upload.sh build/px4_fmu-v5x_default/px4_fmu-v5x_default.elf'
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-SEGGER_*` --baudrate 57600'
// configure
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "param set CBRK_BUZZER 782097"' // disable buzzer
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "param set LED_RGB_MAXBRT 0"' // disable rgbled
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "param set LED_RGB1_MAXBRT 0"' // disable rgbled_ncp5623c
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "param set SYS_AUTOSTART 13000"' // generic multicopter
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "reboot"' // reboot to apply
// run logger
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "logger on"'
// status commands
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "adc test"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "commander check"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "commander status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "dataman status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "dmesg"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "fmu status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "free"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "logger status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "ls /"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "ls /dev"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "ls /etc"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "ls /obj"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "ls /proc"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "mavlink status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "mavlink status streams"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "mtd status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "param show"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "param status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "perf latency"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "perf"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "ps"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "pwm info -d /dev/pwm_output1"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "pwm info"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "px4io status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "sd_bench -r 2"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "sensors status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "top once"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "uorb status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "uorb top -1"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "ver all"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "work_queue status"'
// run tests
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-SEGGER_*`'
// ensure buzzer is disabled for the next test
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "param set CBRK_BUZZER 782097"' // disable buzzer
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "param set LED_RGB_MAXBRT 0"' // disable rgbled
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "param set LED_RGB1_MAXBRT 0"' // disable rgbled_ncp5623c
// manually stop everything
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "commander stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "mavlink stop-all"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "ekf2 stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "navigator stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "dataman stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "logger stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "fmu stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "px4io stop"'
}
options {
timeout(time: 20, unit: 'MINUTES')
}
}
@@ -332,22 +882,67 @@ pipeline {
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
sh 'export'
sh 'find /dev/serial'
unstash 'nxp_fmuk66-v3_default'
// flash board and watch bootup
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'
// configure
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set CBRK_BUZZER 782097"' // disable buzzer
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB_MAXBRT 0"' // disable rgbled
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB1_MAXBRT 0"' // disable rgbled_ncp5623c
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set SYS_AUTOSTART 4001"' // generic multicopter
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "reboot"' // reboot to apply
// run logger
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "logger on"'
// status commands
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "adc test"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "commander check"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "commander status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dataman status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dmesg"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "fmu status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "free"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "logger status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /dev"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /etc"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /obj"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /proc"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mavlink status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mavlink status streams"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mtd status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param show"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "perf latency"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "perf"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ps"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "pwm info"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "sd_bench -r 2"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "sensors status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "top once"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "uorb status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "uorb top -1"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ver all"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "work_queue status"'
// run tests
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
// ensure buzzer is disabled for the next test
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set CBRK_BUZZER 782097"' // disable buzzer
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB_MAXBRT 0"' // disable rgbled
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set LED_RGB1_MAXBRT 0"' // disable rgbled_ncp5623c
// manually stop everything
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "commander stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mavlink stop-all"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ekf2 stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "navigator stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dataman stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "logger stop"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "fmu stop"'
}
options {
timeout(time: 600, unit: 'SECONDS')
timeout(time: 20, unit: 'MINUTES')
}
}
+41
View File
@@ -0,0 +1,41 @@
#!/usr/bin/env groovy
pipeline {
agent none
stages {
stage('Build and Verify') {
agent {
label 'navio2'
}
steps {
sh 'export'
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
sh 'CCACHE_BASEDIR=${WORKSPACE} make emlid_navio2_native'
sh 'ccache -s'
// sanity check
sh 'cd build/emlid_navio2_native/ && ./bin/px4 -s ../../posix-configs/rpi/px4_test.config'
}
post {
always {
sh 'make distclean'
}
}
options {
timeout(time: 30, unit: 'MINUTES')
}
}
} // stages
environment {
CCACHE_DIR = '/tmp/ccache'
CI = true
}
options {
buildDiscarder(logRotator(numToKeepStr: '20', artifactDaysToKeepStr: '30'))
timeout(time: 60, unit: 'MINUTES')
}
}
+48
View File
@@ -0,0 +1,48 @@
#!/usr/bin/env groovy
pipeline {
agent none
stages {
stage('Build and Verify') {
agent {
label 'snapdragon'
}
steps {
sh 'export'
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
sh 'CCACHE_BASEDIR=${WORKSPACE} make eagle_default'
sh 'ccache -s'
// sanity check
sh 'adb devices'
sh 'make eagle_default sanity || true'
}
post {
always {
sh 'cat boards/atlflight/eagle/scripts/px4.log'
sh 'cat boards/atlflight/eagle/scripts/minidm.log'
sh 'make distclean'
}
}
options {
timeout(time: 30, unit: 'MINUTES')
}
}
} // stages
environment {
CCACHE_DIR = '/tmp/ccache'
CI = true
ARM_CROSS_GCC_ROOT="/home/jenkins/Qualcomm/ARM_Tools/gcc-4.9-2014.11"
HEXAGON_ARM_SYSROOT="/home/jenkins/Qualcomm/qrlinux_sysroot"
HEXAGON_SDK_ROOT="/home/jenkins/Qualcomm/Hexagon_SDK/3.0"
HEXAGON_TOOLS_ROOT="/home/jenkins/Qualcomm/HEXAGON_Tools/7.2.12/Tools"
}
options {
buildDiscarder(logRotator(numToKeepStr: '20', artifactDaysToKeepStr: '30'))
timeout(time: 60, unit: 'MINUTES')
}
}
+19
View File
@@ -0,0 +1,19 @@
version: 2
jobs:
build:
docker:
- image: px4io/px4-dev-nuttx:2019-10-24
steps:
- checkout
- run:
name: Fetch tags
command: git fetch --tags
- run:
name: Build px4_fmu-v5_default
command: make px4_fmu-v5_default
- store_artifacts:
path: build/px4_fmu-v5_default/px4_fmu-v5_default.px4
destination: px4_fmu-v5_default.px4
- store_artifacts:
path: build/px4_fmu-v5_default/px4_fmu-v5_default.elf
destination: px4_fmu-v5_default.elf
+7
View File
@@ -0,0 +1,7 @@
* text=auto eol=lf
*.{cmd,[cC][mM][dD]} text eol=crlf
*.{bat,[bB][aA][tT]} text eol=crlf
*.bin binary
*.pdf binary
*.png binary
+5 -8
View File
@@ -1,18 +1,15 @@
# 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
# Number of days of inactivity before a stale issue is closed, or `false` to disable
daysUntilClose: false
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
staleLabel: stale
# 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 if no further activity occurs. Thank you
for your contributions.
recent activity. Thank you for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: >
Closing as stale.
closeComment: false
+13
View File
@@ -0,0 +1,13 @@
name: C/C++ CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
container: px4io/px4-dev-base-bionic:2019-10-24
steps:
- uses: actions/checkout@v1
- name: make
run: make
+4 -1
View File
@@ -17,7 +17,6 @@ Testing/
Packages/*
build/*
build_*/
core
cscope.out
cscope.in.out
cscope.po.out
@@ -64,3 +63,7 @@ posix-configs/SITL/init/test/*_generated
*.gcov
.coverage
.coverage.*
# KDevelop ignores
.kdev4/*
*.kdev4
+3 -3
View File
@@ -33,7 +33,7 @@
[submodule "src/lib/ecl"]
path = src/lib/ecl
url = https://github.com/PX4/ecl.git
branch = master
branch = Release_v1.10
[submodule "boards/atlflight/cmake_hexagon"]
path = boards/atlflight/cmake_hexagon
url = https://github.com/PX4/cmake_hexagon.git
@@ -49,11 +49,11 @@
[submodule "platforms/nuttx/NuttX/nuttx"]
path = platforms/nuttx/NuttX/nuttx
url = https://github.com/PX4/NuttX.git
branch = px4_firmware_nuttx-7.28+
branch = px4_firmware_nuttx-7.29+
[submodule "platforms/nuttx/NuttX/apps"]
path = platforms/nuttx/NuttX/apps
url = https://github.com/PX4/NuttX-apps.git
branch = px4_firmware_nuttx-7.28+
branch = px4_firmware_nuttx-7.29+
[submodule "cmake/configs/uavcan_board_ident"]
path = cmake/configs/uavcan_board_ident
url = https://github.com/PX4/uavcan_board_ident.git
+3
View File
@@ -2,5 +2,8 @@
.cortex-debug.registers.state.json
compile_commands.json
# generated by cmake
launch.json
# C/C++ extension does some local caching in this folder
ipch/
+24 -19
View File
@@ -2,60 +2,65 @@ CONFIG:
default: px4_sitl_default
choices:
px4_sitl_default:
short: px4_sitl
short: px4_sitl_default
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
short: px4_fmu-v2_default
buildType: MinSizeRel
settings:
CONFIG: px4_fmu-v2_default
px4_fmu-v3_default:
short: px4_fmu-v3
short: px4_fmu-v3_default
buildType: MinSizeRel
settings:
CONFIG: px4_fmu-v3_default
px4_fmu-v4_default:
short: px4_fmu-v4
short: px4_fmu-v4_default
buildType: MinSizeRel
settings:
CONFIG: px4_fmu-v4_default
px4_fmu-v4pro_default:
short: px4_fmu-v4pro
short: px4_fmu-v4pro_default
buildType: MinSizeRel
settings:
CONFIG: px4_fmu-v4pro_default
px4_fmu-v5_default:
short: px4_fmu-v5
short: px4_fmu-v5_default
buildType: MinSizeRel
settings:
CONFIG: px4_fmu-v5_default
px4_fmu-v5x_default:
short: px4_fmu-v5x_default
buildType: MinSizeRel
settings:
CONFIG: px4_fmu-v5x_default
airmind_mindpx-v2_default:
short: airmind_mindpx-v2
short: airmind_mindpx-v2_default
buildType: MinSizeRel
settings:
CONFIG: airmind_mindpx-v2_default
av_x-v1_default:
short: av-x
short: av_x-v1_default
buildType: MinSizeRel
settings:
CONFIG: av_x-v1_default
intel_aerofc-v1_default:
short: intel_aerofc-v1
short: intel_aerofc-v1_default
buildType: MinSizeRel
settings:
CONFIG: intel_aerofc-v1_default
modalai_fc-v1_default:
short: modalai_fc-v1_default
buildType: MinSizeRel
settings:
CONFIG: modalai_fc-v1_default
mro_ctrl-zero-f7_default:
short: mro_ctrl-zero-f7_default
buildType: MinSizeRel
settings:
CONFIG: mro_ctrl-zero-f7_default
nxp_fmuk66-v3_default:
short: nxp_fmuk66-v3
buildType: MinSizeRel
+4 -3
View File
@@ -2,17 +2,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-azuretools.vscode-docker",
"ms-iot.vscode-ros",
"ms-python.python",
"ms-vscode.cpptools",
"peterjausovec.vscode-docker",
"twxs.cmake",
"uavcan.dsdl",
"vector-of-bool.cmake-tools",
"wholroyd.jinja"
"wholroyd.jinja",
"zixuanwang.linkerscript"
]
}
+12 -3
View File
@@ -53,6 +53,7 @@
]
}
},
"cortex-debug.enableTelemetry": false,
"C_Cpp.clang_format_fallbackStyle": "none",
"C_Cpp.configurationWarnings": "Disabled",
"C_Cpp.default.cppStandard": "c++11",
@@ -63,18 +64,26 @@
"C_Cpp.intelliSenseEngine": "Default",
"C_Cpp.intelliSenseEngineFallback": "Disabled",
"debug.toolBarLocation": "docked",
"editor.defaultFormatter": "chiehyu.vscode-astyle",
"editor.dragAndDrop": false,
"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,
"files.watcherExclude": {
"**/build/*": true
},
"git.detectSubmodulesLimit": 20,
"git.ignoreLimitWarning": true,
"githubPullRequests.defaultMergeMethod": "squash",
"githubPullRequests.telemetry.enabled": false,
"gitlens.advanced.telemetry.enabled": false,
"files.associations": {
"*.jinja": "jinja"
},
@@ -82,10 +91,10 @@
"build/**": true
},
"search.showLineNumbers": true,
"telemetry.enableTelemetry": false,
"window.title": "${dirty} ${activeEditorMedium}${separator}${rootName}",
"workbench.editor.enablePreview": false,
"workbench.editor.enablePreviewFromQuickOpen": false,
"workbench.editor.highlightModifiedTabs": true,
"workbench.enableExperiments": false,
"workbench.settings.enableNaturalLanguageSearch": false,
"workbench.statusBar.feedback.visible": false
}
+92 -6
View File
@@ -10,10 +10,14 @@
"isBackground": true,
"args": [
"-r",
"500"
"250",
"-l"
],
"options": {
"cwd": "${workspaceRoot}"
"cwd": "${workspaceRoot}",
"env": {
"PX4_SIM_SPEED_FACTOR": "1"
}
},
"presentation": {
"reveal": "always",
@@ -60,10 +64,83 @@
"cwd": "${workspaceRoot}",
"env": {
"GAZEBO_PLUGIN_PATH": "${workspaceRoot}/build/px4_sitl_default/build_gazebo",
"GAZEBO_MODEL_PATH": "${workspaceRoot}/Tools/sitl_gazebo/models"
"GAZEBO_MODEL_PATH": "${workspaceRoot}/Tools/sitl_gazebo/models",
"PX4_SIM_SPEED_FACTOR": "1"
}
},
"command": "gzserver --verbose ${workspaceRoot}/Tools/sitl_gazebo/worlds/iris.world",
"command": "gzserver ${workspaceRoot}/Tools/sitl_gazebo/worlds/iris.world & gzclient",
"isBackground": true,
"presentation": {
"reveal": "always",
"panel": "dedicated"
},
"problemMatcher": [
{
"pattern": [
{
"regexp": ".",
"file": 1,
"location": 2,
"message": 3
}
],
"background": {
"activeOnStart": true,
"beginsPattern": ".",
"endsPattern": ".",
}
}
]
},
{
"label": "gazebo plane",
"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",
"PX4_SIM_SPEED_FACTOR": "1"
}
},
"command": "gzserver ${workspaceRoot}/Tools/sitl_gazebo/worlds/plane.world & gzclient",
"isBackground": true,
"presentation": {
"reveal": "always",
"panel": "dedicated"
},
"problemMatcher": [
{
"pattern": [
{
"regexp": ".",
"file": 1,
"location": 2,
"message": 3
}
],
"background": {
"activeOnStart": true,
"beginsPattern": ".",
"endsPattern": ".",
}
}
]
},
{
"label": "gazebo standard_vtol",
"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",
"PX4_SIM_SPEED_FACTOR": "1"
}
},
"command": "gzserver ${workspaceRoot}/Tools/sitl_gazebo/worlds/standard_vtol.world & gzclient",
"isBackground": true,
"presentation": {
"reveal": "always",
@@ -90,8 +167,17 @@
{
"label": "gazebo kill",
"type": "shell",
"command": "killall gzserver",
"command": "killall gzserver; killall gzclient",
"problemMatcher": []
},
{
"label": "mavlink shell",
"type": "shell",
"command": "./Tools/mavlink_shell.py",
"options": {
"cwd": "${workspaceRoot}"
},
"problemMatcher": []
}
]
}
}
+51 -203
View File
@@ -105,6 +105,7 @@ 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)
include(px4_parse_function_args)
#=============================================================================
# git
@@ -117,6 +118,7 @@ execute_process(
OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
)
message(STATUS "PX4 version: ${PX4_GIT_TAG}")
define_property(GLOBAL PROPERTY PX4_MODULE_LIBRARIES
BRIEF_DOCS "PX4 module libs"
@@ -138,79 +140,7 @@ include(px4_add_module)
set(config_module_list)
set(config_df_driver_list)
# 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_config)
include(px4_add_board)
include(${PX4_CONFIG_FILE})
message(STATUS "PX4 config: ${PX4_CONFIG}")
@@ -251,10 +181,6 @@ if (NOT CMAKE_BUILD_TYPE)
endif()
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug;Release;RelWithDebInfo;MinSizeRel;Coverage;AddressSanitizer;UndefinedBehaviorSanitizer")
#=============================================================================
message(STATUS "PX4 version: ${PX4_GIT_TAG}")
message(STATUS "cmake build type: ${CMAKE_BUILD_TYPE}")
#=============================================================================
@@ -266,7 +192,7 @@ set(package-contact "px4users@googlegroups.com")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
@@ -282,6 +208,25 @@ endif()
#=============================================================================
# gold linker - use if available
include(CMakeDependentOption)
CMAKE_DEPENDENT_OPTION(USE_LD_GOLD
"Use GNU gold linker" ON
"NOT WIN32;NOT APPLE" OFF
)
if(USE_LD_GOLD)
execute_process(COMMAND ${CMAKE_C_COMPILER} -fuse-ld=gold -Wl,--version ERROR_QUIET OUTPUT_VARIABLE LD_VERSION)
if("${LD_VERSION}" MATCHES "GNU gold")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=gold")
else()
set(USE_LD_GOLD OFF)
endif()
endif()
#=============================================================================
# Setup install paths
if (${PX4_PLATFORM} STREQUAL "posix")
@@ -301,25 +246,7 @@ if (${PX4_PLATFORM} STREQUAL "posix")
endif()
endif()
#=============================================================================
# ccache
#
option(CCACHE "Use ccache if available" ON)
find_program(CCACHE_PROGRAM ccache)
if (CCACHE AND CCACHE_PROGRAM AND NOT DEFINED ENV{CCACHE_DISABLE})
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()
include(ccache)
#=============================================================================
# find programs and packages
@@ -336,6 +263,8 @@ if (CATKIN_DEVEL_PREFIX)
endif()
endif()
# python
include(px4_find_python_module)
find_package(PythonInterp REQUIRED)
option(PYTHON_COVERAGE "Python code coverage" OFF)
@@ -347,6 +276,17 @@ else()
px4_find_python_module(jinja2 REQUIRED)
endif()
#=============================================================================
# get chip and chip manufacturer
#
px4_os_determine_build_chip()
if(NOT PX4_CHIP_MANUFACTURER)
message(FATAL_ERROR "px4_os_determine_build_chip() needs to set PX4_CHIP_MANUFACTURER")
endif()
if(NOT PX4_CHIP)
message(FATAL_ERROR "px4_os_determine_build_chip() needs to set PX4_CHIP")
endif()
#=============================================================================
# build flags
#
@@ -415,6 +355,9 @@ endif()
# 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()
@@ -448,7 +391,8 @@ add_library(parameters_interface INTERFACE)
include(px4_add_library)
add_subdirectory(src/lib EXCLUDE_FROM_ALL)
add_subdirectory(src/platforms EXCLUDE_FROM_ALL)
add_subdirectory(platforms/${PX4_PLATFORM}/src/px4)
add_subdirectory(platforms EXCLUDE_FROM_ALL)
add_subdirectory(src/modules/uORB EXCLUDE_FROM_ALL) # TODO: platform layer
add_subdirectory(src/drivers/boards EXCLUDE_FROM_ALL)
@@ -487,111 +431,15 @@ add_custom_command(OUTPUT ${uorb_graph_config}
)
add_custom_target(uorb_graph DEPENDS ${uorb_graph_config})
#=============================================================================
# Doxygen
#
option(BUILD_DOXYGEN "Build doxygen documentation" OFF)
if (BUILD_DOXYGEN)
find_package(Doxygen)
if (DOXYGEN_FOUND)
# set input and output files
set(DOXYGEN_IN ${CMAKE_SOURCE_DIR}/Documentation/Doxyfile.in)
set(DOXYGEN_OUT ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
include(doxygen)
include(metadata)
include(package)
# request to configure the file
configure_file(${DOXYGEN_IN} ${DOXYGEN_OUT} @ONLY)
# note the option ALL which allows to build the docs together with the application
add_custom_target(doxygen ALL
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_OUT}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating documentation with Doxygen"
DEPENDS uorb_msgs parameters
VERBATIM
USES_TERMINAL
)
else()
message("Doxygen needs to be installed to generate documentation")
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)"
# print size
add_custom_target(size
COMMAND size $<TARGET_FILE:px4>
DEPENDS px4
WORKING_DIRECTORY ${PX4_BINARY_DIR}
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}-${PX4_CONFIG})
set(CPACK_PACKAGE_VERSION ${PX4_GIT_TAG})
set(CPACK_PACKAGE_CONTACT ${package-contact})
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}-${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")
if ("${CMAKE_SYSTEM}" MATCHES "Linux")
set(CPACK_GENERATOR "TBZ2")
find_program(DPKG_PROGRAM dpkg)
if (EXISTS ${DPKG_PROGRAM})
list (APPEND CPACK_GENERATOR "DEB")
endif()
else()
set(CPACK_GENERATOR "ZIP")
endif()
include(CPack)
)
Vendored
+82 -35
View File
@@ -11,7 +11,7 @@ pipeline {
stage('Catkin build on ROS workspace') {
agent {
docker {
image 'px4io/px4-dev-ros-melodic:2019-03-08'
image 'px4io/px4-dev-ros-melodic:2019-10-24'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
}
}
@@ -23,6 +23,7 @@ pipeline {
cd catkin_ws;
git -C ${WORKSPACE}/catkin_ws/src/Firmware submodule update --init --recursive --force Tools/sitl_gazebo
git clone --recursive ${WORKSPACE}/catkin_ws/src/Firmware/Tools/sitl_gazebo src/mavlink_sitl_gazebo;
git -C ${WORKSPACE}/catkin_ws/src/Firmware fetch --tags;
source /opt/ros/melodic/setup.bash;
catkin init;
catkin build -j$(nproc) -l$(nproc);
@@ -38,6 +39,9 @@ pipeline {
always {
sh 'rm -rf catkin_ws'
}
failure {
archiveArtifacts(allowEmptyArchive: false, artifacts: '.ros/**/*.xml, .ros/**/*.log')
}
}
options {
checkoutToSubdirectory('catkin_ws/src/Firmware')
@@ -47,7 +51,7 @@ pipeline {
stage('Colcon build on ROS2 workspace') {
agent {
docker {
image 'px4io/px4-dev-ros2-bouncy:2019-03-08'
image 'px4io/px4-dev-ros2-dashing:2019-10-24'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw -e HOME=$WORKSPACE'
}
}
@@ -60,6 +64,7 @@ pipeline {
cd colcon_ws;
git -C ${WORKSPACE}/colcon_ws/src/Firmware submodule update --init --recursive --force Tools/sitl_gazebo
git clone --recursive ${WORKSPACE}/colcon_ws/src/Firmware/Tools/sitl_gazebo src/mavlink_sitl_gazebo;
git -C ${WORKSPACE}/colcon_ws/src/Firmware fetch --tags;
source /opt/ros/bouncy/setup.sh;
source /opt/ros/melodic/setup.sh;
colcon build --event-handlers console_direct+ --symlink-install;
@@ -77,7 +82,7 @@ pipeline {
stage('Style check') {
agent {
docker { image 'px4io/px4-dev-base-bionic:2019-03-08' }
docker { image 'px4io/px4-dev-base-bionic:2019-10-24' }
}
steps {
sh 'make check_format'
@@ -89,10 +94,10 @@ pipeline {
}
}
stage('Bloaty px4_fmu-v2') {
stage('px4_fmu-v2 (bloaty)') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2019-03-08'
image 'px4io/px4-dev-nuttx:2019-10-24'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
@@ -102,9 +107,11 @@ pipeline {
sh 'ccache -z'
sh 'git fetch --tags'
sh 'make px4_fmu-v2_default'
sh 'make px4_fmu-v2_default bloaty_symbols'
sh 'make px4_fmu-v2_default bloaty_compileunits'
sh 'make px4_fmu-v2_default bloaty_inlines'
sh 'make px4_fmu-v2_default bloaty_sections'
sh 'make px4_fmu-v2_default bloaty_segments'
sh 'make px4_fmu-v2_default bloaty_symbols'
sh 'make px4_fmu-v2_default bloaty_templates'
sh 'make px4_fmu-v2_default bloaty_compare_master'
sh 'make sizes'
@@ -115,12 +122,15 @@ pipeline {
sh 'make distclean'
}
}
environment {
CCACHE_DISABLE = 1
}
}
stage('Bloaty px4_fmu-v5') {
stage('px4_fmu-v5 (bloaty)') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2019-03-08'
image 'px4io/px4-dev-nuttx:2019-10-24'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
@@ -130,9 +140,11 @@ pipeline {
sh 'ccache -z'
sh 'git fetch --tags'
sh 'make px4_fmu-v5_default'
sh 'make px4_fmu-v5_default bloaty_symbols'
sh 'make px4_fmu-v5_default bloaty_compileunits'
sh 'make px4_fmu-v5_default bloaty_inlines'
sh 'make px4_fmu-v5_default bloaty_sections'
sh 'make px4_fmu-v5_default bloaty_segments'
sh 'make px4_fmu-v5_default bloaty_symbols'
sh 'make px4_fmu-v5_default bloaty_templates'
sh 'make px4_fmu-v5_default bloaty_compare_master'
sh 'make sizes'
@@ -143,12 +155,15 @@ pipeline {
sh 'make distclean'
}
}
environment {
CCACHE_DISABLE = 1
}
}
stage('No-ninja px4_fmu-v2') {
stage('px4_sitl (bloaty)') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2019-03-08'
image 'px4io/px4-dev-nuttx:2019-10-24'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
@@ -157,7 +172,15 @@ pipeline {
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
sh 'NO_NINJA_BUILD=1 make px4_fmu-v2_default'
sh 'make px4_sitl_default'
sh 'make px4_sitl_default bloaty_compileunits'
sh 'make px4_sitl_default bloaty_inlines'
sh 'make px4_sitl_default bloaty_sections'
sh 'make px4_sitl_default bloaty_segments'
sh 'make px4_sitl_default bloaty_symbols'
sh 'make px4_sitl_default bloaty_templates'
//sh 'make px4_fmu-v5_default bloaty_compare_master'
sh 'make sizes'
sh 'ccache -s'
}
post {
@@ -165,12 +188,15 @@ pipeline {
sh 'make distclean'
}
}
environment {
CCACHE_DISABLE = 1
}
}
stage('No-ninja px4_fmu-v5') {
stage('px4_fmu-v5 (no ninja)') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2019-03-08'
image 'px4io/px4-dev-nuttx:2019-10-24'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
@@ -179,7 +205,8 @@ pipeline {
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
sh 'NO_NINJA_BUILD=1 make px4_fmu-v5_default'
sh 'make px4_fmu-v5_default'
sh 'make sizes'
sh 'ccache -s'
}
post {
@@ -187,12 +214,15 @@ pipeline {
sh 'make distclean'
}
}
environment {
NO_NINJA_BUILD = 1
}
}
stage('No-ninja SITL build') {
stage('px4_sitl (no ninja)') {
agent {
docker {
image 'px4io/px4-dev-base-bionic:2019-03-08'
image 'px4io/px4-dev-nuttx:2019-10-24'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
@@ -201,7 +231,8 @@ pipeline {
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
sh 'NO_NINJA_BUILD=1 make px4_sitl_default'
sh 'make px4_sitl_default'
sh 'make sizes'
sh 'ccache -s'
}
post {
@@ -209,12 +240,15 @@ pipeline {
sh 'make distclean'
}
}
environment {
NO_NINJA_BUILD = 1
}
}
stage('SITL unit tests') {
agent {
docker {
image 'px4io/px4-dev-base-bionic:2019-03-08'
image 'px4io/px4-dev-base-bionic:2019-10-24'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
@@ -236,13 +270,14 @@ pipeline {
stage('Clang analyzer') {
agent {
docker {
image 'px4io/px4-dev-clang:2019-03-08'
image 'px4io/px4-dev-clang:2019-10-24'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps {
sh 'export'
sh 'make distclean'
sh 'git fetch --tags'
sh 'make scan-build'
// publish html
publishHTML target: [
@@ -273,7 +308,7 @@ pipeline {
// stage('Clang tidy') {
// agent {
// docker {
// image 'px4io/px4-dev-clang:2019-03-08'
// image 'px4io/px4-dev-clang:2019-10-24'
// args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
// }
// }
@@ -294,13 +329,14 @@ pipeline {
stage('Cppcheck') {
agent {
docker {
image 'px4io/px4-dev-base-bionic:2019-03-08'
image 'px4io/px4-dev-base-bionic:2019-10-24'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps {
sh 'export'
sh 'make distclean'
sh 'git fetch --tags'
sh 'make cppcheck'
// publish html
publishHTML target: [
@@ -331,13 +367,14 @@ pipeline {
stage('Check stack') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2019-03-08'
image 'px4io/px4-dev-nuttx:2019-10-24'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps {
sh 'export'
sh 'make distclean'
sh 'git fetch --tags'
sh 'make px4_fmu-v2_default stack_check'
}
post {
@@ -350,7 +387,7 @@ pipeline {
stage('ShellCheck') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2019-03-08'
image 'px4io/px4-dev-nuttx:2019-10-24'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
@@ -369,7 +406,7 @@ pipeline {
stage('Module config validation') {
agent {
docker {
image 'px4io/px4-dev-base-bionic:2019-03-08'
image 'px4io/px4-dev-base-bionic:2019-10-24'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
@@ -394,7 +431,7 @@ pipeline {
stage('Airframe') {
agent {
docker { image 'px4io/px4-dev-base-bionic:2019-03-08' }
docker { image 'px4io/px4-dev-base-bionic:2019-10-24' }
}
steps {
sh 'make distclean'
@@ -413,7 +450,7 @@ pipeline {
stage('Parameter') {
agent {
docker { image 'px4io/px4-dev-base-bionic:2019-03-08' }
docker { image 'px4io/px4-dev-base-bionic:2019-10-24' }
}
steps {
sh 'make distclean'
@@ -432,7 +469,7 @@ pipeline {
stage('Module') {
agent {
docker { image 'px4io/px4-dev-base-bionic:2019-03-08' }
docker { image 'px4io/px4-dev-base-bionic:2019-10-24' }
}
steps {
sh 'make distclean'
@@ -452,7 +489,7 @@ pipeline {
stage('uORB graphs') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2019-03-08'
image 'px4io/px4-dev-nuttx:2019-10-24'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
@@ -481,7 +518,7 @@ pipeline {
stage('Devguide') {
agent {
docker { image 'px4io/px4-dev-base-bionic:2019-03-08' }
docker { image 'px4io/px4-dev-base-bionic:2019-10-24' }
}
steps {
sh('export')
@@ -511,7 +548,7 @@ pipeline {
stage('Userguide') {
agent {
docker { image 'px4io/px4-dev-base-bionic:2019-03-08' }
docker { image 'px4io/px4-dev-base-bionic:2019-10-24' }
}
steps {
sh('export')
@@ -539,7 +576,7 @@ pipeline {
stage('QGroundControl') {
agent {
docker { image 'px4io/px4-dev-base-bionic:2019-03-08' }
docker { image 'px4io/px4-dev-base-bionic:2019-10-24' }
}
steps {
sh('export')
@@ -567,7 +604,7 @@ pipeline {
stage('PX4 ROS msgs') {
agent {
docker { image 'px4io/px4-dev-base-bionic:2019-03-08' }
docker { image 'px4io/px4-dev-base-bionic:2019-10-24' }
}
steps {
sh('export')
@@ -596,7 +633,7 @@ pipeline {
stage('PX4 ROS2 bridge') {
agent {
docker { image 'px4io/px4-dev-base-bionic:2019-03-08' }
docker { image 'px4io/px4-dev-base-bionic:2019-10-24' }
}
steps {
sh('export')
@@ -612,6 +649,16 @@ pipeline {
sh('cp msg/tools/generate_microRTPS_bridge.py px4_ros_com/scripts/generate_microRTPS_bridge.py')
sh('cp msg/tools/px_generate_uorb_topic_files.py px4_ros_com/scripts/px_generate_uorb_topic_files.py')
sh('cp msg/tools/px_generate_uorb_topic_helper.py px4_ros_com/scripts/px_generate_uorb_topic_helper.py')
// deploy templates
sh('cp msg/templates/urtps/microRTPS_agent.cpp.em px4_ros_com/templates/microRTPS_agent.cpp.em')
sh('cp msg/templates/urtps/microRTPS_transport.cpp px4_ros_com/templates/microRTPS_transport.cpp')
sh('cp msg/templates/urtps/microRTPS_transport.h px4_ros_com/templates/microRTPS_transport.h')
sh('cp msg/templates/urtps/Publisher.cpp.em px4_ros_com/templates/Publisher.cpp.em')
sh('cp msg/templates/urtps/Publisher.h.em px4_ros_com/templates/Publisher.h.em')
sh('cp msg/templates/urtps/Subscriber.cpp.em px4_ros_com/templates/Subscriber.cpp.em')
sh('cp msg/templates/urtps/Subscriber.h.em px4_ros_com/templates/Subscriber.h.em')
sh('cp msg/templates/urtps/RtpsTopics.cpp.em px4_ros_com/templates/RtpsTopics.cpp.em')
sh('cp msg/templates/urtps/RtpsTopics.h.em px4_ros_com/templates/RtpsTopics.h.em')
sh('cd px4_ros_com; git status; git add .; git commit -a -m "Update uORB RTPS script tools `date`" || true')
sh('cd px4_ros_com; git push origin ${BRANCH_NAME} || true')
sh('rm -rf px4_msgs')
@@ -627,7 +674,7 @@ pipeline {
stage('S3') {
agent {
docker { image 'px4io/px4-dev-base-bionic:2019-03-08' }
docker { image 'px4io/px4-dev-base-bionic:2019-10-24' }
}
steps {
sh('export')
+2 -1
View File
@@ -248,6 +248,7 @@ px4fmu_firmware: \
check_px4_fmu-v4_default \
check_px4_fmu-v4pro_default \
check_px4_fmu-v5_default \
check_px4_fmu-v5x_default \
sizes
misc_qgc_extra_firmware: \
@@ -344,7 +345,6 @@ format:
.PHONY: rostest python_coverage
tests:
$(eval CMAKE_ARGS += -DCMAKE_TESTING=ON)
$(eval CMAKE_ARGS += -DCONFIG=px4_sitl_test)
$(eval CMAKE_ARGS += -DTESTFILTER=$(TESTFILTER))
$(eval ARGS += test_results)
@@ -380,6 +380,7 @@ tests_offboard: rostest
tests_avoidance: rostest
@"$(SRC_DIR)"/test/rostest_avoidance_run.sh mavros_posix_test_avoidance.test
@"$(SRC_DIR)"/test/rostest_avoidance_run.sh mavros_posix_test_safe_landing.test
python_coverage:
@mkdir -p "$(SRC_DIR)"/build/python_coverage
+7 -6
View File
@@ -1,16 +1,17 @@
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...
**Describe problem solved by this 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**
**Describe your 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.
**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.
**Additional context**
Add any other related context or media.
+15 -27
View File
@@ -45,36 +45,24 @@ The PX4 Dev Team syncs up on a [weekly dev call](https://dev.px4.io/en/contribut
* Communication Architecture
* [Beat Kueng](https://github.com/bkueng)
* [Julian Oes](https://github.com/JulianOes)
* UI / UX
* [Donald Gagne](https://github.com/DonLakeFlyer)
* UI in QGroundControl
* [Gus Grubba](https://github.com/dogmaphobic)
* [Multicopter Flight Control](https://github.com/PX4/Firmware/labels/multicopter)
* [Dennis Mannhart](https://github.com/Stifael)
* [Mathieu Bresciani](https://github.com/bresch)
* [Multicopter Software Architecture](https://github.com/PX4/Firmware/labels/multicopter)
* [Matthias Grob](https://github.com/MaEtUgR)
* [VTOL Flight Control](https://github.com/PX4/Firmware/labels/vtol)
* [Daniel Agar](https://github.com/dagar)
* [Mathieu Bresciani](https://github.com/bresch)
* [Sander Smeets](https://github.com/sanderux)
* [Roman Bapst](https://github.com/tumbili)
* [Andreas Antener](https://github.com/AndreasAntener)
* [Roman Bapst](https://github.com/RomanBapst)
* [Fixed Wing Flight Control](https://github.com/PX4/Firmware/labels/fixedwing)
* [Daniel Agar](https://github.com/dagar)
* [Paul Riseborough](https://github.com/priseborough)
* Racers - [Matthias Grob](https://github.com/MaEtUgR)
* OS / drivers - [David Sidrane](https://github.com/davids5)
* [UAVCAN](https://github.com/PX4/Firmware/labels/uavcan) / Industrial - [Pavel Kirienko](https://github.com/pavel-kirienko)
* [State Estimation](https://github.com/PX4/Firmware/issues?q=is%3Aopen+is%3Aissue+label%3A%22state+estimation%22) - [James Goppert](https://github.com/jgoppert), [Paul Riseborough](https://github.com/priseborough)
* [Roman Bapst](https://github.com/RomanBapst)
* OS / NuttX [David Sidrane](https://github.com/davids5)
* Driver Architecture [Daniel Agar](https://github.com/dagar)
* Commander Architecture [Julian Oes](https://github.com/julianoes)
* [UAVCAN](https://github.com/PX4/Firmware/labels/uavcan) [Daniel Agar](https://github.com/dagar)
* [State Estimation](https://github.com/PX4/Firmware/issues?q=is%3Aopen+is%3Aissue+label%3A%22state+estimation%22) - [Paul Riseborough](https://github.com/priseborough)
* Vision based navigation
* [Christoph Tobler](https://github.com/ChristophTobler)
* [Mohammed Kabir](https://github.com/mhkabir)
* [Julian Kent](https://github.com/jkflying)
* Obstacle Avoidance - [Martina Rivizzigno](https://github.com/mrivi)
* [Snapdragon](https://github.com/PX4/Firmware/labels/snapdragon)
* [Christoph Tobler](https://github.com/ChristophTobler)
* [Intel Aero](https://github.com/PX4/Firmware/labels/intel%20aero)
* [Sugnan Prabhu](https://github.com/sugnanprabhu)
* [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 - [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).
@@ -86,15 +74,15 @@ This repository contains code supporting these boards:
* [Intel Aero](https://docs.px4.io/en/flight_controller/intel_aero.html)
* [Raspberry PI with Navio 2](https://docs.px4.io/en/flight_controller/raspberry_pi_navio2.html)
* [Parrot Bebop 2](https://dev.px4.io/en/advanced/parrot_bebop.html)
* FMUv2.x
* FMUv2
* [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://docs.px4.io/en/flight_controller/pixhawk-2.html)
* FMUv4.x
* FMUv3 [Pixhawk 2](https://docs.px4.io/en/flight_controller/pixhawk-2.html)
* FMUv4
* [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)
* FMUv5 (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)
+8
View File
@@ -83,6 +83,7 @@ add_custom_command(
${romfs_gen_root_dir}/init.d/rcS
${romfs_gen_root_dir}/init.d/rc.serial
${romfs_gen_root_dir}/init.d/rc.autostart
${romfs_gen_root_dir}/init.d/rc.autostart.post
romfs_copy.stamp
COMMAND ${CMAKE_COMMAND} -E remove_directory ${romfs_gen_root_dir}
# TODO: we should only copy the files in ${romfs_copy_files}
@@ -107,6 +108,11 @@ add_custom_command(
${romfs_cmake_files}
${romfs_copy_files}
${PX4_SOURCE_DIR}/Tools/px_process_airframes.py
${PX4_SOURCE_DIR}/Tools/px4airframes/markdownout.py
${PX4_SOURCE_DIR}/Tools/px4airframes/rcout.py
${PX4_SOURCE_DIR}/Tools/px4airframes/srcparser.py
${PX4_SOURCE_DIR}/Tools/px4airframes/srcscanner.py
${PX4_SOURCE_DIR}/Tools/px4airframes/xmlout.py
${PX4_SOURCE_DIR}/Tools/serial/generate_config.py
COMMENT "ROMFS: copying, generating airframes"
)
@@ -137,6 +143,7 @@ list(APPEND OPTIONAL_BOARD_RC
rc.board_defaults
rc.board_sensors
rc.board_extras
rc.board_mavlink
)
foreach(board_rc_file ${OPTIONAL_BOARD_RC})
@@ -260,6 +267,7 @@ if(SHELLCHECK_PATH)
--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.
--exclude=SC2181 # SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
`find ${romfs_gen_root_dir}/init.d -type f`
DEPENDS ${romfs_gen_root_dir}/init.d/rc.autostart
WORKING_DIRECTORY ${romfs_gen_root_dir}
@@ -14,13 +14,6 @@ then
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
@@ -13,13 +13,6 @@ then
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
@@ -37,7 +37,6 @@ then
param set RWTO_TKOFF 1
param set WEST_EN 1
fi
set MIXER_FILE etc/mixers-sitl/plane_sitl.main.mix
@@ -35,13 +35,10 @@ then
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_MOT_ID 1234
param set VT_FW_MOT_OFFID 1234
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
@@ -35,13 +35,8 @@ then
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
@@ -35,16 +35,11 @@ then
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
+5 -5
View File
@@ -3,7 +3,7 @@
# @name Rover
#
sh /etc/init.d/rc.ugv_defaults
sh /etc/init.d/rc.rover_defaults
if [ $AUTOCNF = yes ]
then
@@ -19,10 +19,6 @@ then
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
@@ -30,6 +26,10 @@ then
param set NAV_LOITER_RAD 2
param set CBRK_AIRSPD_CHK 162128
param set GND_MAX_ANG 0.6
param set GND_WHEEL_BASE 2.0
fi
set MAV_TYPE 10
@@ -10,7 +10,11 @@ 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 MC_PITCHRATE_I 0.05
param set MC_PITCH_P 6.0
param set MC_ROLLRATE_P 0.15
param set MC_ROLLRATE_I 0.1
param set MC_ROLL_P 6.0
param set MPC_XY_VEL_I 0.2
param set MPC_XY_VEL_P 0.15
+22 -32
View File
@@ -65,7 +65,9 @@ fi
# Use environment variable PX4_ESTIMATOR to choose estimator.
if [ "$PX4_ESTIMATOR" = "ekf2" ]; then
if [ "$PX4_ESTIMATOR" = "q" ]; then
param set SYS_MC_EST_GROUP 3
elif [ "$PX4_ESTIMATOR" = "ekf2" ]; then
param set SYS_MC_EST_GROUP 2
elif [ "$PX4_ESTIMATOR" = "lpe" ]; then
param set SYS_MC_EST_GROUP 1
@@ -94,15 +96,16 @@ then
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_ACC0_ID 1311244
param set CAL_ACC_PRIME 1311244
param set CAL_GYRO0_ID 2293768
param set CAL_GYRO_PRIME 2293768
param set CAL_GYRO0_ID 2294028
param set CAL_GYRO_PRIME 2294028
param set CAL_MAG0_ID 196616
param set CAL_MAG_PRIME 196616
param set CAL_MAG0_ID 197388
param set CAL_MAG_PRIME 197388
param set CAL_BARO_PRIME 6620172
param set CBRK_AIRSPD_CHK 0
@@ -116,6 +119,8 @@ then
param set EKF2_ANGERR_INIT 0.01
param set EKF2_HGT_MODE 0
param set EKF2_GBIAS_INIT 0.01
# Speedup SITL startup
param set EKF2_REQ_GPS_H 0.5
# LPE: GPS only mode
param set LPE_FUSION 145
@@ -157,20 +162,21 @@ then
param set SENS_DPRES_OFF 0.001
param set SYS_RESTART_TYPE 2
param set WEST_EN 0
param set TRIG_INTERFACE 3
fi
# Adapt timeout parameters if simulation runs faster or slower than realtime.
if [ ! -z $PX4_SIM_SPEED_FACTOR ]; then
COM_DL_LOSS_T_LONGER=$((PX4_SIM_SPEED_FACTOR * 10))
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=$((PX4_SIM_SPEED_FACTOR * 1))
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=$((PX4_SIM_SPEED_FACTOR * 10))
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
@@ -199,44 +205,28 @@ sh "$autostart_file"
dataman start
replay tryapplyparams
simulator start -s -c $simulator_tcp_port
simulator start -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
if ! param compare -s MNT_MODE_IN -1
then
vmount start
fi
if param greater TRIG_MODE 0
if param greater -s 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.
# rc.fw_apps, rc.mc_apps, rc.rover_apps, and rc.vtol_apps.
#
sh etc/init.d/rc.vehicle_setup
+4 -3
View File
@@ -31,20 +31,21 @@
#
############################################################################
add_subdirectory(airframes)
px4_add_romfs_files(
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.rover_apps
rc.rover_defaults
rc.vehicle_setup
rc.vtol_apps
rc.vtol_defaults
@@ -13,9 +13,4 @@ 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
@@ -14,7 +14,6 @@ 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
@@ -59,11 +58,9 @@ then
param set SYS_RESTART_TYPE 2
param set VT_F_TRANS_THR 0.75
param set VT_MOT_COUNT 4
param set VT_MOT_ID 1234
param set VT_FW_MOT_OFFID 1234
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
@@ -26,10 +26,8 @@ then
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
param set VT_MOT_ID 1234
param set VT_FW_MOT_OFFID 1234
fi
set MAV_TYPE 22
@@ -17,16 +17,20 @@ sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF = yes ]
then
param set MAV_TYPE 19
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
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
param set MC_YAW_P 3.8
param set MC_YAWRATE_P 0.22
param set MC_YAWRATE_I 0.02
@@ -35,7 +39,7 @@ then
param set VT_IDLE_PWM_MC 1080
param set VT_ELEV_MC_LOCK 0
param set VT_MOT_COUNT 2
param set VT_MOT_ID 12
param set VT_TYPE 0
# Indicate that FW roll direction was fixed in mixer, to be removed in v1.10
@@ -44,6 +48,6 @@ fi
set MAV_TYPE 19
set MIXER caipirinha_vtol
set MIXER vtol_tailsitter_duo
set PWM_OUT 1234
@@ -42,15 +42,13 @@ then
param set VT_FW_MOT_OFFID 34
param set VT_IDLE_PWM_MC 1080
param set VT_MOT_COUNT 6
param set VT_MOT_ID 123456
param set VT_FW_MOT_OFFID 56
param set VT_TILT_MC 0.08
param set VT_TILT_TRANS 0.5
param set VT_TILT_FW 0.9
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
@@ -15,13 +15,10 @@ then
param set PWM_MAX 2000
param set PWM_RATE 400
param set VT_MOT_COUNT 4
param set VT_MOT_ID 1234
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
@@ -26,13 +26,9 @@ 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
@@ -58,12 +58,10 @@ then
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_MOT_ID 1234
param set VT_FW_MOT_OFFID 1234
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 MAV_TYPE 22
@@ -45,13 +45,11 @@ then
param set PWM_AUX_DIS3 950
param set PWM_RATE 400
param set VT_MOT_COUNT 4
param set VT_MOT_ID 1234
param set VT_FW_MOT_OFFID 1234
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 MAV_TYPE 22
@@ -35,12 +35,10 @@ then
param set PWM_RATE 400
param set VT_F_TRANS_THR 0.75
param set VT_MOT_COUNT 4
param set VT_MOT_ID 1234
param set VT_FW_MOT_OFFID 1234
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 MAV_TYPE 22
@@ -53,11 +53,9 @@ then
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_MOT_ID 1234
param set VT_FW_MOT_OFFID 1234
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
@@ -72,13 +72,12 @@ then
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_MOT_ID 1234
param set VT_FW_MOT_OFFID 1234
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
@@ -22,7 +22,7 @@ then
param set PWM_MAX 2000
param set PWM_RATE 400
param set VT_MOT_COUNT 4
param set VT_MOT_ID 1234
param set VT_FW_MOT_OFFID 13
param set VT_IDLE_PWM_MC 1080
param set VT_TILT_FW 0.9
@@ -30,9 +30,6 @@ then
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
@@ -69,7 +69,7 @@ then
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_MOT_ID 123
param set VT_TILT_FW 1
param set VT_TILT_MC 0
param set VT_TILT_TRANS 0.45
@@ -77,9 +77,6 @@ then
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
@@ -25,8 +25,6 @@ then
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
@@ -99,7 +97,6 @@ then
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
param set MPC_Z_VEL_MAX_UP 1.5
@@ -133,7 +130,8 @@ then
param set SER_TEL2_BAUD 57600
param set VT_TYPE 2
param set VT_MOT_COUNT 4
param set VT_MOT_ID 1234
param set VT_FW_MOT_OFFID 1234
param set VT_F_TRANS_THR 1
param set VT_DWN_PITCH_MAX 8
param set VT_FW_QC_P 55
@@ -151,8 +149,7 @@ then
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
param set COM_RC_OVERRIDE 0
fi
set MAV_TYPE 22
@@ -15,63 +15,97 @@
# @output MAIN6 motor 2
# @output MAIN7 motor 3
# @output MAIN8 motor 4
#
# @board px4_fmu-v2 exclude
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 BAT_N_CELLS 6
param set FW_AIRSPD_MAX 30
param set FW_AIRSPD_MIN 19
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_MAN_P_MAX 30
param set FW_PR_I 0.1
param set FW_PSP_OFF 3
param set FW_P_LIM_MAX 18
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_RLL_TO_YAW_FF 0.1
param set FW_RR_I 0.1
param set FW_RR_P 0.08
param set FW_R_LIM 45
param set FW_R_RMAX 50
param set FW_THR_CRUISE 0.65
param set FW_THR_MIN 0.3
param set FW_THR_SLEW_MAX 0.6
param set FW_T_HRATE_FF 0
param set FW_T_SINK_MAX 15
param set FW_T_SINK_MIN 3
param set FW_T_THRO_CONST 6
param set FW_T_TIME_CONST 6
param set FW_YR_I 0.1
param set FW_YR_P 0.15
param set IMU_GYRO_CUTOFF 40
param set MC_DTERM_CUTOFF 15
param set MC_PITCHRATE_I 0.2
param set MC_PITCHRATE_MAX 60
param set MC_ROLLRATE_I 0.2
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 MIS_TAKEOFF_ALT 30
param set MPC_ACC_DOWN_MAX 2
param set MPC_ACC_HOR_MAX 2
param set MPC_ACC_UP_MAX 3
param set MC_AIRMODE 1
param set MPC_JERK_AUTO 8
param set MPC_JERK_AUTO 15
param set MPC_LAND_SPEED 1
param set MPC_MAN_TILT_MAX 25
param set MPC_MAN_Y_MAX 40
param set MPC_SPOOLUP_TIME 2
param set MPC_POS_MODE 3
param set MPC_SPOOLUP_TIME 1.5
param set MPC_THR_HOVER 0.45
param set MPC_TILTMAX_AIR 25
param set MPC_TKO_RAMP_T0.8
param set MPC_TKO_RAMP_T 1.8
param set MPC_TKO_SPEED 1
param set MPC_VEL_MANUAL 3
param set MPC_XY_CRUISE 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 MPC_Z_VEL_MAX_DN 1.5
param set MPC_Z_VEL_MAX_UP 2
param set NAV_ACC_RAD 3
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 SENS_BOARD_ROT 4
param set VT_ARSP_TRANS 19
param set VT_B_TRANS_DUR 9
param set VT_ARSP_BLEND 10
param set VT_ARSP_TRANS 21
param set VT_B_DEC_MSS 1.5
param set VT_B_TRANS_DUR 12
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_F_TR_OL_TM 8
param set VT_IDLE_PWM_MC 1000
param set VT_MOT_COUNT 8
param set VT_MOT_ID 5678
param set VT_PSHER_RMP_DT 2
param set VT_TRANS_MIN_TM 6
param set VT_TRANS_MIN_TM 4
param set VT_TYPE 2
fi
@@ -0,0 +1,42 @@
#!/bin/sh
#
# @name Generic Octoplane VTOL
#
# @type VTOL Octoplane
# @class VTOL
#
# @maintainer
#
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 motor 4
# @output MAIN5 motor 5
# @output MAIN6 motor 6
# @output MAIN7 motor 7
# @output MAIN8 motor 8
# @output AUX1 Aileron 1
# @output AUX2 Aileron 2
# @output AUX3 Elevator
# @output AUX4 Rudder
# @output AUX5 Throttle
#
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF = yes ]
then
param set PWM_AUX_DIS5 950
param set PWM_RATE 400
param set VT_TYPE 2
param set VT_MOT_ID 12345678
param set VT_FW_MOT_OFFID 12345678
fi
set MAV_TYPE 22
set MIXER octo_cox
set MIXER_AUX vtol_AAERT
set PWM_OUT 12345678
@@ -0,0 +1,30 @@
#!/bin/sh
#
# @name Generic Tailsitter
#
# @type VTOL Duo Tailsitter
# @class VTOL
#
# @output MAIN1 motor right
# @output MAIN2 motor left
# @output MAIN5 elevon right
# @output MAIN6 elevon left
#
# @maintainer Roman Bapst <roman@px4.io>
#
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF = yes ]
then
param set VT_ELEV_MC_LOCK 0
param set VT_MOT_COUNT 2
param set VT_TYPE 0
param set MAV_TYPE 19
fi
set MAV_TYPE 19
set MIXER vtol_tailsitter_duo
set PWM_OUT 1234
@@ -1,6 +1,6 @@
#!/bin/sh
#
# @name Generic Quadrotor x
# @name Generic Quadcopter
#
# @type Quadrotor x
# @class Copter
@@ -10,7 +10,8 @@
# @board px4_fmu-v4 exclude
# @board px4_fmu-v4pro exclude
# @board px4_fmu-v5 exclude
# @board aerofc-v1 exclude
# @board px4_fmu-v5x exclude
# @board intel_aerofc-v1 exclude
#
# @maintainer Michael Schaeuble
#
@@ -1,6 +1,6 @@
#!/bin/sh
#
# @name S500
# @name S500 Generic
#
# @type Quadrotor x
# @class Copter
@@ -15,12 +15,10 @@ set PWM_OUT 1234
if [ $AUTOCNF = yes ]
then
param set MC_ROLL_P 6.5
param set MC_ROLLRATE_P 0.18
param set MC_ROLLRATE_I 0.15
param set MC_ROLLRATE_D 0.003
param set MC_PITCH_P 6.5
param set MC_PITCHRATE_P 0.18
param set MC_ROLLRATE_I 0.15
param set MC_PITCHRATE_I 0.15
param set MC_ROLLRATE_D 0.003
param set MC_PITCHRATE_D 0.003
fi
@@ -0,0 +1,26 @@
#!/bin/sh
#
# @name Holybro S500
#
# @type Quadrotor x
# @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 IMU_GYRO_CUTOFF 80
param set MC_DTERM_CUTOFF 40
param set MC_ROLLRATE_P 0.14
param set MC_PITCHRATE_P 0.14
param set MC_ROLLRATE_I 0.3
param set MC_PITCHRATE_I 0.3
param set MC_ROLLRATE_D 0.004
param set MC_PITCHRATE_D 0.004
fi
@@ -10,7 +10,8 @@
# @board px4_fmu-v4 exclude
# @board px4_fmu-v4pro exclude
# @board px4_fmu-v5 exclude
# @board aerofc-v1 exclude
# @board px4_fmu-v5x exclude
# @board intel_aerofc-v1 exclude
#
# @maintainer Thomas Gubler <thomas@px4.io>
#
@@ -6,10 +6,12 @@
# @class Copter
#
# @board px4_fmu-v2 exclude
# @board px4_fmu-v3 exclude
# @board px4_fmu-v4 exclude
# @board px4_fmu-v4pro exclude
# @board px4_fmu-v5 exclude
# @board aerofc-v1 exclude
# @board px4_fmu-v5x exclude
# @board intel_aerofc-v1 exclude
#
# @maintainer Andreas Antener <andreas@uaventure.com>
#
@@ -25,14 +27,8 @@ then
param set MPC_XY_VEL_MAX 3
param set MPC_Z_VEL_MAX_DN 2
# 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
param set COM_DISARM_LAND 1
param set RTL_LAND_DELAY 1
param set RTL_DESCEND_ALT 5
param set RTL_RETURN_ALT 15
@@ -10,6 +10,8 @@
# @board px4_fmu-v4 exclude
# @board px4_fmu-v4pro exclude
# @board px4_fmu-v5 exclude
# @board px4_fmu-v5x exclude
# @board intel_aerofc-v1 exclude
#
# @output MAIN1 motor 1
# @output MAIN2 motor 2
@@ -31,7 +33,7 @@ then
param set MC_AIRMODE 2
param set MC_PITCHRATE_D 0.0010
param set MC_PITCHRATE_I 0.4
param set MC_PITCHRATE_I 0.5
param set MC_PITCHRATE_MAX 600
param set MC_PITCHRATE_P 0.0750
param set MC_PITCH_P 6
@@ -48,10 +50,7 @@ then
param set MPC_MAN_TILT_MAX 60
param set MOT_ORDERING 1
param set PWM_DISARMED 950
param set PWM_MAX 1900
param set PWM_MIN 1250
param set PWM_RATE 0
param set DSHOT_CONFIG 600
param set RC_FLT_CUTOFF 0
@@ -17,7 +17,7 @@ if [ $AUTOCNF = yes ]
then
param set MC_ROLL_P 8
param set MC_ROLLRATE_P 0.08
param set MC_ROLLRATE_I 0.2
param set MC_ROLLRATE_I 0.25
param set MC_ROLLRATE_D 0.001
param set MC_PITCH_P 8
param set MC_PITCHRATE_P 0.08
@@ -26,12 +26,12 @@ then
param set MC_AIRMODE 1
param set MC_PITCHRATE_D 0.0012
param set MC_PITCHRATE_I 0.25
param set MC_PITCHRATE_I 0.35
param set MC_PITCHRATE_MAX 1200
param set MC_PITCHRATE_P 0.082
param set MC_PITCH_P 8
param set MC_ROLLRATE_D 0.0012
param set MC_ROLLRATE_I 0.2
param set MC_ROLLRATE_I 0.3
param set MC_ROLLRATE_MAX 1200
param set MC_ROLLRATE_P 0.076
param set MC_ROLL_P 8
@@ -0,0 +1,61 @@
#!/bin/sh
#
# @name Holybro Kopis 2
#
# @type Quadrotor x
# @class Copter
#
# @maintainer Beat Kueng <beat@px4.io>
#
# @board px4_fmu-v2 exclude
#
sh /etc/init.d/rc.mc_defaults
set MIXER quad_x
set PWM_OUT 1234
if [ $AUTOCNF = yes ]
then
param set BAT_N_CELLS 4
param set GPS_1_CONFIG 0
param set RC_PORT_CONFIG 201
param set IMU_GYRO_CUTOFF 120
param set MC_DTERM_CUTOFF 0
param set MC_ROLLRATE_P 0.075
param set MC_ROLLRATE_I 0.25
param set MC_ROLLRATE_D 0.0015
param set MC_ROLLRATE_MAX 1600
param set MC_ROLL_P 10
param set MC_PITCHRATE_P 0.075
param set MC_PITCHRATE_I 0.32
param set MC_PITCHRATE_D 0.0015
param set MC_PITCHRATE_MAX 1600
param set MC_PITCH_P 10
param set MC_YAWRATE_MAX 1000
param set MC_YAWRATE_P 0.15
param set MC_YAW_P 4
param set MOT_ORDERING 1
param set MPC_MANTHR_MIN 0
param set MPC_MAN_TILT_MAX 60
param set DSHOT_CONFIG 1200
param set OSD_ATXXXX_CFG 1
param set THR_MDL_FAC 0.35
param set MPC_THR_CURVE 1
param set MPC_THR_HOVER 0.12
param set MC_AIRMODE 1
param set EV_TSK_RC_LOSS 1
fi
@@ -7,6 +7,7 @@
# @board px4_fmu-v4 exclude
# @board px4_fmu-v4pro exclude
# @board px4_fmu-v5 exclude
# @board px4_fmu-v5x exclude
#
# @type Quadrotor x
# @class Copter
@@ -22,9 +23,6 @@ sh /etc/init.d/rc.mc_defaults
if [ $AUTOCNF = yes ]
then
# Set all params here, then disable autoconfig
param set COM_DISARM_LAND 3
param set EKF2_GPS_POS_X -0.0600
param set EKF2_GPS_POS_Z -0.1000
param set EKF2_MIN_OBS_DT 50
@@ -0,0 +1,123 @@
#!/bin/sh
#
# @name UVify IFO
#
# @type Quadrotor x
# @class Copter
#
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 motor 4
#
# @board px4_fmu-v2 exclude
# @board px4_fmu-v3 exclude
# @board px4_fmu-v4pro exclude
# @board px4_fmu-v5 exclude
# @board px4_fmu-v5x exclude
# @board intel_aerofc-v1 exclude
#
# @maintainer Hyon Lim <lim@uvify.com>
#
set VEHICLE_TYPE mc
set MIXER quad_x
set PWM_OUT 1234
if [ $AUTOCNF = yes ]
then
# Attitude & rate gains
#param set MC_ROLL_P 7.00000
param set MC_ROLLRATE_P 0.15000
#param set MC_ROLLRATE_I 0.90000
param set MC_ROLLRATE_D 0.00130
#param set MC_PITCH_P 7.00000
param set MC_PITCHRATE_P 0.15000
#param set MC_PITCHRATE_I 1.10000
param set MC_PITCHRATE_D 0.00160
param set MC_YAW_P 2.8
param set MC_YAWRATE_P 0.2
#param set MC_YAWRATE_I 0.15
param set MC_YAWRATE_D 0.0
param set MC_YAW_FF 0.5
#param set MC_ROLL_TC 0.19
#param set MC_PITCH_TC 0.16
# Manual mode settings: Unleash Draco R's power :)
#param set MPC_MAN_TILT_MAX 70.00000
#param set MC_PITCHRATE_MAX 1600.00000
#param set MC_ROLLRATE_MAX 1600.00000
#param set MC_YAWRATE_MAX 700.00000
param set MPC_MANTHR_MAX 0.90000
param set MPC_MANTHR_MIN 0.08000
#param set MPC_MAN_TILT_MAX 35.0000
#param set MPC_TILTMAX_AIR 20.0000
# Disable RC filtering
param set RC_FLT_CUTOFF 0.00000
# Filter settings
param set MC_DTERM_CUTOFF 90.00000
param set IMU_GYRO_CUTOFF 100.00000
# Thrust curve (avoids the need for TPA)
#param set THR_MDL_FAC 0.25
# System
param set PWM_MAX 1950
param set PWM_MIN 1100
param set PWM_RATE 0
#param set SYS_FMU_TASK 1
param set SENS_BOARD_ROT 10
# Position control
param set MPC_Z_P 1.00000
param set MPC_Z_VEL_P 0.20000
param set MPC_Z_VEL_I 0.02000
param set MPC_Z_VEL_D 0.00000
param set MPC_THR_MIN 0.06000
param set MPC_THR_MAX 0.40000
param set MPC_THR_HOVER 0.3000
param set MIS_TAKEOFF_ALT 1.1000
param set MPC_XY_P 1.7000
param set MPC_XY_VEL_P 0.1300
param set MPC_XY_VEL_I 0.0600
param set MPC_XY_VEL_D 0.0100
param set MPC_TKO_RAMP_T 1.0000
param set MPC_TKO_SPEED 1.1000
param set MPC_VEL_MANUAL 3.0000
param set BAT_SOURCE 0
param set BAT_N_CELLS 4
param set BAT_V_DIV 10.14
param set BAT_A_PER_V 18.18
#param set CBRK_IO_SAFETY 22027
param set COM_ARM_EKF_AB 0.00500
param set COM_DISARM_LAND 2
# Filter settings
param set IMU_GYRO_CUTOFF 90.00000
param set MC_DTERM_CUTOFF 70.00000
# Don't try to be intelligent on RC loss: just cut the motors
param set NAV_RCL_ACT 6
# enable to use high-rate logging for better rate tracking analysis
# param set SDLOG_PROFILE 19
# TELEM1 ttyS1 - Wifi module
param set MAV_0_CONFIG 101
param set MAV_0_MODE 2 # onboard
param set SER_TEL1_BAUD 921600
# TELEM2 ttyS2 - Sub 1-Ghz
param set MAV_1_CONFIG 102
param set MAV_1_MODE 0 # normal
param set SER_TEL2_BAUD 57600
fi
@@ -0,0 +1,119 @@
#!/bin/sh
#
# @name UVify Draco
#
# @type Quadrotor x
# @class Copter
#
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 motor 4
#
# @board px4_fmu-v2 exclude
# @board px4_fmu-v3 exclude
# @board px4_fmu-v4pro exclude
# @board px4_fmu-v5 exclude
# @board px4_fmu-v5x exclude
# @board intel_aerofc-v1 exclude
#
# @maintainer Hyon Lim <lim@uvify.com>
#
set VEHICLE_TYPE mc
set MIXER quad_x
set PWM_OUT 1234
if [ $AUTOCNF = yes ]
then
# Attitude & rate gains
param set MC_ROLL_P 7.00000
param set MC_ROLLRATE_P 0.15000
param set MC_ROLLRATE_I 0.90000
param set MC_ROLLRATE_D 0.00130
param set MC_PITCH_P 7.00000
param set MC_PITCHRATE_P 0.15000
param set MC_PITCHRATE_I 1.10000
param set MC_PITCHRATE_D 0.00160
param set MC_YAW_P 2.8
param set MC_YAWRATE_P 0.2
param set MC_YAWRATE_I 0.15
param set MC_YAWRATE_D 0.0
param set MC_YAW_FF 0.5
param set MC_ROLL_TC 0.19
param set MC_PITCH_TC 0.16
# Manual mode settings: Unleash Draco R's power :)
param set MPC_MAN_TILT_MAX 70.00000
param set MC_PITCHRATE_MAX 1600.00000
param set MC_ROLLRATE_MAX 1600.00000
param set MC_YAWRATE_MAX 700.00000
param set MPC_MANTHR_MAX 0.90000
param set MPC_MANTHR_MIN 0.08000
param set MPC_MAN_TILT_MAX 35.0000
param set MPC_TILTMAX_AIR 20.0000
# Disable RC filtering
param set RC_FLT_CUTOFF 0.00000
# Filter settings
param set MC_DTERM_CUTOFF 90.00000
param set IMU_GYRO_CUTOFF 100.00000
# Thrust curve (avoids the need for TPA)
param set THR_MDL_FAC 0.25
# System
param set PWM_MAX 1950
param set PWM_MIN 1100
param set PWM_RATE 0
param set SYS_FMU_TASK 1
param set SENS_BOARD_ROT 2
# Position control
param set MPC_Z_P 1.00000
param set MPC_Z_VEL_P 0.20000
param set MPC_Z_VEL_I 0.02000
param set MPC_Z_VEL_D 0.00000
param set MPC_THR_MIN 0.06000
param set MPC_THR_MAX 0.40000
param set MPC_THR_HOVER 0.3000
param set MIS_TAKEOFF_ALT 1.1000
param set MPC_XY_P 1.7000
param set MPC_XY_VEL_P 0.1300
param set MPC_XY_VEL_I 0.0600
param set MPC_XY_VEL_D 0.0100
param set MPC_TKO_RAMP_T 1.0000
param set MPC_TKO_SPEED 1.1000
param set MPC_VEL_MANUAL 3.0000
param set BAT_SOURCE 0
param set CBRK_IO_SAFETY 22027
param set COM_ARM_EKF_AB 0.00500
param set COM_DISARM_LAND 3
# Filter settings
param set IMU_GYRO_CUTOFF 90.00000
param set MC_DTERM_CUTOFF 70.00000
# Don't try to be intelligent on RC loss: just cut the motors
param set NAV_RCL_ACT 6
# enable to use high-rate logging for better rate tracking analysis
# param set SDLOG_PROFILE 19
# TELEM1 ttyS1
param set MAV_0_CONFIG 101
param set MAV_0_MODE 2 # onboard
param set MAV_0_RATE 20000
param set SER_TEL1_BAUD 921600
# TELEM2 ttyS2
param set MAV_1_CONFIG 0
fi
@@ -6,6 +6,7 @@
# @class Copter
#
# @board px4_fmu-v2 exclude
# @board intel_aerofc-v1 exclude
#
# @maintainer Anton Matosov <anton.matosov@gmail.com>
#
@@ -7,10 +7,10 @@
#
# @board px4_fmu-v2 exclude
# @board px4_fmu-v3 exclude
# @board px4_fmu-v4 exclude
# @board px4_fmu-v4pro exclude
# @board px4_fmu-v5 exclude
# @board aerofc-v1 exclude
# @board px4_fmu-v5x exclude
# @board intel_aerofc-v1 exclude
#
# @maintainer Henry Zhang <zhanghui629@gmail.com>
#
@@ -47,7 +47,7 @@ then
param set CAL_MAG0_ROT 0
param set CAL_MAG_SIDES 63
param set SENS_BOARD_ROT 0
param set COM_ARM_MAG 1.5
param set COM_ARM_MAG_ANG -1
param set COM_ARM_EKF_AB 0.0032
# circuit breakers
@@ -7,7 +7,8 @@
# @board px4_fmu-v4 exclude
# @board px4_fmu-v4pro exclude
# @board px4_fmu-v5 exclude
# @board aerofc-v1 exclude
# @board px4_fmu-v5x exclude
# @board intel_aerofc-v1 exclude
#
# @type Quadrotor x
# @class Copter
@@ -13,7 +13,7 @@
# @board px4_fmu-v2 exclude
#
sh /etc/init.d/rc.ugv_defaults
sh /etc/init.d/rc.rover_defaults
if [ $AUTOCNF = yes ]
then
@@ -54,10 +54,10 @@ then
param set PWM_MIN 1000
fi
# Configure this as ugv
# Configure this as rover
set MAV_TYPE 10
# Set mixer
set MIXER ugv_generic
set MIXER rover_generic
set PWM_MAIN_REV2 1
@@ -17,7 +17,7 @@
# @board px4_fmu-v2 exclude
#
sh /etc/init.d/rc.ugv_defaults
sh /etc/init.d/rc.rover_defaults
#
# This section can be enabled once tuning parameters for this particular
@@ -15,7 +15,7 @@
# @board px4_fmu-v2 exclude
#
sh /etc/init.d/rc.ugv_defaults
sh /etc/init.d/rc.rover_defaults
if [ $AUTOCNF = yes ]
then
@@ -56,7 +56,7 @@ then
param set PWM_MIN 1000
fi
# Configure this as ugv
# Configure this as rover
set MAV_TYPE 10
# Set mixer
@@ -15,7 +15,7 @@
# @board px4_fmu-v2 exclude
#
sh /etc/init.d/rc.ugv_defaults
sh /etc/init.d/rc.rover_defaults
if [ $AUTOCNF = yes ]
then
@@ -29,15 +29,19 @@ then
param set FW_AIRSPD_TRIM 1
param set FW_AIRSPD_MAX 3
param set GND_WR_P 1
param set GND_WR_I 0.9674
param set GND_WR_IMAX 0.1
param set GND_WR_D 0.1
param set GND_SP_CTRL_MODE 1
param set GND_L1_DIST 10
param set GND_L1_DIST 5.0
param set GND_L1_PERIOD 3.0
param set GND_THR_IDLE 0
param set GND_THR_CRUISE 0
param set GND_THR_CRUISE 0.7
param set GND_THR_MAX 0.5
# Because this is differential drive, it can make a turn with radius 0.
# This corresponds to a turn angle of pi radians.
# If a special case is made for differential-drive, this will need to change.
param set GND_MAX_ANG 3.142
param set GND_WHEEL_BASE 0.3
# TODO: Set to -1.0, to allow reversing. This will require many changes in the codebase
# to support negative throttle.
param set GND_THR_MIN 0.0
@@ -62,12 +66,25 @@ then
# Enable Airspeed check circuit breaker because Rovers will have no airspeed sensor
param set CBRK_AIRSPD_CHK 162128
# Differential drive acts like ackermann steering with a maximum turn angle of 180 degrees, or pi radians
param set GND_MAX_ANG 3.1415
param set RBCLW_BAUD 8
param set RBCLW_COUNTS_REV 1200
param set RBCLW_ADDRESS 128
# param set SER_TEL4_BAUD 115200
# 104 corresponds to Telem 4
param set RBCLW_SER_CFG 104
fi
# Configure this as ugv
# Start this driver after setting parameters, because the driver uses some of those parameters.
# roboclaw start /dev/ttyS3
# Configure this as rover
set MAV_TYPE 10
# Set mixer
set MIXER generic_differential_rover
set MIXER generic_diff_rover
set PWM_MAIN_REV2 1
@@ -0,0 +1,177 @@
#!/bin/sh
#
# @name UVify Draco-R
#
# @type Hexarotor x
# @class Copter
#
# @output MAIN1 motor 1
# @output MAIN2 motor 2
# @output MAIN3 motor 3
# @output MAIN4 motor 4
# @output MAIN5 motor 5
# @output MAIN6 motor 6
#
# @board px4_fmu-v2 exclude
# @board px4_fmu-v3 exclude
# @board px4_fmu-v4pro exclude
# @board px4_fmu-v5 exclude
# @board px4_fmu-v5x exclude
# @board intel_aerofc-v1 exclude
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
#
# @maintainer Hyon Lim <lim@uvify.com>
#
set VEHICLE_TYPE mc
set MIXER hexa_x
set PWM_OUT 123456
if [ $AUTOCNF = yes ]
then
# Attitude & rate gains
param set MC_ROLL_P 6.50000
param set MC_ROLLRATE_P 0.15000
param set MC_ROLLRATE_I 0.05000
param set MC_ROLLRATE_D 0.00130
param set MC_PITCH_P 6.50000
param set MC_PITCHRATE_P 0.15000
param set MC_PITCHRATE_I 0.05000
param set MC_PITCHRATE_D 0.00160
param set MC_YAW_P 2.80000
param set MC_YAWRATE_P 0.20000
param set MC_YAWRATE_I 0.10000
param set MC_YAWRATE_D 0.00000
param set MC_YAW_FF 0.00000
#param set MC_ROLL_TC 0.19
#param set MC_PITCH_TC 0.16
# Manual mode settings: Unleash Draco R's power :)
param set MPC_MAN_TILT_MAX 70.00000
param set MPC_MANTHR_MAX 0.90000
param set MPC_MANTHR_MIN 0.08000
param set MPC_MAN_TILT_MAX 35.0000
param set MPC_TILTMAX_AIR 45.0000
param set MPC_POS_MODE 2
param set MPC_AUTO_MODE 1
param set MPC_ACC_HOR 8.0000
param set MC_PITCHRATE_MAX 800.00000
param set MC_ROLLRATE_MAX 800.00000
param set MC_YAWRATE_MAX 700.00000
# Disable RC filtering
param set RC_FLT_CUTOFF 0.00000
# Filter settings
param set MC_DTERM_CUTOFF 90.00000
param set IMU_GYRO_CUTOFF 100.00000
# Thrust curve (avoids the need for TPA)
param set THR_MDL_FAC 0.25
# System
param set PWM_MAX 1950
param set PWM_MIN 1100
param set PWM_MAIN_DIS5 980
param set PWM_MAIN_DIS6 980
param set SYS_FMU_TASK 1
param set SENS_BOARD_ROT 2
param set COM_ARM_MAG 0.2000
# Sensors
param set SENS_EN_LL40LS 2
param set SENS_FLOW_ROT 2
# Position control
param set MPC_Z_P 1.00000
param set MPC_Z_VEL_P 0.20000
param set MPC_Z_VEL_I 0.02000
param set MPC_Z_VEL_D 0.00000
param set MPC_THR_MIN 0.06000
param set MPC_THR_MAX 0.40000
param set MPC_THR_HOVER 0.3000
param set MIS_TAKEOFF_ALT 1.1000
param set MPC_XY_P 0.9500
param set MPC_XY_VEL_P 0.0900
param set MPC_XY_VEL_I 0.0200
param set MPC_XY_VEL_D 0.0100
param set MPC_TKO_RAMP_T 0.4000
param set MPC_TKO_SPEED 1.5000
param set MPC_VEL_MANUAL 10.0000
# EKF
# Set baro first
param set EKF2_HGT_MODE 1
# Enable optical flow and GPS
param set EKF2_AID_MASK 1
param set EKF2_RNG_AID 0
param set EKF2_MAG_TYPE 1
param set EKF2_OF_QMIN 80.0000
#
param set CBRK_IO_SAFETY 22027
param set SYS_COMPANION 921600
param set COM_DISARM_LAND 3
#PWM
# ONESHOT
param set PWM_RATE 0
# gimbal
#param set MNT_DO_STAB 1
#param set MNT_MAN_PITCH 1
#param set MNT_MAN_ROLL 2
#param set MNT_MODE_IN 1
param set BAT_SOURCE 0
param set BAT_N_CELLS 4
param set BAT_V_DIV 10.133
# TELEM1 ttyS1
param set MAV_0_CONFIG 101
param set MAV_0_MODE 1 # onboard
param set MAV_0_FORWARD 1
param set SER_TEL1_BAUD 57600
# TELEM2 ttyS2
param set MAV_1_CONFIG 102
param set MAV_1_MODE 2
param set MAV_1_RATE 800000
param set MAV_1_FORWARD 1
param set SER_TEL2_BAUD 921600
fi
#set PWM_OUT 12345678
#set MIXER_AUX mount_2axes
#set PWM_AUX_OUT 78
#set PWM_AUX_RATE 50
#set OUTPUT_AUX_DEV /dev/pwm_output0
#set OUTPUT_AUX_TO_MAIN yes
#set MIXER_APPEND yes
#if mixer append /dev/pwm_output0 /etc/mixers/mount_2axes.aux.mix
#then
# echo "INFO [6002] Mixer append success"
#else
# echo "ERROR [6002] Mixer append failed"
#fi
#if pwm rate -c 78 -r 50 -d /dev/pwm_output0
#then
# echo "INFO [6002] PWM RATE CHANGE SUCCESS"
#else
# echo "INFO [6002] PWM RATE CHANGE FAILED"
#fi
@@ -69,6 +69,7 @@ px4_add_romfs_files(
4012_quad_x_can
4013_bebop
4014_s500
4015_holybro_s500
4020_hk_micro_pcb
4030_3dr_solo
4031_3dr_quad
@@ -77,8 +78,11 @@ px4_add_romfs_files(
4050_generic_250
4051_s250aq
4052_holybro_qav250
4053_holybro_kopis2
4060_dji_matrice_100
4070_aerofc
4071_ifo
4072_draco
4080_zmr250
4090_nanomind
4100_tiltquadrotor
@@ -90,6 +94,7 @@ px4_add_romfs_files(
# [6000, 6999] Hexarotor x"
6001_hexa_x
6002_draco_r
# [7000, 7999] Hexarotor +"
7001_hexa_+
@@ -127,6 +132,7 @@ px4_add_romfs_files(
13010_claire
13012_convergence
13013_deltaquad
13200_generic_vtol_tailsitter
# [14000, 14999] Tri Y
14001_tri_y_yaw+
+1 -2
View File
@@ -15,9 +15,8 @@ ekf2 start
#
fw_att_control start
fw_pos_control_l1 start
# airspeed_selector start
#
# Start Land Detector.
#
land_detector start fixedwing
+3 -2
View File
@@ -13,8 +13,8 @@ then
# Default parameters for fixed wing UAVs.
#
param set COM_POS_FS_DELAY 5
param set COM_POS_FS_EPH 25
param set COM_POS_FS_EPV 50
param set COM_POS_FS_EPH 15
param set COM_POS_FS_EPV 30
param set COM_POS_FS_GAIN 0
param set COM_POS_FS_PROB 1
param set COM_VEL_FS_EVH 5
@@ -30,6 +30,7 @@ then
param set EKF2_REQ_SACC 1
param set EKF2_REQ_VDRIFT 1.0
param set RTL_TYPE 1
param set RTL_RETURN_ALT 100
param set RTL_DESCEND_ALT 100
param set RTL_LAND_DELAY -1
+94 -82
View File
@@ -9,6 +9,7 @@
# Otherwise, the variable name goes to the end of the argument.
#
set FMU_CMD fmu
set MIXER_AUX_FILE none
set OUTPUT_AUX_DEV /dev/pwm_output1
set OUTPUT_DEV none
@@ -17,19 +18,15 @@ set OUTPUT_DEV none
# If mount (gimbal) control is enabled and output mode is AUX, set the aux
# mixer to mount (override the airframe-specific MIXER_AUX setting).
#
if ! param compare MNT_MODE_IN -1
if ! param compare -s MNT_MODE_IN -1
then
if param compare MNT_MODE_OUT 0
if param compare -s MNT_MODE_OUT 0
then
set MIXER_AUX mount
fi
fi
if ver hwcmp INTEL_AEROFC_V1 AV_X_V1 BITCRAZE_CRAZYFLIE AIRMIND_MINDPX_V2 NXP_FMUK66_V3 PX4_FMU_V4 OMNIBUS_F4SD PX4_SITL
then
set MIXER_AUX none
fi
# USE_IO is set to 'no' for all boards w/o px4io driver or SYS_USE_IO disabled
if [ $USE_IO = no ]
then
set MIXER_AUX none
@@ -46,9 +43,19 @@ then
if [ $IO_PRESENT = yes ]
then
set OUTPUT_MODE io
if param greater DSHOT_CONFIG 0
then
set FMU_CMD dshot
fi
fi
else
set OUTPUT_MODE fmu
if param greater DSHOT_CONFIG 0
then
set OUTPUT_MODE dshot
set FMU_CMD dshot
else
set OUTPUT_MODE fmu
fi
fi
fi
@@ -77,18 +84,18 @@ then
if [ $OUTPUT_MODE = hil -o $OUTPUT_MODE = sim ]
then
if ! pwm_out_sim start
if ! pwm_out_sim start -m $OUTPUT_MODE
then
# Error tune.
tune_control play -t 2
fi
fi
if [ $OUTPUT_MODE = fmu ]
if [ $OUTPUT_MODE = $FMU_CMD ]
then
if ! fmu mode_$FMU_MODE $FMU_ARGS
if ! $FMU_CMD mode_$FMU_MODE
then
echo "FMU start failed" >> $LOG_FILE
echo "$FMU_CMD start failed" >> $LOG_FILE
# Error tune.
tune_control play -t 2
fi
@@ -199,7 +206,7 @@ then
if [ $MIXER_AUX_FILE != none ]
then
if fmu mode_${AUX_MODE} $FMU_ARGS
if $FMU_CMD mode_${AUX_MODE}
then
# Append aux mixer to main device.
if param greater SYS_HITL 0
@@ -232,82 +239,86 @@ then
set FAILSAFE_AUX none
fi
# Set min / max for aux out and rates.
if [ $PWM_AUX_OUT != none ]
# for DShot do not configure pwm values
if [ $FMU_CMD != dshot ]
then
# Set PWM_AUX output frequency.
if [ $PWM_AUX_RATE != none ]
# Set min / max for aux out and rates.
if [ $PWM_AUX_OUT != none ]
then
pwm rate -c ${PWM_AUX_OUT} -r ${PWM_AUX_RATE} -d ${OUTPUT_AUX_DEV}
# Set PWM_AUX output frequency.
if [ $PWM_AUX_RATE != none ]
then
pwm rate -c ${PWM_AUX_OUT} -r ${PWM_AUX_RATE} -d ${OUTPUT_AUX_DEV}
fi
# Set disarmed, min and max PWM_AUX values.
if [ $PWM_AUX_DISARMED != none ]
then
pwm disarmed -c ${PWM_AUX_OUT} -p ${PWM_AUX_DISARMED} -d ${OUTPUT_AUX_DEV}
fi
if [ $PWM_AUX_MIN != none ]
then
pwm min -c ${PWM_AUX_OUT} -p ${PWM_AUX_MIN} -d ${OUTPUT_AUX_DEV}
fi
if [ $PWM_AUX_MAX != none ]
then
pwm max -c ${PWM_AUX_OUT} -p ${PWM_AUX_MAX} -d ${OUTPUT_AUX_DEV}
fi
fi
# Set disarmed, min and max PWM_AUX values.
if [ $PWM_AUX_DISARMED != none ]
#
# Per channel disarmed settings.
#
pwm disarmed -c 1 -p p:PWM_AUX_DIS1 -d ${OUTPUT_AUX_DEV}
pwm disarmed -c 2 -p p:PWM_AUX_DIS2 -d ${OUTPUT_AUX_DEV}
pwm disarmed -c 3 -p p:PWM_AUX_DIS3 -d ${OUTPUT_AUX_DEV}
pwm disarmed -c 4 -p p:PWM_AUX_DIS4 -d ${OUTPUT_AUX_DEV}
pwm disarmed -c 5 -p p:PWM_AUX_DIS5 -d ${OUTPUT_AUX_DEV}
pwm disarmed -c 6 -p p:PWM_AUX_DIS6 -d ${OUTPUT_AUX_DEV}
pwm disarmed -c 7 -p p:PWM_AUX_DIS7 -d ${OUTPUT_AUX_DEV}
pwm disarmed -c 8 -p p:PWM_AUX_DIS8 -d ${OUTPUT_AUX_DEV}
#
# Per channel min settings.
#
pwm min -c 1 -p p:PWM_AUX_MIN1 -d ${OUTPUT_AUX_DEV}
pwm min -c 2 -p p:PWM_AUX_MIN2 -d ${OUTPUT_AUX_DEV}
pwm min -c 3 -p p:PWM_AUX_MIN3 -d ${OUTPUT_AUX_DEV}
pwm min -c 4 -p p:PWM_AUX_MIN4 -d ${OUTPUT_AUX_DEV}
pwm min -c 5 -p p:PWM_AUX_MIN5 -d ${OUTPUT_AUX_DEV}
pwm min -c 6 -p p:PWM_AUX_MIN6 -d ${OUTPUT_AUX_DEV}
pwm min -c 7 -p p:PWM_AUX_MIN7 -d ${OUTPUT_AUX_DEV}
pwm min -c 8 -p p:PWM_AUX_MIN8 -d ${OUTPUT_AUX_DEV}
#
# Per channel max settings.
#
pwm max -c 1 -p p:PWM_AUX_MAX1 -d ${OUTPUT_AUX_DEV}
pwm max -c 2 -p p:PWM_AUX_MAX2 -d ${OUTPUT_AUX_DEV}
pwm max -c 3 -p p:PWM_AUX_MAX3 -d ${OUTPUT_AUX_DEV}
pwm max -c 4 -p p:PWM_AUX_MAX4 -d ${OUTPUT_AUX_DEV}
pwm max -c 5 -p p:PWM_AUX_MAX5 -d ${OUTPUT_AUX_DEV}
pwm max -c 6 -p p:PWM_AUX_MAX6 -d ${OUTPUT_AUX_DEV}
pwm max -c 7 -p p:PWM_AUX_MAX7 -d ${OUTPUT_AUX_DEV}
pwm max -c 8 -p p:PWM_AUX_MAX8 -d ${OUTPUT_AUX_DEV}
if [ $FAILSAFE_AUX != none ]
then
pwm disarmed -c ${PWM_AUX_OUT} -p ${PWM_AUX_DISARMED} -d ${OUTPUT_AUX_DEV}
fi
if [ $PWM_AUX_MIN != none ]
then
pwm min -c ${PWM_AUX_OUT} -p ${PWM_AUX_MIN} -d ${OUTPUT_AUX_DEV}
fi
if [ $PWM_AUX_MAX != none ]
then
pwm max -c ${PWM_AUX_OUT} -p ${PWM_AUX_MAX} -d ${OUTPUT_AUX_DEV}
pwm failsafe -c ${PWM_AUX_OUT} -p ${FAILSAFE} -d ${OUTPUT_AUX_DEV}
fi
#
# Per channel failsafe settings.
#
pwm failsafe -c 1 -p p:PWM_AUX_FAIL1 -d ${OUTPUT_AUX_DEV}
pwm failsafe -c 2 -p p:PWM_AUX_FAIL2 -d ${OUTPUT_AUX_DEV}
pwm failsafe -c 3 -p p:PWM_AUX_FAIL3 -d ${OUTPUT_AUX_DEV}
pwm failsafe -c 4 -p p:PWM_AUX_FAIL4 -d ${OUTPUT_AUX_DEV}
pwm failsafe -c 5 -p p:PWM_AUX_FAIL5 -d ${OUTPUT_AUX_DEV}
pwm failsafe -c 6 -p p:PWM_AUX_FAIL6 -d ${OUTPUT_AUX_DEV}
pwm failsafe -c 7 -p p:PWM_AUX_FAIL7 -d ${OUTPUT_AUX_DEV}
pwm failsafe -c 8 -p p:PWM_AUX_FAIL8 -d ${OUTPUT_AUX_DEV}
fi
#
# Per channel disarmed settings.
#
pwm disarmed -c 1 -p p:PWM_AUX_DIS1 -d ${OUTPUT_AUX_DEV}
pwm disarmed -c 2 -p p:PWM_AUX_DIS2 -d ${OUTPUT_AUX_DEV}
pwm disarmed -c 3 -p p:PWM_AUX_DIS3 -d ${OUTPUT_AUX_DEV}
pwm disarmed -c 4 -p p:PWM_AUX_DIS4 -d ${OUTPUT_AUX_DEV}
pwm disarmed -c 5 -p p:PWM_AUX_DIS5 -d ${OUTPUT_AUX_DEV}
pwm disarmed -c 6 -p p:PWM_AUX_DIS6 -d ${OUTPUT_AUX_DEV}
pwm disarmed -c 7 -p p:PWM_AUX_DIS7 -d ${OUTPUT_AUX_DEV}
pwm disarmed -c 8 -p p:PWM_AUX_DIS8 -d ${OUTPUT_AUX_DEV}
#
# Per channel min settings.
#
pwm min -c 1 -p p:PWM_AUX_MIN1 -d ${OUTPUT_AUX_DEV}
pwm min -c 2 -p p:PWM_AUX_MIN2 -d ${OUTPUT_AUX_DEV}
pwm min -c 3 -p p:PWM_AUX_MIN3 -d ${OUTPUT_AUX_DEV}
pwm min -c 4 -p p:PWM_AUX_MIN4 -d ${OUTPUT_AUX_DEV}
pwm min -c 5 -p p:PWM_AUX_MIN5 -d ${OUTPUT_AUX_DEV}
pwm min -c 6 -p p:PWM_AUX_MIN6 -d ${OUTPUT_AUX_DEV}
pwm min -c 7 -p p:PWM_AUX_MIN7 -d ${OUTPUT_AUX_DEV}
pwm min -c 8 -p p:PWM_AUX_MIN8 -d ${OUTPUT_AUX_DEV}
#
# Per channel max settings.
#
pwm max -c 1 -p p:PWM_AUX_MAX1 -d ${OUTPUT_AUX_DEV}
pwm max -c 2 -p p:PWM_AUX_MAX2 -d ${OUTPUT_AUX_DEV}
pwm max -c 3 -p p:PWM_AUX_MAX3 -d ${OUTPUT_AUX_DEV}
pwm max -c 4 -p p:PWM_AUX_MAX4 -d ${OUTPUT_AUX_DEV}
pwm max -c 5 -p p:PWM_AUX_MAX5 -d ${OUTPUT_AUX_DEV}
pwm max -c 6 -p p:PWM_AUX_MAX6 -d ${OUTPUT_AUX_DEV}
pwm max -c 7 -p p:PWM_AUX_MAX7 -d ${OUTPUT_AUX_DEV}
pwm max -c 8 -p p:PWM_AUX_MAX8 -d ${OUTPUT_AUX_DEV}
if [ $FAILSAFE_AUX != none ]
then
pwm failsafe -c ${PWM_AUX_OUT} -p ${FAILSAFE} -d ${OUTPUT_AUX_DEV}
fi
#
# Per channel failsafe settings.
#
pwm failsafe -c 1 -p p:PWM_AUX_FAIL1 -d ${OUTPUT_AUX_DEV}
pwm failsafe -c 2 -p p:PWM_AUX_FAIL2 -d ${OUTPUT_AUX_DEV}
pwm failsafe -c 3 -p p:PWM_AUX_FAIL3 -d ${OUTPUT_AUX_DEV}
pwm failsafe -c 4 -p p:PWM_AUX_FAIL4 -d ${OUTPUT_AUX_DEV}
pwm failsafe -c 5 -p p:PWM_AUX_FAIL5 -d ${OUTPUT_AUX_DEV}
pwm failsafe -c 6 -p p:PWM_AUX_FAIL6 -d ${OUTPUT_AUX_DEV}
pwm failsafe -c 7 -p p:PWM_AUX_FAIL7 -d ${OUTPUT_AUX_DEV}
pwm failsafe -c 8 -p p:PWM_AUX_FAIL8 -d ${OUTPUT_AUX_DEV}
fi
fi
@@ -390,6 +401,7 @@ then
pwm failsafe -c 8 -p p:PWM_MAIN_FAIL8
fi
unset FMU_CMD
unset MIXER_AUX_FILE
unset OUTPUT_AUX_DEV
unset OUTPUT_DEV
+9 -1
View File
@@ -2,9 +2,17 @@
#
# PX4IO interface init script.
#
# If $OUTPUT_MODE indicated Hardware-int-the-loop simulation, px4io should not publish actuator_outputs,
# instead, pwm_out_sim will publish that uORB
if [ $OUTPUT_MODE = hil ]
then
set HIL_ARG $OUTPUT_MODE
fi
if [ $USE_IO = yes -a $IO_PRESENT = yes ]
then
if px4io start
if px4io start $HIL_ARG
then
# Allow PX4IO to recover from midair restarts.
px4io recovery
+8 -6
View File
@@ -4,13 +4,10 @@
# NOTE: Script variables are declared/initialized/unset in the rcS script.
#
if ! ver hwcmp PX4_SITL
if param greater -s UAVCAN_ENABLE 1
then
if param greater UAVCAN_ENABLE 1
then
# Reduce logger buffer to free up some RAM for UAVCAN servers.
set LOGGER_BUF 6
fi
# Reduce logger buffer to free up some RAM for UAVCAN servers.
set LOGGER_BUF 6
fi
###############################################################################
@@ -27,6 +24,11 @@ then
set LOGGER_ARGS "-f"
fi
if param compare SDLOG_MODE 3
then
set LOGGER_ARGS "-x"
fi
if ! param compare SDLOG_MODE -1
then
logger start -b ${LOGGER_BUF} -t ${LOGGER_ARGS}
-138
View File
@@ -1,138 +0,0 @@
#!/bin/sh
#
# MAVLink startup script.
#
# NOTE: Script variables are declared/initialized/unset in the rcS script.
#
if ! ver hwcmp INTEL_AEROFC_V1
then
# Start MAVLink on the USB port
mavlink start -r 800000 -d /dev/ttyACM0 -m config -x
fi
#
# SYS_COMPANION transition support. Can be removed after the next release (currently at 1.8.0)
#
if param compare SYS_COMPANION 319200
then
param set MAV_1_CONFIG 102
param set MAV_1_RATE 1000
param set SER_TEL2_BAUD 19200
param set SYS_COMPANION 0
fi
if param compare SYS_COMPANION 519200
then
param set MAV_1_CONFIG 102
param set MAV_1_MODE 7
param set MAV_1_RATE 1000
param set SER_TEL2_BAUD 19200
param set SYS_COMPANION 0
fi
if param compare SYS_COMPANION 338400
then
param set MAV_1_CONFIG 102
param set MAV_1_RATE 1000
param set SER_TEL2_BAUD 38400
param set SYS_COMPANION 0
fi
if param compare SYS_COMPANION 538400
then
param set MAV_1_CONFIG 102
param set MAV_1_MODE 7
param set MAV_1_RATE 1000
param set SER_TEL2_BAUD 38400
param set SYS_COMPANION 0
fi
if param compare SYS_COMPANION 57600
then
param set MAV_1_CONFIG 102
param set MAV_1_MODE 2
param set MAV_1_RATE 5000
param set SER_TEL2_BAUD 57600
param set SYS_COMPANION 0
fi
if param compare SYS_COMPANION 157600
then
param set MAV_1_CONFIG 102
param set MAV_1_MODE 3
param set MAV_1_RATE 1000
param set SER_TEL2_BAUD 57600
param set SYS_COMPANION 0
fi
if param compare SYS_COMPANION 257600
then
param set MAV_1_CONFIG 102
param set MAV_1_MODE 4
param set MAV_1_RATE 5000
param set SER_TEL2_BAUD 57600
param set SYS_COMPANION 0
fi
if param compare SYS_COMPANION 357600
then
param set MAV_1_CONFIG 102
param set MAV_1_RATE 1000
param set SER_TEL2_BAUD 57600
param set SYS_COMPANION 0
fi
if param compare SYS_COMPANION 557600
then
param set MAV_1_CONFIG 102
param set MAV_1_RATE 1000
param set MAV_1_MODE 7
param set SER_TEL2_BAUD 57600
param set SYS_COMPANION 0
fi
if param compare SYS_COMPANION 3115200
then
param set MAV_1_CONFIG 102
param set MAV_1_RATE 1000
param set SER_TEL2_BAUD 115200
param set SYS_COMPANION 0
fi
if param compare SYS_COMPANION 4115200
then
# Iridium
param set ISBD_CONFIG 102
param set SYS_COMPANION 0
fi
if param compare SYS_COMPANION 5115200
then
param set MAV_1_CONFIG 102
param set MAV_1_RATE 1000
param set MAV_1_MODE 7
param set SER_TEL2_BAUD 115200
param set SYS_COMPANION 0
fi
if param compare SYS_COMPANION 460800
then
param set MAV_1_CONFIG 102
param set MAV_1_RATE 5000
param set MAV_1_MODE 2
param set SER_TEL2_BAUD 460800
param set SYS_COMPANION 0
fi
if param compare SYS_COMPANION 921600
then
param set MAV_1_CONFIG 102
param set MAV_1_RATE 80000
param set MAV_1_MODE 2
param set SER_TEL2_BAUD 921600
param set SYS_COMPANION 0
fi
if param compare SYS_COMPANION 1921600
then
param set MAV_1_CONFIG 102
param set MAV_1_RATE 20000
param set SER_TEL2_BAUD 921600
param set SYS_COMPANION 0
fi
if param compare SYS_COMPANION 1500000
then
param set MAV_1_CONFIG 102
param set MAV_1_RATE 140000
param set MAV_1_MODE 2
param set SER_TEL2_BAUD 1500000
param set SYS_COMPANION 0
fi
+11 -3
View File
@@ -30,10 +30,18 @@ then
fi
else
#
# EKF2
# Q estimator (attitude estimation only)
#
param set SYS_MC_EST_GROUP 2
ekf2 start
if param compare SYS_MC_EST_GROUP 3
then
attitude_estimator_q start
else
#
# EKF2
#
param set SYS_MC_EST_GROUP 2
ekf2 start
fi
fi
###############################################################################
@@ -26,4 +26,3 @@ fi
set MIXER_AUX pass
set PWM_AUX_OUT 1234
set PWM_AUX_RATE 50
@@ -16,11 +16,10 @@ ekf2 start
#
# Start attitude controllers.
#
gnd_att_control start
gnd_pos_control start
rover_pos_control start
#
# Start Land Detector.
#
land_detector start ugv
land_detector start rover
@@ -5,7 +5,7 @@
# NOTE: Script variables are declared/initialized/unset in the rcS script.
#
set VEHICLE_TYPE ugv
set VEHICLE_TYPE rover
if [ $AUTOCNF = yes ]
then
@@ -40,4 +40,3 @@ set PWM_RATE 50
#
set MIXER_AUX pass
set PWM_AUX_OUT 1234
set PWM_AUX_RATE 50
+21 -17
View File
@@ -15,14 +15,6 @@ then
fmu i2c 2 100000
fi
# External SPI
ms5611 -S start
# Internal SPI (auto detect ms5611 or ms5607)
ms5611 -T 0 -s start
# Blacksheep telemetry
bst start
adc start
fi
@@ -55,13 +47,13 @@ then
fi
fi
if param compare SENS_EN_BATT 1
if param compare -s SENS_EN_BATT 1
then
batt_smbus start -X
fi
# Sensors on the PWM interface bank
if param compare SENS_EN_LL40LS 1
if param compare -s SENS_EN_LL40LS 1
then
if pwm_input start
then
@@ -70,41 +62,53 @@ then
fi
# Lidar-Lite on I2C
if param compare SENS_EN_LL40LS 2
if param compare -s SENS_EN_LL40LS 2
then
ll40ls start i2c
ll40ls start i2c -a
fi
# mappydot lidar sensor
if param compare -s SENS_EN_MPDT 1
then
mappydot start -a
fi
# mb12xx sonar sensor
if param greater SENS_EN_MB12XX 0
if param greater -s SENS_EN_MB12XX 0
then
mb12xx start -a
fi
# pga460 sonar sensor
if param greater SENS_EN_PGA460 0
if param greater -s SENS_EN_PGA460 0
then
pga460 start
fi
# Lightware i2c lidar sensor
if param greater SENS_EN_SF1XX 0
if param greater -s SENS_EN_SF1XX 0
then
sf1xx start -a
fi
# Heater driver for temperature regulated IMUs.
if param compare SENS_EN_THERMAL 1
if param compare -s SENS_EN_THERMAL 1
then
heater start
fi
# Teraranger one tof sensor
if param greater SENS_EN_TRANGER 0
if param greater -s SENS_EN_TRANGER 0
then
teraranger start -a
fi
# Possible pmw3901 optical flow sensor
if param greater -s SENS_EN_PMW3901 0
then
pmw3901 start
fi
###############################################################################
# End Optional drivers #
###############################################################################
+3 -3
View File
@@ -87,12 +87,12 @@ fi
#
# UGV setup.
#
if [ $VEHICLE_TYPE = ugv ]
if [ $VEHICLE_TYPE = rover ]
then
if [ $MIXER = none ]
then
# Set default mixer for UGV if not defined.
set MIXER ugv_generic
set MIXER rover_generic
fi
if [ $MAV_TYPE = none ]
@@ -108,7 +108,7 @@ then
sh /etc/init.d/rc.interface
# Start standard UGV apps.
sh /etc/init.d/rc.ugv_apps
sh /etc/init.d/rc.rover_apps
fi
#
+1 -1
View File
@@ -21,10 +21,10 @@ mc_att_control start
mc_pos_control start
fw_att_control start
fw_pos_control_l1 start
# airspeed_selector start
#
# Start Land Detector
# Multicopter for now until we have something for VTOL
#
land_detector start vtol
@@ -9,12 +9,18 @@ set VEHICLE_TYPE vtol
if [ $AUTOCNF = yes ]
then
# to minimize cpu usage on older boards limit inner loop to 400 Hz
param set IMU_GYRO_RATEMAX 400
param set MIS_TAKEOFF_ALT 20
param set MIS_YAW_TMT 10
param set MPC_ACC_HOR_MAX 2
param set MPC_LAND_SPEED 0.7
param set MPC_TKO_SPEED 1
param set MPC_VEL_MANUAL 3
param set MPC_XY_CRUISE 3
param set MPC_XY_VEL_MAX 4
param set MPC_Z_VEL_MAX_DN 1.5
@@ -24,6 +30,7 @@ then
param set PWM_RATE 400
param set RTL_LAND_DELAY 0
param set RTL_TYPE 1
param set WV_EN 1
fi
+67 -58
View File
@@ -20,13 +20,13 @@ set +e
# Do not add intra word spaces
# it wastes flash
#
set AUTOCNF no
set AUX_MODE pwm
set DATAMAN_OPT ""
set FAILSAFE none
set FAILSAFE_AUX none
set FCONFIG /fs/microsd/etc/config.txt
set FEXTRAS /fs/microsd/etc/extras.txt
set FMU_ARGS ""
set FMU_MODE pwm
set FRC /fs/microsd/etc/rc.txt
set IOFW "/etc/extras/px4_io-v2_default.bin"
@@ -52,7 +52,9 @@ set PWM_MAX p:PWM_MAX
set PWM_MIN p:PWM_MIN
set PWM_OUT none
set PWM_RATE p:PWM_RATE
set RC_INPUT_ARGS ""
set SDCARD_MIXERS_PATH /fs/microsd/etc/mixers
set STARTUP_TUNE 1
set USE_IO no
set VEHICLE_TYPE none
@@ -93,25 +95,22 @@ then
if hardfault_log check
then
# Error tune.
tune_control play -t 2
set STARTUP_TUNE 2
if hardfault_log commit
then
hardfault_log reset
fi
else
# Play the startup tune.
tune_control play -t 1
fi
else
# tune SD_INIT
tune_control play -t 16
set STARTUP_TUNE 16
if mkfatfs /dev/mmcsd0
then
if mount -t vfat /dev/mmcsd0 /fs/microsd
then
echo "INFO [init] card formatted"
else
tune_control play -t 17
set STARTUP_TUNE 17
echo "ERROR [init] format failed"
set LOG_FILE /dev/null
fi
@@ -120,17 +119,6 @@ else
fi
fi
# AEROCORE2 shouldn't have an sd card and CF2 may optionally have an sd card.
if ! ver hwcmp BITCRAZE_CRAZYFLIE GUMSTIX_AEROCORE2
then
# Run no SD alarm.
if [ $LOG_FILE = /dev/null ]
then
# tune Make FS MBAGP
tune_control play -t 2
fi
fi
#
# Look for an init script on the microSD card.
# Disable autostart if the script found.
@@ -160,18 +148,24 @@ else
#
# Set AUTOCNF flag to use it in AUTOSTART scripts.
#
if param compare SYS_AUTOCONFIG 1
if param greater SYS_AUTOCONFIG 0
then
# Wipe out params except RC*, flight modes, total flight time, accel cal, gyro cal
param reset_nostart RC* COM_FLTMODE* LND_FLIGHT_T_* TC_* CAL_ACC* CAL_GYRO*
set AUTOCNF yes
else
if param compare SYS_AUTOCONFIG 2
if param compare SYS_AUTOCONFIG 1
then
set AUTOCNF yes
else
set AUTOCNF no
# Wipe out params except RC*, flight modes, total flight time, accel cal, gyro cal, next flight UUID
param reset_nostart RC* COM_FLTMODE* LND_FLIGHT_T_* TC_* CAL_ACC* CAL_GYRO* COM_FLIGHT_UUID
fi
set AUTOCNF yes
fi
#
# Play the startup tune (if not disabled or there is an error)
#
param compare CBRK_BUZZER 782090
if [ $? != 0 -o $STARTUP_TUNE != 1 ]
then
tune_control play -t $STARTUP_TUNE
fi
#
@@ -208,9 +202,12 @@ else
rgbled_ncp5623c start
rgbled_pwm start
if blinkm start
if param greater LIGHT_EN_BLINKM 0
then
blinkm systemstate
if blinkm start
then
blinkm systemstate
fi
fi
#
@@ -220,11 +217,6 @@ else
#
tone_alarm start
if param compare SYS_FMU_TASK 1
then
set FMU_ARGS "-t"
fi
#
# Set parameters and env variables for selected AUTOSTART.
#
@@ -259,7 +251,7 @@ else
then
# Check for the mini using build with px4io fw file
# but not a px4IO
if ver hwtypecmp V540
if ver hwtypecmp V540 V560
then
param set SYS_USE_IO 0
else
@@ -306,7 +298,7 @@ else
#
# Set USE_IO flag.
#
if param compare SYS_USE_IO 1
if param compare -s SYS_USE_IO 1
then
set USE_IO yes
fi
@@ -318,11 +310,6 @@ else
tune_control play -t 2
fi
if [ $IO_PRESENT = no -o $USE_IO = no ]
then
rc_input start
fi
#
# Sensors System (start before Commander so Preflight checks are properly run).
# Commander needs to be this early for in-air-restarts.
@@ -331,7 +318,7 @@ else
then
set OUTPUT_MODE hil
sensors start -h
commander start --hil
commander start -h
# disable GPS
param set GPS_1_CONFIG 0
@@ -353,13 +340,14 @@ else
fi
unset BOARD_RC_SENSORS
battery_status start
sh /etc/init.d/rc.sensors
commander start
fi
# Sensors on the PWM interface bank.
if param compare SENS_EN_LL40LS 1
if param compare -s SENS_EN_LL40LS 1
then
# Clear pins 5 and 6.
set FMU_MODE pwm4
@@ -386,7 +374,7 @@ else
#
# Check if UAVCAN is enabled, default to it for ESCs.
#
if param greater UAVCAN_ENABLE 0
if param greater -s UAVCAN_ENABLE 0
then
# Start core UAVCAN module.
if uavcan start
@@ -408,9 +396,15 @@ else
fi
#
# Start mavlink streams that are not configurable (e.g. on USB).
# Optional board mavlink streams: rc.board_mavlink
#
sh /etc/init.d/rc.mavlink
set BOARD_RC_MAVLINK /etc/init.d/rc.board_mavlink
if [ -f $BOARD_RC_MAVLINK ]
then
echo "Board extras: ${BOARD_RC_MAVLINK}"
sh $BOARD_RC_MAVLINK
fi
unset BOARD_RC_MAVLINK
#
# Start UART/Serial device drivers.
@@ -418,15 +412,21 @@ else
#
sh /etc/init.d/rc.serial
if [ $IO_PRESENT = no -o $USE_IO = no ]
then
# Must be started after the serial config is read
rc_input start $RC_INPUT_ARGS
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.
# rc.fw_apps, rc.mc_apps, rc.rover_apps, and rc.vtol_apps.
#
sh /etc/init.d/rc.vehicle_setup
# Camera capture driver
if param greater CAM_CAP_FBACK 0
if param greater -s CAM_CAP_FBACK 0
then
if camera_capture start
then
@@ -439,14 +439,6 @@ else
#
navigator start
#
# Start the standalone wind estimator.
#
if param compare WEST_EN 1
then
wind_estimator start
fi
#
# Start a thermal calibration if required.
#
@@ -461,7 +453,16 @@ else
fi
# Check for flow sensor, launched as a background task to scan
px4flow start &
if param compare SENS_EN_PX4FLOW 1
then
px4flow start &
fi
# Blacksheep telemetry
if param greater TEL_BST_EN 0
then
bst start
fi
#
# Optional board supplied extras: rc.board_extras
@@ -488,6 +489,13 @@ else
#
sh /etc/init.d/rc.logging
#
# Set additional parameters and env variables for selected AUTOSTART.
#
if ! param compare SYS_AUTOSTART 0
then
sh /etc/init.d/rc.autostart.post
fi
if ! param compare SYS_PARAM_VER ${PARAM_DEFAULTS_VER}
then
@@ -513,7 +521,6 @@ unset FAILSAFE
unset FAILSAFE_AUX
unset FCONFIG
unset FEXTRAS
unset FMU_ARGS
unset FMU_MODE
unset FRC
unset IO_PRESENT
@@ -540,7 +547,9 @@ unset PWM_MAX
unset PWM_MIN
unset PWM_OUT
unset PWM_RATE
unset RC_INPUT_ARGS
unset SDCARD_MIXERS_PATH
unset STARTUP_TUNE
unset USE_IO
unset VEHICLE_TYPE
+2 -2
View File
@@ -52,7 +52,7 @@ px4_add_romfs_files(
firefly6.main.mix
fw_generic_wing.main.mix
FX79.main.mix
generic_differential_rover.main.mix
generic_diff_rover.main.mix
hexa_cox.main.mix
hexa_+.main.mix
hexa_x.main.mix
@@ -78,7 +78,7 @@ px4_add_romfs_files(
stampede.main.mix
tri_y_yaw-.main.mix
tri_y_yaw+.main.mix
ugv_generic.main.mix
rover_generic.main.mix
Viper.main.mix
vtol_AAERT.aux.mix
vtol_AAVVT.aux.mix
@@ -1,5 +1,16 @@
R: 4x 10000 10000 10000 0
AUX1 Passthrough
M: 1
S: 3 5 10000 10000 0 -10000 10000
AUX2 Passthrough
M: 1
S: 3 6 10000 10000 0 -10000 10000
Failsafe outputs
The following outputs are set to their disarmed value
during normal operation and to their failsafe falue in case
of flight termination.
Z:
Z:
@@ -0,0 +1,39 @@
Tailsitter duo mixer
============================
This file defines a mixer for a generic duo tailsitter VTOL (eg TBS Caipirinha tailsitter edition). This vehicle
has two motors in total, one attached to each wing. It also has two elevons which
are located in the slipstream of the propellers. This mixer generates 4 PWM outputs
on the main PWM ouput port, two at 400Hz for the motors, and two at 50Hz for the
elevon servos. Channels 1-4 are configured to run at 400Hz, while channels 5-8 run
at the default rate of 50Hz. Note that channels 3 and 4 are assigned but not used.
Motor mixer
------------
Channel 1 connects to the right (starboard) motor.
Channel 2 connects to the left (port) motor.
R: 2- 10000 10000 10000 0
Zero mixer (2x)
---------------
Channels 3,4 are unused.
Z:
Z:
Elevons mixer
--------------
Channel 5 connects to the right (starboard) elevon.
Channel 6 connects to the left (port) elevon.
M: 2
O: 7500 7500 0 -10000 10000
S: 1 0 -10000 -10000 0 -10000 10000
S: 1 1 10000 10000 0 -10000 10000
M: 2
O: 7500 7500 0 -10000 10000
S: 1 0 -10000 -10000 0 -10000 10000
S: 1 1 -10000 -10000 0 -10000 10000
+1 -1
View File
@@ -44,7 +44,7 @@ px4_add_romfs_files(
quad_+.main.mix
quad_test.mix
quad_+_vtol.main.mix
ugv_generic.main.mix
rover_generic.main.mix
vtol1_test.mix
vtol2_test.mix
vtol_AAERT.aux.mix
+24 -4
View File
@@ -6,21 +6,41 @@ from subprocess import call, Popen
from argparse import ArgumentParser
import re
def monitor_firmware_upload(port, baudrate):
def monitor_firmware_upload(port, baudrate):
databits = serial.EIGHTBITS
stopbits = serial.STOPBITS_ONE
parity = serial.PARITY_NONE
ser = serial.Serial(port, baudrate, databits, parity, stopbits, 100)
ser = serial.Serial(port, baudrate, databits, parity, stopbits, timeout=10)
finished = 0
timeout = 300 # 5 minutes
timeout_start = time.time()
timeout_newline = time.time()
while finished == 0:
serial_line = ser.readline()
print(serial_line.replace('\n',''))
print(serial_line.replace('\n',''))
if "NuttShell (NSH)" in serial_line:
finished = 1
time.sleep(0.05)
break
if time.time() - timeout_start > 10:
if "nsh>" in serial_line:
finished = 1
break
if time.time() > timeout_start + timeout:
print("Error, timeout")
finished = 1
break
# newline every 30 seconds if still running
if time.time() - timeout_newline > 30:
ser.write('\n')
timeout_newline = time.time()
ser.close()
def main():
+77
View File
@@ -0,0 +1,77 @@
#! /usr/bin/python
import serial, time
import subprocess
from subprocess import call, Popen
from argparse import ArgumentParser
import re
def do_nsh_cmd(port, baudrate, cmd):
databits = serial.EIGHTBITS
stopbits = serial.STOPBITS_ONE
parity = serial.PARITY_NONE
ser = serial.Serial(port, baudrate, databits, parity, stopbits, timeout=10)
ser.write('\n\n')
finished = 0
success = False
timeout = 10 # 10 seconds
timeout_start = time.time()
while finished == 0:
serial_line = ser.readline()
print(serial_line.replace('\n',''))
if "nsh>" in serial_line:
finished = 1
if time.time() > timeout_start + timeout:
print("Error, timeout")
finished = 1
break
# run command
ser.write(cmd + '\n')
time.sleep(0.05)
ser.write('\n')
finished = 0
timeout = 30 # 30 seconds
timeout_start = time.time()
timeout_newline = time.time()
while finished == 0:
serial_line = ser.readline()
print(serial_line.replace('\n',''))
if cmd in serial_line:
continue
elif "nsh>" in serial_line:
finished = 1
break
if time.time() > timeout_start + timeout:
print("Error, timeout")
finished = 1
break
# newline every 10 seconds if still running
if time.time() - timeout_newline > 10:
ser.write('\n')
timeout_newline = time.time()
ser.close()
def main():
parser = ArgumentParser(description=__doc__)
parser.add_argument('--device', "-d", nargs='?', default = None, help='')
parser.add_argument("--baudrate", "-b", dest="baudrate", type=int, help="Mavlink port baud rate (default=57600)", default=57600)
parser.add_argument("--cmd", "-c", dest="cmd", help="Command to run")
args = parser.parse_args()
do_nsh_cmd(args.device, args.baudrate, args.cmd)
if __name__ == "__main__":
main()

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