Commit Graph

863 Commits

Author SHA1 Message Date
bresch 740e409016 PWM - Add PWM_MIN and PWM_MAX parameters for MAIN and AUX (#10452) 2018-09-16 18:07:29 -04:00
David Sidrane 82576c8d4c mtd:Add margin to stack from RTT-Stack check 2018-09-14 15:37:20 -04:00
David Sidrane 3022fdb240 test_file2:test fails due to missing slash 2018-09-13 12:15:03 -07:00
David Sidrane 945a532260 pwm:Use test mode in steps command 2018-09-13 08:45:36 +02:00
David Sidrane 49f1540c30 pwm:Add test mode 2018-09-13 08:45:36 +02:00
Daniel Agar 40a68624e5 tests command ignore -Wunused-variable (#10442) 2018-09-10 11:24:57 -04:00
Daniel Agar 060463e8a7 parameters lib convert to c++ (#10267) 2018-09-04 09:18:28 -04:00
Daniel Agar ab8bf09996 tests cmd remove unused stack module option 2018-09-02 15:31:54 -04:00
Daniel Agar 7cc0e69fcd add px4fmu-v{3,4,5} stackcheck configs 2018-09-02 14:16:04 -04:00
PX4 Build Bot cbd1636d8d Update submodule matrix to latest Fri Aug 31 21:31:02 UTC 2018
- matrix in PX4/Firmware (468f28463eabc30843e606546d642adc1a62fe10): https://github.com/PX4/Matrix/commit/b815fc97c4e686a93a8074f27d1830a031b0d38d
    - matrix current upstream: https://github.com/PX4/Matrix/commit/dc3af8097798881b9b2e72a029a3c6c10abd059b
    - Changes: https://github.com/PX4/Matrix/compare/b815fc97c4e686a93a8074f27d1830a031b0d38d...dc3af8097798881b9b2e72a029a3c6c10abd059b

dc3af80 2018-08-27 Daniel Agar - constructors use array size rather than pointers
f1bee77 2018-08-27 Daniel Agar - use default constructors and skip unnecessary initialization
1bcf48b 2018-08-30 Daniel Agar - Quaternion from_dcm don't pass by value
2018-08-31 18:48:58 -04:00
Beat Küng 0dc8eeb118 tests: avoid using exit() 2018-08-31 18:11:58 +02:00
David Sidrane ab26bd76ff tunes:Refactor for maintenance
Adds a single file definition to provide a single point to add
    new tunes and clearly understand, the useage: it need to be
    stopped will it not allow interruption.
2018-08-30 19:11:17 +02:00
Daniel Agar ad321c8824 parameters test save restored parameters when finished 2018-08-30 11:29:39 -04:00
bresch 04c765f497 Failsafe PWM - Add PWM_MAIN/AUX_FAILx parameters to set "failsafe" values. 2018-08-28 11:23:25 -04:00
Dennis Mannhart d94778dd94 test_controlmath: replace FLT_EPSILON with 10^-6 2018-08-15 16:19:51 +02:00
Beat Küng 9a259cd139 param: use PX4_INFO_RAW and add 'param show -q <param_name' command 2018-08-13 21:50:14 -04:00
Beat Küng 5363aff879 fixes for integration and unit tests
Move ros logs dir so that .ulg files are not in the same directory
(mission_test.py:: get_last_log() fails otherwise)
2018-08-08 21:09:39 +02:00
Beat Küng f1dc8f8f48 listener: use PX4_INFO_RAW instead of printf
Ensures that clients will get the output of the listener.
2018-08-08 21:09:39 +02:00
Beat Küng c0cac0594e file paths: add PX4_STORAGEDIR & use it where appropriate 2018-08-08 21:09:39 +02:00
Julian Oes 0c5c741b1a add posix shell
squashed & rebased version, not including:
- listener changes
- src/firmware renaming

Commits:

tag_to_version.py: fix Python3 error

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

cmake: remove folder src/firmware

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

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

qshell: support for return value

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

adb_upload: create folders before pushing

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

posix: spawn PX4 modules in bash

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

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

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

SITL: use new client shell in SITL

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

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

Snapdragon: use new shell to start all modules

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

Snapdragon: fix the airframe description

pxh: argv needs to end with a nullptr

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

px4_posix_tasks: variable cleanup

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

Snapdragon: move some drivers to 4100 config

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

Snapdragon: update 210qc platform

px4_daemon: use doxygen comments

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

px4_daemon: \b -> \n in printf

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

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

cmake: remove new install command again

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

POSIX: remove argument USES_TERMINAL

POSIX: copy init and mixer files for SITL

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

adb_upload.sh: remove leftover commented printf

POSIX main: just the pointer instead of memmove

POSIX main: remove chroot

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

px4_daemon: remove client pipe when cleaning up

px4_daemon: fail if the client pipe already exists

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

history: limit the number of history entries

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

px4_daemon: add a threadsafe map and use it

px4_daemon: whitespace

px4_daemon: fix client parsing

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

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

posix: changes sitl_run.sh and main.cpp cleanup

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

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

px4_log: cleanup log levels, now they make sense

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

dataman: fix path for bash shell

logger: fix paths for bash shell

mavlink: fix paths for bash shell

param: fix path for bash shell

inav: fix paths for bash shell

sdlog2: fix paths for bash shell

ROMFS: add forgotten mixer to list

SITL init: more models, more options

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

rcS: fix string comparison

listener: use template file

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

px4_log: add PX4_INFO_RAW for raw printfs

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

topic_listener: use PX4_INFO_RAW instead of printf

commander: use PX4_INFO_RAW for status

listener: rewrite to classes and factory

posix: fix some argument warnings

generate_listener.py: by accident changed shebang

listener: big refactor of the generator

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

rcS: manually take over rebase changes

listener: remove leftover try

listener: properly clean up topic instance

rcS: take over some vehicle specific changes

posix-configs: vehicle specifics to separate files

posix-configs: remove leftover lines

uORBDevices: new PX4_INFO_RAW instead of printf

px4_log: just use printf on NuttX

listener: use less binary space, strip on NuttX

generate_listener.py: remove commented code

cmake: fix syntax error from merge

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

px4_daemon: namespace missing

posix: only create stub for fsync on QURT

unitests: reduce dependencies of param test

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

QURT: some compile fixes after a rebase

SITL: arg change for sitl_run.sh to use rcS_test

This allows to use a custom startup file for testing.

SITL: add the folder test_data

SITL: implement shutdown command as systemcmd

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

px4fmu_test: same IO_pass mixer as px4fmu_default

px4fmu_test: use normal quad x mixer

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

POSIX: cleanup, dir and symlink fixes

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

POSIX: correct arg order in usage info

tests: fix paths for SITL tests

POSIX: printf fix

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

cmake: try to make jenkins happier

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

POSIX: fix symlink logic

SITL: prefix all exported env variables

cmake: fix path for ROS tests

integrationtests: fix log path

launch: try to make tets with ROS working again

px4_defines: fix after wrong merge deconflicting

px4_defines: get paths for POSIX correct

cmake: fix cmake arguments

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

cmake: use cp instead of cmake -E copy

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

ROMFS: fix build error after rebase

cmake: fix paths in configs

launch: use `spawn_model` again

cmake: various fixes after big rebase

param: path fixes after rebase

posix platform: fixes after rebase

test_mixer: fix screwed up rebase
2018-08-08 21:09:39 +02:00
Daniel Agar 2302c64004 listener: add optional rate and cleanup existing arguments 2018-08-03 06:50:41 +02:00
Daniel Agar 568a5f1c4c delete ACCELIOCSELFTEST and GYROIOCSELFTEST 2018-08-02 08:05:52 +02:00
Daniel Agar bb9c38a480 delete MAGIOCSELFTEST 2018-08-02 08:05:52 +02:00
Beat Küng 1514ec3a5a top: use SCHED_PRIORITY_MAX instead of 255 to specify the priority 2018-07-30 23:06:32 +02:00
Daniel Agar cc96e5ec5e sensor messages remove unused fields and improve comments 2018-07-29 21:04:21 +02:00
Daniel Agar 100f9553ce tests clang-tidy ignore modernize-pass-by-value 2018-07-25 08:50:10 +02:00
Dennis Mannhart 40f2388295 test_search_min: remove printf 2018-07-25 08:50:10 +02:00
Dennis Mannhart 7559610a7b BezierQuad: update description, replace Data with Vector3_t 2018-07-25 08:50:10 +02:00
Dennis Mannhart fe48e06f9d add tests for Bezier and Golden Section Search libraries 2018-07-25 08:50:10 +02:00
Dennis Mannhart 414f38b677 test_controlmath: work around for internal compiler error: in trunc_int_for_mode, at explow.c:55 2018-07-20 09:26:18 +02:00
Dennis Mannhart c56ae130a7 test_controlmath remove static 2018-07-20 09:26:18 +02:00
Dennis Mannhart cfe7d64a42 cmake/configs: remove module test for mc_pos_control 2018-07-20 09:26:18 +02:00
Dennis Mannhart c6055c979a systemcmds/tests: add test_controlmath 2018-07-20 09:26:18 +02:00
Dennis Mannhart c2343589d8 move cross_sphere_line_test method into test_controlmath.cpp
remove mc_pos_control_tests since empty
move test_controlmath.cpp into systemcmds/tests directory
2018-07-20 09:26:18 +02:00
Hamish Willee 7402d8223b Fix up references to pixhawk.org 2018-07-02 13:11:15 +02:00
Daniel Agar 9ce83f2208 fix all sign-compare warnings 2018-07-01 09:36:55 +00:00
Daniel Agar 11d348ec4f microbench split into hrt, math, matrix, uorb 2018-07-01 09:25:22 +00:00
Daniel Agar ea0a80d4d1 microbench add uorb and matrix test 2018-07-01 09:25:22 +00:00
Daniel Agar 3ba97297d5 tests simple timing microbenchmark 2018-07-01 09:25:22 +00:00
Daniel Agar d21cf7123e version library add ECL 2018-06-22 08:46:30 +02:00
Beat Küng 20f2303e8a test_mixer: fix resource leak (unclosed dp) 2018-06-13 16:19:34 +02:00
Daniel Agar e468a9bbcc move systemlib/pwm_limit to standalone lib 2018-06-12 09:06:30 +02:00
Daniel Agar d73d20bcce systemlib delete unused systemlib.h 2018-06-12 09:06:30 +02:00
Daniel Agar 222a91c6be mathlib delete Matrix, Quaternion, Vector 2018-05-23 17:27:09 -04:00
Beat Küng f2703abce0 top: increase process priority to 255
Helps debugging busy-looping tasks.
2018-05-18 22:23:32 +02:00
Julien Lecoeur e380adb9b6 Fix format with Artistic Style 3.1 2018-05-15 10:38:49 -04:00
Beat Küng f2092dd690 mixer_test: use snprintf instead of strncpy to fix compiler warning
compiler warning:
../../src/systemcmds/tests/test_mixer.cpp: In member function ‘bool MixerTest::loadAllTest()’:
../../src/systemcmds/tests/test_mixer.cpp:202:18: error: ‘char* strncpy(char*, const char*, size_t)’ output truncated before terminating nul copying 1 byte from a string of the same length [-Werror=stringop-truncation]
     (void)strncpy(&buf[strlen(MIXER_ONBOARD_PATH)], "/", 1);
2018-05-09 07:59:46 +02:00
Daniel Agar 2e92484325 ecl update to latest master with separate libraries (#9406) 2018-05-03 23:48:09 -04:00
Daniel Agar ea3acb7121 cmake remove circular linking and reorganize
- px4_add_module now requires MAIN
 - px4_add_library doesn't automatically link
2018-04-29 21:48:54 -04:00
Daniel Agar d2abd53692 mixer lib remove custom constrain and cleanup includes 2018-04-12 00:14:50 -04:00