Commit Graph

67 Commits

Author SHA1 Message Date
Lorenz Meier aacbc04730 PX4IO: Robustify upgrade process
These changes remove the two code paths to updates (forceupdate and update) and try to reboot and bootload IO independent of its state, wether it is in bootloader mode already, safety switch is off or if it is in "nominal state" (running and safety on). This ensures that there are no conditions where user error or boot sequence can prevent a successful upgrade. The only state where an upgrade will not be done is if the system is fully armed.
2021-02-21 19:56:16 -05:00
Daniel Agar ab0d0fd0be
uORB move to PX4 platform layer 2021-02-17 11:25:56 -05:00
Beat Küng a68ac95399 distance_sensor/sf1xx: rename to lightware_laser_i2c 2020-10-22 11:30:50 -04:00
David Sidrane b9319b3843 ROMFS:Use . for (source) and ${R} for pathing
init.d-posix:rcS Quiet Shell check warning
2020-10-15 17:11:08 -04:00
Daniel Agar 08bf71b73d
drivers/tone_alarm and tune_control small improvements/cleanup
- drivers/tone_alarm: move to ModuleBase and purge CDev (/dev/tone_alarm0)
 - drivers/tone_alarm: only run on tune_control publication (or scheduled note) rather than continuously
 - drivers/tone_alarm: use HRT to schedule tone stop (prevents potential disruption)
 - msg/tune_control: add tune_id numbering
 - systemcmds/tune_control: add "error" special case tune_id
 - move all tune_control publication to new uORB::PublicationQueued<>
 - start tone_alarm immediately after board defaults are loaded to fix potential startup issues
 - for SITL (or other boards with no TONE output) print common messages (startup, error, etc)
