Commit Graph

27085 Commits

Author SHA1 Message Date
acfloria 4a08003952 Change warnings to error in case the iridium driver start failed 2018-08-08 21:13:56 +02:00
acfloria eb59407586 Fix starting the iridium driver in the start script 2018-08-08 21:13:56 +02:00
acfloria 5c6fad84e7 Improve the startup of the IridiumSBD driver
During startup retry commands several times before exiting.
Report if the startup was successful or failed.
2018-08-08 21:13:56 +02:00
acfloria 21ebcdc0ae Publish the satcom subsystem health 2018-08-08 21:13:56 +02:00
acfloria 1daaa6f5dc Shorten notification on the link switch to fit in 50 characters 2018-08-08 21:13:56 +02:00
Beat Küng 55db10d9e2 mavlink_ulog: clear potential existing ulog_stream messages on start
- the uorb behavior got recently changed so that we now need to clear
  any potential existing messages when we start log streaming.
- ulog_stream_ack should also not use a queue, since the ack is done
  synchonous between mavlink and the logger.
2018-08-08 21:12:04 +02:00
Beat Küng ffffcaeb0f px4-alias.sh_in: move to platforms/posix/src/px4-alias.sh_in 2018-08-08 21:09:39 +02:00
Anthony Lamping 0edf4513eb Jenkins: change log path 2018-08-08 21:09:39 +02:00
Beat Küng 23b12f02e7 cmake: fix install target (add bin dir which includes the symlinks and px4-alias.sh) 2018-08-08 21:09:39 +02:00
Beat Küng 4703f22d4e mixers: remove unnecessary output settings (reduce flash usage) 2018-08-08 21:09:39 +02:00
Beat Küng ac5988fd35 ROMFS cmake: do not copy init.d-posix and mixers-sitl
Otherwise these files are added to the NuttX ROMFS build.
2018-08-08 21:09:39 +02:00
Beat Küng 5363aff879 fixes for integration and unit tests
Move ros logs dir so that .ulg files are not in the same directory
(mission_test.py:: get_last_log() fails otherwise)
2018-08-08 21:09:39 +02:00
Beat Küng 0edd7c93e1 posix main: check for ROS argument 2018-08-08 21:09:39 +02:00
Beat Küng 22b47a84f5 px4_log.c: fix cygwin include 2018-08-08 21:09:39 +02:00
Beat Küng a5de82aaa8 cmake: add documentation for px4_posix_generate_alias and px4_posix_generate_symlinks 2018-08-08 21:09:39 +02:00
Beat Küng f748c8d883 fix mavros launch scripts & use non-unified startup scripts
This is to not lose any existing functionality until we have everything
unified.
2018-08-08 21:09:39 +02:00
Beat Küng ec09379813 px4_daemon: fixes for clang-tidy
Also ignore the warning:
error: calling 'system' uses a command processor [cert-env33-c,-warnings-as-errors]
2018-08-08 21:09:39 +02:00
Beat Küng efb202106f bbblue: required changes for posix shell 2018-08-08 21:09:39 +02:00
Beat Küng d480d24a4c fix perf counter: use dprintf instead of printf 2018-08-08 21:09:39 +02:00
Beat Küng b306935de0 module base: use PX4_INFO_RAW instead of printf 2018-08-08 21:09:39 +02:00
Beat Küng 26f11cb9d7 commander: use PX4_INFO for status output 2018-08-08 21:09:39 +02:00
Beat Küng f1dc8f8f48 listener: use PX4_INFO_RAW instead of printf
Ensures that clients will get the output of the listener.
2018-08-08 21:09:39 +02:00
Beat Küng e6d71680ab px4_daemon server: fix packet reading
By reading sizeof(packet), it could have happened that 2 packets at once
were read, and the second one was then ignored.
This makes sure that only one packet at a time is read.

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

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

Commits:

tag_to_version.py: fix Python3 error

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

cmake: remove folder src/firmware

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

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

qshell: support for return value

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

adb_upload: create folders before pushing

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

posix: spawn PX4 modules in bash

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

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

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

SITL: use new client shell in SITL

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

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

Snapdragon: use new shell to start all modules

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

Snapdragon: fix the airframe description

pxh: argv needs to end with a nullptr

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

px4_posix_tasks: variable cleanup

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

Snapdragon: move some drivers to 4100 config

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

Snapdragon: update 210qc platform

px4_daemon: use doxygen comments

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

px4_daemon: \b -> \n in printf

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

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

cmake: remove new install command again

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

POSIX: remove argument USES_TERMINAL

POSIX: copy init and mixer files for SITL

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

adb_upload.sh: remove leftover commented printf

POSIX main: just the pointer instead of memmove

POSIX main: remove chroot

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

