Commit Graph

9630 Commits

Author SHA1 Message Date
Lorenz Meier dc4faa81de MAVLink: Only initialize where required 2017-07-29 16:12:41 +02:00
Lorenz Meier 6b17db35b0 MAVLink: Fix vibration message timestamp 2017-07-29 16:12:41 +02:00
Lorenz Meier 3f048e8a87 MAVLink stream: Do not override interval too much 2017-07-29 16:12:41 +02:00
Lorenz Meier af451ce638 MAVLink time sync: Better output handling 2017-07-29 16:12:41 +02:00
Lorenz Meier f0e8ebb2ac MAVLink: Remove link termination command
This is no longer required as we have a full shell available now and there is no reason to let the remote terminate the instance.
2017-07-29 16:12:41 +02:00
Lorenz Meier 37657cf99b MAVLink FTP: Use modern output printing to capture errors in system log 2017-07-29 16:12:41 +02:00
Lorenz Meier 68d70cc8c0 MAVLink: Use modern PX4 output format to enable system logging for errors. 2017-07-29 16:12:41 +02:00
Lorenz Meier 09f1373a08 MAVLink: Adjust stream rates to match real usage 2017-07-29 16:12:41 +02:00
Lorenz Meier 07ced9895c MAVLink: Improve message handling / tracking
The message handling was not obeying action focused messages and high-rate messages properly before. With this change update rates track the desired rates closely. Critical high-rate messages such as ADS-B are queued additionally to guarantee that all received packets are being correctly forwarded.
2017-07-29 16:12:41 +02:00
Daniel Agar 1867573b02 VTOL don't poll parameter_update 2017-07-29 09:15:52 +02:00
Daniel Agar 66f0912b9d FW attitude don't poll parameter_update 2017-07-29 09:15:52 +02:00
Daniel Agar efafc17b0c FW position don't poll parameter_update 2017-07-29 09:15:52 +02:00
Daniel Agar cf87096b05 EKF2 don't poll parameter_update 2017-07-29 09:15:52 +02:00
Daniel Agar ddc4500753 FW landing optionally disable heading hold (#7617) 2017-07-28 20:28:54 -04:00
Paul Riseborough 5324f30cb6 ekf2: Let the EKF know if the vehicle is operating as a fixed wing type. (#7667)
Setting this enables the EKF to use the GPS velocity to recover from bad compass yaw at launch.
2017-07-29 07:18:58 +10:00
ChristophTobler 44cd65798b update sitl_gazebo to use the vision position estimate 2017-07-28 09:09:56 +02:00
Lorenz Meier dc8caeaedf MAVLink: Default to standard stream config 2017-07-27 10:15:53 +02:00
sanderux 1eda66c9ba Code format 2017-07-27 10:15:53 +02:00
sanderux 7612b94c72 Allow relaying from same system ID or with target component 0 2017-07-27 10:15:53 +02:00
Lorenz Meier c44322ca15 MAVLink app: Use more advanced forwarding logic 2017-07-27 10:15:53 +02:00
Beat Küng 0109154c43 logger: avoid logging the UUID if the system does not provide it
The linux targets don't have it and setting a fixed constant causes
wrong vehicle associationss in Flight Review.
2017-07-24 09:01:02 +02:00
Lorenz Meier 286c3d41d3 MAVLink app: Send GPS uncertainty via MAVLink 2
This is needed by some consumers like transponders.
2017-07-23 00:16:00 +02:00
Daniel Agar 2939bd9c96 Partial Revert "MAVLink: Add capture command to command queue"
This reverts commit dde5781142.
2017-07-22 11:36:35 +02:00
ChristophTobler bc951f6f15 add constraint to ground distance to avoid values below rng_gnd_clearance (#7662) 2017-07-22 07:49:00 +10:00
Beat Küng a6c682ce50 mavlink_ftp: fix stack overflow & add root dir prefix
- change memory allocation from stack to a malloc'd buffer. This avoids
  increasing the stack size. And since FTP is rarely used, the buffers
  are only allocated upon use and freed after a time of 2s inactivity.
- adds PX4_ROOTFSDIR as root directory prefix. This does not change
  anything on NuttX, but in SITL it will avoid enumerating the whole
  disk tree when using QGC (which enumerates all files recursively).
2017-07-21 19:59:45 +02:00
Beat Küng 29f23a390f mavlink_ftp: avoid using seekdir()
The provided argument payload->offset is in range [0, num_file_entries-1],
but seekdir might use a completely different range. It is not defined
by the API spec. It is only useful in conjunction with telldir().
2017-07-21 19:59:45 +02:00
Beat Küng 7fc20049e0 param_shmem import: don't fail on type mismatch 2017-07-20 18:49:38 +02:00
Beat Küng 88b515390a flashparams import: don't fail on type mismatch 2017-07-20 18:49:38 +02:00
Beat Küng 2340e7073d param import: don't fail on type mismatch
This can happen for example when a param type is changed from int32 to
float. The type check will then fail if the param is stored and the param
import will be aborted.
Now we just skip the entry and continue loading the rest.
2017-07-20 18:49:38 +02:00
Paul Riseborough f93be992ce ekf2: Update documentation for compatibility with Doxygen (#7657) 2017-07-20 22:05:29 +10:00
Lorenz Meier c1f5feac83 MAVLink: Queue transponder reports and send them at full data rate
This will ensure that no transponder reports are dropped and that all received reports are passed on to the GCS and other devices.
2017-07-20 09:13:53 +02:00
Dennis Shtatnov 6081435801 Fixes #7282 2017-07-19 19:51:55 -10:00
ChristophTobler 03e11c4d18 update ecl and add param for innovation consistency checks for range aid fusion (#7585) 2017-07-19 18:25:12 +10:00
Lorenz Meier dde5781142 MAVLink: Add capture command to command queue 2017-07-18 23:05:43 +02:00
Lorenz Meier cb3222d131 Navigator: Be less verbose 2017-07-18 23:05:43 +02:00
Lorenz Meier 6e97aec8ce MAVLink app: Do not warn about required reboot but rely on param meta. Fixes #7642 2017-07-18 22:51:42 +02:00
Beat Küng 0668d61665 SYS_FMU_TASK: add param to start fmu as task (default=work queue) 2017-07-18 20:06:10 +02:00
Beat Küng 56cc5e11cc simulator: initialize sensor data buffers 2017-07-18 12:54:28 +02:00
Beat Küng bb3b11e87a battery.cpp: initialize _current_filtered_a 2017-07-18 12:54:28 +02:00
Beat Küng bcca17204b mc_pos_control_main: initialize _in_takeoff 2017-07-18 12:54:28 +02:00
Beat Küng d419537a72 ekf2_main: initialize _mag_time_sum_ms & _balt_time_sum_ms 2017-07-18 12:54:28 +02:00
David Sidrane 5ebe5010ac Bugfix:Sensors battery_status Intance 0 voltage was 0V for Brick 2
Both PX4Test and Beat noted if only Brick to was connected
  battery_status Intance 0 voltage was 0V for Brick2

  The priority selection logic is run prior to the subscription
  creation and only updated the priority on a change. Before the
  subscriotions were created.

  _battery_pub_intance0ndx is suposed track the location in
  the _battery_pub array that is instance 0. It is then used
  to associate (move) instance 0 with (to)  the lowest brick
  (highest priority in HW) brick that is selected in HW.

  The Bug was that before the subscriptions are created,
  _battery_pub_intance0ndx set to 1. And then and never updated.

  The fix was to only run the priority selection logic once
  the subscriptions are created.
2017-07-17 21:02:50 -10:00
David Sidrane 4b63d629a9 sensors:Added Backward compatible N Brick Support FMUV4pro & FMUv5
This change implements the publishing of batery_status messages
   for each brick on the system, using multi-pub.

   Backward compatiblity is achived by always publishing the
   batery_status of the bick that has been selected by the HW
   Power Controller (PC) on instance 0.

   The batery_status.system_source will be true in one and
   only one batery_status publication when a valid bit is
   set in system_power.brick_valid. However, if USB is connected,
   and both brikcs are not providing voltages to the PC
   that are in the Under/Over Voltage Window (set in HW)
   the system_source may be false in all publications.
2017-07-17 21:02:50 -10:00
David Sidrane 8e8510f398 Added Power Brick related battery_status.msg fields
system_source - This battery status is for the brick that is
                   supplying VDD_5V_IN
   priority      - Zero based, This battery status is for the brick
                   that is connected to the Power controller's
                   N-1 priority input. V1..VN. 0 would normally be
                   Brick1, 1 for Brick2 etc

  Battery now assigns connected from the api in the
  updateBatteryStatus, as well as system_source and priority
2017-07-17 21:02:50 -10:00
Julien Lecoeur 71136dcedf Log_writer_file: Increase stack size
Test flights reported the warning `[load_mon] log_writer_file low on stack! (292 bytes left)`

Increase stack size from 1060  to 1072 (=8 + 1060 rounded to next multiple of 8).
2017-07-18 08:24:37 +02:00
Julien Lecoeur 940f2c3cca Update libuavcan submodule, fix arm-none-eabi-gcc 7.1.0 warnings 2017-07-18 08:24:37 +02:00
Julien Lecoeur abcb920df4 Fix -Werror=implicit-fallthrough on arm-none-eabi-gcc 7.1.0
BMP280: fix -Werror=implicit-fallthrough on arm-none-eabi-gcc 7

gnss: fix -Werror=implicit-fallthrough on arm-none-eabi-gcc 7

fmu: fix -Werror=implicit-fallthrough on arm-none-eabi-gcc 7

timer.c: fix -Werror=implicit-fallthrough on arm-none-eabi-gcc 7

px4cannode_led: fix -Werror=implicit-fallthrough on arm-none-eabi-gcc 7

Fix -Werror=implicit-fallthrough on gcc7
2017-07-18 08:24:37 +02:00
David Sidrane 4349f49610 PX4 System:Expunge the nuttx adc structure from the system
This PR is preliminary ground work for FMUv5.

   PX4 does not use the NuttX adc driver. But used the same format
   for the data returned by the nuttx ADC driver.

   There was a fixme:in src/platforms/px4_adc.h "this needs to be
   a px4_adc_msg_s type" With this PR the need for
   src/platforms/px4_adc.h goes away as the driver drv_adc.h now
   describes the px4_adc_msg_t.
2017-07-17 22:28:29 +02:00
Carl Olsson d92377a6e6 ekf2: remove unused function (#7529)
* ekf2: remove unused function

Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>

* ekf2: removed unused variable _mag_decl_saved

Signed-off-by: CarlOlsson <carlolsson.co@gmail.com>
2017-07-17 17:24:23 +10:00
Beat Küng c59d7baad8 replay: add backward compatibility for updated sensor_combined topic 2017-07-16 14:08:37 +02:00