2020-10-05 21:39:26 -04:00
David Sidrane 185ffe9e13 nsh scripting:source (.) cmd supported 2020-09-16 21:32:04 -04:00
SalimTerryLi c037dbef21
Rename and move src/drivers/adc to src/drivers/adc/board_adc 2020-09-07 23:09:20 -04:00
Daniel Agar 26bac78eaf mixers: Multirotor remove text roll, pitch, yaw scaling and idle speed 2020-08-17 16:37:08 -04:00
Daniel Agar ca81175b07 rename drivers/px4fmu -> drivers/pwm_out
- split out header
2020-03-31 19:12:31 -04:00
Beat Küng e4bf535595 refactor bst telemetry: use driver base class 2020-03-17 23:31:17 -04:00
Beat Küng ec2de33547 lights: use driver base class 2020-03-17 23:31:17 -04:00
Beat Küng 3b7b2dc871 differential_pressure sensors: use driver base class 2020-03-17 23:31:17 -04:00
Matej Frančeškin b8970673c6 Fixed Mavlink FTP tests 2020-03-08 21:43:54 +01:00
Timothy Scott 327354705b Fixed filename 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
Julian Oes 3ebf030a02 ROMFS: change shebang from #!zsh to #!/bin/sh
This was required for shellsheck.
2018-12-19 07:36:43 +00:00
Daniel Agar a3fed608a6 move airmind_mindpx-v2 init to rc.board 2018-12-01 10:03:19 -05:00
Daniel Agar c6a502f150 move fmu-v2/v3 init to rc.board 2018-12-01 10:03:19 -05:00
Daniel Agar d940f500f6 move fmu-v4 init to rc.board 2018-12-01 10:03:19 -05:00
David Sidrane cadda8c263 px4fmu_test:rcS use correct name for px4io bin 2018-11-26 14:40:14 -08:00
Daniel Agar abb3817d31 boards new split VENDOR_MODEL naming convention 2018-11-26 14:40:14 -08:00
Beat Küng 37338e442f NuttX shell scripts: replace operator == with =
- NuttX supports both versions
- POSIX shell only supports '='
2018-09-27 23:39:20 +02:00
David Sidrane 91abb36063 px4fmu_test:rcS:Use tune_control 2018-08-30 19:11:17 +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
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 95f17d5669 px4fmu_test update mixers 2018-04-09 02:23:26 -04:00
Daniel Agar 3b64325ff8 update px4fmu_test and add px4fmu-v2_test to Jenkins 2018-04-07 22:32:53 -04:00
ksschwabe 500a1c808d ROMFS list files explicitly instead of using GLOB_RECURSE (#9107)
* Lists ROMFS files explicity instead of using GLOB_RECURSE

Previously, when ROMFS files that were not airframes were touched, the ROMFS
would not be rebuilt. The ROMFS files are now specified explicityl in a
CMakeLists.txt file that is located in the root ROMFS directory.

Now when one of the ROMFS files is touched the whole ROMFS is rebuilt.

When new files are added to the ROMFS, they need to be explicity added to
the CMakeLists in the ROMFS root directory.

* ROMFS: adds individual CMakeLists files in each subdirectory

Also moves the temporary ROMFS build directory to ${PX4_BINARY_DIR}/ROMFS/genromfs
so that the cmake_install.cmake files and the CMakeFiles directories (generated whenever
are not add_subdirectory() is called) are not generated in the temporary ROMFS directory
from which the ROMFS binary is created.

* cmake ROMFS generate add px4_add_romfs_files function

* ROMFS CMakeLists: adds explanatory comment to px4_add_romfs_files function

* ROMFS CMakeLists: updates copyright headers
2018-03-26 11:19:00 -04:00
David Sidrane f6a0765d3c ROMFS:px4io-v1:Removed px4io-v1 board from PX4
Only support px4io-v2 px4io
2017-09-10 13:37:23 -04:00
David Sidrane 62a2351a72 ROMFS:Removed FMUv1 from rcS etal 2017-09-10 13:37:23 -04:00
NRottmann 0f8f5d29be Enable Simulation of the Hippocampus (AUV from TUHH)
Adding files which enable a simulation with the autonomous underwater
vehicle (AUV) from the Technical University Hamburg-Harburg
2017-08-20 20:59:15 +02:00
Daniel Agar 7029be87c0 MS5525 differential pressure driver 2017-07-06 10:05:07 -04:00
Henry Zhang 92fc82da33 MindPX: Remove MPU6500 driver, use MPU9K driver instead 2017-05-02 11:52:12 +02:00
Beat Küng b1be963083 px4fmu_test rcS: switch to led_control command 2017-03-12 00:08:35 +01:00
Lorenz Meier e395c1f3d7 ROMFS: Limit test mixer to max 4 inputs 2017-01-03 20:32:33 -05:00
Andreas Antener a5a5694a5e Mixer tests: updated vtol2 test mixer to the one that actually failed before 2017-01-03 20:32:33 -05:00
Lorenz Meier d0dbddea1b Extend mixer test case with complex mixer 2017-01-03 20:32:33 -05:00
Lorenz Meier 51a89b74fb VTOL mixer: Use formatting without workarounds for system test 2017-01-03 20:32:33 -05:00
Lorenz Meier 2eda90906d Add VTOL2 test mixer 2017-01-03 20:32:33 -05:00
Lorenz Meier 01bbd3976b Add VTOL1 test mixer 2017-01-03 20:32:33 -05:00
Vasily Evseenko 49844f52d5 Fix SF10a driver. Add support for SF11c and rename to SF1xx 2016-08-04 15:09:33 +02:00
Lorenz Meier 6ab9dc0acf Testing cleanup from Daniel Agar 2016-07-29 13:49:14 +02:00
Lorenz Meier e43625cfc1 ROMFS: Clear out SITL mixers from deployed image, delete unused mixers, move test mixers to test config 2016-07-01 18:08:32 +02:00
Daniel Agar 008354f935 testing cleanup 2016-05-13 13:01:41 +02:00
Daniel Agar 2bc74fd5d9 restore px4fmu-v2_test 2016-05-13 13:01:41 +02:00
jgoppert 8536722861 Firmware rename for px4io to avoid using board label in name. 2015-10-20 13:44:17 -04:00
Lorenz Meier 319f9d820f telemetry: Crank up rates to make param downloads and other things less painful 2015-06-30 12:55:28 +02:00
Lorenz Meier 88cebd3c2a Add free to hardware tests 2015-03-08 08:35:10 +01:00
Lorenz Meier 4938ff4c29 Indicate test status with RGB led 2015-02-21 12:45:50 +01:00
Lorenz Meier 4b1ddba817 Fix test setup param load 2015-02-09 23:27:10 +01:00