Compare commits

...

181 Commits

Author SHA1 Message Date
David Sidrane add2aa0680 Update Nuttx Submodule to included Proper MAC El Capitan USB fix ==master (#5385) 2016-08-25 21:59:59 +02:00
Lorenz Meier 1dfe51b11b Travis CI: OS X needs to build at least onene Firmware target 2016-08-25 21:48:30 +02:00
Lorenz Meier f511d49cc2 Improvements to SITL to make paths more flexible. (#5181) (#5255)
* Path cleanup for SITL.

* Restructured sitl scripts dir.

* Set integration tests to use ekf2 for vtol.

* Fix sitl paths for mac.
2016-08-25 21:47:45 +02:00
Beat Küng 61f7470e7e df wrappers: fix invalid NaN to int16 conversion (set to 0 instead)
The result of this conversion is undefined!
2016-08-25 13:14:15 +02:00
Beat Küng a7ef9b4954 fix navio_gpio: use uintptr_t for pointer type instead of uint32_t 2016-08-25 13:14:15 +02:00
Beat Küng 4b6e6572b9 fix navio_sysfs_pwm_out: use correct type for buflen (required by MultirotorMixer::from_text) 2016-08-25 13:14:15 +02:00
David Sidrane d4530d3a39 Update Nuttx Submodule to included MAC El Capitan USB fix ==master (#5380) 2016-08-25 09:24:52 +02:00
Tiktiki 111b41bc86 Removed configuration files from master (depreciated). (#5379)
* Update multi_tables.py

* Update mixer_multirotor.cpp

* Create gk

* Rename gk to 13011_greenkoptr

* Update 13011_greenkoptr

* Create greenkoptr.main

* Update and rename greenkoptr.main to greenkoptr.main.mix

* Create greenkoptr.aux.mix

* Update greenkoptr.main.mix

* Update 13011_greenkoptr

* Update multi_tables.py

Corrected HEX_T position and rotation for motors 1-2-5-6

* Delete 13011_greenkoptr

* Delete greenkoptr.aux.mix

* Delete greenkoptr.main.mix

* Update mixer_multirotor.cpp
2016-08-25 00:32:35 +02:00
Mark Whitehorn 545152f676 remove "transitional support" (#5378) 2016-08-24 23:05:39 +02:00
Beat Küng 96384bdc29 df wrappers: add drv_hrt.h include 2016-08-24 21:30:50 +02:00
Beat Küng eede43a786 px4_log.h: move px4_log_initialize() out of #ifdef 2016-08-24 21:24:35 +02:00
Beat Küng b8e247a018 muorb: add drv_hrt.h include for hrt_absolute_time 2016-08-24 21:24:35 +02:00
Beat Küng 441a05d976 uorb unittests stubs: add orb_advertise_queue 2016-08-24 21:24:35 +02:00
Beat Küng 528ca931af logger: only add data message to the log if orb_copy succeeds, when adding a new instance 2016-08-24 21:24:35 +02:00
Beat Küng df53fb0fde logging: publish a message for PX4_{WARN,ERR} & store them to the ulog file
- ulog file message rate limited to 50Hz
- queuing with size 2
- this replaces the mavlink log message in the ulog
  (but the mavlink warnings & errors still go to the ulog)
2016-08-24 21:24:35 +02:00
Beat Küng eae1585e38 logger: store full file name in logger, remove it from log writer
- also add log file to the status output
2016-08-24 21:24:35 +02:00
Beat Küng aefd217fc0 uorb subscription: remove _interval & use orb_get_interval() instead 2016-08-24 21:24:35 +02:00
Beat Küng 6b4c24fb12 px4_log: remove __px4_log_level_current
- there is no way to change it at runtime
- it was implemented wrong (<= comparison disabled the PANIC log level)
2016-08-24 21:24:35 +02:00
Beat Küng e2afb0be6b px4_log.h: remove hrt_absolute_time() declaration (it does not belong here) 2016-08-24 21:24:35 +02:00
Beat Küng d404359888 local_position_estimator_main: warnx -> PX4_{WARN,INFO,DEBUG} 2016-08-24 21:24:35 +02:00
Julian Oes 14ed65f0e4 sitl_run.sh: use ps instead of jps (#5376)
The tool jps does not seem to be available on macos Java.
2016-08-24 17:07:14 +02:00
Beat Küng 0127f4017a NuttX: update submodule 2016-08-23 20:17:16 +02:00
Lorenz Meier fadac79617 Add 9250 startup for FMUv2 2016-08-23 19:51:57 +02:00
Beat Küng 1fffd731b1 print_load_posix under DARWIN: remove unused variable basic_info (#5364) 2016-08-23 09:09:55 +02:00
Lorenz Meier 79678c5f25 MPU6K fix code style 2016-08-19 22:24:41 +02:00
Bart Slinger 7f04e3c759 Helicopter aiframe and basic PID control (#5339)
* Helicopter aiframe and basic PID control

* codestyle

* Blade 130x gains working but not optimal

* Changed behaviour of feedforward for all multicopter
2016-08-19 22:20:59 +02:00
Mark Whitehorn 75c95955fc Update 4050_generic_250 (#5343) 2016-08-19 22:20:27 +02:00
Mark Whitehorn 1b5964dc42 Update 4009_qav250 (#5344) 2016-08-19 22:19:47 +02:00
Lorenz Meier 7579ebf4e8 Fix failing mac test 2016-08-19 22:19:05 +02:00
Julian Oes 62297c3d86 DriverFramework: updated submodule (#5351)
- Fix if _retries variable is not set to prevent "UINT_MAX-1"
  retries.
- Update for the cmake_hexagon submodule.
2016-08-19 22:17:13 +02:00
Gus Grubba 821d7062df Support for new log file extension. (#5355) 2016-08-19 22:16:46 +02:00
Lorenz Meier 306a911dc9 Fix MPU6K driver ICM extensions 2016-08-19 22:09:05 +02:00
Beat Küng c3c8fa55b3 RC st24: change channel input range from [0,4096] to [500,3500] (#5350)
QGC failed to calibrate RC with the old range.
2016-08-19 20:45:56 +02:00
Lorenz Meier fe62c259e8 Fix MPU6K initialization 2016-08-19 11:10:11 +02:00
James Goppert 90b509a73f Update driver framework. (#5347) 2016-08-18 19:32:57 -04:00
James Goppert 372d16ee5e Update matrix. (#5346) 2016-08-18 18:01:55 -04:00
James Goppert 569e87d46b Update sitl gazebo. (#5345) 2016-08-18 17:22:13 -04:00
Lorenz Meier 192cde408a Remove unnecessary C++11 usage in UAVCAN 2016-08-18 21:44:15 +02:00
James Goppert 818840b576 Path cleanup, low impact changes (#5340)
* Low impact changes from path_cleanup branch.

This is a step towards minimizing the diff with path_cleanup branch.

* Update ecl.

* Revert matrix update.

* Revert ecl and matrix.

* Update sitl gazebo.

* Revert sitl_gazebo and matrix changes.
2016-08-18 15:37:23 -04:00
Lorenz Meier d32a7ffb8d Probe for ICM20608 2016-08-18 21:02:48 +02:00
Pavel Kirienko 24e90e3c90 UAVCAN servers: fixed member initialization; removed dead stuff 2016-08-18 17:14:53 +02:00
Pavel Kirienko d12be196a2 Fixed #5153 2016-08-18 17:14:53 +02:00
Pavel Kirienko 2784c3c5f0 Improved uavcan activity indication 2016-08-18 17:14:53 +02:00
Pavel Kirienko 64d7946cdc Fixed beep duration 2016-08-18 17:14:53 +02:00
Pavel Kirienko 36efc8c83e Fixed beeping 2016-08-18 17:14:53 +02:00
Pavel Kirienko 61ffc6c432 Fixed implementation of the ESC auto-enumeration feature 2016-08-18 17:14:53 +02:00
Pavel Kirienko 2fad9a6397 ESC status: printing temperature in Celsius 2016-08-18 17:14:53 +02:00
Pavel Kirienko 42031ab572 Better beeping during ESC enumeration 2016-08-18 17:14:53 +02:00
Pavel Kirienko e27d3f4e13 Added new configuration parameter UAVCAN_ESC_IDLT.
This parameter, when enabled, enforces that the UAVCAN ESC driver never outputs zero throttle
while the system is armed. This feature is disabled by default, so the change will not break
the experience of current users.
2016-08-18 17:14:53 +02:00
Hidenori 2ba70c5d89 rename Tools/rpi/clang-check.sh to Tools/clang-tool.sh
extended in two ways: target specification and tool selection.
2016-08-18 16:11:05 +02:00
Hidenori 211c2b9ca6 Rename clang toolchain file 2016-08-18 16:11:05 +02:00
Hidenori 9181f97f71 RPi: move clang-check.sh to Tools/rpi 2016-08-18 16:11:05 +02:00
Hidenori a1f89e4fd9 RPi: add a comment to clang-check.sh 2016-08-18 16:11:05 +02:00
Hidenori a8d3b15d73 RPi: add clang & clang-check support 2016-08-18 16:11:05 +02:00
Lorenz Meier ae00abe468 Fix typo 2016-08-18 15:44:51 +02:00
Tiktiki dfed00d870 Update multi_tables.py
Corrected HEX_T position and rotation for motors 1-2-5-6
2016-08-18 15:27:32 +02:00
Tiktiki 03e5d7490f Update 13011_greenkoptr 2016-08-18 15:26:26 +02:00
Tiktiki 7d4e7aff20 Create greenkoptr.main
Update and rename greenkoptr.main to greenkoptr.main.mix

Create greenkoptr.aux.mix

Update greenkoptr.main.mix
2016-08-18 15:26:25 +02:00
Tiktiki a962098645 Create gk
Rename gk to 13011_greenkoptr

Update 13011_greenkoptr
2016-08-18 15:26:21 +02:00
Tiktiki 021da9b2e1 Update mixer_multirotor.cpp 2016-08-18 15:25:24 +02:00
Tiktiki 3daf4a3a67 Update multi_tables.py 2016-08-18 15:25:24 +02:00
Andreas Bircher 9fe95275bb removing unnecessary parts 2016-08-18 15:12:39 +02:00
Andreas Bircher 70cd06bc84 initial version camera turn on / off 2016-08-18 15:12:39 +02:00
Lorenz Meier a97c5ec4e1 MPU6K compile and code style fixes 2016-08-18 13:50:29 +02:00
Lorenz Meier 3d1f1522d9 MPU6K driver improvements 2016-08-18 12:55:54 +02:00
sander 1efe011522 code style 2016-08-17 23:58:04 +02:00
sander 5bb36162be Start time based transition blending half-way 2016-08-17 23:58:04 +02:00
sander e6834579e5 Use altitude acc rad 2016-08-17 23:58:04 +02:00
sander 7afa21ebb7 Revert altitude acceptance radius to combat overshoot 2016-08-17 23:58:04 +02:00
Mark Whitehorn f1a1c9d7da add breakpoint and slope params for TPA 2016-08-17 23:15:36 +02:00
Mark Whitehorn 5c78af0f36 simple linear throttle PID attenuation test 2016-08-17 23:15:29 +02:00
JochiPochi 31e634b082 mpu6000 driver: set icm registers only on icm devices 2016-08-17 20:50:44 +02:00
JochiPochi e3557e0d3e mpu6000 driver: Add DLPF set function for IMC20608 2016-08-17 20:50:44 +02:00
JochiPochi ce27cc8326 mpu6000: Separate DLPF params for MPU and ICM family of sensors 2016-08-17 20:50:44 +02:00
Lorenz Meier 9f9c51eab3 Fix MPU6500 devtype define 2016-08-16 23:32:44 +02:00
James Goppert 7472c9033b Formatting fix. 2016-08-16 01:39:47 -04:00
Lorenz Meier 73362f325b Update mapping 2016-08-15 23:31:58 +02:00
Lorenz Meier 39ce001c41 MAVLink: use only the memory it needs 2016-08-15 19:53:21 +02:00
Lorenz Meier d810726c6e EKF2: Only use the memory it needs 2016-08-15 19:53:21 +02:00
Lorenz Meier a7ad722b98 Use less memory for ESC driver 2016-08-15 19:53:21 +02:00
Lorenz Meier 7cc0b32e74 Make altitude more efficient and estimator status safe in terms of memory overflow 2016-08-15 19:53:21 +02:00
Lorenz Meier 5786b73772 Tweak startup order for memory 2016-08-15 19:53:21 +02:00
Lorenz Meier a130b6a65c style cleanup 2016-08-15 19:53:21 +02:00
Lorenz Meier 1a9688c42f Commander: signal high memory usage 2016-08-15 14:58:33 +02:00
Lorenz Meier 8934aaa912 Load mon: populate memory usage i field for NuttX 2016-08-15 14:53:48 +02:00
Lorenz Meier eceb7e21b2 Include memory in CPU load message 2016-08-15 14:53:26 +02:00
Lorenz Meier 8b66a76432 Fix FMU init 2016-08-15 10:49:43 +02:00
Lorenz Meier 4b9e1d58f7 Fix ESC driver to also include direction information 2016-08-15 10:49:43 +02:00
Lorenz Meier 0c9ead44f1 Update ASCv1 template 2016-08-15 10:49:43 +02:00
Lorenz Meier e6dcc0a2ed Complete ASC config 2016-08-15 10:49:43 +02:00
Lorenz Meier 90b5fcc1ec Strip tone alarm 2016-08-15 10:49:43 +02:00
Lorenz Meier 7ef8d197c6 Patch up ASC config 2016-08-15 10:49:43 +02:00
James Goppert b36d705688 Update matrix. (#5310) 2016-08-12 14:24:35 -04:00
James Goppert bedf081d92 Sitl gazebo update. (#5309) 2016-08-12 13:49:48 -04:00
Lorenz Meier 5d0f57d61e Update Makefile to build for QGC 2016-08-12 13:55:16 +02:00
Lorenz Meier 0551275b9c Update prototype and board ID 2016-08-12 13:55:16 +02:00
Lorenz Meier ed6c63e48f TAPv1: Harmonize with FMUv1 (since they are pretty much the same) 2016-08-12 13:55:16 +02:00
Lorenz Meier f231feb0f6 FMUv1: Harmonize with FMUv2 2016-08-12 13:55:16 +02:00
Lorenz Meier 39303aa87a Set default battery config 2016-08-12 13:55:16 +02:00
David Sidrane ac1003875a USB Fix:iForce Soft Disconnect
The STM32F404 OTG FS has an internal soft pull-up.

The HW also has one too. So we need to overcome it to force a soft disconnect.
2016-08-12 13:55:16 +02:00
David Sidrane 6f973f1d6c Better Portability with clear naming 2016-08-12 13:55:16 +02:00
David Sidrane b9d93f2cad OTG_FS_ID that is on PA10 is managed by stm32 otg fs device Driver
N.B The driver set FDMOD, Force device mode and Writing a 1 to this bit
forces the core to device mode irrespective of the OTG_FS_ID input
pin.
2016-08-12 13:55:16 +02:00
David Sidrane 6173649c43 Minor corrections 2016-08-12 13:55:16 +02:00
Lorenz Meier 8bd4a624a7 Added voltage scaling. Need to move this to board_config.h instead 2016-08-12 13:55:16 +02:00
Lorenz Meier d21023c966 FMU: Power on radio if prsent 2016-08-12 13:55:16 +02:00
Lorenz Meier 2fad39aaae tap: Init both USB pins 2016-08-12 13:55:16 +02:00
Lorenz Meier 3fff9e5826 Harmonize TAP config with FMUv4 config 2016-08-12 13:55:16 +02:00
Lorenz Meier 3203d3f770 More USB buffer 2016-08-12 13:55:16 +02:00
Lorenz Meier 7e878e221c FMUv4: Code style 2016-08-12 13:55:16 +02:00
Lorenz Meier 5678b4cc83 Enable RC lib 2016-08-12 13:55:16 +02:00
Lorenz Meier 957b01a8eb Enable serial for RC input 2016-08-12 13:55:16 +02:00
Lorenz Meier 63275ef92f Sensors: Perform init on best effort basis 2016-08-12 13:55:16 +02:00
Lorenz Meier c3022bf713 FMU: Accomodate serial only RC input 2016-08-12 13:55:16 +02:00
Lorenz Meier 1c0a494b4d Code style 2016-08-12 13:55:16 +02:00
Lorenz Meier 64e47f2fae Boot improvements for TAP 2016-08-12 13:55:16 +02:00
Lorenz Meier a52d0ca00a Remove hysteresis tests on Mac OS 2016-08-12 13:53:02 +02:00
Andreas Antener 2e44fe9edd update previous waypoint before transition command 2016-08-12 11:50:38 +02:00
Lorenz Meier 5175d45e74 Update Gazebo 2016-08-11 22:07:19 +02:00
Andreas Antener 5eaf104318 fixed optimal recovery condition 2016-08-10 22:47:26 +02:00
Andreas Antener 853a5b77fd disabled attitude setpoint change in MC controller when optimal recovery is active 2016-08-10 22:47:26 +02:00
Andreas Antener 9087ef5990 only recalculate rotation matrix and quaternion when not in velocity control 2016-08-10 22:47:26 +02:00
Andreas Antener ae533b01b6 removed unused code 2016-08-10 22:47:26 +02:00
David Sidrane deeefe5dd1 Describe the issues that requires the +=2 on arg[c|v] for NuttX (#5293)
This may be moot and should be revisited if only px4_getops is used, but this pr politely documents the reson for the logic.
2016-08-10 06:19:59 -10:00
Lorenz Meier 17561daefb TAP power: Shut down faster 2016-08-10 12:33:04 +02:00
Andreas Daniel Antener 9f4a91ab19 initialize waypoint transfer sequence with -1 (#5274) 2016-08-10 08:39:54 +02:00
huanglilong 6f7b78821a fix fake gps bugs (#5285) 2016-08-09 21:24:11 +02:00
Lorenz Meier c62b886da5 Ua venture hottupdate (#5289)
* Change default port to Serial4 and improve status outputs.

* Reduce stack size.
2016-08-09 21:19:41 +02:00
Lorenz Meier b8c377b91a Temporarily disable new logger 2016-08-09 16:00:42 +02:00
Lorenz Meier a664747d0a Remove unused sensors 2016-08-09 16:00:28 +02:00
Lorenz Meier 43f772154c TAP: adjust ESC buffer size 2016-08-09 16:00:00 +02:00
Lorenz Meier aae3a37983 GPS: Do not use nonblocking access 2016-08-09 15:59:34 +02:00
Daniel Agar 12a5ce7a0a temporarily disable uorb test on OSX (#5280) 2016-08-08 20:59:24 -04:00
Lorenz Meier 630cebeabc Relax uORB test for Darwin CI system 2016-08-07 14:05:03 +02:00
Lorenz Meier e24d18f810 Hysteresis test: Relax time for all tests for OS X CI system 2016-08-07 14:05:03 +02:00
Lorenz Meier 207a04bba0 Fix uORB tests for Mac OS 2016-08-07 14:05:03 +02:00
Lorenz Meier ead8e31de4 Hysteresis test: Fix for Mac OS CI 2016-08-07 14:05:03 +02:00
Lorenz Meier 7b5917567a Fix Mixer test for OS X 2016-08-07 14:05:03 +02:00
Daniel Agar 8b9bef3872 osx fix and enable tests 2016-08-07 14:05:03 +02:00
Roman Bapst ba047f234d ekf2 replay: added magic values for range min/max distance (#5268)
- replay was not working without these values as only range measurements
were given to the filter which were between the min/max value

Signed-off-by: Roman <bapstroman@gmail.com>
2016-08-07 11:30:54 +02:00
Lorenz Meier 393acf2231 Start ESC drivers 2016-08-07 11:15:48 +02:00
Lorenz Meier 0e9c352927 Simplify TAP config 2016-08-07 11:15:48 +02:00
David Sidrane c5e11cd16f TAP:Added i2c speed setting to init 2016-08-07 11:15:48 +02:00
David Sidrane e8ae0fe13c Made the MPU6000 driver a highbread using both hrt for SPI or workqueue for I2C 2016-08-07 11:15:48 +02:00
David Sidrane 5f342c3b5f Added I2C to MPU6000 driver 2016-08-07 11:15:48 +02:00
Lorenz Meier a0cad961b3 Remove non-used app from config 2016-08-07 11:12:20 +02:00
Lorenz Meier 58135d892b Sync estimator CMake configs for all boards 2016-08-07 10:40:17 +02:00
Lorenz Meier 990304ee22 Fix check code style to work on Mac OS 2016-08-07 10:40:17 +02:00
Lorenz Meier a73d5037f2 Fix FMUv4 build 2016-08-07 10:40:17 +02:00
Lorenz Meier cf776aeb0a Fix compilation of examples 2016-08-07 10:40:17 +02:00
Lorenz Meier 148b6e6135 Update CMake config paths 2016-08-07 10:40:17 +02:00
Lorenz Meier cba4bcd2fb Multiplatform controllers: Move to examples and fix code style 2016-08-07 10:40:17 +02:00
Lorenz Meier ee5cdab963 Move old estimators to examples 2016-08-07 10:40:17 +02:00
Daniel Agar cff9e90bec position_estimator_inav fix and enforce code style 2016-08-07 10:40:17 +02:00
Daniel Agar 4049ec2e96 mc_pos_control fix and enforce code style 2016-08-07 10:40:17 +02:00
Daniel Agar d4196f7f0c mc_att_control fix and enforce code style 2016-08-07 10:40:17 +02:00
Daniel Agar 8f01324890 ekf2 fix and enforce code style 2016-08-07 10:40:17 +02:00
Daniel Agar 968a3d499b add make format (check_code_style_all.sh --fix) 2016-08-07 10:40:17 +02:00
Daniel Agar a260a6eead check code style list unformatted modules 2016-08-07 10:40:17 +02:00
Lorenz Meier 61d5d8ce2a Makefile: Remove remaining EKF2 config bits 2016-08-07 10:39:51 +02:00
Lorenz Meier 3cc64b3b7b LPE: Remove unused var 2016-08-07 10:39:31 +02:00
Lorenz Meier fb4c620f94 Replace EKF1 with EKF2 in rover config 2016-08-06 23:34:35 +02:00
Julian Oes 68986604e9 df_mpu9250_wrapper: calibration after rotation
Same as for the df_hmc5883_wrapper.
2016-08-06 21:01:37 +02:00
Julian Oes 1dd2c94949 df_hmc5883_wrapper: use calibration after rotation
The calibration values need to be applied after the rotation, otherwise
the offsets and scale can be applied to the wrong axes.
2016-08-06 21:01:37 +02:00
Daniel Agar 2a15578f8d FW implement MAV_CMD_DO_GO_AROUND 2016-08-06 20:56:53 +02:00
Hidenori aa3ffa28c8 add copyright header 2016-08-06 20:47:55 +02:00
Hidenori 5920711c20 fix style 2016-08-06 20:47:55 +02:00
Hidenori eded7bf772 Navio: add rgbled test and tweak implementation 2016-08-06 20:47:55 +02:00
Hidenori 9a5f88d6bf Navio: fix GPIO register definition 2016-08-06 20:47:55 +02:00
Hidenori ff647e7bc8 Navio: GPIO driver command fix and update ifdefs 2016-08-06 20:47:55 +02:00
Hidenori 3049b9af01 Navio2: add support for GPIO and RGBLED 2016-08-06 20:47:55 +02:00
Lorenz Meier 40ba3f5131 Initial config for ASC module 2016-08-06 20:45:11 +02:00
Beat Küng c0e3ab632e orb: proper locking for DeviceNode::{add,remove}_internal_subscriber 2016-08-06 20:44:23 +02:00
Beat Küng b86cf2b017 orb status: print information about lost messages 2016-08-06 20:44:23 +02:00
Beat Küng 7280f71cef orb: rm static from DeviceMaster::_node_map & use the non-static getDeviceNode in uORB::Manager
Reasons:
- DeviceMaster::_node_map does not need to be shared among instances,
  because there is at most 1 instance per Flavor and different Flavors
  have non-intersecting device paths.
- Keeping it static would also require a static lock
- DeviceMaster::_node_map was not locked at all when used from
  uORB::Manager

So this fixes two synchronization issues:
- Different DeviceMaster objects could access the same static data in
  parallel
- getDeviceNode() called from uORB::Manager did not use any locking at all
2016-08-06 20:44:23 +02:00
Beat Küng 45a0a7c5ab refactor orb: uORB::Manager is responsible for the DeviceMaster objects
This has the following benefits:
- Manager can ensure that there is at most one instance of DeviceMaster
  per Flavor
- The Manager needs access to (static) data of DeviceMaster already.
  This will make it easier to access this data in a non-static way, and
  does not introduce new dependencies.
2016-08-06 20:44:23 +02:00
Andreas Antener 2dd29ec4a1 VTOL: publish stabilized FW attitude to correct topic 2016-08-06 20:43:49 +02:00
Lorenz Meier c97a18b6a4 Fix README name 2016-08-06 20:42:44 +02:00
h3ct0r 3deefb1a79 Fixed some edge cases on the geo_tag_images.py script. Added explanation to the --kml function. Added more examples for the execution of the script. 2016-08-06 20:42:24 +02:00
Beat Küng 124e1c26d9 gps injection: use the orb queuing API instead of multiple instances
It uses a queue length of 6. There are 3 RTCM msgs/s, but due to
fragmentation and WiFi lags, there can be more than that. During several
tests, a length of 6 showed no queue overflows.
2016-08-06 20:41:38 +02:00
sander 9398a4819f Only check mission when needed 2016-08-06 20:40:41 +02:00
Julian Oes 3e87ec5153 navigator: mission check refactor
The mission feasability checker was called with the same arguments
twice which made it hard to understand when a mission is marked valid.

The mission check should run in these two cases:
- When initializing (if home comes up) if there is already a mission saved.
- When the mission gets updated.
2016-08-06 20:39:56 +02:00
283 changed files with 9153 additions and 2726 deletions
+2 -1
View File
@@ -63,7 +63,8 @@ script:
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
docker run --rm -v `pwd`:`pwd`:rw -v $HOME/.ccache:$HOME/.ccache:rw -e CCACHE_DIR=$HOME/.ccache -e GIT_SUBMODULES_ARE_EVIL=1 -w=`pwd` --user=$UID -it ${DOCKER_REPO} /bin/bash -c "make check_qgc_firmware VECTORCONTROL=1";
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
make check_posix_sitl_default;
make px4fmu-v4_default
make tests;
fi
- ccache -s
+48 -22
View File
@@ -121,6 +121,14 @@
# and leads to wrong toolchain detection
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
set(PX4_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
set(PX4_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
execute_process(
COMMAND Tools/check_submodules.sh
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
)
# Use clang
#SET (CMAKE_C_COMPILER /usr/bin/clang-3.6)
#SET (CMAKE_CXX_COMPILER /usr/bin/clang++-3.6)
@@ -155,6 +163,9 @@ message(STATUS "${target_name}")
# Define GNU standard installation directories
include(GNUInstallDirs)
# Add support for external project building
include(ExternalProject)
# Setup install paths
if(NOT CMAKE_INSTALL_PREFIX)
if (${OS} STREQUAL "posix")
@@ -163,12 +174,8 @@ if(NOT CMAKE_INSTALL_PREFIX)
endif()
message(STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}")
# switch to ros CMake file if building ros
if (${OS} STREQUAL "ros")
include("cmake/ros-CMakeLists.txt")
else() # otherwise use the rest of this file
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
list(APPEND CMAKE_MODULE_PATH "${PX4_SOURCE_DIR}/cmake")
message(STATUS "cmake module path: ${CMAKE_MODULE_PATH}")
set(config_module "configs/${CONFIG}")
include(${config_module})
@@ -199,6 +206,9 @@ if(DEFINED config_df_driver_list)
message("DF Drivers: ${config_df_driver_list}")
endif()
# force static lib build
set(BUILD_SHARED_LIBS OFF)
#=============================================================================
# project definition
#
@@ -219,8 +229,22 @@ set(version "${version_major}.${version_minor}.${version_patch}")
set(package-contact "px4users@googlegroups.com")
#=============================================================================
# programs
# find programs and packages
#
# see if catkin was invoked to build this
if (CATKIN_DEVEL_PREFIX)
message(STATUS "catkin ENABLED")
find_package(catkin REQUIRED)
if (catkin_FOUND)
catkin_package()
else()
message(FATAL_ERROR "catkin not found")
endif()
else()
message(STATUS "catkin DISABLED")
endif()
find_package(PythonInterp REQUIRED)
#=============================================================================
@@ -228,6 +252,11 @@ find_package(PythonInterp REQUIRED)
#
enable_testing()
#=============================================================================
# generate compile command database
#
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
#=============================================================================
# check required toolchain variables
#
@@ -257,7 +286,7 @@ px4_add_git_submodule(TARGET git_matrix PATH "src/lib/matrix")
px4_add_git_submodule(TARGET git_cmake_hexagon PATH "cmake/cmake_hexagon")
add_custom_target(submodule_clean
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
COMMAND git submodule deinit -f .
COMMAND rm -rf .git/modules/*
)
@@ -267,12 +296,12 @@ add_custom_target(submodule_clean
#
add_custom_target(check_format
COMMAND Tools/check_code_style.sh
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
)
add_custom_target(config
COMMAND cmake-gui .
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
WORKING_DIRECTORY ${PX4_BINARY_DIR}
)
#=============================================================================
@@ -321,7 +350,7 @@ add_custom_target(xml_gen
# external projects
#
set(ep_base ${CMAKE_BINARY_DIR}/external)
set(ep_base ${PX4_BINARY_DIR}/external)
set_property(DIRECTORY PROPERTY EP_BASE ${ep_base})
# add external project install folders to build
@@ -350,7 +379,7 @@ foreach(module ${config_module_list})
if(external_module)
STRING(REGEX REPLACE "//" "/" EXT_MODULE ${module})
STRING(REGEX REPLACE "/" "__" EXT_MODULE_PREFIX ${EXT_MODULE})
add_subdirectory(${module} ${CMAKE_BINARY_DIR}/${EXT_MODULE_PREFIX})
add_subdirectory(${module} ${PX4_BINARY_DIR}/${EXT_MODULE_PREFIX})
else()
add_subdirectory(src/${module})
endif()
@@ -375,7 +404,7 @@ endif()
#=============================================================================
# generate git version
#
px4_create_git_hash_header(HEADER ${CMAKE_BINARY_DIR}/build_git_version.h)
px4_create_git_hash_header(HEADER ${PX4_BINARY_DIR}/build_git_version.h)
#=============================================================================
# packaging
@@ -394,17 +423,14 @@ set(CPACK_GENERATOR "ZIP")
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${CONFIG}-${version}")
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${version}")
set(CPACK_SOURCE_GENERATOR "ZIP;TBZ2")
set(CPACK_PACKAGING_INSTALL_PREFIX "/usr")
set(CPACK_SET_DESTDIR "OFF")
if ("${CMAKE_SYSTEM}" MATCHES "Linux")
find_program(DPKG_PROGRAM dpkg)
if (EXISTS ${DPKG_PROGRAM})
list (APPEND CPACK_GENERATOR "DEB")
endif()
endif()
if (${OS} STREQUAL "posix")
set(CPACK_SET_DESTDIR "ON")
find_program(DPKG_PROGRAM dpkg)
if (EXISTS ${DPKG_PROGRAM})
list (APPEND CPACK_GENERATOR "DEB")
endif()
endif()
include(CPack)
endif() # ros alternative endif
# vim: set noet fenc=utf-8 ff=unix ft=cmake :
+12
View File
@@ -0,0 +1,12 @@
{
"board_id": 65,
"magic": "PX4FWv1",
"description": "Firmware for the ASCv1 board",
"image": "",
"build_time": 0,
"summary": "ASCv1",
"version": "0.1",
"image_size": 0,
"git_identity": "",
"board_revision": 0
}
+1 -1
View File
@@ -1,5 +1,5 @@
{
"board_id": 78,
"board_id": 64,
"magic": "PX4FWv1",
"description": "Firmware for the TAPv1 board",
"image": "",
+32 -30
View File
@@ -42,7 +42,7 @@ endif
CMAKE_VER := $(shell Tools/check_cmake.sh; echo $$?)
ifneq ($(CMAKE_VER),0)
$(warning Not a valid CMake version or CMake not installed.)
$(warning On Ubuntu, install or upgrade via:)
$(warning On Ubuntu 16.04, install or upgrade via:)
$(warning )
$(warning 3rd party PPA:)
$(warning sudo add-apt-repository ppa:george-edison55/cmake-3.x -y)
@@ -111,20 +111,23 @@ else
BUILD_DIR_SUFFIX :=
endif
SRC_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
# Functions
# --------------------------------------------------------------------
# describe how to build a cmake config
define cmake-build
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e ./build_$@$(BUILD_DIR_SUFFIX)/Makefile ]; then rm -rf ./build_$@$(BUILD_DIR_SUFFIX); fi
+@if [ ! -e ./build_$@$(BUILD_DIR_SUFFIX)/CMakeCache.txt ]; then Tools/check_submodules.sh && mkdir -p ./build_$@$(BUILD_DIR_SUFFIX) && cd ./build_$@$(BUILD_DIR_SUFFIX) && cmake .. -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1) || (cd .. && rm -rf ./build_$@$(BUILD_DIR_SUFFIX)); fi
+@Tools/check_submodules.sh
+@(echo "PX4 CONFIG: $@$(BUILD_DIR_SUFFIX)" && cd ./build_$@$(BUILD_DIR_SUFFIX) && $(PX4_MAKE) $(PX4_MAKE_ARGS) $(ARGS))
+@$(eval BUILD_DIR = $(SRC_DIR)/build_$@$(BUILD_DIR_SUFFIX))
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(BUILD_DIR)/Makefile ]; then rm -rf $(BUILD_DIR); fi
+@if [ ! -e $(BUILD_DIR)/CMakeCache.txt ]; then mkdir -p $(BUILD_DIR) && cd $(BUILD_DIR) && cmake .. -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1) || (cd .. && rm -rf $(BUILD_DIR)); fi
+@(echo "PX4 CONFIG: $(BUILD_DIR)" && cd $(BUILD_DIR) && $(PX4_MAKE) $(PX4_MAKE_ARGS) $(ARGS))
endef
define cmake-build-other
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e ./build_$@/Makefile ]; then rm -rf ./build_$@; fi
+@if [ ! -e ./build_$@/CMakeCache.txt ]; then Tools/check_submodules.sh && mkdir -p ./build_$@ && cd ./build_$@ && cmake $(2) -G$(PX4_CMAKE_GENERATOR) || (cd .. && rm -rf ./build_$@); fi
+@(cd ./build_$@ && $(PX4_MAKE) $(PX4_MAKE_ARGS) $(ARGS))
+@$(eval BUILD_DIR = $(SRC_DIR)/build_$@$(BUILD_DIR_SUFFIX))
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(BUILD_DIR)/Makefile ]; then rm -rf $(BUILD_DIR); fi
+@if [ ! -e $(BUILD_DIR)/CMakeCache.txt ]; then mkdir -p $(BUILD_DIR) && cd $(BUILD_DIR) && cmake $(2) -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1) || (cd .. && rm -rf $(BUILD_DIR)); fi
+@(cd $(BUILD_DIR) && $(PX4_MAKE) $(PX4_MAKE_ARGS) $(ARGS))
endef
# create empty targets to avoid msgs for targets passed to cmake
@@ -147,6 +150,9 @@ endef
tap-v1_default:
$(call cmake-build,nuttx_tap-v1_default)
asc-v1_default:
$(call cmake-build,nuttx_asc-v1_default)
px4fmu-v1_default:
$(call cmake-build,nuttx_px4fmu-v1_default)
@@ -162,9 +168,6 @@ px4fmu-v4_default:
px4-stm32f4discovery_default:
$(call cmake-build,nuttx_px4-stm32f4discovery_default)
px4fmu-v2_ekf2:
$(call cmake-build,nuttx_px4fmu-v2_ekf2)
mindpx-v2_default:
$(call cmake-build,nuttx_mindpx-v2_default)
@@ -174,6 +177,9 @@ posix_sitl_default:
posix_sitl_lpe:
$(call cmake-build,$@)
posix_sitl_ekf2:
$(call cmake-build,$@)
posix_sitl_replay:
$(call cmake-build,$@)
@@ -233,14 +239,8 @@ run_sitl_ros: sitl_deprecation
# Other targets
# --------------------------------------------------------------------
.PHONY: gazebo_build uavcan_firmware check check_format unittest tests qgc_firmware package_firmware clean submodulesclean distclean
.NOTPARALLEL: gazebo_build uavcan_firmware check check_format unittest tests qgc_firmware package_firmware clean submodulesclean distclean
gazebo_build:
@mkdir -p build_gazebo
@if [ ! -e ./build_gazebo/CMakeCache.txt ];then cd build_gazebo && cmake -Wno-dev -G$(PX4_CMAKE_GENERATOR) ../Tools/sitl_gazebo; fi
@cd build_gazebo && $(PX4_MAKE) $(PX4_MAKE_ARGS)
@cd build_gazebo && $(PX4_MAKE) $(PX4_MAKE_ARGS) sdf
.PHONY: uavcan_firmware check check_format unittest tests qgc_firmware package_firmware clean submodulesclean distclean
.NOTPARALLEL: uavcan_firmware check check_format unittest tests qgc_firmware package_firmware clean submodulesclean distclean
uavcan_firmware:
ifeq ($(VECTORCONTROL),1)
@@ -251,9 +251,9 @@ endif
checks_defaults: \
check_px4fmu-v1_default \
check_px4fmu-v2_default \
check_px4fmu-v4_default \
check_mindpx-v2_default \
check_px4-stm32f4discovery_default \
check_tap-v1_default \
check_tap-v1_default
checks_bootloaders: \
@@ -262,7 +262,8 @@ checks_tests: \
check_px4fmu-v2_test
checks_alts: \
check_px4fmu-v2_ekf2 \
check_asc-v1_default \
check_px4-stm32f4discovery_default
checks_uavcan: \
check_px4fmu-v4_default_and_uavcan
@@ -275,13 +276,18 @@ checks_last: \
check_format \
check: checks_defaults checks_tests checks_alts checks_uavcan checks_bootloaders checks_last
quick_check: check_px4fmu-v2_default check_px4fmu-v4_default check_tests check_format
quick_check: check_px4fmu-v2_default check_px4fmu-v4_default check_posix_sitl_default check_tests check_format
check_format:
$(call colorecho,"Checking formatting with astyle")
@./Tools/fix_code_style.sh
@./Tools/check_code_style_all.sh
format:
$(call colorecho,"Formatting with astyle")
@./Tools/fix_code_style.sh
@./Tools/check_code_style_all.sh --fix
check_%:
@echo
$(call colorecho,"Building" $(subst check_,,$@))
@@ -302,11 +308,7 @@ unittest: posix_sitl_default
@(cd build_unittest && ctest -j2 --output-on-failure)
run_tests_posix: posix_sitl_default
@mkdir -p build_posix_sitl_default/src/firmware/posix/rootfs/fs/microsd
@mkdir -p build_posix_sitl_default/src/firmware/posix/rootfs/eeprom
@touch build_posix_sitl_default/src/firmware/posix/rootfs/eeprom/parameters
@(cd build_posix_sitl_default/src/firmware/posix && ./px4 -d ../../../../posix-configs/SITL/init/rcS_tests | tee test_output)
@(cd build_posix_sitl_default/src/firmware/posix && grep --color=always "All tests passed" test_output)
@(cd build_posix_sitl_default/ && ctest -V)
tests: check_unittest run_tests_posix
@@ -315,13 +317,13 @@ qgc_firmware: \
check_px4fmu-v1_default \
check_px4fmu-v2_default \
check_mindpx-v2_default \
check_tap-v1_default \
check_px4fmu-v4_default_and_uavcan \
check_format
extra_firmware: \
check_px4-stm32f4discovery_default \
check_px4fmu-v2_test \
check_px4fmu-v2_ekf2
check_px4fmu-v2_test
package_firmware:
@zip --junk-paths Firmware.zip `find . -name \*.px4`
+1 -1
Submodule NuttX updated: 55e8d557ec...93df871201
@@ -0,0 +1,50 @@
#!nsh
#
# @name Blade 130X
#
# @type Helicopter
#
# @maintainer Bart Slinger <bartslinger@gmail.com>
#
sh /etc/init.d/rc.mc_defaults
# Configure as helicopter (number 4 defined in commander_helper.cpp)
set MAV_TYPE 4
set MIXER heli_120deg
set PWM_OUT 1234
if [ $AUTOCNF == yes ]
then
param set MC_ROLL_P 5.0
param set MC_ROLLRATE_P 0.0
param set MC_ROLLRATE_I 0.0
param set MC_ROLLRATE_D 0.0
param set MC_ROLLRATE_FF 0.15
param set MC_PITCH_P 6.5
param set MC_PITCHRATE_P 0.0
param set MC_PITCHRATE_I 0.0
param set MC_PITCHRATE_D 0.0
param set MC_PITCHRATE_FF 0.15
param set MC_YAW_P 3.0
param set MC_YAWRATE_P 0.1
param set MC_YAWRATE_I 0.0
param set MC_YAWRATE_D 0.0
param set MC_YAW_FF 0.0
param set MC_ROLLRATE_MAX 720.0
param set MC_PITCHRATE_MAX 720.0
param set MC_YAWRATE_MAX 400.0
param set MC_ACRO_R_MAX 360.0
param set MC_ACRO_P_MAX 360.0
param set PWM_MIN 1075
param set MPC_THR_MIN 0.06
param set MPC_MANTHR_MIN 0.06
param set ATT_BIAS_MAX 0.0
param set CBRK_IO_SAFETY 22027
fi
+2
View File
@@ -33,4 +33,6 @@ then
param set MPC_MANTHR_MIN 0.06
param set CBRK_IO_SAFETY 22027
param set ATT_BIAS_MAX 0.0
param set MC_TPA_BREAK 0.5
param set MC_TPA_SLOPE 1.0
fi
+5 -2
View File
@@ -20,9 +20,9 @@ then
param set MC_ROLLRATE_I 0.1
param set MC_ROLLRATE_D 0.0055
param set MC_PITCH_P 8.0
param set MC_PITCHRATE_P 0.24
param set MC_PITCHRATE_P 0.19
param set MC_PITCHRATE_I 0.1
param set MC_PITCHRATE_D 0.0065
param set MC_PITCHRATE_D 0.0055
param set MC_YAW_P 4.0
param set MC_YAWRATE_P 0.2
param set MC_YAWRATE_I 0.1
@@ -33,6 +33,9 @@ then
param set MC_YAWRATE_MAX 400.0
param set MC_ACRO_R_MAX 360.0
param set MC_ACRO_P_MAX 360.0
param set MC_TPA_BREAK 0.5
param set MC_TPA_SLOPE 1.0
param set PWM_MIN 1075
@@ -4,7 +4,7 @@
# att & pos estimator, rover steering control
#
ekf_att_pos_estimator start
ekf2 start
# disabled the start of steering control app due to use of offboard mode only
# rover_steering_control start
@@ -34,15 +34,6 @@ set PWM_AUX_DISARMED 1500
set PWM_AUX_MIN 1000
set PWM_AUX_MAX 2000
# Transitional support: ensure suitable PWM min/max param values
if param compare PWM_MIN 1000
then
param set PWM_MIN 1075
fi
if param compare PWM_MAX 2000
then
param set PWM_MAX 1950
fi
if param compare PWM_DISARMED 0
then
param set PWM_DISARMED 900
+9
View File
@@ -56,6 +56,11 @@ then
then
fi
# Internal SPI bus ICM-20608-G
if mpu6000 -T 20608 start
then
fi
# external MPU6K is rotated 180 degrees yaw
if mpu6000 -X -R 4 start
then
@@ -95,6 +100,10 @@ then
then
fi
if mpu9250 start
then
fi
if l3gd20 start
then
fi
@@ -34,15 +34,6 @@ set PWM_DISARMED p:PWM_DISARMED
set PWM_MIN p:PWM_MIN
set PWM_MAX p:PWM_MAX
# Transitional support: ensure suitable PWM min/max param values
if param compare PWM_MIN 1000
then
param set PWM_MIN 1075
fi
if param compare PWM_MAX 2000
then
param set PWM_MAX 1950
fi
if param compare PWM_DISARMED 0
then
param set PWM_DISARMED 900
@@ -0,0 +1,54 @@
Helicopter 120 degree Cyclic-Collective-Pitch Mixing (CCPM) for PX4FMU
Blade 130x helicopter has longer servo arms left and right. The front servo arm is shorter.
Therefore it is not required to use the 0.866 factor.
==================================================
Output 0 - Left Servo Mixer
-----------------
Left Servo = Collective (Thurst - 3) - 0.5 * Elevator (Pitch - 1) + Aileron (Roll - 0)
M: 3
O: 10000 10000 0 -10000 10000
S: 3 5 10000 10000 0 -10000 10000
S: 0 1 -10000 -10000 0 -10000 10000
S: 0 0 10000 10000 0 -10000 10000
Output 1 - Front Servo Mixer
----------------
Rear Servo = Collective (Thrust - 3) + Elevator (Pitch - 1)
M: 2
O: 10000 10000 0 -10000 10000
S: 3 5 10000 10000 0 -10000 10000
S: 0 1 10000 10000 0 -10000 10000
Output 2 - Right Servo Mixer
----------------
Right Servo = Collective (Thurst - 3) - 0.5 * Elevator (Pitch - 1) - Aileron (Roll - 0)
M: 3
O: 10000 10000 0 -10000 10000
S: 3 5 10000 10000 0 -10000 10000
S: 0 1 -10000 -10000 0 -10000 10000
S: 0 0 -10000 -10000 0 -10000 10000
Output 3 - Tail Servo Mixer
----------------
Tail Servo = Yaw (control index = 2)
M: 1
O: 10000 10000 0 -10000 10000
S: 0 2 10000 10000 0 -10000 10000
Output 4 - Motor speed mixer
-----------------
This would be the motor speed control output from governor power demand- not sure what index to use here?
M: 1
O: 10000 10000 0 -10000 10000
S: 0 3 0 20000 -10000 -10000 10000
+5 -2
View File
@@ -12,7 +12,10 @@
#
sh /etc/init.d/rc.mc_defaults
if tap_esc start -d /dev/ttyS4 -n 4
then
fi
set OUTPUT_MODE tap_esc
param set BAT_N_CELLS 4
set MIXER quad_x
set PWM_OUT 1234
+9 -3
View File
@@ -13,7 +13,13 @@
sh /etc/init.d/rc.mc_defaults
set MIXER hexa_x
param set MAV_TYPE 13
param set MC_YAWRATE_P 0.12
param set CAL_MAG0_ROT 6
# Need to set all 8 channels
set PWM_OUT 12345678
if tap_esc start -d /dev/ttyS4 -n 6
then
fi
set OUTPUT_MODE tap_esc
set MIXER hexa_x
+2 -2
View File
@@ -16,9 +16,9 @@ then
set OUTPUT_DEV /dev/pwm_output0
if [ $OUTPUT_MODE == uavcan_esc ]
if [ $OUTPUT_MODE == tap_esc ]
then
set OUTPUT_DEV /dev/uavcan/esc
set OUTPUT_DEV /dev/tap_esc
fi
if mixer load $OUTPUT_DEV $MIXER_FILE
+8 -19
View File
@@ -9,16 +9,19 @@ then
param set PE_POSNE_NOISE 0.5
param set PE_POSD_NOISE 1.25
param set NAV_ACC_RAD 2.0
param set RTL_RETURN_ALT 30.0
param set RTL_DESCEND_ALT 10.0
param set PWM_DISARMED 900
param set PWM_MIN 1075
param set PWM_MAX 1950
param set RTL_LAND_DELAY 0
fi
param set NAV_ACC_RAD 2.0
param set MIS_TAKEOFF_ALT 2.5
param set RTL_RETURN_ALT 30.0
param set RTL_DESCEND_ALT 10.0
param set RTL_LAND_DELAY 0
param set MPC_THR_MIN 0.10
param set MPC_MANTHR_MIN 0.04
# set environment variables (!= parameters)
set PWM_RATE 400
# tell the mixer to use parameters for these instead
@@ -33,17 +36,3 @@ set PWM_AUX_OUT 1234
set PWM_AUX_DISARMED 1500
set PWM_AUX_MIN 1000
set PWM_AUX_MAX 2000
# Transitional support: ensure suitable PWM min/max param values
if param compare PWM_MIN 1000
then
param set PWM_MIN 1075
fi
if param compare PWM_MAX 2000
then
param set PWM_MAX 1950
fi
if param compare PWM_DISARMED 0
then
param set PWM_DISARMED 900
fi
+8 -26
View File
@@ -7,40 +7,22 @@ if adc start
then
fi
if ms5611 -T 5607 -I start
then
fi
# External I2C bus
if hmc5883 -C -T -X start
then
fi
if lis3mdl -R 2 start
# Internal I2C bus
if mpu6000 -I -T 6000 start
then
fi
# Internal SPI bus is rotated 90 deg yaw
if hmc5883 -C -T -S -R 2 start
then
fi
# Internal SPI bus ICM-20608-G is rotated 90 deg yaw
if mpu6000 -R 2 -T 20608 start
then
fi
# Internal SPI bus mpu9250 is rotated 90 deg yaw
if mpu9250 -R 2 start
then
fi
if meas_airspeed start
then
fi
if sf1xx start
then
fi
# Wait 20 ms for sensors (because we need to wait for the HRT and work queue callbacks to fire)
usleep 20000
# Wait 50 ms for sensors (because we need to wait for the HRT and work queue callbacks to fire)
usleep 50000
if sensors start
then
fi
+265 -404
View File
@@ -1,38 +1,38 @@
#!nsh
#
# PX4FMU startup script.
# TAP startup script.
#
# NOTE: COMMENT LINES ARE REMOVED BEFORE STORED IN ROMFS.
#
# Serial map:
# /dev/ttyS0: GPS
# /dev/ttyS1: GB
# /dev/ttyS2: nsh shell / console
# /dev/ttyS3: payload
# /dev/ttyS4: esc bus
# /dev/ttyS5: RC input
#
# Start CDC/ACM serial driver
#
sercon
#
# Default to auto-start mode.
#
set MODE autostart
set TUNE_ERR ML<<CP4CP4CP4CP4CP4
set LOG_FILE /fs/microsd/bootlog.txt
#
# Try to mount the microSD card.
#
# REBOOTWORK this needs to start after the flight control loop
if mount -t vfat /dev/mmcsd0 /fs/microsd
then
# Start playing the startup tune
tone_alarm start
echo "microSD present"
else
tone_alarm MBAGP
if mkfatfs /dev/mmcsd0
then
if mount -t vfat /dev/mmcsd0 /fs/microsd
then
echo "INFO [init] MicroSD card formatted"
echo "microSD card formatted"
else
echo "ERROR [init] Format failed"
tone_alarm MNBG
@@ -44,431 +44,299 @@ else
fi
#
# Look for an init script on the microSD card.
# Disable autostart if the script found.
# Start the ORB (first app to start)
#
set FRC /fs/microsd/etc/rc.txt
if [ -f $FRC ]
uorb start
#
# Load parameters
#
set PARAM_FILE /fs/microsd/params
if mtd start
then
echo "INFO [init] Executing script: $FRC"
sh $FRC
set MODE custom
set PARAM_FILE /fs/mtd_params
fi
unset FRC
if [ $MODE == autostart ]
param select $PARAM_FILE
if param load
then
#
# Start the ORB (first app to start)
#
uorb start
#
# Load parameters
#
set PARAM_FILE /fs/microsd/params
if mtd start
else
if param reset
then
set PARAM_FILE /fs/mtd_params
fi
fi
param select $PARAM_FILE
if param load
tone_alarm start
#
# Start system state indicator
#
if rgbled start
then
fi
#
# Set parameters and env variables for selected AUTOSTART
#
if param compare SYS_AUTOSTART 0
then
param set SYS_AUTOSTART 6001
param set SYS_AUTOCONFIG 1
fi
#
# Set AUTOCNF flag to use it in AUTOSTART scripts
#
if param compare SYS_AUTOCONFIG 1
then
# Wipe out params except RC*
param reset_nostart RC*
set AUTOCNF yes
else
set AUTOCNF no
fi
#
# Set default values
#
set VEHICLE_TYPE none
set MIXER none
set OUTPUT_MODE none
set PWM_OUT none
set PWM_RATE none
set PWM_DISARMED none
set PWM_MIN none
set PWM_MAX none
set FMU_MODE pwm
set MAV_TYPE none
set FAILSAFE none
# Start canned airframe config
sh /etc/init.d/rc.autostart
#
# If autoconfig parameter was set, reset it and save parameters
#
if [ $AUTOCNF == yes ]
then
param set SYS_AUTOCONFIG 0
param save
fi
unset AUTOCNF
#
# Set default output if not set
#
if [ $OUTPUT_MODE == none ]
then
if [ $USE_IO == yes ]
then
set OUTPUT_MODE io
else
if param reset
set OUTPUT_MODE fmu
fi
fi
gps start -d /dev/ttyS0
# waypoint storage
# REBOOTWORK this needs to start in parallel
if dataman start
then
fi
#
# Sensors System (start before Commander so Preflight checks are properly run)
#
sh /etc/init.d/rc.sensors
commander start
#
# Start CPU load monitor
#
load_mon start
# Start MAVLink on the gimbal port
#mavlink start -r 1200 -d /dev/ttyS1
# Start MAVLink on USB, developers can use the MAVLink shell
mavlink start -r 60000 -d /dev/ttyACM0 -m config
#
# Logging
#
#if logger start -b 2 -t
#then
#fi
#
# Fixed wing setup
#
if [ $VEHICLE_TYPE == fw ]
then
echo "INFO [init] Fixedwing"
if [ $MIXER == none ]
then
# Set default mixer for fixed wing if not defined
set MIXER AERT
fi
if [ $MAV_TYPE == none ]
then
# Use MAV_TYPE = 1 (fixed wing) if not defined
set MAV_TYPE 1
fi
param set MAV_TYPE $MAV_TYPE
# Load mixer and configure outputs
sh /etc/init.d/rc.interface
# Start standard fixedwing apps
sh /etc/init.d/rc.fw_apps
fi
#
# Multicopters setup
#
if [ $VEHICLE_TYPE == mc ]
then
echo "INFO [init] Multicopter"
if [ $MIXER == none ]
then
echo "INFO [init] Mixer undefined"
fi
if [ $MAV_TYPE == none ]
then
# Use mixer to detect vehicle type
if [ $MIXER == quad_x -o $MIXER == quad_+ ]
then
set MAV_TYPE 2
fi
if [ $MIXER == quad_w ]
then
set MAV_TYPE 2
fi
if [ $MIXER == quad_h ]
then
set MAV_TYPE 2
fi
if [ $MIXER == tri_y_yaw- -o $MIXER == tri_y_yaw+ ]
then
set MAV_TYPE 15
fi
if [ $MIXER == hexa_x -o $MIXER == hexa_+ ]
then
set MAV_TYPE 13
fi
if [ $MIXER == hexa_cox ]
then
set MAV_TYPE 13
fi
if [ $MIXER == octo_x -o $MIXER == octo_+ ]
then
set MAV_TYPE 14
fi
fi
#
# Start system state indicator
#
if rgbled start
# Still no MAV_TYPE found
if [ $MAV_TYPE == none ]
then
fi
#
# Set AUTOCNF flag to use it in AUTOSTART scripts
#
if param compare SYS_AUTOCONFIG 1
then
# Wipe out params except RC*
param reset_nostart RC*
set AUTOCNF yes
echo "WARN [init] Unknown MAV_TYPE"
param set MAV_TYPE 2
else
set AUTOCNF no
fi
#
# Set default values
#
set VEHICLE_TYPE none
set MIXER none
set OUTPUT_MODE none
set PWM_OUT none
set PWM_RATE none
set PWM_DISARMED none
set PWM_MIN none
set PWM_MAX none
set FMU_MODE pwm
set MAVLINK_F default
set EXIT_ON_END no
set MAV_TYPE none
set FAILSAFE none
set USE_IO no
#
# Set parameters and env variables for selected AUTOSTART
#
if param compare SYS_AUTOSTART 0
then
echo "INFO [init] No autostart"
else
sh /etc/init.d/rc.autostart
fi
unset MODE
#
# If autoconfig parameter was set, reset it and save parameters
#
if [ $AUTOCNF == yes ]
then
param set SYS_AUTOCONFIG 0
param save
fi
unset AUTOCNF
#
# Set default output if not set
#
if [ $OUTPUT_MODE == none ]
then
if [ $USE_IO == yes ]
then
set OUTPUT_MODE io
else
set OUTPUT_MODE fmu
fi
fi
gps start -d /dev/ttyS0
# waypoint storage
# REBOOTWORK this needs to start in parallel
if dataman start
then
fi
#
# Sensors System (start before Commander so Preflight checks are properly run)
#
sh /etc/init.d/rc.sensors
commander start
#
# Start CPU load monitor
#
load_mon start
#
# Start primary output
#
set TTYS1_BUSY no
#
# Check if UAVCAN is enabled, default to it for ESCs
#
if param greater UAVCAN_ENABLE 2
then
set OUTPUT_MODE uavcan_esc
fi
# If OUTPUT_MODE == none then something is wrong with setup and we shouldn't try to enable output
if [ $OUTPUT_MODE != none ]
then
if [ $OUTPUT_MODE == uavcan_esc ]
then
if param compare UAVCAN_ENABLE 0
then
echo "INFO [init] OVERRIDING UAVCAN_ENABLE = 1" >> $LOG_FILE
param set UAVCAN_ENABLE 1
fi
fi
if [ $OUTPUT_MODE == fmu ]
then
if fmu mode_$FMU_MODE
then
else
echo "ERR [init] FMU start failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
fi
if fmu mode_pwm4
then
else
echo "ERROR [init] FMU mode_$FMU_MODE start failed" >> $LOG_FILE
tone_alarm $TUNE_ERR
fi
fi
mavlink start -r 1200 -d /dev/ttyS1
#
# Starting stuff according to UAVCAN_ENABLE value
#
if param greater UAVCAN_ENABLE 0
then
if uavcan start
then
else
tone_alarm $TUNE_ERR
fi
fi
if param greater UAVCAN_ENABLE 1
then
if uavcan start fw
then
else
tone_alarm $TUNE_ERR
fi
fi
#
# Optional drivers
#
# Sensors on the PWM interface bank
if param compare SENS_EN_LL40LS 1
then
if pwm_input start
then
if ll40ls start pwm
then
fi
fi
fi
# sf0x lidar sensor
if param compare SENS_EN_SF0X 1
then
sf0x 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
#
# Logging
#
if param compare SYS_LOGGER 0
then
if sdlog2 start -r 100 -a -b 9 -t
then
fi
else
if logger start -b 12 -t
then
fi
fi
#
# Fixed wing setup
#
if [ $VEHICLE_TYPE == fw ]
then
echo "INFO [init] Fixedwing"
if [ $MIXER == none ]
then
# Set default mixer for fixed wing if not defined
set MIXER AERT
fi
if [ $MAV_TYPE == none ]
then
# Use MAV_TYPE = 1 (fixed wing) if not defined
set MAV_TYPE 1
fi
param set MAV_TYPE $MAV_TYPE
# Load mixer and configure outputs
sh /etc/init.d/rc.interface
# Start standard fixedwing apps
sh /etc/init.d/rc.fw_apps
fi
#
# Multicopters setup
#
if [ $VEHICLE_TYPE == mc ]
# Load mixer and configure outputs
sh /etc/init.d/rc.interface
# Start standard multicopter apps
sh /etc/init.d/rc.mc_apps
fi
#
# VTOL setup
#
if [ $VEHICLE_TYPE == vtol ]
then
echo "INFO [init] VTOL"
if [ $MIXER == none ]
then
echo "INFO [init] Multicopter"
if [ $MIXER == none ]
then
echo "INFO [init] Mixer undefined"
fi
if [ $MAV_TYPE == none ]
then
# Use mixer to detect vehicle type
if [ $MIXER == quad_x -o $MIXER == quad_+ ]
then
set MAV_TYPE 2
fi
if [ $MIXER == quad_w ]
then
set MAV_TYPE 2
fi
if [ $MIXER == quad_h ]
then
set MAV_TYPE 2
fi
if [ $MIXER == tri_y_yaw- -o $MIXER == tri_y_yaw+ ]
then
set MAV_TYPE 15
fi
if [ $MIXER == hexa_x -o $MIXER == hexa_+ ]
then
set MAV_TYPE 13
fi
if [ $MIXER == hexa_cox ]
then
set MAV_TYPE 13
fi
if [ $MIXER == octo_x -o $MIXER == octo_+ ]
then
set MAV_TYPE 14
fi
fi
# Still no MAV_TYPE found
if [ $MAV_TYPE == none ]
then
echo "WARN [init] Unknown MAV_TYPE"
param set MAV_TYPE 2
else
param set MAV_TYPE $MAV_TYPE
fi
# Load mixer and configure outputs
sh /etc/init.d/rc.interface
# Start standard multicopter apps
sh /etc/init.d/rc.mc_apps
echo "WARN [init] VTOL mixer undefined"
fi
#
# VTOL setup
#
if [ $VEHICLE_TYPE == vtol ]
if [ $MAV_TYPE == none ]
then
echo "INFO [init] VTOL"
if [ $MIXER == none ]
# Use mixer to detect vehicle type
if [ $MIXER == caipirinha_vtol ]
then
echo "WARN [init] VTOL mixer undefined"
set MAV_TYPE 19
fi
if [ $MAV_TYPE == none ]
if [ $MIXER == firefly6 ]
then
# Use mixer to detect vehicle type
if [ $MIXER == caipirinha_vtol ]
then
set MAV_TYPE 19
fi
if [ $MIXER == firefly6 ]
then
set MAV_TYPE 21
fi
if [ $MIXER == quad_x_pusher_vtol ]
then
set MAV_TYPE 22
fi
set MAV_TYPE 21
fi
# Still no MAV_TYPE found
if [ $MAV_TYPE == none ]
if [ $MIXER == quad_x_pusher_vtol ]
then
echo "WARN [init] Unknown MAV_TYPE"
param set MAV_TYPE 19
else
param set MAV_TYPE $MAV_TYPE
set MAV_TYPE 22
fi
# Load mixer and configure outputs
sh /etc/init.d/rc.interface
# Start standard vtol apps
sh /etc/init.d/rc.vtol_apps
fi
#
# Rover setup
#
if [ $VEHICLE_TYPE == rover ]
# Still no MAV_TYPE found
if [ $MAV_TYPE == none ]
then
# 10 is MAV_TYPE_GROUND_ROVER
set MAV_TYPE 10
# Load mixer and configure outputs
sh /etc/init.d/rc.interface
# Start standard rover apps
sh /etc/init.d/rc.axialracing_ax10_apps
param set MAV_TYPE 10
echo "WARN [init] Unknown MAV_TYPE"
param set MAV_TYPE 19
else
param set MAV_TYPE $MAV_TYPE
fi
unset MIXER
unset MAV_TYPE
unset OUTPUT_MODE
# Load mixer and configure outputs
sh /etc/init.d/rc.interface
#
# Start the navigator
#
navigator start
# Start standard vtol apps
sh /etc/init.d/rc.vtol_apps
fi
#
# Generic setup (autostart ID not found)
#
if [ $VEHICLE_TYPE == none ]
then
echo "WARN [init] No autostart ID found"
fi
#
# Rover setup
#
if [ $VEHICLE_TYPE == rover ]
then
# 10 is MAV_TYPE_GROUND_ROVER
set MAV_TYPE 10
# Start any custom addons
set FEXTRAS /fs/microsd/etc/extras.txt
if [ -f $FEXTRAS ]
then
echo "INFO [init] Addons script: $FEXTRAS"
sh $FEXTRAS
fi
unset FEXTRAS
# Load mixer and configure outputs
sh /etc/init.d/rc.interface
# Run no SD alarm
if [ $LOG_FILE == /dev/null ]
then
# Play SOS
tone_alarm error
fi
# Start standard rover apps
sh /etc/init.d/rc.axialracing_ax10_apps
# End of autostart
param set MAV_TYPE 10
fi
unset MIXER
unset MAV_TYPE
unset OUTPUT_MODE
#
# Start the RC input driver
#
if fmu mode_rcin
then
fi
#
# Start the navigator
#
if navigator start
then
fi
# There is no further script processing, so we can free some RAM
@@ -477,10 +345,3 @@ unset TUNE_ERR
# Boot is complete, inform MAVLink app(s) that the system is now fully up and running
mavlink boot_complete
if [ $EXIT_ON_END == yes ]
then
echo "INFO [init] NSH exit"
exit
fi
unset EXIT_ON_END
+8 -2
View File
@@ -16,8 +16,14 @@ then
echo
rm -f $file.pretty
echo $file 'bad formatting, please run "./Tools/fix_code_style.sh' $file'"'
exit 1
if [[ $PX4_ASTYLE_FIX -eq 1 ]]
then
${DIR}/fix_code_style.sh $file
else
echo $file 'bad formatting, please run "./Tools/fix_code_style.sh' $file'"'
exit 1
fi
fi
fi
+20 -39
View File
@@ -1,47 +1,28 @@
#!/usr/bin/env bash
set -eu
failed=0
if [[ "$@" == "--fix" ]]
then
export PX4_ASTYLE_FIX=1
fi
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
find \
src/drivers \
src/examples \
src/firmware \
src/include \
src/lib/controllib \
src/lib/conversion \
src/lib/geo \
src/lib/geo_lookup \
src/lib/launchdetection \
src/lib/rc \
src/lib/tailsitter_recovery \
src/lib/terrain_estimation \
src/lib/version \
src/modules/attitude_estimator_q \
src/modules/bottle_drop \
src/modules/controllib_test \
src/modules/dataman \
src/modules/fw_att_control \
src/modules/fw_pos_control_l1 \
src/modules/gpio_led \
src/modules/land_detector \
src/modules/local_position_estimator \
src/modules/logger \
src/modules/mavlink/mavlink_tests \
src/modules/muorb \
src/modules/param \
src/modules/px4iofirmware \
src/modules/replay \
src/modules/segway \
src/modules/sensors \
src/modules/simulator \
src/modules/systemlib \
src/modules/unit_test \
src/modules/uORB \
src/modules/vtol_att_control \
src/platforms \
src/systemcmds \
find src \
-path src/lib/DriverFramework -prune -o \
-path src/lib/ecl -prune -o \
-path src/lib/external_lgpl -prune -o \
-path src/lib/mathlib -prune -o \
-path src/lib/matrix -prune -o \
-path src/modules/attitude_estimator_ekf -prune -o \
-path src/modules/commander -prune -o \
-path src/examples/ekf_att_pos_estimator -prune -o \
-path src/modules/mavlink -prune -o \
-path src/examples/attitude_estimator_ekf -prune -o \
-path src/modules/navigator -prune -o \
-path src/modules/sdlog2 -prune -o \
-path src/modules/uavcan -prune -o \
-path src/modules/uavcan/libuavcan -prune -o \
-type f \( -name "*.c" -o -name "*.h" -o -name "*.cpp" -o -name "*.hpp" \) \
-not -name '*generated.h' \
-not -name '*uthash.h' \
+54
View File
@@ -0,0 +1,54 @@
#!/bin/bash
while getopts "b:t:" opt; do
case "${opt}" in
b)
builddir=$OPTARG
;;
t)
tool=$OPTARG
;;
esac
done
echo "builddir = ${builddir}, tool = ${tool}"
case "${builddir}" in
"build_posix_rpi_cross")
CXX_INC=$(cd ${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian/arm-linux-gnueabihf/include/c++/*; pwd)
EXTRA_ARG1=-I${CXX_INC}
EXTRA_ARG2=-I${CXX_INC}/arm-linux-gnueabihf
EXTRA_ARG3=-I${CXX_INC}/backward
extra_args="--extra-arg=-I${CXX_INC} --extra-arg=-I${CXX_INC}/arm-linux-gnueabihf --extra-arg=-I${CXX_INC}/backward"
;;
"build_posix_sitl_default")
;;
*)
echo "unknown build dir: ${builddir}"
;;
esac
COMPILE_DB=$(/bin/pwd)/${builddir}
if [[ ! -f ${COMPILE_DB}/compile_commands.json ]]; then
echo "compile_commands.json not found in ${COMPILE_DB}"
exit 1
fi
case "${tool}" in
"clang-check")
command=clang-check;
option=-analyze;
;;
"clang-tidy")
command=clang-tidy
;;
esac
grep file ${COMPILE_DB}/compile_commands.json |
awk '{ print $2; }' |
sed 's/\"//g' |
while read FILE; do
(cd $(dirname ${FILE});
${command} ${option} -p ${COMPILE_DB} ${extra_args} $(basename ${FILE})
);
done
@@ -8,14 +8,22 @@ logconv.m: This is a MATLAB script which will automatically convert and display
sdlog2_dump.py: This is a Python script (compatible with v2 and v3) which converts the self-describing binary log format to a CSV file. To export a CSV file from within a shell (Windows CMD or BASH on Linux / Mac OS), run:
python sdlog2_dump.py log001.bin -f "export.csv" -t "TIME" -d "," -n ""
```
python sdlog2_dump.py log001.bin -f "export.csv" -t "TIME" -d "," -n ""
```
geo_tag_images.py: Use this script to geotag a set of images. It uses GPS time and file creation date to synchronize the images, so it needs that the images have a valid creation date.
geo_tag_images.py: Use this script to geotag a set of images. It uses GPS time and file creation date to synchronize the images, so it needs that the images have a valid creation date. Can generate a KML file to view where the photos were taken in Google Earth (including height).
python geo_tag_images.py --logfile=mylog.bin --input=images/ --output=tagged/
```sh
python geo_tag_images.py --logfile=mylog.bin --input=images/ --output=tagged/ --kml -v
python geo_tag_images.py -l=mylog.bin -i=images/ -o=tagged/ --kml -v
```
geotagging.py: Use this script to geotag a set of images. It uses the CAM trigger data from the log file for image association.
python geotagging.py --logfile=mylog.bin --input=images/ --output=tagged/
```sh
python geotagging.py --logfile=mylog.bin --input=images/ --output=tagged/
```
Python can be downloaded from http://python.org, but is available as default on Mac OS and Linux.
+62 -33
View File
@@ -9,7 +9,7 @@
# Example Syntax:
# python geotag.py --logfile=log001.bin --input=images/ --output=imagesWithTag/ --offset=-0.4 -v
#
# Author: Hector Azpurua
# Author: Hector Azpurua hector@azpurua.com
# Based on the script of Andreas Bircher
import os
@@ -22,6 +22,7 @@ import argparse
from lxml import etree
import datetime, calendar
from shutil import copyfile
from subprocess import check_output
from pykml.factory import KML_ElementMaker as KML
from pykml.factory import GX_ElementMaker as GX
@@ -50,7 +51,7 @@ class Main:
self.logfile = args['logfile']
self.input = args['input']
self.output = args['output']
self.klm = args['klm']
self.kml = args['kml']
self.verbose = args['verbose']
self.offset = args['offset']
self.time_tresh = args['treshold']
@@ -58,6 +59,9 @@ class Main:
self.tdiff_list = []
self.non_processed_files = []
self.tagged_gps = []
print '[INFO] Loading logs and images locations...'
self.gps_list = self.load_gps_from_log(self.logfile, self.offset)
self.img_list = self.load_image_list(self.input)
@@ -73,11 +77,11 @@ class Main:
self.tag_images()
if self.klm and len(self.tdiff_list) > 0:
self.gen_klm()
if self.kml and len(self.tdiff_list) > 0:
self.gen_kml()
if len(self.non_processed_files) > 0:
print '[WARNING] Some images werent processed:'
print '[WARNING] Some images werent processed (', len(self.non_processed_files), 'of', len(self.img_list), '):'
for elem in self.non_processed_files:
print '\t', elem
@@ -132,7 +136,7 @@ class Main:
return local_dt.replace(microsecond=utc_dt.microsecond)
def gen_klm(self):
def gen_kml(self):
"""
Generate a KML file with keypoints on the locations of the pictures, including height
:return:
@@ -171,7 +175,7 @@ class Main:
KML.styleUrl('#{0}'.format(style_dot)),
KML.Point(
KML.extrude(True),
KML.altitudeMode('relativeToGround'),
KML.altitudeMode('absolute'),
KML.coordinates("{},{},{}".format(gps.lon, gps.lat, gps.alt))
),
KML.name(str(ii)) if ii % 5 == 0 or ii == 1 else KML.name()
@@ -183,7 +187,7 @@ class Main:
KML.Placemark(
KML.styleUrl('#{0}'.format(style_path)),
KML.LineString(
KML.altitudeMode('relativeToGround'),
KML.altitudeMode('absolute'),
KML.coordinates(
' '.join(["{},{},{}".format(gps.lon, gps.lat, gps.alt) for gps in self.tagged_gps])
)
@@ -207,9 +211,18 @@ class Main:
:param elem:
:return:
"""
dlist_len = len(datetime_list)
i = bisect.bisect_left(datetime_list, elem)
# Cleanup of the indices
if i < 0:
i = 0
elif i >= dlist_len:
i = dlist_len - 1
date = datetime_list[i]
diff = (date - elem).total_seconds()
diff = abs((date - elem).total_seconds())
if diff > self.time_tresh:
return -1, diff
@@ -258,32 +271,46 @@ class Main:
:param offset:
:return:
"""
os.system('python sdlog2_dump.py ' + log_file + ' -f log.csv')
f = open('log.csv', 'rb')
reader = csv.reader(f)
headers = reader.next()
line = {}
for h in headers:
line[h] = []
for row in reader:
for h, v in zip(headers, row):
line[h].append(v)
gps_list = []
for seq in range(0, len(line['GPS_Lat']) - 1):
gps_time = int(line['GPS_TimeMS'][seq + 1])
gps_week = int(line['GPS_Week'][seq + 1])
gps_lat = float(line['GPS_Lat'][seq + 1])
gps_lon = float(line['GPS_Lng'][seq + 1])
gps_alt = float(line['GPS_RelAlt'][seq + 1])
out = check_output(["python", "sdlog2_dump.py", log_file, "-m GPS", "-v"])
for line in out.splitlines():
if not line.startswith("MSG GPS:"):
continue
vdict = {}
pairs = re.split(r'[;,:]\s*', line)
for pair in pairs:
e = pair.split('=')
if len(e) == 2:
vdict[e[0]] = float(e[1])
gps_time = vdict['TimeMS']
gps_week = vdict['Week']
gps_lat = vdict['Lat']
gps_lon = vdict['Lng']
gps_alt = vdict['Alt']
date = self.gps_week_seconds_to_datetime(gps_week, gps_time, leapmillis=offset)
print date
gps_list.append(GpsPosition(date, gps_lat, gps_lon, gps_alt))
return gps_list
def get_image_creation_date(self, filename):
exiv_image = pyexiv2.ImageMetadata(filename)
exiv_image.read()
# Prefer DateTime/Original over the other values
if 'Exif.Photo.DateTimeOriginal' in exiv_image:
cdate = exiv_image['Exif.Photo.DateTimeOriginal'].value
return cdate
elif 'Exif.Image.DateTime' in exiv_image:
cdate = exiv_image['Exif.Image.DateTime'].value
return cdate
else:
epoch = os.path.getmtime(filename)
return datetime.datetime.fromtimestamp(epoch)
def load_image_list(self, input_folder, file_type='jpg'):
"""
Load image list from a folder given a file type
@@ -304,15 +331,16 @@ class Main:
tagged_gps = []
img_size = len(self.img_list)
print '[INFO] Number of images:', img_size
print '[INFO] Number of gps logs:', len(self.gps_list)
dt_list = [x.timestamp for x in self.gps_list]
img_seq = 1
for i in xrange(img_size):
base_path, filename = os.path.split(self.img_list[i])
cdate = datetime.datetime.fromtimestamp(os.path.getmtime(self.img_list[i]))
cdate = self.get_image_creation_date(self.img_list[i])
gps_i, img_tdiff = self.get_closest_datetime_index(dt_list, cdate)
base_path, filename = os.path.split(self.img_list[i])
if gps_i == -1:
self.non_processed_files.append(filename)
@@ -326,8 +354,9 @@ class Main:
(i+1, img_size, filename, cdate, closest_gps.timestamp, img_tdiff, closest_gps.lat, closest_gps.lon, closest_gps.alt)
print msg
copyfile(self.img_list[i], self.output + str(img_seq) + filename)
self.set_gps_location(self.output + str(img_seq) + filename, closest_gps.lat, closest_gps.lon, closest_gps.alt)
output_filename = self.output + str(img_seq) + '_' + filename
copyfile(self.img_list[i], output_filename)
self.set_gps_location(output_filename, closest_gps.lat, closest_gps.lon, closest_gps.alt)
self.tagged_gps.append(closest_gps)
img_seq += 1
@@ -359,7 +388,7 @@ class Main:
default=-17000, required=False, type=float
)
parser.add_argument(
'-klm', '--klm', help='Save the in KML format the information of all tagged images.',
'-kml', '--kml', help='Save the in KML format the information of all tagged images.',
required=False, action='store_true'
)
parser.add_argument(
+28
View File
@@ -0,0 +1,28 @@
#!/bin/bash
#
# Setup environment to make PX4 visible to Gazebo.
#
# Note, this is not necessary if using a ROS catkin workspace with the px4
# package as the paths are exported.
#
# License: according to LICENSE.md in the root directory of the PX4 Firmware repository
if [ "$#" != 2 ]
then
echo usage: source setup_gazebo.bash src_dir build_dir
echo ""
return 1
fi
SRC_DIR=$1
BUILD_DIR=$2
# setup Gazebo env and update package path
export GAZEBO_PLUGIN_PATH=${BUILD_DIR}/build_gazebo:${GAZEBO_PLUGIN_PATH}
export GAZEBO_MODEL_PATH=${GAZEBO_MODEL_PATH}:${SRC_DIR}/Tools/sitl_gazebo/models
# Disabling the remote model download seems only necessary with Gazebo 6
#export GAZEBO_MODEL_DATABASE_URI=""
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${SRC_DIR}/Tools/sitl_gazebo/Build/msgs/:${BUILD_DIR}/build_gazebo
echo -e "GAZEBO_PLUGIN_PATH $GAZEBO_PLUGIN_PATH"
echo -e "GAZEBO_MODEL_PATH $GAZEBO_MODEL_PATH"
echo -e "LD_LIBRARY_PATH $LD_LIBRARY_PATH"
+39 -37
View File
@@ -1,22 +1,29 @@
#!/bin/bash
rc_script=$1
debugger=$2
program=$3
model=$4
build_path=$5
curr_dir=`pwd`
set -e
echo args: $@
sitl_bin=$1
label=$2
debugger=$3
program=$4
model=$5
src_path=$6
build_path=$7
echo SITL ARGS
echo rc_script: $rc_script
echo sitl_bin: $sitl_bin
echo label: $label
echo debugger: $debugger
echo program: $program
echo model: $model
echo src_path: $src_path
echo build_path: $build_path
mkdir -p $build_path/src/firmware/posix/rootfs/fs/microsd
mkdir -p $build_path/src/firmware/posix/rootfs/eeprom
touch $build_path/src/firmware/posix/rootfs/eeprom/parameters
working_dir=`pwd`
sitl_bin=$build_path/src/firmware/posix/px4
if [ "$chroot" == "1" ]
then
@@ -35,32 +42,29 @@ fi
if [ "$#" -lt 5 ]
then
echo usage: sitl_run.sh rc_script debugger program model build_path
echo usage: sitl_run.sh rc_script debugger program model devel_path
echo ""
exit 1
fi
# kill process names that might stil
# be running from last time
pkill gazebo
pkill px4
jmavsim_pid=`jps | grep Simulator | cut -d" " -f1`
pgrep gazebo && pkill gazebo
pgrep px4 && pkill px4
jmavsim_pid=`ps aux | grep java | grep Simulator | cut -d" " -f1`
if [ -n "$jmavsim_pid" ]
then
kill $jmavsim_pid
fi
set -e
cd $build_path/..
cp Tools/posix_lldbinit $build_path/src/firmware/posix/.lldbinit
cp Tools/posix.gdbinit $build_path/src/firmware/posix/.gdbinit
cp $src_path/Tools/posix_lldbinit $working_dir/.lldbinit
cp $src_path/Tools/posix.gdbinit $working_dir/.gdbinit
SIM_PID=0
if [ "$program" == "jmavsim" ] && [ ! -n "$no_sim" ]
then
cd Tools/jMAVSim
cd $src_path/Tools/jMAVSim
ant create_run_jar copy_res
cd out/production
java -Djava.ext.dirs= -jar jmavsim_run.jar -udp 127.0.0.1:14560 &
@@ -71,15 +75,9 @@ then
if [ -x "$(command -v gazebo)" ]
then
# Set the plugin path so Gazebo finds our model and sim
export GAZEBO_PLUGIN_PATH=$curr_dir/build_gazebo:${GAZEBO_PLUGIN_PATH}
# Set the model path so Gazebo finds the airframes
export GAZEBO_MODEL_PATH=${GAZEBO_MODEL_PATH}:$curr_dir/Tools/sitl_gazebo/models
# The next line would disable online model lookup, can be commented in, in case of unstable behaviour.
# export GAZEBO_MODEL_DATABASE_URI=""
export SITL_GAZEBO_PATH=$curr_dir/Tools/sitl_gazebo
make --no-print-directory gazebo_build
source $src_path/Tools/setup_gazebo.bash ${src_path} ${build_path}
gzserver --verbose $curr_dir/Tools/sitl_gazebo/worlds/${model}.world &
gzserver --verbose ${src_path}/Tools/sitl_gazebo/worlds/${model}.world &
SIM_PID=`echo $!`
if [[ -n "$HEADLESS" ]]; then
@@ -98,37 +96,41 @@ then
# This is not a simulator, but a log file to replay
# Check if we need to creat a param file to allow user to change parameters
if ! [ -f "${build_path}/src/firmware/posix/rootfs/replay_params.txt" ]
if ! [ -f "$rootfs/replay_params.txt" ]
then
touch ${build_path}/src/firmware/posix/rootfs/replay_params.txt
touch $rootfs/replay_params.txt
fi
fi
cd $build_path/src/firmware/posix
cd $working_dir
if [ "$logfile" != "" ]
then
cp $logfile rootfs/replay.px4log
cp $logfile $rootfs/replay.px4log
fi
# Do not exit on failure now from here on because we want the complete cleanup
set +e
sitl_command="$sudo_enabled $sitl_bin $chroot_enabled $src_path $src_path/${label}/${model}"
echo SITL COMMAND: $sitl_command
# Start Java simulator
if [ "$debugger" == "lldb" ]
then
lldb -- px4 ../../../../${rc_script}_${program}_${model}
lldb -- $sitl_command
elif [ "$debugger" == "gdb" ]
then
gdb --args px4 ../../../../${rc_script}_${program}_${model}
gdb --args $sitl_command
elif [ "$debugger" == "ddd" ]
then
ddd --debugger gdb --args px4 ../../../../${rc_script}_${program}_${model}
ddd --debugger gdb --args $sitl_command
elif [ "$debugger" == "valgrind" ]
then
valgrind ./px4 ../../../../${rc_script}_${program}_${model}
valgrind $sitl_command
else
$sudo_enabled ./px4 $chroot_enabled ../../../../${rc_script}_${program}_${model}
$sitl_command
fi
if [ "$program" == "jmavsim" ]
+45 -45
View File
@@ -136,14 +136,14 @@ function(px4_add_git_submodule)
REQUIRED TARGET PATH
ARGN ${ARGN})
string(REPLACE "/" "_" NAME ${PATH})
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/git_init_${NAME}.stamp
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND touch ${CMAKE_BINARY_DIR}/git_init_${NAME}.stamp
DEPENDS ${CMAKE_SOURCE_DIR}/.gitmodules
add_custom_command(OUTPUT ${PX4_BINARY_DIR}/git_init_${NAME}.stamp
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
COMMAND touch ${PX4_BINARY_DIR}/git_init_${NAME}.stamp
DEPENDS ${PX4_SOURCE_DIR}/.gitmodules
)
add_custom_target(${TARGET}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
DEPENDS ${CMAKE_BINARY_DIR}/git_init_${NAME}.stamp
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
DEPENDS ${PX4_BINARY_DIR}/git_init_${NAME}.stamp
)
endfunction()
@@ -371,7 +371,7 @@ function(px4_generate_messages)
endif()
# headers
set(msg_out_path ${CMAKE_BINARY_DIR}/src/modules/uORB/topics)
set(msg_out_path ${PX4_BINARY_DIR}/src/modules/uORB/topics)
set(msg_list)
foreach(msg_file ${MSG_FILES})
get_filename_component(msg ${msg_file} NAME_WE)
@@ -389,15 +389,15 @@ function(px4_generate_messages)
-d msg
-o ${msg_out_path}
-e msg/templates/uorb
-t ${CMAKE_BINARY_DIR}/topics_temporary_header
-t ${PX4_BINARY_DIR}/topics_temporary_header
DEPENDS ${DEPENDS} ${MSG_FILES}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
COMMENT "Generating uORB topic headers"
VERBATIM
)
# !sources
set(msg_source_out_path ${CMAKE_BINARY_DIR}/topics_sources)
set(msg_source_out_path ${PX4_BINARY_DIR}/topics_sources)
set(msg_source_files_out ${msg_source_out_path}/uORBTopics.cpp)
foreach(msg ${msg_list})
list(APPEND msg_source_files_out ${msg_source_out_path}/${msg}.cpp)
@@ -410,9 +410,9 @@ function(px4_generate_messages)
-d msg
-o ${msg_source_out_path}
-e msg/templates/uorb
-t ${CMAKE_BINARY_DIR}/topics_temporary_sources
-t ${PX4_BINARY_DIR}/topics_temporary_sources
DEPENDS ${DEPENDS} ${MSG_FILES}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
COMMENT "Generating uORB topic sources"
VERBATIM
)
@@ -427,7 +427,7 @@ function(px4_generate_messages)
# multi messages for target OS
set(msg_multi_out_path
${CMAKE_BINARY_DIR}/src/platforms/${OS}/px4_messages)
${PX4_BINARY_DIR}/src/platforms/${OS}/px4_messages)
set(msg_multi_files_out)
foreach(msg ${msg_list})
list(APPEND msg_multi_files_out ${msg_multi_out_path}/px4_${msg}.h)
@@ -440,10 +440,10 @@ function(px4_generate_messages)
-d msg
-o ${msg_multi_out_path}
-e msg/templates/px4/uorb
-t ${CMAKE_BINARY_DIR}/multi_topics_temporary/${OS}
-t ${PX4_BINARY_DIR}/multi_topics_temporary/${OS}
-p "px4_"
DEPENDS ${DEPENDS} ${MSG_FILES}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
COMMENT "Generating uORB topic multi headers for ${OS}"
VERBATIM
)
@@ -504,9 +504,9 @@ function(px4_add_upload)
px4_join(OUT serial_ports LIST "${serial_ports}" GLUE ",")
add_custom_target(${OUT}
COMMAND ${PYTHON_EXECUTABLE}
${CMAKE_SOURCE_DIR}/Tools/px_uploader.py --port ${serial_ports} ${BUNDLE}
${PX4_SOURCE_DIR}/Tools/px_uploader.py --port ${serial_ports} ${BUNDLE}
DEPENDS ${BUNDLE}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
WORKING_DIRECTORY ${PX4_BINARY_DIR}
COMMENT "uploading ${BUNDLE}"
VERBATIM
USES_TERMINAL
@@ -523,9 +523,9 @@ function(px4_add_adb_push)
ARGN ${ARGN})
add_custom_target(${OUT}
COMMAND ${CMAKE_SOURCE_DIR}/Tools/adb_upload.sh ${FILES} ${DEST}
COMMAND ${PX4_SOURCE_DIR}/Tools/adb_upload.sh ${FILES} ${DEST}
DEPENDS ${DEPENDS}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
WORKING_DIRECTORY ${PX4_BINARY_DIR}
COMMENT "uploading ${BUNDLE}"
VERBATIM
USES_TERMINAL
@@ -541,9 +541,9 @@ function(px4_add_adb_push_to_bebop)
ARGN ${ARGN})
add_custom_target(${OUT}
COMMAND ${CMAKE_SOURCE_DIR}/Tools/adb_upload_to_bebop.sh ${FILES} ${DEST}
COMMAND ${PX4_SOURCE_DIR}/Tools/adb_upload_to_bebop.sh ${FILES} ${DEST}
DEPENDS ${DEPENDS}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
WORKING_DIRECTORY ${PX4_BINARY_DIR}
COMMENT "uploading ${BUNDLE}"
VERBATIM
USES_TERMINAL
@@ -559,9 +559,9 @@ function(px4_add_scp_push)
ARGN ${ARGN})
add_custom_target(${OUT}
COMMAND ${CMAKE_SOURCE_DIR}/Tools/scp_upload.sh ${FILES} ${DEST}
COMMAND ${PX4_SOURCE_DIR}/Tools/scp_upload.sh ${FILES} ${DEST}
DEPENDS ${DEPENDS}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
WORKING_DIRECTORY ${PX4_BINARY_DIR}
COMMENT "uploading ${BUNDLE}"
VERBATIM
USES_TERMINAL
@@ -761,21 +761,21 @@ function(px4_add_common_flags)
)
set(added_include_dirs
${CMAKE_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/src
${CMAKE_SOURCE_DIR}/src/modules
${CMAKE_SOURCE_DIR}/src/include
${CMAKE_SOURCE_DIR}/src/lib
${CMAKE_SOURCE_DIR}/src/platforms
${PX4_SOURCE_DIR}/src
${PX4_BINARY_DIR}
${PX4_BINARY_DIR}/src
${PX4_SOURCE_DIR}/src/modules
${PX4_SOURCE_DIR}/src/include
${PX4_SOURCE_DIR}/src/lib
${PX4_SOURCE_DIR}/src/platforms
# TODO Build/versioning was in Makefile,
# do we need this, how does it work with cmake
${CMAKE_SOURCE_DIR}/src/drivers/boards/${BOARD}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/src/modules/px4_messages
${CMAKE_BINARY_DIR}/src/modules
${CMAKE_SOURCE_DIR}/mavlink/include/mavlink
${CMAKE_SOURCE_DIR}/src/lib/DriverFramework/framework/include
${PX4_SOURCE_DIR}/src/drivers/boards/${BOARD}
${PX4_BINARY_DIR}
${PX4_BINARY_DIR}/src/modules/px4_messages
${PX4_BINARY_DIR}/src/modules
${PX4_SOURCE_DIR}/mavlink/include/mavlink
${PX4_SOURCE_DIR}/src/lib/DriverFramework/framework/include
)
list(APPEND added_include_dirs
@@ -858,19 +858,19 @@ function(px4_create_git_hash_header)
COMMAND git describe --always --tags
OUTPUT_VARIABLE git_tag
OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
)
message(STATUS "GIT_TAG = ${git_tag}")
execute_process(
COMMAND git rev-parse --verify HEAD
OUTPUT_VARIABLE git_version
OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
WORKING_DIRECTORY ${PX4_SOURCE_DIR}
)
#message(STATUS "GIT_VERSION = ${git_version}")
set(git_version_short)
string(SUBSTRING ${git_version} 1 16 git_version_short)
configure_file(${CMAKE_SOURCE_DIR}/cmake/templates/build_git_version.h.in ${HEADER} @ONLY)
configure_file(${PX4_SOURCE_DIR}/cmake/templates/build_git_version.h.in ${HEADER} @ONLY)
endfunction()
#=============================================================================
@@ -897,12 +897,12 @@ function(px4_generate_parameters_xml)
ONE_VALUE OUT BOARD
REQUIRED OUT BOARD
ARGN ${ARGN})
set(path ${CMAKE_SOURCE_DIR}/src)
set(path ${PX4_SOURCE_DIR}/src)
file(GLOB_RECURSE param_src_files
${CMAKE_SOURCE_DIR}/src/*params.c
${PX4_SOURCE_DIR}/src/*params.c
)
add_custom_command(OUTPUT ${OUT}
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/Tools/px_process_params.py
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_process_params.py
-s ${path} --board CONFIG_ARCH_${BOARD} --xml --inject-xml
DEPENDS ${param_src_files}
)
@@ -944,7 +944,7 @@ function(px4_generate_parameters_source)
set(SCOPE "")
endif()
add_custom_command(OUTPUT ${generated_files}
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/Tools/px_generate_params.py ${XML} ${SCOPE}
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_generate_params.py ${XML} ${SCOPE}
DEPENDS ${XML} ${DEPS} ${SCOPE}
)
set(${OUT} ${generated_files} PARENT_SCOPE)
@@ -975,10 +975,10 @@ function(px4_generate_airframes_xml)
ONE_VALUE OUT BOARD
REQUIRED OUT BOARD
ARGN ${ARGN})
set(process_airframes ${CMAKE_SOURCE_DIR}/Tools/px_process_airframes.py)
set(process_airframes ${PX4_SOURCE_DIR}/Tools/px_process_airframes.py)
add_custom_command(OUTPUT ${OUT}
COMMAND ${PYTHON_EXECUTABLE} ${process_airframes}
-a ${CMAKE_SOURCE_DIR}/ROMFS/px4fmu_common/init.d
-a ${PX4_SOURCE_DIR}/ROMFS/px4fmu_common/init.d
--board CONFIG_ARCH_BOARD_${BOARD} --xml
)
set(${OUT} ${${OUT}} PARENT_SCOPE)
@@ -1,8 +1,6 @@
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(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
set(config_module_list
#
@@ -11,43 +9,19 @@ set(config_module_list
drivers/device
drivers/stm32
drivers/stm32/adc
drivers/stm32/tone_alarm
drivers/led
drivers/px4fmu
drivers/px4io
drivers/boards/px4fmu-v2
drivers/rgbled
drivers/mpu6000
drivers/mpu9250
drivers/lsm303d
drivers/l3gd20
drivers/hmc5883
#drivers/px4fmu
drivers/boards/asc-v1
drivers/rgbled_pwm
drivers/tap_esc
drivers/mpu6500
drivers/ms5611
#drivers/mb12xx
drivers/srf02
drivers/sf0x
drivers/ll40ls
drivers/trone
drivers/hmc5883
drivers/gps
drivers/pwm_out_sim
#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/px4flow
#drivers/oreoled
drivers/gimbal
drivers/pwm_input
drivers/camera_trigger
drivers/bst
#drivers/snapdragon_rc_pwm
#drivers/lis3mdl
#
# System commands
@@ -57,18 +31,15 @@ set(config_module_list
systemcmds/param
systemcmds/perf
systemcmds/pwm
systemcmds/esc_calib
systemcmds/motor_test
systemcmds/reboot
#systemcmds/topic_listener
systemcmds/top
systemcmds/config
systemcmds/nshterm
systemcmds/mtd
systemcmds/dumpfile
systemcmds/ver
#systemcmds/sd_bench
#systemcmds/tests
systemcmds/motor_ramp
systemcmds/topic_listener
#
# General system control
@@ -77,8 +48,6 @@ set(config_module_list
modules/load_mon
modules/navigator
modules/mavlink
#modules/gpio_led
modules/uavcan
modules/land_detector
#
@@ -89,7 +58,6 @@ set(config_module_list
#
# Vehicle Control
#
# modules/segway # XXX Needs GCC 4.7 fix
modules/fw_pos_control_l1
modules/fw_att_control
modules/mc_att_control
@@ -100,7 +68,6 @@ set(config_module_list
# Logging
#
modules/logger
modules/sdlog2
#
# Library modules
@@ -130,41 +97,8 @@ set(config_module_list
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
platforms/common
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
# 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
@@ -173,12 +107,9 @@ set(config_extra_builtin_cmds
)
set(config_io_board
px4io-v2
)
set(config_extra_libs
uavcan
uavcan_stm32_driver
)
set(config_io_extra_libs
@@ -187,9 +118,11 @@ set(config_io_extra_libs
add_custom_target(sercon)
set_target_properties(sercon PROPERTIES
PRIORITY "SCHED_PRIORITY_DEFAULT"
MAIN "sercon" STACK_MAIN "2048")
MAIN "sercon"
STACK_MAIN "2048")
add_custom_target(serdis)
set_target_properties(serdis PROPERTIES
PRIORITY "SCHED_PRIORITY_DEFAULT"
MAIN "serdis" STACK_MAIN "2048")
MAIN "serdis"
STACK_MAIN "2048")
+1 -2
View File
@@ -1,6 +1,6 @@
include(nuttx/px4_impl_nuttx)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
set(config_uavcan_num_ifaces 2)
@@ -101,7 +101,6 @@ set(config_module_list
# Estimation modules (EKF/ SO3 / other filters)
#
modules/attitude_estimator_q
modules/ekf_att_pos_estimator
modules/position_estimator_inav
modules/local_position_estimator
modules/ekf2
@@ -1,6 +1,6 @@
include(nuttx/px4_impl_nuttx)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
set(config_module_list
#
+3 -5
View File
@@ -1,6 +1,6 @@
include(nuttx/px4_impl_nuttx)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
set(config_module_list
#
@@ -68,13 +68,11 @@ set(config_module_list
modules/land_detector
#
# Estimation modules (EKF/ SO3 / other filters)
# Estimation modules
#
# Too high RAM usage due to static allocations
# modules/attitude_estimator_ekf
modules/attitude_estimator_q
modules/ekf_att_pos_estimator
modules/position_estimator_inav
modules/local_position_estimator
modules/ekf2
#
+2 -3
View File
@@ -1,6 +1,6 @@
include(nuttx/px4_impl_nuttx)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
set(config_uavcan_num_ifaces 2)
@@ -94,10 +94,9 @@ set(config_module_list
modules/land_detector
#
# Estimation modules (EKF/ SO3 / other filters)
# Estimation modules
#
modules/attitude_estimator_q
#modules/ekf_att_pos_estimator
modules/position_estimator_inav
modules/local_position_estimator
modules/ekf2
+2 -3
View File
@@ -1,6 +1,6 @@
include(nuttx/px4_impl_nuttx)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
set(config_uavcan_num_ifaces 2)
@@ -94,10 +94,9 @@ set(config_module_list
modules/land_detector
#
# Estimation modules (EKF/ SO3 / other filters)
# Estimation modules
#
modules/attitude_estimator_q
#modules/ekf_att_pos_estimator
modules/position_estimator_inav
modules/local_position_estimator
modules/ekf2
+4 -2
View File
@@ -1,6 +1,6 @@
include(nuttx/px4_impl_nuttx)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
set(config_uavcan_num_ifaces 1)
@@ -98,7 +98,6 @@ set(config_module_list
# Estimation modules (EKF/ SO3 / other filters)
#
modules/attitude_estimator_q
modules/ekf_att_pos_estimator
modules/position_estimator_inav
modules/ekf2
modules/local_position_estimator
@@ -183,6 +182,9 @@ set(config_module_list
# Hardware test
#examples/hwtest
# EKF
examples/ekf_att_pos_estimator
)
set(config_extra_builtin_cmds
+3 -2
View File
@@ -1,6 +1,6 @@
include(nuttx/px4_impl_nuttx)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-none-eabi.cmake)
set(config_module_list
#
@@ -15,7 +15,7 @@ set(config_module_list
drivers/boards/tap-v1
drivers/rgbled_pwm
drivers/tap_esc
#drivers/mpu6500
drivers/mpu6000
drivers/ms5611
drivers/hmc5883
drivers/gps
@@ -95,6 +95,7 @@ set(config_module_list
lib/runway_takeoff
lib/tailsitter_recovery
lib/DriverFramework/framework
lib/rc
platforms/nuttx
# had to add for cmake, not sure why wasn't in original config
+2 -4
View File
@@ -1,6 +1,6 @@
include(posix/px4_impl_posix)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf-raspbian.cmake)
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf-raspbian.cmake)
add_definitions(
-D__PX4_POSIX_BEBOP
@@ -37,10 +37,8 @@ set(config_module_list
systemcmds/perf
#
# Estimation modules (EKF/ SO3 / other filters)
# Estimation modules
#
#modules/attitude_estimator_ekf
modules/ekf_att_pos_estimator
modules/attitude_estimator_q
modules/position_estimator_inav
modules/local_position_estimator
+2 -2
View File
@@ -4,9 +4,9 @@
# on the Linux side of the Snapdragon.
include(configs/posix_sdflight_default)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-arm-linux-gnueabihf.cmake)
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-arm-linux-gnueabihf.cmake)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
set(CONFIG_SHMEM "1")
+2 -2
View File
@@ -1,13 +1,13 @@
include(posix/px4_impl_posix)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
# Use build stubs unless explicitly set not to
if("${DSPAL_STUBS_ENABLE}" STREQUAL "")
set(DSPAL_STUBS_ENABLE "1")
endif()
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake)
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake)
set(config_generate_parameters_scope ALL)
@@ -1,8 +1,8 @@
include(posix/px4_impl_posix)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-arm-linux-gnueabihf.cmake)
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-arm-linux-gnueabihf.cmake)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
set(config_generate_parameters_scope ALL)
@@ -31,8 +31,10 @@ set(config_module_list
modules/mavlink
modules/attitude_estimator_ekf
modules/ekf_att_pos_estimator
modules/attitude_estimator_q
modules/position_estimator_inav
modules/local_position_estimator
modules/ekf2
modules/mc_pos_control
modules/mc_att_control
+2 -2
View File
@@ -1,8 +1,8 @@
include(posix/px4_impl_posix)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake)
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
set(config_generate_parameters_scope ALL)
+3 -3
View File
@@ -36,10 +36,8 @@ set(config_module_list
systemcmds/perf
#
# Estimation modules (EKF/ SO3 / other filters)
# Estimation modules
#
#modules/attitude_estimator_ekf
modules/ekf_att_pos_estimator
modules/attitude_estimator_q
modules/position_estimator_inav
modules/local_position_estimator
@@ -75,6 +73,8 @@ set(config_module_list
drivers/gps
drivers/navio_sysfs_rc_in
drivers/navio_sysfs_pwm_out
drivers/navio_gpio
drivers/navio_rgbled
#
# Libraries
+6 -1
View File
@@ -1,6 +1,11 @@
include(configs/posix_rpi_common)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf-raspbian.cmake)
if("$ENV{RPI_USE_CLANG}" STREQUAL "1")
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf-raspbian-clang.cmake)
else()
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf-raspbian.cmake)
endif()
set(CMAKE_PROGRAM_PATH
"${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian/bin"
+1 -1
View File
@@ -1,3 +1,3 @@
include(configs/posix_rpi_common)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cmake)
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cmake)
+6 -4
View File
@@ -1,8 +1,8 @@
include(posix/px4_impl_posix)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake)
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
set(config_generate_parameters_scope ALL)
@@ -24,8 +24,10 @@ set(config_module_list
modules/mavlink
modules/attitude_estimator_ekf
modules/ekf_att_pos_estimator
modules/attitude_estimator_q
modules/position_estimator_inav
modules/local_position_estimator
modules/ekf2
modules/mc_pos_control
modules/mc_att_control
+5 -5
View File
@@ -1,6 +1,6 @@
include(posix/px4_impl_posix)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cmake)
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cmake)
set(config_module_list
drivers/device
@@ -33,10 +33,10 @@ set(config_module_list
modules/sensors
modules/simulator
modules/mavlink
modules/attitude_estimator_ekf
modules/attitude_estimator_q
modules/position_estimator_inav
modules/local_position_estimator
modules/ekf2
modules/ekf_att_pos_estimator
modules/position_estimator_inav
modules/navigator
modules/vtol_att_control
@@ -72,8 +72,8 @@ set(config_extra_builtin_cmds
sercon
)
set(config_sitl_rcS
posix-configs/SITL/init/rcS
set(config_sitl_rcS_dir
posix-configs/SITL/init/
CACHE FILEPATH "init script for sitl"
)
+8 -8
View File
@@ -1,6 +1,6 @@
include(posix/px4_impl_posix)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cmake)
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cmake)
set(config_module_list
drivers/boards/sitl
@@ -32,21 +32,17 @@ set(config_module_list
systemcmds/top
systemcmds/motor_ramp
modules/attitude_estimator_ekf
modules/attitude_estimator_q
modules/commander
modules/dataman
modules/ekf2
modules/ekf_att_pos_estimator
modules/fw_att_control
modules/fw_pos_control_l1
modules/land_detector
modules/logger
modules/mavlink
modules/mc_att_control
modules/mc_att_control_multiplatform
modules/mc_pos_control
modules/mc_pos_control_multiplatform
modules/navigator
modules/param
modules/position_estimator_inav
@@ -76,6 +72,10 @@ set(config_module_list
lib/terrain_estimation
examples/px4_simple_app
examples/mc_att_control_multiplatform
examples/mc_pos_control_multiplatform
examples/ekf_att_pos_estimator
examples/attitude_estimator_ekf
#
# Testing
@@ -96,9 +96,9 @@ set(config_extra_builtin_cmds
sercon
)
set(config_sitl_rcS
posix-configs/SITL/init/rcS
CACHE FILEPATH "init script for sitl"
set(config_sitl_rcS_dir
posix-configs/SITL/init/lpe
CACHE FILEPATH "init script dir for sitl"
)
set(config_sitl_viewer
+5
View File
@@ -0,0 +1,5 @@
include(cmake/configs/posix_sitl_default.cmake)
set(config_sitl_rcS_dir
posix-configs/SITL/init/ekf2/
)
+2 -2
View File
@@ -1,5 +1,5 @@
include(cmake/configs/posix_sitl_default.cmake)
set(config_sitl_rcS
posix-configs/SITL/init/rcS_lpe
set(config_sitl_rcS_dir
posix-configs/SITL/init/lpe/
)
+1 -1
View File
@@ -1,6 +1,6 @@
include(posix/px4_impl_posix)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cmake)
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cmake)
set(config_module_list
drivers/device
+2 -2
View File
@@ -6,9 +6,9 @@ else()
set(HEXAGON_SDK_ROOT $ENV{HEXAGON_SDK_ROOT})
endif()
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
set(config_generate_parameters_scope ALL)
+5 -5
View File
@@ -6,9 +6,9 @@ else()
set(HEXAGON_SDK_ROOT $ENV{HEXAGON_SDK_ROOT})
endif()
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
set(config_generate_parameters_scope ALL)
@@ -27,12 +27,12 @@ set(config_module_list
systemcmds/mixer
#
# Estimation modules (EKF/ SO3 / other filters)
# Estimation modules
#
#modules/attitude_estimator_ekf
modules/ekf_att_pos_estimator
modules/attitude_estimator_q
modules/position_estimator_inav
modules/local_position_estimator
modules/ekf2
#
# Vehicle Control
@@ -10,9 +10,9 @@ set(CONFIG_SHMEM "1")
set(config_generate_parameters_scope ALL)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
add_definitions(
-D__USING_SNAPDRAGON_LEGACY_DRIVER
@@ -35,11 +35,11 @@ set(config_module_list
systemcmds/param
#
# Estimation modules (EKF/ SO3 / other filters)
# Estimation modules
#
modules/ekf_att_pos_estimator
modules/attitude_estimator_q
modules/position_estimator_inav
modules/local_position_estimator
modules/ekf2
#
+2 -2
View File
@@ -6,9 +6,9 @@ else()
set(HEXAGON_SDK_ROOT $ENV{HEXAGON_SDK_ROOT})
endif()
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
set(config_generate_parameters_scope ALL)
+2 -2
View File
@@ -6,8 +6,8 @@ else()
set(HEXAGON_SDK_ROOT $ENV{HEXAGON_SDK_ROOT})
endif()
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
set(config_generate_parameters_scope ALL)
+5 -5
View File
@@ -5,9 +5,9 @@ set(CONFIG_SHMEM "1")
# 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/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
include(hexagon_sdk)
if ("$ENV{HEXAGON_SDK_ROOT}" STREQUAL "")
@@ -35,12 +35,12 @@ set(config_module_list
systemcmds/mixer
#
# Estimation modules (EKF/ SO3 / other filters)
# Estimation modules
#
#modules/attitude_estimator_ekf
modules/ekf_att_pos_estimator
modules/attitude_estimator_q
modules/position_estimator_inav
modules/local_position_estimator
modules/ekf2
#
# Vehicle Control
+4 -5
View File
@@ -10,9 +10,9 @@ set(CONFIG_SHMEM "1")
set(config_generate_parameters_scope ALL)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
set(config_module_list
#
@@ -32,12 +32,11 @@ set(config_module_list
systemcmds/param
#
# Estimation modules (EKF/ SO3 / other filters)
# Estimation modules
#
#modules/attitude_estimator_ekf
modules/ekf_att_pos_estimator
modules/attitude_estimator_q
modules/position_estimator_inav
modules/local_position_estimator
modules/ekf2
#
+26 -26
View File
@@ -95,9 +95,9 @@ function(px4_nuttx_add_firmware)
add_custom_command(OUTPUT ${OUT}
COMMAND ${OBJCOPY} -O binary ${EXE} ${EXE}.bin
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/Tools/px_mkfw.py
--prototype ${CMAKE_SOURCE_DIR}/Images/${BOARD}.prototype
--git_identity ${CMAKE_SOURCE_DIR}
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_mkfw.py
--prototype ${PX4_SOURCE_DIR}/Images/${BOARD}.prototype
--git_identity ${PX4_SOURCE_DIR}
${extra_args}
--image ${EXE}.bin > ${OUT}
DEPENDS ${EXE}
@@ -148,7 +148,7 @@ function(px4_nuttx_generate_builtin_commands)
math(EXPR command_count "${command_count}+1")
endif()
endforeach()
configure_file(${CMAKE_SOURCE_DIR}/cmake/nuttx/builtin_commands.c.in
configure_file(${PX4_SOURCE_DIR}/cmake/nuttx/builtin_commands.c.in
${OUT})
endfunction()
@@ -183,17 +183,17 @@ function(px4_nuttx_add_export)
REQUIRED OUT CONFIG THREADS
ARGN ${ARGN})
set(nuttx_src ${CMAKE_BINARY_DIR}/${CONFIG}/NuttX)
set(nuttx_src ${PX4_BINARY_DIR}/${CONFIG}/NuttX)
# patch
add_custom_target(__nuttx_patch_${CONFIG})
file(GLOB nuttx_patches RELATIVE ${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/nuttx-patches/*.patch)
file(GLOB nuttx_patches RELATIVE ${PX4_SOURCE_DIR}
${PX4_SOURCE_DIR}/nuttx-patches/*.patch)
foreach(patch ${nuttx_patches})
string(REPLACE "/" "_" patch_name "${patch}-${CONFIG}")
message(STATUS "nuttx-patch: ${patch}")
add_custom_command(OUTPUT nuttx_patch_${patch_name}.stamp
COMMAND ${PATCH} -p0 -N < ${CMAKE_SOURCE_DIR}/${patch}
COMMAND ${PATCH} -p0 -N < ${PX4_SOURCE_DIR}/${patch}
COMMAND ${TOUCH} nuttx_patch_${patch_name}.stamp
DEPENDS ${DEPENDS}
)
@@ -204,7 +204,7 @@ function(px4_nuttx_add_export)
# Read defconfig to see if CONFIG_ARMV7M_STACKCHECK is yes
# note: CONFIG will be BOARD in the future evaluation of ${hw_stack_check_${CONFIG}
file(STRINGS "${CMAKE_SOURCE_DIR}/nuttx-configs/${CONFIG}/nsh/defconfig"
file(STRINGS "${PX4_SOURCE_DIR}/nuttx-configs/${CONFIG}/nsh/defconfig"
hw_stack_check_${CONFIG}
REGEX "CONFIG_ARMV7M_STACKCHECK=y"
)
@@ -213,29 +213,29 @@ function(px4_nuttx_add_export)
endif()
# copy and export
file(RELATIVE_PATH nuttx_cp_src ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/NuttX)
file(GLOB_RECURSE config_files ${CMAKE_SOURCE_DIR}/nuttx-configs/${CONFIG}/*)
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${CONFIG}.export
file(RELATIVE_PATH nuttx_cp_src ${PX4_BINARY_DIR} ${PX4_SOURCE_DIR}/NuttX)
file(GLOB_RECURSE config_files ${PX4_SOURCE_DIR}/nuttx-configs/${CONFIG}/*)
add_custom_command(OUTPUT ${PX4_BINARY_DIR}/${CONFIG}.export
COMMAND ${MKDIR} -p ${nuttx_src}
COMMAND rsync -a --delete --exclude=.git ${nuttx_cp_src}/ ${CONFIG}/NuttX/
#COMMAND ${ECHO} Configuring NuttX for ${CONFIG}
COMMAND ${MAKE} --no-print-directory -C${nuttx_src}/nuttx -r --quiet distclean
COMMAND ${CP} -r ${CMAKE_SOURCE_DIR}/nuttx-configs/PX4_Warnings.mk ${nuttx_src}/nuttx/
COMMAND ${CP} -r ${CMAKE_SOURCE_DIR}/nuttx-configs/${CONFIG} ${nuttx_src}/nuttx/configs
COMMAND ${CP} -r ${PX4_SOURCE_DIR}/nuttx-configs/PX4_Warnings.mk ${nuttx_src}/nuttx/
COMMAND ${CP} -r ${PX4_SOURCE_DIR}/nuttx-configs/${CONFIG} ${nuttx_src}/nuttx/configs
COMMAND cd ${nuttx_src}/nuttx/tools && ./configure.sh ${CONFIG}/nsh && cd ..
#COMMAND ${ECHO} Exporting NuttX for ${CONFIG}
COMMAND ${MAKE} --no-print-directory --quiet -C ${nuttx_src}/nuttx -j${THREADS} -r CONFIG_ARCH_BOARD=${CONFIG} export > nuttx_build.log
COMMAND ${CP} -r ${nuttx_src}/nuttx/nuttx-export.zip ${CMAKE_BINARY_DIR}/${CONFIG}.export
COMMAND ${CP} -r ${nuttx_src}/nuttx/nuttx-export.zip ${PX4_BINARY_DIR}/${CONFIG}.export
DEPENDS ${config_files} ${DEPENDS}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
WORKING_DIRECTORY ${PX4_BINARY_DIR}
COMMENT "Building NuttX for ${CONFIG}")
# extract
add_custom_command(OUTPUT nuttx_export_${CONFIG}.stamp
COMMAND ${RM} -rf ${nuttx_src}/nuttx-export
COMMAND ${UNZIP} -q ${CMAKE_BINARY_DIR}/${CONFIG}.export -d ${nuttx_src}
COMMAND ${UNZIP} -q ${PX4_BINARY_DIR}/${CONFIG}.export -d ${nuttx_src}
COMMAND ${TOUCH} nuttx_export_${CONFIG}.stamp
DEPENDS ${DEPENDS} ${CMAKE_BINARY_DIR}/${CONFIG}.export)
DEPENDS ${DEPENDS} ${PX4_BINARY_DIR}/${CONFIG}.export)
add_custom_target(${OUT}
DEPENDS nuttx_export_${CONFIG}.stamp)
@@ -308,16 +308,16 @@ function(px4_nuttx_add_romfs)
REQUIRED OUT ROOT
ARGN ${ARGN})
set(romfs_temp_dir ${CMAKE_BINARY_DIR}/tmp/${ROOT})
set(romfs_src_dir ${CMAKE_SOURCE_DIR}/${ROOT})
set(romfs_autostart ${CMAKE_SOURCE_DIR}/Tools/px_process_airframes.py)
set(romfs_pruner ${CMAKE_SOURCE_DIR}/Tools/px_romfs_pruner.py)
set(bin_to_obj ${CMAKE_SOURCE_DIR}/cmake/nuttx/bin_to_obj.py)
set(romfs_temp_dir ${PX4_BINARY_DIR}/tmp/${ROOT})
set(romfs_src_dir ${PX4_SOURCE_DIR}/${ROOT})
set(romfs_autostart ${PX4_SOURCE_DIR}/Tools/px_process_airframes.py)
set(romfs_pruner ${PX4_SOURCE_DIR}/Tools/px_romfs_pruner.py)
set(bin_to_obj ${PX4_SOURCE_DIR}/cmake/nuttx/bin_to_obj.py)
set(extras_dir ${CMAKE_CURRENT_BINARY_DIR}/extras)
file(GLOB_RECURSE romfs_src_files ${romfs_src_dir} ${romfs_src_dir}/*)
set(cmake_test ${CMAKE_SOURCE_DIR}/cmake/test/cmake_tester.py)
set(cmake_test ${PX4_SOURCE_DIR}/cmake/test/cmake_tester.py)
set(extras)
@@ -346,7 +346,7 @@ function(px4_nuttx_add_romfs)
#COMMAND cmake -E remove_directory ${romfs_temp_dir}
COMMAND ${PYTHON_EXECUTABLE} ${bin_to_obj}
--ld ${LD} --c_flags ${CMAKE_C_FLAGS}
--include_path "${CMAKE_SOURCE_DIR}/src/include"
--include_path "${PX4_SOURCE_DIR}/src/include"
--c_compiler ${CMAKE_C_COMPILER}
--nm ${NM} --objcopy ${OBJCOPY}
--obj romfs.o
@@ -414,7 +414,7 @@ function(px4_os_add_flags)
LINK_DIRS ${LINK_DIRS}
DEFINITIONS ${DEFINITIONS})
set(nuttx_export_dir ${CMAKE_BINARY_DIR}/${BOARD}/NuttX/nuttx-export)
set(nuttx_export_dir ${PX4_BINARY_DIR}/${BOARD}/NuttX/nuttx-export)
set(added_include_dirs
${nuttx_export_dir}/include
${nuttx_export_dir}/include/cxx
+14 -3
View File
@@ -49,7 +49,7 @@
#
include(common/px4_base)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/posix)
list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/cmake/posix)
#=============================================================================
#
@@ -101,7 +101,7 @@ function(px4_posix_generate_builtin_commands)
math(EXPR command_count "${command_count}+1")
endif()
endforeach()
configure_file(${CMAKE_SOURCE_DIR}/cmake/posix/apps.h_in
configure_file(${PX4_SOURCE_DIR}/cmake/posix/apps.h_in
${OUT})
endfunction()
@@ -223,8 +223,19 @@ if ("${BOARD}" STREQUAL "eagle" OR "${BOARD}" STREQUAL "excelsior")
-Wl,-rpath-link,${HEXAGON_ARM_SYSROOT}/lib/arm-linux-gnueabihf
--sysroot=${HEXAGON_ARM_SYSROOT}
)
else()
elseif ("${BOARD}" STREQUAL "rpi" AND "$ENV{RPI_USE_CLANG}" STREQUAL "1")
# Add the toolchain specific flags
set(clang_added_flags
-m32
--target=arm-linux-gnueabihf
-ccc-gcc-name arm-linux-gnueabihf
--sysroot=${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian/arm-linux-gnueabihf/libc/)
set(added_c_flags ${POSIX_CMAKE_C_FLAGS} ${clang_added_flags})
set(added_cxx_flags ${POSIX_CMAKE_CXX_FLAGS} ${clang_added_flags})
set(added_exe_linker_flags ${POSIX_CMAKE_EXE_LINKER_FLAGS} ${clang_added_flags})
else()
# Add the toolchain specific flags
set(added_cflags ${POSIX_CMAKE_C_FLAGS})
set(added_cxx_flags ${POSIX_CMAKE_CXX_FLAGS})
+2 -2
View File
@@ -50,7 +50,7 @@
#
include(common/px4_base)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/qurt)
list(APPEND CMAKE_MODULE_PATH ${PX4_SOURCE_DIR}/cmake/qurt)
#=============================================================================
#
@@ -95,7 +95,7 @@ function(px4_qurt_generate_builtin_commands)
math(EXPR command_count "${command_count}+1")
endif()
endforeach()
configure_file(${CMAKE_SOURCE_DIR}/cmake/qurt/apps.h_in ${OUT})
configure_file(${PX4_SOURCE_DIR}/cmake/qurt/apps.h_in ${OUT})
endfunction()
#=============================================================================
-334
View File
@@ -1,334 +0,0 @@
cmake_minimum_required(VERSION 2.8.3)
project(px4)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
add_definitions(-D__PX4_ROS)
add_definitions(-D__EXPORT=)
add_definitions(-DMAVLINK_DIALECT=common)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
geometry_msgs
message_generation
cmake_modules
gazebo_msgs
sensor_msgs
mav_msgs
libmavconn
tf
)
find_package(Eigen REQUIRED)
## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)
## Uncomment this if the package has a setup.py. This macro ensures
## modules and global scripts declared therein get installed
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
# catkin_python_setup()
################################################
## Declare ROS messages, services and actions ##
################################################
## To declare and build messages, services or actions from within this
## package, follow these steps:
## * Let MSG_DEP_SET be the set of packages whose message types you use in
## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
## * In the file package.xml:
## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET
## * If MSG_DEP_SET isn't empty the following dependencies might have been
## pulled in transitively but can be declared for certainty nonetheless:
## * add a build_depend tag for "message_generation"
## * add a run_depend tag for "message_runtime"
## * In this file (CMakeLists.txt):
## * add "message_generation" and every package in MSG_DEP_SET to
## find_package(catkin REQUIRED COMPONENTS ...)
## * add "message_runtime" and every package in MSG_DEP_SET to
## catkin_package(CATKIN_DEPENDS ...)
## * uncomment the add_*_files sections below as needed
## and list every .msg/.srv/.action file to be processed
## * uncomment the generate_messages entry below
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)
## Generate messages in the 'msg' folder
add_message_files(
FILES
actuator_armed.msg
actuator_controls.msg
commander_state.msg
control_state.msg
distance_sensor.msg
manual_control_setpoint.msg
mc_virtual_rates_setpoint.msg
offboard_control_mode.msg
parameter_update.msg
position_setpoint.msg
position_setpoint_triplet.msg
rc_channels.msg
ros/actuator_controls_0.msg
ros/actuator_controls_virtual_mc.msg
vehicle_attitude.msg
vehicle_attitude_setpoint.msg
vehicle_control_mode.msg
vehicle_force_setpoint.msg
vehicle_global_velocity_setpoint.msg
vehicle_local_position.msg
vehicle_local_position_setpoint.msg
vehicle_rates_setpoint.msg
vehicle_status.msg
)
## Generate services in the 'srv' folder
# add_service_files(
# FILES
# Service1.srv
# Service2.srv
# )
## Generate actions in the 'action' folder
# add_action_files(
# FILES
# Action1.action
# Action2.action
# )
## Generate added messages and services with any dependencies listed here
generate_messages(
DEPENDENCIES
std_msgs
gazebo_msgs
)
###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## INCLUDE_DIRS: uncomment this if you package contains header files
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
INCLUDE_DIRS src/include
LIBRARIES px4
CATKIN_DEPENDS message_runtime roscpp rospy std_msgs libmavconn
DEPENDS system_lib
)
###########
## Build ##
###########
## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
${catkin_INCLUDE_DIRS}
src/platforms
src/platforms/ros/px4_messages
src/include
src/modules
${CMAKE_BINARY_DIR}/src/modules
src/
src/lib
src/lib/matrix
${EIGEN_INCLUDE_DIRS}
integrationtests
)
## generate multiplatform wrapper headers
## note that the message header files are generated as in any ROS project with generate_messages()
set(MULTIPLATFORM_HEADER_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/platforms/ros/px4_messages)
set(MULTIPLATFORM_TEMPLATE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/msg/templates/px4/ros)
set(TOPICHEADER_TEMP_DIR ${CMAKE_BINARY_DIR}/topics_temporary)
set(MULTIPLATFORM_PREFIX px4_)
add_custom_target(multiplatform_message_headers ALL ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/Tools/px_generate_uorb_topic_files.py
--headers -d ${CMAKE_CURRENT_SOURCE_DIR}/msg -o ${MULTIPLATFORM_HEADER_DIR} -e ${MULTIPLATFORM_TEMPLATE_DIR}
-t ${TOPICHEADER_TEMP_DIR} -p ${MULTIPLATFORM_PREFIX})
## Declare a cpp library
add_library(px4
src/platforms/ros/px4_ros_impl.cpp
src/platforms/ros/perf_counter.cpp
src/platforms/ros/geo.cpp
src/lib/mathlib/math/Limits.cpp
src/modules/systemlib/circuit_breaker.cpp
)
add_dependencies(px4 ${PROJECT_NAME}_generate_messages_cpp multiplatform_message_headers)
target_link_libraries(px4
${catkin_LIBRARIES}
)
## Declare a test publisher
add_executable(publisher
src/examples/publisher/publisher_main.cpp
src/examples/publisher/publisher_example.cpp)
add_dependencies(publisher ${PROJECT_NAME}_generate_messages_cpp multiplatform_message_headers)
target_link_libraries(publisher
${catkin_LIBRARIES}
px4
)
## Declare a test subscriber
add_executable(subscriber
src/examples/subscriber/subscriber_main.cpp
src/examples/subscriber/subscriber_example.cpp)
add_dependencies(subscriber ${PROJECT_NAME}_generate_messages_cpp multiplatform_message_headers)
target_link_libraries(subscriber
${catkin_LIBRARIES}
px4
)
## MC Attitude Control
add_executable(mc_att_control
src/modules/mc_att_control_multiplatform/mc_att_control_main.cpp
src/modules/mc_att_control_multiplatform/mc_att_control.cpp
src/modules/mc_att_control_multiplatform/mc_att_control_base.cpp)
add_dependencies(mc_att_control ${PROJECT_NAME}_generate_messages_cpp_cpp)
target_link_libraries(mc_att_control
${catkin_LIBRARIES}
px4
)
## MC Position Control
add_executable(mc_pos_control
src/modules/mc_pos_control_multiplatform/mc_pos_control_main.cpp
src/modules/mc_pos_control_multiplatform/mc_pos_control.cpp)
add_dependencies(mc_pos_control ${PROJECT_NAME}_generate_messages_cpp_cpp)
target_link_libraries(mc_pos_control
${catkin_LIBRARIES}
px4
)
## Attitude Estimator dummy
add_executable(attitude_estimator
src/platforms/ros/nodes/attitude_estimator/attitude_estimator.cpp)
add_dependencies(attitude_estimator ${PROJECT_NAME}_generate_messages_cpp_cpp)
target_link_libraries(attitude_estimator
${catkin_LIBRARIES}
px4
)
## Position Estimator dummy
add_executable(position_estimator
src/platforms/ros/nodes/position_estimator/position_estimator.cpp)
add_dependencies(position_estimator ${PROJECT_NAME}_generate_messages_cpp_cpp)
target_link_libraries(position_estimator
${catkin_LIBRARIES}
px4
)
## Manual input
add_executable(manual_input
src/platforms/ros/nodes/manual_input/manual_input.cpp)
add_dependencies(manual_input ${PROJECT_NAME}_generate_messages_cpp_cpp)
target_link_libraries(manual_input
${catkin_LIBRARIES}
px4
)
## Multicopter Mixer dummy
add_executable(mc_mixer
src/platforms/ros/nodes/mc_mixer/mc_mixer.cpp)
add_dependencies(mc_mixer ${PROJECT_NAME}_generate_messages_cpp_cpp)
target_link_libraries(mc_mixer
${catkin_LIBRARIES}
px4
)
## Commander dummy
add_executable(commander
src/platforms/ros/nodes/commander/commander.cpp)
add_dependencies(commander ${PROJECT_NAME}_generate_messages_cpp_cpp)
target_link_libraries(commander
${catkin_LIBRARIES}
px4
)
## Mavlink dummy
add_executable(mavlink
src/platforms/ros/nodes/mavlink/mavlink.cpp)
add_dependencies(mavlink ${PROJECT_NAME}_generate_messages_cpp_cpp)
target_link_libraries(mavlink
${catkin_LIBRARIES}
px4
)
## Offboard Position Setpoint Demo
add_executable(demo_offboard_position_setpoints
src/platforms/ros/nodes/demo_offboard_position_setpoints/demo_offboard_position_setpoints.cpp)
add_dependencies(demo_offboard_position_setpoints ${PROJECT_NAME}_generate_messages_cpp_cpp)
target_link_libraries(demo_offboard_position_setpoints
${catkin_LIBRARIES}
px4
)
## Offboard Attitude Setpoint Demo
add_executable(demo_offboard_attitude_setpoints
src/platforms/ros/nodes/demo_offboard_attitude_setpoints/demo_offboard_attitude_setpoints.cpp)
add_dependencies(demo_offboard_attitude_setpoints ${PROJECT_NAME}_generate_messages_cpp_cpp)
target_link_libraries(demo_offboard_attitude_setpoints
${catkin_LIBRARIES}
px4
)
#############
## Install ##
#############
# all install targets should use catkin DESTINATION variables
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
## Mark executable scripts (Python etc.) for installation
## in contrast to setup.py, you can choose the destination
# install(PROGRAMS
# scripts/my_python_script
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )
## Mark executables and/or libraries for installation
install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
## Mark cpp header files for installation
# install(DIRECTORY include/${PROJECT_NAME}/
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
# FILES_MATCHING PATTERN "*.h"
# PATTERN ".svn" EXCLUDE
# )
## Mark other files for installation (e.g. launch and bag files, etc.)
# install(FILES
# # myfile1
# # myfile2
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
# )
#############
## Testing ##
#############
## Add gtest based cpp test target and link libraries
# catkin_add_gtest(${PROJECT_NAME}-test test/test_px4test.cpp)
# if(TARGET ${PROJECT_NAME}-test)
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
# endif()
## Add folders to be run by python nosetests
# catkin_add_nosetests(test)
## Tests on multiplatform SITL (deprecated) have been moved to POSIX SITL
#if(CATKIN_ENABLE_TESTING)
# find_package(rostest REQUIRED)
# add_rostest(integrationtests/demo_tests/direct_tests.launch)
# add_rostest(integrationtests/demo_tests/mavros_tests.launch)
#endif()
@@ -0,0 +1,69 @@
include(CMakeForceCompiler)
if ($ENV{RPI_TOOLCHAIN_DIR} STREQUAL "")
message(FATAL_ERROR "RPI_TOOLCHAIN_DIR not set")
else()
set(RPI_TOOLCHAIN_DIR $ENV{RPI_TOOLCHAIN_DIR})
endif()
# this one is important
set(CMAKE_SYSTEM_NAME Generic)
#this one not so much
set(CMAKE_SYSTEM_VERSION 1)
# specify the cross compiler
# requires a symbolic link typically from /usr/bin/clang
find_program(C_COMPILER clang
PATHS ${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
NO_DEFAULT_PATH
)
if(NOT C_COMPILER)
message(FATAL_ERROR "could not find C compiler")
endif()
cmake_force_c_compiler(${C_COMPILER} Clang)
find_program(CXX_COMPILER clang++
PATHS ${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
NO_DEFAULT_PATH
)
if(NOT CXX_COMPILER)
message(FATAL_ERROR "could not find C++ compiler")
endif()
cmake_force_cxx_compiler(${CXX_COMPILER} Clang)
# compiler tools
foreach(tool objcopy nm ld)
string(TOUPPER ${tool} TOOL)
find_program(${TOOL} arm-linux-gnueabihf-${tool}
PATHS ${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
NO_DEFAULT_PATH
)
if(NOT ${TOOL})
message(FATAL_ERROR "could not find arm-linux-gnueabihf-${tool}")
endif()
endforeach()
# os tools
foreach(tool echo grep rm mkdir nm cp touch make unzip)
string(TOUPPER ${tool} TOOL)
find_program(${TOOL} ${tool})
if(NOT ${TOOL})
message(FATAL_ERROR "could not find ${TOOL}")
endif()
endforeach()
add_definitions(
-D __RPI
)
# where is the target environment
set(CMAKE_FIND_ROOT_PATH get_file_component(${C_COMPILER} PATH))
# 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)
+57 -30
View File
@@ -5,26 +5,27 @@
# License: according to LICENSE.md in the root directory of the PX4 Firmware repository
set -e
if [ "$#" -lt 1 ]
# handle cleaning command
do_clean=true
if [ "$1" = "-o" ]
then
echo usage: run_tests.bash firmware_src_dir
echo ""
exit 1
echo not cleaning
do_clean=false
fi
SRC_DIR=$1
JOB_DIR=$SRC_DIR/..
BUILD=posix_sitl_default
# TODO
ROS_TEST_RESULT_DIR=/root/.ros/test_results/px4
ROS_LOG_DIR=/root/.ros/log
PX4_LOG_DIR=${SRC_DIR}/build_${BUILD}/src/firmware/posix/rootfs/fs/microsd/log
TEST_RESULT_TARGET_DIR=$JOB_DIR/test_results
# BAGS=/root/.ros
# CHARTS=/root/.ros/charts
# EXPORT_CHARTS=/sitl/testing/export_charts.py
# determine the directory of the source given the directory of this script
pushd `dirname $0` > /dev/null
SCRIPTPATH=`pwd`
popd > /dev/null
ORIG_SRC=$(dirname $SCRIPTPATH)
# source ROS env
# set paths
JOB_DIR=$(dirname $ORIG_SRC)
CATKIN_DIR=$JOB_DIR/catkin
BUILD_DIR=$CATKIN_DIR/build/px4
SRC_DIR=${CATKIN_DIR}/src/px4
echo setting up ROS paths
if [ -f /opt/ros/indigo/setup.bash ]
then
source /opt/ros/indigo/setup.bash
@@ -35,26 +36,53 @@ else
echo "could not find /opt/ros/{ros-distro}/setup.bash"
exit 1
fi
source $SRC_DIR/integrationtests/setup_gazebo_ros.bash $SRC_DIR
export ROS_HOME=$JOB_DIR/.ros
export ROS_LOG_DIR=$ROS_HOME/log
export ROS_TEST_RESULT_DIR=$ROS_HOME/test_results/px4
echo "deleting previous test results ($TEST_RESULT_TARGET_DIR)"
if [ -d ${TEST_RESULT_TARGET_DIR} ]; then
rm -r ${TEST_RESULT_TARGET_DIR}
fi
PX4_LOG_DIR=$ROS_HOME/rootfs/fs/microsd/log
TEST_RESULT_TARGET_DIR=$JOB_DIR/test_results
# FIXME: Firmware compilation seems to CD into this directory (/root/Firmware)
# when run from "run_container.bash". Why?
if [ -d /root/Firmware ]; then
rm /root/Firmware
# TODO
# BAGS=$ROS_HOME
# CHARTS=$ROS_HOME/charts
# EXPORT_CHARTS=/sitl/testing/export_charts.py
if $do_clean
then
echo cleaning
rm -rf $CATKIN_DIR
rm -rf $ROS_HOME
rm -rf $TEST_RESULT_TARGET_DIR
else
echo skipping clean step
fi
ln -s ${SRC_DIR} /root/Firmware
echo "=====> compile ($SRC_DIR)"
cd $SRC_DIR
make ${BUILD}
make --no-print-directory gazebo_build
mkdir -p $ROS_HOME
mkdir -p $CATKIN_DIR/src
mkdir -p $TEST_RESULT_TARGET_DIR
if ! [ -d $SRC_DIR ]
then
ln -s $ORIG_SRC $SRC_DIR
ln -s $ORIG_SRC/Tools/sitl_gazebo ${CATKIN_DIR}/src/mavlink_sitl_gazebo
fi
cd $CATKIN_DIR
catkin_make
. ./devel/setup.bash
echo "<====="
# print paths to user
echo -e "JOB_DIR\t\t: $JOB_DIR"
echo -e "ROS_HOME\t: $ROS_HOME"
echo -e "CATKIN_DIR\t: $CATKIN_DIR"
echo -e "BUILD_DIR\t: $BUILD_DIR"
echo -e "SRC_DIR\t\t: $SRC_DIR"
echo -e "ROS_TEST_RESULT_DIR\t: $ROS_TEST_RESULT_DIR"
echo -e "ROS_LOG_DIR\t\t: $ROS_LOG_DIR"
echo -e "PX4_LOG_DIR\t\t: $PX4_LOG_DIR"
echo -e "TEST_RESULT_TARGET_DIR\t: $TEST_RESULT_TARGET_DIR"
# don't exit on error anymore from here on (because single tests or exports might fail)
set +e
echo "=====> run tests"
@@ -73,7 +101,6 @@ echo "=====> process test results"
# done
echo "copy build test results to job directory"
mkdir -p ${TEST_RESULT_TARGET_DIR}
cp -r $ROS_TEST_RESULT_DIR/* ${TEST_RESULT_TARGET_DIR}
cp -r $ROS_LOG_DIR/* ${TEST_RESULT_TARGET_DIR}
cp -r $PX4_LOG_DIR/* ${TEST_RESULT_TARGET_DIR}
-22
View File
@@ -1,22 +0,0 @@
#!/bin/bash
#
# Setup environment to make PX4 visible to ROS/Gazebo.
#
# License: according to LICENSE.md in the root directory of the PX4 Firmware repository
if [ "$#" -lt 1 ]
then
echo usage: source setup_gazebo_ros.bash firmware_src_dir
echo ""
return 1
fi
SRC_DIR=$1
# setup Gazebo env and update package path
export GAZEBO_MODEL_PATH=${GAZEBO_MODEL_PATH}:${SRC_DIR}/Tools/sitl_gazebo/models
export GAZEBO_PLUGIN_PATH=${SRC_DIR}/build_gazebo:${GAZEBO_PLUGIN_PATH}
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${SRC_DIR}/Tools/sitl_gazebo/Build/msgs/
export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:${SRC_DIR}
export GAZEBO_MODEL_DATABASE_URI=""
export SITL_GAZEBO_PATH=$SRC_DIR/Tools/sitl_gazebo
+34 -4
View File
@@ -1,19 +1,47 @@
<launch>
<!-- MAVROS posix SITL environment launch script -->
<arg name="x" default="0"/>
<arg name="y" default="0"/>
<arg name="z" default="0"/>
<arg name="R" default="0"/>
<arg name="P" default="0"/>
<arg name="Y" default="0"/>
<arg name="est" default="lpe"/>
<arg name="vehicle" default="iris"/>
<arg name="world" default="$(find mavlink_sitl_gazebo)/worlds/empty.world"/>
<arg name="sdf" default="$(find mavlink_sitl_gazebo)/models/$(arg vehicle)/$(arg vehicle).sdf"/>
<arg name="rcS" default="$(find px4)/posix-configs/SITL/init/$(arg est)/$(arg vehicle)"/>
<arg name="headless" default="false"/>
<arg name="gui" default="true"/>
<arg name="ns" default="/"/>
<arg name="world" default="iris"/>
<arg name="build" default="posix_sitl_default"/>
<arg name="fcu_url" default="udp://:14540@localhost:14557"/>
<arg name="debug" default="false"/>
<arg name="verbose" default="false"/>
<arg name="paused" default="false"/>
<include file="$(find px4)/launch/posix_sitl.launch">
<arg name="x" value="$(arg x)"/>
<arg name="y" value="$(arg y)"/>
<arg name="z" value="$(arg z)"/>
<arg name="R" value="$(arg R)"/>
<arg name="P" value="$(arg P)"/>
<arg name="Y" value="$(arg Y)"/>
<arg name="world" value="$(arg world)"/>
<arg name="vehicle" value="$(arg vehicle)"/>
<arg name="sdf" value="$(arg sdf)"/>
<arg name="rcS" value="$(arg rcS)"/>
<arg name="headless" value="$(arg headless)"/>
<arg name="gui" value="$(arg gui)"/>
<arg name="ns" value="$(arg ns)"/>
<arg name="world" value="$(arg world)"/>
<arg name="build" value="$(arg build)"/>
<arg name="debug" value="$(arg debug)"/>
<arg name="verbose" value="$(arg verbose)"/>
<arg name="paused" value="$(arg paused)"/>
</include>
<include file="$(find px4)/launch/mavros.launch">
@@ -22,3 +50,5 @@
<arg name="fcu_url" value="$(arg fcu_url)"/>
</include>
</launch>
<!-- vim: set et ft=xml fenc=utf-8 ff=unix sts=0 sw=4 ts=4 : -->
+3
View File
@@ -4,11 +4,14 @@
<arg name="ns" default="/"/>
<arg name="headless" default="true"/>
<arg name="gui" default="false"/>
<arg name="est" default="lpe"/>
<include file="$(find px4)/launch/mavros_posix_sitl.launch">
<arg name="ns" value="$(arg ns)"/>
<arg name="headless" value="$(arg headless)"/>
<arg name="gui" value="$(arg gui)"/>
<arg name="vehicle" value="iris"/>
<arg name="est" value="$(arg est)"/>
</include>
<group ns="$(arg ns)">
@@ -4,12 +4,14 @@
<arg name="ns" default="/"/>
<arg name="headless" default="true"/>
<arg name="gui" default="false"/>
<arg name="est" default="ekf2"/>
<include file="$(find px4)/launch/mavros_posix_sitl.launch">
<arg name="ns" value="$(arg ns)"/>
<arg name="headless" value="$(arg headless)"/>
<arg name="gui" value="$(arg gui)"/>
<arg name="world" value="standard_vtol"/>
<arg name="vehicle" value="standard_vtol"/>
<arg name="est" value="$(arg est)"/>
</include>
<group ns="$(arg ns)">
+30 -5
View File
@@ -1,19 +1,44 @@
<launch>
<!-- Posix SITL environment launch script -->
<arg name="x" default="0"/>
<arg name="y" default="0"/>
<arg name="z" default="0"/>
<arg name="R" default="0"/>
<arg name="P" default="0"/>
<arg name="Y" default="0"/>
<arg name="est" default="lpe"/>
<arg name="vehicle" default="iris"/>
<arg name="world" default="$(find mavlink_sitl_gazebo)/worlds/empty.world"/>
<arg name="sdf" default="$(find mavlink_sitl_gazebo)/models/$(arg vehicle)/$(arg vehicle).sdf"/>
<arg name="rcS" default="$(find px4)/posix-configs/SITL/init/$(arg est)/$(arg vehicle)"/>
<arg name="headless" default="false"/>
<arg name="gui" default="true"/>
<arg name="ns" default="/"/>
<arg name="world" default="iris"/>
<arg name="build" default="posix_sitl_default"/>
<node pkg="px4" type="sitl_run.sh" name="simulator" args="posix-configs/SITL/init/rcS none gazebo $(arg world) $(find px4)/build_$(arg build)">
<env name="no_sim" value="1" />
<arg name="debug" default="false"/>
<arg name="verbose" default="false"/>
<arg name="paused" default="false"/>
<node name="sitl" pkg="px4" type="px4" output="screen"
args="$(find px4) $(arg rcS)">
</node>
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="headless" value="$(arg headless)"/>
<arg name="gui" value="$(arg gui)"/>
<arg name="world_name" value="$(find px4)/Tools/sitl_gazebo/worlds/$(arg world).world" />
<arg name="world_name" value="$(arg world)" />
<arg name="debug" value="$(arg debug)" />
<arg name="verbose" value="$(arg verbose)" />
<arg name="paused" value="$(arg paused)" />
</include>
<node name="$(anon vehicle_spawn)" output="screen" pkg="gazebo_ros" type="spawn_model"
args="-sdf -file $(arg sdf) -model $(arg vehicle) -x $(arg x) -y $(arg y) -z $(arg z) -R $(arg R) -P $(arg P) -Y $(arg Y)"/>
</launch>
<!-- vim: set et ft=xml fenc=utf-8 ff=unix sts=0 sw=4 ts=4 : -->
+1
View File
@@ -65,6 +65,7 @@ set(msg_file_names
hil_sensor.msg
home_position.msg
input_rc.msg
log_message.msg
manual_control_setpoint.msg
mavlink_log.msg
mc_att_ctrl_status.msg
+1
View File
@@ -1 +1,2 @@
float32 load # processor load from 0 to 1
float32 ram_usage # RAM usage from 0 to 1
+5
View File
@@ -0,0 +1,5 @@
# A logging message, output with PX4_{WARN,ERR,INFO}
uint8 severity # log level (same as in the linux kernel, starting with 0)
uint8[127] text
+2 -1
View File
@@ -31,7 +31,8 @@ uint32 VEHICLE_CMD_DO_SET_RELAY = 181 # Set a relay to a condition. |Relay num
uint32 VEHICLE_CMD_DO_REPEAT_RELAY = 182 # Cycle a relay on and off for a desired number of cyles with a desired period. |Relay number| Cycle count| Cycle time (seconds, decimal)| Empty| Empty| Empty| Empty|
uint32 VEHICLE_CMD_DO_SET_SERVO = 183 # Set a servo to a desired PWM value. |Servo number| PWM (microseconds, 1000 to 2000 typical)| Empty| Empty| Empty| Empty| Empty|
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_FLIGHTTERMINATION = 185 # Terminate flight immediately |Flight termination activated if > 0.5| Empty| Empty| Empty| Empty| Empty| Empty|
uint32 VEHICLE_CMD_DO_GO_AROUND = 191 # Mission command to safely abort an autonmous landing. |Altitude (meters)| Empty| Empty| Empty| Empty| Empty| Empty| */
uint32 VEHICLE_CMD_DO_REPOSITION = 192
uint32 VEHICLE_CMD_DO_PAUSE_CONTINUE = 193
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|
+433
View File
@@ -0,0 +1,433 @@
/************************************************************************************
* configs/tap-v1/include/board.h
* include/arch/board/board.h
*
* Copyright (C) 2012-2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
* David Sidrane <david_s5@nscdg.com>
*
* 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 NuttX 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.
*
************************************************************************************/
#ifndef __CONFIG_TAP_V1_INCLUDE_BOARD_H
#define __CONFIG_TAP_V1_INCLUDE_BOARD_H
/************************************************************************************
* Included Files
************************************************************************************/
#include <nuttx/config.h>
#ifndef __ASSEMBLY__
# include <stdint.h>
#endif
#include "stm32_rcc.h"
#include "stm32.h"
/************************************************************************************
* Definitions
************************************************************************************/
/* Clocking *************************************************************************/
/* The TAP V1 uses a 16MHz crystal connected to the HSE.
*
* This is the canonical configuration:
* System Clock source : PLL (HSE)
* SYSCLK(Hz) : 168000000 Determined by PLL configuration
* HCLK(Hz) : 168000000 (STM32_RCC_CFGR_HPRE)
* AHB Prescaler : 1 (STM32_RCC_CFGR_HPRE)
* APB1 Prescaler : 4 (STM32_RCC_CFGR_PPRE1)
* APB2 Prescaler : 2 (STM32_RCC_CFGR_PPRE2)
* HSE Frequency(Hz) : 16000000 (STM32_BOARD_XTAL)
* PLLM : 8 (STM32_PLLCFG_PLLM)
* PLLN : 168 (STM32_PLLCFG_PLLN)
* PLLP : 2 (STM32_PLLCFG_PLLP)
* PLLQ : 7 (STM32_PLLCFG_PLLQ)
* Main regulator output voltage : Scale1 mode Needed for high speed SYSCLK
* Flash Latency(WS) : 5
* Prefetch Buffer : OFF
* Instruction cache : ON
* Data cache : ON
* Require 48MHz for USB OTG FS, : Enabled
* SDIO and RNG clock
*/
/* HSI - 16 MHz RC factory-trimmed
* LSI - 32 KHz RC
* HSE - On-board crystal frequency is 16MHz
* LSE - not installed
*/
#define STM32_BOARD_XTAL 16000000ul
#define STM32_HSI_FREQUENCY 16000000ul
#define STM32_LSI_FREQUENCY 32000
#define STM32_HSE_FREQUENCY STM32_BOARD_XTAL
/* Main PLL Configuration.
*
* PLL source is HSE
* PLL_VCO = (STM32_HSE_FREQUENCY / PLLM) * PLLN
* = (16,000,000 / 8) * 168
* = 336,000,000
* SYSCLK = PLL_VCO / PLLP
* = 336,000,000 / 2 = 168,000,000
* USB OTG FS, SDIO and RNG Clock
* = PLL_VCO / PLLQ
* = 336,000,000 / 7
* = 48,000,000
*/
#define STM32_PLLCFG_PLLM RCC_PLLCFG_PLLM(8)
#define STM32_PLLCFG_PLLN RCC_PLLCFG_PLLN(168)
#define STM32_PLLCFG_PLLP RCC_PLLCFG_PLLP_2
#define STM32_PLLCFG_PLLQ RCC_PLLCFG_PLLQ(7)
#define STM32_SYSCLK_FREQUENCY 168000000ul
/* AHB clock (HCLK) is SYSCLK (168MHz) */
#define STM32_RCC_CFGR_HPRE RCC_CFGR_HPRE_SYSCLK /* HCLK = SYSCLK / 1 */
#define STM32_HCLK_FREQUENCY STM32_SYSCLK_FREQUENCY
#define STM32_BOARD_HCLK STM32_HCLK_FREQUENCY /* same as above, to satisfy compiler */
/* APB1 clock (PCLK1) is HCLK/4 (42MHz) */
#define STM32_RCC_CFGR_PPRE1 RCC_CFGR_PPRE1_HCLKd4 /* PCLK1 = HCLK / 4 */
#define STM32_PCLK1_FREQUENCY (STM32_HCLK_FREQUENCY/4)
/* Timers driven from APB1 will be twice PCLK1 */
#define STM32_APB1_TIM2_CLKIN (2*STM32_PCLK1_FREQUENCY)
#define STM32_APB1_TIM3_CLKIN (2*STM32_PCLK1_FREQUENCY)
#define STM32_APB1_TIM4_CLKIN (2*STM32_PCLK1_FREQUENCY)
#define STM32_APB1_TIM5_CLKIN (2*STM32_PCLK1_FREQUENCY)
#define STM32_APB1_TIM6_CLKIN (2*STM32_PCLK1_FREQUENCY)
#define STM32_APB1_TIM7_CLKIN (2*STM32_PCLK1_FREQUENCY)
#define STM32_APB1_TIM12_CLKIN (2*STM32_PCLK1_FREQUENCY)
#define STM32_APB1_TIM13_CLKIN (2*STM32_PCLK1_FREQUENCY)
#define STM32_APB1_TIM14_CLKIN (2*STM32_PCLK1_FREQUENCY)
/* APB2 clock (PCLK2) is HCLK/2 (84MHz) */
#define STM32_RCC_CFGR_PPRE2 RCC_CFGR_PPRE2_HCLKd2 /* PCLK2 = HCLK / 2 */
#define STM32_PCLK2_FREQUENCY (STM32_HCLK_FREQUENCY/2)
/* Timers driven from APB2 will be twice PCLK2 */
#define STM32_APB2_TIM1_CLKIN (2*STM32_PCLK2_FREQUENCY)
#define STM32_APB2_TIM8_CLKIN (2*STM32_PCLK2_FREQUENCY)
#define STM32_APB2_TIM9_CLKIN (2*STM32_PCLK2_FREQUENCY)
#define STM32_APB2_TIM10_CLKIN (2*STM32_PCLK2_FREQUENCY)
#define STM32_APB2_TIM11_CLKIN (2*STM32_PCLK2_FREQUENCY)
/* Timer Frequencies, if APBx is set to 1, frequency is same to APBx
* otherwise frequency is 2xAPBx.
* Note: TIM1,8 are on APB2, others on APB1
*/
#define STM32_TIM18_FREQUENCY (2*STM32_PCLK2_FREQUENCY)
#define STM32_TIM27_FREQUENCY (2*STM32_PCLK1_FREQUENCY)
/* LED definitions ******************************************************************/
/* If CONFIG_ARCH_LEDS is not defined, then the user can control the LEDs in any
* way. The following definitions are used to access individual LEDs.
*/
/* LED index values for use with stm32_setled()
*
* PC4 BLUE_LED D4 Blue LED cathode
* PC5 RED_LED D5 Red LED cathode
*/
#define BOARD_LED1 0
#define BOARD_LED2 1
#define BOARD_NLEDS 2
#define BOARD_LED_BLUE BOARD_LED1
#define BOARD_LED_RED BOARD_LED2
/* LED bits for use with stm32_setleds() */
#define BOARD_LED1_BIT (1 << BOARD_LED1)
#define BOARD_LED2_BIT (1 << BOARD_LED2)
/* If CONFIG_ARCH_LEDs is defined, then NuttX will control the 2 LEDs on board
* the tap-v1. The following definitions describe how NuttX controls
* the LEDs:
*/
#define LED_STARTED 0 /* BLUE */
#define LED_HEAPALLOCATE 1 /* LED2 */
#define LED_IRQSENABLED 2 /* BLUE */
#define LED_STACKCREATED 3 /* BLUE + RED */
#define LED_INIRQ 4 /* BLUE */
#define LED_SIGNAL 5 /* RED */
#define LED_ASSERTION 6 /* BLUE + RED */
#define LED_PANIC 7 /* BLUE + RED */
/* Alternate function pin selections ************************************************/
/*
* USARTs.
*
*
* Peripheral Port Signal Name CONN
* USART1_TX PB6 GPS_USART1_TX JP1-15,16
* USART1_RX PB7 GPS_USART1_RX JP1-13,14
* USART2_TX PA2 GB_USART2_TX JP2-19,20
* USART2_RX PA3 GB_USART2_RX JP2-21,22
* USART3_TX PC10 RF2_USART3_TX J3-2
* USART3_RX PC11 RF2_USART3_RX J3-1
* USART6_TX PC6 RF_USART6_TX JP2-15,16
* USART6_RX PC7 RF_USART6_RX JP2-17,18
*/
#define GPIO_USART1_TX GPIO_USART1_TX_2
#define GPIO_USART1_RX GPIO_USART1_RX_2
#define GPIO_USART2_TX GPIO_USART2_TX_1
#define GPIO_USART2_RX GPIO_USART2_RX_1
#define GPIO_USART3_TX GPIO_USART3_TX_2
#define GPIO_USART3_RX GPIO_USART3_RX_2
#define GPIO_USART6_TX GPIO_USART6_TX_1
#define GPIO_USART6_RX GPIO_USART6_RX_1
#define GPIO_UART7_TX GPIO_UART7_TX_1
#define GPIO_UART7_RX GPIO_UART7_RX_1
/* USART DMA configuration for USART 1 and 6 */
#define DMAMAP_USART1_RX DMAMAP_USART1_RX_2
#define DMAMAP_USART6_RX DMAMAP_USART6_RX_2
/*
* UARTs.
*
* N.B. The 's' is here to match the wrong labeling on Schematic
*
* Peripheral Port Signal Name CONN
* UART4_TX PA0 OFS_UsART4_TX JP1-19,20
* UART4_RX PA1 OFS_UsART4_RX JP1-17,18
* UART5_TX PC12 ESC_UsART5_TX U7-HCT244 etal ESC
* UART5_RX PD2 ESC_UsART5_RX U8-5 74HCT151
*
* Note that UART5 has no optional pinout, so it is not listed here.
*
*/
#define GPIO_UART4_TX GPIO_UART4_TX_1
#define GPIO_UART4_RX GPIO_UART4_RX_1
/*
* I2C
*
* Peripheral Port Signal Name CONN
* I2C1_SDA PB9 I2C1_SDA J2-4,9,16,21 mpu6050, U4 MS6507
* I2C1_SDL PB8 I2C1_SCL J2-3,10,15,22 mpu6050, U4 MS6507
* I2C2_SDA PB11 Sonar Echo/I2C_SDA JP2-31,32
* I2C2_SDL PB10 Sonar Trig/I2C_SCL JP2-29,30
* I2C3_SDA PC9 COMPASS_I2C3_SDA JP1-27,28
* I2C3_SDL PA8 COMPASS_I2C3_SCL JP1-25,26
*
* The optional _GPIO configurations allow the I2C driver to manually
* reset the bus to clear stuck slaves. They match the pin configuration,
* but are normally-high GPIOs.
*/
// #define GPIO_I2C1_SDA GPIO_I2C1_SDA_2
// #define GPIO_I2C1_SCL GPIO_I2C1_SCL_2
// #define GPIO_I2C1_SDA_GPIO (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN9)
// #define GPIO_I2C1_SCL_GPIO (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN8)
// #define GPIO_I2C2_SDA GPIO_I2C2_SDA_1
// #define GPIO_I2C2_SCL GPIO_I2C2_SCL_1
// #define GPIO_I2C2_SDA_GPIO (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN11)
// #define GPIO_I2C2_SCL_GPIO (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN10)
#define GPIO_I2C3_SDA GPIO_I2C3_SDA_1
#define GPIO_I2C3_SCL GPIO_I2C3_SCL_1
#define GPIO_I2C3_SDA_GPIO (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTC|GPIO_PIN9)
#define GPIO_I2C3_SCL_GPIO (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN8)
/*
* SPI
*
* Peripheral Port Signal Name CONN
* SPI2_NSS PB12 SD_SPI2_NSS SD-2 CS
* TBD
*
*/
#define GPIO_SPI3_NSS (GPIO_SPI3_NSS_1 | GPIO_SPEED_50MHz)
#define GPIO_SPI3_SCK (GPIO_SPI3_SCK_2 | GPIO_SPEED_50MHz)
#define GPIO_SPI3_MISO (GPIO_SPI3_MISO_1 | GPIO_SPEED_50MHz)
#define GPIO_SPI3_MOSI (GPIO_SPI3_MOSI_1 | GPIO_SPEED_50MHz)
#define GPIO_SPI4_NSS (GPIO_SPI4_NSS_1 | GPIO_SPEED_50MHz)
#define GPIO_SPI4_SCK (GPIO_SPI4_SCK_2 | GPIO_SPEED_50MHz)
#define GPIO_SPI4_MISO (GPIO_SPI4_MISO_1 | GPIO_SPEED_50MHz)
#define GPIO_SPI4_MOSI (GPIO_SPI4_MOSI_1 | GPIO_SPEED_50MHz)
/* The following Pin Mapping is just for completeness */
/*
* JTAG
*
* We will only enable SW-DP, JTAG-DP will be disabled
*
* Function Port Signal Name CONN
* SWDIO PA13 DAT J10-3,J7
* SWCLK PA14 CLK J10-4,J8
*
*/
/*
* BOOT
*
* Function Port Signal Name CONN
* BOOT0 NA BOOT0 GND via 10 K
* BOOT1 PB2 BOOT1 V3.3 - 10 K
*
* As jumpered the device can only boot from FLASH.
*
* It can be booted to:
*
* SRAM if BOOT0 is pulled High with 1K.
* System memory if:
* BOOT0 is pulled High with 1K and
* BOOT1 is pulled Low with 1K
*/
/*
* Timer PWM
*
* Peripheral Port Signal Name CONN
* TIM3_CH1 PA6 LED_R JP2-23,24
* TIM3_CH2 PA7 LED_G JP2-25,26
* TIM3_CH3 PB0 LED_B JP2-27,28
* TIM3_CH4 PB1 nPWM_1 AUX1(Landing Gear) JP1-21,22
*/
/*
* GPIO
*
* Port Signal Name CONN
* PA4 POWER JP1-23, - Must be held High to run w/o USB
* PB4 TEMP_CONT J2-2,11,14,23 - Gyro Heater
* PC0 VOLTAGE JP2-13,14 - 1.84 @16.66 1.67 @15.12 Scale 0.1105
* PC1 KEY_AD JP1-31,32 - Low when Power button is depressed
* PC2 SD_SW SD-9 SW - Card Present
* PC3 PCON_RADIO JP1-29,30
* PC13 S2 U8-9 74HCT151
* PC14 S1 U8-10 74HCT151
* PC15 S0 U8-11 74HCT151
*/
/*
* USB
*
* Port Signal Name CONN
* PA9 OTG_FS_VBUS J1-1
* PA10 OTG_FS_ID J1-4
* PA11 OTG_FS_DM J1-2
* PA12 OTG_FS_DP J1-3
*/
/*
* UNUSED PINS - In an idle world - these would have been tied to pads to
* facilitate debugging probs.
* Port
* PA15
* PB3
* PB5
* PC8
*/
/* Board provides GPIO or other Hardware for signaling to timing analyzer */
#if defined(CONFIG_BOARD_USE_PROBES)
# define PROBE_N(n) (1<<((n)-1))
# define PROBE_1 (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTA|GPIO_PIN15)
# define PROBE_2 (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN3)
# define PROBE_3 (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN5)
# define PROBE_4 (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN8)
# define PROBE_INIT(mask) \
do { \
if ((mask)& PROBE_N(1)) { stm32_configgpio(PROBE_1); } \
if ((mask)& PROBE_N(2)) { stm32_configgpio(PROBE_2); } \
if ((mask)& PROBE_N(3)) { stm32_configgpio(PROBE_3); } \
if ((mask)& PROBE_N(4)) { stm32_configgpio(PROBE_4); } \
} while(0)
# define PROBE(n,s) do {stm32_gpiowrite(PROBE_##n,(s));}while(0)
# define PROBE_MARK(n) PROBE(n,false);PROBE(n,true)
#else
# define PROBE_INIT(mask)
# define PROBE(n,s)
# define PROBE_MARK(n)
#endif
/************************************************************************************
* Public Data
************************************************************************************/
#ifndef __ASSEMBLY__
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
#else
#define EXTERN extern
#endif
/************************************************************************************
* Public Function Prototypes
************************************************************************************/
/************************************************************************************
* Name: stm32_boardinitialize
*
* Description:
* All STM32 architectures must provide the following entry point. This entry point
* is called early in the initialization -- after all memory has been configured
* and mapped but before any devices have been initialized.
*
************************************************************************************/
EXTERN void stm32_boardinitialize(void);
#undef EXTERN
#if defined(__cplusplus)
}
#endif
#endif /* __ASSEMBLY__ */
#endif /* __CONFIG_TAP_V1_INCLUDE_BOARD_H */
@@ -0,0 +1,42 @@
/****************************************************************************
*
* Copyright (C) 2016 PX4 Development Team. 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.
*
****************************************************************************/
/**
* nsh_romfsetc.h
*
* This file is a stub for 'make export' purposes; the actual ROMFS
* must be supplied by the library client.
*/
extern unsigned char romfs_img[];
extern unsigned int romfs_img_len;
+160
View File
@@ -0,0 +1,160 @@
############################################################################
# configs/tap-v1/nsh/Make.defs
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# 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 NuttX 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 ${TOPDIR}/.config
include ${TOPDIR}/tools/Config.mk
include $(TOPDIR)/PX4_Warnings.mk
#
# We only support building with the ARM bare-metal toolchain from
# https://launchpad.net/gcc-arm-embedded on Windows, Linux or Mac OS.
#
CONFIG_ARMV7M_TOOLCHAIN := GNU_EABI
include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs
CC = $(CROSSDEV)gcc
CXX = $(CROSSDEV)g++
CPP = $(CROSSDEV)gcc -E
LD = $(CROSSDEV)ld
AR = $(CROSSDEV)ar rcs
NM = $(CROSSDEV)nm
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump
MAXOPTIMIZATION = -Os
ARCHCPUFLAGS = -mcpu=cortex-m4 \
-mthumb \
-march=armv7e-m \
-mfpu=fpv4-sp-d16 \
-mfloat-abi=hard
# enable precise stack overflow tracking
ifeq ($(CONFIG_ARMV7M_STACKCHECK),y)
INSTRUMENTATIONDEFINES = -finstrument-functions -ffixed-r10
endif
# pull in *just* libm from the toolchain ... this is grody
LIBM = "${shell $(CC) $(ARCHCPUFLAGS) -print-file-name=libm.a}"
EXTRA_LIBS += $(LIBM)
# use our linker script
LDSCRIPT = ld.script
ifeq ($(WINTOOL),y)
# Windows-native toolchains
DIRLINK = $(TOPDIR)/tools/copydir.sh
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}"
else
ifeq ($(PX4_WINTOOL),y)
# Windows-native toolchains (MSYS)
DIRLINK = $(TOPDIR)/tools/copydir.sh
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
else
# Linux/Cygwin-native toolchain
MKDEP = $(TOPDIR)/tools/mkdeps.sh
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
endif
endif
# tool versions
ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'}
ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1}
# optimisation flags
ARCHOPTIMIZATION = $(MAXOPTIMIZATION) \
-fno-strict-aliasing \
-fno-strength-reduce \
-fomit-frame-pointer \
-funsafe-math-optimizations \
-fno-builtin-printf \
-ffunction-sections \
-fdata-sections
ifeq ("${CONFIG_DEBUG_SYMBOLS}","y")
ARCHOPTIMIZATION += -g
endif
ARCHCFLAGS = -std=gnu99
ARCHCXXFLAGS = -fno-exceptions -fno-rtti -std=gnu++0x
ARCHWARNINGS = $(PX4_ARCHWARNINGS)
ARCHCWARNINGS = $(PX4_ARCHWARNINGS) $(PX4_ARCHCWARNINGS)
ARCHWARNINGSXX = $(ARCHWARNINGS) $(PX4_ARCHWARNINGSXX)
ARCHDEFINES =
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
# this seems to be the only way to add linker flags
EXTRA_LIBS += --warn-common \
--gc-sections
CFLAGS = $(ARCHCFLAGS) $(ARCHCWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(INSTRUMENTATIONDEFINES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe -fno-common
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(INSTRUMENTATIONDEFINES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
CPPFLAGS = $(ARCHINCLUDES) $(INSTRUMENTATIONDEFINES) $(ARCHDEFINES) $(EXTRADEFINES)
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
NXFLATLDFLAGS1 = -r -d -warn-common
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld -no-check-sections
LDNXFLATFLAGS = -e main -s 2048
OBJEXT = .o
LIBEXT = .a
EXEEXT =
# produce partially-linked $1 from files in $2
define PRELINK
@echo "PRELINK: $1"
$(Q) $(LD) -Ur -o $1 $2 && $(OBJCOPY) --localize-hidden $1
endef
HOSTCC = gcc
HOSTINCLUDES = -I.
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
HOSTLDFLAGS =
File diff suppressed because it is too large Load Diff
+75
View File
@@ -0,0 +1,75 @@
#!/bin/bash
# configs/px4fmu-v1/usbnsh/setenv.sh
#
# Copyright (C) 2013 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# 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 NuttX 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.
#
if [ "$_" = "$0" ] ; then
echo "You must source this script, not run it!" 1>&2
exit 1
fi
WD=`pwd`
if [ ! -x "setenv.sh" ]; then
echo "This script must be executed from the top-level NuttX build directory"
exit 1
fi
if [ -z "${PATH_ORIG}" ]; then
export PATH_ORIG="${PATH}"
fi
# This is the Cygwin path to the location where I installed the RIDE
# toolchain under windows. You will also have to edit this if you install
# the RIDE toolchain in any other location
#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Raisonance/Ride/arm-gcc/bin"
# This is the Cygwin path to the location where I installed the CodeSourcery
# toolchain under windows. You will also have to edit this if you install
# the CodeSourcery toolchain in any other location
export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin"
# These are the Cygwin paths to the locations where I installed the Atollic
# toolchain under windows. You will also have to edit this if you install
# the Atollic toolchain in any other location. /usr/bin is added before
# the Atollic bin path because there is are binaries named gcc.exe and g++.exe
# at those locations as well.
#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for ARM Pro 2.3.0/ARMTools/bin"
#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for STMicroelectronics STM32 Lite 2.3.0/ARMTools/bin"
# This is the Cygwin path to the location where I build the buildroot
# toolchain.
#export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin"
# Add the path to the toolchain to the PATH varialble
export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
echo "PATH : ${PATH}"
+150
View File
@@ -0,0 +1,150 @@
/****************************************************************************
* configs/tap-v1/scripts/ld.script
*
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* 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 NuttX 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.
*
****************************************************************************/
/* The STM32F405RG has 1024Kb of FLASH beginning at address 0x0800:0000 and
* 192Kb of SRAM. SRAM is split up into three blocks:
*
* 1) 112Kb of SRAM beginning at address 0x2000:0000
* 2) 16Kb of SRAM beginning at address 0x2001:c000
* 3) 64Kb of CCM SRAM beginning at address 0x1000:0000
*
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
* where the code expects to begin execution by jumping to the entry point in
* the 0x0800:0000 address range.
*
* The first 16 KiB of flash is reserved for the bootloader.
* Paramater storage will use the next 2 16KiB Sectors.
*/
MEMORY
{
flash (rx) : ORIGIN = 0x0800C000, LENGTH = 976K
sram (rwx) : ORIGIN = 0x20000000, LENGTH = 128K
ccsram (rwx) : ORIGIN = 0x10000000, LENGTH = 64K
}
OUTPUT_ARCH(arm)
ENTRY(__start) /* treat __start as the anchor for dead code stripping */
EXTERN(_vectors) /* force the vectors to be included in the output */
/*
* Ensure that abort() is present in the final object. The exception handling
* code pulled in by libgcc.a requires it (and that code cannot be easily avoided).
*/
EXTERN(abort)
SECTIONS
{
.text : {
_stext = ABSOLUTE(.);
*(.vectors)
*(.text .text.*)
*(.fixup)
*(.gnu.warning)
*(.rodata .rodata.*)
*(.gnu.linkonce.t.*)
*(.got)
*(.gcc_except_table)
*(.gnu.linkonce.r.*)
_etext = ABSOLUTE(.);
/*
* This is a hack to make the newlib libm __errno() call
* use the NuttX get_errno_ptr() function.
*/
__errno = get_errno_ptr;
} > flash
/*
* Init functions (static constructors and the like)
*/
.init_section : {
_sinit = ABSOLUTE(.);
KEEP(*(.init_array .init_array.*))
_einit = ABSOLUTE(.);
} > flash
/*
* Construction data for parameters.
*/
__param ALIGN(4): {
__param_start = ABSOLUTE(.);
KEEP(*(__param*))
__param_end = ABSOLUTE(.);
} > flash
.ARM.extab : {
*(.ARM.extab*)
} > flash
__exidx_start = ABSOLUTE(.);
.ARM.exidx : {
*(.ARM.exidx*)
} > flash
__exidx_end = ABSOLUTE(.);
_eronly = ABSOLUTE(.);
.data : {
_sdata = ABSOLUTE(.);
*(.data .data.*)
*(.gnu.linkonce.d.*)
CONSTRUCTORS
_edata = ABSOLUTE(.);
} > sram AT > flash
.bss : {
_sbss = ABSOLUTE(.);
*(.bss .bss.*)
*(.gnu.linkonce.b.*)
*(COMMON)
_ebss = ABSOLUTE(.);
} > sram
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_info 0 : { *(.debug_info) }
.debug_line 0 : { *(.debug_line) }
.debug_pubnames 0 : { *(.debug_pubnames) }
.debug_aranges 0 : { *(.debug_aranges) }
}
+84
View File
@@ -0,0 +1,84 @@
############################################################################
# configs/tap-v1/src/Makefile
#
# Copyright (C) 2013 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# 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 NuttX 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 $(TOPDIR)/Make.defs
CFLAGS += -I$(TOPDIR)/sched
ASRCS =
AOBJS = $(ASRCS:.S=$(OBJEXT))
CSRCS = empty.c
COBJS = $(CSRCS:.c=$(OBJEXT))
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
ifeq ($(WINTOOL),y)
CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/chip}" \
-I "${shell cygpath -w $(ARCH_SRCDIR)/common}" \
-I "${shell cygpath -w $(ARCH_SRCDIR)/armv7-m}"
else
CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common -I$(ARCH_SRCDIR)/armv7-m
endif
all: libboard$(LIBEXT)
$(AOBJS): %$(OBJEXT): %.S
$(call ASSEMBLE, $<, $@)
$(COBJS) $(LINKOBJS): %$(OBJEXT): %.c
$(call COMPILE, $<, $@)
libboard$(LIBEXT): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))
.depend: Makefile $(SRCS)
$(Q) $(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) touch $@
depend: .depend
clean:
$(call DELFILE, libboard$(LIBEXT))
$(call CLEAN)
distclean: clean
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
-include Make.dep
+4
View File
@@ -0,0 +1,4 @@
/*
* There are no source files here, but libboard.a can't be empty, so
* we have this empty source file to keep it company.
*/
+2 -1
View File
@@ -407,7 +407,7 @@ CONFIG_SIG_SIGWORK=4
CONFIG_MAX_TASKS=32
CONFIG_MAX_TASK_ARGS=10
CONFIG_NPTHREAD_KEYS=4
CONFIG_NFILE_DESCRIPTORS=42
CONFIG_NFILE_DESCRIPTORS=51
CONFIG_NFILE_STREAMS=8
CONFIG_NAME_MAX=32
CONFIG_PREALLOC_MQ_MSGS=4
@@ -978,3 +978,4 @@ CONFIG_SYSTEM_SYSINFO=y
#
# USB Monitor
#
CONFIG_NSOCKET_DESCRIPTORS=0
+52
View File
@@ -0,0 +1,52 @@
############################################################################
# configs/px4fmu/nsh/appconfig
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# 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 NuttX 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.
#
############################################################################
# Path to example in apps/examples containing the user_start entry point
CONFIGURED_APPS += examples/nsh
# The NSH application library
CONFIGURED_APPS += nshlib
CONFIGURED_APPS += system/readline
ifeq ($(CONFIG_CAN),y)
#CONFIGURED_APPS += examples/can
endif
#ifeq ($(CONFIG_USBDEV),y)
#ifeq ($(CONFIG_CDCACM),y)
CONFIGURED_APPS += examples/cdcacm
#endif
#endif
+15 -10
View File
@@ -8,8 +8,8 @@ CONFIG_NUTTX_NEWCONFIG=y
# Build Setup
#
# CONFIG_EXPERIMENTAL is not set
CONFIG_HOST_LINUX=y
# CONFIG_HOST_OSX is not set
# CONFIG_HOST_LINUX is not set
CONFIG_HOST_OSX=y
# CONFIG_HOST_WINDOWS is not set
# CONFIG_HOST_OTHER is not set
@@ -38,7 +38,8 @@ CONFIG_ARCH_MATH_H=y
#
# Debug Options
#
# CONFIG_DEBUG is not set
CONFIG_DEBUG=n
CONFIG_DEBUG_VERBOSE=n
CONFIG_DEBUG_SYMBOLS=y
#
@@ -94,7 +95,7 @@ CONFIG_ARCH_HAVE_MPU=y
# CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set
# CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set
CONFIG_ARMV7M_TOOLCHAIN_GNU_EABI=y
# CONFIG_ARMV7M_STACKCHECK is not set
CONFIG_ARMV7M_STACKCHECK=n
CONFIG_SERIAL_TERMIOS=y
#
@@ -264,6 +265,8 @@ CONFIG_STM32_USART=y
#
# U[S]ART Configuration
#
# Hot fix for lost data
CONFIG_STM32_RXDMA_BUFFER_SIZE_OVERRIDE=256
# CONFIG_USART1_RS485 is not set
CONFIG_USART1_RXDMA=y
# CONFIG_USART2_RS485 is not set
@@ -312,7 +315,7 @@ CONFIG_STM32_I2CTIMEOMS=10
# CONFIG_ARCH_NOINTC is not set
# CONFIG_ARCH_VECNOTIRQ is not set
CONFIG_ARCH_DMA=y
CONFIG_ARCH_IRQPRIO=y
# CONFIG_ARCH_IRQPRIO is not set
# CONFIG_CUSTOM_STACK is not set
# CONFIG_ADDRENV is not set
CONFIG_ARCH_HAVE_VFORK=y
@@ -402,7 +405,7 @@ CONFIG_SIG_SIGWORK=4
CONFIG_MAX_TASKS=32
CONFIG_MAX_TASK_ARGS=10
CONFIG_NPTHREAD_KEYS=4
CONFIG_NFILE_DESCRIPTORS=46
CONFIG_NFILE_DESCRIPTORS=51
CONFIG_NFILE_STREAMS=8
CONFIG_NAME_MAX=32
CONFIG_PREALLOC_MQ_MSGS=4
@@ -451,7 +454,7 @@ CONFIG_WATCHDOG=y
CONFIG_MMCSD=y
CONFIG_MMCSD_NSLOTS=1
# CONFIG_MMCSD_READONLY is not set
# CONFIG_MMCSD_MULTIBLOCK_DISABLE is not set
CONFIG_MMCSD_MULTIBLOCK_DISABLE=y
# CONFIG_MMCSD_MMCSUPPORT is not set
# CONFIG_MMCSD_HAVECARDDETECT is not set
# CONFIG_MMCSD_HAVE_SDIOWAIT_WRCOMPLETE is not set
@@ -590,8 +593,8 @@ CONFIG_CDCACM_EPBULKIN_HSSIZE=512
CONFIG_CDCACM_NWRREQS=4
CONFIG_CDCACM_NRDREQS=4
CONFIG_CDCACM_BULKIN_REQLEN=96
CONFIG_CDCACM_RXBUFSIZE=300
CONFIG_CDCACM_TXBUFSIZE=1000
CONFIG_CDCACM_RXBUFSIZE=600
CONFIG_CDCACM_TXBUFSIZE=2000
CONFIG_CDCACM_VENDORID=0x26ac
CONFIG_CDCACM_PRODUCTID=0x0040
CONFIG_CDCACM_VENDORSTR="The Autopilot"
@@ -678,7 +681,7 @@ CONFIG_BUILTIN=y
#
# Standard C Library Options
#
CONFIG_STDIO_BUFFER_SIZE=180
CONFIG_STDIO_BUFFER_SIZE=32
CONFIG_STDIO_LINEBUFFER=y
CONFIG_NUNGET_CHARS=2
CONFIG_LIB_HOMEDIR="/"
@@ -980,3 +983,5 @@ CONFIG_SYSTEM_SYSINFO=y
#
# USB Monitor
#
CONFIG_NSOCKET_DESCRIPTORS=0
+1 -1
View File
@@ -105,5 +105,5 @@ param set RC_MAP_POSCTL_SW 7
param set RC_MAP_RETURN_SW 8
param set MC_PITCHRATE_P 0.05
param set MC_ROLLRATE_P 0.05
mixer load /dev/pwm_output0 ../../ROMFS/px4fmu_common/mixers/quad_x.main.mix
mixer load /dev/pwm_output0 ROMFS/px4fmu_common/mixers/quad_x.main.mix
```
@@ -60,7 +60,7 @@ 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/quad_x_vtol.main.mix
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 -o 14540
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
@@ -60,7 +60,7 @@ navigator start
ekf2 start
mc_pos_control start
mc_att_control start
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/quad_w.main.mix
mixer load /dev/pwm_output0 ROMFS/px4fmu_common/mixers/quad_w.main.mix
mavlink start -u 14556 -r 4000000
mavlink start -u 14557 -r 4000000 -m onboard -o 14540
mavlink stream -r 50 -s POSITION_TARGET_LOCAL_NED -u 14556
@@ -47,7 +47,7 @@ ekf2 start
fw_pos_control_l1 start
fw_att_control start
land_detector start fixedwing
mixer load /dev/pwm_output0 ../../../../ROMFS/sitl/mixers/plane_sitl.main.mix
mixer load /dev/pwm_output0 ROMFS/sitl/mixers/plane_sitl.main.mix
mavlink start -u 14556 -r 2000000
mavlink start -u 14557 -r 2000000 -m onboard -o 14540
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
@@ -57,7 +57,7 @@ navigator start
ekf2 start
mc_pos_control start
mc_att_control start
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/quad_x.main.mix
mixer load /dev/pwm_output0 ROMFS/px4fmu_common/mixers/quad_x.main.mix
mavlink start -u 14556 -r 4000000
mavlink start -u 14557 -r 4000000 -m onboard -o 14540
mavlink stream -r 50 -s POSITION_TARGET_LOCAL_NED -u 14556
@@ -69,7 +69,7 @@ mc_pos_control start
mc_att_control start
fw_pos_control_l1 start
fw_att_control start
mixer load /dev/pwm_output0 ../../../../ROMFS/sitl/mixers/standard_vtol_sitl.main.mix
mixer load /dev/pwm_output0 ROMFS/sitl/mixers/standard_vtol_sitl.main.mix
mavlink start -u 14556 -r 2000000
mavlink start -u 14557 -r 2000000 -m onboard -o 14540
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
@@ -59,7 +59,7 @@ navigator start
ekf2 start
mc_pos_control start
mc_att_control start
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/hexa_x.main.mix
mixer load /dev/pwm_output0 ROMFS/px4fmu_common/mixers/hexa_x.main.mix
mavlink start -u 14556 -r 4000000
mavlink start -u 14557 -r 4000000 -m onboard -o 14540
mavlink stream -r 50 -s POSITION_TARGET_LOCAL_NED -u 14556
@@ -60,7 +60,7 @@ attitude_estimator_q start
position_estimator_inav start
mc_pos_control_m start
mc_att_control_m start
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/quad_x.main.mix
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
@@ -59,7 +59,7 @@ attitude_estimator_q start
position_estimator_inav start
mc_pos_control start
mc_att_control start
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/quad_w.main.mix
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 -o 14540
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
@@ -60,7 +60,7 @@ attitude_estimator_q start
local_position_estimator start
mc_pos_control start
mc_att_control start
mixer load /dev/pwm_output0 /usr/share/px4/ROMFS/px4fmu_common/mixers/quad_w.main.mix
mixer load /dev/pwm_output0 ROMFS/px4fmu_common/mixers/quad_w.main.mix
mavlink start -u 14556 -r 4000000
mavlink start -u 14557 -r 4000000 -m onboard -o 14540
mavlink stream -r 50 -s POSITION_TARGET_LOCAL_NED -u 14556
@@ -69,7 +69,7 @@ attitude_estimator_q start
local_position_estimator start
mc_pos_control start
mc_att_control start
mixer load /dev/pwm_output0 /usr/share/px4/ROMFS/px4fmu_common/mixers/quad_w.main.mix
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 -o 14540
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
@@ -1,6 +1,7 @@
uorb start
param load
param set MAV_TYPE 2
param set MAV_TYPE 20
param set VT_TYPE 2
param set SYS_AUTOSTART 4010
param set SYS_RESTART_TYPE 2
dataman start
@@ -18,31 +19,33 @@ 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 SENS_BOARD_X_OFF 0.000001
param set COM_RC_IN_MODE 1
param set NAV_DLL_ACT 2
param set COM_DISARM_LAND 3
param set NAV_ACC_RAD 2.0
param set RTL_RETURN_ALT 30.0
param set RTL_DESCEND_ALT 10.0
param set RTL_LAND_DELAY 0
param set MIS_TAKEOFF_ALT 2.5
param set MC_ROLLRATE_P 0.2
param set MC_PITCHRATE_P 0.2
param set MC_PITCH_P 6
param set MC_ROLL_P 6
param set MPC_HOLD_MAX_Z 2.0
param set MPC_HOLD_XY_DZ 0.1
param set MPC_Z_VEL_MAX 2.0
param set MPC_Z_VEL_P 0.4
param set EKF2_GBIAS_INIT 0.01
param set EKF2_ANGERR_INIT 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.5
param set MPC_Z_VEL_P 0.6
param set MPC_Z_VEL_I 0.15
param set SENS_BOARD_ROT 8
param set SENS_DPRES_OFF 0.001
param set SENS_BOARD_X_OFF 0.000001
param set COM_RC_IN_MODE 1
param set NAV_DLL_ACT 2
param set NAV_ACC_RAD 3.0
param set MPC_TKO_SPEED 1.0
param set MIS_YAW_TMT 10
param set RTL_RETURN_ALT 30.0
param set RTL_DESCEND_ALT 10.0
param set RTL_LAND_DELAY 0
param set COM_DISARM_LAND 5
param set COM_DL_LOSS_EN 1
param set MPC_ACC_HOR_MAX 2
replay tryapplyparams
simulator start -s
simulator start -s
rgbledsim start
tone_alarm start
gyrosim start
@@ -50,7 +53,7 @@ accelsim start
barosim start
adcsim start
gpssim start
#gps start -d /dev/ttyACM0 -s
measairspeedsim start
pwm_out_sim mode_pwm
sleep 1
sensors start
@@ -59,9 +62,12 @@ land_detector start multicopter
navigator start
attitude_estimator_q start
local_position_estimator start
vtol_att_control start
mc_pos_control start
mc_att_control start
mixer load /dev/pwm_output0 /usr/share/px4/ROMFS/px4fmu_common/mixers/quad_x.main.mix
fw_pos_control_l1 start
fw_att_control start
mixer load /dev/pwm_output0 ROMFS/sitl/mixers/standard_vtol_sitl.main.mix
mavlink start -u 14556 -r 2000000
mavlink start -u 14557 -r 2000000 -m onboard -o 14540
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
@@ -73,8 +79,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
sdlog2 start -r 100 -e -t -a
logger start -e -t
sdlog2 start -r 200 -e -t -a
mavlink boot_complete
replay trystart
-80
View File
@@ -1,80 +0,0 @@
uorb start
param load
param set MAV_TYPE 2
param set SYS_AUTOSTART 4010
param set SYS_RESTART_TYPE 2
dataman start
param set BAT_N_CELLS 3
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 SENS_BOARD_X_OFF 0.000001
param set COM_RC_IN_MODE 1
param set NAV_DLL_ACT 2
param set COM_DISARM_LAND 3
param set NAV_ACC_RAD 2.0
param set RTL_RETURN_ALT 30.0
param set RTL_DESCEND_ALT 10.0
param set RTL_LAND_DELAY 0
param set MIS_TAKEOFF_ALT 2.5
param set MC_ROLLRATE_P 0.2
param set MC_PITCHRATE_P 0.2
param set MC_PITCH_P 6
param set MC_ROLL_P 6
param set MPC_HOLD_MAX_Z 2.0
param set MPC_HOLD_XY_DZ 0.1
param set MPC_Z_VEL_MAX 2.0
param set MPC_Z_VEL_P 0.4
param set EKF2_GBIAS_INIT 0.01
param set EKF2_ANGERR_INIT 0.01
param set EKF2_MAG_TYPE 1
replay tryapplyparams
simulator start -s
rgbledsim start
tone_alarm start
gyrosim start
accelsim start
barosim start
adcsim start
gpssim start
#gps start -d /dev/ttyACM0 -s
pwm_out_sim mode_pwm
sleep 1
sensors start
commander start
land_detector start multicopter
navigator start
ekf2 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 start -u 14557 -r 2000000 -m onboard -o 14540
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_QUATERNION -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 stream -r 20 -s MANUAL_CONTROL -u 14556
sdlog2 start -r 100 -e -t -a
logger start -e -t
mavlink boot_complete
replay trystart
@@ -1,8 +1,13 @@
uorb start
param load
param set SYS_RESTART_TYPE 0
dataman start
rgbledsim start
tone_alarm start
ver all
sleep 1

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