Compare commits

...

324 Commits

Author SHA1 Message Date
Lorenz Meier 401af28b38 Ensure that UAVCAN_ENABLE is always present 2016-01-16 12:07:50 +01:00
Lorenz Meier 7ea41491e5 FMUv4: Fix code style 2016-01-15 23:48:18 +01:00
Roman Bapst 0db264bc79 Merge pull request #3519 from PX4/mc_pos_quick_fix
quick fix:
2016-01-15 23:29:15 +01:00
Lorenz Meier 415e42f5de MS5611: Use baro SPI device 2016-01-15 22:44:22 +01:00
Lorenz Meier 0910cb3256 FMUv4: Add baro SPI bus define 2016-01-15 22:34:20 +01:00
Lorenz Meier e663b60c69 FMUv2: Add baro SPI bus define 2016-01-15 22:34:09 +01:00
tumbili be1db2ced5 quick fix:
Remove throttle non-increase condition for landing since this has lead to
quads falling out of the sky.
2016-01-15 16:15:27 +01:00
Sander Smeets 4ab39725dd Merge pull request #3517 from sanderux/master
QuadRanger airframe
2016-01-15 11:58:24 +01:00
Sander Smeets c77a2acb93 QuadRanger airframe 2016-01-15 10:22:29 +00:00
Lorenz Meier c0e88e262c Drop man min throttle to 8% since its a continous user complaint 2016-01-14 23:50:37 +01:00
Lorenz Meier c0bc721778 Add missing define for DSM 2016-01-14 18:48:42 +01:00
Roman Bapst b26fc1f089 fix waypoint handling in position control 2016-01-14 18:30:30 +01:00
Lorenz Meier 9fb29d3a38 FMU: Add RC input definition for each RC protocol 2016-01-14 17:55:55 +01:00
Lorenz Meier 5bd4495a78 Added input_rc SUMD defines 2016-01-14 17:55:55 +01:00
Lorenz Meier c7767dfe7e RC: Add constants for FMU input 2016-01-14 17:55:55 +01:00
Mark Whitehorn 5a93e68918 fix code style 2016-01-14 17:55:55 +01:00
Mark Whitehorn ab1bbb9ed8 remove extraneous rescan tests 2016-01-14 17:55:55 +01:00
Mark Whitehorn 4d7fe08069 fix code style 2016-01-14 17:55:55 +01:00
Mark Whitehorn 5d588d98be change CMake CONFIG to fmu-v2 and THREADS to 4 2016-01-14 17:55:55 +01:00
Mark Whitehorn df5cb5472d configure GPIO_SBUS_INV for PixRacer R12 2016-01-14 17:55:54 +01:00
Mark Whitehorn ecbcfe838b clean up, change SPI2 clock back to 12MHz and remove debug prints 2016-01-14 17:55:54 +01:00
Mark Whitehorn ab71af6053 fix spi select logic 2016-01-14 17:55:54 +01:00
Mark Whitehorn 4952d05652 debugging ms5611 on spi2 2016-01-14 17:55:54 +01:00
Mark Whitehorn 32626b57a4 add missing #ifdef 2016-01-14 17:55:54 +01:00
Mark Whitehorn 47207b8fc8 set FMU_RC_OUTPUT high for all non-SBUS modes 2016-01-14 17:55:54 +01:00
Mark Whitehorn 5cf78cd450 configure usart6 TX for RC out
add RC_OUT pin to FMUv4 config
2016-01-14 17:55:54 +01:00
Mark Whitehorn e0bbbd356f add SUMD decoder to RCscan 2016-01-14 17:55:53 +01:00
Mark Whitehorn 3d185e18e9 remove warnx in set_rc_scan_state 2016-01-14 17:55:53 +01:00
Mark Whitehorn eb36eac137 reduce scan interval to 100msec 2016-01-14 17:55:53 +01:00
Mark Whitehorn 9eecca6a71 add string value struct for RC_SCAN enum 2016-01-14 17:55:53 +01:00
Mark Whitehorn 425169921c begin adding DSM bind function 2016-01-14 17:55:53 +01:00
Mark Whitehorn ca2e9e7be1 handle PPM input with RC_SERIAL_PORT undefined 2016-01-14 17:55:53 +01:00
Mark Whitehorn 72156d9cd6 add macro to control RC input inverter
remove redundant variable
2016-01-14 17:55:53 +01:00
Mark Whitehorn 71a3e3713c move PPM input disable into scan case for PPM; PPM input is now enabled only while in RC_SCAN_PPM state 2016-01-14 17:55:52 +01:00
Mark Whitehorn 434ce85937 lock RC scan on first detection and fill in default values for fields not in DSM record
pull serial port read out of sbus and dsm input methods

clean up scanning code and add STM24
2016-01-14 17:55:52 +01:00
Mark Whitehorn 02030d9b36 scan working for SBUS and DSM 2016-01-14 17:55:52 +01:00
Mark Whitehorn 0f3878a48a DSM input tested OK with DX7 2016-01-14 17:55:52 +01:00
Mark Whitehorn af42f454f7 fix sbus for pixracer beta 2016-01-14 17:55:52 +01:00
Andreas Antener 05b23a8b54 disable pos/vel control during mission in transitions 2016-01-14 16:07:01 +01:00
tumbili 0d1872f223 support building standard vtol plane in SITL gazebo 2016-01-14 16:07:01 +01:00
tumbili 5fb6c75a2a added mixer for standard quad vtol plane in SITL gazebo 2016-01-14 16:07:01 +01:00
tumbili f2e7d5ca77 simulator: support for standard vtol plane 2016-01-14 16:07:01 +01:00
tumbili 2dab23ba04 pwm_out_sim: scale controls to correct range 2016-01-14 16:07:01 +01:00
tumbili 960a233fe9 added startup script for standard vtol plane in SITL 2016-01-14 16:07:01 +01:00
tumbili ee71a0d761 updated sitl_gazebo: support standard quad vtol plane 2016-01-14 16:07:01 +01:00
Lorenz Meier dd58dcfb91 Fix CMake version check 2016-01-14 12:48:42 +01:00
Lorenz Meier 67bba2065e ROMFS: Update airframe configs 2016-01-14 00:43:36 +01:00
Lorenz Meier 4437727b97 Airframes XML: Generate new icons 2016-01-14 00:43:23 +01:00
Lorenz Meier 30a86f4b79 FMU: Flag params requiring a reboot 2016-01-13 21:20:54 +01:00
Lorenz Meier 0f78c28aca PX4IO: Flag params requiring a reboot 2016-01-13 21:20:41 +01:00
Lorenz Meier 3e27189026 Sensor params: Flag params requiring a reboot 2016-01-13 21:20:21 +01:00
Lorenz Meier 9f4e6e3208 Set reboot required tag for cam trigger 2016-01-13 21:14:50 +01:00
Lorenz Meier 1772cbe5e0 Support reboot_required tag 2016-01-13 21:14:35 +01:00
Lorenz Meier a2758eadb6 Automate initial submodule update 2016-01-13 11:50:27 +01:00
Roman Bapst 181cbd383c tailsitter gazebo: lower max climb/descend velocity 2016-01-12 13:40:33 +01:00
Lorenz Meier 2c786e21f4 Update Matrix lib to fix isfinite call 2016-01-12 12:16:24 +01:00
Lorenz Meier e1ce681960 Update Matrix lib for CI 2016-01-12 11:52:00 +01:00
Lorenz Meier e21062c6db Updated Matrix lib 2016-01-12 11:04:53 +01:00
Lorenz Meier 7d7333cdea Better output on submodule check fail 2016-01-12 10:33:24 +01:00
Lorenz Meier e9dd2aec48 Further git submodule improvements 2016-01-12 10:18:05 +01:00
Lorenz Meier 365ef883e3 Check submodules during each build 2016-01-12 10:14:15 +01:00
James Goppert c40c91bedc Updated matrix for quaternion merge. 2016-01-11 22:12:32 -06:00
Lorenz Meier 21b99b408c Yaw fix: increase threshold 2016-01-11 11:58:13 +01:00
Lorenz Meier 79e7059eaf Fix yaw when in manual mode during arming 2016-01-11 11:58:13 +01:00
Lorenz Meier f99d052582 Fix submodule force. Fixes #3490. 2016-01-11 09:27:48 +01:00
nopeppermint 78f9bb79f1 more spelling mistakes 2016-01-11 08:38:09 +01:00
Stefan ed081ef60b correct link to developer guide
correct link to developer guide
2016-01-11 08:37:43 +01:00
Stefan 47786c8585 Update mavlink_main.cpp
spelling mistakes
2016-01-11 08:37:43 +01:00
Stefan 3dc4411592 Update sensors.cpp
spelling mistakes
2016-01-11 08:37:43 +01:00
Stefan 1742cce6f6 Update commander.h
spelling mistakes
2016-01-11 08:37:43 +01:00
Stefan 6e1bf506ad Update dq_rem.c
spelling mistakes
2016-01-11 08:37:43 +01:00
Stefan 41abe9221e Update main.cpp
spelling mistakes
2016-01-11 08:37:43 +01:00
Stefan d5c6fde5bc Update px4_posix.h
spelling mistakes
2016-01-11 08:37:43 +01:00
Stefan 70e7f1bec6 Update px4_spi.h
spelling mistakes
2016-01-11 08:37:43 +01:00
Stefan 07973bf87a Update px4_nodehandle.h
spelling mistakes
2016-01-11 08:37:43 +01:00
Stefan c341f94e5d Update gimbal_params.c
spelling mistakes
2016-01-11 08:37:43 +01:00
Stefan b97b3c68cb Update mtk.h
spelling mistakes
2016-01-11 08:37:43 +01:00
Stefan c42b0e7201 Update camera_trigger.cpp
spelling mistakes
2016-01-11 08:37:43 +01:00
Stefan 4ab4f1edc7 Update pwm_input.cpp
spelling mistakes
2016-01-11 08:37:43 +01:00
Stefan abf03c1c9d Update hott_sensors.cpp
spelling mistakes
2016-01-11 08:37:43 +01:00
Stefan 54677cd223 Update messages.cpp
spelling mistakes
2016-01-11 08:37:43 +01:00
Stefan 1d1ad3e9ed Update messages.h
spelling mistakes
2016-01-11 08:37:43 +01:00
Stefan 86ca7d8cfc Update drv_hrt.c
spelling mistakes
2016-01-11 08:37:43 +01:00
Stefan 5c1b84f16a Update ms5611_i2c.cpp
spelling mistakes
2016-01-11 08:37:43 +01:00
Stefan 8701e0ba78 Update test_mathlib.cpp
spelling mistakes
2016-01-11 08:37:43 +01:00
Stefan b274a3f6d1 Update test_eigen.cpp
spelling mistakes
2016-01-11 08:37:43 +01:00
Stefan 9f009d0615 Update UserGuide.md
spelling mistakes
2016-01-11 08:37:43 +01:00
Stefan 9197b85cfe Update rc_parameter_map.msg
spelling mistakes
2016-01-11 08:37:43 +01:00
Stefan caf0121f95 Update manual_control_setpoint.msg
spelling mistakes
2016-01-11 08:37:43 +01:00
Stefan fb702b7c48 Update input_rc.msg
spelling mistakes
2016-01-11 08:37:43 +01:00
Stefan 902b774091 Update mavlink_px4.py
spelling mistakes
2016-01-11 08:37:43 +01:00
Stefan 9d7b3bbff1 update ublox Protocol Specification links
update ublox Protocol Specification links
2016-01-11 08:37:43 +01:00
Andreas Antener 7e7b21cbdc use raw parameter floats if mission item is a mission command 2016-01-11 08:19:00 +01:00
Andreas Antener b0333e3e95 allow transition commands in auto mode 2016-01-11 08:19:00 +01:00
Lorenz Meier 77782bd254 Navigator: Support transition command and digicam command in missions 2016-01-11 08:19:00 +01:00
Lorenz Meier e1125ce9d3 Add digicam commands 2016-01-11 08:19:00 +01:00
Roman Bapst 2207986a1e Merge pull request #3485 from PX4/ekf2_blockparam
Ekf2 blockparam
2016-01-11 07:30:20 +01:00
Lorenz Meier ecc53488dd Commander: Allow commandline takeoff if already armed 2016-01-11 00:40:40 +01:00
Lorenz Meier 4d36cb848f Fix excessive DriverFramework log level 2016-01-11 00:38:05 +01:00
Lorenz Meier a355bdeea3 Fix MAVLink radio status flow control 2016-01-10 23:24:33 +01:00
Roman 88b2c6c78d blockparam: added support for external parameter copy 2016-01-10 21:25:17 +01:00
Roman 0510d2cb56 fixed code style 2016-01-10 21:14:58 +01:00
Roman 8a9b27f8f3 ecl ekf: added parameter interface 2016-01-10 21:14:58 +01:00
Roman fe07079367 added parameter interface to ekf2 2016-01-10 21:14:58 +01:00
Lorenz Meier b22c05a19d Update DriverFramework and make mutex optional 2016-01-10 20:54:26 +01:00
Lorenz Meier 9674c611b3 Updated DriverFramework, fixes NuttX build 2016-01-10 20:54:26 +01:00
Mark Charlebois caab016425 Updated cmake_hexagon
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-01-10 20:54:26 +01:00
Mark Charlebois a8c49809fa Fixes for other qurt builds to use QURT_BUNDLE
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-01-10 20:54:26 +01:00
Mark Charlebois f22c574b87 Integrated cmake_hexagon for qurt build
Still a WIP since the IDL file needs to be replace with the
muorb IDL file.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-01-10 20:54:26 +01:00
Lorenz Meier 4b659f1995 Fix naming of Solo config 2016-01-10 16:18:52 +01:00
Lorenz Meier 1cdb2d3209 PWM command: Ensure we have enough stack 2016-01-10 16:11:30 +01:00
Lorenz Meier 83339a2de0 Remove unmaintained fixed wing controller 2016-01-10 13:57:00 +01:00
Lorenz Meier dd883d2c9b Update README.md
More URL fixes from @peppermint
2016-01-09 23:07:41 +01:00
Stefan 36a8bcc12e Update README.md
in my opinion https://px4.io and https://discuss.px4.io is not a working webpage
http://px4.io and http://discuss.px4.io are working
2016-01-09 22:49:22 +01:00
Lorenz Meier 41f36aa99f Enable debug key/value stream by default 2016-01-09 16:59:37 +01:00
Lorenz Meier 055a17f2e1 Updated links in README 2016-01-09 16:59:22 +01:00
Lorenz Meier 501ad87dd2 Travis CI: Next attempt at GCC fix 2016-01-09 02:07:27 +01:00
Mark Charlebois c17466ffee Added fix for missing declaration of get_commands for qurt
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-01-09 01:54:00 +01:00
Mark Charlebois e12e029659 Updated dspal version
Added dspal_math.h

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-01-09 01:53:52 +01:00
Roman Bapst d98024a300 updated sitl_gazebo 2016-01-09 01:51:15 +01:00
Lorenz Meier 0adb6d0104 Fix QuRT formatting 2016-01-09 01:42:30 +01:00
Lorenz Meier 44cf30e039 SITL: Update tailsitter model 2016-01-08 16:43:50 +01:00
Mark Charlebois 5bc2019fd5 Fixes for qurt build
Added missing functions that were added for other targets but not for qurt.

Added workaround for missing sem_timedwait(). This may have a performance
impact until a sem_timedwait is supported.

std::to_string is not supported by the hexagon compiler

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-01-08 08:49:36 +01:00
Lorenz Meier 1edd9d5a9a Travis CI tweaks 2016-01-08 08:37:56 +01:00
Lorenz Meier 94aaa28d88 Travis CI: Move to C++ 4.9 2016-01-08 08:01:29 +01:00
Mark Whitehorn bf1a510611 init sbus uart in full duplex mode 2016-01-08 08:00:21 +01:00
Roman Bapst 2f09808316 Merge pull request #3462 from PX4/ekf2_update
updated ecl ekf2
2016-01-08 07:40:31 +01:00
Roman 2b04f5acb9 updated ecl ekf2 2016-01-08 07:07:45 +01:00
Lorenz Meier 4907bf3374 Sim: Keep MAVLink parse status persistent, because that is the frickin state machine 2016-01-07 23:19:20 +01:00
Lorenz Meier 24116b2672 Only try to disable HW flow control when not being UDP 2016-01-07 23:19:00 +01:00
Julian Oes 72dc4d3290 simulator: fix mavlink parsing of sim+RC stream
The mavlink stream from the simulator and the mavlink stream over serial
(used for RC input) both had the same MAVLINK_COMM channel and were
therefore sharing an internal buffer in mavlink_parse_char. This meant
that most (low rate) serial messages were getting swallowed by the high
rate simulator stream.

This change fixes the issue where RC input was not properly arriving in
Gazebo, however it breaks the `commander takeoff` command in SITL which
needs to be investigated.
2016-01-07 23:08:32 +01:00
Andreas Antener 4b9a793c8f properly handle takeoff waypoint when not currently at takeoff location 2016-01-07 22:24:32 +01:00
Lorenz Meier 20c8c6a2fa Fix VDev formatting 2016-01-07 22:24:10 +01:00
Lorenz Meier b2aa25448b Pixracer: Boost buffer and FTP transfer capability 2016-01-07 00:26:22 +01:00
Lorenz Meier 857701daa1 Merge pull request #3441 from kd0aij/fmu_pwm_limit
Fmu pwm limit
2016-01-06 10:02:43 +01:00
Lorenz Meier 268990f216 Merge pull request #3433 from PX4/posix_uart
MAVLink app: Enable network and serial on POSIX
2016-01-06 09:27:18 +01:00
Andreas Antener 99f4487cc3 allow yawing with 0 throttle, changed condition to not being landed 2016-01-06 08:33:51 +01:00
Lorenz Meier 7d5a12f997 Re-instate logging for tailsitter 2016-01-05 22:53:44 +01:00
Lorenz Meier cb52a7eeec Raise number of max FDs for VDev 2016-01-05 22:53:27 +01:00
Lorenz Meier 2ce3ef1caa VTOL: initialize fds struct 2016-01-05 22:11:06 +01:00
Lorenz Meier e9865071fa Merge pull request #3439 from PX4/vtol_sitl
VTOL fixes for SITL
2016-01-05 21:14:34 +01:00
Lorenz Meier 30c620a426 Print backtrace on file descriptor exceed error 2016-01-05 19:35:03 +01:00
Lorenz Meier f01df766a9 POSIX: Warn about file descriptor exceed with associated thread name 2016-01-05 19:34:57 +01:00
Lorenz Meier fc2b9a5031 Print backtrace on file descriptor exceed error 2016-01-05 19:03:29 +01:00
Lorenz Meier adad9271df POSIX: Warn about file descriptor exceed with associated thread name 2016-01-05 19:02:07 +01:00
Lorenz Meier 2e9cec5b06 Simple app: Use enough stack 2016-01-05 19:01:16 +01:00
Lorenz Meier 669f8bf098 Matlab example: Use enough stack 2016-01-05 19:01:16 +01:00
Lorenz Meier 7c8a2a1e18 HW test example: Use enough stack 2016-01-05 19:01:16 +01:00
Lorenz Meier 302d848104 Merge pull request #3398 from dogmaphobic/logHandler
Add mavlink log messages handler
2016-01-05 08:18:23 +01:00
dogmaphobic bd6e4b9d9d Merge remote-tracking branch 'PX4/master' into logHandler
* PX4/master: (45 commits)
  don't use default source address for onboard udp link, wait on remote
  Configure Easystar HIL setup to do Runway takeoff
  ROMFS: Set 3DR quad tuning to more realistic default values
  Fix incomplete boot on new EKF config
  Fix px4fmu-v2_ekf2 config
  Updated MAVLink protocol version
  MAVLink: Start slightly differently on USB
  Start shell only if SD card not present
  Update ECL
  NuttX configs: added px4fmu-v2_ekf2 target for EKF2 development on Pixhawk
  Get QuRT drivers out of the way, as we are using our own
  Fix POSIX eagle config
  Remove unmaintained NuttX config
  VDev: fix code style
  Add new posix_eagle_default and qurt_eagle_default targets
  Fix QuRT build error
  Fix FMUv4 USB PID
  Speed up Vagrant
  VTOL: Fix motor index use in VT_FW_MOT_OFF. Create new param to re-default all deployed vehicles to not shut down motors.
  VTOL: Fix MOT_OFF bug
  ...
