Commit Graph

689 Commits

Author SHA1 Message Date
Beat Küng 2f19aebac0 mavlink_ulog_streaming: always send an ack (#5853)
Fixes the case where an ack got lost and the FMU resends the data, but
the client does not resend the ack.
2016-11-14 17:06:21 +01:00
Carlo Wood a96ee50442 Stop people from using broken awk. 2016-11-13 19:36:27 +01:00
Carlo Wood 0fbf26e955 Add Tools/fix_headers.sh
Running this script will parse the top of all source files
that are not submodules, examples or test cases, to find
all #include's and then do basically two things:

1) Reorder and group the headers so that px4_* headers are
   included first, then local headers (headers of the project
   that aren't submodules) then C++ headers if any, then C
   headers if any, then system headers (which includes submodules)
   and finally any #includes that are inside #if*...#endif
   constructs.
2) Fix the use of "" or <> in a consistent manner.

Afterwards few fixes might be necessary for compile errors that
pop up. Most of those are already fixed in my previous commits.
However, I was not able to test a compilation for ros
(with __PX4_ROS defined) -- so some more fixes might be necessary
because of the header reordering.

The script comes with a progress counter and an error summary
(if any) at the end (so no scrolling back is necessary).
It is highly recommended to only run this script in a clean
project with no outstanding changes that need to be committed.
In fact, the script enforces this (unless you pass --force).
Reverting a run of the script is then easy with 'git checkout .'.