px4_daemon: remove client pipe when cleaning up

px4_daemon: fail if the client pipe already exists

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

history: limit the number of history entries

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

px4_daemon: add a threadsafe map and use it

px4_daemon: whitespace

px4_daemon: fix client parsing

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

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

posix: changes sitl_run.sh and main.cpp cleanup

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

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

px4_log: cleanup log levels, now they make sense

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

dataman: fix path for bash shell

logger: fix paths for bash shell

mavlink: fix paths for bash shell

param: fix path for bash shell

inav: fix paths for bash shell

sdlog2: fix paths for bash shell

ROMFS: add forgotten mixer to list

SITL init: more models, more options

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

rcS: fix string comparison

listener: use template file

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

px4_log: add PX4_INFO_RAW for raw printfs

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

topic_listener: use PX4_INFO_RAW instead of printf

commander: use PX4_INFO_RAW for status

listener: rewrite to classes and factory

posix: fix some argument warnings

generate_listener.py: by accident changed shebang

listener: big refactor of the generator

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

rcS: manually take over rebase changes

listener: remove leftover try

listener: properly clean up topic instance

rcS: take over some vehicle specific changes

posix-configs: vehicle specifics to separate files

posix-configs: remove leftover lines

uORBDevices: new PX4_INFO_RAW instead of printf

px4_log: just use printf on NuttX

listener: use less binary space, strip on NuttX

generate_listener.py: remove commented code

cmake: fix syntax error from merge

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

px4_daemon: namespace missing

posix: only create stub for fsync on QURT

unitests: reduce dependencies of param test

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

QURT: some compile fixes after a rebase

SITL: arg change for sitl_run.sh to use rcS_test

This allows to use a custom startup file for testing.

SITL: add the folder test_data

SITL: implement shutdown command as systemcmd

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

px4fmu_test: same IO_pass mixer as px4fmu_default

px4fmu_test: use normal quad x mixer

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

POSIX: cleanup, dir and symlink fixes

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

POSIX: correct arg order in usage info

tests: fix paths for SITL tests

POSIX: printf fix

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

cmake: try to make jenkins happier

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

POSIX: fix symlink logic

SITL: prefix all exported env variables

cmake: fix path for ROS tests

integrationtests: fix log path

launch: try to make tets with ROS working again

px4_defines: fix after wrong merge deconflicting

px4_defines: get paths for POSIX correct

cmake: fix cmake arguments

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

cmake: use cp instead of cmake -E copy

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

ROMFS: fix build error after rebase

cmake: fix paths in configs

launch: use `spawn_model` again

cmake: various fixes after big rebase

param: path fixes after rebase

posix platform: fixes after rebase

test_mixer: fix screwed up rebase
2018-08-08 21:09:39 +02:00
David Sidrane 7bdfac786d uavcannode:Boards do the CAN GPIO init 2018-08-08 15:09:01 -04:00
David Sidrane b577bfc461 uavcanesc:Boards do the CAN GPIO init 2018-08-08 15:09:01 -04:00
David Sidrane 4b863aa108 uavcan:Boards do the CAN GPIO init 2018-08-08 15:09:01 -04:00
David Sidrane e88bad3b47 px4cannode-v1:Board does CAN GPIO init 2018-08-08 15:09:01 -04:00
David Sidrane ef43dee1d6 px4nucleoF767ZI-v1:Board does CAN GPIO init 2018-08-08 15:09:01 -04:00
David Sidrane fbb1c65221 px4fmu-v5:Board does CAN GPIO init 2018-08-08 15:09:01 -04:00
David Sidrane 5da93ad7c5 px4fmu-v4pro:Board does CAN GPIO init 2018-08-08 15:09:01 -04:00
David Sidrane f2fbffab84 px4fmu-v4:Board does CAN GPIO init 2018-08-08 15:09:01 -04:00
David Sidrane 35b010aeed omnibus-f4sd:Does not have uavcan 2018-08-08 15:09:01 -04:00
David Sidrane 33ee4dafa0 nxphlite-v3:Board does CAN GPIO init 2018-08-08 15:09:01 -04:00
David Sidrane d8300bfd8e mindpx-v2:Board does CAN GPIO init 2018-08-08 15:09:01 -04:00
David Sidrane 1a007c139c mindpx-v2:Add On board reset 2018-08-08 15:09:01 -04:00
David Sidrane e0b7314607 av-x-v1:Board does CAN GPIO init 2018-08-08 15:09:01 -04:00
David Sidrane 885fed0402 px4fmu-v2:Board does CAN GPIO init 2018-08-08 15:09:01 -04:00
David Sidrane dc4c09e5f4 aerofc-v1:Does not have uavcan 2018-08-08 15:09:01 -04:00