Commit Graph

1950 Commits

Author SHA1 Message Date
Daniel Agar 161cf7f5d9 shellcheck fix rc.autostart return and improve globbing 2018-12-01 10:03:19 -05:00
Daniel Agar 3e9e5ed372 ROMFS move airframes to subdirectory 2018-12-01 10:03:19 -05:00
Daniel Agar 7f0d2f23b7 move atmel_same70xplained init to rc.board 2018-12-01 10:03:19 -05:00
Daniel Agar 4240abad73 move bitcraze_crazyflie init to rc.board 2018-12-01 10:03:19 -05:00
Daniel Agar 0e980c1f83 move gumstix_aerocore2 init to rc.board 2018-12-01 10:03:19 -05:00
Daniel Agar a3fed608a6 move airmind_mindpx-v2 init to rc.board 2018-12-01 10:03:19 -05:00
Daniel Agar c9a2033c5b move auav_x21-v1 init to rc.board 2018-12-01 10:03:19 -05:00
Daniel Agar a8b91c7ac9 move intel_aerofc-v1 init to rc.board 2018-12-01 10:03:19 -05:00
Daniel Agar a4830f8d7b move omnibus_f4sd init to rc.board 2018-12-01 10:03:19 -05:00
Daniel Agar 60ade5d82b move av_x1-v1 init to rc.board 2018-12-01 10:03:19 -05:00
Daniel Agar aab08ad6fc move nxp_fmuk66-v3 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 6c2436c2ca move fmu-v4pro 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
Daniel Agar 25799c6e75 create board specific init script and use with fmu-v5 2018-12-01 10:03:19 -05:00
David Sidrane 729d1c32d3 Rename nxphlite-v3 to NXP fmuk66-v3 (#10927) 2018-11-28 12:13:21 -05:00
Daniel Agar ba6b71e619 px4fmu-v4 start ist8310 mag (optional external) 2018-11-27 09:29:48 -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
Daniel Agar f692ad04d0 boards organization 2018-11-26 14:40:14 -08:00
CUAVcaijie eb8a3de987 add rgbled_ncp5623c driver (#10889)
Co-Authored-By: CUAVcaijie <caijie@cuav.net>
2018-11-25 13:40:51 -05:00
TSC21 e3af000fdb init.d-posix: make 1013_iris_vision independent of 1010_iris_opt_flow 2018-11-21 12:21:16 +01:00
TSC21 dcdddacdb2 init.d-posix: vision: set the appropriate parameters 2018-11-21 12:21:16 +01:00
Daniel Agar 8566b6b53e AV-X increase logger buffer 2018-11-21 09:13:40 +01:00
Eric Babyak 560a9b45ed Fix for initializing Landing Target Estimator in SITL 2018-11-20 18:16:45 +01:00
David Sidrane 8d15da379b nxphlite-v3:Add HolyBro GPS on I2C 2 using ist8310 2018-11-09 15:04:51 -05:00
bresch 4f668c0c2d SITL - update default velocity PID gains 2018-11-06 22:17:00 +01:00
Daniel Agar 5d3d120705 delete unused IOCTL ACCELIOCSRANGE 2018-11-06 07:43:43 +08:00
Daniel Agar cf4b19d153 delete unused FMU_pass mixer 2018-10-30 09:18:39 -04:00
Daniele Pettenuzzo d2e2b5e8ce add pmw3901 optical flow support for fmu-v5 (#10750) 2018-10-24 10:25:41 -04:00
Daniel Agar d832b4fe28 rc.mavlink AV-X reduce companion baudrate 2018-10-23 08:15:11 +02:00
dakejahl dce4d75f5a TealOne airframe config file (#10713) 2018-10-19 20:27:50 -04:00
Daniel Agar 0c698baca7 AV-X mavlink network and companion defaults
- start mavlink on network by default (port 14570)
 - start mavlink for TX2 companion by default
2018-10-17 00:22:53 -04:00
Friedrich Beckmann 64f23c1aed moved comment from class section to avoid PX4Buildbot confusion
The PX4BuildBot extracted the comments from the lines following
the class line which says "Plane" as the class. To avoid the
confusion for the bot I moved the comment further down.
2018-10-16 16:49:13 -04:00
Mark Sauder ad8539bd15 Deprecate the tap_common directory, nuttx, driver, and makefile references to tap-v1. (#10629) 2018-10-15 11:53:29 -04:00
fredowski a21d352388 added X-UAV Mini Talon V-Tail airframe and mixer (#10414)
* The X-UAV Mini Talon airframe with the new type Plane V-Tail uses the new AAVVTWFF_vtail mixer.
The new mixer is derived from the AAVVTWFF mixer and is a generic V-Tail mixer. I left the flaps and wheel although there are no flaps and wheels on the mini talon to keep it generic. The airframe configuration is derived from the Albatross A-Tail.
2018-10-15 09:37:22 -04:00
Beat Küng eb30b5b73e mc_pos_control_params: remove unused MPC_MANTHR_MAX params 2018-10-04 15:09:02 +02:00
Beat Küng 09563c94ce rcS: fix typhoon_h480
The typhoon has a 6011_typhoon_h480.post script that got matched as well.
Now we exclude all files that contain a dot (apparently it's not so easy
to do generic pattern matching in a portable way, but this works).
2018-10-04 09:38:59 +02:00
Beat Küng b972651a06 posix shell: use /bin/sh instead of bash
This uses the systems default shell:
- Ubuntu: dash
- Fedora: bash

Since bash is invoked via /bin/sh, it operates in POSIX mode:
  https://tiswww.case.edu/php/chet/bash/POSIX

- remove '# Ignore the expand_aliases command in zshell.'
  Not needed because the shell operates in POSIX mode
- [[ is bashism -> use [
- autostart_files=( $autostart_file_match )
  is not supported in dash, so use 'ls'
- shellcheck runs the dash flavor, since dash is a minimalistic shell.

Tested on dash & bash.
2018-09-27 23:39:20 +02: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 45cf4d49f9 rcS:FMU V5 mini disable px4io 2018-09-26 23:27:23 +02:00
Beat Küng c2ff0b1052 rcS: start frsky_telemetry on Pixracer if not enabled already 2018-09-25 14:31:47 -04:00
mcsauder c390d02f1c Tidy up an OUTPUT_DEV set/unset in rc.interace and rcS. 2018-09-25 07:55:03 +02:00
Daniel Agar 078f5ea198 serial generate config add 10 generic serial ports 2018-09-25 07:53:29 +02:00
Beat Küng 39db2a6bf9 shellcheck: ignore SC2154 on NuttX
This is because NuttX uses a different assignment for variables.
2018-09-25 07:53:29 +02:00
Beat Küng 300e66ae6a SYS_COMPANION: deprecate this param
Replaced with the more generic serial config params.

rc.mavlink contains automatic transition support that can be removed after
the next release.
2018-09-25 07:53:29 +02:00
Beat Küng f0c0b6f6e8 params: remove unused SENS_EN_* params
Replaced with the more general serial config params.
2018-09-25 07:53:29 +02:00
Beat Küng dae292631c Tools/serial: use per-module serial port config params, instead of per-port 2018-09-25 07:53:29 +02:00
Beat Küng c237221a81 cmake: add serial param & ROMFS generation to the build system
- only a few configs done yet
2018-09-25 07:53:29 +02:00
mcsauder a1af7ffdcf Remove whitespaces to quiet git commit trailing whitespace warnings. 2018-09-21 23:28:31 +02:00
Kunal Shah 7f016b5fd4
ROS multi-vehicle simulation: fixed udp port overlap issues 2018-09-21 09:01:47 +02:00
mcsauder 0ecf6436f8 Modify 500001_axialracing_ax10 to utilize rc.ugv_defaults to allow deprecating rc.axialracing_ax10_apps and rc.axialracing_ax10_defaults and update CMakeLists.txt. 2018-09-19 14:07:30 -04:00
Roman e1992a5036 ROMFS: enable weathervane by default for VTOL
Signed-off-by: Roman <bapstroman@gmail.com>
2018-09-19 13:30:32 -04:00
mcsauder 39ee1926a2 Alphabetize hardware type logic blocks and sensor specific logic blocks in rc.sensors. 2018-09-19 13:17:10 -04:00
mcsauder 31f3bcfc3a Remove logic from rc.vehicle_setup that resulted in redundantly setting the MAV_TYPE to the same initial default value set within the script. 2018-09-18 22:49:01 -04:00
mcsauder e79fa1773d Alphabetize vehicle type logic block order and Update param set MAV_TYPE logic to only set the parameter if no MAV_TYPE was previously set. 2018-09-18 19:46:59 -04:00
Daniel Agar c7e572d2c2 commander preflight check sensors via uORB instead of IOCTL
- remove all platform defines
2018-09-18 22:24:03 +02:00
TSC21 8325724079 general fixes on VIO data access 2018-09-18 09:52:33 +02:00
mcsauder 0d0fcb140c Updated rc.vtol_defaults to correct PWM_AUX behavior for VTOL airframes. Added PWM_AUX_RATE to rc.vtol_default and set parameters directly instead of environment variables. 2018-09-17 20:28:09 -04:00
David Sidrane 2d800885bc NXPHlite: rc.sensors start lis3mdl (#10500) 2018-09-17 13:29:08 -04:00
bresch 740e409016 PWM - Add PWM_MIN and PWM_MAX parameters for MAIN and AUX (#10452) 2018-09-16 18:07:29 -04:00
Daniel Agar 9580cb8d86 SITL plane cut throttle during landing final stage 2018-09-17 00:06:52 +02:00
Beat Küng 84c6b5ac6b fmu-v2: add bootloader binary and SYS_BL_UPDATE param for BL updates
This allows a simple-to-use bootloader update mechanism to switch from
fmu-v2 to fmu-v3 target that has more flash.
2018-09-14 17:06:19 +02:00
mcsauder e7666aa5d8
Added an imu heater driver, formatted whitespace, standardized comments, and added doxy documentation. 2018-09-06 12:03:26 +02:00
mcsauder 0c08b7035b Edit the init.d-posix files to set MAV_TYPE script variables, and alphabetize lists in a few places. 2018-09-04 10:23:27 +02:00
mcsauder 4ea3306ec2 Set parameters directly rather than script variables in VTOL airframe config files and alphabetize lists. 2018-09-04 10:23:27 +02:00
fredowski ad6e48c372 cmake - check directory existence before copy_directory (#10402)
Starting with cmake version 3.12 the cmake -E copy_directory
command fails if the source directory does not exist. This results
in a build failure. This fix creates the source directory before
the copy which does not harm if the source directory exists.

Closes: #10368
2018-09-03 20:27:32 -04:00
David Sidrane 19a8c3e49c rcs:Add comment & test 4 Mini test on all px4io init 2018-08-30 19:11:17 +02:00
David Sidrane c072fefa2c px4fmu_common:rcS:Use tune control, suport FW with no PX4IO
On FW with a px4io bin file, but not a px4io do not error

   Use tune control and have all paths in rcS indicate tunes
2018-08-30 19:11:17 +02:00
David Sidrane 6a7d98229e tap_common rcS:Use tune_control & clean up 2018-08-30 19:11:17 +02:00
David Sidrane b9a54cb4fd tap_common rc.interface:Use tune_control 2018-08-30 19:11:17 +02:00
David Sidrane 91abb36063 px4fmu_test:rcS:Use tune_control 2018-08-30 19:11:17 +02:00
David Sidrane a2dde6bc19 rc.mavlink:Use tune_control 2018-08-30 19:11:17 +02:00
David Sidrane 7d3d497831 rc.io:Use tune_control 2018-08-30 19:11:17 +02:00
David Sidrane f5295d7700 rc.interface:Use tune_control 2018-08-30 19:11:17 +02:00
Matthias Grob 0c6bffb66a commander: make auto disarm timeout float
such that fractions of a second are configurable
2018-08-30 08:05:13 +02:00
Kevin Lopez Alvarez c10ea132b4 PNI RM3100 magnetometer driver (#10302)
* tested on SPI (px4fmu-v4pro)
 * WIP I2C support
2018-08-28 11:44:34 -04:00
bresch 04c765f497 Failsafe PWM - Add PWM_MAIN/AUX_FAILx parameters to set "failsafe" values. 2018-08-28 11:23:25 -04:00
Jake Dahl 07d606ef83 Added TI PGA460 driver functionality to PX4. 2018-08-27 21:15:04 +02:00
Daniel Agar 52e1b59e60 cmake add nuttx shellcheck helper 2018-08-25 20:12:29 +02:00
Daniel Agar 096c41b041 init.d-posix/rcS replace bashism 'source' with '.' 2018-08-25 20:12:29 +02:00
Daniel Agar 642aff9786 init.d-posix replace bashism '==' with '=' 2018-08-25 20:12:29 +02:00
Daniel Agar 72792cef43
posix-configs shell scripts use /bin/sh to maximize compatibility (#10292)
- fix ocpoc line endings
2018-08-25 11:02:37 -04:00
David Sidrane 454d175617 rc.mavlink:Seperate sys compaion init dependant on MAVLINK_COMPANION_DEVICE 2018-08-23 14:26:32 -07:00
David Sidrane 46b563fe3a rc.mavlink:NXPhlite Mavlink on ttyS4 and ttyACM only
NXPhlite does not have a companion link. So start
    Mavlink on ttyS4 and ttyACM only.
2018-08-23 14:26:32 -07:00
David Sidrane 2c282d0e0e rc.mavlink:Fix syntax errors 2018-08-23 14:26:32 -07:00
mcsauder 1a1a04c094 Directly set parameters in airframe config files rather than setting script variables and move the param set lines into logic blocks, and alphabetize and tidy up param set lists. 2018-08-22 10:20:07 +02:00
Daniel Agar e356fd89b0
CI mission tests add FW and cleanup (#10250)
* jenkins: decrease VTOL mission alt and FW mission use simple land wps
* startup: decrease min airspeed scaling factor for landing
* jenkins: FW mission include loiter_to_alt cmd
2018-08-17 13:02:14 -04:00
Beat Küng 888d85008b rcS: use quotes to set TUNE_ERR variable (ShellCheck complained) 2018-08-15 10:13:06 -04:00
Beat Küng b3a25bb2bb posix rcS: use sed instead of grep -P
The -P argument seems not to be supported on OSX
2018-08-15 10:13:06 -04:00
David Sidrane dd69427cbf rc.io:Add USE_IO == yes && IO_PRESENT == yes test
On a FMU without a px4io (FMUv4, NXPhlite etc), this code should
  not be run.
2018-08-14 09:38:15 -04:00
David Sidrane ce47dc24da rcS:Added unset for TUNE_ERR 2018-08-14 09:38:15 -04:00
David Sidrane 8d14f9db52 rcS:Fix missing TUNE_ERR 2018-08-14 09:38:15 -04:00
David Sidrane c46a405e0c rcS:NXPhlite add back UxASRT usage 2018-08-14 09:38:15 -04:00
David Sidrane e892227d1f nxphlite-v3:Fix merge issue 2018-08-14 09:38:15 -04:00
David Sidrane e35be68fd4 NXPhlite work arround to internal i2c routed to external connector.
Since the only device on the bus is the barro, int or ext does
   not apply. This will be fixed on the rev > RC15.
   This defines an alias that can be used to condition the buss logic
   connection logic px4_i2c_bus_external to return external.
2018-08-14 09:38:15 -04:00
David Sidrane a4c4449b85 NXPhlite:Dedicate P10 UART as Telem 1 and disable companion 2018-08-14 09:38:15 -04:00
Beat Küng 923f6239e1 posix rcS: automatically find the requested model instead of explicitly enumerating them 2018-08-13 21:50:14 -04:00
Beat Küng 4e860e357c Tools: add run-shellcheck.sh to statically analyze startup scripts
Use './Tools/run-shellcheck.sh ROMFS/px4fmu_common' to run it.
2018-08-13 21:50:14 -04:00
Beat Küng 9712f6b02a mixers: remove unneeded README
This info is on the dev-guide now
2018-08-13 21:50:14 -04:00
Beat Küng 273988c124 SITL: move all models to unified rcS startup and remove old scripts 2018-08-13 21:50:14 -04:00
Beat Küng 5ebd0116de rc.interface: allow setting a custom MIXER_FILE 2018-08-13 21:50:14 -04:00
Beat Küng e6b9806ee1 SITL: add multi-vehicle support to rcS
This also removes the HIGHRES_IMU mavlink stream to the GCS. I don't see
why it's needed and it adds noticeable CPU load.
2018-08-13 21:50:14 -04:00
Beat Küng a00f7ebf47 sitl scripts: refactor to use existing rc.vehicle_setup from NuttX 2018-08-13 21:50:14 -04:00
Beat Küng fcd3a04b07 rc.interface: remove unnecessary fmu start for RC input
RC input is now handled via rc_input module
2018-08-13 21:50:14 -04:00
Beat Küng 9ba2e91fa1 ROMFS: avoid empty 'then else' clause, it's an error in bash
Use 'if ! <cmd>' instead.
2018-08-13 21:50:14 -04:00
Beat Küng d4c7dbc93d posix rcS: automatically find matching autostart file based on SYS_AUTOSTART 2018-08-13 21:50:14 -04:00
Beat Küng 1318e614ad SITL: handle 'make posix_sitl_shell' via unified rcS
The command is now: 'make posix none_shell'
which means: don't start a simulator and run a minimal shell only.
2018-08-13 21:50:14 -04:00
Beat Küng ab7f68f2ad ekf2 replay: refactor to use unified rcS scripts 2018-08-13 21:50:14 -04:00
Beat Küng f414d0c413 SYS_COMPANION: add 1500000 baud to metadata & increase the data rate 2018-08-10 07:11:07 +02:00
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
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 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 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
Beat Küng a6f93c30d9 Revert "Move px4io firmware update logic block to rc.io."
This reverts commit 0928112a80.
2018-08-03 10:46:12 -04:00
Beat Küng 5437d55518 rc.sensors: try to start ist8310 on PX4FMU_V2
The Pixhack v3 comes with an external IST8310 in the GPS.
2018-08-02 16:09:36 +02:00
Beat Küng 8ef4f12b61 rc.sensors: fix BOARD_FMUV3, it was unset too early
It's used further down again.
2018-08-02 16:09:36 +02:00
mcsauder 0928112a80 Move px4io firmware update logic block to rc.io. 2018-08-02 12:19:23 +02:00
Daniel Agar ad41744670 wind_estimator add param to enable and start 2018-08-02 08:07:01 +02:00
mcsauder 1fe526b8eb Updated and added full stops to comments and did some comment/whitespace formatting in the startup scripts. 2018-07-31 09:06:03 +02:00
Daniel Agar 658237f36a px4fmu move RC input to new rc_input driver 2018-07-30 10:32:56 -04:00
Daniel Agar 4e05f26659 ms4525 driver extend to support ms4515 2018-07-30 10:24:40 +02:00
mcsauder ac8f44268b Added remaining two channels of PWM_AUX_DIS disarm parameter set commands, remove trailing whitespace from pwm_params_aux.c and pwm_params_main.c, gps/params.c and added block comment headers to separate sections instead of whitespace. 2018-07-30 09:36:44 +02:00
Daniel Agar 28610a2b62 AV-X lps22hb only start on SPI 2018-07-30 00:36:05 -04:00
mcsauder 8da1e67050 Move OUTPUT_MODE logic from rcS to rc.interface. 2018-07-26 08:17:52 +02:00
Daniel Agar 5ec010372c rcS preserve accel, gyro, and temp cal parameters 2018-07-25 07:48:19 +02:00
mcsauder ee3e34cd06 Move UART mapping comments back to top level rcS script. Deprecate PWM_ACHDIS and replace with PWM_AUX_OUT and set PWM_AUX_DIS value directly in vtol airframe config files. Replace tone_alarm instances with tune_control and default tune enums, and relocate an OUTPUT_MODE == fmu logic block in rcS. 2018-07-24 18:44:55 +02:00
Daniel Agar 4818e3abe0 ROMFS cmake combine copy, rc.autostart, prune steps 2018-07-24 10:50:24 -04:00
Daniel Agar 1481015675 ROMFS cmake update dependency handling 2018-07-24 09:12:44 +02:00
Beat Küng 3f615695b6 ROMFS: fix some cmake issues
- every incremental rebuild extended ${config_romfs_files_list}, the
  chached variable was never reset
- cmake -E copy_directory did not remove deleted files

remaining issue: removing a file from the ROMFS & px4_add_romfs_files()
does not trigger the px_romfs_pruner.py COMMANDs to be re-executed.
2018-07-23 18:23:46 +02:00
Beat Küng 3f03288a95 omnibus: add support for Hobbywing XRotor F4 G2
It has an ICM-20602 IMU
2018-07-23 11:04:17 +02:00
mcsauder ec16a4d063 Migrate LOGGER_BUF argument to rc.logging, group OUTPUT_MODE instances closer together by relocating UAVCAN logic block in rcS, and alphabetize hardware specific logic in rc.sensors. 2018-07-20 19:01:33 +02:00
Matthias Grob cc0bc05156 mc_att_control: remove useless parameter MC_YAW_FF
It scales the yawspeed setpoint arbitrarily by default with 0.5.
This makes no sense because when you give a setpoint of 1rad/s then
you expect the setpoint to get executed. If you want manual yawspeed
response to be less agressive on the stick use the scaling parameter
for the stick MPC_MAN_Y_MAX.
2018-07-20 09:26:18 +02:00
mcsauder 4f937a2ff6 Migrate px4io logic into rc.io. 2018-07-19 13:56:03 +02:00
mcsauder bccda56ed3 Re-order hardware specific logic in rc.interface. 2018-07-19 10:35:18 +02:00
mcsauder 6f63553824 Move MNT_MODE_IN / MOUNT_MODE_OUT logic block to rc.interface and move dataman, send_event, and load_mon startup just below uorb and tone_alarm startup in the rcS script. 2018-07-19 10:35:18 +02:00
mcsauder 1fa2a6d26e Continued work to group/condense/consolidate logic in rcS. 2018-07-19 10:35:18 +02:00
mcsauder 1d7dbdddca Add pwm failsafe -c argument to rc.interface, reference issue #9775. 2018-07-18 08:05:31 +02:00
mcsauder 71ceb0cfd6 Copy/paste logic in rc.interface to group MIXER and MIXER_AUX logic, alphabetize hardware list in rc.interface, alphabetize set/unset lists in rcS, and add -p argument to pwm failsafe calls per issue #9775. 2018-07-18 08:05:31 +02:00
mcsauder f9a6c13d55 Group instances of UAVCAN logic into a single block and copy/paste/regroup OUTPUT_MODE logic to form on block of code handling OUTPUT_MODE. 2018-07-17 09:33:50 +02:00
mcsauder e2eb84042e Group hardware specific logic in rcS, deprecate the MODE parameter from rcS, and update comments. 2018-07-16 16:43:01 +02:00
mcsauder ab788ceba7 Update sd card logic statment and comment. 2018-07-13 11:02:26 +02:00
mcsauder f2970071a7 Acronym correction. 2018-07-13 11:02:26 +02:00
mcsauder 2512f6e30e Format and comment fw, mc, vtol, and ugv vehicle apps and default startup scripts. 2018-07-13 11:02:26 +02:00
Daniel Agar 8537863848 delete sdlog2 2018-07-13 09:02:59 +02:00
Mark Sauder 72de9a901d Move additional logic block to rc.vehicle_setup, add rc.vehicle_setup to init.d/CMakeLists.txt, and relocate sd card logic block higher up in rcS. (#9896) 2018-07-12 16:45:19 -04:00
Mark Sauder bb86c5f200 Breakout rc.vehicle_setup from rcS. (#9892) 2018-07-12 14:50:47 -04:00
mcsauder e12acc4b28 Migrate hardware specific mavlink stream cases to rc.mavlink. 2018-07-12 08:10:59 +02:00
mcsauder 8b71bb4562 Breakout rc.mavlink from rcS script. 2018-07-11 09:38:58 +02:00
mcsauder 9386ab6afe Breakout rc.thermal_cal from rcS and group set/unset parameters at the beginning and end of the rcS script. Revert commit 2a3d66cf45 to reduce px4fmu-v2_default flash size. Standardize tabs/whitespaces across all files in the init.d directory. 2018-07-10 08:59:38 -04:00
Beat Küng 58c8c50174 frsky_telemetry: add scanning timeout parameter, and set it to 15s
This frees unused RAM in case frsky telemetry is not connected.
2018-07-08 23:24:17 +02:00
Daniel Agar 00c34d8a2b AV-X board support 2018-07-08 10:18:13 -04:00
DanielePettenuzzo e15d390f65 rc.sensors: fix 2018-07-03 17:33:18 +02:00
DanielePettenuzzo 0cc5a41bb8 rc.sensors: start all i2c distance sensor with -a flag 2018-07-03 17:33:18 +02:00
Roman e1117d175b ROMFS: updated deltaquad autoconfig params
Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-03 08:53:30 +02:00
Hamish Willee 7402d8223b Fix up references to pixhawk.org 2018-07-02 13:11:15 +02:00
Roman 863cd52714 ROMFS: fixed some naming inconsistencies for the HITL VTOL model
Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-02 13:09:35 +02:00
Roman 220068acb6 ROMFS: use more appropriate autostart ID for standard vtol hitl
Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-02 13:09:35 +02:00
Roman d70e90f174 ROMFS: remove unnecessary params from hitl vtol config
Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-02 13:09:35 +02:00
Roman b37ff23708 ROMFS: indicate that the hitl vtol config is for the gazebo standard vtol model
Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-02 13:09:35 +02:00
Roman 1dea998be5 ROMFS: clean up quad x tailsitter mixer files
- use mixer for the simulation to the sitl mixer dir
- do not use virtual elevator in the mixer for the real vehicle

Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-02 13:09:35 +02:00
Roman 484a939779 added MAV_TYPE to standard vtol hitl config
Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-02 13:09:35 +02:00
Roman 9546daadea ROMFS: added autostart and mixer file for standard vtol in hitl
Signed-off-by: Roman <bapstroman@gmail.com>
2018-07-02 13:09:35 +02:00
Mark Sauder d3c169b1e0 Fix whitespaces in PreflightCheck.cpp, tilt_quad.aux.mix, and tilt_quad.main.mix 2018-06-28 20:20:32 -04:00
DanielePettenuzzo 82b3e57abb rc.sensors: look for airspeed sensors on all busses 2018-06-21 07:37:53 +02:00
Philipp Oettershagen 7a82c777b2 LandDetector FW: Fix param min/max values and descriptions as well as some variable names which were wrong/outdated (#9708) 2018-06-20 16:13:33 -04:00
Ricardo Marques bf0a1f05fb Tilt-Quadrotor Mixer and Airframe files (#9496) 2018-06-20 10:35:05 -04:00
Beat Küng a76c82f5f2 airframes: update 4050 generic 250 racer defaults
- P and D gains are too high for a racer
- default I gain is too low (0.25 is still quite low)
- use the thrust curve param instead of TPA
- improve responsiveness in Manual & increase max tilt angle to 60 degrees
- enable one-shot
- enable high-rate logging profile
- disable RC filter
2018-06-09 17:00:35 +02:00
Beat Küng f8dd833a14 onmibus-f4sd: add ADC support 2018-05-31 19:13:00 +02:00
Beat Küng 77cea8844f ROMFS: fix SYS_USE_IO==0
When SYS_USE_IO was disabled, px4io would not start and thus there was no
RC. SYS_USE_IO=0 is interesting on Quads to avoid the IO and reduce output
latency.

Tested on Pixhawk 1 and Pixhawk 4
2018-05-28 19:03:33 +02:00
Beat Küng c9d179676e simple mixer: make output scalers O: optional and use default values instead
Reduces FLASH usage by about 4KB

Command to replace:
for i in *.mix; do sed -r -i '/O: +10000 +10000 +0 +-10000 +10000/d' $i; done
2018-05-25 07:57:08 +02:00
DanielePettenuzzo 28f616b1c1 crazyflie: updated default params in config file 2018-05-23 18:32:36 +02:00
Daniel Agar f208241074 SYS_COMPANION add RTPS client option 2018-05-22 20:37:37 -04:00
barzanisar 36131179d3 adding airframe config for s500 (#9342) 2018-05-22 18:39:28 -04:00
DanielePettenuzzo 22868dd5a4 crazyflie: add downsampling to pwm3901 optflow driver 2018-05-22 12:21:45 +02:00
DanielePettenuzzo f49fd2acc7 crazyflie: increase imu reading rate 2018-05-22 12:21:45 +02:00
DanielePettenuzzo b822966e8e crazyflie: support for sd card board via SPI 2018-05-22 12:21:45 +02:00
DanielePettenuzzo 56acce4491 rcS: start vl53lxx and pmw3901 drivers 2018-05-22 12:21:45 +02:00
Beat Küng 527070bb35 rcS: update default params for Omnibus F4 SD 2018-05-20 11:54:17 +02:00
nathan f754d092f8 Initial omnibusf4sd target support
Flight tested: ekf2 w/ mag and compass by @nathantsoi: https://logs.px4.io/plot_app?log=79b81031-cf1e-41f0-890b-d6cd7d559766

NOTE: external I2C devices need a pullup. I have tested with a 3.3v 2.2k pullup.

Working:
 - mpu6000, bench tested and verified via nsh
 - fmu
 - all 6 ch output bench tested w/ pwm and oneshot via nsh
 - ppm input bench tested
 - dsm input bench tested
 - bmp280, bench tested and verified via nsh
 - hmc5883, bench tested and verified via nsh, but requires an external i2c pullup
 - gps on uart6
 - startuplog, nsh, mavlink on uart4, but params are not sent for some reason. RSSI pin is TX, MOTOR 5 is RX (normal mode, 57600 baud)
 - rgbled over i2c, bench tested and workingp
 - sbus via the shared sbus/ppm pin (which includes an inverter to the mcu SBUS in pin), remove the solder bridge or jumper to the ppm pin before use

Not yet implemented:
  - ADC
  - OSD: passthrough video is untested, use at your own risk until a basic driver is implemented.
2018-05-20 11:54:17 +02:00
Beat Küng 873e036e85 px_romfs_pruner: reduce multiple consecutive spaces into a single space for mixers (#9457)
Reduces FLASH usage by about 3kb.

Plus add a missing cmake dependency.
2018-05-14 14:05:29 -04:00
Daniel Agar f131409bce FW defaults set commander eph, epv, evh thresholds 2018-04-24 00:02:48 -04:00
Beat Küng 64aab8a685 rcS: do not reset COM_FLTMODE* on airframe change
An airframe change keeps all RC params except the flight modes. This fixes
that.
2018-04-17 14:17:20 +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
DanielePettenuzzo 1b7fd5eae7 rcS: initialize TELEM4 on ttyS3 on FMUv5 2018-04-04 12:08:34 +02:00
Phillip Kocmoud c3b64f6d2a Corrected rotation for internal SPI LIS3MDL Sensor on R15 Pixracer 2018-03-28 13:47:22 -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
Martin Trgina 01f5f8862a Support of HITL simulation for Intel Aero FC (#9132)
* Adding pwm_out_sim
* pwm_out_sim driver will be by default part of Aero FC PX4 Nuttx drivers
* tap_esc is off when SYS_HITL 1
2018-03-22 16:47:58 -04:00
Daniel Agar fd0f31ef50 FW Phantom FPV Flying Wing fix FW_R_RMAX 0 2018-03-21 18:34:52 -04:00
Roman e504dc86b7 fw & vtol startup scripts: don't start wind estimator for now
- need to make some flash space for fmuv2 to avoid user confusion about
why it wind estimator only runs on some platforms

Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-21 18:46:58 +01:00
Roman df3a3daa0f start wind estimator for relevant platforms
Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-21 18:46:58 +01:00
Roman cb30d66cef convergence config: increase multirotor idle speed
- increase the minimum pwm value for multirotor mode since we experienced
the rear motor stalling in certain situations when throttle was low

Signed-off-by: Roman <bapstroman@gmail.com>
2018-03-20 21:00:34 -04:00
Kabir Mohammed 7776789b7d rc.sensors : fix startup for lidars on Pixhawk boards (#9058) 2018-03-15 13:26:35 -04:00
Matthias Grob 6317d36ec9 mc_att_control: remove time constant parameter
Because the parameter does not make sense from a control theory
perspective. Either you have a gain with the unit 1/s or an inverse
gain or time constant with the unit s. But the time constant parameter
was neither bound to any exact unit nor did it apply instead of a gain.
Rather it adjusted multiple gains from rate and attitude control
according to an arbitrary scale. This can only by accident lead to
good tuning.
2018-03-15 17:16:14 +01:00
Beat Küng 06df2fcb65 rc.interface: disable AUX mixer on NXPHLITE_V3 2018-03-12 11:56:59 +01:00