2016-01-05 01:03:11 -05:00
dogmaphobic c0773c0157 Handling missing data requests without clearing session.
Letting stream handle all transfers.
Tested and fully working with new QGC PR.
2016-01-05 01:00:48 -05:00
Andreas Antener 11ed5169cc don't use default source address for onboard udp link, wait on remote 2016-01-04 23:58:05 +01:00
Lorenz Meier 68329fe152 SITL Gazebo: Link against protobuf lib 2016-01-04 22:33:02 +01:00
Mark Whitehorn f18afc47cb revert short PWM ramp interval 2016-01-04 10:54:38 -07:00
Mark Whitehorn 1b860f0b31 fix code style 2016-01-04 10:51:45 -07:00
Mark Whitehorn e6155d64ae fix fmu arming bug 2016-01-04 10:37:17 -07:00
Roman a79c6be39b tailsitter: go into mc mode it transition switch not assigned 2016-01-04 18:19:22 +01:00
Lorenz Meier 2be8d1a58a Disable sdlog2 for tailsitter 2016-01-04 18:17:56 +01:00
Lorenz Meier 723f4bf3a1 Build lift drag plugin for OS X 2016-01-04 15:52:56 +01:00
Lorenz Meier 9415a6f890 Configure Easystar HIL setup to do Runway takeoff 2016-01-04 15:10:22 +01:00
Lorenz Meier 5227dbe26a MAVLink: Send RC_CHANNELS_OVERRIDE 2016-01-04 12:35:23 +01:00
Lorenz Meier c343926b51 MAVLink app: Enable network and serial on POSIX 2016-01-04 12:25:35 +01:00
Lorenz Meier 3fb54e66b2 ROMFS: Set 3DR quad tuning to more realistic default values 2016-01-03 23:57:06 +01:00
Lorenz Meier 0a5a5f4619 Fix incomplete boot on new EKF config 2016-01-03 22:44:19 +01:00
Lorenz Meier ae2c46ac4c Fix px4fmu-v2_ekf2 config 2016-01-03 19:03:17 +01:00
Lorenz Meier 77f869680a Updated MAVLink protocol version 2016-01-03 17:16:47 +01:00
Lorenz Meier a8a9c9b8ec MAVLink: Start slightly differently on USB 2016-01-03 15:28:04 +01:00
Lorenz Meier 2794ff2dda Start shell only if SD card not present 2016-01-03 15:27:45 +01:00
Paul Riseborough 6e0f96c095 Update ECL 2016-01-03 10:41:24 +01:00
Lorenz Meier ba90ba14b0 NuttX configs: added px4fmu-v2_ekf2 target for EKF2 development on Pixhawk 2016-01-02 17:17:47 +01:00
Lorenz Meier 0ed13a911e Get QuRT drivers out of the way, as we are using our own 2016-01-02 03:51:26 -08:00
Lorenz Meier 6f1e53c810 Fix POSIX eagle config 2016-01-02 03:14:06 -08:00
Lorenz Meier 735c823b57 Remove unmaintained NuttX config 2016-01-02 03:13:49 -08:00
Lorenz Meier c91df50d7e VDev: fix code style 2016-01-02 09:59:06 +01:00
Lorenz Meier 2d72c95eda Add new posix_eagle_default and qurt_eagle_default targets 2016-01-02 09:30:51 +01:00
Lorenz Meier 55ce8c0c42 Fix QuRT build error 2016-01-02 01:27:29 +01:00
Lorenz Meier bbe69fbe45 Fix FMUv4 USB PID 2016-01-02 01:06:46 +01:00
Lorenz Meier 4ba7408ba0 Speed up Vagrant 2016-01-01 21:21:49 +01:00
Lorenz Meier 3b2e82cd62 VTOL: Fix motor index use in VT_FW_MOT_OFF. Create new param to re-default all deployed vehicles to not shut down motors. 2016-01-01 14:44:42 +01:00
DroneBuster 56e5c50703 VTOL: Fix MOT_OFF bug 2016-01-01 14:39:03 +01:00
Lorenz Meier e50fdbe327 Update ECL 2016-01-01 12:31:56 +01:00
Lorenz Meier dc11b8a7ef EKF2 sitl target: start normal app selection 2016-01-01 12:30:52 +01:00
Lorenz Meier ce43c79a5a Update ECL use 2016-01-01 11:42:25 +01:00
Lorenz Meier 276855acd2 EKF2: Remove todo 2016-01-01 11:39:16 +01:00
Lorenz Meier 61ff954d26 uORB msg spec: Clarify local position yaw 2016-01-01 11:38:56 +01:00
Paul Riseborough 9264cec807 msg: Improve vehicle_gps_position documentation
Clean up formatting, improve consistency of descriptions and ensure units are defined.
2016-01-01 13:40:31 +11:00
Paul Riseborough 092b0d5dfb msg: Improve vehicle_global_position documentation
Clean up formatting, improve consistency of descriptions and ensure units are defined
2016-01-01 13:40:18 +11:00
Paul Riseborough 635d9ea760 msg: Improve vehicle_local_position documentation
Clean up formatting, improve consistency of descriptions and ensure units are defined
2016-01-01 13:39:50 +11:00
Paul Riseborough 28f5cb8fe6 ekf2: Changes required to enter POSCTL mode
Adds missing local position and global position data
2016-01-01 12:30:12 +11:00
Paul Riseborough bdaaca3d78 make: Add missing ekf2 module to PX4-v1 build 2016-01-01 12:30:11 +11:00
Andreas Antener 3d971e214a don't update local position reference if home position changes 2015-12-31 13:24:12 +01:00
Andreas Antener d39e313768 use the proper check to prevent multiple mavlink instances on the same udp port, added warning when different remote than localhost connects to udp 2015-12-31 11:50:52 +01:00
Lorenz Meier eff94677a4 MAVLink: Only broadcast heartbeat on local network if not in onboard mode 2015-12-30 17:26:09 +01:00
Lorenz Meier 85b3de0b00 Start 2nd MAVLink instance in jMAVSim SITL 2015-12-30 17:25:27 +01:00
Lorenz Meier 38fe768421 Start 2nd MAVLink instance in Gazebo SITL 2015-12-30 17:24:01 +01:00
Lorenz Meier 4f548f328a Set range to 0.9 Ga max since full scale range is 1.3 Ga 2015-12-30 11:54:52 +01:00
Lorenz Meier a4018bcbc1 Update to higher jMAVSim update rate 2015-12-29 17:13:22 +01:00
Lorenz Meier 62763904f2 Simulator: Add performance counter for incoming packet interval 2015-12-29 17:12:29 +01:00
Lorenz Meier fb3fade653 VTOL: Use correct motor off define 2015-12-29 14:22:37 +01:00
Lorenz Meier 947aa183f6 Use 900 us as default motor off PWM since some ESCs have lower limits 2015-12-29 14:22:06 +01:00
Lorenz Meier 5dc4ea8146 Sim: minor cleanups 2015-12-29 14:17:59 +01:00
Lorenz Meier 5d6f63af19 update jMAVSim 2015-12-29 14:15:33 +01:00
lchish 6e1f54e2ff Add missing stm32f4discovery make targets 2015-12-29 11:57:29 +01:00
dogmaphobic b4e69ccd4b One day I will get this right.
I had not tested the build under POSIX
2015-12-28 17:02:32 -05:00
dogmaphobic 1869b6ff97 Fix build error. 2015-12-28 16:05:16 -05:00
dogmaphobic 76cb67ae35 Add mavlink log messages handler 2015-12-28 15:00:02 -05:00
Thomas Gubler 7c52e8b96f Improve landing for special yawmode settings 2015-12-28 16:49:09 +01:00
Thomas Gubler 2af066bc6a guard against invalid yawmode values 2015-12-28 16:49:09 +01:00
Lorenz Meier ea1439c627 Commander: Support landing through commandline 2015-12-28 16:00:32 +01:00
Andreas Antener 6c04ab970b fixed formatting 2015-12-28 15:23:20 +01:00
Andreas Antener bd3d53902a readded missing rotation 2015-12-28 15:23:20 +01:00
Andreas Antener 68c9c4ae0f better defaults for relevant landing/takeoff parameters 2015-12-28 15:23:20 +01:00
Andreas Antener 52951801c9 updated solo config for master 2015-12-28 15:23:20 +01:00
Andreas Antener 65299e7aaf updated jmavsim iris config for takeoff and landing 2015-12-28 15:23:20 +01:00
Andreas Antener b5f3c2d30d ramp up jump velocity instead doing a huge step 2015-12-28 15:23:20 +01:00
Andreas Antener 98bec0e175 also filter acceleration to filter out the bump on the ground on landing 2015-12-28 15:23:20 +01:00
Andreas Antener e0405617ef also don't reset possp if near a loiter sp 2015-12-28 15:23:20 +01:00
Andreas Antener ee0aa7b37d recalculate absolute thrust before limiting 2015-12-28 15:23:20 +01:00
Andreas Antener d9878493bd cleaning up takeoff/landing logic, commenting on magic values 2015-12-28 15:23:20 +01:00
Andreas Antener c033ef959a proper setpoint handling on takeoff, switch to loiter sp when takeoff finished 2015-12-28 15:23:20 +01:00
Andreas Antener fe90e7882b do mission notifications for landing, switch to idle setpoint when landed 2015-12-28 15:23:20 +01:00
Andreas Antener 05a73d2821 added takeoff logic for position controller to get the uav off the ground fast and transition smoothly to poctl after takeoff, added landing logic to reduce thrust to zero once on the ground 2015-12-28 15:23:20 +01:00
Andreas Antener ea7a1a92b5 correct thrust limiting during landing with margin, don't reset position setpoint when switching from takeoff to posctl and allow high enough z velocity for position lock 2015-12-28 15:23:20 +01:00
Andreas Antener 09b5bdb1ee in mc auto: do not reset the position sp while near the waypoint, should make switching to manual pos control smoother 2015-12-28 15:23:20 +01:00
Andreas Antener 5a009ce4c8 don't throttle up anymore during landing 2015-12-28 15:21:50 +01:00
Andreas Antener f17c5d8d55 fixing takeoff mission and swtiching to previous flight mode after land/takeoff 2015-12-28 15:21:50 +01:00
Andreas Antener 64349c7a09 ability to switch to land mode 2015-12-28 15:21:50 +01:00
Andreas Antener c32d44d8b4 disable position controller when landed and in manual control 2015-12-28 15:21:50 +01:00
Andreas Antener 3c4141ff50 increased time for less strict takeoff detection after arming 2015-12-28 15:21:50 +01:00
Andreas Antener 44f13006dd update mission state on takeoff 2015-12-28 15:21:50 +01:00
Andreas Antener bfb862763c switching to prev main state after landing when disarmed 2015-12-28 15:21:50 +01:00
Andreas Antener fbf42c8949 added auto takeoff support, updated configuration for solo and generalized landing mission items 2015-12-28 15:21:50 +01:00
Andreas Antener 3847c826ec added initial solo config 2015-12-28 15:21:50 +01:00
Andreas Antener e8e81650dc implemented command ACK 2015-12-28 15:21:50 +01:00
Andreas Antener 94bfad5057 added rotation for solos external mag 2015-12-28 15:21:50 +01:00
Lorenz Meier f41f60901d Control state: Update topic correctly - only if it actually changed and is valid 2015-12-28 15:16:29 +01:00
Lorenz Meier c74d61c7ea VTOL: Indentation fix 2015-12-28 15:15:15 +01:00
Lorenz Meier 511c663996 Takeoff: Set home yaw if executed as flight mode command. 2015-12-28 15:14:40 +01:00
Lorenz Meier 3cbf69cef5 commander: print yaw for home 2015-12-28 15:13:09 +01:00
Lorenz Meier 5880cd64d6 Q estimator: Code style 2015-12-28 15:12:55 +01:00
Lorenz Meier af6751c55f FMUv2: Disable more unused modules 2015-12-28 14:26:19 +01:00
sander a9b9a05307 Arm checking FW throttle 2015-12-28 12:15:33 +01:00
Lorenz Meier 3bb733018b Commander: Add range check to mag cal 2015-12-27 01:13:05 +01:00
Lorenz Meier 4d41f1d6ce MC att control: Add time constant to simplify user-tuning of basic vehicle operation 2015-12-26 16:10:21 +01:00
Lorenz Meier bc6b640ceb FW: Fix min / max values for L1 norm 2015-12-26 16:09:24 +01:00
Lorenz Meier 03251d756b FMUv4: Build all apps (because we can!) 2015-12-26 14:43:48 +01:00
Lorenz Meier 60599cb9e5 FMUv2: Reduce flash use 2015-12-26 14:43:27 +01:00
Lorenz Meier 0ff72b16c5 FMUv1: Reduce flash use 2015-12-26 14:43:08 +01:00
Lorenz Meier 496e7a1799 Revert jMAVSIm change 2015-12-26 00:33:09 +01:00
Lorenz Meier 73394acc68 Fix uORB auto publication 2015-12-24 15:46:00 +01:00
Lorenz Meier d839717e4c Update ECL to not print everything in EKF 2015-12-24 15:41:01 +01:00
Lorenz Meier 73216e0497 Fixed geofence verbosity 2015-12-24 14:37:18 +01:00
Lorenz Meier 490ef96471 Attitude estimator Q: Also fill Quaternion field 2015-12-24 13:30:30 +01:00
Lorenz Meier 623aeac18d Fix code style in MC params 2015-12-24 13:13:10 +01:00
Lorenz Meier 2b99d42d8d jMAVSim: Enable Mag 2015-12-24 13:06:07 +01:00
Lorenz Meier 5ef99d30ac Fix Travis CI build order 2015-12-24 11:29:56 +01:00
Lorenz Meier d9ee0792b8 Pixhawk: Manage flash space 2015-12-24 10:51:08 +01:00
Lorenz Meier eb4a562948 Attitude estimator Q: Move to convenience publication call 2015-12-24 10:34:37 +01:00
Lorenz Meier fd01d565fe Fix code style / typos in uORB 2015-12-24 10:31:06 +01:00
Lorenz Meier 36a556d107 Modify uORB API to allow cleaner in-app use 2015-12-24 10:30:48 +01:00
Lorenz Meier 8515326176 Fixed rotation code style 2015-12-24 10:19:21 +01:00
Roman 9d130653e1 vtol: added timestamps for actuator controls message 2015-12-24 10:18:24 +01:00
Roman 7c3a67e374 use optimal recovery strategy for tailsitters 2015-12-24 10:17:53 +01:00
Roman ac4e95df05 use optimal recovery strategy for tailsitters 2015-12-24 10:17:31 +01:00
Roman 4e5fdebb13 added tailsitter recovery library 2015-12-24 10:15:25 +01:00
Mark Whitehorn f36669723d add rotation for stryker vtol 2015-12-24 10:14:58 +01:00
Lorenz Meier d3149153f6 Merged master into ekf2 2015-12-24 09:53:54 +01:00
Lorenz Meier 45e4def3eb FMUv4: Rename Spektrum power correctly 2015-12-24 09:47:29 +01:00
Lorenz Meier 0af727192e FMUv1 board config: Enable DSM binding 2015-12-24 09:47:29 +01:00
Lorenz Meier 49f7df5724 IO firmware decode style 2015-12-24 09:47:29 +01:00
Lorenz Meier 74543b2cd6 S.BUS code style 2015-12-24 09:47:29 +01:00
Lorenz Meier 6e3749f904 Code style for DSM decoder 2015-12-24 09:47:29 +01:00
Lorenz Meier 7ed3fbb1bc Formatted IOv2 board config 2015-12-24 09:47:29 +01:00
Lorenz Meier 40f9ed0507 Formatted IOv1 board config 2015-12-24 09:47:29 +01:00
Lorenz Meier 2fb604e951 Formatted FMUv4 board config 2015-12-24 09:47:29 +01:00
Lorenz Meier 5a4472b418 DSM: Destroy test data to trigger decoding fails and test recovery 2015-12-24 09:47:29 +01:00
Lorenz Meier d84fcfffaf DSM decoder: Guard against invalid values 2015-12-24 09:47:29 +01:00
Lorenz Meier 5b4b5de34c Disable DSM debug output 2015-12-24 09:47:29 +01:00
Lorenz Meier 13606173ee Write DSM unit test 2015-12-24 09:47:29 +01:00
Lorenz Meier 7005b18a66 IO: Cleanup DSM input routine 2015-12-24 09:47:29 +01:00
Lorenz Meier 1871a61676 S.BUS: Fix compile error for single wire IOCTL 2015-12-24 09:47:29 +01:00
Lorenz Meier 87add55620 DSM: Generalize parsing 2015-12-24 09:47:29 +01:00
Lorenz Meier 72eda2d7c9 IOv2: Add DSM controls 2015-12-24 09:47:29 +01:00
Lorenz Meier 8520db884e IOv1: Add DSM controls 2015-12-24 09:47:29 +01:00
Lorenz Meier a2db2a3e53 FMUv4: Add DSM controls 2015-12-24 09:47:29 +01:00
Lorenz Meier f7784bc7ac DSM decoder: Fixes for non-IO environment. 2015-12-24 09:47:29 +01:00
Lorenz Meier 64b7072eaa Add DSM decoder test 2015-12-24 09:47:29 +01:00
Lorenz Meier cda3b51bb4 Add DSM X test data 2015-12-24 09:47:29 +01:00
Lorenz Meier d71c629970 SBUS: Fix code style 2015-12-24 09:47:29 +01:00
Lorenz Meier 494bccb618 IO: Remove define now part of board config 2015-12-24 09:47:29 +01:00
Lorenz Meier 9e45768ec2 FMU driver: Use generic configs and less defines 2015-12-24 09:47:29 +01:00
Lorenz Meier a5835bfb4f IOv2: Generalize board config 2015-12-24 09:47:29 +01:00
Lorenz Meier 32d298c4b6 IOv1: Generalize board config 2015-12-24 09:47:29 +01:00
Lorenz Meier 4637cc1f07 FMUv4: Generalize board config 2015-12-24 09:47:29 +01:00
Lorenz Meier 9a1301dd96 FMUv2: Generalize board config 2015-12-24 09:47:29 +01:00
Lorenz Meier 1426779572 FMUv1: Generalize board config 2015-12-24 09:47:29 +01:00
Lorenz Meier e175ef5626 Aerocore: Generalize PWM out config 2015-12-24 09:47:29 +01:00
Lorenz Meier ee2e3811d7 RC lib: Support separate config from init, allow DSM bind from all boards 2015-12-24 09:47:29 +01:00
Roman b958928095 publish rates and quaternion on attitude topic 2015-12-23 11:40:25 +01:00
Roman 366eaf4146 ecl:ekf use simple heading fusion 2015-12-23 06:23:16 +01:00
Lorenz Meier 2d50002973 Fix stack settings of EKF2 2015-12-23 06:23:16 +01:00
Lorenz Meier 02652af758 Enable EKF2 if LPE and INAV are both off 2015-12-23 06:23:16 +01:00
Lorenz Meier 979cda1b10 Add dependency to ECL to CMake 2015-12-23 06:23:16 +01:00
Lorenz Meier 49cef930af Update location of ECL repo 2015-12-23 06:23:16 +01:00
Lorenz Meier f50af43088 Restore normal SITL startup script 2015-12-23 06:23:16 +01:00
Lorenz Meier ed8645a83b Add EKF2 config and startup option for jMAVSim 2015-12-23 06:23:16 +01:00
Lorenz Meier e72c672350 POSIX configs: Default normal config back to normal operation 2015-12-23 06:23:16 +01:00
Roman 87982ca73f updated matrix lib 2015-12-23 06:23:16 +01:00
Roman 5228e5c8c7 updated ecl EKF 2015-12-23 06:23:16 +01:00
Roman 19bc791fe9 updated matrix lib 2015-12-23 06:23:16 +01:00
Roman d291441468 updated ecl 2015-12-23 06:23:16 +01:00
Roman c919969ebd ecl:fix cmake file 2015-12-23 06:23:16 +01:00
Roman 33fdfbf77a ecl: use data validation code from master 2015-12-23 06:23:15 +01:00
tumbili 50aeb3924d updated ecl EKF 2015-12-23 06:23:15 +01:00
tumbili 763e2bb144 update matrix lib 2015-12-23 06:23:15 +01:00
tumbili ddad6d2019 remove old estimator from startup file 2015-12-23 06:23:15 +01:00
tumbili 07abac3ea4 ekf2 publish attitude position and control state 2015-12-23 06:23:15 +01:00
tumbili 08871e77c2 updated ecl EKF 2015-12-23 06:23:15 +01:00
Roman b1035fe115 updated ecl 2015-12-23 06:23:15 +01:00
Roman 63ac712eab allow testing ekf2 in simulation with jmavsim 2015-12-23 06:23:15 +01:00
Roman 5ded6884ed updated matrix lib 2015-12-23 06:23:15 +01:00
Roman 19a5f9e73d updated ecl lib 2015-12-23 06:23:15 +01:00
Lorenz Meier 32d062836e Moved ECL into its own submodule 2015-12-23 06:23:15 +01:00
Lorenz Meier 1781e3caf8 ECL: Remove in preparation for an external library 2015-12-23 06:23:15 +01:00
221 changed files with 6112 additions and 4883 deletions
+1
View File
@@ -23,6 +23,7 @@ build_*/
core
cscope.out
Firmware.sublime-workspace
user.sublime*
Images/*.bin
Images/*.px4
mavlink/include/mavlink/v0.9/
+6
View File
@@ -31,3 +31,9 @@
[submodule "src/lib/DriverFramework"]
path = src/lib/DriverFramework
url = https://github.com/PX4/DriverFramework.git
[submodule "src/lib/ecl"]
path = src/lib/ecl
url = https://github.com/PX4/ecl.git
[submodule "cmake/cmake_hexagon"]
path = cmake/cmake_hexagon
url = https://github.com/ATLFlight/cmake_hexagon
+11 -9
View File
@@ -27,8 +27,8 @@ addons:
- ccache
- clang-3.5
- cmake
- g++-4.8
- gcc-4.8
- g++-4.9
- gcc-4.9
- genromfs
- libc6-i386
- libncurses5-dev
@@ -55,7 +55,7 @@ before_install:
&& mkdir -p ~/bin
&& wget -O ~/bin/astyle https://github.com/PX4/astyle/releases/download/2.05.1/astyle-linux && chmod +x ~/bin/astyle
&& astyle --version
&& if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
&& if [ "$CXX" = "g++" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
;
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
brew tap PX4/homebrew-px4
@@ -81,8 +81,6 @@ before_script:
- ln -s /usr/bin/ccache ~/bin/clang
- ln -s /usr/bin/ccache ~/bin/clang-3.4
- ln -s /usr/bin/ccache ~/bin/clang-3.5
- ln -s /usr/bin/ccache ~/bin/g++-4.8
- ln -s /usr/bin/ccache ~/bin/gcc-4.8
- export PATH=~/bin:$PATH
env:
@@ -95,20 +93,23 @@ env:
- PX4_AWS_BUCKET=px4-travis
script:
- git submodule update --init --recursive
- make check_format
- arm-none-eabi-gcc --version
- echo 'Building POSIX Firmware..' && make posix_sitl_default
- echo 'Running Tests..' && make posix_sitl_default test
- echo 'Running Unittests..' && cd unittests && ./run_tests.sh
- cd ..
- echo 'Building NuttX px4fmu-v1 Firmware..' && make px4fmu-v1_default
- echo 'Building NuttX px4fmu-v2 Firmware..' && make px4fmu-v2_default
# Only provide UAVCAN firmware binaries for Pixracer and Pixhawk 3
- echo 'Building UAVCAN node firmware..' && git clone https://github.com/thiemar/vectorcontrol
- cd vectorcontrol
- BOARD=s2740vc_1_0 make && BOARD=px4esc_1_6 make
- ../Tools/uavcan_copy.sh
- cd ..
- echo 'Building NuttX px4fmu-v1 Firmware..' && make px4fmu-v1_default
- echo 'Building NuttX px4fmu-v2 Firmware..' && make px4fmu-v2_default
- echo 'Building NuttX px4fmu-v4 Firmware..' && make px4fmu-v4_default
- echo 'Building NuttX px4-stm32f4discovery Firmware..' && make px4-stm32f4discovery_default
- echo 'Running Tests..' && make px4fmu-v2_default test
after_success:
@@ -116,8 +117,9 @@ after_success:
cp build_px4fmu-v1_default/src/firmware/nuttx/nuttx-px4fmu-v1-default.px4 px4fmu-v1_default.px4
&& cp build_px4fmu-v2_default/src/firmware/nuttx/nuttx-px4fmu-v2-default.px4 px4fmu-v2_default.px4
&& cp build_px4fmu-v4_default/src/firmware/nuttx/nuttx-px4fmu-v4-default.px4 px4fmu-v4_default.px4
&& zip Firmware.zip px4fmu-v1_default.px4 px4fmu-v2_default.px4 px4fmu-v4_default.px4
&& ./CI-Tools/s3cmd-put px4fmu-v1_default.px4 px4fmu-v2_default.px4 px4fmu-v4_default.px4 build_px4fmu-v2_default/parameters.xml build_px4fmu-v2_default/airframes.xml CI-Tools/directory/index.html Firmware/$TRAVIS_BRANCH/
&& cp build_px4-stm32f4discovery_default/src/firmware/nuttx/nuttx-px4-stm32f4discovery-default.px4 px4-stm32f4discovery-default.px4
&& zip Firmware.zip px4fmu-v1_default.px4 px4fmu-v2_default.px4 px4fmu-v4_default.px4 px4-stm32f4discovery-default.px4
&& ./CI-Tools/s3cmd-put px4fmu-v1_default.px4 px4fmu-v2_default.px4 px4fmu-v4_default.px4 px4-stm32f4discovery-default.px4 build_px4fmu-v2_default/parameters.xml build_px4fmu-v2_default/airframes.xml CI-Tools/directory/index.html Firmware/$TRAVIS_BRANCH/
&& ./CI-Tools/s3cmd-put Firmware.zip archives/Firmware/$TRAVIS_BRANCH/$TRAVIS_BUILD_ID/
&& ./CI-Tools/s3cmd-put CI-Tools/directory/index.html archives/Firmware/$TRAVIS_BRANCH/
&& ./CI-Tools/s3cmd-put CI-Tools/index.html index.html
+1
View File
@@ -245,6 +245,7 @@ px4_add_git_submodule(TARGET git_uavcan PATH "src/modules/uavcan/libuavcan")
px4_add_git_submodule(TARGET git_nuttx PATH "NuttX")
px4_add_git_submodule(TARGET git_dspal PATH "src/lib/dspal")
px4_add_git_submodule(TARGET git_driverframework PATH "src/lib/DriverFramework")
px4_add_git_submodule(TARGET git_ecl PATH "src/lib/ecl")
px4_add_git_submodule(TARGET git_jmavsim PATH "Tools/jMAVSim")
px4_add_git_submodule(TARGET git_gazebo PATH "Tools/sitl_gazebo")
px4_add_git_submodule(TARGET git_matrix PATH "src/lib/matrix")
+1 -1
View File
@@ -16,7 +16,7 @@ git checkout -b mydescriptivebranchname
### Edit and build the code
The [developer guide](http://px4.io/dev/start) explains how to set up the development environment on Mac OS, Linux or Windows. Please take note of our [coding style](http://px4.io/dev/code_style) when editing files.
The [developer guide](http://dev.px4.io/) explains how to set up the development environment on Mac OS, Linux or Windows. Please take note of our [coding style](http://px4.io/dev/code_style) when editing files.
### Commit your changes
+1 -1
View File
@@ -281,7 +281,7 @@ TYPEDEF_HIDES_STRUCT = NO
# causing a significant performance penality.
# If the system has enough physical memory increasing the cache will improve the
# performance by keeping more symbols in memory. Note that the value works on
# a logarithmic scale so increasing the size by one will rougly double the
# a logarithmic scale so increasing the size by one will roughly double the
# memory usage. The cache size is given by this formula:
# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
# corresponding to a cache size of 2^16 = 65536 symbols
+1 -1
View File
@@ -48,7 +48,7 @@ Download QGC from http://qgroundcontrol.org/downloads and install using the wind
## PX4
### Platfrom Requirements
### Platform Requirements
Linux or Eagle with a working IP interface (?? does this need further instructions?)
### Build Host Requirements
+19 -7
View File
@@ -109,7 +109,9 @@ endif
# describe how to build a cmake config
define cmake-build
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(PWD)/build_$@/Makefile ]; then rm -rf $(PWD)/build_$@; fi
+@if [ ! -e $(PWD)/build_$@/CMakeCache.txt ]; then git submodule update --init --recursive --force && mkdir -p $(PWD)/build_$@ && cd $(PWD)/build_$@ && cmake .. -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1); fi
+git submodule init
+Tools/check_submodules.sh
+@if [ ! -e $(PWD)/build_$@/CMakeCache.txt ]; then git submodule sync && git submodule init && mkdir -p $(PWD)/build_$@ && cd $(PWD)/build_$@ && cmake .. -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1); fi
+$(PX4_MAKE) -C $(PWD)/build_$@ $(PX4_MAKE_ARGS) $(ARGS)
endef
@@ -133,21 +135,24 @@ px4fmu-v2_default:
px4fmu-v4_default:
$(call cmake-build,nuttx_px4fmu-v4_default)
px4fmu-v2_simple:
$(call cmake-build,nuttx_px4fmu-v2_simple)
px4-stm32f4discovery_default:
$(call cmake-build,nuttx_px4-stm32f4discovery_default)
px4fmu-v2_ekf2:
$(call cmake-build,nuttx_px4fmu-v2_ekf2)
px4fmu-v2_lpe:
$(call cmake-build,nuttx_px4fmu-v2_lpe)
nuttx_sim_simple:
$(call cmake-build,$@)
posix_sitl_default:
$(call cmake-build,$@)
posix_sitl_lpe:
$(call cmake-build,$@)
posix_sitl_ekf2:
$(call cmake-build,$@)
ros_sitl_default:
$(call cmake-build,$@)
@@ -160,6 +165,12 @@ qurt_eagle_release:
posix_eagle_release:
$(call cmake-build,$@)
qurt_eagle_default:
$(call cmake-build,$@)
posix_eagle_default:
$(call cmake-build,$@)
posix: posix_sitl_default
sitl_deprecation:
@@ -184,7 +195,8 @@ clean:
# targets handled by cmake
cmake_targets = test upload package package_source debug debug_tui debug_ddd debug_io debug_io_tui debug_io_ddd check_weak \
run_cmake_config config gazebo gazebo_gdb gazebo_lldb jmavsim \
jmavsim_gdb jmavsim_lldb gazebo_gdb_iris gazebo_lldb_tailsitter gazebo_iris gazebo_tailsitter
jmavsim_gdb jmavsim_lldb gazebo_gdb_iris gazebo_lldb_tailsitter gazebo_iris gazebo_tailsitter \
gazebo_gdb_standard_vtol gazebo_lldb_standard_vtol gazebo_standard_vtol
$(foreach targ,$(cmake_targets),$(eval $(call cmake-targ,$(targ))))
.PHONY: clean
+7 -23
View File
@@ -9,33 +9,22 @@ This repository contains the [PX4 Flight Core](http://px4.io), with the main app
* Official Website: http://px4.io
* License: BSD 3-clause (see [LICENSE.md](https://github.com/PX4/Firmware/blob/master/LICENSE.md))
* Supported airframes (more experimental are supported):
* [Multicopters](http://px4.io/platforms/multicopters/start)
* [Fixed wing](http://px4.io/platforms/planes/start)
* [VTOL](http://px4.io/platforms/vtol/start)
* Binaries (always up-to-date from master):
* [Downloads](http://px4.io/firmware/downloads)
* [Multicopters](http://px4.io/portfolio_category/multicopter/)
* [Fixed wing](http://px4.io/portfolio_category/vtol/)
* [VTOL](http://px4.io/portfolio_category/plane/)
* Releases
* [Downloads](https://github.com/PX4/Firmware/releases)
* Forum / Mailing list: [Google Groups](http://groups.google.com/group/px4users)
### Users ###
Please refer to the [user documentation](https://pixhawk.org/users/start) for flying drones with the PX4 flight stack.
Please refer to the [user documentation](http://px4.io) and [user forum](http://discuss.px4.io) for flying drones with the PX4 flight stack.
### Developers ###
Contributing guide:
* [CONTRIBUTING.md](https://github.com/PX4/Firmware/blob/master/CONTRIBUTING.md)
* [PX4 Contribution Guide](http://px4.io/dev/contributing)
* [Developer Forum / Mailing list](http://groups.google.com/group/px4users)
* [Guide for Contributions](https://github.com/PX4/Firmware/blob/master/CONTRIBUTING.md)
* [Developer guide](http://dev.px4.io)
Software in the Loop guide:
Use software in the loop [to get started with the codebase](https://pixhawk.org/dev/simulation/native_sitl).
Developer guide:
http://dev.px4.io
Testing guide:
http://px4.io/dev/unit_tests
This repository contains code supporting these boards:
* [Snapdragon Flight](http://dev.px4.io/hardware-snapdragon.html)
@@ -44,8 +33,3 @@ This repository contains code supporting these boards:
* FMUv4.x (Pixhawk X and [Pixracer](http://dev.px4.io/hardware-pixracer.html))
* AeroCore (v1 and v2)
* STM32F4Discovery (basic support) [Tutorial](https://pixhawk.org/modules/stm32f4discovery)
## NuttShell (NSH) ##
NSH usage documentation:
http://px4.io/users/serial_connection
@@ -39,5 +39,7 @@ then
param set FW_RR_P 0.3
fi
param set RWTO_TKOFF 1
set HIL yes
set MIXER AERT
+2 -2
View File
@@ -12,11 +12,11 @@ sh /etc/init.d/rc.mc_defaults
if [ $AUTOCNF == yes ]
then
param set MC_ROLL_P 6.5
param set MC_ROLLRATE_P 0.08
param set MC_ROLLRATE_P 0.14
param set MC_ROLLRATE_I 0.1
param set MC_ROLLRATE_D 0.004
param set MC_PITCH_P 6.0
param set MC_PITCHRATE_P 0.16
param set MC_PITCHRATE_P 0.14
param set MC_PITCHRATE_I 0.09
param set MC_PITCHRATE_D 0.004
param set MC_YAW_P 4
+1 -1
View File
@@ -46,6 +46,6 @@ set PWM_AUX_MAX 2000
set MAV_TYPE 21
param set VT_MOT_COUNT 6
param set VT_FW_MOT_OFF 23
param set VT_FW_MOT_OFFID 34
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 1
@@ -2,7 +2,7 @@
#
# @name Quadrotor X Tailsitter
#
# @type VTOL Tailsitter
# @type VTOL Quad Tailsitter
#
# @maintainer Roman Bapst <roman@px4.io>
#
@@ -2,7 +2,7 @@
#
# @name Quadrotor + Tailsitter
#
# @type VTOL Tailsitter
# @type VTOL Quad Tailsitter
#
# @maintainer Roman Bapst <roman@px4.io>
#
@@ -0,0 +1,53 @@
#!nsh
#
# @name QuadRanger
#
# @type Standard VTOL
#
# @maintainer Sander Smeets <sander@droneslab.com>
#
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
then
param set VT_TYPE 2
param set VT_MOT_COUNT 4
param set VT_TRANS_THR 0.75
param set PWM_AUX_REV1 1
param set PWM_AUX_REV2 1
param set MC_ROLL_P 6.5
param set MC_ROLLRATE_P 0.1
param set MC_ROLLRATE_I 0.002
param set MC_ROLLRATE_D 0.003
param set MC_ROLLRATE_FF 0.0
param set MC_PITCH_P 6.5
param set MC_PITCHRATE_P 0.1
param set MC_PITCHRATE_I 0.002
param set MC_PITCHRATE_D 0.003
param set MC_PITCHRATE_FF 0.0
param set MC_YAW_P 2.8
param set MC_YAW_FF 0.5
param set MC_YAWRATE_P 0.22
param set MC_YAWRATE_I 0.02
param set MC_YAWRATE_D 0.0
param set MC_YAWRATE_FF 0.0
fi
set MIXER vtol_quad_x
set PWM_OUT 12345678
set MIXER_AUX vtol_AAERT
set PWM_AUX_RATE 50
set PWM_AUX_OUT 1234
set PWM_AUX_DISARMED 1000
set PWM_AUX_MIN 1000
set PWM_AUX_MAX 2000
set MAV_TYPE 22
param set VT_MOT_COUNT 4
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 2
+1 -1
View File
@@ -2,7 +2,7 @@
#
# @name Applied Aeronautics Albatross
#
# @type Standard Plane
# @type Plane A-Tail
#
# @output MAIN1 aileron right
# @output MAIN2 aileron left
+88
View File
@@ -0,0 +1,88 @@
#!nsh
#
# @name 3DR Solo
#
# @type Quadrotor x
#
# @maintainer Andreas Antener <andreas@uaventure.com>
#
sh /etc/init.d/rc.mc_defaults
if [ $AUTOCNF == yes ]
then
# tuning
param set MC_PITCHRATE_P 0.11
param set MC_ROLLRATE_P 0.11
param set MPC_MANTHR_MIN 0.08
param set MPC_XY_VEL_MAX 3.0
param set MPC_Z_VEL_MAX 2.0
# INAV: higher GPS weights for better altitude control
param set INAV_W_Z_BARO 0.3
param set INAV_W_Z_GPS_P 0.8
param set INAV_W_Z_GPS_V 0.8
# takeoff, land and RTL settings
param set MIS_TAKEOFF_ALT 4.0
param set COM_DISARM_LAND 1
param set RTL_LAND_DELAY 1
param set RTL_DESCEND_ALT 5.0
param set RTL_RETURN_ALT 15.0
param set MPC_TILTMAX_LND 8.0
param set MPC_LAND_SPEED 0.4
param set MPC_HOLD_MAX_Z 1.5
param set MPC_TKO_JMPSPD 2.0
param set MPC_TKO_SPEED 1.5
# setup
# main board rotation: pitch 180
param set SENS_BOARD_ROT 12
# solo external mag rotation
param set CAL_MAG0_ROT 30
# no safety switch
param set CBRK_IO_SAFETY 22027
# battery voltage not available yet
param set CBRK_SUPPLY_CHK 894281
# RC configuration
param set RC_MAP_MODE_SW 5
param set RC_MAP_PITCH 2
param set RC_MAP_ROLL 1
param set RC_MAP_THROTTLE 3
param set RC_MAP_YAW 4
param set RC1_DZ 10
param set RC1_MAX 1988
param set RC1_MIN 1003
param set RC1_REV 1
param set RC1_TRIM 1499
param set RC2_DZ 10
param set RC2_MAX 1987
param set RC2_MIN 1023
param set RC2_REV -1
param set RC2_TRIM 1499
param set RC3_DZ 10
param set RC3_MAX 1877
param set RC3_MIN 1023
param set RC3_REV 1
param set RC3_TRIM 1023
param set RC4_DZ 10
param set RC4_MAX 1998
param set RC4_MIN 1012
param set RC4_REV 1
param set RC4_TRIM 1500
param set RC5_DZ 10
param set RC5_MAX 2000
param set RC5_MIN 1000
param set RC5_REV 1
param set RC5_TRIM 1500
fi
set MIXER solo
set PWM_OUT 1234
set MIXER_AUX none
# enable high-speed link on telem 1
set MAVLINK_F "-d /dev/ttyS1 -b 921600 -r 80000 -m onboard -x"
+1 -1
View File
@@ -17,7 +17,7 @@ else
attitude_estimator_q start
local_position_estimator start
else
ekf_att_pos_estimator start
ekf2 start
fi
fi
+9 -3
View File
@@ -60,9 +60,6 @@ unset FRC
if [ $MODE == autostart ]
then
# Try to get an USB console
# REBOOTWORK this needs to start after the flight control loop
nshterm /dev/ttyACM0 &
#
# Start the ORB (first app to start)
@@ -844,6 +841,15 @@ then
px4flow start &
fi
# Start USB shell if no microSD present, MAVLink else
if [ $LOG_FILE == /dev/null ]
then
# Try to get an USB console
nshterm /dev/ttyACM0 &
else
mavlink start -r 800000 -d /dev/ttyACM0 -m config -x
fi
if [ $EXIT_ON_END == yes ]
then
echo "Exit from nsh"
+7
View File
@@ -0,0 +1,7 @@
Multirotor mixer for PX4FMU
===========================
This file defines a single mixer for a quadrotor in the X configuration. All controls
are mixed 100%.
R: 4x 10000 10000 10000 0
@@ -0,0 +1,24 @@
Mixer for standard vtol plane (SITL) with motor x configuration
=========================================================
This file defines a single mixer for a standard vtol plane (SITL gazebo) with motors in X configuration.
The plane has two ailerons and one elevator. The ailerons and elevator are treated as elevons
in order to make the standard vtol simulation compatible with the tailsitter simulation.
R: 4x 10000 10000 10000 0
# mixer for the elevons
M: 2
O: 10000 10000 0 -10000 10000
S: 1 0 5000 5000 0 -10000 10000
S: 1 1 -5000 -5000 0 -10000 10000
M: 2
O: 10000 10000 0 -10000 10000
S: 1 0 5000 5000 0 -10000 10000
S: 1 1 5000 5000 0 -10000 10000
# mixer for the pusher/puller throttle
M: 1
O: 10000 10000 0 -10000 10000
S: 1 3 0 20000 -10000 -10000 10000
+1 -1
View File
@@ -6,7 +6,7 @@ then
exit 1;
fi
if [[ $cmake_ver == *"2.8"* ]] || [[ $cmake_ver == *"2.9"* ]] || [[ $cmake_ver == *"3.0"* ]] || [[ $cmake_ver == *"3.1"* ]]
if [[ $cmake_ver == *" 2.8"* ]] || [[ $cmake_ver == *" 2.9"* ]] || [[ $cmake_ver == *" 3.0"* ]] || [[ $cmake_ver == *" 3.1"* ]]
then
exit 1;
fi
+81
View File
@@ -0,0 +1,81 @@
#!/usr/bin/env bash
[ -n "$GIT_SUBMODULES_ARE_EVIL" ] && {
# GIT_SUBMODULES_ARE_EVIL is set, meaning user doesn't want submodules
echo "Skipping submodules. NUTTX_SRC is set to $NUTTX_SRC"
exit 0
}
if [ -f src/modules/uavcan/libuavcan/CMakeLists.txt ]
then
echo "Git submodule config valid."
else
git submodule update --init --recursive
fi
GITSTATUS=$(git status)
function check_git_submodule {
if [ -d $1 ];
then
SUBMODULE_STATUS=$(git submodule summary "$1")
STATUSRETVAL=$(echo $SUBMODULE_STATUS | grep -A20 -i "$1" | grep "<")
if [ -z "$STATUSRETVAL" ]; then
echo "Checked $1 submodule, correct version found"
else
echo -e "\033[31mChecked $1 submodule, ACTION REQUIRED:\033[0m"
echo ""
echo -e "New commits required:"
echo -e "$SUBMODULE_STATUS"
echo ""
echo ""
echo -e " *******************************************************************************"
echo -e " * \033[31mIF YOU DID NOT CHANGE THIS FILE (OR YOU DON'T KNOW WHAT A SUBMODULE IS):\033[0m *"
echo -e " * \033[31mHit 'u' and <ENTER> to update ALL submodules and resolve this.\033[0m *"
echo -e " * (performs \033[94mgit submodule update --init --recursive\033[0m) *"
echo -e " *******************************************************************************"
echo ""
echo ""
echo -e " Only for EXPERTS:"
echo -e " $1 submodule is not in the recommended version."
echo -e " Hit 'y' and <ENTER> to continue the build with this version. Hit <ENTER> to resolve manually."
echo -e " Use \033[94mgit add $1 && git commit -m 'Updated $1'\033[0m to choose this version (careful!)"
echo ""
read user_cmd
if [ "$user_cmd" == "y" ]
then
echo "Continuing build with manually overridden submodule.."
else
if [ "$user_cmd" == "u" ]
then
git submodule update --init --recursive
echo "Submodule fixed, continuing build.."
else
echo "Build aborted."
exit 1
fi
fi
fi
else
git submodule update --init --recursive;
git submodule update;
fi
}
check_git_submodule NuttX
check_git_submodule Tools/gencpp
check_git_submodule Tools/genmsg
check_git_submodule Tools/jMAVSim
check_git_submodule Tools/sitl_gazebo
check_git_submodule cmake/cmake_hexagon
check_git_submodule mavlink/include/mavlink/v1.0
check_git_submodule src/lib/DriverFramework
check_git_submodule src/lib/dspal
check_git_submodule src/lib/ecl
check_git_submodule src/lib/matrix
check_git_submodule src/modules/uavcan/libuavcan
check_git_submodule unittests/googletest
exit 0
+3 -3
View File
@@ -752,7 +752,7 @@ class MAVLink_gps_raw_int_message(MAVLink_message):
'''
The global position, as returned by the Global Positioning
System (GPS). This is NOT the global position
estimate of the sytem, but rather a RAW sensor value. See
estimate of the system, but rather a RAW sensor value. See
message GLOBAL_POSITION for the global position estimate.
Coordinate frame is right-handed, Z-axis up (GPS frame).
'''
@@ -2812,7 +2812,7 @@ class MAVLink(object):
'''
The global position, as returned by the Global Positioning System
(GPS). This is NOT the global position
estimate of the sytem, but rather a RAW sensor value.
estimate of the system, but rather a RAW sensor value.
See message GLOBAL_POSITION for the global position
estimate. Coordinate frame is right-handed, Z-axis up
(GPS frame).
@@ -2837,7 +2837,7 @@ class MAVLink(object):
'''
The global position, as returned by the Global Positioning System
(GPS). This is NOT the global position
estimate of the sytem, but rather a RAW sensor value.
estimate of the system, but rather a RAW sensor value.
See message GLOBAL_POSITION for the global position
estimate. Coordinate frame is right-handed, Z-axis up
(GPS frame).
+38 -12
View File
@@ -28,29 +28,55 @@ class XMLOutput():
xml_group = ET.SubElement(xml_parameters, "airframe_group")
xml_group.attrib["name"] = group.GetName()
if (group.GetName() == "Standard Plane"):
xml_group.attrib["image"] = "AirframeStandardPlane.png"
xml_group.attrib["image"] = "Plane"
elif (group.GetName() == "Flying Wing"):
xml_group.attrib["image"] = "AirframeFlyingWing.png"
xml_group.attrib["image"] = "FlyingWing"
elif (group.GetName() == "Quadrotor x"):
xml_group.attrib["image"] = "AirframeQuadRotorX.png"
xml_group.attrib["image"] = "QuadRotorX"
elif (group.GetName() == "Quadrotor +"):
xml_group.attrib["image"] = "AirframeQuadRotorPlus.png"
xml_group.attrib["image"] = "QuadRotorPlus"
elif (group.GetName() == "Hexarotor x"):
xml_group.attrib["image"] = "AirframeHexaRotorX.png"
xml_group.attrib["image"] = "HexaRotorX"
elif (group.GetName() == "Hexarotor +"):
xml_group.attrib["image"] = "AirframeHexaRotorPlus.png"
xml_group.attrib["image"] = "HexaRotorPlus"
elif (group.GetName() == "Octorotor +"):
xml_group.attrib["image"] = "AirframeOctoRotorPlus.png"
xml_group.attrib["image"] = "OctoRotorPlus"
elif (group.GetName() == "Octorotor x"):
xml_group.attrib["image"] = "AirframeOctoRotorX.png"
xml_group.attrib["image"] = "OctoRotorX"
elif (group.GetName() == "Octorotor Coaxial"):
xml_group.attrib["image"] = "OctoRotorXCoaxial"
elif (group.GetName() == "Quadrotor Wide"):
xml_group.attrib["image"] = "AirframeQuadRotorH.png"
xml_group.attrib["image"] = "QuadRotorWide"
elif (group.GetName() == "Quadrotor H"):
xml_group.attrib["image"] = "AirframeQuadRotorH.png"
xml_group.attrib["image"] = "QuadRotorH"
elif (group.GetName() == "Simulation"):
xml_group.attrib["image"] = "AirframeSimulation.png"
xml_group.attrib["image"] = "AirframeSimulation"
elif (group.GetName() == "Plane A-Tail"):
xml_group.attrib["image"] = "PlaneATail"
elif (group.GetName() == "VTOL Duo Tailsitter"):
xml_group.attrib["image"] = "VTOLDuoRotorTailSitter"
elif (group.GetName() == "Standard VTOL"):
xml_group.attrib["image"] = "VTOLPlane"
elif (group.GetName() == "VTOL Quad Tailsitter"):
xml_group.attrib["image"] = "VTOLQuadRotorTailSitter"
elif (group.GetName() == "VTOLTiltRotor"):
xml_group.attrib["image"] = "VTOLTiltRotor"
elif (group.GetName() == "Coaxial Helicopter"):
xml_group.attrib["image"] = "HelicopterCoaxial"
elif (group.GetName() == "Hexarotor Coaxial"):
xml_group.attrib["image"] = "Y6A"
elif (group.GetName() == "Y6B"):
xml_group.attrib["image"] = "Y6B"
elif (group.GetName() == "Tricopter Y-"):
xml_group.attrib["image"] = "YMinus"
elif (group.GetName() == "Tricopter Y+"):
xml_group.attrib["image"] = "YPlus"
elif (group.GetName() == "Rover"):
xml_group.attrib["image"] = "Rover"
elif (group.GetName() == "Boat"):
xml_group.attrib["image"] = "Boat"
else:
xml_group.attrib["image"] = ""
xml_group.attrib["image"] = "AirframeUnknown"
for param in group.GetParams():
if (last_param_name == param.GetName() and not board_specific_param_set) or last_param_name != param.GetName():
xml_param = ET.SubElement(xml_group, "airframe")
+1 -1
View File
@@ -107,7 +107,7 @@ class SourceParser(object):
re_remove_dots = re.compile(r'\.+$')
re_remove_carriage_return = re.compile('\n+')
valid_tags = set(["group", "board", "min", "max", "unit", "decimal"])
valid_tags = set(["group", "board", "min", "max", "unit", "decimal", "reboot_required"])
# Order of parameter groups
priority = {
Vendored
+27 -2
View File
@@ -37,17 +37,42 @@ Vagrant.configure(2) do |config|
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# NFS should be faster: https://stefanwrobel.com/how-to-make-vagrant-performance-not-suck
config.vm.synced_folder ".", "/Firmware", type: "nfs"
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
# This is to configure the machine to be as fast as possible
# Alternative: https://github.com/rdsubhas/vagrant-faster
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = false
vb.customize ["modifyvm", :id, "--ioapic", "on"]
vb.customize ["modifyvm", :id, "--cpus", "2"]
#vb.customize ["modifyvm", :id, "--cpus", "2"]
config.vm.provider "virtualbox" do |v|
host = RbConfig::CONFIG['host_os']
# Give VM 1/4 system memory & access to all cpu cores on the host
if host =~ /darwin/
cpus = `sysctl -n hw.ncpu`.to_i
# sysctl returns Bytes and we need to convert to MB
mem = `sysctl -n hw.memsize`.to_i / 1024 / 1024 / 4
elsif host =~ /linux/
cpus = `nproc`.to_i
# meminfo shows KB and we need to convert to MB
mem = `grep 'MemTotal' /proc/meminfo | sed -e 's/MemTotal://' -e 's/ kB//'`.to_i / 1024 / 4
else # sorry Windows folks, I can't help you
cpus = 2
mem = 1024
end
v.customize ["modifyvm", :id, "--memory", mem]
v.customize ["modifyvm", :id, "--cpus", cpus]
end
# Since make and other tools freak out if they see timestamps
# from the future and we share directories, tightly lock the host and guest clocks together (clock sync if more than 2 seconds off)
@@ -57,7 +82,7 @@ Vagrant.configure(2) do |config|
vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-on-restore", "1"]
# Customize the amount of memory on the VM:
vb.memory = "2048"
#vb.memory = "2048"
end
#
# View the documentation for the provider you are using for more
Submodule cmake/cmake_hexagon added at 829f22eff3
+4
View File
@@ -266,6 +266,10 @@ function(px4_add_module)
add_library(${MODULE} STATIC EXCLUDE_FROM_ALL ${SRCS})
if(${OS} STREQUAL "qurt" )
set_property(TARGET ${MODULE} PROPERTY POSITION_INDEPENDENT_CODE TRUE)
endif()
if(MAIN)
set_target_properties(${MODULE} PROPERTIES
COMPILE_DEFINITIONS PX4_MAIN=${MAIN}_app_main)
@@ -0,0 +1,87 @@
include(nuttx/px4_impl_nuttx)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
set(config_module_list
#
# Board support modules
#
drivers/device
drivers/stm32
drivers/led
drivers/boards/px4-stm32f4discovery
#
# System commands
#
systemcmds/bl_update
systemcmds/mixer
systemcmds/param
systemcmds/perf
systemcmds/reboot
systemcmds/top
systemcmds/config
systemcmds/nshterm
systemcmds/ver
#
# Library modules
#
modules/param
modules/systemlib
modules/systemlib/mixer
modules/controllib
modules/uORB
#
# Libraries
#
#lib/mathlib/CMSIS
lib/mathlib
lib/mathlib/math/filter
lib/ecl
lib/external_lgpl
lib/geo
lib/conversion
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
platforms/common
platforms/nuttx/px4_layer
#
# Demo apps
#
#examples/math_demo
# Tutorial code from
# https://px4.io/dev/px4_simple_app
examples/px4_simple_app
# Tutorial code from
# https://px4.io/dev/daemon
#examples/px4_daemon_app
# Tutorial code from
# https://px4.io/dev/debug_values
#examples/px4_mavlink_debug
# Tutorial code from
# https://px4.io/dev/example_fixedwing_control
#examples/fixedwing_control
# Hardware test
#examples/hwtest
)
set(config_extra_builtin_cmds
serdis
sercon
)
add_custom_target(sercon)
set_target_properties(sercon PROPERTIES
MAIN "sercon" STACK "2048")
add_custom_target(serdis)
set_target_properties(serdis PROPERTIES
MAIN "serdis" STACK "2048")
+6 -4
View File
@@ -27,16 +27,16 @@ set(config_module_list
drivers/trone
drivers/gps
drivers/pwm_out_sim
drivers/hott
drivers/hott/hott_telemetry
drivers/hott/hott_sensors
#drivers/hott
#drivers/hott/hott_telemetry
#drivers/hott/hott_sensors
drivers/blinkm
drivers/airspeed
drivers/ets_airspeed
drivers/meas_airspeed
drivers/frsky_telemetry
modules/sensors
drivers/mkblctrl
#drivers/mkblctrl
drivers/px4flow
#
@@ -73,6 +73,7 @@ set(config_module_list
modules/attitude_estimator_q
modules/ekf_att_pos_estimator
modules/position_estimator_inav
modules/ekf2
#
# Vehicle Control
@@ -113,6 +114,7 @@ set(config_module_list
lib/launchdetection
lib/terrain_estimation
lib/runway_takeoff
lib/tailsitter_recovery
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
+7 -6
View File
@@ -23,16 +23,16 @@ set(config_module_list
drivers/l3gd20
drivers/hmc5883
drivers/ms5611
drivers/mb12xx
#drivers/mb12xx
drivers/srf02
drivers/sf0x
drivers/ll40ls
drivers/trone
drivers/gps
drivers/pwm_out_sim
drivers/hott
drivers/hott/hott_telemetry
drivers/hott/hott_sensors
#drivers/hott
#drivers/hott/hott_telemetry
#drivers/hott/hott_sensors
drivers/blinkm
drivers/airspeed
drivers/ets_airspeed
@@ -45,7 +45,7 @@ set(config_module_list
drivers/gimbal
drivers/pwm_input
drivers/camera_trigger
drivers/bst
drivers/bst
#
# System commands
@@ -123,6 +123,7 @@ set(config_module_list
lib/launchdetection
lib/terrain_estimation
lib/runway_takeoff
lib/tailsitter_recovery
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
@@ -132,7 +133,7 @@ set(config_module_list
#
# OBC challenge
#
modules/bottle_drop
#modules/bottle_drop
#
# Rover apps
@@ -2,6 +2,8 @@ include(nuttx/px4_impl_nuttx)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
set(config_uavcan_num_ifaces 2)
set(config_module_list
#
# Board support modules
@@ -21,27 +23,29 @@ set(config_module_list
drivers/l3gd20
drivers/hmc5883
drivers/ms5611
drivers/mb12xx
#drivers/mb12xx
drivers/srf02
drivers/sf0x
drivers/ll40ls
drivers/trone
drivers/gps
drivers/pwm_out_sim
drivers/hott
drivers/hott/hott_telemetry
drivers/hott/hott_sensors
#drivers/hott
#drivers/hott/hott_telemetry
#drivers/hott/hott_sensors
drivers/blinkm
drivers/airspeed
drivers/ets_airspeed
drivers/meas_airspeed
drivers/frsky_telemetry
modules/sensors
drivers/mkblctrl
#drivers/mkblctrl
drivers/px4flow
drivers/oreoled
drivers/gimbal
drivers/pwm_input
drivers/camera_trigger
drivers/bst
#
# System commands
@@ -53,6 +57,7 @@ set(config_module_list
systemcmds/pwm
systemcmds/esc_calib
systemcmds/reboot
#systemcmds/topic_listener
systemcmds/top
systemcmds/config
systemcmds/nshterm
@@ -60,6 +65,35 @@ set(config_module_list
systemcmds/dumpfile
systemcmds/ver
#
# General system control
#
modules/commander
modules/navigator
modules/mavlink
modules/gpio_led
modules/uavcan
modules/land_detector
#
# Estimation modules (EKF/ SO3 / other filters)
#
# Too high RAM usage due to static allocations
# modules/attitude_estimator_ekf
modules/attitude_estimator_q
modules/ekf2
modules/position_estimator_inav
#
# Vehicle Control
#
# modules/segway # XXX Needs GCC 4.7 fix
modules/fw_pos_control_l1
modules/fw_att_control
modules/mc_att_control
modules/mc_pos_control
modules/vtol_att_control
#
# Logging
#
@@ -87,34 +121,47 @@ set(config_module_list
lib/geo_lookup
lib/conversion
lib/launchdetection
lib/terrain_estimation
lib/runway_takeoff
lib/tailsitter_recovery
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
platforms/common
platforms/nuttx/px4_layer
#
# OBC challenge
#
#modules/bottle_drop
#
# Rover apps
#
examples/rover_steering_control
#
# Demo apps
#
#examples/math_demo
# Tutorial code from
# https://px4.io/dev/px4_simple_app
examples/px4_simple_app
#examples/px4_simple_app
# Tutorial code from
# https://px4.io/dev/daemon
examples/px4_daemon_app
#examples/px4_daemon_app
# Tutorial code from
# https://px4.io/dev/debug_values
examples/px4_mavlink_debug
#examples/px4_mavlink_debug
# Tutorial code from
# https://px4.io/dev/example_fixedwing_control
examples/fixedwing_control
#examples/fixedwing_control
# Hardware test
examples/hwtest
#examples/hwtest
)
set(config_extra_builtin_cmds
@@ -128,10 +175,12 @@ set(config_io_board
set(config_extra_libs
${CMAKE_SOURCE_DIR}/src/lib/mathlib/CMSIS/libarm_cortexM4lf_math.a
uavcan
uavcan_stm32_driver
)
set(config_io_extra_libs
${CMAKE_SOURCE_DIR}/src/lib/mathlib/CMSIS/libarm_cortexM3l_math.a
#${CMAKE_SOURCE_DIR}/src/lib/mathlib/CMSIS/libarm_cortexM3l_math.a
)
add_custom_target(sercon)
@@ -42,6 +42,7 @@ set(config_module_list
drivers/gimbal
drivers/pwm_input
drivers/camera_trigger
drivers/bst
#
# System commands
@@ -80,6 +81,7 @@ set(config_module_list
modules/attitude_estimator_q
modules/ekf_att_pos_estimator
modules/position_estimator_inav
modules/ekf2
#
# Vehicle Control
@@ -121,6 +123,7 @@ set(config_module_list
lib/launchdetection
lib/terrain_estimation
lib/runway_takeoff
lib/tailsitter_recovery
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
-21
View File
@@ -1,21 +0,0 @@
include(nuttx/px4_impl_nuttx)
message(WARNING "this is a work in progress and doesn't build yet")
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cmake)
set(config_module_list
#platforms/nuttx
#platforms/nuttx/px4_layer
platforms/common
#drivers/led
drivers/device
#modules/systemlib
#modules/uORB
#examples/px4_simple_app
#lib/mathlib/math/filter
#lib/conversion
)
set(config_extra_builtin_cmds
)
+3 -1
View File
@@ -35,11 +35,13 @@ set(config_module_list
lib/mathlib
lib/mathlib/math/filter
lib/conversion
lib/ecl
lib/geo
lib/geo_lookup
lib/conversion
lib/terrain_estimation
lib/runway_takeoff
lib/tailsitter_recovery
platforms/common
platforms/posix/px4_layer
+1
View File
@@ -59,6 +59,7 @@ set(config_module_list
lib/launchdetection
lib/terrain_estimation
lib/runway_takeoff
lib/tailsitter_recovery
examples/px4_simple_app
)
+99
View File
@@ -0,0 +1,99 @@
include(posix/px4_impl_posix)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cmake)
set(config_module_list
drivers/device
drivers/boards/sitl
drivers/pwm_out_sim
platforms/common
platforms/posix/px4_layer
platforms/posix/work_queue
platforms/posix/drivers/adcsim
platforms/posix/drivers/gpssim
platforms/posix/drivers/tonealrmsim
platforms/posix/drivers/accelsim
platforms/posix/drivers/airspeedsim
platforms/posix/drivers/barosim
platforms/posix/drivers/gyrosim
platforms/posix/drivers/rgbledsim
platforms/posix/drivers/ledsim
systemcmds/param
systemcmds/mixer
systemcmds/ver
systemcmds/esc_calib
systemcmds/reboot
systemcmds/topic_listener
systemcmds/perf
modules/uORB
modules/param
modules/systemlib
modules/systemlib/mixer
modules/sensors
modules/simulator
modules/mavlink
modules/attitude_estimator_ekf
modules/attitude_estimator_q
modules/ekf_att_pos_estimator
modules/ekf2
modules/position_estimator_inav
modules/navigator
modules/vtol_att_control
modules/mc_pos_control
modules/mc_att_control
modules/mc_pos_control_multiplatform
modules/mc_att_control_multiplatform
modules/land_detector
modules/fw_att_control
modules/fw_pos_control_l1
modules/dataman
modules/sdlog2
modules/commander
modules/controllib
lib/mathlib
lib/mathlib/math/filter
lib/conversion
lib/ecl
lib/external_lgpl
lib/geo
lib/geo_lookup
lib/launchdetection
lib/terrain_estimation
lib/runway_takeoff
lib/tailsitter_recovery
examples/px4_simple_app
)
set(config_extra_builtin_cmds
serdis
sercon
)
set(config_sitl_rcS
posix-configs/SITL/init/rcS_ekf2
CACHE FILEPATH "init script for sitl"
)
set(config_sitl_viewer
jmavsim
CACHE STRING "viewer for sitl"
)
set_property(CACHE config_sitl_viewer
PROPERTY STRINGS "jmavsim;none")
set(config_sitl_debugger
disable
CACHE STRING "debugger for sitl"
)
set_property(CACHE config_sitl_debugger
PROPERTY STRINGS "disable;gdb;lldb")
add_custom_target(sercon)
set_target_properties(sercon PROPERTIES
MAIN "sercon" STACK "2048")
add_custom_target(serdis)
set_target_properties(serdis PROPERTIES
MAIN "serdis" STACK "2048")
+91
View File
@@ -0,0 +1,91 @@
include(qurt/px4_impl_qurt)
#if ("${HEXAGON_DRIVERS_ROOT}" #STREQUAL "")
# message(FATAL_ERROR "HEXAGON_DRIVERS_ROOT is not set")
#endif()
#if ("${EAGLE_DRIVERS_SRC}" STREQUAL "")
# message(FATAL_ERROR "EAGLE_DRIVERS_SRC is not set")
#endif()
#include_directories(${HEXAGON_DRIVERS_ROOT}/inc)
# For Actual flight we need to link against the driver dynamic libraries
#set(target_libraries
# -L${HEXAGON_DRIVERS_ROOT}/libs
# The plan is to replace these with our drivers
# mpu9x50
# uart_esc
# csr_gps
# rc_receiver
# )
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)
set(config_module_list
#
# Board support modules
#
drivers/device
modules/sensors
# The plan is to replace these with our drivers
# $(EAGLE_DRIVERS_SRC)/mpu9x50
# $(EAGLE_DRIVERS_SRC)/uart_esc
# $(EAGLE_DRIVERS_SRC)/rc_receiver
# $(EAGLE_DRIVERS_SRC)/csr_gps
#
# System commands
#
systemcmds/param
#
# Estimation modules (EKF/ SO3 / other filters)
#
#modules/attitude_estimator_ekf
modules/ekf_att_pos_estimator
modules/attitude_estimator_q
modules/position_estimator_inav
#
# Vehicle Control
#
modules/mc_att_control
modules/mc_pos_control
#
# Library modules
#
modules/param
modules/systemlib
modules/systemlib/mixer
modules/uORB
modules/commander
modules/controllib
#
# Libraries
#
lib/mathlib
lib/mathlib/math/filter
lib/geo
lib/geo_lookup
lib/conversion
lib/terrain_estimation
lib/runway_takeoff
lib/tailsitter_recovery
#
# QuRT port
#
platforms/common
platforms/qurt/px4_layer
platforms/posix/work_queue
#
# sources for muorb over fastrpc
#
modules/muorb/adsp
)
+3 -1
View File
@@ -1,6 +1,8 @@
include(qurt/px4_impl_qurt)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)
set(config_module_list
drivers/device
+3 -1
View File
@@ -1,6 +1,7 @@
include(qurt/px4_impl_qurt)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)
set(config_module_list
drivers/device
@@ -49,6 +50,7 @@ set(config_module_list
lib/conversion
lib/terrain_estimation
lib/runway_takeoff
lib/tailsitter_recovery
modules/controllib
#
+3 -1
View File
@@ -1,6 +1,8 @@
include(qurt/px4_impl_qurt)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)
set(config_module_list
drivers/device
+3 -1
View File
@@ -20,7 +20,8 @@ set(target_libraries
)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)
set(config_module_list
#
@@ -72,6 +73,7 @@ set(config_module_list
lib/conversion
lib/terrain_estimation
lib/runway_takeoff
lib/tailsitter_recovery
#
# QuRT port
+2 -1
View File
@@ -1,6 +1,7 @@
include(qurt/px4_impl_qurt)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)
set(config_module_list
drivers/device
+3 -1
View File
@@ -3,7 +3,8 @@ include(qurt/px4_impl_qurt)
# Run a full link with build stubs to make sure qurt target isn't broken
set(QURT_ENABLE_STUBS "1")
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)
set(config_module_list
drivers/device
@@ -54,6 +55,7 @@ set(config_module_list
lib/ecl
lib/terrain_estimation
lib/runway_takeoff
lib/tailsitter_recovery
#
# QuRT port
+8
View File
@@ -467,6 +467,14 @@ function(px4_os_add_flags)
-mfpu=fpv4-sp-d16
-mfloat-abi=hard
)
elseif (${BOARD} STREQUAL "px4-stm32f4discovery")
set(cpu_flags
-mcpu=cortex-m4
-mthumb
-march=armv7e-m
-mfpu=fpv4-sp-d16
-mfloat-abi=hard
)
elseif (${BOARD} STREQUAL "aerocore")
set(cpu_flags
-mcpu=cortex-m4
+2 -5
View File
@@ -172,16 +172,13 @@ function(px4_os_add_flags)
set(added_definitions
-D__PX4_QURT
-D__PX4_POSIX
-D__DF_QURT
-include ${PX4_INCLUDE_DIR}visibility.h
)
# Add the toolchain specific flags
set(added_cflags ${QURT_CMAKE_C_FLAGS})
set(added_cxx_flags ${QURT_CMAKE_CXX_FLAGS})
set(added_cflags -O0)
set(added_cxx_flags -O0)
# FIXME @jgoppert - how to work around issues like this?
# Without changing global variables?
# Clear -rdynamic flag which fails for hexagon
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
@@ -1,254 +0,0 @@
#
# Copyright (C) 2015 Mark Charlebois. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name PX4 nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
include(CMakeForceCompiler)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
include(common/px4_base)
if ("$ENV{HEXAGON_TOOLS_ROOT}" STREQUAL "")
message(FATAL_ERROR
"The HexagonTools version 7.2.10 must be installed and the environment variable HEXAGON_TOOLS_ROOT must be set"
"(e.g. export HEXAGON_TOOLS_ROOT=/opt/HEXAGON_Tools/7.2.10/Tools)")
else()
set(HEXAGON_TOOLS_ROOT $ENV{HEXAGON_TOOLS_ROOT})
endif()
macro (list2string out in)
set(list ${ARGV})
list(REMOVE_ITEM list ${out})
foreach(item ${list})
set(${out} "${${out}} ${item}")
endforeach()
endmacro(list2string)
set(V_ARCH "v5")
set(CROSSDEV "hexagon-")
set(HEXAGON_BIN ${HEXAGON_TOOLS_ROOT}/bin)
set(HEXAGON_LIB_DIR ${HEXAGON_TOOLS_ROOT}/gnu/hexagon/lib)
set(HEXAGON_ISS_DIR ${HEXAGON_TOOLS_ROOT}/lib/iss)
set(TOOLSLIB ${HEXAGON_TOOLS_ROOT}/target/hexagon/lib/${V_ARCH}/G0)
# Use the HexagonTools compiler (7.2.10)
set(CMAKE_C_COMPILER ${HEXAGON_BIN}/${CROSSDEV}clang)
set(CMAKE_CXX_COMPILER ${HEXAGON_BIN}/${CROSSDEV}clang++)
set(CMAKE_AR ${HEXAGON_BIN}/${CROSSDEV}ar CACHE FILEPATH "Archiver")
set(CMAKE_RANLIB ${HEXAGON_BIN}/${CROSSDEV}ranlib)
set(CMAKE_LINKER ${HEXAGON_BIN}/${CROSSDEV}ld.qcld)
set(CMAKE_NM ${HEXAGON_BIN}/${CROSSDEV}nm)
set(CMAKE_OBJDUMP ${HEXAGON_BIN}/${CROSSDEV}objdump)
set(CMAKE_OBJCOPY ${HEXAGON_BIN}/${CROSSDEV}objcopy)
list2string(HEXAGON_INCLUDE_DIRS
-I${HEXAGON_TOOLS_ROOT}/target/hexagon/include
)
#set(DYNAMIC_LIBS -Wl,${TOOLSLIB}/pic/libstdc++.a)
#set(MAXOPTIMIZATION -O0)
# Base CPU flags for each of the supported architectures.
#
set(ARCHCPUFLAGS
-m${V_ARCH}
-G0
)
add_definitions(
-D_PID_T -D_UID_T -D_TIMER_T
-Dnoreturn_function=
-D_HAS_C9X
-D__EXPORT=
-Drestrict=
-D_DEBUG
-Wno-error=shadow
)
# optimisation flags
#
set(ARCHOPTIMIZATION
-O0
-g
-fno-strict-aliasing
-fdata-sections
-fno-zero-initialized-in-bss
)
# Language-specific flags
#
set(ARCHCFLAGS
-std=gnu99
-D__CUSTOM_FILE_IO__
)
set(ARCHCXXFLAGS
-fno-exceptions
-fno-rtti
-std=c++11
-fno-threadsafe-statics
-DCONFIG_WCHAR_BUILTIN
-D__CUSTOM_FILE_IO__
)
set(ARCHWARNINGS
-Wall
-Wextra
-Werror
-Wno-unused-parameter
-Wno-unused-function
-Wno-unused-variable
-Wno-gnu-array-member-paren-init
-Wno-cast-align
-Wno-missing-braces
-Wno-strict-aliasing
# -Werror=float-conversion - works, just needs to be phased in with some effort and needs GCC 4.9+
# -Wcast-qual - generates spurious noreturn attribute warnings, try again later
# -Wconversion - would be nice, but too many "risky-but-safe" conversions in the code
# -Wcast-align - would help catch bad casts in some cases, but generates too many false positives
)
# C-specific warnings
#
set(ARCHCWARNINGS
${ARCHWARNINGS}
-Wstrict-prototypes
-Wnested-externs
)
# C++-specific warnings
#
set(ARCHWARNINGSXX
${ARCHWARNINGS}
-Wno-missing-field-initializers
)
exec_program(${CMAKE_CXX_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ARGS -print-libgcc-file-name OUTPUT_VARIABLE LIBGCC)
exec_program(${CMAKE_CXX_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ARGS -print-file-name=libm.a OUTPUT_VARIABLE LIBM)
set(EXTRA_LIBS ${EXTRA_LIBS} ${LIBM})
# Flags we pass to the C compiler
#
list2string(CFLAGS
${ARCHCFLAGS}
${ARCHCWARNINGS}
${ARCHOPTIMIZATION}
${ARCHCPUFLAGS}
${ARCHINCLUDES}
${INSTRUMENTATIONDEFINES}
${ARCHDEFINES}
${EXTRADEFINES}
${EXTRACFLAGS}
${HEXAGON_INCLUDE_DIRS}
)
# Flags we pass to the C++ compiler
#
list2string(CXXFLAGS
${ARCHCXXFLAGS}
${ARCHWARNINGSXX}
${ARCHOPTIMIZATION}
${ARCHCPUFLAGS}
${ARCHXXINCLUDES}
${INSTRUMENTATIONDEFINES}
${ARCHDEFINES}
${EXTRADEFINES}
${EXTRACXXFLAGS}
${HEXAGON_INCLUDE_DIRS}
)
# Flags we pass to the assembler
#
list2string(AFLAGS
${CFLAGS}
-D__ASSEMBLY__
${EXTRADEFINES}
${EXTRAAFLAGS}
)
# Set cmake flags
#
list2string(CMAKE_C_FLAGS
${CMAKE_C_FLAGS}
${CFLAGS}
)
set(QURT_CMAKE_C_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "cflags")
message(STATUS "CMAKE_C_FLAGS: -${CMAKE_C_FLAGS}-")
list2string(CMAKE_CXX_FLAGS
${CMAKE_CXX_FLAGS}
${CXXFLAGS}
)
set(QURT_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "cxxflags")
message(STATUS "CMAKE_CXX_FLAGS: -${CMAKE_CXX_FLAGS}-")
# Flags we pass to the linker
#
list2string(CMAKE_EXE_LINKER_FLAGS
-g
-mv5
-mG0lib
-G0
-fpic
-shared
-Wl,-Bsymbolic
-Wl,--wrap=malloc
-Wl,--wrap=calloc
-Wl,--wrap=free
-Wl,--wrap=realloc
-Wl,--wrap=memalign
-Wl,--wrap=__stack_chk_fail
-lc
${EXTRALDFLAGS}
)
# where is the target environment
set(CMAKE_FIND_ROOT_PATH get_file_component(${C_COMPILER} PATH))
set(CMAKE_C_COMPILER_ID, "Clang")
set(CMAKE_CXX_COMPILER_ID, "Clang")
# search for programs in the build host directories
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
# The Hexagon compiler doesn't support the -rdynamic flag and this is set
# in the base cmake scripts. We have to redefine the __linux_compiler_gnu
# macro for cmake 2.8 to work
set(__LINUX_COMPILER_GNU 1)
macro(__linux_compiler_gnu lang)
set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "")
endmacro()
-249
View File
@@ -1,249 +0,0 @@
#
# Copyright (C) 2015 Mark Charlebois. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name PX4 nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
include(CMakeForceCompiler)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
include(common/px4_base)
if(NOT HEXAGON_TOOLS_ROOT)
set(HEXAGON_TOOLS_ROOT /opt/6.4.05)
endif()
if(NOT HEXAGON_SDK_ROOT)
set(HEXAGON_SDK_ROOT /opt/Hexagon_SDK)
endif()
macro (list2string out in)
set(list ${ARGV})
list(REMOVE_ITEM list ${out})
foreach(item ${list})
set(${out} "${${out}} ${item}")
endforeach()
endmacro(list2string)
set(V_ARCH "v5")
set(CROSSDEV "hexagon-")
set(HEXAGON_BIN ${HEXAGON_TOOLS_ROOT}/gnu/bin)
set(HEXAGON_CLANG_BIN ${HEXAGON_TOOLS_ROOT}/qc/bin)
set(HEXAGON_LIB_DIR ${HEXAGON_TOOLS_ROOT}/gnu/hexagon/lib)
set(HEXAGON_ISS_DIR ${HEXAGON_TOOLS_ROOT}/qc/lib/iss)
set(TOOLSLIB ${HEXAGON_TOOLS_ROOT}/dinkumware/lib/$(V_ARCH)/G0)
set(QCTOOLSLIB ${HEXAGON_TOOLS_ROOT}/qc/lib/$(V_ARCH)/G0)
# Use the HexagonTools compiler (6.4.05)
set(CMAKE_C_COMPILER ${HEXAGON_CLANG_BIN}/${CROSSDEV}clang)
set(CMAKE_CXX_COMPILER ${HEXAGON_CLANG_BIN}/${CROSSDEV}clang++)
set(CMAKE_AR ${HEXAGON_BIN}/${CROSSDEV}ar CACHE FILEPATH "Archiver")
set(CMAKE_RANLIB ${HEXAGON_BIN}/${CROSSDEV}ranlib)
set(CMAKE_LINKER ${HEXAGON_BIN}/${CROSSDEV}ld)
set(CMAKE_NM ${HEXAGON_BIN}/${CROSSDEV}nm)
set(CMAKE_OBJDUMP ${HEXAGON_BIN}/${CROSSDEV}objdump)
set(CMAKE_OBJCOPY ${HEXAGON_BIN}/${CROSSDEV}objcopy)
list2string(HEXAGON_INCLUDE_DIRS
-I${HEXAGON_TOOLS_ROOT}/gnu/hexagon/include
-I${HEXAGON_SDK_ROOT}/inc
-I${HEXAGON_SDK_ROOT}/inc/stddef
)
#set(DYNAMIC_LIBS -Wl,${TOOLSLIB}/pic/libstdc++.a)
#set(MAXOPTIMIZATION -O0)
# Base CPU flags for each of the supported architectures.
#
set(ARCHCPUFLAGS
-m${V_ARCH}
-G0
)
add_definitions(
-D_PID_T -D_UID_T -D_TIMER_T
-Dnoreturn_function=
-D__EXPORT=
-Drestrict=
-D_DEBUG
-Wno-error=shadow
)
# optimisation flags
#
set(ARCHOPTIMIZATION
-O0
-g
-fno-strict-aliasing
-fdata-sections
-fpic
-fno-zero-initialized-in-bss
)
# Language-specific flags
#
set(ARCHCFLAGS
-std=gnu99
-D__CUSTOM_FILE_IO__
)
set(ARCHCXXFLAGS
-fno-exceptions
-fno-rtti
-std=c++11
-fno-threadsafe-statics
-DCONFIG_WCHAR_BUILTIN
-D__CUSTOM_FILE_IO__
)
set(ARCHWARNINGS
-Wall
-Wextra
-Werror
-Wno-unused-parameter
-Wno-unused-function
-Wno-unused-variable
-Wno-gnu-array-member-paren-init
-Wno-cast-align
-Wno-missing-braces
-Wno-strict-aliasing
# -Werror=float-conversion - works, just needs to be phased in with some effort and needs GCC 4.9+
# -Wcast-qual - generates spurious noreturn attribute warnings, try again later
# -Wconversion - would be nice, but too many "risky-but-safe" conversions in the code
# -Wcast-align - would help catch bad casts in some cases, but generates too many false positives
)
# C-specific warnings
#
set(ARCHCWARNINGS
${ARCHWARNINGS}
-Wstrict-prototypes
-Wnested-externs
)
# C++-specific warnings
#
set(ARCHWARNINGSXX
${ARCHWARNINGS}
-Wno-missing-field-initializers
)
exec_program(${CMAKE_CXX_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ARGS -print-libgcc-file-name OUTPUT_VARIABLE LIBGCC)
exec_program(${CMAKE_CXX_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ARGS -print-file-name=libm.a OUTPUT_VARIABLE LIBM)
set(EXTRA_LIBS ${EXTRA_LIBS} ${LIBM})
# Flags we pass to the C compiler
#
list2string(CFLAGS
${ARCHCFLAGS}
${ARCHCWARNINGS}
${ARCHOPTIMIZATION}
${ARCHCPUFLAGS}
${ARCHINCLUDES}
${INSTRUMENTATIONDEFINES}
${ARCHDEFINES}
${EXTRADEFINES}
${EXTRACFLAGS}
${HEXAGON_INCLUDE_DIRS}
)
# Flags we pass to the C++ compiler
#
list2string(CXXFLAGS
${ARCHCXXFLAGS}
${ARCHWARNINGSXX}
${ARCHOPTIMIZATION}
${ARCHCPUFLAGS}
${ARCHXXINCLUDES}
${INSTRUMENTATIONDEFINES}
${ARCHDEFINES}
${EXTRADEFINES}
${EXTRACXXFLAGS}
${HEXAGON_INCLUDE_DIRS}
)
# Flags we pass to the assembler
#
list2string(AFLAGS
${CFLAGS}
-D__ASSEMBLY__
${EXTRADEFINES}
${EXTRAAFLAGS}
)
# Set cmake flags
#
list2string(CMAKE_C_FLAGS
${CMAKE_C_FLAGS}
${CFLAGS}
)
set(QURT_CMAKE_C_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "cflags")
message(STATUS "CMAKE_C_FLAGS: -${CMAKE_C_FLAGS}-")
list2string(CMAKE_CXX_FLAGS
${CMAKE_CXX_FLAGS}
${CXXFLAGS}
)
set(QURT_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "cxxflags")
message(STATUS "CMAKE_CXX_FLAGS: -${CMAKE_CXX_FLAGS}-")
# Flags we pass to the linker
#
list2string(CMAKE_EXE_LINKER_FLAGS
-g
-mv5
-mG0lib
-G0
-fpic
-shared
-Wl,-Bsymbolic
-Wl,--wrap=malloc
-Wl,--wrap=calloc
-Wl,--wrap=free
-Wl,--wrap=realloc
-Wl,--wrap=memalign
-Wl,--wrap=__stack_chk_fail
-lc
${EXTRALDFLAGS}
)
# where is the target environment
set(CMAKE_FIND_ROOT_PATH get_file_component(${C_COMPILER} PATH))
set(CMAKE_C_COMPILER_ID, "Clang")
set(CMAKE_CXX_COMPILER_ID, "Clang")
# search for programs in the build host directories
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+7 -1
View File
@@ -6,6 +6,12 @@ uint8 RC_INPUT_SOURCE_PX4IO_SBUS = 4
uint8 RC_INPUT_SOURCE_PX4IO_ST24 = 5
uint8 RC_INPUT_SOURCE_MAVLINK = 6
uint8 RC_INPUT_SOURCE_QURT = 7
uint8 RC_INPUT_SOURCE_PX4FMU_SPEKTRUM = 8
uint8 RC_INPUT_SOURCE_PX4FMU_SBUS = 9
uint8 RC_INPUT_SOURCE_PX4FMU_ST24 = 10
uint8 RC_INPUT_SOURCE_PX4FMU_SUMD = 11
uint8 RC_INPUT_SOURCE_PX4FMU_DSM = 12
uint8 RC_INPUT_SOURCE_PX4IO_SUMD = 13
uint8 RC_INPUT_MAX_CHANNELS = 18 # Maximum number of R/C input channels in the system. S.Bus has up to 18 channels.
@@ -14,7 +20,7 @@ uint64 timestamp_last_signal # last valid reception time
uint32 channel_count # number of channels actually being seen
int32 rssi # receive signal strength indicator (RSSI): < 0: Undefined, 0: no signal, 100: full reception
bool rc_failsafe # explicit failsafe flag: true on TX failure or TX out of range , false otherwise. Only the true state is reliable, as there are some (PPM) receivers on the market going into failsafe without telling us explicitly.
bool rc_lost # RC receiver connection status: True,if no frame has arrived in the expected time, false otherwise. True usally means that the receiver has been disconnected, but can also indicate a radio link loss on "stupid" systems. Will remain false, if a RX with failsafe option continues to transmit frames after a link loss.
bool rc_lost # RC receiver connection status: True,if no frame has arrived in the expected time, false otherwise. True usUally means that the receiver has been disconnected, but can also indicate a radio link loss on "stupid" systems. Will remain false, if a RX with failsafe option continues to transmit frames after a link loss.
uint16 rc_lost_frame_count # Number of lost RC frames. Note: intended purpose: observe the radio link quality if RSSI is not available. This value must not be used to trigger any failsafe-alike funtionality.
uint16 rc_total_frame_count # Number of total RC frames. Note: intended purpose: observe the radio link quality if RSSI is not available. This value must not be used to trigger any failsafe-alike funtionality.
uint16 rc_ppm_frame_length # Length of a single PPM frame. Zero for non-PPM systems
+1 -1
View File
@@ -26,7 +26,7 @@ float32 z # throttle stick position 0..1
# in general the value corresponds to the demanded throttle by the user,
# if the input is used for setting the setpoint of a vertical position
# controller any value > 0.5 means up and any value < 0.5 means down
float32 r # yaw stick/twist positon, -1..1
float32 r # yaw stick/twist position, -1..1
# in general corresponds to the righthand rotation around the vertical
# (downwards) axis of the vehicle
float32 flaps # flap position
+1
View File
@@ -33,3 +33,4 @@ float32 a_y # acceleration y setpoint
float32 a_z # acceleration z setpoint
bool acceleration_valid # true if acceleration setpoint is valid/should be used
bool acceleration_is_force # interprete acceleration as force
float32 acceptance_radius # navigation acceptance_radius if we're doint waypoint navigation
+1 -1
View File
@@ -6,6 +6,6 @@ bool[3] valid #true for RC-Param channels which are mapped to a param
int32[3] param_index # corresponding param index, this field is ignored if set to -1, in this case param_id will be used
char[51] param_id # MAP_NCHAN * (ID_LEN + 1) chars, corresponding param id, null terminated
float32[3] scale # scale to map the RC input [-1, 1] to a parameter value
float32[3] value0 # inital value around which the parameter value is changed
float32[3] value0 # initial value around which the parameter value is changed
float32[3] value_min # minimal parameter value
float32[3] value_max # minimal parameter value
+1
View File
@@ -31,6 +31,7 @@ uint32 VEHICLE_CMD_DO_SET_SERVO = 183 # Set a servo to a desired PWM value. |S
uint32 VEHICLE_CMD_DO_REPEAT_SERVO = 184 # Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period. |Servo number| PWM (microseconds, 1000 to 2000 typical)| Cycle count| Cycle time (seconds)| Empty| Empty| Empty|
uint32 VEHICLE_CMD_DO_FLIGHTTERMINATION=185 # Terminate flight immediately |Flight termination activated if > 0.5| Empty| Empty| Empty| Empty| Empty| Empty|
uint32 VEHICLE_CMD_DO_CONTROL_VIDEO = 200 # Control onboard camera system. |Camera ID (-1 for all)| Transmission: 0: disabled, 1: enabled compressed, 2: enabled raw| Transmission mode: 0: video stream, >0: single images every n seconds (decimal)| Recording: 0: disabled, 1: enabled compressed, 2: enabled raw| Empty| Empty| Empty|
uint32 VEHICLE_CMD_DO_DIGICAM_CONTROL=203
uint32 VEHICLE_CMD_DO_MOUNT_CONFIGURE=204 # Mission command to configure a camera or antenna mount |Mount operation mode (see MAV_MOUNT_MODE enum)| stabilize roll? (1 = yes, 0 = no)| stabilize pitch? (1 = yes, 0 = no)| stabilize yaw? (1 = yes, 0 = no)| Empty| Empty| Empty|
uint32 VEHICLE_CMD_DO_MOUNT_CONTROL=205 # Mission command to control a camera or antenna mount |pitch or lat in degrees, depending on mount mode.| roll or lon in degrees depending on mount mode| yaw or alt (in meters) depending on mount mode| reserved| reserved| reserved| MAV_MOUNT_MODE enum value|
uint32 VEHICLE_CMD_DO_SET_CAM_TRIGG_DIST=206 # Mission command to set CAM_TRIGG_DIST for this flight |Camera trigger distance (meters)| Empty| Empty| Empty| Empty| Empty| Empty|
+8
View File
@@ -0,0 +1,8 @@
uint8 VEHICLE_RESULT_ACCEPTED = 0
uint8 VEHICLE_RESULT_TEMPORARILY_REJECTED = 1
uint8 VEHICLE_RESULT_DENIED = 2
uint8 VEHICLE_RESULT_UNSUPPORTED = 3
uint8 VEHICLE_RESULT_FAILED = 4
uint16 command
uint8 result
+13 -13
View File
@@ -4,18 +4,18 @@
# estimator, which will take more sources of information into account than just GPS,
# e.g. control inputs of the vehicle in a Kalman-filter implementation.
#
uint64 timestamp # Time of this estimate, in microseconds since system start
uint64 time_utc_usec # GPS UTC timestamp in microseconds
float64 lat # Latitude in degrees
float64 lon # Longitude in degrees
float32 alt # Altitude AMSL in meters
float32 vel_n # Ground north velocity, m/s
float32 vel_e # Ground east velocity, m/s
float32 vel_d # Ground downside velocity, m/s
float32 yaw # Yaw in radians -PI..+PI.
float32 eph # Standard deviation of position estimate horizontally
float32 epv # Standard deviation of position vertically
float32 terrain_alt # Terrain altitude in m, WGS84
uint64 timestamp # Time of this estimate since system start, (microseconds)
uint64 time_utc_usec # GPS UTC timestamp, (microseconds)
float64 lat # Latitude, (degrees)
float64 lon # Longitude, (degrees)
float32 alt # Altitude AMSL, (meters)
float32 vel_n # North velocity in NED earth-fixed frame, (metres/sec)
float32 vel_e # East velocity in NED earth-fixed frame, (metres/sec)
float32 vel_d # Down velocity in NED earth-fixed frame, (metres/sec)
float32 yaw # Euler yaw angle relative to NED earth-fixed frame, -PI..+PI, (radians)
float32 eph # Standard deviation of horizontal position error, (metres)
float32 epv # Standard deviation of vertical position error, (metres)
float32 terrain_alt # Terrain altitude WGS84, (metres)
bool terrain_alt_valid # Terrain altitude estimate is valid
bool dead_reckoning # True if this position is estimated through dead-reckoning
float32 pressure_alt # Pressure altitude
float32 pressure_alt # Pressure altitude AMSL, (metres)
+17 -17
View File
@@ -1,30 +1,30 @@
# GPS position in WGS84 coordinates.
uint64 timestamp_position # Timestamp for position information
int32 lat # Latitude in 1E-7 degrees
uint64 timestamp_position # Time of the position estimates since system start, (microseconds)
int32 lat # Latitude in 1E-7 degrees
int32 lon # Longitude in 1E-7 degrees
int32 alt # Altitude in 1E-3 meters (millimeters) above MSL
int32 alt_ellipsoid # Altitude in 1E-3 meters (millimeters) above Ellipsoid
int32 alt # Altitude in 1E-3 meters above MSL, (millimetres)
int32 alt_ellipsoid # Altitude in 1E-3 meters bove Ellipsoid, (millimetres)
uint64 timestamp_variance
float32 s_variance_m_s # speed accuracy estimate m/s
float32 c_variance_rad # course accuracy estimate rad
uint64 timestamp_variance # Time of the accuracy estimates since system start, (microseconds)
float32 s_variance_m_s # GPS speed accuracy estimate, (metres/sec)
float32 c_variance_rad # GPS course accuracy estimate, (radians)
uint8 fix_type # 0-1: no fix, 2: 2D fix, 3: 3D fix, 4: RTCM code differential, 5: Real-Time Kinematic, float, 6: Real-Time Kinematic, fixed, 8: Extrapolated. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
float32 eph # GPS HDOP horizontal dilution of position in m
float32 epv # GPS VDOP horizontal dilution of position in m
float32 eph # GPS horizontal position accuracy (metres)
float32 epv # GPS vertical position accuracy (metres)
int32 noise_per_ms # GPS noise per millisecond
int32 jamming_indicator # indicates jamming is occurring
uint64 timestamp_velocity # Timestamp for velocity informations
float32 vel_m_s # GPS ground speed (m/s)
float32 vel_n_m_s # GPS ground speed in m/s
float32 vel_e_m_s # GPS ground speed in m/s
float32 vel_d_m_s # GPS ground speed in m/s
float32 cog_rad # Course over ground (NOT heading, but direction of movement) in rad, -PI..PI
bool vel_ned_valid # Flag to indicate if NED speed is valid
uint64 timestamp_velocity # Time of the velocity estimates since system start, (microseconds)
float32 vel_m_s # GPS ground speed, (metres/sec)
float32 vel_n_m_s # GPS North velocity, (metres/sec)
float32 vel_e_m_s # GPS East velocity, (metres/sec)
float32 vel_d_m_s # GPS Down velocity, (metres/sec)
float32 cog_rad # Course over ground (NOT heading, but direction of movement), -PI..PI, (radians)
bool vel_ned_valid # True if NED velocity is valid
uint64 timestamp_time # Timestamp for time information
uint64 timestamp_time # Time of the UTC timestamp since system start, (microseconds)
uint64 time_utc_usec # Timestamp (microseconds, UTC), this is the timestamp which comes from the gps module. It might be unavailable right after cold start, indicated by a value of 0
uint8 satellites_used # Number of satellites used
+25 -25
View File
@@ -1,36 +1,36 @@
# Fused local position in NED.
uint64 timestamp # Time of this estimate, in microseconds since system start
bool xy_valid # true if x and y are valid
bool z_valid # true if z is valid
bool v_xy_valid # true if vy and vy are valid
bool v_z_valid # true if vz is valid
uint64 timestamp # Time of this estimate since system start, (microseconds)
bool xy_valid # true if x and y are valid
bool z_valid # true if z is valid
bool v_xy_valid # true if vy and vy are valid
bool v_z_valid # true if vz is valid
# Position in local NED frame
float32 x # X position in meters in NED earth-fixed frame
float32 y # X position in meters in NED earth-fixed frame
float32 z # Z position in meters in NED earth-fixed frame (negative altitude)
float32 x # North position in NED earth-fixed frame, (metres)
float32 y # East position in NED earth-fixed frame, (metres)
float32 z # Down position (negative altitude) in NED earth-fixed frame, (metres)
# Velocity in NED frame
float32 vx # Ground X Speed (Latitude), m/s in NED
float32 vy # Ground Y Speed (Longitude), m/s in NED
float32 vz # Ground Z Speed (Altitude), m/s in NED
float32 vx # North velocity in NED earth-fixed frame, (metres/sec)
float32 vy # East velocity in NED earth-fixed frame, (metres/sec)
float32 vz # Down velocity in NED earth-fixed frame, (metres/sec)
# Heading
float32 yaw
float32 yaw # Euler yaw angle transforming the tangent plane relative to NED earth-fixed frame, -PI..+PI, (radians)
# Reference position in GPS / WGS84 frame
bool xy_global # true if position (x, y) is valid and has valid global reference (ref_lat, ref_lon)
bool z_global # true if z is valid and has valid global reference (ref_alt)
uint64 ref_timestamp # Time when reference position was set
float64 ref_lat # Reference point latitude in degrees
float64 ref_lon # Reference point longitude in degrees
float32 ref_alt # Reference altitude AMSL in meters, MUST be set to current (not at reference point!) ground level
# Position of reference point (local NED frame origin) in global (GPS / WGS84) frame
bool xy_global # true if position (x, y) is valid and has valid global reference (ref_lat, ref_lon)
bool z_global # true if z is valid and has valid global reference (ref_alt)
uint64 ref_timestamp # Time when reference position was set since system start, (microseconds)
float64 ref_lat # Reference point latitude, (degrees)
float64 ref_lon # Reference point longitude, (degrees)
float32 ref_alt # Reference altitude AMSL, MUST be set to current (not at reference point!) ground level, (metres)
# Distance to surface
float32 dist_bottom # Distance to bottom surface (ground)
float32 dist_bottom_rate # Distance to bottom surface (ground) change rate
uint64 surface_bottom_timestamp # Time when new bottom surface found
bool dist_bottom_valid # true if distance to bottom surface is valid
float32 eph
float32 epv
float32 dist_bottom # Distance from from bottom surface to ground, (metres)
float32 dist_bottom_rate # Rate of change of distance from bottom surface to ground, (metres/sec)
uint64 surface_bottom_timestamp # Time when new bottom surface found since system start, (microseconds)
bool dist_bottom_valid # true if distance to bottom surface is valid
float32 eph # Standard deviation of horizontal position error, (metres)
float32 epv # Standard deviation of vertical position error, (metres)
+3 -1
View File
@@ -10,7 +10,8 @@ uint8 MAIN_STATE_OFFBOARD = 7
uint8 MAIN_STATE_STAB = 8
uint8 MAIN_STATE_RATTITUDE = 9
uint8 MAIN_STATE_AUTO_TAKEOFF = 10
uint8 MAIN_STATE_MAX = 11
uint8 MAIN_STATE_AUTO_LAND = 11
uint8 MAIN_STATE_MAX = 12
# If you change the order, add or remove arming_state_t states make sure to update the arrays
# in state_machine_helper.cpp as well.
@@ -104,6 +105,7 @@ uint16 counter # incremented by the writing thread everytime new data is store
uint64 timestamp # in microseconds since system start, is set whenever the writing thread stores new data
uint8 main_state # main state machine
uint8 main_state_prev # previous main state
uint8 nav_state # set navigation state machine to specified value
uint8 arming_state # current arming state
uint8 hil_state # current hil state
+3 -2
View File
@@ -215,7 +215,7 @@
#define GPIO_UART4_RX GPIO_UART4_RX_1
#define GPIO_UART4_TX GPIO_UART4_TX_1
#define GPIO_USART6_RX GPIO_USART6_RX_1
#define GPIO_USART6_RX GPIO_USART6_RX_1 /* RC_INPUT */
#define GPIO_USART6_TX GPIO_USART6_TX_1
#define GPIO_UART7_RX GPIO_UART7_RX_1
@@ -257,9 +257,10 @@
#define GPIO_SPI1_MOSI (GPIO_SPI1_MOSI_1|GPIO_SPEED_50MHz)
#define GPIO_SPI1_SCK (GPIO_SPI1_SCK_1|GPIO_SPEED_50MHz)
#define GPIO_SPI2_MISO (GPIO_SPI2_MISO_1|GPIO_SPEED_50MHz)
#define GPIO_SPI2_MOSI (GPIO_SPI2_MOSI_1|GPIO_SPEED_50MHz)
#define GPIO_SPI2_SCK (GPIO_SPI2_SCK_2|GPIO_SPEED_50MHz)
#define GPIO_SPI2_SCK (GPIO_SPI2_SCK_1|GPIO_SPEED_50MHz)
/************************************************************************************
* Public Data
+2 -2
View File
@@ -552,7 +552,7 @@ CONFIG_UART7_SERIAL_CONSOLE=y
# USART1 Configuration
#
CONFIG_USART1_RXBUFSIZE=600
CONFIG_USART1_TXBUFSIZE=1100
CONFIG_USART1_TXBUFSIZE=2000
CONFIG_USART1_BAUD=115200
CONFIG_USART1_BITS=8
CONFIG_USART1_PARITY=0
@@ -669,7 +669,7 @@ CONFIG_CDCACM_BULKIN_REQLEN=96
CONFIG_CDCACM_RXBUFSIZE=600
CONFIG_CDCACM_TXBUFSIZE=4000
CONFIG_CDCACM_VENDORID=0x26ac
CONFIG_CDCACM_PRODUCTID=0x0011
CONFIG_CDCACM_PRODUCTID=0x0012
CONFIG_CDCACM_VENDORSTR="3D Robotics"
CONFIG_CDCACM_PRODUCTSTR="PX4 FMU v4.x"
# CONFIG_USBMSC is not set
@@ -0,0 +1,62 @@
uorb start
simulator start -s
param load
param set MAV_TYPE 2
param set MC_PITCHRATE_P 0.15
param set MC_PITCH_P 7
param set MC_ROLL_P 7
param set MC_ROLLRATE_P 0.15
param set MC_YAW_P 2.8
param set MC_YAWRATE_P 0.35
param set SYS_AUTOSTART 4010
param set SYS_RESTART_TYPE 2
dataman start
param set CAL_GYRO0_ID 2293768
param set CAL_ACC0_ID 1376264
param set CAL_ACC1_ID 1310728
param set CAL_MAG0_ID 196616
param set CAL_GYRO0_XOFF 0.01
param set CAL_ACC0_XOFF 0.01
param set CAL_ACC0_YOFF -0.01
param set CAL_ACC0_ZOFF 0.01
param set CAL_ACC0_XSCALE 1.01
param set CAL_ACC0_YSCALE 1.01
param set CAL_ACC0_ZSCALE 1.01
param set CAL_ACC1_XOFF 0.01
param set CAL_MAG0_XOFF 0.01
param set MPC_XY_P 0.4
param set MPC_XY_VEL_P 0.2
param set MPC_XY_VEL_D 0.005
param set SENS_BOARD_ROT 0
param set COM_RC_IN_MODE 1
param set NAV_ACC_RAD 2.0
param set RTL_RETURN_ALT 30.0
param set RTL_DESCEND_ALT 10.0
rgbledsim start
tone_alarm start
gyrosim start
accelsim start
barosim start
adcsim start
gpssim start
pwm_out_sim mode_pwm
sleep 1
sensors start
commander start
land_detector start multicopter
navigator start
mc_pos_control start
mc_att_control start
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/quad_x.main.mix
mavlink start -u 14556 -r 2000000
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
mavlink stream -r 80 -s LOCAL_POSITION_NED -u 14556
mavlink stream -r 80 -s GLOBAL_POSITION_INT -u 14556
mavlink stream -r 80 -s ATTITUDE -u 14556
mavlink stream -r 80 -s ATTITUDE_TARGET -u 14556
mavlink stream -r 20 -s RC_CHANNELS -u 14556
mavlink stream -r 250 -s HIGHRES_IMU -u 14556
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u 14556
mavlink boot_complete
sdlog2 start -r 100 -e -t -a
ekf2 start
+1
View File
@@ -50,6 +50,7 @@ mc_pos_control start
mc_att_control start
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/quad_w.main.mix
mavlink start -u 14556 -r 2000000
mavlink start -u 14557 -r 2000000 -m onboard
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
mavlink stream -r 80 -s LOCAL_POSITION_NED -u 14556
mavlink stream -r 80 -s GLOBAL_POSITION_INT -u 14556
@@ -0,0 +1,66 @@
uorb start
simulator start -s
param load
param set MAV_TYPE 20
param set MC_PITCHRATE_P 0.3
param set MC_ROLLRATE_P 0.3
param set MC_YAW_P 2.0
param set MC_YAWRATE_P 0.35
param set VT_TYPE 2
param set SYS_AUTOSTART 4010
param set SYS_RESTART_TYPE 2
dataman start
param set CAL_GYRO0_ID 2293768
param set CAL_ACC0_ID 1376264
param set CAL_ACC1_ID 1310728
param set CAL_MAG0_ID 196616
param set CAL_GYRO0_XOFF 0.01
param set CAL_ACC0_XOFF 0.01
param set CAL_ACC0_YOFF -0.01
param set CAL_ACC0_ZOFF 0.01
param set CAL_ACC0_XSCALE 1.01
param set CAL_ACC0_YSCALE 1.01
param set CAL_ACC0_ZSCALE 1.01
param set CAL_ACC1_XOFF 0.01
param set CAL_MAG0_XOFF 0.01
param set MPC_XY_P 0.15
param set MPC_XY_VEL_P 0.05
param set MPC_XY_VEL_D 0.005
param set MPC_XY_FF 0.1
param set MPC_Z_VEL_MAX 1.0
param set SENS_BOARD_ROT 8
param set COM_RC_IN_MODE 1
rgbledsim start
tone_alarm start
gyrosim start
accelsim start
barosim start
adcsim start
gpssim start
measairspeedsim start
pwm_out_sim mode_pwm
sleep 1
sensors start
commander start
land_detector start multicopter
navigator start
attitude_estimator_q start
position_estimator_inav start
vtol_att_control start
mc_pos_control start
mc_att_control start
fw_pos_control_l1 start
fw_att_control start
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/standard_vtol_sitl.main.mix
mavlink start -u 14556 -r 2000000
mavlink start -u 14557 -r 2000000 -m onboard
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
mavlink stream -r 80 -s LOCAL_POSITION_NED -u 14556
mavlink stream -r 80 -s GLOBAL_POSITION_INT -u 14556
mavlink stream -r 80 -s ATTITUDE -u 14556
mavlink stream -r 80 -s ATTITUDE_TARGET -u 14556
mavlink stream -r 20 -s RC_CHANNELS -u 14556
mavlink stream -r 250 -s HIGHRES_IMU -u 14556
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u 14556
mavlink boot_complete
sdlog2 start -r 200 -e -t -a
@@ -27,6 +27,7 @@ param set MPC_XY_P 0.15
param set MPC_XY_VEL_P 0.05
param set MPC_XY_VEL_D 0.005
param set MPC_XY_FF 0.1
param set MPC_Z_VEL_MAX 1.0
param set SENS_BOARD_ROT 8
param set COM_RC_IN_MODE 1
rgbledsim start
@@ -52,6 +53,7 @@ fw_pos_control_l1 start
fw_att_control start
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/quad_x_vtol.main.mix
mavlink start -u 14556 -r 2000000
mavlink start -u 14557 -r 2000000 -m onboard
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
mavlink stream -r 80 -s LOCAL_POSITION_NED -u 14556
mavlink stream -r 80 -s GLOBAL_POSITION_INT -u 14556
@@ -61,4 +63,4 @@ mavlink stream -r 20 -s RC_CHANNELS -u 14556
mavlink stream -r 250 -s HIGHRES_IMU -u 14556
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u 14556
mavlink boot_complete
sdlog2 start -r 100 -e -t -a
sdlog2 start -r 200 -e -t -a
+8
View File
@@ -32,6 +32,12 @@ param set COM_RC_IN_MODE 1
param set NAV_ACC_RAD 2.0
param set RTL_RETURN_ALT 30.0
param set RTL_DESCEND_ALT 10.0
param set MIS_TAKEOFF_ALT 5.0
param set MPC_HOLD_MAX_Z 2.0
param set MPC_HOLD_XY_DZ 0.1
param set MPC_HOLD_Z_DZ 0.1
param set MPC_Z_VEL_MAX 2.0
param set MPC_Z_VEL_P 0.4
rgbledsim start
tone_alarm start
gyrosim start
@@ -51,6 +57,7 @@ mc_pos_control start
mc_att_control start
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/quad_x.main.mix
mavlink start -u 14556 -r 2000000
mavlink start -u 14557 -r 2000000 -m onboard
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
mavlink stream -r 80 -s LOCAL_POSITION_NED -u 14556
mavlink stream -r 80 -s GLOBAL_POSITION_INT -u 14556
@@ -59,5 +66,6 @@ mavlink stream -r 80 -s ATTITUDE_TARGET -u 14556
mavlink stream -r 20 -s RC_CHANNELS -u 14556
mavlink stream -r 250 -s HIGHRES_IMU -u 14556
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u 14556
mavlink stream -r 20 -s MANUAL_CONTROL -u 14556
mavlink boot_complete
sdlog2 start -r 100 -e -t -a
@@ -150,6 +150,7 @@ __BEGIN_DECLS
#define GPIO_TIM3_CH2OUT GPIO_TIM3_CH2OUT_3
#define GPIO_TIM3_CH3OUT GPIO_TIM3_CH3OUT_2
#define GPIO_TIM3_CH4OUT GPIO_TIM3_CH4OUT_2
#define DIRECT_PWM_OUTPUT_CHANNELS 8
/* High-resolution timer */
#define HRT_TIMER 8 /* use timer 8 for the HRT */
@@ -129,18 +129,6 @@ stm32_boardinitialize(void)
#include <math.h>
#ifdef __cplusplus
__EXPORT int matherr(struct __exception *e)
{
return 1;
}
#else
__EXPORT int matherr(struct exception *e)
{
return 1;
}
#endif
__EXPORT int nsh_archinitialize(void)
{
@@ -182,6 +182,7 @@ __BEGIN_DECLS
#define GPIO_TIM2_CH2OUT GPIO_TIM2_CH2OUT_1
#define GPIO_TIM2_CH3OUT GPIO_TIM2_CH3OUT_1
#define GPIO_TIM2_CH4OUT GPIO_TIM2_CH4OUT_1
#define DIRECT_PWM_OUTPUT_CHANNELS 4
/* USB OTG FS
*
@@ -115,6 +115,7 @@ __BEGIN_DECLS
#define PX4_SPI_BUS_SENSORS 1
#define PX4_SPI_BUS_RAMTRON 2
#define PX4_SPI_BUS_EXT 4
#define PX4_SPI_BUS_BARO PX4_SPI_BUS_SENSORS
/* Use these in place of the spi_dev_e enumeration to select a specific SPI device on SPI1 */
#define PX4_SPIDEV_GYRO 1
@@ -210,6 +211,7 @@ __BEGIN_DECLS
#define GPIO_TIM1_CH4OUT GPIO_TIM1_CH4OUT_2
#define GPIO_TIM4_CH2OUT GPIO_TIM4_CH2OUT_2
#define GPIO_TIM4_CH3OUT GPIO_TIM4_CH3OUT_2
#define DIRECT_PWM_OUTPUT_CHANNELS 6
/* USB OTG FS
*
+33 -7
View File
@@ -65,7 +65,7 @@ __BEGIN_DECLS
//{0, GPIO_PERIPH_3V3_EN, 0}, Owned by the 8266 driver
//{0, GPIO_SBUS_INV, 0}, https://github.com/PX4/Firmware/blob/master/src/modules/px4iofirmware/sbus.c
//{GPIO_8266_GPIO0, 0, 0}, Owned by the 8266 driver
//{0, GPIO_SPEKTRUM_POWER, 0}, Owned Spektum driver input to auto pilot
//{0, GPIO_SPEKTRUM_PWR_EN, 0}, Owned Spektum driver input to auto pilot
//{0, GPIO_8266_PD, 0}, Owned by the 8266 driver
//{0, GPIO_8266_RST, 0}, Owned by the 8266 driver
@@ -73,7 +73,7 @@ __BEGIN_DECLS
/* LEDs */
#define GPIO_LED1 (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN11)
#define GPIO_LED2 (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN10)
#define GPIO_LED2 (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN1)
#define GPIO_LED3 (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN3)
#define GPIO_LED_RED GPIO_LED1
@@ -120,15 +120,24 @@ __BEGIN_DECLS
#define PX4_SPI_BUS_SENSORS 1
#define PX4_SPI_BUS_RAMTRON 2
#define PX4_SPI_BUS_BARO PX4_SPI_BUS_RAMTRON
/* Use these in place of the spi_dev_e enumeration to select a specific SPI device on SPI1 */
#define PX4_SPIDEV_GYRO 1
#define PX4_SPIDEV_ACCEL_MAG 2
#define PX4_SPIDEV_BARO 3
#define PX4_SPIDEV_MPU 4
#define PX4_SPIDEV_HMC 5
#define PX4_SPIDEV_ICM 6
/* onboard MS5611 and FRAM are both on bus SPI2
* spi_dev_e:SPIDEV_FLASH has the value 2 and is used in the NuttX ramtron driver
* use 3 for the barometer to differentiate
*/
#define PX4_SPIDEV_BARO 3
#if (PX4_SPIDEV_BARO == SPIDEV_FLASH)
#error PX4_SPIDEV_BARO must not be equal to SPIDEV_FLASH as they share the same bus
#endif
/* I2C busses */
#define PX4_I2C_BUS_EXPANSION 1
#define PX4_I2C_BUS_LED PX4_I2C_BUS_EXPANSION
@@ -200,6 +209,7 @@ __BEGIN_DECLS
#define GPIO_TIM1_CH4OUT GPIO_TIM1_CH4OUT_2
#define GPIO_TIM4_CH2OUT GPIO_TIM4_CH2OUT_2
#define GPIO_TIM4_CH3OUT GPIO_TIM4_CH3OUT_2
#define DIRECT_PWM_OUTPUT_CHANNELS 6
/* USB OTG FS
*
@@ -214,7 +224,7 @@ __BEGIN_DECLS
#define HRT_PPM_CHANNEL 3 /* use capture/compare channel 2 */
#define GPIO_PPM_IN (GPIO_ALT|GPIO_AF2|GPIO_PULLUP|GPIO_PORTB|GPIO_PIN0)
#define SBUS_SERIAL_PORT "/dev/ttyS4"
#define RC_SERIAL_PORT "/dev/ttyS4"
/* PWM input driver. Use FMU AUX5 pins attached to timer4 channel 2 */
#define PWMIN_TIMER 4
@@ -223,15 +233,31 @@ __BEGIN_DECLS
#define GPIO_RSSI_IN (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTC|GPIO_PIN1)
#define GPIO_LED_SAFETY (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN3)
#define GPIO_SAFETY_SWITCH_IN (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTC|GPIO_PIN4)
#define GPIO_BTN_SAFETY (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTC|GPIO_PIN4)
#define GPIO_PERIPH_3V3_EN (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTC|GPIO_PIN5)
#define GPIO_SBUS_INV (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN13)
/* for R07, this signal is active low */
//#define GPIO_SBUS_INV (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN13)
//#define INVERT_RC_INPUT(_s) stm32_gpiowrite(GPIO_SBUS_INV, 1-_s);
/* for R12, this signal is active high */
#define GPIO_SBUS_INV (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTC|GPIO_PIN13)
#define INVERT_RC_INPUT(_s) stm32_gpiowrite(GPIO_SBUS_INV, _s);
#define GPIO_8266_GPIO0 (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTE|GPIO_PIN2)
#define GPIO_SPEKTRUM_POWER (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTE|GPIO_PIN4)
#define GPIO_SPEKTRUM_PWR_EN (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTE|GPIO_PIN4)
#define GPIO_8266_PD (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTE|GPIO_PIN5)
#define GPIO_8266_RST (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTE|GPIO_PIN6)
/* Power switch controls ******************************************************/
#define POWER_SPEKTRUM(_s) stm32_gpiowrite(GPIO_SPEKTRUM_PWR_EN, (1-_s))
//#define GPIO_USART1_RX_SPEKTRUM (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTC|GPIO_PIN7)
#define SPEKTRUM_RX_AS_UART() stm32_configgpio(GPIO_USART1_RX)
// FMUv4 has a separate GPIO for serial RC output
#define GPIO_RC_OUT (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN6)
#define SPEKTRUM_RX_AS_GPIO() stm32_configgpio(GPIO_RC_OUT)
#define SPEKTRUM_RX_HIGH(_s) stm32_gpiowrite(GPIO_RC_OUT, (_s))
/****************************************************************************************************
* Public Types
****************************************************************************************************/
+10 -5
View File
@@ -230,9 +230,13 @@ __EXPORT int nsh_archinitialize(void)
stm32_configgpio(GPIO_SBUS_INV);
stm32_configgpio(GPIO_8266_GPIO0);
stm32_configgpio(GPIO_SPEKTRUM_POWER);
stm32_configgpio(GPIO_SPEKTRUM_PWR_EN);
stm32_configgpio(GPIO_8266_PD);
stm32_configgpio(GPIO_8266_RST);
#ifdef GPIO_RC_OUT
stm32_configgpio(GPIO_RC_OUT); /* Serial RC output pin */
stm32_gpiowrite(GPIO_RC_OUT, 1); /* set it high to pull RC input up */
#endif
/* configure the high-resolution time/callout interface */
hrt_init();
@@ -284,7 +288,6 @@ __EXPORT int nsh_archinitialize(void)
SPI_SETMODE(spi1, SPIDEV_MODE3);
SPI_SELECT(spi1, PX4_SPIDEV_GYRO, false);
SPI_SELECT(spi1, PX4_SPIDEV_HMC, false);
SPI_SELECT(spi1, PX4_SPIDEV_BARO, false);
SPI_SELECT(spi1, PX4_SPIDEV_MPU, false);
up_udelay(20);
@@ -298,14 +301,16 @@ __EXPORT int nsh_archinitialize(void)
return -ENODEV;
}
/* Default SPI2 to 37.5 MHz (40 MHz rounded to nearest valid divider, F4 max)
* and de-assert the known chip selects. */
/* Default SPI2 to 12MHz and de-assert the known chip selects.
* MS5611 has max SPI clock speed of 20MHz
*/
// XXX start with 10.4 MHz in FRAM usage and go up to 37.5 once validated
// XXX start with 10.4 MHz and go up to 20 once validated
SPI_SETFREQUENCY(spi2, 12 * 1000 * 1000);
SPI_SETBITS(spi2, 8);
SPI_SETMODE(spi2, SPIDEV_MODE3);
SPI_SELECT(spi2, SPIDEV_FLASH, false);
SPI_SELECT(spi2, PX4_SPIDEV_BARO, false);
#ifdef CONFIG_MMCSD
/* First, get an instance of the SDIO interface */
+18 -2
View File
@@ -151,8 +151,24 @@ __EXPORT uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devi
#ifdef CONFIG_STM32_SPI2
__EXPORT void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
{
/* there can only be one device on this bus, so always select it */
stm32_gpiowrite(GPIO_SPI_CS_FRAM, !selected);
/* SPI select is active low, so write !selected to select the device */
switch (devid) {
case SPIDEV_FLASH:
/* Making sure the other peripherals are not selected */
stm32_gpiowrite(GPIO_SPI_CS_MS5611, 1);
stm32_gpiowrite(GPIO_SPI_CS_FRAM, !selected);
break;
case PX4_SPIDEV_BARO:
/* Making sure the other peripherals are not selected */
stm32_gpiowrite(GPIO_SPI_CS_FRAM, 1);
stm32_gpiowrite(GPIO_SPI_CS_MS5611, !selected);
break;
default:
break;
}
}
__EXPORT uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
@@ -83,6 +83,13 @@
#define GPIO_RELAY1_EN (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTA|GPIO_PIN12)
#define GPIO_RELAY2_EN (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTA|GPIO_PIN11)
#define GPIO_SPEKTRUM_PWR_EN GPIO_RELAY1_EN
#define POWER_SPEKTRUM(_s) stm32_gpiowrite(GPIO_RELAY1_EN, (_s))
#define SPEKTRUM_RX_HIGH(_s) stm32_gpiowrite(GPIO_USART1_RX_SPEKTRUM, (_s))
#define SPEKTRUM_RX_AS_UART() stm32_configgpio(GPIO_USART1_RX)
#define SPEKTRUM_RX_AS_GPIO() stm32_configgpio(GPIO_USART1_RX_SPEKTRUM)
/* Analog inputs ********************************************************************/
#define GPIO_ADC_VBATT (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN4)
+6 -1
View File
@@ -79,7 +79,7 @@
#define GPIO_LED3 (GPIO_OUTPUT|GPIO_CNF_OUTOD|GPIO_MODE_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN13)
#define GPIO_LED4 (GPIO_OUTPUT|GPIO_CNF_OUTOD|GPIO_MODE_50MHz|GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN11)
#define GPIO_USART1_RX_SPEKTRUM (GPIO_OUTPUT | GPIO_CNF_OUTPP | GPIO_MODE_50MHz | GPIO_OUTPUT_SET | GPIO_PORTA | GPIO_PIN10)
#define GPIO_USART1_RX_SPEKTRUM (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN10)
/* Safety switch button *******************************************************/
@@ -88,6 +88,11 @@
/* Power switch controls ******************************************************/
#define GPIO_SPEKTRUM_PWR_EN (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|GPIO_OUTPUT_SET|GPIO_PORTC|GPIO_PIN13)
#define POWER_SPEKTRUM(_s) stm32_gpiowrite(GPIO_SPEKTRUM_PWR_EN, (_s))
#define SPEKTRUM_RX_HIGH(_s) stm32_gpiowrite(GPIO_USART1_RX_SPEKTRUM, (_s))
#define SPEKTRUM_RX_AS_UART() stm32_configgpio(GPIO_USART1_RX)
#define SPEKTRUM_RX_AS_GPIO() stm32_configgpio(GPIO_USART1_RX_SPEKTRUM)
#define GPIO_SERVO_FAULT_DETECT (GPIO_INPUT|GPIO_CNF_INPULLUP|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN15)
@@ -34,7 +34,7 @@
/**
* @file camera_trigger.cpp
*
* External camera-IMU synchronisation and triggering via FMU auxillary pins.
* External camera-IMU synchronisation and triggering via FMU auxiliary pins.
*
* @author Mohammed Kabir <mhkabir98@gmail.com>
*/
@@ -79,6 +79,8 @@ PARAM_DEFINE_FLOAT(TRIG_ACT_TIME, 0.5f);
*
* 0 disables the trigger, 1 sets it to enabled on command, 2 always on
*
* @reboot_required true
*
* @min 0
* @max 2
* @group Camera trigger
+21 -2
View File
@@ -56,7 +56,7 @@ pthread_mutex_t filemutex = PTHREAD_MUTEX_INITIALIZER;
extern "C" {
#define PX4_MAX_FD 200
#define PX4_MAX_FD 300
static device::file_t *filemap[PX4_MAX_FD] = {};
int px4_errno;
@@ -124,7 +124,22 @@ extern "C" {
ret = dev->open(filemap[i]);
} else {
PX4_WARN("exceeded maximum number of file descriptors!");
const unsigned NAMELEN = 32;
char thread_name[NAMELEN] = {};
#ifndef __PX4_QURT
int nret = pthread_getname_np(pthread_self(), thread_name, NAMELEN);
if (nret || thread_name[0] == 0) {
PX4_WARN("failed getting thread name");
}
PX4_BACKTRACE();
#endif
PX4_WARN("%s: exceeded maximum number of file descriptors, accessing %s",
thread_name, path);
ret = -ENOENT;
}
@@ -245,12 +260,16 @@ extern "C" {
const unsigned NAMELEN = 32;
char thread_name[NAMELEN] = {};
#ifndef __PX4_QURT
int nret = pthread_getname_np(pthread_self(), thread_name, NAMELEN);
if (nret || thread_name[0] == 0) {
PX4_WARN("failed getting thread name");
}
#endif
PX4_DEBUG("Called px4_poll timeout = %d", timeout);
px4_sem_init(&sem, 0, 0);
+1 -1
View File
@@ -81,7 +81,7 @@ __BEGIN_DECLS
/**
* Default value for a shutdown motor
*/
#define PWM_MOTOR_OFF 800
#define PWM_MOTOR_OFF 900
/**
* Default minimum PWM in us
+2 -2
View File
@@ -55,11 +55,11 @@
PARAM_DEFINE_INT32(GMB_USE_MNT, 0);
/**
* Auxilary switch to set mount operation mode.
* Auxiliary switch to set mount operation mode.
*
* Set to 0 to disable manual mode control.
*
* If set to an auxilary switch:
* If set to an auxiliary switch:
* Switch off means the gimbal is put into safe/locked position.
* Switch on means the gimbal can move freely, and landing gear
* will be retracted if applicable.
+1 -1
View File
@@ -72,7 +72,7 @@ typedef struct {
uint32_t msl_altitude; ///< MSL altitude in meters * 10^2
uint32_t ground_speed; ///< velocity in m/s
int32_t heading; ///< heading in degrees * 10^2
uint8_t satellites; ///< number of sattelites used
uint8_t satellites; ///< number of satellites used
uint8_t fix_type; ///< fix type: XXX correct for that
uint32_t date;
uint32_t utc_time;
+2 -2
View File
@@ -44,8 +44,8 @@
* @author Hannes Delago
* (rework, add ubx7+ compatibility)
*
* @see http://www.u-blox.com/images/downloads/Product_Docs/u-blox6_ReceiverDescriptionProtocolSpec_%28GPS.G6-SW-10018%29.pdf
* @see http://www.u-blox.com/images/downloads/Product_Docs/u-bloxM8_ReceiverDescriptionProtocolSpec_%28UBX-13003221%29_Public.pdf
* @see https://www2.u-blox.com/images/downloads/Product_Docs/u-blox6-GPS-GLONASS-QZSS-V14_ReceiverDescriptionProtocolSpec_Public_(GPS.G6-SW-12013).pdf
* @see https://www.u-blox.com/sites/default/files/products/documents/u-bloxM8_ReceiverDescrProtSpec_%28UBX-13003221%29_Public.pdf
*/
#include <assert.h>
@@ -182,7 +182,7 @@ hott_sensors_thread_main(int argc, char *argv[])
recv_data(uart, &buffer[0], &size, &id);
// Determine which moduel sent it and process accordingly.
// Determine which module sent it and process accordingly.
if (id == GAM_SENSOR_ID) {
publish_gam_message(buffer);
+1 -1
View File
@@ -291,7 +291,7 @@ build_gps_response(uint8_t *buffer, size_t *size)
msg.altitude_L = (uint8_t)alt & 0xff;
msg.altitude_H = (uint8_t)(alt >> 8) & 0xff;
/* Get any (and probably only ever one) _home_sub postion report */
/* Get any (and probably only ever one) _home_sub position report */
bool updated;
orb_check(_home_sub, &updated);
+1 -1
View File
@@ -211,7 +211,7 @@ struct gps_module_msg {
uint8_t resolution_L; /**< 48 = Low Byte m/s resolution 0.01m 48 = 30000 = 0.00m/s (1=0.01m/s) */
uint8_t resolution_H; /**< 117 = High Byte m/s resolution 0.01m */
uint8_t unknown1; /**< 120 = 0m/3s */
uint8_t gps_num_sat; /**< GPS.Satellites (number of satelites) (1 byte) */
uint8_t gps_num_sat; /**< GPS.Satellites (number of satellites) (1 byte) */
uint8_t gps_fix_char; /**< GPS.FixChar. (GPS fix character. display, if DGPS, 2D oder 3D) (1 byte) */
uint8_t home_direction; /**< HomeDirection (direction from starting point to Model position) (1 byte) */
uint8_t angle_x_direction; /**< angle x-direction (1 byte) */
+1 -1
View File
@@ -265,7 +265,7 @@ MS5611_I2C::_read_prom()
/* check if all bytes are zero */
if (i == 0) {
/* initalize to first byte read */
/* initialize to first byte read */
last_val = prom_buf[0];
}
+1 -1
View File
@@ -829,7 +829,7 @@ struct ms5611_bus_option {
{ MS5611_BUS_SPI_EXTERNAL, "/dev/ms5611_spi_ext", &MS5611_spi_interface, PX4_SPI_BUS_EXT, NULL },
#endif
#ifdef PX4_SPIDEV_BARO
{ MS5611_BUS_SPI_INTERNAL, "/dev/ms5611_spi_int", &MS5611_spi_interface, PX4_SPI_BUS_SENSORS, NULL },
{ MS5611_BUS_SPI_INTERNAL, "/dev/ms5611_spi_int", &MS5611_spi_interface, PX4_SPI_BUS_BARO, NULL },
#endif
#ifdef PX4_I2C_BUS_ONBOARD
{ MS5611_BUS_I2C_INTERNAL, "/dev/ms5611_int", &MS5611_i2c_interface, PX4_I2C_BUS_ONBOARD, NULL },
+1 -1
View File
@@ -536,7 +536,7 @@ void PWMIN::print_info(void)
/*
* Handle the interupt, gathering pulse data
* Handle the interrupt, gathering pulse data
*/
static int pwmin_tim_isr(int irq, void *context)
{
+2 -2
View File
@@ -502,8 +502,8 @@ PWMSim::task_main()
PX4_ISFINITE(outputs.output[i]) &&
outputs.output[i] >= -1.0f &&
outputs.output[i] <= 1.0f) {
/* scale for PWM output 900 - 2100us */
outputs.output[i] = 1500 + (600 * outputs.output[i]);
/* scale for PWM output 1000 - 2000us */
outputs.output[i] = 1500 + (500 * outputs.output[i]);
} else {
/*
+369 -95
View File
@@ -90,12 +90,8 @@
# include <systemlib/ppm_decode.h>
#endif
/*
* This is the analog to FMU_INPUT_DROP_LIMIT_US on the IO side
*/
#define CONTROL_INPUT_DROP_LIMIT_US 2000
#define NAN_VALUE (0.0f/0.0f)
#define SCHEDULE_INTERVAL 2000 /**< The schedule interval in usec (500 Hz) */
#define NAN_VALUE (0.0f/0.0f) /**< NaN value for throttle lock mode */
class PX4FMU : public device::CDev
{
@@ -123,15 +119,28 @@ public:
int set_i2c_bus_clock(unsigned bus, unsigned clock_hz);
private:
#if defined(CONFIG_ARCH_BOARD_PX4FMU_V1)
static const unsigned _max_actuators = 4;
#endif
#if defined(CONFIG_ARCH_BOARD_PX4FMU_V2) || defined(CONFIG_ARCH_BOARD_PX4FMU_V4)
static const unsigned _max_actuators = 6;
#endif
#if defined(CONFIG_ARCH_BOARD_AEROCORE)
static const unsigned _max_actuators = 8;
#endif
enum RC_SCAN {
RC_SCAN_PPM = 0,
RC_SCAN_SBUS,
RC_SCAN_DSM,
RC_SCAN_SUMD,
RC_SCAN_ST24
};
enum RC_SCAN _rc_scan_state = RC_SCAN_SBUS;
char const *RC_SCAN_STRING[5] = {
"PPM",
"SBUS",
"DSM",
"SUMD",
"ST24"
};
hrt_abstime _rc_scan_begin = 0;
bool _rc_scan_locked = false;
bool _report_lock = true;
static const unsigned _max_actuators = DIRECT_PWM_OUTPUT_CHANNELS;
Mode _mode;
unsigned _pwm_default_rate;
@@ -146,11 +155,11 @@ private:
orb_advert_t _outputs_pub;
unsigned _num_outputs;
int _class_instance;
int _sbus_fd;
int _dsm_fd;
int _rcs_fd;
uint8_t _rcs_buf[SBUS_FRAME_SIZE];
volatile bool _initialized;
bool _servo_armed;
bool _throttle_armed;
bool _pwm_on;
MixerGroup *_mixers;
@@ -189,7 +198,7 @@ private:
int set_pwm_rate(unsigned rate_map, unsigned default_rate, unsigned alt_rate);
int pwm_ioctl(file *filp, int cmd, unsigned long arg);
void update_pwm_rev_mask();
void publish_pwm_outputs(uint16_t *values, size_t numvalues);
void publish_pwm_outputs(uint16_t *values, size_t numvalues);
struct GPIOConfig {
uint32_t input;
@@ -211,6 +220,14 @@ private:
/* do not allow to copy due to ptr data members */
PX4FMU(const PX4FMU &);
PX4FMU operator=(const PX4FMU &);
void fill_rc_in(uint16_t raw_rc_count,
uint16_t raw_rc_values[input_rc_s::RC_INPUT_MAX_CHANNELS],
hrt_abstime now, bool frame_drop, bool failsafe,
unsigned frame_drops, int rssi);
void dsm_bind_ioctl(int dsmMode);
void set_rc_scan_state(RC_SCAN _rc_scan_state);
void rc_io_invert();
void rc_io_invert(bool invert);
};
const PX4FMU::GPIOConfig PX4FMU::_gpio_tab[] = {
@@ -292,10 +309,9 @@ PX4FMU::PX4FMU() :
_outputs_pub(nullptr),
_num_outputs(0),
_class_instance(0),
_sbus_fd(-1),
_dsm_fd(-1),
_rcs_fd(-1),
_initialized(false),
_servo_armed(false),
_throttle_armed(false),
_pwm_on(false),
_mixers(nullptr),
_groups_required(0),
@@ -321,11 +337,9 @@ PX4FMU::PX4FMU() :
memset(_controls, 0, sizeof(_controls));
memset(_poll_fds, 0, sizeof(_poll_fds));
#ifdef HRT_PPM_CHANNEL
// rc input, published to ORB
memset(&_rc_in, 0, sizeof(_rc_in));
_rc_in.input_source = input_rc_s::RC_INPUT_SOURCE_PX4FMU_PPM;
#endif
#ifdef GPIO_SBUS_INV
// this board has a GPIO to control SBUS inversion
@@ -627,6 +641,56 @@ PX4FMU::cycle_trampoline(void *arg)
dev->cycle();
}
void PX4FMU::fill_rc_in(uint16_t raw_rc_count,
uint16_t raw_rc_values[input_rc_s::RC_INPUT_MAX_CHANNELS],
hrt_abstime now, bool frame_drop, bool failsafe,
unsigned frame_drops, int rssi = -1)
{
// fill rc_in struct for publishing
_rc_in.channel_count = raw_rc_count;
if (_rc_in.channel_count > input_rc_s::RC_INPUT_MAX_CHANNELS) {
_rc_in.channel_count = input_rc_s::RC_INPUT_MAX_CHANNELS;
}
for (uint8_t i = 0; i < _rc_in.channel_count; i++) {
_rc_in.values[i] = raw_rc_values[i];
}
_rc_in.timestamp_publication = now;
_rc_in.timestamp_last_signal = _rc_in.timestamp_publication;
_rc_in.rc_ppm_frame_length = 0;
if (rssi == -1) {
_rc_in.rssi =
(!frame_drop) ? RC_INPUT_RSSI_MAX : (RC_INPUT_RSSI_MAX / 2);
}
_rc_in.rc_failsafe = failsafe;
_rc_in.rc_lost = false;
_rc_in.rc_lost_frame_count = frame_drops;
_rc_in.rc_total_frame_count = 0;
}
#ifdef RC_SERIAL_PORT
void PX4FMU::set_rc_scan_state(RC_SCAN newState)
{
// warnx("RCscan: %s failed, trying %s", PX4FMU::RC_SCAN_STRING[_rc_scan_state], PX4FMU::RC_SCAN_STRING[newState]);
_rc_scan_begin = 0;
_rc_scan_state = newState;
}
void PX4FMU::rc_io_invert(bool invert)
{
INVERT_RC_INPUT(invert);
if (!invert) {
// set FMU_RC_OUTPUT high to pull RC_INPUT up
stm32_gpiowrite(GPIO_RC_OUT, 1);
}
}
#endif
void
PX4FMU::cycle()
{
@@ -645,19 +709,18 @@ PX4FMU::cycle()
update_pwm_rev_mask();
#ifdef SBUS_SERIAL_PORT
_sbus_fd = sbus_init(SBUS_SERIAL_PORT, true);
#endif
#ifdef DSM_SERIAL_PORT
// XXX rather than opening it we need to cycle between protocols until one is locked in
//_dsm_fd = dsm_init(DSM_SERIAL_PORT);
#ifdef RC_SERIAL_PORT
// dsm_init sets some file static variables and returns a file descriptor
_rcs_fd = dsm_init(RC_SERIAL_PORT);
// assume SBUS input
sbus_config(_rcs_fd, false);
// disable CPPM input by mapping it away from the timer capture input
stm32_configgpio(GPIO_PPM_IN & ~(GPIO_AF_MASK | GPIO_PUPD_MASK));
#endif
_initialized = true;
}
if (_groups_subscribed != _groups_required) {
subscribe();
_groups_subscribed = _groups_required;
@@ -728,8 +791,8 @@ PX4FMU::cycle()
//main_out_latency = hrt_absolute_time() - _controls[i].timestamp - 250;
/* do only correct within the current phase */
if (abs(main_out_latency) > CONTROL_INPUT_DROP_LIMIT_US) {
main_out_latency = CONTROL_INPUT_DROP_LIMIT_US;
if (abs(main_out_latency) > SCHEDULE_INTERVAL) {
main_out_latency = SCHEDULE_INTERVAL;
}
if (main_out_latency < 250) {
@@ -783,7 +846,7 @@ PX4FMU::cycle()
uint16_t pwm_limited[_max_actuators];
/* the PWM limit call takes care of out of band errors, NaN and constrains */
pwm_limit_calc(_servo_armed, arm_nothrottle(), num_outputs, _reverse_pwm_mask, _disarmed_pwm, _min_pwm, _max_pwm,
pwm_limit_calc(_throttle_armed, arm_nothrottle(), num_outputs, _reverse_pwm_mask, _disarmed_pwm, _min_pwm, _max_pwm,
outputs, pwm_limited, &_pwm_limit);
/* output to the servos */
@@ -803,14 +866,10 @@ PX4FMU::cycle()
orb_copy(ORB_ID(actuator_armed), _armed_sub, &_armed);
/* update the armed status and check that we're not locked down */
bool set_armed = (_armed.armed || _armed.prearmed) && !_armed.lockdown;
if (_servo_armed != set_armed) {
_servo_armed = set_armed;
}
_throttle_armed = _armed.armed && !_armed.lockdown;
/* update PWM status if armed or if disarmed PWM values are set */
bool pwm_on = (set_armed || _num_disarmed_set > 0);
bool pwm_on = (_armed.armed || _num_disarmed_set > 0);
if (_pwm_on != pwm_on) {
_pwm_on = pwm_on;
@@ -825,74 +884,237 @@ PX4FMU::cycle()
orb_copy(ORB_ID(parameter_update), _param_sub, &pupdate);
update_pwm_rev_mask();
int32_t dsm_bind_val;
param_t dsm_bind_param;
/* see if bind parameter has been set, and reset it to -1 */
param_get(dsm_bind_param = param_find("RC_DSM_BIND"), &dsm_bind_val);
if (dsm_bind_val > -1) {
dsm_bind_ioctl(dsm_bind_val);
dsm_bind_val = -1;
param_set(dsm_bind_param, &dsm_bind_val);
}
}
bool rc_updated = false;
#ifdef SBUS_SERIAL_PORT
#ifdef RC_SERIAL_PORT
// This block scans for a supported serial RC input and locks onto the first one found
// Scan for 100 msec, then switch protocol
constexpr hrt_abstime rc_scan_max = 100 * 1000;
bool sbus_failsafe, sbus_frame_drop;
uint16_t raw_rc_values[input_rc_s::RC_INPUT_MAX_CHANNELS];
uint16_t raw_rc_count;
bool sbus_updated = sbus_input(_sbus_fd, &raw_rc_values[0], &raw_rc_count, &sbus_failsafe, &sbus_frame_drop,
input_rc_s::RC_INPUT_MAX_CHANNELS);
unsigned frame_drops;
bool dsm_11_bit;
if (sbus_updated) {
// we have a new PPM frame. Publish it.
_rc_in.channel_count = raw_rc_count;
if (_rc_in.channel_count > input_rc_s::RC_INPUT_MAX_CHANNELS) {
_rc_in.channel_count = input_rc_s::RC_INPUT_MAX_CHANNELS;
}
for (uint8_t i = 0; i < _rc_in.channel_count; i++) {
_rc_in.values[i] = raw_rc_values[i];
}
_rc_in.timestamp_publication = hrt_absolute_time();
_rc_in.timestamp_last_signal = _rc_in.timestamp_publication;
_rc_in.rc_ppm_frame_length = 0;
_rc_in.rssi = (!sbus_frame_drop) ? RC_INPUT_RSSI_MAX : (RC_INPUT_RSSI_MAX / 2);
_rc_in.rc_failsafe = sbus_failsafe;
_rc_in.rc_lost = false;
_rc_in.rc_lost_frame_count = sbus_dropped_frames();
_rc_in.rc_total_frame_count = 0;
rc_updated = true;
if (_report_lock && _rc_scan_locked) {
_report_lock = false;
warnx("RCscan: %s RC input locked", RC_SCAN_STRING[_rc_scan_state]);
}
#endif
// read all available data from the serial RC input UART
hrt_abstime now = hrt_absolute_time();
int newBytes = ::read(_rcs_fd, &_rcs_buf[0], SBUS_FRAME_SIZE);
switch (_rc_scan_state) {
case RC_SCAN_SBUS:
if (_rc_scan_begin == 0) {
_rc_scan_begin = now;
// Configure serial port for SBUS
sbus_config(_rcs_fd, false);
rc_io_invert(true);
} else if (_rc_scan_locked
|| now - _rc_scan_begin < rc_scan_max) {
// parse new data
if (newBytes > 0) {
rc_updated = sbus_parse(now, &_rcs_buf[0], newBytes, &raw_rc_values[0], &raw_rc_count, &sbus_failsafe,
&sbus_frame_drop, &frame_drops, input_rc_s::RC_INPUT_MAX_CHANNELS);
if (rc_updated) {
// we have a new SBUS frame. Publish it.
_rc_in.input_source = input_rc_s::RC_INPUT_SOURCE_PX4FMU_SBUS;
fill_rc_in(raw_rc_count, raw_rc_values, now,
sbus_frame_drop, sbus_failsafe, frame_drops);
_rc_scan_locked = true;
}
}
} else {
// Scan the next protocol
set_rc_scan_state(RC_SCAN_DSM);
}
break;
case RC_SCAN_DSM:
if (_rc_scan_begin == 0) {
_rc_scan_begin = now;
// // Configure serial port for DSM
dsm_config(_rcs_fd);
rc_io_invert(false);
} else if (_rc_scan_locked
|| now - _rc_scan_begin < rc_scan_max) {
if (newBytes > 0) {
// parse new data
rc_updated = dsm_parse(now, &_rcs_buf[0], newBytes, &raw_rc_values[0], &raw_rc_count,
&dsm_11_bit, &frame_drops, input_rc_s::RC_INPUT_MAX_CHANNELS);
if (rc_updated) {
// we have a new DSM frame. Publish it.
_rc_in.input_source = input_rc_s::RC_INPUT_SOURCE_PX4FMU_DSM;
fill_rc_in(raw_rc_count, raw_rc_values, now,
false, false, frame_drops);
_rc_scan_locked = true;
}
}
} else {
// Scan the next protocol
set_rc_scan_state(RC_SCAN_ST24);
}
break;
case RC_SCAN_ST24:
if (_rc_scan_begin == 0) {
_rc_scan_begin = now;
// // Configure serial port for DSM
dsm_config(_rcs_fd);
rc_io_invert(false);
} else if (_rc_scan_locked
|| now - _rc_scan_begin < rc_scan_max) {
if (newBytes > 0) {
// parse new data
uint8_t st24_rssi, rx_count;
rc_updated = false;
for (unsigned i = 0; i < newBytes; i++) {
/* set updated flag if one complete packet was parsed */
st24_rssi = RC_INPUT_RSSI_MAX;
rc_updated = (OK == st24_decode(_rcs_buf[i], &st24_rssi, &rx_count,
&raw_rc_count, raw_rc_values, input_rc_s::RC_INPUT_MAX_CHANNELS));
}
if (rc_updated) {
// we have a new ST24 frame. Publish it.
_rc_in.input_source = input_rc_s::RC_INPUT_SOURCE_PX4FMU_ST24;
fill_rc_in(raw_rc_count, raw_rc_values, now,
false, false, frame_drops, st24_rssi);
_rc_scan_locked = true;
}
}
} else {
// Scan the next protocol
set_rc_scan_state(RC_SCAN_SUMD);
}
break;
case RC_SCAN_SUMD:
if (_rc_scan_begin == 0) {
_rc_scan_begin = now;
// // Configure serial port for DSM
dsm_config(_rcs_fd);
rc_io_invert(false);
} else if (_rc_scan_locked
|| now - _rc_scan_begin < rc_scan_max) {
if (newBytes > 0) {
// parse new data
uint8_t sumd_rssi, rx_count;
rc_updated = false;
for (unsigned i = 0; i < newBytes; i++) {
/* set updated flag if one complete packet was parsed */
sumd_rssi = RC_INPUT_RSSI_MAX;
rc_updated = (OK == sumd_decode(_rcs_buf[i], &sumd_rssi, &rx_count,
&raw_rc_count, raw_rc_values, input_rc_s::RC_INPUT_MAX_CHANNELS));
}
if (rc_updated) {
// we have a new SUMD frame. Publish it.
_rc_in.input_source = input_rc_s::RC_INPUT_SOURCE_PX4FMU_SUMD;
fill_rc_in(raw_rc_count, raw_rc_values, now,
false, false, frame_drops, sumd_rssi);
_rc_scan_locked = true;
}
}
} else {
// Scan the next protocol
set_rc_scan_state(RC_SCAN_SUMD);
}
set_rc_scan_state(RC_SCAN_PPM);
break;
case RC_SCAN_PPM:
// skip PPM if it's not supported
#ifdef HRT_PPM_CHANNEL
if (_rc_scan_begin == 0) {
_rc_scan_begin = now;
// Configure timer input pin for CPPM
stm32_configgpio(GPIO_PPM_IN);
rc_io_invert(false);
} else if (_rc_scan_locked
|| now - _rc_scan_begin < rc_scan_max) {
// see if we have new PPM input data
if ((ppm_last_valid_decode != _rc_in.timestamp_last_signal)
&& ppm_decoded_channels > 3) {
// we have a new PPM frame. Publish it.
rc_updated = true;
_rc_in.input_source = input_rc_s::RC_INPUT_SOURCE_PX4FMU_PPM;
fill_rc_in(ppm_decoded_channels, ppm_buffer, now,
false, false, 0);
_rc_scan_locked = true;
}
} else {
// disable CPPM input by mapping it away from the timer capture input
stm32_configgpio(GPIO_PPM_IN & ~(GPIO_AF_MASK | GPIO_PUPD_MASK));
// Scan the next protocol
set_rc_scan_state(RC_SCAN_SBUS);
}
#else // skip PPM if it's not supported
set_rc_scan_state(RC_SCAN_SBUS);
#endif // HRT_PPM_CHANNEL
break;
}
#else // RC_SERIAL_PORT not defined
#ifdef HRT_PPM_CHANNEL
// see if we have new PPM input data
if ((ppm_last_valid_decode != _rc_in.timestamp_last_signal) &&
ppm_decoded_channels > 3) {
if ((ppm_last_valid_decode != _rc_in.timestamp_last_signal)
&& ppm_decoded_channels > 3) {
// we have a new PPM frame. Publish it.
_rc_in.channel_count = ppm_decoded_channels;
if (_rc_in.channel_count > input_rc_s::RC_INPUT_MAX_CHANNELS) {
_rc_in.channel_count = input_rc_s::RC_INPUT_MAX_CHANNELS;
}
for (uint8_t i = 0; i < _rc_in.channel_count; i++) {
_rc_in.values[i] = ppm_buffer[i];
}
_rc_in.timestamp_publication = ppm_last_valid_decode;
_rc_in.timestamp_last_signal = ppm_last_valid_decode;
_rc_in.rc_ppm_frame_length = ppm_frame_length;
_rc_in.rssi = RC_INPUT_RSSI_MAX;
_rc_in.rc_failsafe = false;
_rc_in.rc_lost = false;
_rc_in.rc_lost_frame_count = 0;
_rc_in.rc_total_frame_count = 0;
rc_updated = true;
fill_rc_in(ppm_decoded_channels, ppm_buffer, hrt_absolute_time(),
false, false, 0);
}
#endif
#endif // HRT_PPM_CHANNEL
#endif // RC_SERIAL_PORT
if (rc_updated) {
/* lazily advertise on first publication */
@@ -905,7 +1127,7 @@ PX4FMU::cycle()
}
work_queue(HPWORK, &_work, (worker_t)&PX4FMU::cycle_trampoline, this,
USEC2TICK(CONTROL_INPUT_DROP_LIMIT_US - main_out_latency));
USEC2TICK(SCHEDULE_INTERVAL - main_out_latency));
}
void PX4FMU::work_stop()
@@ -1381,6 +1603,38 @@ PX4FMU::pwm_ioctl(file *filp, int cmd, unsigned long arg)
break;
}
#ifdef RC_SERIAL_PORT
case DSM_BIND_START:
/* only allow DSM2, DSM-X and DSM-X with more than 7 channels */
warnx("fmu pwm_ioctl: DSM_BIND_START, arg: %lu", arg);
if (arg == DSM2_BIND_PULSES ||
arg == DSMX_BIND_PULSES ||
arg == DSMX8_BIND_PULSES) {
dsm_bind(DSM_CMD_BIND_POWER_DOWN, 0);
usleep(500000);
dsm_bind(DSM_CMD_BIND_SET_RX_OUT, 0);
dsm_bind(DSM_CMD_BIND_POWER_UP, 0);
usleep(72000);
dsm_bind(DSM_CMD_BIND_SEND_PULSES, arg);
usleep(50000);
dsm_bind(DSM_CMD_BIND_REINIT_UART, 0);
ret = OK;
} else {
ret = -EINVAL;
}
break;
#endif
case MIXERIOCRESET:
if (_mixers != nullptr) {
delete _mixers;
@@ -1683,9 +1937,9 @@ PX4FMU::peripheral_reset(int ms)
stm32_gpiowrite(GPIO_PERIPH_3V3_EN, 0);
bool last = stm32_gpioread(GPIO_SPEKTRUM_POWER);
bool last = stm32_gpioread(GPIO_SPEKTRUM_PWR_EN);
/* Keep Spektum on to discharge rail*/
stm32_gpiowrite(GPIO_SPEKTRUM_POWER, 1);
stm32_gpiowrite(GPIO_SPEKTRUM_PWR_EN, 1);
/* wait for the peripheral rail to reach GND */
usleep(ms * 1000);
@@ -1694,7 +1948,7 @@ PX4FMU::peripheral_reset(int ms)
/* re-enable power */
/* switch the peripheral rail back on */
stm32_gpiowrite(GPIO_SPEKTRUM_POWER, last);
stm32_gpiowrite(GPIO_SPEKTRUM_PWR_EN, last);
stm32_gpiowrite(GPIO_PERIPH_3V3_EN, 1);
#endif
}
@@ -1849,6 +2103,26 @@ PX4FMU::gpio_ioctl(struct file *filp, int cmd, unsigned long arg)
return ret;
}
void
PX4FMU::dsm_bind_ioctl(int dsmMode)
{
if (!_armed.armed) {
// mavlink_log_info(_mavlink_fd, "[FMU] binding DSM%s RX", (dsmMode == 0) ? "2" : ((dsmMode == 1) ? "-X" : "-X8"));
warnx("[FMU] binding DSM%s RX", (dsmMode == 0) ? "2" : ((dsmMode == 1) ? "-X" : "-X8"));
int ret = ioctl(nullptr, DSM_BIND_START,
(dsmMode == 0) ? DSM2_BIND_PULSES : ((dsmMode == 1) ? DSMX_BIND_PULSES : DSMX8_BIND_PULSES));
if (ret) {
// mavlink_log_critical(_mavlink_fd, "binding failed.");
warnx("binding failed.");
}
} else {
// mavlink_log_info(_mavlink_fd, "[FMU] system armed, bind request rejected");
warnx("[FMU] system armed, bind request rejected");
}
}
namespace
{
@@ -2242,7 +2516,7 @@ fmu_main(int argc, char *argv[])
}
if (!strcmp(verb, "info")) {
#ifdef SBUS_SERIAL_PORT
#ifdef RC_SERIAL_PORT
warnx("frame drops: %u", sbus_dropped_frames());
#endif
return 0;
+12
View File
@@ -47,6 +47,8 @@
*
* Set to 1 to invert the channel, 0 for default direction.
*
* @reboot_required true
*
* @min 0
* @max 1
* @group PWM Outputs
@@ -58,6 +60,8 @@ PARAM_DEFINE_INT32(PWM_AUX_REV1, 0);
*
* Set to 1 to invert the channel, 0 for default direction.
*
* @reboot_required true
*
* @min 0
* @max 1
* @group PWM Outputs
@@ -69,6 +73,8 @@ PARAM_DEFINE_INT32(PWM_AUX_REV2, 0);
*
* Set to 1 to invert the channel, 0 for default direction.
*
* @reboot_required true
*
* @min 0
* @max 1
* @group PWM Outputs
@@ -80,6 +86,8 @@ PARAM_DEFINE_INT32(PWM_AUX_REV3, 0);
*
* Set to 1 to invert the channel, 0 for default direction.
*
* @reboot_required true
*
* @min 0
* @max 1
* @group PWM Outputs
@@ -91,6 +99,8 @@ PARAM_DEFINE_INT32(PWM_AUX_REV4, 0);
*
* Set to 1 to invert the channel, 0 for default direction.
*
* @reboot_required true
*
* @min 0
* @max 1
* @group PWM Outputs
@@ -102,6 +112,8 @@ PARAM_DEFINE_INT32(PWM_AUX_REV5, 0);
*
* Set to 1 to invert the channel, 0 for default direction.
*
* @reboot_required true
*
* @min 0
* @max 1
* @group PWM Outputs
+16
View File
@@ -47,6 +47,8 @@
*
* Set to 1 to invert the channel, 0 for default direction.
*
* @reboot_required true
*
* @min 0
* @max 1
* @group PWM Outputs
@@ -58,6 +60,8 @@ PARAM_DEFINE_INT32(PWM_MAIN_REV1, 0);
*
* Set to 1 to invert the channel, 0 for default direction.
*
* @reboot_required true
*
* @min 0
* @max 1
* @group PWM Outputs
@@ -69,6 +73,8 @@ PARAM_DEFINE_INT32(PWM_MAIN_REV2, 0);
*
* Set to 1 to invert the channel, 0 for default direction.
*
* @reboot_required true
*
* @min 0
* @max 1
* @group PWM Outputs
@@ -80,6 +86,8 @@ PARAM_DEFINE_INT32(PWM_MAIN_REV3, 0);
*
* Set to 1 to invert the channel, 0 for default direction.
*
* @reboot_required true
*
* @min 0
* @max 1
* @group PWM Outputs
@@ -91,6 +99,8 @@ PARAM_DEFINE_INT32(PWM_MAIN_REV4, 0);
*
* Set to 1 to invert the channel, 0 for default direction.
*
* @reboot_required true
*
* @min 0
* @max 1
* @group PWM Outputs
@@ -102,6 +112,8 @@ PARAM_DEFINE_INT32(PWM_MAIN_REV5, 0);
*
* Set to 1 to invert the channel, 0 for default direction.
*
* @reboot_required true
*
* @min 0
* @max 1
* @group PWM Outputs
@@ -113,6 +125,8 @@ PARAM_DEFINE_INT32(PWM_MAIN_REV6, 0);
*
* Set to 1 to invert the channel, 0 for default direction.
*
* @reboot_required true
*
* @min 0
* @max 1
* @group PWM Outputs
@@ -124,6 +138,8 @@ PARAM_DEFINE_INT32(PWM_MAIN_REV7, 0);
*
* Set to 1 to invert the channel, 0 for default direction.
*
* @reboot_required true
*
* @min 0
* @max 1
* @group PWM Outputs
+2 -2
View File
@@ -599,7 +599,7 @@ error:
#endif /* HRT_PPM_CHANNEL */
/**
* Handle the compare interupt by calling the callout dispatcher
* Handle the compare interrupt by calling the callout dispatcher
* and then re-scheduling the next deadline.
*/
static int
@@ -750,7 +750,7 @@ hrt_store_absolute_time(volatile hrt_abstime *now)
}
/**
* Initalise the high-resolution timing module.
* Initialise the high-resolution timing module.
*/
void
hrt_init(void)
+1
View File
@@ -33,6 +33,7 @@
px4_add_module(
MODULE examples__hwtest
MAIN ex_hwtest
STACK 2000
SRCS
hwtest.c
DEPENDS
@@ -33,6 +33,7 @@
px4_add_module(
MODULE examples__matlab_csv_serial
MAIN matlab_csv_serial
STACK 2000
SRCS
matlab_csv_serial.c
DEPENDS
@@ -33,6 +33,7 @@
px4_add_module(
MODULE examples__px4_simple_app
MAIN px4_simple_app
STACK 2000
SRCS
px4_simple_app.c
DEPENDS
+1 -1
View File
@@ -51,7 +51,7 @@ if(NOT ${BOARD} STREQUAL "sim")
)
if (config_io_board)
add_dependencies(romfs fw_io)
endif()
endif()
set(fw_file
${CMAKE_CURRENT_BINARY_DIR}/${OS}-${BOARD}-${LABEL}.px4)

Some files were not shown because too many files have changed in this diff Show More