It is also possible to run the script on a single file
by passing that on the command line. In that case it
might make sense to pass --debug too, though that was really
meant for just me, while developing the script. This will write
debug output into the file that is passed, so you don't
want to commit that! ;)
2016-11-13 19:36:27 +01:00
Beat Küng 587c5161a3 mavlink_{shell,ulog_streaming}.py: show full error output when pymavlink import fails 2016-11-04 11:08:06 +01:00
Beat Küng fa461d018d mavlink_{shell,ulog_streaming}.py: send heartbeat
This is helpful, so that a connected partner can switch from broadcasting
to a 'connected' state.
2016-11-04 11:08:06 +01:00
Lorenz Meier b9cf679118 Update sitl_gazebo 2016-10-29 00:01:39 +02:00
Lorenz Meier b3e948d28c Update simulators 2016-10-29 00:00:33 +02:00
Julian Oes 62603bee45 simulation: SITL outputs from 0..1
Instead of sending actuator controls from -1..1 for SITL, we should send
0..1 like we already do for HIL. This will enable negative thrust in the
future, e.g. for pusher props that spin backwards, or for vehicles with
variable pitch propellers.
2016-10-28 23:56:46 +02:00
Beat Küng 95f5ba9635 fix mavlink_shell.py: python3 compat for octal numbers 2016-10-24 12:51:50 +02:00
Lorenz Meier 8d51e4ade1 MAVLink shell: Fix OS X default path 2016-10-23 17:46:22 +02:00
Lorenz Meier 296b07f9d8 Update Gazebo plugin to fix plane model 2016-10-23 14:21:50 +02:00
Julian Oes 3aa9a72562 mavlink_shell.py: default to 57600 baudrate 2016-10-23 14:00:29 +02:00
Julian Oes d57e9f13d7 px_uploader.py: catch exception in except block
This could lead to an exception if serial is not available.
2016-10-20 23:18:56 +02:00
Julian Oes d1822699a9 px_uploader.py: remove unused variable 2016-10-20 23:18:56 +02:00
Julian Oes a14c565ab1 px_uploader.py: trailing whitespace 2016-10-20 23:18:56 +02:00
Beat Küng 0002e86b6f jmavsim_run.sh: add additional arguments for HITL 2016-10-20 18:54:47 +02:00
Beat Küng 8f5656f033 mavlink ulog: add target sys & component ids (update to changed mavlink message) 2016-10-19 13:13:47 +02:00
Beat Küng 6999bb3e9a Tools: add mavlink_ulog_streaming.py script to stream ULog via MAVLink to a file 2016-10-19 13:13:47 +02:00
Michael Schaeuble ffaed18e67 Reduce the binary size Bebop
The firmware binary is to large to fit into the onboard memory of the Parrot
Bebop. It could be uploaded to the emmc, but for ease of use it would be nice
to have it in /usr/bin. To strip the binary seems to be the best option right now.
2016-10-18 23:56:56 +02:00
Julian Oes cd937321c8 px_mkfw.py: fix indent (fix for Python 3) 2016-10-15 22:01:22 +02:00
Julian Oes 7eabf1ccb3 px_mkfw.py: remove unused import 2016-10-15 22:01:22 +02:00
Julian Oes 2d039af7a4 sitl_gazebo: update submodule yet again
This fixes the build for Gazebo >= 7.4.
2016-10-14 20:38:29 +02:00
Julian Oes 36b2e4be09 sitl_gazebo: update submodule 2016-10-14 14:47:53 +02:00
Lorenz Meier 69551141b7 Updated SITL 2016-10-12 00:32:59 +02:00
José Roberto de Souza b9728ecf39 Uploader tool: Add option to set different baudrates for bootloader and flight stack
By default the baudrate in flight stack (Mavlink or NSH) 57600 and the default
baudrate of bootloader is 115200. So we may need to set different
baudrates.
2016-10-05 11:25:14 +02:00
José Roberto de Souza 7e0946466e Uploader tool: Reboot board and keep it in bootloader
The Mavlink reboot messages was only requesting the board to reboot.
If the flashed bootloader has a small or no timeout user will
never be able to update firmware.
2016-10-05 11:25:14 +02:00
Mark Whitehorn 9500b7f01f update submodule 2016-10-04 12:54:58 +02:00
James Goppert cb5728297e LPE fix to enable visual odom. only navigation. (#5588) 2016-10-03 14:58:02 -04:00
James Goppert f6bed6f2d2 Update sitl gazebo. 2016-10-01 08:25:49 -04:00
James Goppert 91f92aa7d3 Update sitl gazebo. (#5580) 2016-10-01 07:58:56 -04:00
nephen 0027333e6d add pci-Bitcraze to px4_base.cmake 2016-09-30 23:06:57 +02:00
Beat Küng 98ac60e3fd Tools: remove unused scripts {posix,qurt}_apps.py
These were replaced by cmake, with the template cmake/posix/apps.h_in
2016-09-30 13:50:51 +02:00
Beat Küng a51d1bc5dc jmavsim_run.sh: add optional -p <port> argument 2016-09-30 13:50:51 +02:00
Beat Küng 35e93c24e8 fix sitl_multiple_run.sh: adapt to path updates 2016-09-30 13:50:51 +02:00
Beat Küng 1eca97757c sitl_run.sh: fix $rootfs not set (needed for efk2 replay) 2016-09-29 10:53:33 +02:00
Dennis Shtatnov b9c5d117dd CF2: Linux USB uploading fix 2016-09-21 17:20:08 -04:00
Beat Küng 79f2cd79d9 px_generate_uorb_topic_files.py: add multitopics to generate_topics_list_file_from_files method 2016-09-19 13:03:40 +02:00
Beat Küng 89a7e0cf87 uorb topics generator: add multi-topics to the list of all topics
topic names with '# TOPICS <name>' were previously not in orb_get_topics().
This means the logger could not find them.

Affects for example actuator_controls_0.
2016-09-19 13:03:40 +02:00
Beat Küng c191a82882 gazebo: update submodule 2016-09-19 09:18:37 +02:00
Lorenz Meier 71fd4b9e98 Uploader tool: Try MAVLink reboot command first 2016-09-17 23:49:41 +02:00
Carlo Wood 03d176d097 Bug fixes, typos, indentation.
Over time I made a few changes unrelated to what I'm really working on.
These changes are hereby committed first. The bug fixes are related to
what I'm doing in that I need them to be fixed for future commits.

Tools/sitl_run.sh: rename label to rcS_dir and fix usage help.
cmake/common/px4_base.cmake: Remove the check on OUT_UNPARSED_ARGUMENTS,
  and a few typos and indentation issues.
cmake/configs/posix_sitl_replay.cmake: Set the correct variable
  (config_sitl_rcS_dir) to the correct directory.
cmake/nuttx/px4_impl_nuttx.cmake: typos and indentation issues,
  and removal of a redundant FORCE (INTERNAL implies FORCE).
cmake/posix/px4_impl_posix.cmake: typos and indentation issues.
cmake/qurt/px4_impl_qurt.cmake: typos and indentation issues.
src/modules/mavlink/mavlink_ftp.cpp : possible strict-aliasing breakage.

NOTES

The second argument passed to sitl_run.sh is the value of
config_sitl_rcS_dir. This fact is missing from the usage help.
I renamed 'label' to 'rcS_dir' to better reflect this.
Also, for the 'replay' config the wrong variable was set causing
the call to sitl_run.sh to skip an argument and fail (ie the
debugger was passed as rcS_dir and so on).

The check on OUT_UNPARSED_ARGUMENTS in px4_parse_function_args
basically causes every passed IN variable to be REQUIRED and is
therefore a bug. The test for the presence of the REQUIRED arguments
follows directly after and is sufficient for this job. This bug went
unnoticed because currently every argument to OPTIONS, ONE_VALUE,
and MULTI_VALUE is actually passed to the function(s) calling
px4_parse_function_args (them being REQUIRED or not).

The changes in mavlink_ftp.cpp are to avoid a possible aliasing bug
and (mostly) to avoid the compiler warning/error: dereferencing type-
punned pointer will break strict-aliasing rules [-Werror=strict-aliasing].
2016-09-13 16:31:08 +02:00
Daniel Agar 31ddf6bdd9 sitl_run.sh use full path to jmavsim_run.sh 2016-09-13 11:30:38 +02:00
Beat Küng e7afecb544 Tools: add separate jmavsim_run.sh script
It is useful to run jmavsim separately, for example when debugging mainapp
separately, or running some other external tool on mainapp (like heap
analysis)
2016-09-13 11:30:38 +02:00
Andreas Antener cbbf5e2e7c filtering files for code check seperately to enable fast use of git pre-commit hook to check code style
ask user to install pre-commit hook when code style is checked
2016-09-07 11:25:51 +02:00
Beat Küng 78df9de4c4 update jmavsim submodule 2016-09-06 16:25:13 +02:00
Beat Küng 9c0380c31d update jmavsim submodule 2016-09-06 15:58:48 +02:00
Lorenz Meier 3f07b03911 SITL: Tune standard VTOL to have better position control performance & update gazebo 2016-09-06 11:35:52 +02:00
Beat Küng 3de4ec7093 Update SITL gazebo 2016-09-06 11:33:18 +02:00
Michael Schäuble b9b9f17eee Fix build errors (#5436)
* Use sorted to fix python3 build error

* Add drv_hrt.h include to Bebop df wrappers
2016-09-03 12:34:27 +02:00
stmoon d219b8cf46 fix the bug for double space 2016-09-01 08:44:16 +02:00