Compare commits

...

1191 Commits

Author SHA1 Message Date
Lorenz Meier 1dbef49a54 Fix TBS disco default gains 2015-08-06 20:49:01 +02:00
Andreas Antener 7e782fe92a adding landed detector for fixed wing so alt/posctl works 2015-08-06 20:49:00 +02:00
Lorenz Meier 5dcf64b276 Merge pull request #2642 from UAVenture/vtol_standard
Add support for a "standard" VTOL vehicle
2015-08-06 14:26:22 +02:00
Simon Wilks 333ba769ef Don't use the control surface abbreviation but use the actual channel assignment. 2015-08-06 10:49:39 +02:00
Simon Wilks 5adb3cc308 Add support for a 'standard' VTOL with pusher/tractor motor. 2015-08-06 10:49:39 +02:00
Lorenz Meier 951b27518f Merged beta to master 2015-08-06 10:08:50 +02:00
Lorenz Meier 003a3b0b36 Fix file presence operator (thanks to @sjwilks) 2015-08-06 09:38:15 +02:00
Lorenz Meier e2c657ede0 MAVLink params: Eventually time out to make QGC happy, but let the user know that the boot failed. 2015-08-06 00:13:09 +02:00
Lorenz Meier 9918ff9bd4 Fix AUX ports, still retain successful boot for systems without IO 2015-08-06 00:12:14 +02:00
Lorenz Meier d4e9b72a01 Merge pull request #2640 from UAVenture/vtol_fixes
VTOL: Bring back the ability to transition, blend and cleanup tiltrotor a little
2015-08-05 18:31:24 +02:00
Simon Wilks 809b6591c3 Bring back the ability to transition plus a partial cleanup of tiltrotor support and firefly6 config updates. 2015-08-05 16:16:03 +02:00
Lorenz Meier da4d8a5c2b Support the SYS_USE_IO=0 operation mode even with AUX mixer file present 2015-08-04 23:27:38 +02:00
Lorenz Meier fc1924deec Support the SYS_USE_IO=0 operation mode even with AUX mixer file present 2015-08-04 23:26:54 +02:00
Lorenz Meier 4cf51beb4b FW Att control: Fix merge fail for attitude setpoint 2015-08-04 17:44:54 +02:00
Lorenz Meier d68b6e2896 Merge pull request #2636 from schn27/fix-fmu_actuator_outputs
Fix fmu actuator outputs
2015-08-04 13:54:54 +02:00
Andreas Antener 863fdccf92 fix current scaling for mavlink message 2015-08-04 11:59:12 +02:00
Lorenz Meier ceeaeef611 Merge pull request #2638 from UAVenture/current_scale_fix
Fix current scaling for mavlink message
2015-08-04 11:54:54 +02:00
Andreas Antener 7460724242 fix current scaling for mavlink message 2015-08-04 11:37:08 +02:00
Lorenz Meier 420acb9748 Merge branch 'beta' 2015-08-04 10:56:53 +02:00
luft27 0ba1774fcb merge from upstream 2015-08-03 15:37:39 +03:00
luft27 bcc7b3d110 add mavlink stream for outputing AUX PWM 2015-08-03 15:25:20 +03:00
luft27 400842a0d8 fixed: fmu does not publish actuator_outputs 2015-08-03 15:24:13 +03:00
Lorenz Meier 5b3449e75b FW Att control: Crank up pitch default gains 2015-08-02 16:07:32 +02:00
Lorenz Meier 90e4fa8a33 TECS: Weight down speed gain 2015-08-02 16:07:32 +02:00
Lorenz Meier 4e1faafc9b Remove unused variables 2015-08-02 16:07:32 +02:00
Lorenz Meier fbc1b78b38 Attitude control: Enforce rate limits by default to prevent jittery control outputs / steps 2015-08-02 16:07:32 +02:00
Lorenz Meier b066a79ca6 TECS lib: Low-pass height demand to avoid using the motor as a mechanical low-pass filter 2015-08-02 16:07:32 +02:00
Mark Whitehorn c0d2b22d00 cosmetic: fix typos in comments 2015-08-02 16:07:32 +02:00
Lorenz Meier e443a3f3be Harmonize FW default gains, increase TECS height rate default gain considerably 2015-08-02 16:07:31 +02:00
Lorenz Meier 0d9d5d1fa5 TECS: Limit rate demands 2015-08-02 16:07:31 +02:00
Lorenz Meier f3ae231dad TECS: Fix manual climbout 2015-08-02 01:23:15 +02:00
Lorenz Meier 3d8c628efa FW pos control: Comment and clean up altitude setpoint handling 2015-08-02 00:41:58 +02:00
Lorenz Meier c00b9885b5 Enable RC gamepad input in all HIL configs by default 2015-08-01 17:46:28 +02:00
Lorenz Meier 5fd88f4d3e MAVLink: Remove leftover debug comment 2015-08-01 17:32:58 +02:00
Lorenz Meier 283bca90d6 MAVLink: Remove leftover debug comment 2015-08-01 17:32:31 +02:00
Lorenz Meier 1b9ea1b7a1 FMU driver: Disable debug mode 2015-08-01 17:16:15 +02:00
Lorenz Meier 2a80c80a4a PX4 FLOW: Silence alarming messages on a normal boot 2015-08-01 17:16:01 +02:00
Lorenz Meier 0c6b8f2501 GPS: silence verbose boot messages 2015-08-01 17:15:52 +02:00
Lorenz Meier a446cb6b2f FMU driver: Disable debug mode 2015-08-01 17:15:38 +02:00
Lorenz Meier 3679c25125 PX4 FLOW: Silence alarming messages on a normal boot 2015-08-01 17:15:25 +02:00
Lorenz Meier c38c58291e GPS: silence verbose boot messages 2015-08-01 17:15:10 +02:00
Lorenz Meier ea7ae7d019 Merged beta into master 2015-08-01 16:58:02 +02:00
Lorenz Meier 848dd2155a Merge pull request #2628 from mcharleb/muorb_changes
muorb: code cleanup
2015-08-01 16:44:29 +02:00
Lorenz Meier ff1c9da390 Merge pull request #2627 from mcharleb/posix_whitespace_fixes
POSIX: code format changes
2015-08-01 16:44:13 +02:00
Lorenz Meier be9dbe90bc Merge pull request #2626 from mcharleb/qurt-build-updates
QuRT: build configuration changes
2015-08-01 16:43:48 +02:00
Lorenz Meier 09f6b88651 MAVLink app: Implement switch toggling for simulated RC link 2015-08-01 16:12:03 +02:00
Lorenz Meier 5f269b589f MAVLink app: Add radio based software flow control, default to hardware flow control if available and operational 2015-08-01 12:48:38 +02:00
Lorenz Meier 79910ce7e0 MAVLink app: Add radio based software flow control, default to hardware flow control if available and operational 2015-08-01 12:48:11 +02:00
Lorenz Meier aa0679ab93 Startup: Set decent default MAV_TYPE guesses is no valid type present. Set correct vehicle types for tricopters and rovers. 2015-08-01 09:49:53 +02:00
Lorenz Meier 268bf3727e MAVLink app: Make bandwidth scaling depending on the TX error as well 2015-08-01 09:35:28 +02:00
Lorenz Meier adda7702f9 MAVLink: Reduce default link data rates 2015-08-01 09:35:13 +02:00
Lorenz Meier a93f1032fd Set flight-tested values for 3DR quad 2015-08-01 09:34:05 +02:00
Lorenz Meier 10a6a59498 MAVLink app: Make bandwidth scaling depending on the TX error as well 2015-07-31 20:06:23 +02:00
Lorenz Meier d19718a23b MAVLink: Reduce default link data rates 2015-07-31 20:05:59 +02:00
Lorenz Meier 32b9354783 Accel calibration: Show better error message if cal fails 2015-07-31 15:36:13 +02:00
Lorenz Meier 54ac1d9548 Add rc.autostart to gitignore 2015-07-31 12:19:17 +02:00
Lorenz Meier 193e02ebe6 Remove rc.autostart, as it is generated now 2015-07-31 12:19:01 +02:00
Lorenz Meier 50a9e41dbd Fix RC out 2015-07-31 12:17:31 +02:00
Lorenz Meier 021417703f Rover config: Doc fixes 2015-07-31 12:14:46 +02:00
Lorenz Meier a37d450bf1 HK quad config: Doc fixes 2015-07-31 12:13:26 +02:00
Lorenz Meier 7ba7527d49 Skywalker / 3DR Aero config: Doc fixes 2015-07-31 12:13:12 +02:00
Lorenz Meier 73012a86e3 Tri - config: Doc fixes 2015-07-31 12:12:56 +02:00
Lorenz Meier 30914e5a8c Tri config: Doc fixes 2015-07-31 12:12:42 +02:00
Lorenz Meier 0fe58f1dc2 Quad + tailsitter config: Doc fixes 2015-07-31 12:12:28 +02:00
Lorenz Meier 096f77835a Quad tailsitter config: Doc fixes 2015-07-31 12:12:11 +02:00
Lorenz Meier a1431d5e20 Caipi config: Doc fixes 2015-07-31 12:11:54 +02:00
Lorenz Meier f4c9e4db14 Hexa config: Doc fixes 2015-07-31 12:11:39 +02:00
Lorenz Meier e71c7611f8 TBS config: Doc fixes 2015-07-31 12:11:26 +02:00
Lorenz Meier af2f3547ce Disco config: Documentation fixes 2015-07-31 12:11:12 +02:00
Lorenz Meier d26cb08b3b Firmware makefile: Generate autostart listing automatically 2015-07-31 12:10:56 +02:00
Lorenz Meier fde0c65d77 Airframe generator: Also generate autostart listing 2015-07-31 12:10:31 +02:00
Lorenz Meier ac0e645ab6 XML out: Fix mapping of image file names 2015-07-31 11:28:10 +02:00
Lorenz Meier 844c37e7ea Remove static airframe xml file 2015-07-31 11:27:43 +02:00
Mark Charlebois 5120708b38 muorb: code cleanup
Fixed comments and code formatting

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-30 22:19:46 -07:00
Mark Charlebois c1317ad463 POSIX: code format changes
Changed the code format of the files derived from NuttX to match the code
style of PX4.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-30 17:19:55 -07:00
Mark Charlebois b046caa97b QuRT: build configuration changes
Added DSPAL header paths to toolchain_hexagon.mk.

Made changes to build configuraion for QuRT to support HIL testing.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-30 16:48:10 -07:00
Lorenz Meier 2bdf76eeab Fix typo for Quad + mixer 2015-07-30 15:59:42 +02:00
Lorenz Meier f91be99a4e Merge pull request #2621 from UAVenture/vtol_estimator_fix
Replace the EKF attitude estimator for VTOL as it is no longer included.
2015-07-29 22:16:32 +02:00
Simon Wilks 0abc215605 Replace the EKF attitude estimator as is no longer included. 2015-07-29 22:04:16 +02:00
Lorenz Meier a0b792792f Airframe config parser: Move to combined elif statement 2015-07-29 21:22:41 +02:00
Lorenz Meier 63901a2cde Skywalker config: Fix URL 2015-07-29 21:22:14 +02:00
Lorenz Meier c2eb194ef6 Camflyer config: Fix URL 2015-07-29 21:21:59 +02:00
Lorenz Meier 82543e1b16 Easystar config: fix space 2015-07-29 21:21:42 +02:00
Lorenz Meier 4221fd5f12 Add tailsitter to autostart 2015-07-29 19:45:24 +02:00
Lorenz Meier c5e3aab083 Add VTOL + tailsitter mixer 2015-07-29 19:45:09 +02:00
Lorenz Meier cfd43f0045 Add quad + tailsitter config 2015-07-29 19:44:52 +02:00
Lorenz Meier 07830ffaff Build system: Enable airframe XML generation and checking 2015-07-29 19:44:35 +02:00
Lorenz Meier 02c439c557 XML output: Inject image paths for GCS presentation 2015-07-29 19:43:37 +02:00
Lorenz Meier ed5431ea82 Add meta info to Quad CAN config 2015-07-29 19:43:15 +02:00
Lorenz Meier ae13c105b9 Add meta info to F450 config 2015-07-29 19:42:59 +02:00
Lorenz Meier 6aef84dd56 F330: Add meta info 2015-07-29 19:42:46 +02:00
Lorenz Meier 10b4401d40 Add meta info to AR.Drone config 2015-07-29 19:41:11 +02:00
Lorenz Meier dd5efcbe0d Add meta info to quad X config 2015-07-29 19:40:58 +02:00
Lorenz Meier 6505cdfd94 Add meta info to Caipi config 2015-07-29 19:40:44 +02:00
Lorenz Meier 3ca6f26cc6 Add meta info to Viper config 2015-07-29 19:40:32 +02:00
Lorenz Meier 14db4e512e Add meta info to FX79 config 2015-07-29 19:40:20 +02:00
Lorenz Meier 670257868e Add meta info to wing wing config 2015-07-29 19:29:25 +02:00
Lorenz Meier 272a719f18 Add meta info to X5 config 2015-07-29 19:29:10 +02:00
Lorenz Meier 2d5bfae647 Add meta info to phantom config 2015-07-29 19:22:41 +02:00
Lorenz Meier afd5c56c16 Add meta info to camflyer config 2015-07-29 19:22:28 +02:00
Lorenz Meier d0ebf68302 Add meta info to skyhunter config 2015-07-29 19:22:16 +02:00
Lorenz Meier 7c055a0cf3 Add meta info to 3DR Skywalker config 2015-07-29 19:22:03 +02:00
Lorenz Meier 09ee5dc21a Add meta info to AETR generic config 2015-07-29 19:21:47 +02:00
Lorenz Meier 1658c4b9dc Add meta info to AERT generic config 2015-07-29 19:21:31 +02:00
Lorenz Meier 8ce11ef699 Add meta info to easystar config 2015-07-29 19:21:13 +02:00
Lorenz Meier ff8790d67a Add Tri yaw-config meta info 2015-07-29 19:20:59 +02:00
Lorenz Meier 2a9928f042 Add Tri yaw+ config meta info 2015-07-29 19:20:45 +02:00
Lorenz Meier 18d4aeffc8 Add meta info to Quad X tailsitter config 2015-07-29 19:20:26 +02:00
Lorenz Meier e9f47f59b3 Add meta info to FireFly Y6 VTOL config 2015-07-29 19:20:09 +02:00
Lorenz Meier 0c3fc6676a Add meta info to Caipi VTOL config 2015-07-29 19:19:50 +02:00
Lorenz Meier f45e977ea3 Add meta info to Octo coaxial config 2015-07-29 19:19:31 +02:00
Lorenz Meier 99274d07f2 Add meta info to Hexa coaxial config 2015-07-29 19:19:15 +02:00
Lorenz Meier 4a6b0d90ed Add Malolo meta info 2015-07-29 19:18:58 +02:00
Lorenz Meier 7a0e6f9057 Add Rascal HIL config 2015-07-29 19:18:42 +02:00
Lorenz Meier 987454135c Add meta info to HIL quad + config 2015-07-29 19:18:16 +02:00
Lorenz Meier 7d8af662dc Add meta info to HIL quad X config 2015-07-29 19:18:01 +02:00
Lorenz Meier 0ef724af5a Add meta info to F450 config 2015-07-29 19:17:45 +02:00
Lorenz Meier 52b21ae458 Add meta info to TBS endurance config 2015-07-29 19:17:32 +02:00
Lorenz Meier 109d7e2cd2 Add meta info to steadidrone config 2015-07-29 19:17:17 +02:00
Lorenz Meier d7022a37a6 Add meta info to 3DR Iris config 2015-07-29 19:17:01 +02:00
Lorenz Meier 42c5af806c Add meta info to TBS disco config 2015-07-29 19:16:45 +02:00
Lorenz Meier 51f9880d90 Add meta into to easystar config 2015-07-29 19:16:29 +02:00
Lorenz Meier 7553d33106 Add meta info to HK micro config 2015-07-29 19:16:15 +02:00
Lorenz Meier 3f363b1dfd Add meta info to rover config 2015-07-29 19:15:57 +02:00
Lorenz Meier c04fa39638 Add meta info to quad + config 2015-07-29 19:15:39 +02:00
Lorenz Meier 597ec59c01 Add meta info to hexa x config 2015-07-29 19:15:22 +02:00
Lorenz Meier 7ce51d823d Add meta info to hexa + config 2015-07-29 19:15:07 +02:00
Lorenz Meier 52cd988ca3 Add meta info to octo x config 2015-07-29 19:14:53 +02:00
Lorenz Meier 2ab720c557 Add meta info to octo + config 2015-07-29 19:14:37 +02:00
Lorenz Meier 315d2ef87c Add airframe main parser 2015-07-29 19:13:50 +02:00
Lorenz Meier 68aa8fed9e Add airframe config parser 2015-07-29 19:13:28 +02:00
Lorenz Meier 9a62239626 Merge pull request #2618 from mcharleb/platform-cleanup
Platform cleanup - remove duplicate files
2015-07-29 09:20:14 +02:00
Mark Charlebois 84e775272f POSIX: Fixes for unit tests after code refactor
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-28 20:48:51 -07:00
Mark Charlebois a96db1580f Platform cleanup - remove duplicate files
The POSIX and QURT platforms contain several duplicate files.
These files have been factored out into platforms/posix/work_queue.
The config files have been updated to include the
platforms/posix/work_queue module.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-28 20:08:50 -07:00
Lorenz Meier 08c50cac5e Add airframe icons 2015-07-29 00:04:11 +02:00
Lorenz Meier 6dff0b5ebf Add airframe icons 2015-07-29 00:04:04 +02:00
Lorenz Meier d6290d8f5d Airframe Configs: Add version field 2015-07-28 23:59:06 +02:00
Lorenz Meier 040787297b Airframe Configs: Add version field 2015-07-28 23:58:50 +02:00
Lorenz Meier 4471b18117 Build system: Add support for airframes config file 2015-07-28 23:57:51 +02:00
Lorenz Meier 455c449a02 Build system: Add support for airframes config file 2015-07-28 23:45:30 +02:00
Lorenz Meier f226e808b2 Merge pull request #2615 from Zefz/nan-protect
attitude_estimator_q: Fix NaN protection
2015-07-28 18:41:12 +02:00
Johan Jansen 99c448b5f0 attitude_estimator_q: Fix NaN protection 2015-07-28 16:07:05 +02:00
Lorenz Meier 7956f97abb Merge pull request #2604 from mcharleb/muorb-updates
muorb: file rename and updates
2015-07-27 18:12:32 +02:00
Lorenz Meier b629755d92 Merge pull request #2605 from nghiaho12/bug_fix_nullptr
fixed incorrect return type for bool ORBSet::erase(...)
2015-07-27 18:08:51 +02:00
Lorenz Meier 251325760e MC pos ctrl: Fixed frame size guard 2015-07-27 18:08:07 +02:00
Lorenz Meier 80d63d4ea5 Merge pull request #2607 from devbharat/master
Fixes stack frame size error when compiling mc_pos_control_m on vagrant
2015-07-27 18:06:11 +02:00
Lorenz Meier 75085dc5d6 Condition TECS properly on any altitude control mode 2015-07-27 10:16:48 +02:00
Lorenz Meier 09da389558 TECS: Add in-air state and trigger filter state resets when not flying to ensure correct filter state initialization 2015-07-27 10:10:15 +02:00
devbharat 89f64ab0d3 Fixes stack frame size error when compiling mc_pos_control_m on vagrant 2015-07-27 07:17:46 +02:00
Lorenz Meier 509b8c1c24 MC: Move all multicopter configs to PWM min/max params 2015-07-26 10:52:09 +02:00
Nghia Ho 4ba7649fb1 fixed incorrect return type 2015-07-25 20:36:05 -07:00
Lorenz Meier 5cfc12c5cf Merge pull request #2603 from mcharleb/uorb-unittests
uORB: fixed copyright on unit tests
2015-07-25 10:37:56 +02:00
Mark Charlebois b7f1dd9858 muorb: file rename and updates
Changed muorb_fastrpc.cpp to px4muorb.cpp to match the name of the
library that implements the FastRPC calls.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-24 20:13:17 -07:00
Mark Charlebois 68c9f88f2c uORB: fixed copyright on unit tests
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-24 18:50:39 -07:00
Lorenz Meier f99ed68701 Merge pull request #2595 from devbharat/master
Posix gazebo SITL
2015-07-24 09:47:07 +02:00
devbharat 53cc070925 Removed unnecessary iris.launch from launch file 2015-07-23 19:12:45 +02:00
devbharat 6a40c173fd Added the launch file 2015-07-23 18:54:58 +02:00
devbharat 927056340d Merge branch 'master' of https://github.com/PX4/Firmware 2015-07-23 18:43:54 +02:00
devbharat 9a6f52736b Added launchfile to launch gazebo iris and mavros bridge. Added sitl_gazebo to makefile and new init rc file for gazebo iris apps and params 2015-07-23 15:45:59 +02:00
Lorenz Meier e84d97b387 Only update TECS filter if auto is enabled. This forces the internal TECS logic to reset between auto runs 2015-07-22 22:40:26 +02:00
Lorenz Meier 97e9f44d35 TECS: Reset integrator states on first run or when DT is large 2015-07-22 22:40:26 +02:00
Lorenz Meier 9500ffd0a8 Merge pull request #2587 from DonLakeFlyer/ParamValidate
Validate parameter meta data
2015-07-22 19:14:58 +02:00
Don Gagne 55ce4d7b91 Check for duplicates 2015-07-22 09:59:23 -07:00
Don Gagne 93455b92e4 Fix duplicate param definition 2015-07-22 09:59:02 -07:00
Don Gagne f820e733cc Meta data fixes 2015-07-22 09:01:44 -07:00
Don Gagne ad7612220d Validate meta data 2015-07-22 09:01:31 -07:00
Lorenz Meier f94e2c8136 FMU driver: Rely on prearmed field to pre-arm 2015-07-22 17:16:34 +02:00
Lorenz Meier fb9dcfc4a1 commander: populate prearmed field 2015-07-22 17:16:34 +02:00
Lorenz Meier 7b7ec672b9 Add prearm state to actuator armed topic 2015-07-22 17:16:34 +02:00
Lorenz Meier d94f2aa407 MC pos control: Use separate params for manual control 2015-07-22 17:12:43 +02:00
Lorenz Meier 033c512fbf Add separate params for manual throttle control 2015-07-22 17:12:43 +02:00
Lorenz Meier 615b777348 Merge pull request #2579 from PX4/land_detector_robustness
Land detector robustness
2015-07-22 12:55:31 +02:00
Lorenz Meier fb85723e6b F450 config: Force params to sane values if set to default 2015-07-22 12:28:13 +02:00
Lorenz Meier 19ba7be43d F330 config: Force params to sane values if set to default 2015-07-22 12:25:24 +02:00
Lorenz Meier 0a44efa3c5 ROMFS: Doc fixes 2015-07-22 12:24:56 +02:00
Lorenz Meier ffc9668d5b PWM params: Doc fixes 2015-07-22 12:24:37 +02:00
Lorenz Meier cc2f1d16fb Caipi: Add default PWM min/max/disarmed params 2015-07-22 12:17:32 +02:00
Lorenz Meier e7833fe06f Tell MAVLink app once we are fully booted and ready to communicate. 2015-07-22 10:04:13 +02:00
Lorenz Meier a1fd088e8f MAVLink app: Rely on booted state, not on timeout for parameters. This fixes any param timing issues for good. 2015-07-22 10:03:45 +02:00
Lorenz Meier 3f8f9bdd63 Merge branch 'beta' of github.com:PX4/Firmware into beta 2015-07-22 09:39:38 +02:00
Lorenz Meier 1834cf1cb9 VTOL: Use the right attitude estimator 2015-07-22 09:39:12 +02:00
Lorenz Meier 8e4072eff7 Merge pull request #2581 from kd0aij/beta
fix description for SENS_BOARD_?_OFF parameters
2015-07-20 21:06:10 +02:00
Mark Whitehorn dd48b950ef fix units metadata for SENS_BOARD_?_OFF parameters 2015-07-20 07:55:46 -06:00
Lorenz Meier 08032179fe F450 config: Allow the use of PWM_ params 2015-07-20 10:50:46 +02:00
Lorenz Meier fbb68443d9 F330 config: Allow the use of PWM_ params 2015-07-20 10:50:23 +02:00
Lorenz Meier 0d90cf19dd Mag calibration: Reduce time required to complete calibration significantly 2015-07-20 10:45:15 +02:00
Lorenz Meier 6d096401b5 Commander: Turn calibration warnings into critical (voice) output 2015-07-20 10:44:09 +02:00
Lorenz Meier 006dfbb14f Commander: Speed up airspeed calibration 2015-07-20 10:43:12 +02:00
Lorenz Meier d0d46c9713 MAVLink app: Use better default rates 2015-07-20 10:16:05 +02:00
Lorenz Meier 0321f416a0 Increase allowance for vertical velocity in landed mode 2015-07-19 18:33:14 +02:00
Lorenz Meier 9f322a395e Make land detector more robust during initial spool-up 2015-07-19 18:30:52 +02:00
Lorenz Meier 3ccc6823a2 ROMFS: Remove integral gains from default configs as they are fine with the default value 2015-07-19 16:03:48 +02:00
Lorenz Meier 06c45aadfb FW attitude control: Increase default integrator gains to compensate common airframe trim issues 2015-07-19 16:03:08 +02:00
Lorenz Meier fb8236e6b9 sdlog: Default to require GPS for time stamping 2015-07-19 16:00:45 +02:00
Lorenz Meier 116bd9a03e MC pos control: Code style fixes 2015-07-18 11:37:12 +02:00
Lorenz Meier 0d37de005b Merged beta to master 2015-07-17 23:42:23 +02:00
Lorenz Meier ec21a71b36 Commander: increase mag cal timeout 2015-07-17 23:41:00 +02:00
Lorenz Meier d9f0baf4dc GPS driver: Only let the driver publish reports if it really found a GPS receiver 2015-07-17 21:19:32 +02:00
Lorenz Meier d8a54f5018 Navigator: fix feedback on success / fail 2015-07-17 20:59:39 +02:00
Lorenz Meier 253b8f50ce Load missions correctly after restart. Fixes #2564 2015-07-17 20:35:07 +02:00
Lorenz Meier ff4ccb34f2 Merge pull request #2573 from ksschwabe/master
Moved ADC channel defines for battery voltage, battery current, and a…
2015-07-17 14:24:53 +02:00
ksschwabe e1572d3942 Moved ADC channel defines for battery voltage, battery current, and airspeed voltage to board_config.h. This allows better portabilit of code from one board to another, since it removes the hardcoded #ifdef sections from the Px4 sensors code. 2015-07-17 14:09:52 +02:00
Lorenz Meier a17310bf33 Fix Lidar-lite start order 2015-07-17 10:52:05 +02:00
Lorenz Meier f579cda949 Merge pull request #2546 from mcharleb/doc-updates
Updated HIL documentation
2015-07-17 10:27:35 +02:00
Lorenz Meier 649b6df2b4 Merge pull request #2552 from ksschwabe/master
Moved ADC channel definitions to the board_config.h file. This way ne…
2015-07-17 10:23:38 +02:00
Lorenz Meier 9bfa214f63 Merge pull request #2569 from tinito/master
Model name from ROS parameter server instead of hardcoded string
2015-07-17 10:22:48 +02:00
Lorenz Meier 23634b257b Merge pull request #2558 from jonbinney/mav_msgs-dep
PX4 package depends on mav_msgs
2015-07-17 10:20:14 +02:00
Lorenz Meier 0e26c2b37b Merge pull request #2571 from PX4/rc_cleanup
Rc cleanup
2015-07-17 10:05:24 +02:00
Lorenz Meier c020c6ed9d MAVLink: Fix name of RC channel to correct message name 2015-07-17 09:12:11 +02:00
Lorenz Meier 01de0f9af7 MAVLink: Request right channel 2015-07-17 09:11:48 +02:00
Lorenz Meier 75a56fb736 Rename RC channels raw to proper RC channels 2015-07-17 09:11:28 +02:00
Lorenz Meier 620108bc9b Merge pull request #2570 from wingtra/ros_multiplatform_in_posix
Ros multiplatform in posix
2015-07-16 19:44:05 +02:00
devbharat 2bcbda49ac Added function prototype for missing declaration errors with nuttx 2015-07-16 18:47:47 +02:00
devbharat 68e3c477ed Tested mc_att_control_m and mc_pos_control_m in jmavsim.OK. 2015-07-16 18:00:22 +02:00
tinito 494932aeb7 Model name from ROS parameter server instead of hardcoded string 2015-07-16 14:53:07 +02:00
Lorenz Meier 5a2ed4a476 Remove unused estimator 2015-07-14 10:46:44 +02:00
Jon Binney f912e4299f PX4 package depends on mav_msgs
It already uses it in the cmakelists, but was missing a dependency in
the package.xml.
2015-07-13 14:52:39 -07:00
Lorenz Meier 482641e403 MAVLink: Crank onboard attitude rate up to 250 Hz 2015-07-13 09:36:14 +02:00
Lorenz Meier 1ecbb73394 Merge branch 'beta' 2015-07-12 20:13:20 +02:00
Lorenz Meier 9efc37a3ad Fix topic generation logic for different board targets 2015-07-12 20:13:05 +02:00
Lorenz Meier 3873fe1c00 Merge branch 'beta' 2015-07-12 17:23:20 +02:00
Lorenz Meier 3c3abc078f Topic generation: Fix compile error 2015-07-12 17:23:11 +02:00
Lorenz Meier 2909793094 Merge branch 'beta' 2015-07-12 17:13:46 +02:00
Lorenz Meier 17471eab65 Topic generation: Accept non-existing output directory 2015-07-12 17:13:31 +02:00
Lorenz Meier 7277d390c4 Merge branch 'beta' 2015-07-12 15:52:02 +02:00
Lorenz Meier cdc17f1fdd Keep temporary topic files to avoid constant re-generation, but delete them on clean 2015-07-12 15:51:43 +02:00
Lorenz Meier 9b6259c64f Header generator: Only get active for no output files or when output older than input 2015-07-12 15:51:20 +02:00
Lorenz Meier 614c397762 MPU6K self-test: Be more forgiving on offset values 2015-07-11 22:08:36 +02:00
ksschwabe b528e1f593 Added ADC channel definitions to the board_config.h file. This way new boards with different ADC channel sets can still use the Px4 adc.c driver. 2015-07-10 17:03:22 +02:00
Lorenz Meier fc5b8ee12d Commander: Use new params for home set thresholds 2015-07-10 09:50:56 +02:00
Lorenz Meier 4465c029f5 commander: Add new params for home initialization. 2015-07-10 09:50:36 +02:00
Lorenz Meier 5013c65e0d Merge pull request #2547 from mcharleb/muorb-tests
Updates to QuRT muorb tests
2015-07-10 08:55:28 +02:00
Mark Charlebois 56d12caa9a Updates to QuRT muorb tests
Added usleep test and fixed code format errors.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-09 21:32:13 -07:00
Mark Charlebois 8b886e857a Updated HIL documentation
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-09 21:11:11 -07:00
Lorenz Meier 396db730a6 FMUv1: Enable PX4 FLOW driver 2015-07-09 23:58:11 +02:00
Lorenz Meier 2a8402edb1 Merged beta into master 2015-07-09 15:55:31 +02:00
Lorenz Meier 3fa7006576 FW configs: Enable pass mixer by default 2015-07-09 15:51:44 +02:00
Lorenz Meier b1b555ceb6 MAVLink app: Increase max data rate 2015-07-09 00:50:00 +02:00
Lorenz Meier 44eff36819 SITL: Run more streams at higher rates 2015-07-09 00:49:40 +02:00
Lorenz Meier 16cb971d63 POSIX: Increase app start spacing 2015-07-09 00:48:53 +02:00
Lorenz Meier fc3a85311d POSIX: Run main apps delayed 2015-07-09 00:01:34 +02:00
Lorenz Meier df4b07937e baro sim: Fix code style 2015-07-09 00:01:20 +02:00
Lorenz Meier abfb0bbd38 POSIX: Silence HRT red herring 2015-07-08 23:30:39 +02:00
Lorenz Meier e79f81c5ed Merge pull request #2536 from PX4/safety_prearm
Safety prearm
2015-07-07 21:04:22 +02:00
Lorenz Meier c05c5bfceb Multicopters: Load gimbal mixer by default 2015-07-07 10:12:23 +02:00
Lorenz Meier 1795962328 Default Skywalker mixer to wing wing gains 2015-07-07 10:11:54 +02:00
Lorenz Meier 87b801034f IO firmware: Fix condition for output enable to also allow no throttle arming to enable outputs 2015-07-07 09:50:44 +02:00
Lorenz Meier 7b14a0258e pwm limit: Fix author list 2015-07-07 09:50:07 +02:00
Lorenz Meier eecddbcab9 Tests: Reset mixer inputs 2015-07-06 12:08:31 +02:00
Lorenz Meier ef4946f81b PWM limit: Avoid writing back into state struct 2015-07-06 12:08:31 +02:00
Lorenz Meier c9fe205db1 Mixer test: Add routine to test pre-arming 2015-07-06 12:08:31 +02:00
Lorenz Meier 433c9bf42d PWM limit lib: Support pre-arming 2015-07-06 12:08:31 +02:00
Lorenz Meier 0ca6f46ef4 IO: Allow to pre-arm the non-throttle channels with the safety switch 2015-07-06 12:08:31 +02:00
Lorenz Meier 8bb9707f3f FMU: Allow to pre-arm the non-throttle channels with the safety switch 2015-07-06 12:08:31 +02:00
Lorenz Meier 6fe717b17a Default MAVLink component ID to 1, since that is the more common assumption in the field 2015-07-06 12:05:45 +02:00
Lorenz Meier 5f586fc354 Mixer library: Fix code style 2015-07-06 10:21:44 +02:00
Lorenz Meier fd63ba7b89 FW pos control: Widen acceptance range for yaw rate to re-engage heading hold 2015-07-06 01:43:00 +02:00
Lorenz Meier a45391b244 Navigator: If orb copy fails, print FD 2015-07-05 16:17:29 +02:00
Lorenz Meier fc9d6ac39b POSIX baro SITL: Failed advert type is pointer, not number 2015-07-05 16:16:57 +02:00
Lorenz Meier 2314ebe4c2 POSIX Makefile: Fix CLANG 3.5 2015-07-05 16:16:09 +02:00
Lorenz Meier 0f24429d32 Vagrant: Force time sync 2015-07-05 16:15:51 +02:00
Lorenz Meier 936749632b POSIX: Add GDB init 2015-07-05 15:08:40 +02:00
Lorenz Meier 1d06f3ed56 Add Vagrant config 2015-07-05 15:08:24 +02:00
Lorenz Meier 01fc570351 POSIX: Fix build for non-trace builds 2015-07-05 14:01:17 +02:00
Lorenz Meier 6088fbb9be Merge branch 'beta' 2015-07-05 13:48:16 +02:00
Lorenz Meier 2adb48ce90 MC pos control: Better default velocity gain. 2015-07-05 13:48:07 +02:00
Lorenz Meier 9bd5c6ef6e Travis CI: Add CLANG so we can start to phase in SITL tests 2015-07-05 13:47:33 +02:00
Lorenz Meier f689321ded POSIX: HRT: Be more verbose on error 2015-07-05 13:46:49 +02:00
Lorenz Meier 10a77a1513 Dataman: Be more verbose on error 2015-07-05 13:46:24 +02:00
Lorenz Meier 7b8f7f7ac4 Posix tasks: Mark task creation 2015-07-05 13:45:42 +02:00
Lorenz Meier 8c5d99484e Navigator: Improve output 2015-07-05 13:45:10 +02:00
Lorenz Meier 48c356fb2b Fix parallel build for POSIX / QuRT 2015-07-05 12:06:45 +02:00
Lorenz Meier 65d035a892 Camera trigger: fix formatting 2015-07-05 12:05:59 +02:00
Lorenz Meier a02319e901 PX4 log: Fix formatting for debug and trace builds 2015-07-05 11:03:27 +02:00
Lorenz Meier a4a73ff53e POSIX: Be less verbose on CXX builds, add option to provide log verbosity level on commandline 2015-07-05 11:02:19 +02:00
Lorenz Meier d1f8edb346 Merged beta into master 2015-07-04 23:02:47 +02:00
Lorenz Meier a74cc5bf49 MAVLink app: Fix scaling of battery current 2015-07-04 19:07:08 +02:00
Lorenz Meier 89e129947d Merge branch 'release_v1.0.0' into beta 2015-07-04 18:58:40 +02:00
Lorenz Meier 6e0aa90bb8 Commander: Low-pass battery throttle to better match battery dynamics 2015-07-04 18:58:12 +02:00
Lorenz Meier cf8307f039 Commander: Low-pass battery throttle to better match battery dynamics 2015-07-04 18:57:59 +02:00
Simon Laube 440aedebad change start script to launch the px4flow driver in background.
Fixes issue #2145
2015-07-04 18:27:13 +02:00
Simon Laube d9e6cb0f58 implemented retrying the connection to the px4flow sensor before giving up. 2015-07-04 18:27:01 +02:00
Simon Laube dac74db104 change the nested if structure which tries all i2c busses to a loop. 2015-07-04 18:26:52 +02:00
Lorenz Meier f0f28d5420 POSIX SIM: Reset the HRT on system boot 2015-07-04 08:35:11 -07:00
Lorenz Meier cc3c66483c Merge branch 'release_v1.0.0' into beta 2015-07-04 17:26:56 +02:00
Lorenz Meier 4372701dab EKF: Fix entirely unnecessary C++11 dependency 2015-07-04 17:24:55 +02:00
Lorenz Meier 46a6082a26 POSIX: remove shell delay 2015-07-04 08:09:31 -07:00
Lorenz Meier 5a1af860ab Sim: Enforce boot order is correct, sim starts first 2015-07-04 08:09:12 -07:00
Lorenz Meier 32bf4dc773 simulator: Add output so user knows that the simulator / system is waiting for data 2015-07-04 07:25:08 -07:00
Lorenz Meier 0499ddb1dd POSIX: Add debug output to show where the app returns 2015-07-04 07:25:08 -07:00
Lorenz Meier 52687cb8e1 Rename make sitlrun to make sitl_quad 2015-07-04 07:25:08 -07:00
Lorenz Meier 8c004fa6d8 SITL: Move simulator startup to the beginning of the startup 2015-07-04 07:25:08 -07:00
Lorenz Meier 30ac7a59c8 Merge pull request #2207 from mhkabir/cam_trig_new
Camera trigger WIP
2015-07-04 18:38:05 +02:00
Lorenz Meier 969d6cd563 Merge pull request #2499 from leitwert/feature/retry-start-px4flow
Feature: Retry start px4flow
2015-07-04 18:26:14 +02:00
Lorenz Meier 00c87c041a EKF: Fix entirely unnecessary C++11 dependency 2015-07-04 17:25:21 +02:00
Lorenz Meier 7a24ccd51d Merge branch 'release_v1.0.0' into beta 2015-07-04 11:59:28 +02:00
Lorenz Meier 939d475ef2 Output flaps in all flight modes 2015-07-04 11:59:10 +02:00
Lorenz Meier 134f3d8858 Wing wing config: Remove tuning gains which are close to the defaults 2015-07-04 11:39:54 +02:00
Lorenz Meier 3671ce716a Set better defaults for fixed wing position controllers 2015-07-04 11:39:31 +02:00
Lorenz Meier ec85918e40 Set better defaults for fixed wing attitude controllers 2015-07-04 11:39:12 +02:00
Lorenz Meier 95eaebb28d Merge branch 'release_v1.0.0' 2015-07-04 10:47:18 +02:00
Lorenz Meier 2a7abeb20c Merge branch 'release_v1.0.0' into beta 2015-07-04 10:46:38 +02:00
Lorenz Meier 8f4b9c02f0 EKF: Fix for the GPS timeout logic 2015-07-04 10:46:19 +02:00
Lorenz Meier b27b864cf0 Commander: Only copy global position is valid. This is because the app assumed that it only gets published once valid. 2015-07-04 10:46:19 +02:00
Lorenz Meier 1da72df72d Merge pull request #2527 from UAVenture/mc_offboard_vel_ctrl
Set altitude control flag for velocity control
2015-07-04 08:22:53 +02:00
Lorenz Meier 71f819a23d Merge branch 'release_v1.0.0' into beta 2015-07-03 23:57:50 +02:00
Lorenz Meier 234aeb642b Commander: Compile fix 2015-07-03 23:57:38 +02:00
Lorenz Meier 615affdef9 S.BUS Output: deliver the disarmed PWM values 2015-07-03 23:51:45 +02:00
Lorenz Meier f8f412fc61 Commander: Compile fix 2015-07-03 23:50:47 +02:00
Lorenz Meier 9e223f0c26 Commander: Fix dynamic battery scaling, proposed by @orangelynx. Fixes #2523. 2015-07-03 23:19:04 +02:00
Lorenz Meier 5fef9aa3f9 Merge branch 'release_v1.0.0' into beta 2015-07-03 23:18:13 +02:00
Lorenz Meier e23459e850 Commander: Fix dynamic battery scaling, proposed by @orangelynx. Fixes #2523. 2015-07-03 23:17:50 +02:00
Lorenz Meier f6dcdc8b13 Merge branch 'release_v1.0.0' into beta 2015-07-03 14:56:11 +02:00
Lorenz Meier ecaa25ba1a FMUv2: Retire attitude only EKF 2015-07-03 14:55:53 +02:00
Lorenz Meier 9451d22850 Aerocore: Retire attitude-only EKF 2015-07-03 14:54:25 +02:00
Andreas Antener 88d200e3a4 set altitude control flag for velocity control 2015-07-03 14:36:55 +02:00
Lorenz Meier 542c3b750e Merge branch 'release_v1.0.0' into beta 2015-07-03 00:25:58 +02:00
Don Gagne e1c050df09 Generic AETR and AERT airframes
Bixler converted to generic AERT
2015-07-03 00:25:24 +02:00
Lorenz Meier 31c13ae83f Merge pull request #2525 from PX4/FixedWingMixers
Generic AETR and AERT airframes
2015-07-03 00:20:09 +02:00
Don Gagne 51c515a14f Generic AETR and AERT airframes
Bixler converted to generic AERT
2015-07-02 14:46:37 -07:00
Lorenz Meier 39fd3c1d4f Update vehicle config mixer URLs 2015-07-02 22:29:19 +02:00
Lorenz Meier 10eb5de5ce Add vehicle config list for downstream config tools 2015-07-02 22:23:23 +02:00
Lorenz Meier 9c60154a28 POSIX HRT Driver: Count from 0, not UNIX epoch 2015-07-02 17:27:28 +02:00
Lorenz Meier 7600242c96 Merge pull request #2410 from PX4/sdlog_cleanup
WIP: Sdlog cleanup
2015-07-02 10:10:06 +02:00
Lorenz Meier e19a068ebb Better SITL gains for yaw 2015-07-02 00:04:06 -07:00
Lorenz Meier efb7d9393e POSIX: Set SITL gains back to normal vehicle defaults 2015-07-01 23:59:39 -07:00
Lorenz Meier adfd1b2579 sensors: Ensure data is good before publishing 2015-07-01 23:55:20 -07:00
Lorenz Meier b0a0e60c5f POSIX: Workaround for broken px4_read interface to accel 2015-07-01 19:54:17 -07:00
Lorenz Meier ce439345c5 HIL driver: Fix build breakage 2015-07-02 11:19:57 +02:00
Lorenz Meier 1cb572f484 POSIX: Fix MAVLink sequencing 2015-07-01 18:27:01 -07:00
Lorenz Meier 20de4aaaa5 HIL driver: Output zero like the other actuator drivers do when not armed 2015-07-02 11:04:59 +02:00
Lorenz Meier 20992b1437 Merge pull request #2519 from mcharleb/fabs-fix-2
Change fabsf() to abs for int arg
2015-07-02 10:12:49 +02:00
Mark Charlebois 2ea82548a4 Change fabsf() to abs for int arg
Clang complains that fabsf() is being used for an int arg. Use abs() instead.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-02 01:06:26 -07:00
Lorenz Meier b47d623d57 Merge pull request #2518 from mcharleb/posix-muorb
POSIX: added muorb tests
2015-07-02 09:20:10 +02:00
Lorenz Meier 83414b8bc5 Merge pull request #2517 from mcharleb/uorb-fixes
uORBManager: allocate instance on first use
2015-07-02 09:19:41 +02:00
Lorenz Meier dc7245201b Merge pull request #2515 from mcharleb/sitl-config-formatting
SITL: fixed formatting of config_posix_sitl.mk
2015-07-02 09:18:45 +02:00
Lorenz Meier 86d70a1e9e Merge pull request #2512 from mcharleb/tests-posix-clang-fix-2
POSIX: do not error on stack size warning
2015-07-02 09:14:25 +02:00
Lorenz Meier 69f17d084a Merge pull request #2513 from mcharleb/inav-posix-fix
POSIX: don't check stack size for position_estimator_inav
2015-07-02 09:09:00 +02:00
Lorenz Meier 688958b05f Merge pull request #2514 from mcharleb/simulator-update
Simulator updated to publish sensor data for sensors module
2015-07-02 09:08:43 +02:00
Mark Charlebois d219076d52 POSIX: added muorb tests
Unit tests for muorb on posix build. These run on the Krait processor.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-01 21:33:21 -07:00
Mark Charlebois 0c72d66ece uORBManager: allocate instance on first use
Previously _Instance was statically initialized. Now it is
allocated at first use.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-01 21:26:00 -07:00
Mark Charlebois 31e4b4e17b SITL: fixed formatting of config_posix_sitl.mk
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-01 21:09:00 -07:00
Mark Charlebois f6af5dc312 Added hil_sensor to Subscription.cpp
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-01 20:20:45 -07:00
Mark Charlebois 1efabba6a6 SITL: Added HIL message used by simulator
The simulator uses this messgage to get incoming data from
jMAVSim that it publishes as sensor data that is consumed by the
sensors module.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-01 18:20:14 -07:00
Mark Charlebois c611749b4f Simulator: modified -p to publish individual sensor data
The simulator was changed to publish the sensor data that is read
by the sensors module when the -p flag is passed.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-01 18:20:14 -07:00
Mark Charlebois 381b889526 POSIX: don't check stack size for position_estimator_inav
posix build fails on x86_64 with this check enabled.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-01 18:00:49 -07:00
Mark Charlebois f659a3e8cc POSIX: do not error on stack size warning
posix build fails on x86_64 with this check enabled.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-01 16:55:20 -07:00
Lorenz Meier 02850e0d16 Merge pull request #2510 from mcharleb/fabsf-fix
Chage use of fabsf for int to abs
2015-07-02 01:34:48 +02:00
Mark Charlebois 043bf9a4d7 Chage use of fabsf for int to abs
Use of fabsf() for int arg failed for clang. Changed to use abs().

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-01 16:13:49 -07:00
Lorenz Meier 8ce38cefae Merge pull request #2509 from mcharleb/qurt-layer
Qurt layer
2015-07-02 01:11:48 +02:00
Lorenz Meier e35648a398 Merge branch 'release_v1.0.0' of github.com:PX4/Firmware into beta 2015-07-02 01:00:29 +02:00
Lorenz Meier 234990fbe4 Merge branch 'release_v1.0.0' of github.com:PX4/Firmware 2015-07-02 01:00:06 +02:00
Mark Charlebois 0e7fab457b Removed extra whitespace
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-01 15:59:20 -07:00
Lorenz Meier 10961aac0e Merge pull request #2482 from PX4/mc_thr_lim
MC pos control: Enforce minimum throttle in manual attitude control m…
2015-07-02 00:59:00 +02:00
Lorenz Meier 347e3e9a7e PX4 log header: Add missing include 2015-07-02 00:37:39 +02:00
Lorenz Meier f411b7ed21 Merge branch 'getopt-cleanup-v2' 2015-07-02 00:26:57 +02:00
Mark Charlebois 28dd9759a6 POSIX: fixes for use of open vs px4_open, etc
Fixes for the posix build when virtual devices are used.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-01 23:51:12 +02:00
Lorenz Meier af4cc8ec91 Merge pull request #2501 from mcharleb/whitespace-cleanup
Code cleanup - Whitespace changes
2015-07-01 23:46:44 +02:00
Lorenz Meier 509ec90b76 Merge pull request #2406 from mcharleb/logging-v3
Improved logging with both compile and runtime level filtering
2015-07-01 23:31:50 +02:00
Lorenz Meier 13e585f9fb Merge pull request #2500 from mcharleb/systemcmds-tests-posix
Systemcmds tests posix
2015-07-01 23:25:54 +02:00
Mark Charlebois b5e6111d7c QuRT: src/platform/qurt changes
Changes to support QuRT intrgration with DSPAL and
move from simulator to real HW.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-01 12:54:27 -07:00
Lorenz Meier 8237b8bbaf Merge pull request #2502 from mcharleb/qurt-tests
QuRT: Unit tests for QuRT
2015-07-01 21:10:01 +02:00
Lorenz Meier c63f5f0486 Merge pull request #2503 from mcharleb/posix-arm-updates
Eagle: posix-arm and qurt changes to support Eagle HW platform
2015-07-01 21:09:49 +02:00
Mark Charlebois 60ec1c897a QuRT: Added muorb files
muorb is used to proxy messages between the Krait and DSP.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-01 11:12:50 -07:00
Mark Charlebois 851a020461 Eagle: posix-arm and qurt changes to support Eagle HW platform
The Eagle HW platform contains both a Krait (ARMv4hf compatible) cpu
cluster and a Hexagon DSP running QuRT.

These changes support the PX4 build for Eagle.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-01 09:48:50 -07:00
Mark Charlebois 6b5a9d6c7b QuRT: Unit tests for QuRT
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-01 09:29:05 -07:00
Mark Charlebois 6763039980 Code cleanup - Whitespace changes
These are only whitespace changes

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-01 09:10:30 -07:00
Mark Charlebois e1de3c13c6 POSIX: added required header file for PRId64
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-01 08:04:51 -07:00
Mark Charlebois 63f7995b41 NuttX: fixes for printing size_t and int64_t
Added definition of PRId64 for C99 compatibility.
Used %zd for portable wat to print size_t.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-01 07:51:24 -07:00
Mark Charlebois 1e46f44123 POSIX: ported systemcmds/tests
Most of the systemcmds tests run in the posix build. The UART tests
fail for me as I do not have a UART connected.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-01 07:51:24 -07:00
Lorenz Meier 9c7450248f Merge pull request #2498 from mcharleb/bringup-m5
POSIX: Critical fix for vdev_posix
2015-07-01 15:13:29 +02:00
Lorenz Meier bc5cf50f1a Merge pull request #2361 from TSC21/mocap_support_restruct
MOCAP support on firmware [new PR]
2015-07-01 14:52:32 +02:00
Lorenz Meier c7e94baa5b Update SITL docs 2015-07-01 12:56:22 +02:00
Mark Charlebois d0b6c8f956 GCC: Added fix for strict prototypes warning
GCC requires a declaration of a static inline function prior to its
definition when strict-prototypes warning is enabled.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-30 15:20:04 -07:00
Simon Laube 07efb655c4 change start script to launch the px4flow driver in background.
Fixes issue #2145
2015-06-30 21:15:50 +02:00
Mark Charlebois 14bf8bb277 POSIX: Critical fix for vdev_posix
Last fix for vdev_posix.cpp introduced a sleep from within
a HRT work item callback which blocks the HRT queue.

The code in uORBDevices_posix.cpp that handles message
throttling was commented out for posix. The code was re-enabled
and now seems to work.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-30 12:08:42 -07:00
Lorenz Meier 428bd0a9ec Merge pull request #2497 from mcharleb/bringup-m5
Bringup m5
2015-06-30 20:02:57 +02:00
Mark Charlebois 1b01c54dd1 POSIX: fixed build error for unused variable
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-30 09:53:01 -07:00
Simon Laube 7a93348340 implemented retrying the connection to the px4flow sensor before giving up. 2015-06-30 18:28:19 +02:00
Mark Charlebois 34d15fe631 Gyrosim cleanup
Removed unused code. Reset reschedule interval for sampling when the
sampling rate is changed.

The rate is always 1000Hz as it is set to the default value.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-30 09:23:37 -07:00
Mark Charlebois 641fd26877 QuRT: Fixed PX4_ISFINITE
QuRT needs to use the builtin version of isfinite so for the qurt
build PX4_ISFINITE(x) is defined as __builtin_isfinite(x).

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-30 09:10:06 -07:00
Simon Laube 93dfc435a4 change the nested if structure which tries all i2c busses to a loop. 2015-06-30 17:53:19 +02:00
Lorenz Meier aeccaf6582 Merge branch 'radioconf' into beta 2015-06-30 15:26:26 +02:00
Lorenz Meier 3d860086fa Merge branch 'release_v1.0.0' into beta 2015-06-30 15:26:18 +02:00
Lorenz Meier 3ef6212155 MAVLink app: Less verbose during radio config 2015-06-30 15:26:05 +02:00
Lorenz Meier b8609f99d7 MAVLink app: Fix parameter comments 2015-06-30 15:24:05 +02:00
Lorenz Meier f0e9817f2b ROMFS: Adjust onboard data rate 2015-06-30 15:19:57 +02:00
Lorenz Meier 963972721d MAVLink app: Support rudimentary radio config. 2015-06-30 13:21:09 +02:00
Lorenz Meier 319f9d820f telemetry: Crank up rates to make param downloads and other things less painful 2015-06-30 12:55:28 +02:00
Lorenz Meier 6697ffb668 IO driver: Set throttle to zero if in PWM ramp mode 2015-06-30 09:51:19 +02:00
Lorenz Meier 1b4405ee3a FMU driver: Set throttle to zero if in PWM ramp mode 2015-06-30 09:51:19 +02:00
Lorenz Meier cde8d72694 PWM output limiter: Improve comments. 2015-06-30 09:51:19 +02:00
Lorenz Meier a33700a7ec Actuator controls: Add indices for channels and groups 2015-06-30 09:51:05 +02:00
Lorenz Meier ece87a3fa2 Mixer test: Fixed compile warnings 2015-06-30 09:51:04 +02:00
Lorenz Meier c28a69fba8 Mixer test: Ensure its not susceptible to timing jitter of the test harness 2015-06-30 09:51:04 +02:00
Lorenz Meier 5bec38b37d MC land detector: Slightly decrease allowed vertical motion during landed state. This is important so that fast descends do not result in a false positive landed state 2015-06-30 09:51:04 +02:00
Lorenz Meier 5549d480fd MC land detector: Update params and fix docs. Allow more motion during the landed state, but become more picky on throttle. 2015-06-30 09:51:04 +02:00
Lorenz Meier 9a36588361 MC land detector: If no position information is available, rely on the armed state exclusively to infer the landed condition. 2015-06-30 09:51:04 +02:00
Lorenz Meier 5982eaaf34 MC pos control: Enforce minimum throttle in manual attitude control mode only if not landed, else default to idle throttle 2015-06-30 09:51:03 +02:00
Lorenz Meier 7b05165249 Param unit test: Fix CLANG compile warning 2015-06-30 07:15:40 +02:00
Lorenz Meier 7266ba1583 Merge branch 'release_v1.0.0' of github.com:PX4/Firmware into beta 2015-06-30 07:11:13 +02:00
Lorenz Meier 395ef5562c navigator: Fix param meta data and comments 2015-06-30 07:10:26 +02:00
Lorenz Meier abbbfdfcee mc pos control: Fix params and descriptions 2015-06-30 07:10:13 +02:00
Lorenz Meier 93d3eb1b4c Merge branch 'release_v1.0.0' of github.com:PX4/Firmware into beta 2015-06-30 07:01:19 +02:00
Lorenz Meier 77ff09792e vtol: Fix param meta data 2015-06-30 07:00:54 +02:00
Lorenz Meier 97e3c379ab sensors: Fix param meta data 2015-06-30 07:00:41 +02:00
Lorenz Meier 0271a56487 navigator: Fix param meta data 2015-06-30 07:00:30 +02:00
Lorenz Meier 0a9e2b3923 MAVLink app: Fix param meta data 2015-06-30 07:00:17 +02:00
Lorenz Meier f48ed93469 EKF: Fix param meta data 2015-06-30 07:00:05 +02:00
Lorenz Meier cc3b4b3c35 commander: Fix param meta data 2015-06-30 06:59:54 +02:00
Mark Charlebois da2ac877f8 POSIX: Changed px4_poll to use hrt_work queue
QuRT's pthread_cancel implementation is lacking, and causes px4_poll to
always wait for the maximumn timeout. A cleaner implementation is provided
that uses the HRT work queue for posix targets.

In the future the posix code should be rtefactiored so that qurt (and other)
implementations that are duplicated, use the posix implementation.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-29 19:08:06 -07:00
Lorenz Meier a1dd0bc758 Merge pull request #2493 from cctsao1008/patch-3
Adjust the duration of the BIND pulse
2015-06-29 22:43:13 +02:00
cctsao1008 e9d5978165 Adjust the duration of the BIND pulse
Some DSMX Remote Receiver can't enter BIND mode with the duration about 25us but 120us.
2015-06-30 00:21:47 +08:00
Lorenz Meier e6688287cc Merge pull request #2478 from PX4/ekf_gains
EKF gains
2015-06-29 09:11:22 +02:00
Lorenz Meier b72ac1428c Merge pull request #2481 from PX4/mc_yawfix
MC yawfix
2015-06-28 23:29:57 +02:00
Ban Siesta abc069dc13 makefiles: add /dev/serial/by-id/pci-3D_Robotics* to the ports to try on Linux 2015-06-28 16:48:11 +02:00
Lorenz Meier ce45695915 Merge pull request #2487 from bansiesta/fix_linux_port_wildcard
Fix upload on some Linux machines
2015-06-28 16:47:32 +02:00
Lorenz Meier 2b34e46960 Merge pull request #2488 from bansiesta/fix_land_detector_start
land_detector: shut up if started correctly
2015-06-28 16:31:21 +02:00
Lorenz Meier 74d95f0441 INAV: Remove extra C++ flag 2015-06-28 16:31:04 +02:00
Lorenz Meier 5523b1ee4f Re-enable INAV verbose options 2015-06-28 16:29:46 +02:00
Lorenz Meier 99d59971ac INAV app: Fix commandline handling
Conflicts:
	src/modules/position_estimator_inav/position_estimator_inav_main.c
2015-06-28 16:29:00 +02:00
Ban Siesta b0642f8d32 land_detector: shut up if started correctly 2015-06-28 15:24:48 +01:00
Ban Siesta 0c1ec5eb8b makefiles: add /dev/serial/by-id/pci-3D_Robotics* to the ports to try on Linux 2015-06-28 15:15:50 +01:00
Lorenz Meier a0b89e55a9 Merge pull request #2485 from UAVenture/mp_mpc_vel_max
Add max velocity constraints to multiplatform MPC
2015-06-28 13:41:29 +02:00
Lorenz Meier 60b8c28be2 INAV app: Fix commandline handling 2015-06-28 13:35:55 +02:00
Lorenz Meier cddfcb35d8 Posix main: Only delay app startup 50 ms 2015-06-27 11:55:21 -07:00
Lorenz Meier dfae432f1a commander: Fix mag cal printing 2015-06-27 11:55:02 -07:00
Lorenz Meier d19de58102 Merge branch 'master' of github.com:PX4/Firmware into master_release 2015-06-27 11:54:17 -07:00
Lorenz Meier 064c02a817 MC controller: Update use to new uORB API 2015-06-30 15:46:40 +02:00
Lorenz Meier 6cf47b59da FW controller: Update use to new uORB API 2015-06-30 15:46:14 +02:00
Lorenz Meier 4cf9976ad8 Merge branch 'master_release' of github.com:PX4/Firmware into master_release 2015-06-30 15:43:53 +02:00
Lorenz Meier 50ba1f7365 merged release_v1.0.0 into master 2015-06-30 15:30:45 +02:00
Lorenz Meier ac6abacac9 VTOL controller: Fix usage of old uORB API, fix indentation 2015-06-29 16:28:33 +02:00
Lorenz Meier 93580da922 commander: Restructure ifdef logic for POSIX build to keep NuttX and POSIX implementations aligned 2015-06-29 16:24:34 +02:00
Lorenz Meier 5b354b9631 PWM driver: Fix _IOC to _PX4_IOC for getting servo rate 2015-06-29 16:10:40 +02:00
Lorenz Meier 6638729af7 Update orb advert type in mavlink, by @boosfelm 2015-06-29 15:47:19 +02:00
Lorenz Meier a97931bf20 Update orb advert type in commander, by @boosfelm 2015-06-29 15:46:59 +02:00
Andreas Antener b02c4ec356 add max vel constraints to multiplatform MPC 2015-06-27 18:12:18 +02:00
Andrew Tridgell 5e27b7bc31 ms5611: fixed the i2c device on NuttX. This was left-over debugging noise from the POSIX bringup. 2015-06-27 15:11:03 +02:00
Lorenz Meier cf4778b662 Update VTOL EKF default params 2015-06-27 11:13:37 +02:00
Lorenz Meier 4c70fadb38 Update MC EKF default params 2015-06-27 11:13:18 +02:00
Lorenz Meier 4d4f3cffef Update FW EKF default params 2015-06-27 11:13:05 +02:00
Lorenz Meier ba68b70b0b MC pos control: Comment style fixes 2015-06-27 10:53:00 +02:00
Lorenz Meier 0fe01f6eb8 MC pos control: Fix manual yaw handling to not reset yaw in extreme angle conditions 2015-06-27 10:17:15 +02:00
Lorenz Meier be69887b7e EKF: Improved down gains from @boosfelm and @surberj 2015-06-26 19:50:49 +02:00
Lorenz Meier c428b77512 Merge pull request #2475 from tumbili/SITL_mission
Sitl mission enable
2015-06-26 19:35:29 +02:00
tumbili 47c4ece9eb use px4_poll instead of poll 2015-06-26 15:07:30 +02:00
tumbili c49511fb66 start land detector for SITL 2015-06-26 15:07:22 +02:00
tumbili 40cc11a5ed ported land detector 2015-06-26 15:01:17 +02:00
tumbili 3defabfbea build land detector for posix 2015-06-26 15:00:59 +02:00
Lorenz Meier af28016a10 Merge pull request #2236 from TSC21/drivers_cleanup
drivers: added validity check
2015-06-26 07:39:09 +02:00
tumbili 572f1f4637 fill local position setpoint message entirely 2015-06-26 07:11:22 +02:00
Lorenz Meier e7ffa9b428 Merge pull request #2472 from tumbili/SITL_progress
Sitl progress
2015-06-26 07:11:15 +02:00
Lorenz Meier 51055a16fc L3GD20: Set max offset for gyro to 25 degrees per second based on comment from mailing list about datasheet ratings. 2015-06-26 07:08:54 +02:00
tumbili bd96f21ccb fill local position setpoint message entirely 2015-06-26 00:43:26 +02:00
tumbili f7a6afc976 improve SITL startup script 2015-06-26 00:43:26 +02:00
Lorenz Meier 2b0feb72d2 Merge pull request #2470 from tumbili/gpsim_fix
scall epv and eph correclty
2015-06-26 00:08:20 +02:00
tumbili b1991b3813 scale epv and eph correctly 2015-06-25 23:48:38 +02:00
Lorenz Meier 3045146dcd Merge branch 'release_v1.0.0' of github.com:PX4/Firmware into beta 2015-06-25 22:47:11 +02:00
Lorenz Meier 6eb0bd0d9c Merge pull request #2469 from tumbili/publishing_fixes
VTOL: only publish attitude setpoint if in correct mode
2015-06-25 22:44:51 +02:00
tumbili dcb680f9d6 VTOL: only publish attitude setpoint if in correct mode 2015-06-25 22:08:52 +02:00
Lorenz Meier 454becdae5 Merged release_v1.0.0 branch into master 2015-06-25 21:45:17 +02:00
Lorenz Meier d6f05fbada Merge branch 'release_v1.0.0' of github.com:PX4/Firmware into beta 2015-06-25 21:20:21 +02:00
Lorenz Meier 74bdec2cc6 Merge pull request #2459 from wingtra/estimator_LP_rates_log_covariances
EKF Enhancments: LP filters on rates and covariance added to logging
2015-06-25 10:45:14 +02:00
Lorenz Meier 475c28803e param command: Fix error handling if param is not found 2015-06-25 09:28:22 +02:00
Lorenz Meier 3bad91dd3b systemlib: Fix param access for used params 2015-06-25 09:28:04 +02:00
Lorenz Meier c2127f9501 mavlink app: Fix POSIX UDP transfer issues on larger packets 2015-06-25 08:46:26 +02:00
Lorenz Meier 79a690cd17 Merge branch 'release_v1.0.0' into beta 2015-06-24 21:46:01 +02:00
Lorenz Meier ff3eaf42fa Merge pull request #2455 from PX4/shell_return
POSIX: Force shell to not immediately return
2015-06-24 17:39:31 +02:00
Youssef Demitri 66a637dcc7 added covariances to estimator_status and logging 2015-06-24 15:28:09 +02:00
Youssef Demitri da29b88a04 added LP filters (10Hz) on attitude rates in estimator 2015-06-24 14:37:58 +02:00
Lorenz Meier ab550bcbbf POSIX: Force shell to not immediately return 2015-06-24 09:32:27 +02:00
Lorenz Meier 55f47a68b5 Merge pull request #2454 from tumbili/gyrosim_cleanup
remove usleep in gyrosim
2015-06-24 09:27:54 +02:00
tumbili 24ac4c9891 remove usleep in gyrosim 2015-06-24 09:19:59 +02:00
Lorenz Meier a10d34d4a3 Merge pull request #2453 from tumbili/mavlink_verbosity
improve mavlink verbosity
2015-06-24 00:18:21 +02:00
Lorenz Meier 0bd6d46f29 Merge pull request #2451 from tumbili/vdev_fd
VDev: get rid of those nasty "node_open as advertiser failed"
2015-06-24 00:16:14 +02:00
tumbili 51c8f64e98 improve mavlink verbosity 2015-06-23 23:48:03 +02:00
tumbili 7043869237 VDev:
- increase max number of devices to 200
- increase max number of file descriptors to 200
- add warning if number of file descriptor exceeds max value
2015-06-23 18:32:40 +02:00
Lorenz Meier ad1158b548 Fix F450 default gains 2015-06-23 09:07:49 +02:00
TSC21 75ec0267c9 mocap_support: update to debug log structure 2015-06-23 00:41:23 +01:00
Lorenz Meier f9de327d6a Merge pull request #2443 from tumbili/SYS_RESTART
set SYS_RESTART_TYPE in sitl startup, normally IO does that
2015-06-22 14:02:28 +02:00
tumbili 8a3ac1f541 set SYS_RESTART_TYPE in sitl startup, normally IO does that 2015-06-22 13:47:11 +02:00
Lorenz Meier 736125441e POSIX: Allow unused variables in INAV estimator temporarily 2015-06-21 17:20:31 -07:00
Lorenz Meier 7df785ed50 POSIX: Use the same estimators for multicopters as on the real system 2015-06-21 17:20:31 -07:00
Lorenz Meier 92d168a476 Q attitude estimator: Resolve POSIX porting issues: Add protection against bad input and output data 2015-06-21 17:20:31 -07:00
Lorenz Meier 1d6f459e8c INAV: Disable verbose printing which created issues on POSIX. Needs further inspection 2015-06-21 17:20:31 -07:00
Lorenz Meier cc499fcc29 Enable Q attitude estimator and INAV 2015-06-21 17:20:31 -07:00
Lorenz Meier f01913a2bc Merge pull request #2442 from tumbili/status_text_fix
Status text fix
2015-06-22 10:13:45 +02:00
Lorenz Meier 3e55e32098 sdlog2: Fix mavlink output 2015-06-22 09:59:09 +02:00
Lorenz Meier 6be1e7f7e8 INAV: Fix mavlink output 2015-06-22 09:58:54 +02:00
Lorenz Meier 426b961abd MC pos control: Fix mavlink output 2015-06-22 09:58:40 +02:00
Lorenz Meier 46428769a5 FW pos control: Fix mavlink output 2015-06-22 09:58:27 +02:00
Lorenz Meier 71fc0f5bc4 EKF: Fix mavlink output 2015-06-22 09:58:11 +02:00
Lorenz Meier 82f3d4e877 commander: Fix mavlink output 2015-06-22 09:58:01 +02:00
Lorenz Meier dfdc2c999d Bottle drop: Fix mavlink output 2015-06-22 09:57:49 +02:00
tumbili 80f1c517cc init VDev for mavlink log device 2015-06-22 09:43:12 +02:00
tumbili dd9e3cd315 call px4_open instead of open 2015-06-22 09:40:45 +02:00
Lorenz Meier a94b2bc3b5 Merge pull request #2435 from vooon/ftp_on_sys_companion
rcS: Enable FTP on companion link
2015-06-20 23:53:47 +02:00
Vladimir Ermakov 45bae85daa ROMFS: Enable FTP on companion link
Not sure that ftp usable in 57600. Tested on 921600.
2015-06-21 00:31:23 +03:00
Mark Charlebois 4a17411f8f POSIX: Added systemcmds esc_cal and reboot modules
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-19 13:26:58 -07:00
Mark Charlebois 71fc3a96df Merge branch 'master' of https://www.github.com/PX4/Firmware into getopt-cleanup-v2 2015-06-19 12:54:17 -07:00
Lorenz Meier 3627456dd6 POSIX config: Fix order of dev IDs 2015-06-19 12:01:48 -07:00
Lorenz Meier 27cec4a977 VDev POSIX: Fix non-POSIX conformant return value handling 2015-06-19 11:52:07 -07:00
Lorenz Meier d81d20ff0e VDev: Add missing break 2015-06-19 11:51:37 -07:00
Mark Charlebois f7fe6a037d Converted getopt use to px4_getopt
In the posix and qurt builds, getopt is not thread safe so px4_getopt
should be used instead.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-19 11:39:08 -07:00
Lorenz Meier 878284701d POSIX: Simulator: Use port 14560, since 14550 is QGroundControls default port 2015-06-19 10:45:26 -07:00
Lorenz Meier 79d9e1be8d sensors app: Load missing param 2015-06-19 10:44:58 -07:00
Lorenz Meier bf24d42a79 POSIX: Fix SITL startup script 2015-06-19 10:44:36 -07:00
Lorenz Meier 468e233ebe Merge pull request #2425 from tumbili/udp_receiver
Udp receiver
2015-06-19 18:49:03 +02:00
tumbili 655617f958 mavlink:
- implement get_free_tx_buf() for UDP and TCP
- gefine get_uart_fd for all platforms
2015-06-19 18:39:05 +02:00
tumbili ecbc286469 added function to return socket fd 2015-06-19 18:39:04 +02:00
tumbili c4d92ff05b enable receiving data over network port 2015-06-19 18:39:04 +02:00
Lorenz Meier bb76ac722c Merge branch 'release_v1.0.0' of github.com:PX4/Firmware into beta 2015-06-19 10:22:10 +02:00
Lorenz Meier a652642286 POSIX: Fix dataman start order 2015-06-18 14:24:35 -07:00
Mark Charlebois 785053e4f1 px4_log: reverted unused attribute annotations
Used a do_nothing() function for px4_omit() that will satisfy the
compiler so it will not report unused variables when a debug
message is compiled out.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-18 07:41:22 -07:00
Lorenz Meier 5de6d1b3c4 Merge branch 'release_v1.0.0' into beta 2015-06-18 11:03:58 +02:00
Mark Charlebois 7734195242 gpssim: cleaned up gpssim code
The gpssim code was named gps_sim vs being consistent with other
simulators (gpssim). It also used warnx and errx and had lots of
commeted out code.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-18 09:02:30 +02:00
Lorenz Meier a94a8c5f51 sdlog2: Flow: Remove unused field 2015-06-18 08:56:36 +02:00
Mark Charlebois 552c9800a9 px4_log: Fixed compiler warning when using PX4_LOG
If __px4_log_level_current is unsigned then the runtime filter
comparison warns because an unsigned value can't be less than zero.

Changed typed to signed so compiler will not issue a warning.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-17 19:04:57 -07:00
Mark Charlebois fc5eb7af6f unittests: Fixed dependency on px4_log.c
px4_log.c was added to px4_platform library and the library was added
to unit tests that use the log macros.

There is also a dependency on hrt_absolute_time() as well which requires
px4_platform.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-17 18:05:04 -07:00
Mark Charlebois 29a36da22c px4_log: Added documentation and handled unused variables
Added __attribute__ ((unused)) for variables used only for log
output and flagged as unused if the message log level is compiled out.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-17 17:11:21 -07:00
Mark Charlebois dad0526a99 px4_log: Added include for ROS
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-17 13:50:49 -07:00
Mark Charlebois a2297aa950 px4_log: Fixed ROS build
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-17 13:49:34 -07:00
Mark Charlebois 65e9fd9dd8 px4_log: minor fixes to logging header file
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-17 13:37:27 -07:00
Mark Charlebois 1a8703ec1c Improved logging with both compile and runtime level filtering
The device level debug will have to be removed and the debugging
can be based on this new logging structure which can tell where
an error (or debug output) occured whch the current implmentation
cannot.

The one limitation is the new macros cannot take a char* for the
format parameter. It must be an actual string literal because it
is concatenated with other strings.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-17 13:28:27 -07:00
Lorenz Meier f56990a9ec Merge pull request #2404 from PX4/master_uavcan_memory
Compile Time - Conditional inclusion of the Node Allocation and FW Server
2015-06-17 19:44:58 +02:00
David Sidrane d6c2dd997b Conditional inclusion of the Node Allocation and FW Server - default is OFF 2015-06-17 06:21:28 -10:00
Lorenz Meier 10e92dc80b Merge pull request #2398 from mcharleb/makefile-cleanup
Makefile cleanup
2015-06-16 23:42:10 +02:00
Mohammed Kabir 3d92364d9e camera trigger : increase free cycling time when we are not enabled 2015-06-16 22:55:05 +05:30
Mark Charlebois 84bf4bb6bb Use ?= for MK_DIR in firmware.mk
APU requires the use of ?= for MK_DIR but the use of lastword was
causing MK_DIR to be a subdir of makefiles. Changed lastword to
firstword (which is always the path to firmware.mk) which fixed
the problem.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-16 09:58:48 -07:00
Mark Charlebois 17b23f4e80 SITL: Added documentation on file paths
Added description of how to create required directories

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-16 09:58:48 -07:00
Mark Charlebois 26d2589e97 makefile cleanup
Moved nuttx specific make rules to files in makefiles/nuttx.

All target specific makefiles are in their target sub directories.

To minimize file duplication, targets that share rules include a
common file. For example the posix and posix-arm targets both use
makefiles/posix/posix_elf.mk

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-16 09:58:48 -07:00
Mohammed Kabir 6a818ae053 commander : ignore handling camera_trigger command 2015-06-16 15:47:55 +05:30
Mohammed Kabir ba89883fb0 camera trigger: minor cleanup 2015-06-16 15:44:58 +05:30
Lorenz Meier da5014fe95 Merge pull request #2389 from mcharleb/gyrossim-cleanup-2
gyrosim: removed dead code from gyrosim
2015-06-16 08:35:28 +02:00
Lorenz Meier bfa840668b Merge pull request #2387 from mcharleb/SITL-readme-fix
SITL: updated README and rc.S
2015-06-16 08:25:16 +02:00
Mark Charlebois ed58e83460 gyrosim: removed dead code from gyrosim
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-15 18:08:22 -07:00
Mark Charlebois 834e3c0587 SITL: updated README and rc.S
Changed rc.S to rcS.

Updated README.md to explain the require directory structure and
where to run mainapp from for SITL to work correctly.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-15 15:48:12 -07:00
Lorenz Meier 2e5d2c1cbe Merge pull request #2385 from mcharleb/SITL-readme-fix
SITL: fixed path to mainapp in documentation
2015-06-16 00:11:25 +02:00
Mark Charlebois 8ddfcb7f4b SITL: fixed path to mainapp in documentation
The updated path os Build/posix_sitl.build/

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-15 13:50:50 -07:00
Lorenz Meier de8464e3ed Merge pull request #2383 from tumbili/gps_sim
add simulated gps driver to startup for SITL
2015-06-15 22:07:05 +02:00
tumbili e6cee32952 add simulated gps driver to startup for SITL 2015-06-15 21:59:58 +02:00
Lorenz Meier dc839b67e8 Fix POSIX README.md path 2015-06-15 21:36:42 +02:00
Lorenz Meier 48bf40d5d1 POSIX: Add initial SITL instructions 2015-06-15 21:35:10 +02:00
Lorenz Meier 829d830d43 Merge pull request #2378 from mcharleb/sitl-rename
SITL: changed posix_default to posix_sitl
2015-06-15 20:18:51 +02:00
Lorenz Meier 5eee806adf Merge pull request #2380 from PX4/dma_hotfix
This is a temporary hot fix for lost data
2015-06-15 20:16:56 +02:00
Mohammed Kabir 0dc6e65d7a camera_trigger : direct GPIO access. finally working. 2015-06-15 23:24:14 +05:30
David Sidrane e7a3674c1d This is a temporary hot fix for lost data 2015-06-15 07:03:14 -10:00
Mark Charlebois 729653ba71 SITL: changed posix_default to posix_sitl
The SITL build is now the default posix build.

The linker script for posix was moved to makefiles/posix.
The rc.S file was moved to posix-configs/SITL/init/
The POSIXTEST board definition is now SITL

To run the SITL test run:

make sitlrun

This replaces the make posixrun target.

The build directory is now Build/posix_sitl.build/

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-15 09:51:07 -07:00
Ban Siesta 3489c3de1c uORBDevices_posix: copied over fixes from uORBDevices_nuttx 2015-06-15 18:34:52 +02:00
Ban Siesta 21d9bd70a3 uORBDevices_nuttx: Fixed the bug that a publisher had to be started
before an advertiser for multi_pub/subs.

This is achieved using
- A "published"  flag for each uORB device node
- A check before increasing the instance count (basically, a node is
  re-used if nothing has been published on it before which means that it
  has been created by a subscriber.
2015-06-15 18:34:52 +02:00
Ban Siesta 9ecf4345a5 ORBMap: bugfix, got rid of infinite Looping Louie 2015-06-15 18:34:51 +02:00
Ban Siesta c5fd277a9e ORBMap: whitespace 2015-06-15 18:34:51 +02:00
Ban Siesta fee8449de3 uORBDevices: astyle 2015-06-15 18:34:51 +02:00
Ban Siesta f4f761042b uORBManager: astyle 2015-06-15 18:31:01 +02:00
Ban Siesta adaaeff48a uORBTest_UnitTest: Split test function in 3 separate functions and add a
test which fails because it does the subscription before the advertisement.
2015-06-15 18:31:01 +02:00
Ban Siesta c584bab811 uORB: document ORB_MULTI_MAX_INSTANCES 2015-06-15 18:31:01 +02:00
Ban Siesta 99a442b80e uORB: bump ORB_MULTI_MAX_INSTANCES to 4 because this is needed for an extended unit-test 2015-06-15 18:31:01 +02:00
Ban Siesta 8be1b4f19c uORBTest_UnitTest: astyle 2015-06-15 18:31:01 +02:00
Ban Siesta 45f5907716 uORBTest_UnitTest: say who you are in the printf 2015-06-15 18:31:00 +02:00
Lorenz Meier 56a8f0e604 Merge pull request #2377 from mcharleb/getpid-fix
POSIX: px4_getpid() fix
2015-06-15 18:19:23 +02:00
Roman 75c1588241 only send autopilot capabilities blindly for serial connection 2015-06-15 18:03:05 +02:00
Lorenz Meier 9745d16905 Merge pull request #1977 from devbharat/fix_issue_1963
Shifted the set() function for Matrix3x3, Vector2, Vector3, Vector4 to a...
2015-06-15 17:35:40 +02:00
Mark Charlebois d66b6ea701 POSIX: px4_getpid() fix
Since the PX4 code uses both px4_task and pthread APIs,
px4_getpid() must be save to call from either context.

On posix, this means we have to always return the pthread ID.

Reverted simulator change of pthread to px4_task

There may have been side effects if this was build for a target that
has process/task scoped file descriptors. It is now safe to call
px4_getpid() from this pthread context with this change for the
posix build for px4_getpid().

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-15 08:25:57 -07:00
Lorenz Meier 75ef0e1709 Merge pull request #2365 from PX4/master_p1
Master p1
2015-06-14 15:43:38 +02:00
Mohammed Kabir e6752e43b2 camera trigger : cleanup - still crashes 2015-06-14 17:41:54 +05:30
Mohammed Kabir af62e74d4a camera trigger : command fix 2015-06-14 17:41:54 +05:30
Mohammed Kabir 72e2224d1e camera trigger : master rebase 2015-06-14 17:41:54 +05:30
Mohammed Kabir df037d97c1 camera trigger : remove redundant timestamps 2015-06-14 17:41:54 +05:30
Mohammed Kabir a1c2f24837 camera trigger : remove autogen message 2015-06-14 17:41:54 +05:30
Mohammed Kabir 95a8e29cfe camera trigger : mavlink stream 2015-06-14 17:41:54 +05:30
Mohammed Kabir 5ff38089e9 camera trigger : fix handling of fds in hrt callbacks 2015-06-14 17:41:54 +05:30
Mohammed Kabir 2dde99f0fc camera trigger : memset 2015-06-14 17:41:54 +05:30
Mohammed Kabir be89a7262e camera trigger : add missing call to trampoline 2015-06-14 17:41:54 +05:30
Mohammed Kabir 34809e0aa3 camera trigger : add message 2015-06-14 17:41:54 +05:30
Mohammed Kabir ecd2762281 camera trigger : fix memset 2015-06-14 17:41:54 +05:30
Mohammed Kabir 239c8dc7dc camera trigger : implement trigerring and command 2015-06-14 17:41:54 +05:30
Mohammed Kabir a8537b8818 camera trigger : initial import 2015-06-14 17:41:54 +05:30
Lorenz Meier 40f3b49419 POSIX: Re-load params after boot 2015-06-14 03:17:33 -07:00
Mark Charlebois 872a26e6da Fixed passed ot open() for O_CREAT
In nuttx the mode parameter to open is not required but in Linux,
and per the POSIX spec, mode is required if the O_CREAT flag is
passed.

The mode flags are different for NuttX and Linux so a new set of
PX4 defines was added:

PX4_O_MODE_777 - read, write, execute for user, group and other
PX4_O_MODE_666 - read, and write for user, group and other
PX4_O_MODE_600 - read, and write for user

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-14 11:26:40 +02:00
Mark Charlebois c6b36073fe POSIX: ifdef getreg32() calls in mcu_unique_id()
mcu_unique_id() reads registers at an invalid address in non-nuttx builds.
Added ifdef to return a dummy value for non-nuttx builds.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-14 11:26:27 +02:00
Lorenz Meier 7254f04f68 POSIX: Complete default startup config so we get a working quad setup on boot. 2015-06-13 17:08:07 -07:00
Mark Charlebois 7e7513bc15 POSIX: change pthreads to px4_tasks in simulator
The simulator was using pthread APIs directly so calls to px4_getpid()
would fail since the task ID was not known. Changed simulator to use
px4_task_spawn_cmd.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-13 16:44:29 -07:00
Lorenz Meier 7263402cec Merge pull request #2362 from PX4/master_elf_sizes
Document the the sizes of sections inside the elf files.
2015-06-13 19:38:48 +02:00
David Sidrane 447b93c090 Add size Makefile target for elf 2015-06-13 06:07:57 -10:00
TSC21 dccd4df7bc mocap_support: added support for mocap data on firmware 2015-06-13 17:03:31 +01:00
Lorenz Meier 5e4ce5cf59 Add missing errno header 2015-06-13 16:36:00 +02:00
Mark Charlebois e6d9aa2b43 mavlink fix for cause of intermittent crash
If the posix target is run and the rootfs is not created, then
there is an fopen in mavlink without a return value check and then a write
to the fd. When this condition occurs it tries to write to NULL and will
segfault.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-13 07:21:45 -07:00
Lorenz Meier a1b68b5b41 POSIX: Start MAVLink app as default on UDP 2015-06-13 06:53:18 -07:00
Lorenz Meier 1522255c29 MAVLink app: Fix argument handling to work on all operating systems 2015-06-13 06:53:02 -07:00
Lorenz Meier 928648f2f5 Merge pull request #2356 from PX4/master_m
Master merge
2015-06-13 14:28:31 +02:00
Lorenz Meier 849bd4c3f7 POSIX HRT: Use correct define, formatting fixes 2015-06-13 11:43:31 +02:00
Lorenz Meier 9d0d6ba2bf EKF: Fix isfinite calls 2015-06-13 11:31:55 +02:00
Lorenz Meier b06a533555 OS X porting: Make unit tests compile on OS X 2015-06-13 11:07:17 +02:00
Lorenz Meier c9fefe236b Merged release into master 2015-06-13 11:06:01 +02:00
Lorenz Meier f30037a814 Merge branch 'release_v1.0.0' into beta 2015-06-13 00:20:30 +02:00
Lorenz Meier 2fc069bd63 Merge pull request #2350 from PX4/master_versioning_fix
Back Port of Git Versioning - without side effects
2015-06-13 00:07:19 +02:00
Lorenz Meier 3b0d766fd8 Merge pull request #2353 from andre-nguyen/offb_NaN_fix
fix NaN yaw breaking attitude setpoints when going back into posctl from offboard
2015-06-13 00:01:24 +02:00
David Sidrane 5acc4ee43b Back Port of Git Versioning - without side effects Part 2 2015-06-12 06:54:04 -10:00
David Sidrane 17fddb1556 Back Port of Git Versioning - without side effects Part 1 2015-06-12 06:49:15 -10:00
Lorenz Meier bcc49268ca Merge pull request #2310 from mcharleb/bringup-m1
Bringup m1
2015-06-12 14:16:06 +02:00
Lorenz Meier 94313323aa MAVLink app: Fix sending of autopilot capabilities 2015-06-12 13:53:20 +02:00
Lorenz Meier 085a69383a Merged master 2015-06-12 13:40:47 +02:00
Lorenz Meier 3c4e25153c Merge pull request #2337 from bansiesta/readme_link
Small README.md and LICENSE.md fixes
2015-06-12 09:42:31 +02:00
Lorenz Meier 5eadda5ea5 Comment out unused pca8574 driver in boot 2015-06-12 09:31:10 +02:00
Ban Siesta 0e428a6b3b LICENSE.md: bring year up-to-date 2015-06-12 08:30:50 +01:00
Ban Siesta 7fa35e8a88 README.md: added link to LICENSE.md 2015-06-12 08:29:22 +01:00
Lorenz Meier 3f4b5fcb72 HIL driver: Fix boot order race 2015-06-12 09:27:15 +02:00
Lorenz Meier 7374aff3aa Merge pull request #2334 from PX4/master_mavlink_null_fix
Backport of Fixes mavlink_if0: invalid data rate '(null)' bug
2015-06-12 08:36:25 +02:00
Mark Charlebois c9be962f4c POSIX: Modified posix_run.sh to create rootfs dirs
The default rootfs is now in:

Build/posix_default.build/rootfs/

The subdirs fs/microsd and eeprom are now created if they do not exist.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-11 21:44:21 -07:00
Mark Charlebois 4d1ae6269b POSIX: Added PX4_ROOTFSDIR to file paths
Set a default path relative to current dir for the posix target.

Running make posixrun will create the required directoroes and then run
mainapp from its build location.

PX4_ROOTFSDIR is set to nothing for nuttx.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-11 21:36:13 -07:00
Mark Charlebois 0c43803ec7 POSIX: Fixed syntax error in posix_apps.py
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-11 21:03:45 -07:00
Mark Charlebois 892a4c5f0f Merge branch 'bringup-m2' into bringup-m1 2015-06-11 20:40:35 -07:00
Mark Charlebois aaac4708a5 Merge branch 'bringup-m1' of https://github.com/mcharleb/Firmware into bringup-m2
Conflicts:
	Tools/posix_apps.py

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-11 20:38:47 -07:00
Mark Charlebois fb402bc096 POSIX: Fixed remaining broke gtests
The addition of the hrt workqueue required adding some additional files to
unittests/CMakeLists.txt

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-11 20:22:49 -07:00
Mark Charlebois ea7d5070c5 POSIX: Fixed some of the failing gtests
The orb_advert_t change from int to void * required some fixups
for the gtests.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-11 19:42:54 -07:00
Mark Charlebois 527b97e8b4 POSIX: added tone_alarm simulator
The tone_alarm simulator was added to rc.S and the warning output for a
hrt_timer with a 0 expiry times was disabled.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-11 19:00:49 -07:00
David Sidrane 28d3729acd Backport of Fixes mavlink_if0: invalid data rate '(null)' bug 2015-06-11 15:43:28 -10:00
Mark Charlebois 9ef7db6a36 QuRT: Added missing hrt workqueue files
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-11 18:16:29 -07:00
Mark Charlebois e4a8f32f1b QuRT: Added HRT workqueues as per POSIX
A high rate workqueue is required that acts like an interrupt handler
for a HW timer.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-11 18:13:36 -07:00
Elikos default 9605df75da fix NaN yaw breaking attitude setpoints when going back into posctl from offboard 2015-06-11 20:28:47 -04:00
Mark Charlebois 83bcb95999 POSIX: Added sleep command
The baro was not fully initialized when the sensors module tried to
open it. Added a sleep command and a sleep 2 to rc.S so the baro
is initialized by the time the sensors module tried to read it.

Fixed other noisy errors

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-11 17:28:46 -07:00
Mark Charlebois 18304a2a0d POSIX: Fixed px4_getpid() calls from shell context
When px4_getpid() was called from the shell, there was no opaque
thread ID to return. Added a special thread ID for the shell
context. This ID only works for px4_getpid() and cannot be used
for other px4_task_*() calls.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-11 11:36:58 -07:00
Lorenz Meier 722a5f61f6 Merge branch 'release_v1.0.0' into beta 2015-06-11 17:04:34 +02:00
Lorenz Meier 6ba0f246f0 Merge pull request #2318 from PX4/libuavcan_update
Libuavcan submodule update
2015-06-11 17:04:11 +02:00
Lorenz Meier c06d4032f4 Merge pull request #2314 from kylemanna/python2
Tools: Update python files to work with python3
2015-06-11 09:29:11 +02:00
Kyle Manna c593451e5d Tools: Convert Python 2 syntax to Python 3 compatible
* The `print """` syntax appears invalid in Python 3 which is the
  default for the Python binary on my system (and soon many more).
* Convert the file (using `2to3`) to a version that's compatible with
  Python 2 and Python 3.
* Tested against Python 2.7.10 and 3.4.3.
2015-06-11 00:07:54 -07:00
Lorenz Meier 155ee0e0b4 Merge branch 'release_v1.0.0' of github.com:PX4/Firmware into beta 2015-06-11 09:03:01 +02:00
Pavel Kirienko 67c1b230ca libuavcan submodule updated 2015-06-10 21:20:57 +03:00
Lorenz Meier 30969eb10c Navigator: Use correct open call 2015-06-10 13:20:13 +02:00
Mark Charlebois 9c90e47400 Fixed ORBMap.hpp copyright
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-09 19:36:29 -07:00
Mark Charlebois 03d7d770a6 Forgot to add ORBMap.hpp
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-09 19:34:34 -07:00
Mark Charlebois 4df833d25d uORB: factor out ORBMap.hpp into a separate file
The new uORB::ORBMap class was put it its own file with proper
copyright.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-09 19:31:56 -07:00
Mark Charlebois 05b6bcd168 Added missing return in ORBSet
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-09 19:16:06 -07:00
Mark Charlebois 4d28126e0a Nuttx: remove use of std::string, std::map, std::set
Nuttx complains about an unresolved _impure_ptr at link time.
This is a known issue when using STL templates in NuttX on ARM.

Created new ORBMap and ORBSet classes for NuttX.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-09 18:56:28 -07:00
Mark Charlebois 13dd993e01 Nuttx: mavlink fixes
Needed to ifdef SITL functionality not supoprted in NuttX build.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-09 16:32:22 -07:00
Mark Charlebois 980061e508 Merge pull request #15 from tumbili/mavlink_udp_cleanup
clean up mavlink network capability
2015-06-09 12:03:57 -07:00
tumbili ac053e15da clean up mavlink network capability 2015-06-09 20:14:42 +02:00
Mark Charlebois 7bb70313da POSIX: use px4_getpid()
The posix build only has one process so calling getpid() will not
provide the expected result.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-08 22:22:00 -07:00
Mark Charlebois cb231e89f6 QuRT: Changes to enable qurt target to build
QuRT doesn't support unlink and does not provide getpid().
The DSPAL layer provides access to usleep so an implementation is
no longer needed.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-08 22:22:00 -07:00
tumbili a5c214a7bb use orb_advertise_multi:
- subscribe to actuator controls after topic has been advertised
2015-06-08 22:21:59 -07:00
tumbili 065ec5b2dc no need to send non-controls mavlink messages to jMAVSim because we can use mavlink app with udp 2015-06-08 22:21:59 -07:00
tumbili 5694e37854 fix reading baro values from simulator 2015-06-08 22:21:59 -07:00
tumbili 8eee7ba321 compute atmospheric pressure from altitude 2015-06-08 22:21:59 -07:00
Mark Charlebois 58e263d534 Added posix-arm target and refactored toolchain_* files
The toolchain_* files are target OS specific so they were moved to
the target OS subdir.

The gcc_version.* files are only cleared once per make instantiation so
a build that creates multiple HW targets will try to link with an
incompatible .o file (i.e. x86 build linking ARM .o).  I created
posix-arm as a separate target to fix this problem.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-08 22:21:59 -07:00
Mark Charlebois 59ad47003a mavlink: simplified UDP suport by adding new -u option
Use:

    mavlink start -u portnum

to set the UDP port.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-08 22:21:59 -07:00
Mark Charlebois aded2d3c03 Enable passing udp port to mavlink module via start args.
Usage is: -d udp[:<port>] If no port is specified, default port is
set to 14556. If -d isn’t specified then default is serial.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-08 22:21:59 -07:00
Mark Charlebois 82b90281e9 Cleanup of copyright headers
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-08 22:21:59 -07:00
Mark Charlebois 6cb26de74c Multi-uORB support changes - part 1
This adds support for a dynamic build for QuRT and initial
Multi-uORB changes to enable communication between the DSP and
the application processor.

This part of the changes do not affect the POSIX build. This is
enablement for the QuRT build using Multi-uORB. The second part
of the changes will be added in a new module under src/modules.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-08 22:21:59 -07:00
Mark Charlebois 99c066c39c HIL: Cleanup creation and initialization
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-08 22:21:59 -07:00
Mark Charlebois 5cf1140944 Add raw mode for UART to mavink_main.cpp
Raw mode is not the default mode in Ubuntu 14.04.

Disable echo and special character processing.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-08 22:21:59 -07:00
Mark Charlebois fd1effa4fe Simulator: UART changes
Some changes were needed to use the simulator and the UART for rc control.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-08 22:21:59 -07:00
tumbili 5c013af574 save gps data so driver can read 2015-06-08 22:21:59 -07:00
tumbili dc2dc9920f build gpssim 2015-06-08 22:21:59 -07:00
tumbili 9da40a69cc mavlink: do not send autopilot capabilities to avoid crash 2015-06-08 22:21:59 -07:00
tumbili 4aa4038e27 increase number of arguments passable to apps 2015-06-08 22:21:59 -07:00
tumbili a77f637bc4 mavlink udp:
- added option to stream messages over udp
- still hardcoded stuff (port)
2015-06-08 22:21:58 -07:00
tumbili 9a4bee834d added gpssim driver 2015-06-08 22:21:58 -07:00
tumbili 909508f8f9 let mixer sleep a bit before loading to ensure device is set up 2015-06-08 22:21:58 -07:00
tumbili 45ee36234d activate sending thread only once got message from simulator 2015-06-08 22:21:58 -07:00
tumbili 3d44384731 temporarily don't use multi advert because doesn't work 2015-06-08 22:21:58 -07:00
tumbili fb778af8b3 increase max file descriptors to 100 2015-06-08 22:21:58 -07:00
tumbili aef3f37ae0 enable reading sensor data from simulator module for SITL 2015-06-08 22:21:58 -07:00
tumbili f0a3210e94 major simulator rework:
- wait for first message from jMAVSim
  before sending data
- publish raw rc data coming from PIXHAWK (temporary)
- send some interesting messages to jMAVSim
- prepare sensor data for sim drivers to read
2015-06-08 22:21:58 -07:00
Mark Charlebois e7abd78051 POSIX: Fixed output for list_topics, list_devices, etc
Removed extra carriage returns in output strings

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-08 22:20:17 -07:00
Mark Charlebois db5530e1b5 POSIX: Fixes for HRT implementation of simulated HW clock polling
There is a race condition for the accel and mag polling rates.
Whichever one gets set first, the other will be uninitialized.

Set the mag polling rate to 1ms if uninitilized.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-08 22:18:57 -07:00
Mark Charlebois acfd1ea519 POSIX: added hrt_queue for handling fast periodic events
The workqueues measure time in ticks  which is typically 10ms.
Some interrupt events in Nuttx occur at about 1ms so a more
granular workqueue is needed for POSIX.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-08 22:15:55 -07:00
Lorenz Meier cfb44b9192 Merge branch 'release_v1.0.0' of github.com:PX4/Firmware into beta 2015-06-08 17:24:00 +02:00
Lorenz Meier a0a432fa4e Merge pull request #2303 from tumbili/mixer_yaw_fix
allow to give away some thrust for yaw control
2015-06-08 16:42:14 +02:00
tumbili b571d70488 allow to give away some thrust for yaw control 2015-06-08 16:04:42 +02:00
Lorenz Meier 68c062d1c8 Merge pull request #2302 from dagar/mixers_readme
fix mixers README.md
2015-06-08 09:12:02 +02:00
Daniel Agar a7d7c69a79 fix mixers README.md
-the angle brackets in the tag descriptions were breaking the markdown
2015-06-07 21:37:07 -04:00
Pavel Kirienko 2c61ec6819 UAVCAN update, fixes compilation warning on GCC 4.7 (see #2294) 2015-06-07 00:10:53 +03:00
Lorenz Meier c92655b850 Merge pull request #2288 from UAVenture/qu4d_tuning
Correct the QU4D yaw gains to flyable values.
2015-06-05 22:44:41 +02:00
Lorenz Meier e6b97321df Merge branch 'release_v1.0.0' into beta 2015-06-05 22:42:27 +02:00
Simon Wilks f3e28bb361 Correct the yaw gains to flyable values. 2015-06-05 21:45:34 +02:00
Lorenz Meier b1e462383d Merge pull request #2270 from PX4/uavcan_next
Changes to build on latest uavcan master with FW upload and Node ID
2015-06-05 01:39:25 +02:00
Lorenz Meier b9e8fd550a Merge pull request #2258 from tumbili/VTOL_fix
do not run fw attitude controller when in rotary wing mode (VTOL)
2015-06-04 21:08:58 +02:00
David Sidrane 2d796f408d Ran Astyle 2015-06-04 03:27:40 -10:00
David Sidrane 3f56892950 Merge branch 'uavcan_next' of https://github.com/PX4/Firmware into uavcan_next 2015-06-04 03:25:43 -10:00
David Sidrane 6155a1557f Changes to build on latest uavcan master with FW upload and Node ID allocation 2015-06-04 02:37:59 -10:00
Lorenz Meier 9ce7fe483a Merge pull request #2272 from mcharleb/mavlink-cleanup
Removed unused file mavlink_main_posix.cpp
2015-06-04 08:43:46 +02:00
Lorenz Meier 39b0100138 Merge pull request #2271 from mcharleb/param-union-fix
remove long long from union param_value_u
2015-06-04 08:43:14 +02:00
Lorenz Meier fe82b412f6 Merge pull request #2269 from mcharleb/uorb-posix-fix
Created px4_access to handle check of virtual files
2015-06-04 08:39:56 +02:00
Mark Charlebois 4d8061b22c Removed unused file mavlink_main_posix.cpp
The posix and nuttx changed were re-integrated back into mavlink_main.cpp

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-03 21:05:03 -07:00
Mark Charlebois 7c00bf11fd remove long long from union param_value_u
The long long was mistakenly added when debugging an alignment issue
on x86_64.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-03 21:00:40 -07:00
David Sidrane d720a42a35 Changes to build on latest uavcan master with FW upload and Node ID allocation 2015-06-03 13:47:36 -10:00
Mark Charlebois f985a48fbc Created px4_access to handle check of virtual files
uORBManager_posix.cpp did a stat to see if a file exists but the
file is actually a virtual file. Using stat was incorrect because
it required a stat buffer that was never used. The POSIX access
function is a better choice so I created a px4_access version to
handle virtual files.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-03 16:22:14 -07:00
Lorenz Meier 3dbd48fbad param style fix 2015-06-03 22:51:02 +02:00
David Sidrane 03bdf1e5f2 Allow allocation of changed paramaters to fail, then all param functions will return PARAM_INVALID or a count of 0 2015-06-03 22:49:57 +02:00
David Sidrane bcb3529490 Added confitional definition 2015-06-03 22:49:57 +02:00
David Sidrane 9d055ef95b Added ASSERT macro that mimic Nuttx but uses the system assert 2015-06-03 22:49:57 +02:00
David Sidrane 7950167bc5 Added assertion on allocation failure for parameter change storage, removed magic numbers 2015-06-03 22:49:57 +02:00
Lorenz Meier cf2d66bd81 Merge pull request #2268 from mcharleb/hrt_queue-fixes
Hrt queue fixes
2015-06-03 21:48:04 +02:00
Mark Charlebois f763c4cc0e POSIX: fixed type used in USEC2TICKS
The macro was using a constant defined as a long instead on an
unsigned long. Made corresponsing changes to barosim.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-03 11:49:28 -07:00
Mark Charlebois 122c52c731 POSIX: Fixes for ARMv7 build
uint64_t needs to use PRIu64 in printf.
Clang-3.5 found an error is variable types for a compare.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-02 16:55:39 +00:00
Mark Charlebois 325e063f18 POSIX: fixes for gcc
GCC complains about strict prototypes.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-02 16:55:39 +00:00
Mark Charlebois af45954690 POSIX: hrt_work_lock.h to hrt_work.h
The header file now contains all hrt workqueue related prototypes.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-02 16:55:38 +00:00
Mark Charlebois 6fd612a218 POSIX: fixed function prototype
Function was changed to be void but prototype was not updated

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-02 16:55:38 +00:00
Mark Charlebois b4152f3daa POSIX: Fixed output for list_topics, list_devices, etc
Removed extra carriage returns in output strings

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-02 16:55:37 +00:00
Mark Charlebois 5e95b83eff POSIX: Fixes for HRT implementation of simulated HW clock polling
There is a race condition for the accel and mag polling rates.
Whichever one gets set first, the other will be uninitialized.

Set the mag polling rate to 1ms if uninitilized.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-02 16:55:34 +00:00
Mark Charlebois cced8ed69e POSIX: added hrt_queue for handling fast periodic events
The workqueues measure time in ticks  which is typically 10ms.
Some interrupt events in Nuttx occur at about 1ms so a more
granular workqueue is needed for POSIX.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-02 16:55:33 +00:00
Lorenz Meier 9882b78383 Merge pull request #2248 from mcharleb/gyrosim-fix
Gyrosim: Fixed constant looping
2015-06-02 01:40:49 -07:00
Lorenz Meier 9ad9dd13d2 Merge pull request #2252 from UAVenture/param_meta_fix
Fix group for posctl_th
2015-06-02 01:36:25 -07:00
Lorenz Meier 00fc4b5f13 Merge pull request #2256 from mcharleb/fixes-for-gcc
Fixes for gcc 4.8
2015-06-02 01:35:20 -07:00
Lorenz Meier e32c00be67 Merge pull request #2261 from PX4/navigator_port
Navigator port
2015-06-02 01:34:26 -07:00
Lorenz Meier 6a35887f54 Merge pull request #2260 from Terabee/master
fixed timming issued in I2C whoami communication
2015-06-02 01:32:47 -07:00
Lorenz Meier c49f902635 Merge pull request #2263 from tumbili/linux_param_loading
use open/close instead of px4_open/px4_close for parameter file
2015-06-02 01:32:01 -07:00
Lorenz Meier f54080bd43 Merge pull request #2226 from rmackay9/orig-precland6
Driver for the IR Lock vision sensor (derivative of the Pixy vision sensor)
2015-06-02 01:31:01 -07:00
Roman 7331ea32ef make navigator work for posix 2015-06-01 23:40:20 +02:00
tumbili f4a25097c1 use open/close instead of px4_open/px4_close for parameter file 2015-06-01 23:01:48 +02:00
Roman b688e3b97c remove unnecessary parenthesis 2015-06-01 11:17:40 +02:00
Roman 9ff89ffe5c use PX4_ISFINITE 2015-06-01 11:16:32 +02:00
Roman 64e8419ab0 remove suffix for double 2015-06-01 11:15:56 +02:00
Roman 6bc0d4d03b add definition of MAX_RAND 2015-06-01 11:14:45 +02:00
Roman e6ec33787f build navigator and controllib for posix 2015-06-01 11:12:59 +02:00
Luis Rodrigues 70bfb42956 fixed timming issued in I2C whoami communication 2015-05-31 21:09:21 +02:00
tumbili 134c7d87b8 do not run fw attitude controller when in rotary wing mode (VTOL) 2015-05-30 15:39:37 +02:00
Lorenz Meier 7cde53597c Merge pull request #2257 from mcharleb/px4_poll-fix
px4_poll fix - was sleeping for usec instead of ms
2015-05-29 13:40:26 -07:00
Mark Charlebois 6343b2c56f px4_poll fix - was sleeping for usec instead of ms
There was a conversion error in the timeout (in ms)
passed in and the ts.tv_nsec field of the struct timeval.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-29 13:26:29 -07:00
Mark Charlebois ca88251124 Fixes for gcc 4.8
The use of a non-static function without a declaration generates a
warning for gcc 4.8.

Clang-3.4 does not work when compiling for gprof. The executable always
generates a segv.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-29 12:38:51 -07:00
Andreas Antener 27f0b4edd7 fix group for posctl_th 2015-05-29 10:04:38 +02:00
Randy Mackay 7dcef40516 irlock: report target in radians 2015-05-29 16:50:48 +09:00
Randy Mackay 54308288f3 irlock: formatting fixes 2015-05-29 16:50:48 +09:00
Randy Mackay 10139400d5 irlock: simplify driver
Remove ioctl calls by always starting cycling
Remove unused orb variables and includes
Remove unused angle from irlock_s structure
Add test and set I2C address to pixy default
Reduce max num objects to 5
Add read errors reporting via nsh
2015-05-29 16:50:47 +09:00
Michael Landes 210ad9e36c irlock: initial version of IR-LOCK sensor driver
Also works with the Pixy Cam
2015-05-29 16:50:46 +09:00
Lorenz Meier c62ae87c69 Merge release_v1.0.0 into master 2015-05-28 18:08:31 -07:00
Lorenz Meier 12933fd382 Merge branch 'release_v1.0.0' of github.com:PX4/Firmware into beta 2015-05-28 17:42:28 -07:00
Lorenz Meier d39db2eba8 MAVLink app: better yaw scaling 2015-05-28 11:49:57 -07:00
Mark Charlebois 2d85578599 Gyrosim: Fixed constant looping
Gyrosim would call measure continuously because the write_checked_reg
was failing. There is no need to check faked reg writes in the
simulator so that code was removed.

The delay that was added to the simulator to pace the gyrosim reads
was also removed now that the source of the problem was determined.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-28 11:20:30 -07:00
Lorenz Meier 9cb944b553 Merge pull request #2245 from mcharleb/clean-fix
git_version.* not removed on clean
2015-05-28 10:28:02 -07:00
Mark Charlebois 77cc3cdde1 Remove Build/git_version.* on each make
The Build/git_version.d and Build/git_version.o files need to be
removed on each make to prevent confusion from a previously
generated dependency file for a different target.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 19:50:39 -07:00
Mark Charlebois 35e0d866eb Fix compare of int and uint32
VEHICLE_CMD_START_RX_PAIR is defined as uint32 and is being compared to an int.
GCC complains about this and fails. Changed int cast to a unsigned int.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 19:43:54 -07:00
Mark Charlebois d4749551da git_version.* not removed on clean
The Build/git_version.* files need to be removed on make clean.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 19:30:05 -07:00
Lorenz Meier be3551136a Airspeed sim: Use proper constant names 2015-05-27 21:16:59 +02:00
Lorenz Meier 5fd4056c4a uORB: Fix missing objects_common entries 2015-05-27 21:16:43 +02:00
Lorenz Meier 68d723e26c dataman: add missing include of px4_defines header 2015-05-27 21:10:48 +02:00
Lorenz Meier 1a9d402feb mavlink receiver: fix topic handle initialization of manual control topic 2015-05-27 15:36:05 -07:00
Lorenz Meier 4565f57468 Merged release_v1.0.0 into master 2015-05-27 15:28:41 -07:00
Lorenz Meier a2bb8cd766 PX4FLOW driver: Fix use of topic initialization 2015-05-27 15:15:37 -07:00
Lorenz Meier 4f92afd420 Lidar lite driver: Fix use of topic initialization 2015-05-27 15:15:19 -07:00
Mark Charlebois 31923c3add On more fixup for orb_advert_t changed to void *
Reviewed all changes in pull request and made sure all cpp files
check orb_advert_t types against nullptr and c files check against
NULL.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 14:42:49 -07:00
Mark Charlebois a452478ef9 More fixups for orb_advert_t changed to void *
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 14:42:49 -07:00
Mark Charlebois bd2b5e4738 Revert change to src/drivers/device/vdev.cpp
This change was not part of the orb_advert_t fix.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 14:42:49 -07:00
Mark Charlebois 1ca05aaa64 orb_advert_t changed to void * and checks changed to nullptr
The existing orb_advert_t use thoughout the code sometimes tries
to treat it as a file descriptor and there are checks for < 0
and ::close calls on orb_advert_t types which is an invalid use
of an object pointer, which is what orb_advert_t really is.

Initially I had changed the -1 initializations to 0 but it was
suggested that this should be nullptr. That was a good recommendation
but the definition of orb_advert_t had to change to void * because
you cannot initialize a uintptr_t as nullptr.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 14:42:49 -07:00
Mark Charlebois 180c8b0cb0 Missed another < 0 check
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 14:41:33 -07:00
Mark Charlebois b990d9fa7e Missed a check for < 0
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 14:41:33 -07:00
Mark Charlebois a734fc96d1 extensive orb_advert_t fixes
The calls to orb_advertise were being mishandled throughout the code.
There were ::close() calls on memory pointers, there were checks
against < 0 when it is a pointer to a object and values larger than
0x7ffffffff are valid. Some places orb_advert_t variables were
being initialized as 0 other places as -1.

The orb_advert_t type was changed to uintptr_t so the pointer value
would not be wrapped as a negative number. This was causing a failure
on ARM.

Tests for < 0 were changed to == 0 since a null pointer is the valid
representation for error, or uninitialized.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 14:41:33 -07:00
Lorenz Meier 9a67303416 Merge pull request #2231 from jgoppert/lidar_lite_pwm_fix
Lidar lite driver fixes.
2015-05-27 10:54:59 -07:00
Lorenz Meier 92f67a923a Make sure the build directory exists 2015-05-27 19:54:46 +02:00
James Goppert 57f5db544c Distance sensor log precision fix. 2015-05-27 00:01:24 -04:00
James Goppert 3cc84b1a15 Correct ll40ls param enable length. 2015-05-26 21:20:18 -04:00
James Goppert bef8851e8e Merge branch 'mhkabir-ll40ls_startup' into lidar_lite_pwm_fix 2015-05-26 20:08:40 -04:00
James Goppert cbc169af2f Merge branch 'll40ls_startup' of https://github.com/mhkabir/Firmware into mhkabir-ll40ls_startup
Conflicts:
	ROMFS/px4fmu_common/init.d/rc.sensors
2015-05-26 20:08:11 -04:00
James Goppert 6f309ba625 Distance sensor log fix. 2015-05-26 20:03:33 -04:00
TSC21 ff1f3ba7f1 drivers: added validity check to sf0x 2015-05-26 18:08:55 +01:00
TSC21 79e084a154 drivers: added validity check 2015-05-26 18:05:26 +01:00
Lorenz Meier f13510e8a6 Merge pull request #2233 from mcharleb/posix-fix
POSIX: Increased number of devmap entries
2015-05-26 09:28:05 -07:00
Mohammed Kabir d06bdc0445 ll40ls : fix param typo 2015-05-26 21:54:19 +05:30
Mohammed Kabir 42358a60d1 ll40ls : conditional startup 2015-05-26 21:51:33 +05:30
Mohammed Kabir 853a22db18 ll40ls : conditional startup param 2015-05-26 21:44:55 +05:30
James Goppert 0b703096e7 Fixed distance sensor log error. 2015-05-26 02:48:24 -04:00
Mark Charlebois 379075d29c POSIX: Increased number of devmap entries
The orb_advertise and/or orb_publish calls were failing because
there were not enough devmap entries allocated for all the orb
topics advertised.

The number of entries was increased from 50 to 100.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-25 23:20:19 -07:00
James Goppert 5955773574 Lidar lite driver fixes.
Conflicts:
	src/modules/uORB/Subscription.cpp
2015-05-25 21:55:03 -04:00
Lorenz Meier ee39d72747 Gyro sim: Add ringbuffer namespace 2015-05-25 10:00:52 +02:00
Lorenz Meier e9c2dc563f Baro sim: Add ringbuffer namespace 2015-05-25 10:00:31 +02:00
Lorenz Meier 5c535845ab Airspeedsim: Add ringbuffer namespace 2015-05-25 10:00:11 +02:00
Lorenz Meier 2d090ddde4 Accelsim: Add ringbuffer namespace 2015-05-25 09:59:45 +02:00
Lorenz Meier 90281ca9e3 Sublime Text: Add posix target 2015-05-25 09:59:28 +02:00
Lorenz Meier b399469477 Merge pull request #2240 from TSC21/mavlink_multiadvertise
mavlink: added multi advertise for distance_sensor in mavlink receiver
2015-05-26 23:32:50 -07:00
Lorenz Meier a14b020d63 Merge pull request #2203 from NaterGator/mavlink_usbfix
Fix MAVLink USB UART detection
2015-05-26 23:22:27 -07:00
Lorenz Meier 7c5af64580 Merge pull request #2227 from bansiesta/fix_mixer_cli
systemcmds: the mixer shuts up now
2015-05-26 23:07:11 -07:00
Lorenz Meier 9fce6dd8ba Merge pull request #2230 from bansiesta/fix_startup_printfs
Cosmetic startup fixes
2015-05-26 23:02:56 -07:00
TSC21 0d1bc2cd0b mavlink: added multi advertise for distance_sensor in mavlink receiver 2015-05-26 23:35:45 +01:00
Lorenz Meier 69986a23b6 Merge pull request #2228 from bansiesta/fix_geofence_printf
navigator: stop complaining about some geofence not cleared
2015-05-26 11:30:18 -07:00
Ban Siesta 4cf8ce30ba fw_att_control: another ugly way to prevent a newline 2015-05-25 19:10:05 +01:00
Ban Siesta d36b65aab5 fw_att_control: whitespace 2015-05-25 19:09:45 +01:00
Ban Siesta 38412993d6 fw_att_control: don't brag about being running 2015-05-25 19:09:28 +01:00
Ban Siesta c56a9ce965 position_estimator_inav: be a bit more informative about this ominous offs 2015-05-25 19:08:51 +01:00
Ban Siesta 87f41855fb land_detector: get rid of one dot at a time 2015-05-25 19:01:34 +01:00
Ban Siesta 414f3330b3 px4flow: tell the user which PX4FLOW couldn't be connected 2015-05-25 18:34:31 +01:00
Ban Siesta 165063d5fc px4_getopt: whitespace 2015-05-25 18:32:55 +01:00
Ban Siesta 198fa8d542 px4_getopt: commented out debug printf 2015-05-25 18:32:32 +01:00
Ban Siesta 40e9c83ed6 mavlink: no need to shout about disabling hardware flow control 2015-05-25 18:28:27 +01:00
Ban Siesta 3c39e85fdf navigator: stop complaining about some geofence not cleared 2015-05-25 18:09:01 +01:00
Ban Siesta 7bdb3cc228 systemcmds: the mixer shuts up now 2015-05-25 17:01:07 +01:00
Lorenz Meier c5f14ef785 Merge pull request #2224 from bansiesta/lidarlite_merge
Lidarlite merge and bringup
2015-05-24 23:18:52 +02:00
Ban Siesta 9f314dd191 drivers: corrected log string 2015-05-24 20:56:25 +01:00
Ban Siesta 69cbbd9b5e distance_sensor: changed all distance sensors to orb_advertise_multi 2015-05-24 19:20:25 +01:00
Lorenz Meier c139fcbc2c Merge branch 'release_v1.0.0' into beta 2015-05-24 20:11:27 +02:00
Lorenz Meier 5dfa3d29bd Merge pull request #2225 from DonLakeFlyer/FTP
Fix opendir failure handling
2015-05-24 20:09:05 +02:00
Don Gagne 4206b030bf Fix opendir failure handling 2015-05-24 10:40:52 -07:00
Ban Siesta 517acd4586 px4flow: publish sonar distance to distance_sensor topic as well 2015-05-24 17:31:16 +01:00
Ban Siesta 2fb999674b Merge remote-tracking branch 'px4/pr/2200' into lidarlite_merge 2015-05-24 16:30:02 +01:00
TSC21 72e9390985 distance_sensor: minor changes 2015-05-24 16:03:01 +01:00
TSC21 d319310134 Merge branch 'master' of https://github.com/PX4/Firmware into distance_sensor 2015-05-24 16:02:51 +01:00
Ban Siesta a729d6f301 ll40ls: first stab at adapting ll40ls to the new distance_sensor msg 2015-05-24 15:59:29 +01:00
Ban Siesta cf39e8c721 mavlink: adapted to change in distance_sensor msg 2015-05-24 15:58:44 +01:00
Ban Siesta 13a4cdd05e ekf_att_pos_estimator: adapted to change in distance_sensor msg 2015-05-24 15:58:15 +01:00
Ban Siesta 0128fef8e0 drivers: more adaptations to changed message 2015-05-24 15:57:42 +01:00
Ban Siesta 103d59e9be distance_sensor: adapted message to float for distance and adapted the drivers 2015-05-24 14:28:19 +01:00
Ban Siesta a0011d2163 Merge remote-tracking branch 'px4/pr/2200' into lidarlite_merge 2015-05-24 13:59:18 +01:00
Ban Siesta 2c4c0ecb32 ll40ls: forgot to remove commented out stuff in PWM driver 2015-05-24 13:00:45 +01:00
Ban Siesta e7f1f3ba28 ll40ls: made PWM driver version functional 2015-05-24 12:47:04 +01:00
Ban Siesta ef658cf926 ll40ls: changed I2C driver to new ringbuffer namespace, and various style stuff 2015-05-24 12:46:23 +01:00
Ban Siesta fbc4ca61ac ll40ls: removed unneeded comments 2015-05-24 12:44:53 +01:00
Ban Siesta 0ab0de5805 ll40ls: adapt the cli interface, so that the commands work with the PWM and I2C driver 2015-05-24 12:42:14 +01:00
Ban Siesta bb3ad64aac pwm_input: get rid of start full and instead start whenever someone reads from the driver, as well as various other small changes 2015-05-24 12:41:19 +01:00
Ban Siesta 4e897bf197 pwm_input: comment style 2015-05-24 12:40:29 +01:00
Ban Siesta 1151996c0b ll40ls: Weffc++ was complaining about 'class LidarLitePWM' has pointer data members, had to disable it 2015-05-24 12:38:22 +01:00
Lorenz Meier 04d51bf8bf Merge pull request #2219 from nopeppermint/patch-1
Update README.md with links to releases and STM32F4Discovery Tutorial
2015-05-24 13:26:32 +02:00
TSC21 5672df8eda Merge branch 'master' of https://github.com/PX4/Firmware into distance_sensor 2015-05-24 12:23:20 +01:00
Ban Siesta 7cec6d3c3b uORB: added pwm_input to objects_common 2015-05-24 11:52:18 +01:00
Ban Siesta d473b8bddd Merge branch 'fix_ringbuffer' into lidarlite_merge 2015-05-24 10:18:07 +01:00
Ban Siesta 362fc205b3 drivers: various whitespace 2015-05-24 10:05:42 +01:00
Ban Siesta 21dfd0243d drivers: use new ringbuffer namespace everywhere 2015-05-24 10:04:38 +01:00
Ban Siesta aac276872b ringbuffer: use a namespace for ringbuffer to avoid 'multiple definitions in vtable' bug 2015-05-24 10:02:08 +01:00
Ban Siesta b9ce447cc9 ringbuffer: whitespace 2015-05-24 10:01:28 +01:00
Lorenz Meier 1422fac329 Merge pull request #2221 from bansiesta/fix_msggen
Tools: don't try to generate messages for hidden files starting with a dot.
2015-05-24 10:55:14 +02:00
Ban Siesta 9eb7409f46 makefiles: getting rid of gpio_tool again, this was a leftover from debugging 2015-05-24 09:53:21 +01:00
Ban Siesta e67f681935 ll40ls: astyle 2015-05-24 09:44:10 +01:00
Ban Siesta 3efaeabd5b pwm_input: astyle 2015-05-24 09:42:34 +01:00
Ban Siesta bd48ef0386 Merge remote-tracking branch 'px4/pr/2196' into lidar_tests 2015-05-24 09:40:03 +01:00
Ban Siesta 19156ec763 Merge remote-tracking branch 'px4/pr/1949' into lidar_tests 2015-05-24 09:39:58 +01:00
Ban Siesta f73a942c05 Tools: don't try to generate messages for hidden files starting with a
dot.
2015-05-24 09:24:17 +01:00
TSC21 98d0204087 distance_sensor: update drivers 2015-05-23 21:06:19 +01:00
TSC21 17bc0979e4 distance_sensor: re-add max number of sonars 2015-05-23 20:47:35 +01:00
TSC21 169eae8cf9 distance_sensor: removed range_finder.msg def; readded max number of sonars 2015-05-23 20:47:14 +01:00
TSC21 c2c0cbe682 distance_sensor: msg def: changed to SI units 2015-05-23 18:00:42 +01:00
TSC21 36dfda4aea distance_sensor: mavlink_receiver: changed to SI units 2015-05-23 17:58:20 +01:00
TSC21 7e740f262b distance_sensor: removed max number of rangefinders 2015-05-23 17:54:52 +01:00
TSC21 43668cc8c8 distance_sensor: adopt message in both range drivers and on ekf_att_pos_estimator 2015-05-23 17:49:52 +01:00
TSC21 93f8d7c4e8 distance_sensor: added distance_sensor to sdlog2 2015-05-23 15:03:32 +01:00
TSC21 2e40338b93 Merge branch 'master' 2015-05-23 14:36:09 +01:00
Lorenz Meier b9dc72f4cc Merge pull request #2217 from PX4/FF_fix
fixed rates feedforward
2015-05-23 13:18:59 +02:00
TSC21 6049365123 Merge branch 'master' 2015-05-23 11:24:15 +01:00
Stefan 02fd3c3f53 Update README.md
* add link to releases
* add link to STM32F4Discovery Tutorial on pixhawk.org
2015-05-23 11:43:25 +02:00
Lorenz Meier 41282a3f83 Merge branch 'release_v1.0.0' into beta 2015-05-23 11:08:01 +02:00
Lorenz Meier 8fd00f4d6d Merged release_v1.0.0 into master 2015-05-23 11:07:10 +02:00
Lorenz Meier 38535b4d2f Merged release_v1.0.0 into master 2015-05-23 09:57:17 +02:00
Lorenz Meier 0bd0f7dae5 Merge pull request #2216 from DonLakeFlyer/CalESC
ESC Calibration
2015-05-22 22:27:11 +02:00
Lorenz Meier d385a7f483 Ignore battery voltage only when below 2.5V, as we could be still running at that voltage 2015-05-22 21:47:18 +02:00
Roman 16df7e1656 fixed rates feedforward: plant for feedforward is given by derivative operator 2015-05-22 21:12:18 +02:00
TSC21 29e7d5de9d distance_sensor: update msg template info 2015-05-22 19:53:52 +01:00
Don Gagne fe357a9a66 Separate timeouts for battery and high pwm 2015-05-22 11:24:07 -07:00
Don Gagne 25e7a1a49e ESC calibration re-work
- Uses standard QGC cal mavlink messaging
- Timeout if no battery connect
- Better error handling and cleanup
2015-05-22 09:29:59 -07:00
Don Gagne a6af1fc0fa Add "calibrate esc" command 2015-05-22 09:28:52 -07:00
TSC21 b1a60baf05 Merge 'master' 2015-05-22 14:53:14 +01:00
Lorenz Meier 9cf1b4ba7a Merge branch 'release_v1.0.0' 2015-05-22 07:24:57 +02:00
Lorenz Meier 283baff956 Merge pull request #2212 from mcharleb/multi-os-support
Fix double build when using new make target syntax
2015-05-22 07:06:51 +02:00
Mark Charlebois 6ae6c29879 QuRT: Changed PX4_DEBUG output from verbose to omit
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-21 15:45:13 -07:00
Mark Charlebois f1f562a94d POSIX: Fixed orb_advertise failure
There were an insufficient number of devmap entries allocated and
when they ran out, new orb_advertise requests would fail.

Also added a new logging macro for the Linux build to show the
calling pthread if enabled.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-21 15:35:11 -07:00
Mark Charlebois 2d22e8325d Fix double build when using new make target syntax
When make is invoked as "make posix posix_default"
it will build the posix_default target twice. The Makefile was
fixed to correct this.

If "make posix" is run, the Makefile still calls "make PX4_TARGET_OS=posix".

If "make posix posix_default" is run, the posix target just exports
PX4_TARGET_OS=posix and then make evaluates the next goal (posix_default).

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-21 13:45:53 -07:00
Lorenz Meier 8c854d94d7 Merge pull request #2209 from mcharleb/multi-os-support
Added ability to set OS specific path for dataman file
2015-05-21 20:10:01 +02:00
Roman Bapst 5a53a4f7bf do not update mission if it has unsupported mission items 2015-05-21 20:09:15 +02:00
Lorenz Meier be58ced1b2 Merge pull request #2210 from mcharleb/qurt-test
Sensors: added missing px4_close and removed _exit() call
2015-05-21 19:46:06 +02:00
Mark Charlebois cb5db8ec83 dataman: Fixed file permissions on file creation
In Linux the file was being created with incorrect permissions.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-21 10:37:15 -07:00
Mark Charlebois 0c3681c896 Sensors: added missing px4_close and removed _exit() call
The QuRT build was broken from the call to exit. While fixing
the code to clean up before returning, I found a missed call
to px4_close.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-21 10:26:45 -07:00
Mark Charlebois f24d807b66 QuRT: Fixed file descriptions for command_<config>.c
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-21 10:23:46 -07:00
Mark Charlebois dc1c4a30e1 Makefile multi-target support
NuttX is still the default target and all NuttX configs can still
be built with:

make

Individual NuttX, POSIX, and QuRT configs can now be built more
easily by specifying the target and configs:

make posix posix_default
make qurt qurt_hello
make nuttx aerocore_default

Running make with just the target will make all the configs for
that target:

make nuttx
make qurt
make posix

The help is also target specific:
make nuttx help
make qurt help
make posix help

"make help" will still assume you want help for the NuttX target

Added a new QuRT config called qurt_hello as a sample config to
test buiding in different commands for separate configs.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-21 10:23:46 -07:00
Mark Charlebois 7da96b3bac POSIX: Fixed uint64_t print in generated topic_listener.cpp
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-21 10:23:46 -07:00
Mark Charlebois 05720b5aef Added ability to set OS specific path for dataman file
dataman can now be started using:

dataman start -f filepath

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-21 09:24:48 -07:00
TSC21 1c12d8fc7c distance_sensor: added MAV_DISTANCE_SENSOR_INFRARED to topic stream 2015-05-21 12:41:41 +01:00
TSC21 f01e1189fc Merge branch 'master' of https://github.com/PX4/Firmware into distance_sensor 2015-05-21 12:29:10 +01:00
TSC21 db48df15c8 Merge branch 'master' 2015-05-21 12:26:55 +01:00
Lorenz Meier 9e5978b2b1 Merge pull request #1984 from PX4/eigen3
Eigen 3 Support
2015-05-21 09:12:11 +02:00
Lorenz Meier c8f500d254 Merge pull request #2204 from mcharleb/posix-arm
POSIX: changes to support posix build on ARMv7
2015-05-21 08:39:59 +02:00
Lorenz Meier 278fb8d794 Merge pull request #2205 from mcharleb/qurt-test
Qurt test
2015-05-21 08:19:41 +02:00
Daniel Agar 3bc10d037d test_eigen minor fixes
-disable quaternion tests for now
2015-05-21 00:20:49 -04:00
Lorenz Meier 22cd71d5c3 Eigen3: Enable test 2015-05-20 23:40:41 -04:00
Mark Charlebois e45f040c76 QuRT: Fixed file descriptions for command_<config>.c
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-20 19:35:43 -07:00
Mark Charlebois 43345e29dc Makefile multi-target support
NuttX is still the default target and all NuttX configs can still
be built with:

make

Individual NuttX, POSIX, and QuRT configs can now be built more
easily by specifying the target and configs:

make posix posix_default
make qurt qurt_hello
make nuttx aerocore_default

Running make with just the target will make all the configs for
that target:

make nuttx
make qurt
make posix

The help is also target specific:
make nuttx help
make qurt help
make posix help

"make help" will still assume you want help for the NuttX target

Added a new QuRT config called qurt_hello as a sample config to
test buiding in different commands for separate configs.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-20 19:19:08 -07:00
Mark Charlebois 062a547d07 POSIX: changes to support posix build on ARMv7
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-21 00:43:55 +00:00
Nate Weibley b55361b472 Actually track USB uarts, eliminiate unnecessary passing / pointer to _is_usb_uart 2015-05-20 16:06:02 -04:00
Lorenz Meier d43b0513ce Increase buffer sizes on companion link 2015-05-20 21:03:04 +02:00
Lorenz Meier 64ea4071a7 mavlink: Enable a few helpful streams on companion link 2015-05-20 21:02:58 +02:00
Lorenz Meier fbdfc698cc Merge branch 'release_v1.0.0' 2015-05-20 20:24:39 +02:00
TSC21 1978f1bcac distance_sensor: remove 'distance_sensor.h' autogenerated header 2015-05-20 17:37:54 +01:00
TSC21 80c7719b42 distance_sensor: typo correction on msg.type 2015-05-20 12:51:20 +01:00
TSC21 c180b5d825 distance_sensor: added msg definition to 'msg' folder 2015-05-20 12:40:15 +01:00
Lorenz Meier 2903ceaacc Merge branch 'release_v1.0.0' 2015-05-20 09:00:57 +02:00
TSC21 796b105382 distance_sensor: updated distance_sensor stream sub 2015-05-20 00:54:36 +01:00
Mark Charlebois 00296ba241 POSIX: Fixed uint64_t print in generated topic_listener.cpp
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-19 16:42:55 -07:00
TSC21 30218b0de7 distance_sensor: added mavlink_receiver handler for msg 2015-05-20 00:15:27 +01:00
TSC21 364492a325 distance_sensor: added def to objects_common.cpp 2015-05-19 23:42:15 +01:00
TSC21 c2d1de30af Merge branch 'master' of https://github.com/PX4/Firmware into distance_sensor 2015-05-19 23:32:33 +01:00
TSC21 37e96e230c distance_sensor: first topic commit 2015-05-19 23:25:33 +01:00
Lorenz Meier fee48a77ae Merge pull request #2057 from mcharleb/linux
Linux support
2015-05-19 23:30:42 +02:00
Lorenz Meier a02b99ec59 Travis: Build POSIX before unit tests 2015-05-19 23:02:16 +02:00
Lorenz Meier 0d19a50b1b Add POSIX build to autobuild suite 2015-05-19 22:59:27 +02:00
Mark Charlebois 30895c2dfd POSIX: fixed printf to use PX4_INFO
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-19 13:37:59 -07:00
Mark Charlebois 7301b59d14 Unit tests: Fixed unit test build
Unit tests now work. The linux build was failing saving params
because it was using the changes for QuRT that fake out the
filesystem.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-19 13:36:13 -07:00
Mark Charlebois f44444b7c4 POSIX: Converted poll to px4_poll
A new poll command was added in accelerometer_calibration.cpp
that needed to be converted to a px4_poll.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-19 12:06:58 -07:00
Lorenz Meier d906fb8f31 Merged master into linux 2015-05-19 21:00:02 +02:00
Mark Charlebois eaef0db7d6 Logging fixes and enhancements
Made the logging macros generic so they can be used for multiple targets.

Fixed toolchain_native.mk so err.h is included from src/systemlib for posix.

Reduced debug output for uORB.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-19 11:53:19 -07:00
Mark Charlebois 95de7c2e94 ROS: Fixes for print of uint64_t type
Changed printf to use PRIu64

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-19 11:14:40 -07:00
Mark Charlebois 60080dd9e7 QuRT: fixed print of INT32_t type
In QuRT, this is a long but the variable was being printed with "%d"

Need to cast variable as long and use "%ld"

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-19 11:10:06 -07:00
Mark Charlebois ce96329f95 Resolve printing uint64 types
Using %llu or %lu will break one of the build targets. The "right way"
to print a uint64_t is via the PRIU64 macro defined in C99.

This wasn't defined for the NuttX compiler so it was added to px4_defines.h
for NuttX.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-19 11:04:39 -07:00
Mark Charlebois e2d175b3e5 Added back include of px4_posix.h for non-ROS builds
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-19 10:47:17 -07:00
Mark Charlebois 0f5cb75692 ROS: Fixes for ROS build
The ROS build included some files that used isfinite vs PX4_ISFINITE.

The AppState class also needed to be supported for ROS.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-19 10:41:15 -07:00
Mark Charlebois 49a200d834 Merge branch 'linux' of http://github.com/mcharleb/Firmware into linux 2015-05-19 09:23:34 -07:00
Mark Charlebois ffdc9d629c POSIX: Improved logging
The warnx and warn calls map to PX4_WARN.
Calls to errx or err genrtate a compile error.

The px4_log.h file implements a new log format:

For DEBUG and INFO:
<level> <msg>

For ERROR and WARN:
<level> <msg> (file filepath line linenum)

The verbosity can be changed by setting the macro to use
either linux_log or linux_log_verbose in px4_log.h

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-19 09:19:24 -07:00
Max Shvetsov dbe58d6165 [pwm_input] reset feature added
publication to range_finder topic added
2015-05-19 12:40:42 +03:00
Lorenz Meier e5fad077df Merge master into linux 2015-05-18 23:28:57 +02:00
Lorenz Meier 3facabb85c Merge branch 'master' into beta 2015-05-18 23:19:08 +02:00
Mark Charlebois 791d780bb8 BAROSIM: Fixed error in transfer function
The transfer function would previously return error if the receive
buffer length was 0. This appears to be a valid condition for
requesting a measurmement be taken but no data returned.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-18 13:29:20 -07:00
Mark Charlebois 466db74d29 QuRT: Added define so pthread functions are enabled
Added -D__QDSP6_DINKUM_PTHREAD_TYPES__ to makefiles/toolchain_hexagon.mk
so the pthreads functions are properly defined.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-18 12:21:53 -07:00
Mark Charlebois dcb55ff38d Changed isfinite to PX4_ISFINITE
There are cross platform issues with the isfinite call that are handled
by PX4_ISFINITE

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-18 09:58:49 -07:00
Lorenz Meier 82f770ddff Merge branch 'master' of github.com:PX4/Firmware into beta 2015-05-18 11:03:49 +02:00
Mark Charlebois 36f5d47ed9 Merge remote-tracking branch 'upstream/master' into linux
Signed-off-by: Mark Charlebois <charlebm@gmail.com>

Conflicts:
	src/modules/commander/gyro_calibration.cpp
	src/modules/mavlink/mavlink_ftp.cpp
2015-05-16 15:04:38 -07:00
Mark Charlebois 6a1c28fbc1 Merge branch 'linux' of http://github.com/mcharleb/Firmware into linux 2015-05-15 13:00:59 -07:00
Mark Charlebois 9f391b1867 NuttX: fixes for NuttX build
In the upstream tree ringbuffer.h includes the method implementations
in the header file which causes multiple definitions in the link for
other targets. Changed so ringbuffer.cpp is build separately for other
platforms and is included by ringbuffer.h on NuttX.

uORB changes do not link without uORBTest_UnitTest.cpp enabled for
the NuttX build.

px4_getopt was not exported and wasn't visible in NuttX build.

The makefiles were restored to be as close as possible to upstream
so the NuttX build builtin's work again. The code will have to be
refactored after the merge.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-15 12:56:18 -07:00
mcharleb 868177f3ba Merge pull request #12 from tumbili/simulator_fixes
fix mavlink message sending, make thread priority default
2015-05-15 08:59:14 -07:00
Roman Bapst 4a84215a8f fix mavlink message sending, make thread priority default 2015-05-15 17:49:20 +02:00
Mark Charlebois a3a0d0612c QuRT: enabled more modules
rgbled is now enabled.

Saving parameters causes a crash so those commands are not enabled.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-14 09:45:03 -07:00
Mark Charlebois abe61a3d7e Added missing return on error
When mc_pos_control_main.cpp was ported to posix one error condition
retuned 0 instead of 1.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-14 08:32:51 -07:00
mcharleb 2bdfd8ca1b Merge pull request #11 from tumbili/mc_pos_control
Multicopter position controller port
2015-05-14 06:58:21 -07:00
tumbili cfa0073c35 build mc_pos_control 2015-05-14 14:58:46 +02:00
tumbili f6bf6c89ff ported mc_pos_controller 2015-05-14 14:58:23 +02:00
Mark Charlebois b2c12ff522 QuRT: added stub for inclusion of libdspal.a
libdspal.a is still incomplete and so is not yet used

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-13 18:49:00 -07:00
Mark Charlebois 8e346a06fb QuRT: enable uORB, and simulator
uORB, the simulator and simulated devices now run

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-13 18:03:08 -07:00
Mark Charlebois 884f62878d QuRT: pthread API now working
The use of std::map and static initialization was an issue.

The code was refactored to not use static initialization.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-13 16:21:52 -07:00
mcharleb 7115ec3ab6 Merge pull request #10 from tumbili/hil_message
read hil sensor message instead of highres imu message
2015-05-13 09:19:41 -07:00
Lorenz Meier 0dc62633f3 Merge branch 'master' into beta 2015-05-13 15:47:05 +02:00
Lorenz Meier f659e1b647 Merge branch 'master' into beta 2015-05-13 15:34:43 +02:00
Lorenz Meier 796b2ccd32 Merge branch 'master' into beta 2015-05-13 15:19:51 +02:00
Roman Bapst cf27fc59c7 read hil sensor message instead of highres imu message 2015-05-13 10:31:52 +02:00
mcharleb c1927b7387 Merge pull request #9 from tumbili/send_controls
send pwm outputs to simulator
2015-05-12 15:24:37 -07:00
tumbili 9686f8004e send pwm outputs to simulator 2015-05-12 23:55:32 +02:00
mcharleb 21d7e4f24f Merge pull request #8 from tumbili/serial_device
read serial device to obtain manual control setpoint
2015-05-12 14:36:18 -07:00
tumbili 3a79679e2d get manual control setpoint from PIXHAWK 2015-05-12 23:15:58 +02:00
Mark Charlebois 3db5f3bb3b QuRT: toolchain changes
Reworking toolchain and main.cpp for QuRT to a final link can be
done and the apps.h file is autogenerated.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-12 11:37:28 -07:00
Lorenz Meier a59102d468 Merge branch 'master' into beta 2015-05-12 11:27:36 +02:00
Mark Charlebois 14cbd240ff QuRT: added qurt_log
Implement as a printf for now

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-11 19:38:03 -07:00
Mark Charlebois d0bf4ab449 Simulator: refactored mavlink additions
QuRT does not support UDP so moved the mavlink specific code
to a new file that is not built for the qurt target

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-11 19:25:11 -07:00
Mark Charlebois 2f434eb395 POSIX: fixups for px4_log.h change
After merge from qurt branch, fixups for posix build

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-11 16:14:06 -07:00
Mark Charlebois 2d32395bc0 Merge branch 'qurt' into linux 2015-05-11 16:07:53 -07:00
Mark Charlebois a99f916bdf POSIX: Changed px4_debug.h to px4_log.h
Also changed use of printf to PX4_WARN or PX4_INFO in posix and
qurt tests.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-11 16:04:39 -07:00
mcharleb 11010a648c Merge pull request #7 from tumbili/polling
implemented polling to prevent unnecessary cycling.
2015-05-11 15:00:48 -07:00
tumbili c074d6e913 implemented polling of socket file descriptor and uorb topic file descriptor 2015-05-11 23:55:11 +02:00
mcharleb c303525336 Merge pull request #6 from tumbili/simulator_udp
implemented bidirectional udp communication with simulator
2015-05-11 08:39:04 -07:00
tumbili 9119687177 make socket non-blocking, moved socket includes to header file to avoid forward declarations 2015-05-09 10:35:25 +02:00
tumbili 39711ca908 implemented bidirectional udp communication with simulator 2015-05-08 21:51:21 +02:00
Mark Charlebois 0ba5305e94 QuRT: satisfy missing deps
There is no ioctl or write. Added stubs.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-07 23:21:24 -07:00
Mark Charlebois 84ca66dcf7 QuRT: updated task support based on posix fixes
The posix layer implementations should work on QuRT.

QuRT needs to provide a way for getting the current time.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-07 22:58:51 -07:00
Mark Charlebois 3225edfabb QuRT: Really reverted to non-posix APIs
Using non-posix APIs for now.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-07 21:51:02 -07:00
Mark Charlebois ad1865ef9f QuRT: Move to POSIX API for threads
Use the pthread APIs to implement task support

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-07 14:55:28 -07:00
Mark Charlebois 8dfb09418b QuRT: added #include<px4_time.h> to posix unit tests
QuRT does not define usleep and sleep, so they are stubbed out
for now.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-07 14:40:31 -07:00
Mark Charlebois 8caefc183d QuRT: updated toolchain file to link against libdspal.a
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-07 13:23:45 -07:00
Mark Charlebois fd3715912e QuRT: stub out missing functions
Stub out the missing functions to enable running in the simulator

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-07 12:54:39 -07:00
Mark Charlebois 632f77df49 QuRT: add drivers/led
The drivers/led module was missing from the QuRT config

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-07 11:55:24 -07:00
Mark Charlebois a0d548db9a Changed circuit_breaker to not use px4.h
The inclusion of px4.h requires C++ features not supported in the
Hexagon toolchain. The features are not required so the required
headers are used instead.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-07 11:35:01 -07:00
Mark Charlebois 99822038f3 POSIX: Fixed px4_open code to not create a file when opening a device
The code to created a virtual file was preventing the creation of
device nodes.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-07 10:50:23 -07:00
Mark Charlebois 4216a0d64d POSIX: remove check for /tmp/ttyS{0|1}
The posix build now disables the UART code in mavlink.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-07 10:46:10 -07:00
Mark Charlebois 41a2d30cfe Merge branch 'linux' of http://github.com/mcharleb/Firmware into linux 2015-05-07 10:08:56 -07:00
Mark Charlebois 2002d4e774 POSIX: disable UART in mavlink
Most of the current POSIX builds will not use the UART and it
is just a unnecessary dependency to satisfy when running in a
test environment.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-07 10:07:18 -07:00
Mark Charlebois 5e2af2b227 POSIX: fixed return values to be posix compliant
px4_read, px4_write, and px4_opctl were not returning the correct
value on error. They were returning -errno vs -1.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-07 09:38:03 -07:00
Mark Charlebois 6db77dc8bb Experimental virtual file support
QuRT does not have a filesystem, so creating a virtual filesystem
that could be implemented as an in-memory file or a remote file
over fastRPC.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-06 22:12:45 -07:00
Mark Charlebois 35e6822d95 Added missing px4_ prefixes
NuttX build required missing px4_ prefix for systemreset and task_spawn_cmd

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-06 16:25:45 -07:00
Mark Charlebois a0d58552a0 blinkm: merged NuttX and POSIX impelmentations
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-06 16:24:18 -07:00
Mark Charlebois 948b47bd33 Removed px4_killall
killall and px4_killall are not used in the codebase so it was removed.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-06 16:04:20 -07:00
Mark Charlebois 3a65187303 Fixed bad merge
Forgot to remove old file line when merging the changes from master.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-06 16:00:00 -07:00
Mark Charlebois db52227409 Merge remote-tracking branch 'upstream/master' into linux
Signed-off-by: Mark Charlebois <charlebm@gmail.com>

Conflicts:
	src/modules/commander/accelerometer_calibration.cpp
2015-05-06 15:51:39 -07:00
Mark Charlebois 04b564920f POSIX: Make binutils BDF linker the default
ld.gold does not support the -Ur flags and it seems some people have
ld as a link to ld.gold.

Made LD = ld.bfd to avoid confusion.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-06 15:44:37 -07:00
Mark Charlebois 0c1c58c418 Fixed overzealous px4_ prefixing
Some files had px4_px4_ prefixed functions.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-06 15:32:04 -07:00
Mark Charlebois c5237f7f6f Removed extra abstracton layer in systemlib
The calls to task_spawn_cmd, kill_all, and systemreset  were wrappers
around the px4_{task_spawn_cmd|kill_all|systemreset} implementations.

Removed the wrappers and changed all calls to the px4_ equivalents.

NuttX specific code was moved into px4_tasks.h

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-06 14:43:11 -07:00
Mark Charlebois 3654aec3a5 POSIX: ported px4_daemon_app
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-06 14:34:23 -07:00
Mark Charlebois eed2479dfc Added px4_ prefix to task_spawn_cmd
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-06 14:20:08 -07:00
Mark Charlebois 7ebee7ca6f uORB: Unit test fix
The latency_test used to pass an object pointer as argv which
won't work in the posix port because it expects argv to be a
null terminated array of character pointers (which it makes a
copy of).

The test was refactored to use a singleton pattern and avoid
having to pass the object pointer to the thread.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-06 13:19:52 -07:00
Mark Charlebois 872e1ebda0 GCC fixes for warnings
GCC was more picky about prototypes for inlines being required.

The generate_listener.py script used incorrect printf formats and
was casting %f params to float, but printf casts all %f params to
double per the spec.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-06 11:45:23 -07:00
Lorenz Meier d9d0582777 Merge branch 'master' into beta 2015-05-06 19:40:15 +02:00
Mark Charlebois 5299f76706 POSIX: initialize before running script
The initialization functions were called after the script
commands were run causing a deadlock waiting for an
uninitialized semaphore.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-06 09:51:31 -07:00
Mark Charlebois e28049a387 POSIX: changed SIGCONT to SIGALRM
QuRT doesn't seemto support SIGCONT

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-05 16:43:54 -07:00
Mark Charlebois 6d2efd0e8f uORB: Unit test called close vs px4_close
The unit test should have called px4_close(), not close().

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-05 13:07:54 -07:00
Mark Charlebois b7918ee45a Nuttx: remove -Wframe-larger-than=1024
The build fails when modules override this flag with a larger value,
and this lower value is still checked. The new flag seems to be in
addition to the old flag, not a replacement.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-05 12:16:23 -07:00
Mark Charlebois 0cea93a55c POSIX and QuRT: fixed calls needing px4_ prefix
There were some missed calls to open and ioctl that need to be
px4_open and px4_ioctl.

QuRT also does not provide usleep() so px4_time.h has to be included
in files calling usleep.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-05 12:13:39 -07:00
Mark Charlebois f2af8b08ed uORB: fix segfault in unit test
The unit test was not passing a null pointer terminated argv.
The posix port depends on argv being null terminated to
determine how may args were passed since PX4 API doesn't
pass argc when spawning a new task.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-05 12:09:19 -07:00
Mark Charlebois e33a164ddb uORB: Major refactoring
uORB was refactored in order to support the MuORB changes required
for QURT. Those changes wil be added in a subsequent commit.

The files are split out by posix and nuttx so the changes are visible.
When this has been tested, the files can be re-merged and re-tested.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-05 10:52:15 -07:00
Mark Charlebois e24405d374 POSIX: fixed hrt call and workqueue implementation
The HRT call processing normally happens via HW timer interrupt
handler. Since the POSIX port has no ISR handling, the HP work
queue is used.

Instead of irq_save() and irq_restore() calls to disable/enable
interrupts, a mutex is used to protect each queue.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-05 00:27:14 -07:00
Mark Charlebois 12a25e4b63 Merge remote-tracking branch 'upstream/master' into linux
Signed-off-by: Mark Charlebois <charlebm@gmail.com>

Conflicts:
	makefiles/firmware.mk
	src/modules/commander/module.mk
	src/modules/mavlink/mavlink_ftp.h
	src/modules/mavlink/mavlink_tests/module.mk
2015-05-04 16:36:59 -07:00
Mark Charlebois ed621a6a8d POSIX: Enabled hrt queued work to be run
In STM32, the ISR handler calls hrt_call_invoke(). There is no
interrupt timer inthe POSIX port so a work item is put on the
high priority work queue to expire at the next event (in ticks)
or at the next max delay interval.

Counter wrapping is likely still not handled properly in this code.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-04 16:09:00 -07:00
Mark Charlebois 7ac9fc38e4 Commented out 1st definition of MAVLINK_SRC
The variable MAVLINK_SRC was defined and then redefined.
Commented out the first definition and moved beside that overriding
definition for visibility.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-04 15:48:06 -07:00
Mark Charlebois cfd96a8ab4 POSIX: Added missing include path and -Wno-packed flag
The changes to the simulator added an include of

mavlink/include/v1.0/... to simulator.h which was not in the included paths.

The included header file also causes clang to issue a -Wpacked warning that
had to be silenced.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-04 15:33:08 -07:00
mcharleb 21a5dfc828 Merge pull request #5 from tumbili/JMAVsim_interface
JMAVSim interface
2015-05-04 14:15:29 -07:00
tumbili 4b34d0c297 improved topic listener 2015-05-04 23:10:23 +02:00
tumbili 17267a7f66 enable receiving mavlink highres imu message (via udp) from external simulator 2015-05-04 23:10:23 +02:00
Lorenz Meier b9dc03da92 Merge branch 'master' into beta 2015-05-04 13:04:29 +02:00
Mark Charlebois 1a8bd15d98 Minor cleanup of mixer changes
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-03 11:20:07 -07:00
mcharleb 1b985ab9fb Merge pull request #3 from tumbili/mixer
ported mixer app
2015-05-03 11:06:17 -07:00
tumbili 8a873df9d0 ported mixer app 2015-05-03 17:30:31 +02:00
Mark Charlebois ebdf178ba3 Removed annoying "I2C SIM transfer_4" message
The debug message made it difficult to use the shell for the
posix build. Commented out the debug line.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-30 16:24:43 -07:00
Mark Charlebois 6acdc2ae3f POSIX: workaround for poll notification
Sensor combined topic notification wasnot working because
the calls to hrt_called() and hrt_call_after() in
ORBDevNode::appears_updated() are not working correctly.

This commit ifdefs out those calls, and the poling seems
to work correctly. This is a workaround until the issue is
resolved.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-30 13:17:16 -07:00
Mark Charlebois 5557ecf3d7 POSIX: Added airspeed simulator
This seems to be a dependency for the system to start up.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-30 13:16:03 -07:00
Mark Charlebois 2f8cad6c00 Fixed bad update of poll to px4_poll change
I updated poll to px4_poll but forgot to change
struct pollfd to px4_pollfd_struct_t.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-30 09:12:39 -07:00
Mark Charlebois b7120f1b9f Fixed call to poll to be px4_poll
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-30 09:02:04 -07:00
Mark Charlebois 93a3eeb569 Simulator: Added Roman's sensors combined topic
Simulator can work as before with -s flag or with Roman's additions to
publish the sensors combined topic using -p flag.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-29 23:45:54 -07:00
Mark Charlebois a209fdc8ef Added missing lock() unlock() to MuORB
The commented out lock and unlock were determined to be needed and added back.

The unit test for VDev was updated. It showed the race between the poll and a
write that only does a poll_notify().

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-29 17:04:30 -07:00
Mark Charlebois b408983d4c mavlink: added back MODULE_COMMAND
The MODULE_COMMAND was inadvertently removed during merge of master

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-28 17:27:14 -07:00
Mark Charlebois c622636601 Nuttx: fixed include of systemlib/err.h
The new px4_debug.h included "err.h" instead of
"systemlib/err.h" for NuttX.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-28 12:49:04 -07:00
Mark Charlebois 523a4aa785 Clang warning fix
Clang build fails due to -Werr and warning on use of
if (!condition != other_condition && some_condition)

Clang wants to be clear that the initial '!' wasn't
intended for the whole expression.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-28 12:29:50 -07:00
Mark Charlebois 2446dfec16 Fixups after merge from master
MuORB was missing the orb_exists() function added to uORB.cpp

gyro_calibration.cpp still had some merge conflicts that had not been resolved.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-28 12:28:10 -07:00
Mark Charlebois 190814bc97 Merge remote-tracking branch 'upstream/master' into linux
Signed-off-by: Mark Charlebois <charlebm@gmail.com>

Conflicts:
	src/drivers/rgbled/rgbled.cpp
	src/modules/commander/PreflightCheck.cpp
	src/modules/commander/airspeed_calibration.cpp
	src/modules/commander/calibration_routines.cpp
	src/modules/commander/gyro_calibration.cpp
	src/modules/commander/mag_calibration.cpp
	src/modules/mc_att_control/mc_att_control_main.cpp
2015-04-28 11:48:26 -07:00
Mark Charlebois c832f4c55c Small fixes for debug macros
Fixed print format for __LINE__ to %d

Fixed if/else that breaks with the debug macro expansion. The if/else
needs to use braces to allow macro expansion.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-27 22:28:39 -07:00
Mark Charlebois 0bf690d36a Used new debug macros for sim.cpp
sim.cpp was causing the posix shell to have continuous debug output.

Used debug macros to suppress output

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-27 22:15:18 -07:00
Mark Charlebois 09718fa324 Revamped debug macros
Created px4_debug,h to define:

PX4_DBG
PX4_INFO
PX4_WARN
PX4_ERR

These enable OS specific mappings to be made, filtering, etc.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-27 21:58:54 -07:00
Mark Charlebois 6ab25ae890 QuRT: workaround for __sync_bool_compare_and_swap
The Hexagon compiler version does not support __sync_bool_compare_and_swap.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-27 16:51:33 -07:00
Mark Charlebois 58595e2e78 QuRT: fixed hard coded path in toolchain_hexagon.mk
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-27 16:21:30 -07:00
Mark Charlebois a284a7b6d9 POSIX: added separators between commands run from shell
Output a separator and the command called to make the ouput easier
to read.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-27 14:03:23 -07:00
Mark Charlebois 58a33dd26a Added simulated tone_alarm and enabled led for POSIX
Added simulated tone_alarm class and enabled led class for posix build.

The simulator implements the led_init, led_on, led_off, led_toggle calls.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-27 14:00:06 -07:00
Mark Charlebois 7fa33d0d2b posix: workqueue uses TICK scaling from px4_defines.h
px4_defines.h defines USEC2TICK(x) and TICKS_PER_USEC.

These are now used and allow tick scaling.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-27 13:48:54 -07:00
Lorenz Meier 3dd45b9d34 Merge branch 'master' into beta 2015-04-27 22:34:08 +02:00
Mark Charlebois 3c957e57e7 Posix: fixed time scaling for work queues
In work queues, delay is in ticks. Needed to check elapsed time
in ticks not in milliseconds.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-27 13:17:28 -07:00
Mark Charlebois 7390f50b67 Posix: cleanup of bad file rename
Deleted obsolete file and fixed renaming of wqueue_start_posix.cpp

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-27 12:21:00 -07:00
Mark Charlebois 17233faaa0 Removed topic_listener.cpp from gitignore
The generated file is not created in the Build tree and is
automatically ignored

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-27 09:54:47 -07:00
Mark Charlebois 5b91f172e3 topic_listener: moved generated file to Build dir
Moved the generated topic_listener.cpp to the Build tree so it is
cleaned when make clean is called.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-27 09:52:28 -07:00
Mark Charlebois 8e589adb24 topic_listener: added missing build deps
The posix build would complain that toipc_listener.cpp did not exist
and there was no rule to create it.

The required rule was added to src/systemcmds/topic_listener/module.mk

The script generate_listener.py is run from the Build tree and needs to
access $(PX4_BASE)/msgs so $(PX4_BASE) is now passed as an argument to
generate_listener.py

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-26 20:02:58 -07:00
mcharleb 3cabfda4c1 Merge pull request #2 from tumbili/topic_listener
Topic listener
2015-04-26 19:06:24 -07:00
tumbili 3af6e9d76e added autogenerated code for topic listener tool 2015-04-26 22:17:16 +02:00
Lorenz Meier 7b06d781d8 Merge branch 'master' into beta 2015-04-25 12:55:13 +02:00
Mark Charlebois d913ec8dc9 Changed device::px4_device_handle_t to device::file_t
This change allowed the _posix.cpp file changes to be merged
back into the original files.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-24 17:49:35 -07:00
Mark Charlebois 20d35e33da Platform header file cleanup and consolidation
Removed obsolete porting cruft from px4_XXX.h files and merged the
POSIX changes in PreflightCheck_posix.cpp back to PreflightCheck.cpp

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-24 11:45:14 -07:00
Mark Charlebois 16d6068bfd QuRT: patch for eigen
This patch is required for QuRT. comlpex.h defines "I" and it replaces "I" in the
enum definition without this patch creating an error.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-24 10:52:07 -07:00
Mark Charlebois 58a73a5392 Fixed list of SRCS in mavlink_tests/module.mk
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-24 01:56:09 -07:00
Mark Charlebois 4cedcfc58e math/test/test.cpp has invalid calls
The function calls ceil() and floor() but passes an int and there
is obviously no implementation for that so clang fails.

It seems like exp should be a float from this code.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-24 01:40:46 -07:00
Mark Charlebois a1332e699c QuRT and POSIX changes - part 5
Last part of the main QuRT related changes

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-24 01:39:25 -07:00
Mark Charlebois 187f13cd70 QuRT and POSIX changes - part 4
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-24 01:24:31 -07:00
Mark Charlebois c802beb3d7 QuRT and POSIX changes - part 3
More staged changes to support QuRT and related POSIX changes

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-24 01:13:08 -07:00
Mark Charlebois 071c4c1a9e Updated module.mk for changed file names
sensors_x.c were consolidated to sensors.c

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-24 01:05:49 -07:00
Mark Charlebois 8737d77947 QuRT and POSIX changes - part 2
Second staged group of changes for QuRT and related POSIX changes

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-24 01:01:36 -07:00
Mark Charlebois 3336fce1f4 QuRT and POSIX changes
Partial commit of the changes for QuRT and related changes for POSIX

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-24 00:52:44 -07:00
Lorenz Meier 55b257eef3 Merge branch 'master' into beta 2015-04-22 20:47:01 +02:00
Mark Charlebois a4c33f5173 QuRT: removed calls to sleep
A stub for hrt_sleep was removed. Will add back when DSPAL supports
sleep.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-22 11:16:58 -07:00
Mark Charlebois e764c68d0a mavlink: consolidated nuttx and posix changes
Removed nuttx and posix specific files for mavlink_ftp and mavlink_receiver.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-22 11:08:19 -07:00
Mark Charlebois d63d2f7a61 Posix: removed obsolete file mavlink_main_posix.h
The changes for __PX4_POSIX are in mavlink_main.h

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-22 10:41:32 -07:00
Mark Charlebois f63ab3d5e3 Merge branch 'master' into linux
Signed-off-by: Mark Charlebois <charlebm@gmail.com>

Conflicts:
	makefiles/firmware.mk
2015-04-22 10:38:46 -07:00
Mark Charlebois 8e500f543e Combined nuttx and posix mavlink_main headers
Removed the separate implementations of mavlink_main_X.h

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-22 09:39:02 -07:00
Mark Charlebois 6a439f7ddc QuRT: Hello world app for QuRT
DSPAL for QuRT is still missing the pthreads exports and there is no
exported sleep function. These functions are stubbed out for the time being.

This is based on the 6.4.05 version of the Hexagon tools.

The Hexagon tools and DSPAL are needed to build the qurt target.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-22 08:48:48 -07:00
Mark Charlebois c77448747e Merge branch 'linux' of http://github.com/mcharleb/Firmware into linux 2015-04-22 08:32:42 -07:00
Mark Charlebois 9ec7020e02 Make a local function static
platforms/posix/main.cpp had a local function that wasn't static.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-22 08:31:41 -07:00
Mark Charlebois 7aac0e94db Posix: disable stack size check
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-22 07:50:45 -07:00
Mark Charlebois 93dea668dc Posix: make simulated devices always pass self tests
To facilitate testing, the simulated devices always return OK for
self tests.

rc.S was also upated to set CAL_XXXY_ID to the devid so tests pass the
calibration check.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-21 23:29:07 -07:00
Mark Charlebois 36a9f7a818 Posix: fixed calls to open that should be px4_open
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-21 23:26:14 -07:00
Mark Charlebois 02aaa403f1 Posix: removed PX4_DEVIOC* definitions
The following should not have been defined:

PX4_DIOC_GETPRIV
PX4_DEVIOCSPUBBLOCK
PX4_DEVIOCGPUBBLOCK
PX4_DEVIOCGDEVICEID

The actual defines are in drv_device.h and are:

DEVIOCSPUBBLOCK
DEVIOCGPUBBLOCK
DEVIOCGDEVICEID

DIOC_GETPRIV is defined by Nuttx, so mapped to SIOCDEVPRIVATE for POSIX

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-21 23:20:59 -07:00
Mark Charlebois da29004a26 Sync state_machine_helper_posix to state_machine_helper
state_machine_helper_posix.cpp was out of sync with
state_machine_helper_posix.cpp.

Added debug to detect when sensors is started before uorb.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-21 22:04:01 -07:00
Mark Charlebois 3f7d4de74a Posix: fixed ioctl calls to be px4_ioctl
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-21 17:26:07 -07:00
Mark Charlebois 19162ba5be Posix: Changed PreflightCheck to read Vdev
PreflightCheck was failing because it was trying to read actual
devices instad of virtual devices.

ADCSIM had a LINUXTEST ifdef that was removed.

posix_run.sh was using the wrong path

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-21 17:14:52 -07:00
Mark Charlebois f3b5076d70 Linux to posix conversion
Changed "linux" target to "posix". Most of the changes are shared with
QuRT and with OSX. The Linux specific parts are in for i2c which uses
<linux/i2c.h> and <linux/i2c-dev.h>.

There is also a check for __PX4_LINUX in mavlink for a tty ioctl that is
not supported.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-21 09:53:09 -07:00
Lorenz Meier 40faa98416 Linux: Fix unit tests 2015-04-21 09:23:36 +02:00
Lorenz Meier 31818b30b6 Linux: Ignore generated messages 2015-04-21 09:23:26 +02:00
Mark Charlebois 0b649204b0 Make nuttx the default PX4_TARGET_OS
This should make the CI builder happy again.

Also fixed another itdef that should have been ifeq

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 14:35:56 -07:00
Mark Charlebois 4749974d5c Made nuttx the default PX4_TARGET_OS
The CI builder should work when nuttx is set to be the default

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 14:22:51 -07:00
Mark Charlebois 260bbcb64a Nuttx: fixups after rebase on Linux
Seems that mavlink_receiver_linux.cpp inherited the history
from mavlink_receiver.cpp so updates went to it vs mavlink_receiver_nuttx.cpp

Two module.mk files used ifdef instead of ifeq.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 12:57:02 -07:00
Mark Charlebois 710fe76cdf Linux: minor fixups for rebase to master
These changes were required after the rebase to master.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 12:11:27 -07:00
Mark Charlebois 36d17a061e Linux: Update mavlink files to track nuttx upstream
Modified LInux impl to track changes to nuttx impl.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 12:09:54 -07:00
Mark Charlebois 612579c809 Removed check for isfinite as no longer needed
PX4_ISFINITE resolves the definition of isfinite.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 12:08:06 -07:00
Mark Charlebois 455b0dcaff Fixed parenthesis bug
Clang found the following:
       if (fabsf(airspeed.indicated_airspeed_m_s > 6.0f))

which is doing fsbsf( bool )

Fixed to be:
       if (fabsf(airspeed.indicated_airspeed_m_s) > 6.0f)

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 12:04:46 -07:00
Mark Charlebois 94b622998a Silence use of gnu extension gnu-array-member-paren-init
Added -Wno-gnu-array-member-paren-init to toolchain_native.mk

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 12:02:23 -07:00
Mark Charlebois b7a5e4df58 Linux: Fixed px4_ioctl calls that should be ::ioctl
If simulate is not true, then a read I2C device is present.
The global scope ioctl should be called on _fd, not px4_ioctl.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:51 -07:00
Mark Charlebois f44a23bc26 Check stack for commander only for NuttX
Turn off check of stack if not a NuttX build

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:51 -07:00
Mark Charlebois c9d4f02541 QuRT: added sched.h
Added the pieces required from sched.h

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:51 -07:00
Mark Charlebois 6ce0b7b753 QuRT: added missing make pieces
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:51 -07:00
Mark Charlebois 0d523d57af QuRT: Added nfds_t type
DSPAL does not yet provide poll.h and all we need is the defintion of
nfds_t.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:51 -07:00
Mark Charlebois 5d60437164 Qurt: Added more support for the QuRT target
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:51 -07:00
Mark Charlebois 47beddc88f Linux: Fixed hil crash with no args passed
The hil module did not check for argc < 2.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:51 -07:00
Mark Charlebois 1126e7ed52 Added config files for QuRT
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:51 -07:00
Mark Charlebois e9c2e08770 Added initial QuRT support
Added the basic files to start building for QuRT

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:51 -07:00
Mark Charlebois dc52bb7703 Linux: Added support for drivers/rgbled
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:50 -07:00
Mark Charlebois 89a1799e61 Linux: Changed /vdev/... back to to /dev/
Some virtual devices were mapped to /vdev.
Putting them back to /dev.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:50 -07:00
Mark Charlebois d2f0572ce6 Linux: added builtins to show devices and topics
list_devices will list virtual devices starting with "/dev/".
list_topics will list topics ("/obj/")

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:50 -07:00
Mark Charlebois 694427e4ba Converted commander to use px4_posix calls
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:50 -07:00
Mark Charlebois bba26c3430 Linux: enabled commander module
The commander module now compiles for Linux.

state_machine_helper_linux.cpp iterates over the virtual devices vs
all devices under /dev as per NuttX when disabling publishing.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:50 -07:00
Mark Charlebois 88dc6ec1e5 Simulator: use template for Reports
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:50 -07:00
Mark Charlebois 2f5bfe0c16 Linux: quelch clang-3.5 not found warnings
Quelch stderr when looking for clang-3.5.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:50 -07:00
Mark Charlebois 55581cc438 Linux: adcsim fixes
Call to read should have been px4_read.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:50 -07:00
Mark Charlebois 93c39e6d1d Linux: Added barosim support to simulator
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:50 -07:00
Mark Charlebois 89bc1b86b2 Linux: connected gyrosim to Simulator
Simulator gets incoming MPU data and gives raw MPU data to the
gyrosim sensor when read.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:50 -07:00
Mark Charlebois facc2faf04 Linux: added hil support
The HIL driver now runs in the Linux build

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:49 -07:00
Mark Charlebois ac1679dbc3 Added simulator
Simulator listens for UDP input data at port 9876.

Data is for now comma separated. Not yet connected to the various sim
classes: accelsim, gyrosim, magsim.

Barometer measurements not yet supported.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:49 -07:00
Mark Charlebois f00dc44475 Linux: fixed px4_task_t to be int
px4_task_t is negative for failure conditions. It was set mistakenly to
pthread_t (which is unsigned) for LInux.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:49 -07:00
Mark Charlebois a1501fa368 Linux: Default to use clang
Fixed to use clang 3.4.2 on Ubuntu 12.04

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:49 -07:00
Mark Charlebois 639afeb28f Fixed issue with argc check
Was checking if argc < 1 and then accessing argv[1]. Fixed by
checking if argc < 2.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:48 -07:00
Mark Charlebois edf8677c37 Linux: use string to store task name
Converted px4_linux_tasks to C++ so the task struct can use a
string. Sometimes the name string was in the stack of the calling
function and goes out of scope.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:48 -07:00
Mark Charlebois 87a8289a22 Linux: changed adc to adcsim and add barosim
The name of the app was adc but should have been adcsim.
Added a barometer simulator.

This will allow ms56711_linux to depend on real devices and not
simulation.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:48 -07:00
Mark Charlebois ddf75dd55a Linux: added ADC simulator
The sensor module is now able to run after the simulation modules are
started.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:48 -07:00
Mark Charlebois 2eaa2f06e7 Linux: fised printf param to work on 32 and 64 bit targets
Use %zd instead of %d or %ld for sizeof(x).

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:48 -07:00
Mark Charlebois 410f86b767 Linux: Added simulated gyro
The code is based on mpu6000.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:48 -07:00
Mark Charlebois ec1b77c9e1 Linux: GCC static data is 16byte aligned, messes up param
GCC 4.8 and higher implement 16 byte static data alignment on 64-bit.
This means that the 24-byte param_info_s variables are 16 byte aligned
by GCC and that messes up the assumption that the address of the second
parameter is at &param[0]+sizeof(param[0]).
When compiled with clang it is true, with gcc is is not true.

See https://llvm.org/bugs/show_bug.cgi?format=multiple&id=18006

The fix is needed for GCC >=4.8 only. Clang works fine without this.

Added __attribute__((aligned(16))) to first member of param_info_s.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:48 -07:00
Mark Charlebois 5d988381e6 Linux: Created new linker script from scratch
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:48 -07:00
Mark Charlebois d264273d21 ACCELSIM: fixed calls to open, close, ioctl
The calls to open, close, ioctl should have been px4_open, px4_close
and px4_ioctl.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:48 -07:00
Mark Charlebois d137c09b0b Linux: removed debug output for task creation
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:48 -07:00
Mark Charlebois 76e28ac952 Use of != compare of floats in AttitudeEKF.c
This is a bug and is unsafe. I am not going to change the code but
it needs to be changed to a cast to int or a <= as it is unsafe to
check for equality with 0.0F.

Disabled warning for GCC 4.9 for now.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:48 -07:00
Mark Charlebois a6950eb7d3 Linux: fixed bad return value
Function was always returning -ENOTTY instead of the "ret" variable.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:48 -07:00
Mark Charlebois 400b9ebc20 Linux: fixed registration of a class of device
Previously it created 4 instances instead of the next available slot.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:47 -07:00
Mark Charlebois f0312d2da0 Linux: Added commands to show threads and devices
The list_tasks and list_devices commands will show
lists of running px4 threads and created virtual device nodes.

The list_builtins command was removes and the list of commands
will be shown if return is pressed.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:47 -07:00
Mark Charlebois 1d676b2e10 Moved linux/drivers/accel to linux/drivers/accelsim
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:47 -07:00
Mark Charlebois c6498de3e1 SIM: pushed transfer stub for ms5611_sim
The MS5611_SIM class is supposed to simulate data from a real
ms5611. An externl simulator could provide an interface to
call to get data that would be returned from a transfer() call.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:47 -07:00
Mark Charlebois 892012aa15 SIM: made transfer a virtual method
Drivers simulating HW can implement specific behavior for calls to
transfer.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:47 -07:00
Mark Charlebois eab32572f4 Linux: Added thread safe getopt
The getopt command uses global variables and is not thread safe.

Created a minimal px4_getopt version that supports options with
or without an arg, and random placement of options on the command line.

This version modifies the order of the args in argv as does the
POSIX version of getopt.

This assumes that argv[0] is the program name. Nuttx may not support
that properly in task_spawn.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:47 -07:00
Mark Charlebois b86b334c2f Linux: Updated copyright on simulated accelrometer source
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:47 -07:00
Mark Charlebois 80c5812861 Linux: run socat as user not as root
If sudo is used to run socat the tty cannot be opened by a regular user

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:47 -07:00
Mark Charlebois 440fc306a9 Added accelerometer simulator
The simulator satisfies the dependencies for an accelerometer
being present.

The accel code compiles but is not fully functional.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:47 -07:00
Mark Charlebois 76a6f19476 Linux: Added device simulator to simulate an I2C or SPI device
The simulated device satisfies the factory pattern used by
MS5611 to create a specific I2C or SPI device instance.

For now the functions just return true, but should/could
return simulated data.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:47 -07:00
Mark Charlebois 4780353cd8 ms5611_i2c: don't create with nullptr for devname
I have not been able to unravel why nullptr is passed as the device
path to the constructor of ms5611_i2c.

This crashes the VDev code as it expects to create a virtual driver
with the device path passed as devname. It causes VDev to do a
strncmp with null.

Using /vdev/ms5611_i2c as the name for the now.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:34:12 -07:00
Mark Charlebois 92d90f7780 Linux: ms5611 open, close changed to px4_open, px4_close
Calls to open and close were used instead of px4_open and px4_close.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:34:12 -07:00
Mark Charlebois f62ea8aeae Linux: added read and write function overrides for i2c
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:34:12 -07:00
Mark Charlebois 894611df04 Linux: Fixed argc check in sensors_main
Was checking for argc < 1, and should be argc < 2.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:34:12 -07:00
Mark Charlebois 058d4408cc Linux: removed debug output from shell
The command shell was spewing debug infor about the command and
parameters. Removed the debug output.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:34:12 -07:00
Mark Charlebois e3efe71444 Linux: I2C implementation with simulator stub
If PX4_I2C_SIMULATE is set to 1, then the actual I2C device will
not be opened and all transfers will succeed.

If PX4_I2C_SIMULATE is false and transfer() is called, then the
appropriate ioctl is make on the actual device.

if I2C::ioctl is called via px4_ioctl() then the command fails and
a warning is printed to use I2C::transfer

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:34:12 -07:00
Mark Charlebois 78dd177e86 Linux: removed documentation of parameter
The parameter is not present in the linux implementation so removed
the documentation for the parameter.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:34:12 -07:00
Mark Charlebois ccd18929fc Linux: changed CDev to VDev for virtual device implementation
To avoid confusion when a real device and a virtual device is
being used, changed CDev to VDev for Linux.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:34:12 -07:00
Mark Charlebois 8c8f57b5b4 Fixed std::isfinite vs isfinite differences
Added PX4_ISFINITE(x) to px4_defines.h to handle the differences on
NuttX and Linux.

This change also picked up some file renaming for virtual character devices

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:34:12 -07:00
Lorenz Meier 07b16ffa01 Enable estimators in config 2015-04-20 11:27:17 -07:00
Lorenz Meier 7bdaec9ff0 att + pos EKF: Enable execution on Linux 2015-04-20 11:27:17 -07:00
Lorenz Meier b4d52327e8 att EKF: Enable execution on Linux 2015-04-20 11:21:52 -07:00
Lorenz Meier a2a113ee28 Ported mc_att_control 2015-04-20 11:18:43 -07:00
Mark Charlebois 509f7f9fdb Linux: changed to use submodule version of eigen vs system version
Eigen no longer needs to be installed on the build machine as it is
downloaded as a submodule.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:17:21 -07:00
Mark Charlebois 3ab76caa78 Linux: Changed non-fatal px4_errx to warnx
px4_errx kills the process, so if possible we want to end the thread
but not the process. Using warnx and return exits gracefully.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:17:21 -07:00
Mark Charlebois 994065ef47 Linux: dont check stacksize in sdlog2
stacksize check in sdlog2 fails for x86_64

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:17:21 -07:00
Mark Charlebois 1805c21226 Linux: default to clang build
The build will now fail if clang is not found. To force the use
of GCC, use:

   make USE_GCC=1

The toolchain makefile was modified so it no longer checks for
various versions of clang if USE_GCC=1 is passed.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:16:26 -07:00
Mark Charlebois 8b985331a4 Linux: align pointers on 64bit
__param_start and __param end need to be 8 byte aligned on
64bit machines. Changed linker script to 8 byte align __param
section.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:16:26 -07:00
Mark Charlebois e3f137ce23 Fixed gcc 4.8 warnings
Disabled gcc warnings that are tripped by Eigen.

Removed signal code that is not needed in Linux port and was
causing gcc warnings.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:16:26 -07:00
Mark Charlebois eabc44afbe Linux: Added work queue support and unit test
PX4 uses NuttX data structures throughout so those data structures
were preserved and used to implement high and low priority queues.

A unit test for the work queues was added.

The polling rate of the queues are set in px4_config.h in
CONFIG_SCHED_WORKPERIOD. The units are milliseconds.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:16:26 -07:00
Mark Charlebois dffb8bb62c MuORB: handle case on no args passed
if only uorb is called with no other args it crashes.

Handle the case where no args are passed.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:16:26 -07:00
Mark Charlebois cf71db74d7 Support to specify build time OS target
Now run:

make PX4_TARGET_OS=nuttx

or

make PX4_TARGET_OS=linux

To test the linux build and make sure that the required directories
exist, run:

make linuxrun

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:16:26 -07:00
Mark Charlebois aedf6fe628 Linux: Added preliminary work queue support
Based on NuttX work queue code.

Not yet functional.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:16:26 -07:00
Mark Charlebois 056d5f9075 Linux: Added wqueue files from NuttX
Import copies of work queue releated filed from NuttX.

These are the original files.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:16:26 -07:00
Mark Charlebois 340beac672 Linux: I2C virtual device
Create and open I2C virtual device and support I2C_RDWR ioctl

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:16:26 -07:00
Mark Charlebois 192d70e570 Linux: removed separate path for dataman file for Linux
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:16:26 -07:00
Mark Charlebois bb7c8163b9 Linux: commented out tests
The src/platform/linux/tests modules were commented out in the
config file.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:16:26 -07:00
Mark Charlebois 31edc08cea Linux: added missing -pthread flag
LDFLAGS was missing -pthread

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:16:26 -07:00
Mark Charlebois 2cd44a24ea Linux: Added linker script support for param and added mc_att_control
Added linker script to resolve __param_start and __param_end.

Added mc_att_control to list of supported builtins.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:16:26 -07:00
Mark Charlebois 977036faf9 Linux: changed param to nit use errx or exit
Thread based implementaton can't call errx or exit

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:16:26 -07:00
Mark Charlebois 526b0e68eb Linux: modified shell to not show _main suffix
The builtin commands all have _main suffix by convention so
no need to show _main. Also nsh calls the commmands without the
_main suffix.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:15:13 -07:00
Mark Charlebois 1f84c348fc fix for segv if topic has not been published
If the topic has not been published, orb_copy returns a
negative number which causes update() to memset the data
contents to zero.

In some instances data is a null pointer. This causes a
segment violation crash.

Added a check for data != 0

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:15:12 -07:00
Mark Charlebois 653c14fcbb Linux: Handle nullptr passed to I2C constructor
I2C class derives from CDev class which requires a devname
but in at least some instances, a nullptr is passed for devname.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:15:12 -07:00
Mark Charlebois 1b4b8bb856 Linux: in printf cast uint64_t to unsigned long long
When printing a uint64_t type using %llu, this works on a 32bit
system, but on a 64bit machine uint64_t is an unsigned long.

The compiler complains about unmatching types.

The time times in PX4 should likely have been unsigned long long
and not uint64_t as that type changes per architecture.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:15:12 -07:00
Mark Charlebois 83df879f90 Linux: fixes for compilation with gcc-4.8 on IFC6410
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:15:12 -07:00
Mark Charlebois 62eb403e4d Linus: print format fixes to build with clang on IFC6410
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:15:12 -07:00
Mark Charlebois 5f3496353c Linux: added support for sdlog2
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:15:12 -07:00
Mark Charlebois 13d84ef17b Linux: I2C opens /dev/i2c-x
For now it uses the bus number as the id. Not sure how this should
actually be mapped.

Seems like the I2C devices come up in random order and have random
id but that a specific device can be found in the /sys/bus/i2c
interface.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:13:24 -07:00
Mark Charlebois df53defca6 Linux: Add support for blinkm to test I2C layering
Running the blinkm device to test I2C

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:13:24 -07:00
Mark Charlebois cd30b4d5ca Linux: added I2C class
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:13:24 -07:00
Mark Charlebois 90818363eb Linux: fix for undefined BO in mavlink_main_linux.cpp
if termios.h is included before mathlib.h then BO is undefined.
Since mathlib.h is not needed it was removed but I still don't
know why this error occurs.

Also added -lrt to link flags for clock_gettime

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:13:24 -07:00
Mark Charlebois 1cdc44828d Linux - revert to preferentially use clang over gcc
Removed hardcoded requirement to use gcc

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:13:24 -07:00
Mark Charlebois 11e971eaa0 Linux: min gcc version is 4.8.1
PX4 will not build with gcc-4.6.

If you are running Ubuntu 12.04 still (you poor old sod) follow the directions at

http://ubuntuhandbook.org/index.php/2013/08/install-gcc-4-8-via-ppa-in-ubuntu-12-04-13-04/

to install gcc-4.8.1

Alternatively you can install clang 3.4.1 for Ubuntu 12.04 from

http://llvm.org/releases/3.4.1/clang+llvm-3.4.1-x86_64-unknown-ubuntu12.04.tar.xz

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:13:24 -07:00
Mark Charlebois 2feeecdab1 Linux: Added config and stubs to compile I2C device for Linux
Not yet functional. Full implementation will provide an IOCTL interface to
do bi-directional transfer. will model the interface after Linux.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:13:24 -07:00
Mark Charlebois 598b05fcba Linux: run threads without SCHED_FIFO if not privileged
When running the process without sufficient privilege to use
real time scheduling, warn the user and run with SCHED_OTHER.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:07:00 -07:00
Mark Charlebois 4a6bd4ddc0 Linux: replaced getopt in ms5611_linux.cpp
ms5611 uses getopt to parse args but the static variable
optind was not being properly updated.

Replaced use of external getopt call with simple parser;

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:07:00 -07:00
Mark Charlebois ac0df5c61d Linux: added HRT test, moved tests to linux/tests
Also fixed naming of mavlink files for NuttX build.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:07:00 -07:00
Mark Charlebois 99399115f2 Linux: Minor fixes of error caught by gcc-4.9.1
- Missing static declarations for functions not used outside a file.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:07:00 -07:00
Mark Charlebois 88a0081112 Linux: Added support for gcc-4.9.1
Fixed bug with missing quote in #error found by gcc 4.9.1

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:07:00 -07:00
Mark Charlebois d013ac0927 Support for building more modules with Linux
Added more queue support to linux/px4_layer.

Use virt char devices for ms5611, and mavlink.

Added more HRT functionality. uORB latency test
now fails. Likely due to bad HRT impl for Linux.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:07:00 -07:00
Mark Charlebois 2abfb7a5be Linux: added queue files for dataman support
The dataman module now works under linux using /tmp/dataman as the
file path. Two files from NuttX were added to the Linux impl for
single linked queue handling.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:00:18 -07:00
Mark Charlebois fd7863270e Nuttx: fixed missing changes from AppMgr to AppState
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:00:18 -07:00
Mark Charlebois 7b0783a070 Added MuORB based on virtual CDev implementation
uORB module now compiles and runs for Linux using the
virtual CDev implementation.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:00:18 -07:00
Mark Charlebois 938751993d Changed AppMgr to AppState
The previous name implied some kind of daemon. AppState is
aggregated state of an application's running state and interfaces
to request app termination, and check app state.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:00:18 -07:00
Mark Charlebois 5259f1c861 Linux: add queue functions from NuttX and HRT stubs
The High Resilution Timer functions are stubbed out for now.

Certain queue functions are required to compile uORB so adding
the queue.c from NuttX.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:00:18 -07:00
Mark Charlebois 9718404d7f Added new file for virt dev posix-like functions and test case
Moved posix-like functions to vcdev_posix.cpp and updated the
copyright notice.

Added test case to make sure poll unblocks when a write occurs.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:00:17 -07:00
Mark Charlebois 97a72563b8 Fixes to compile again for NuttX
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:00:17 -07:00
Mark Charlebois 4016ad2ff5 Revert uORB to previous version
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:00:17 -07:00
Mark Charlebois f3596e555b Added
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:00:16 -07:00
Mark Charlebois 0553a68a1a Fixed usage string for hello app
hello should have been hello_main

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:00:16 -07:00
Mark Charlebois a25ae71f99 Linux: support ld.gold
The -Ur option is not supported in gold

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:00:16 -07:00
Mark Charlebois aeb65702a2 Fixed support for clang 3.5
"clang-3.5 -dumpversion" returns 4.2.1 as the GCC version.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:00:16 -07:00
Mark Charlebois a68f025ff9 Added support for other clang on Ubuntu 12.04
A Ubuntu 12.04 compatible version of clang-3.4.1 can be downloaded from
http://llvm.org/releases/3.4.1/clang+llvm-3.4.1-x86_64-unknown-ubuntu12.04.tar.xz

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:00:16 -07:00
Mark Charlebois 672ba1a43b Linux: support gcc-4.6 and c++0x
GCC 4.6 is too old for -std=c++11 but it supports -std=c++0x

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:00:16 -07:00
Mark Charlebois 35e00f0ba1 Added missing _PX4_IOC substitutions
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:00:16 -07:00
Mark Charlebois 5084a61f0e Abstractions to compile systemlib for Linux and Nuttx
Modified uint32_t casts of pointers to unsigned long for portability.
It otherwise breaks on x86_64.

Added _PX4_IOC to handle the conflice between _IOC on Linux and NuttX.

Removed use of px4::ok() because it cannot be used in a thread based
implementation. Changed to use px4::AppMgr which uses ok() on ROS.

Removed up_cxxinitialize.c from Linux build.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:00:16 -07:00
Mark Charlebois 89e1b454af Linux: added support for gcc 4.6
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:57:01 -07:00
Mark Charlebois 4a4fcb5d75 Linux: fixes for gcc
Fixes to compile with gcc

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:57:01 -07:00
Mark Charlebois 566c3ed3c3 Linux: Autodetect clang-3.5 toolchain
Use clang-3.5 if found, otherwise gcc

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:57:01 -07:00
Mark Charlebois 62f8bd6679 Linux build support for some libs
The following libs can now be built under Linux:

   lib/mathlib
   lib/geo
   lib/geo_lookup

The constants used for ROS are now shared with Linux in
px4_defines.h

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:57:01 -07:00
Mark Charlebois e3f152b5c1 Changed main_t to px4_main_t in systemlib.h
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:55:41 -07:00
Mark Charlebois 9758112e31 Use px4_config.h instead of nuttx/config.h
Modified code to use OS independent header file for config settings.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:55:41 -07:00
Mark Charlebois 82a7fd5115 Code uses px4_config.h instead of nuttx/config.h
Use OS independent header file for config info.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:49:44 -07:00
Mark Charlebois bf429188b4 Reverted: Use OS independent API for task creation/deletion
Keep existing API use in code. Bind the use of the OS independent
implementation in the systemlib layer.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:49:44 -07:00
Mark Charlebois ddb32742eb Use OS independent API for task creation/deletion
Calls to task_delete and task_spawn_cmd are now
px4_task_delete and px4_task_spawn_cmd respectively.

The px4_tasks.h header was added to the affected files
and incusions of nuttx/config.h were removed.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:49:44 -07:00
Mark Charlebois 51a71d54c6 checksubmodules target needed for Linux build
Moved checksubmodules target back to Makefile.
NuttX download still done for Linux as it would require
too much surgery to remove it.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:46:44 -07:00
Mark Charlebois 520459062d Initial Linux support including execution shell
Uncomment the following line in setup.mk and comment out the line above
to enable the Linux build.

   export PX4_TARGET_OS	 = linux

The build uses the clang compiler by default. The final bundled executable
is mainapp located in:

   Build/linux_default.build/mainapp

When you run mainapp it will provide a list of the built-in apps. You can
type in the commands to run such as:

   hello_main start

Because the Linux build is threaded and does not support tasks or processes,
it cannot call errx, exit() _exit(), etc. It also requires unique scoped
variables to test if a thread is running or if an application should exit.
The px4::AppMgr class was added in px4_app.h for this purpose. The
hello sample app demonstrates how this is used.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:46:43 -07:00
Mark Charlebois 838e9fc769 Refactoring for multiplatform support
Moved the NuttX specific board files to makefiles/nuttx and added
a makfiles/linux directory with sample config and board files.

Created a makefiles/toolchain_native.mk file for building for Linux
with the native system compiler. GCC or clang can be used by setting
a flag in the file.

The Linux build creates an archive file and will build the tasks as
threads. Other code changes are required to support both task based
and thread based builds.

The NuttX source should not be required for the Linux build. The
target OS (NuttX or Linux) is selected by commenting out the desired
line in setup.mk

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:46:43 -07:00
Bharat Tak f7bd105340 Shifted the set() function for Matrix3x3, Vector2, Vector3, Vector4 to appropriate derived class. 2015-04-03 11:34:50 +02:00
Johan Jansen c4bc9d19cb LidarLite: Added collect phase to PWM 2015-03-24 12:57:22 +01:00
Johan Jansen 4e7fa5aade LidarLite: Add uORB handling in PWM drivers 2015-03-24 12:23:15 +01:00
Johan Jansen d160817de3 LidarLite: Fix bug for I2C ioctl 2015-03-24 12:06:54 +01:00
Johan Jansen 874c319888 LidarLite: Code cleanup 2015-03-24 11:49:34 +01:00
Johan Jansen b1da12b43f LidarLite: Added PWM version of the LidarLite driver 2015-03-24 11:31:11 +01:00
Johan Jansen eeb8562c6e LidarLite: Compile with weffc++ and fix all warnings 2015-03-24 10:10:11 +01:00
Johan Jansen b084558a79 LidarLite: Code cleanup, prepare for PWM version of the driver 2015-03-24 10:04:40 +01:00
Lorenz Meier 478a4b2927 Merge branch 'master' into beta 2015-03-10 17:43:23 +01:00
Lorenz Meier 0aa01eeada Merge branch 'master' of github.com:PX4/Firmware into beta 2015-03-09 23:47:25 +01:00
Lorenz Meier 3010f313dc Fix IO update when safety can not be set to on. From @zottgrammes
Conflicts:
	ROMFS/px4fmu_common/init.d/rcS
2015-03-09 20:19:56 +01:00
712 changed files with 49087 additions and 8298 deletions
+4
View File
@@ -48,3 +48,7 @@ unittests/build
.vagrant
*.pretty
xcode
src/platforms/posix/px4_messages/
src/platforms/posix-arm/px4_messages/
src/platforms/qurt/px4_messages/
ROMFS/*/*/rc.autostart
+13 -7
View File
@@ -18,6 +18,7 @@ addons:
- build-essential
- ccache
- cmake
- clang-3.5
- g++-4.8
- gcc-4.8
- genromfs
@@ -60,18 +61,23 @@ env:
script:
- ccache -z
- arm-none-eabi-gcc --version
- echo 'Running Tests..' && echo -en 'travis_fold:start:script.1\\r'
- echo 'Building POSIX Firmware..' && echo -en 'travis_fold:start:script.1\\r'
- make posix -j4
- ccache -s
- echo -en 'travis_fold:end:script.1\\r'
- echo 'Running Tests..' && echo -en 'travis_fold:start:script.2\\r'
- make tests
- cat src/modules/systemlib/mixer/mixer_multirotor.generated.h
- echo -en 'travis_fold:end:script.1\\r'
- echo 'Building NuttX..' && echo -en 'travis_fold:start:script.2\\r'
- echo -en 'travis_fold:end:script.2\\r'
- echo 'Building NuttX..' && echo -en 'travis_fold:start:script.3\\r'
- make archives
- ccache -s
- echo -en 'travis_fold:end:script.2\\r'
- echo 'Building Firmware..' && echo -en 'travis_fold:start:script.3\\r'
- make -j4
- ccache -s
- echo -en 'travis_fold:end:script.3\\r'
- echo 'Building NuttX Firmware..' && echo -en 'travis_fold:start:script.4\\r'
- make -j4
- make size
- ccache -s
- echo -en 'travis_fold:end:script.4\\r'
- zip Firmware.zip Images/*.px4
after_script:
+1
View File
@@ -80,6 +80,7 @@ add_message_files(
vehicle_global_velocity_setpoint.msg
offboard_control_mode.msg
vehicle_force_setpoint.msg
distance_sensor.msg
)
## Generate services in the 'srv' folder
Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

+98
View File
@@ -0,0 +1,98 @@
[TOC]
# Introduction
The HIL architecture allows you to test the flight stack replacing the real physical vehicle and sensors with a simulator of vehicle dynamics and sensor outputs. The flight stack "is not aware" that it is not on a real vehicle. This is a powerful tool for develping and testing code rapidly in a benchtop environment.
The flight stack can be run anywhere that supports a network connection to the simulator (with sufficient bandwidth and latency to transport the sensor and actuator messages). This can be on a standard linux workstation, an on-target linux image, or the on-target DSP image. These modes can be selected based on the goals of the testing. Workstation is useful for rapid testing in a tool-rich environment. DSP image testing is the closest to the final implementation, so is useful for testing actual HW operation, other than the physical sensing and actuation.
## Px4 High-level HIL Architecture
A diagram of the setup described is shown here. Note that UDP port numbers are only displayed on the socket server and are left blank on the socket client.
(???NOTES: This diagram needs to be updated to use control inputs over UDP, either from QGC or from other)
![SITL Diagram](./SITL_Diagram_QGC.png "SITL Diagram")
## Requirements
The simulator that is currently supported is jMAVSim. The setup described here requires PX4 and jMAVSim installed and running. qGroundControl (QGC) is also required because it is the supported method of providing manual control commands.
## Assumptions
# Compiling Code
## JMAVSim
### Platform Requirements
Linux with java-1.7.x or greater
### Build Instructions
In a clean directory
```
> git clone https://github.com/PX4/jMAVSim.git
> cd jMAVSim
> git submodule init
> git submodule update
> ant
```
## qGroundControl
### Platform Requirements
Windows 7
Logitech Gamepad F310 joystick controller
### Download/Install Instructions
Download QGC from http://qgroundcontrol.org/downloads and install using the windows executable.
## PX4
### Platfrom Requirements
Linux or Eagle with a working IP interface (?? does this need further instructions?)
### Build Host Requirements
(???Notes: Windows?)
### Download & Build Instructions
### Installing binaries on the Qualcomm Target
# Running PX4 in HIL Mode
## Starting PX4 on Qualcomm Eagle
```
> adb shell
# bash
root@linaro-developer:/# cd ???
root@linaro-developer:/# ./mainapp
App name: mainapp
Enter a command and its args:
uorb start
muorb start
mavlink start -u 14556
simulator start -p
```
## Starting jMAVSim
In the directory where jMAVSim is installed
```
java -cp lib/*:out/production/jmavsim.jar me.drton.jmavsim.Simulator -udp <IPADDR>:14560 -n 100
```
replacing <IPADDR> with the IP address of the machine running PX4 (Eagle). This can be found by running "ifconfig" on that machine.
## Starting qGroundControl
Launch the qGroundControl application
1. Set up the communication to the flight stack. In the menu File:Settings:CommLinks, select Add. Enter a Link Name of your choice. Select Link Type: UDP. Set the listening port to an unused port (example: 14561). Select Add. Enter the IP address and port of the PX4 Mavlink app, which is <IPADDR>:14556 with <IPADDR> being the IP address of the Eagle board. Select OK.
1. Set up the joystick. Plug in the joystick to your Windows machine. In the menu File:Settings:CommLinks, check Enable Controllers. Select "Gamepad F310". Select "Manual". Set the axes/channel mapping to 0:Yaw, 1:Throttle, 2:unset, 3:Pitch, 4:Roll. Seletct "Inverted" for the throttle axis. Click "Calibrate range". Move the right joystick through its full range of motion. Move the left joystick full left then full right. Move the left joystick full forward (but not full backward). Click "end calibration."
1. Connect to the flight stack. Click Analyze. Click the "Connect" button in the upper right, and select the connection that you created in the first step.
You should now be connected to the flight stack. You can see incoming Mavlink packets using the MAVLink Instpector (from Advanced:Tool Widgets)
## Controlling PX4 flight in HIL Mode
The joystick can now be used to fly the simulated vehicle. The jMAVSim world visualization gives a FPV view, and QGC can be used to display instruments such as artificial horizon and maps (if GPS simulation is enabled).
# Debugging/FAQ
File diff suppressed because it is too large Load Diff
+7
View File
@@ -50,6 +50,13 @@
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"cmd": ["make upload px4fmu-v2_default -j8"],
"shell": true
},
{
"name": "PX4: make posix",
"working_dir": "${project_path}",
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"cmd": ["make posix"],
"shell": true
}
]
}
+2 -2
View File
@@ -3,7 +3,7 @@ to be made under the same license. Any exception to this general rule is listed
/****************************************************************************
*
* Copyright (c) 2012-2014 PX4 Development Team. All rights reserved.
* Copyright (c) 2012-2015 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
@@ -38,4 +38,4 @@ to be made under the same license. Any exception to this general rule is listed
- PX4 middleware: BSD 3-clause
- PX4 flight control stack: BSD 3-clause
- NuttX operating system: BSD 3-clause
- Exceptions: Currently only this [400 LOC file](https://github.com/PX4/Firmware/blob/master/src/lib/external_lgpl/tecs/tecs.cpp) remains LGPL, but will be replaced with a BSD implementation.
- Exceptions: Currently only this [400 LOC file](https://github.com/PX4/Firmware/blob/master/src/lib/external_lgpl/tecs/tecs.cpp) remains LGPL, but will be replaced with a BSD implementation.
+56 -131
View File
@@ -33,6 +33,13 @@
# Top-level Makefile for building PX4 firmware images.
#
TARGETS := nuttx posix posix-arm qurt
EXPLICIT_TARGET := $(filter $(TARGETS),$(MAKECMDGOALS))
ifneq ($(EXPLICIT_TARGET),)
export PX4_TARGET_OS=$(EXPLICIT_TARGET)
export GOALS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
endif
#
# Get path and tool configuration
#
@@ -54,13 +61,13 @@ GIT_DESC_SHORT := $(shell echo $(GIT_DESC) | cut -c1-16)
#
# Canned firmware configurations that we (know how to) build.
#
KNOWN_CONFIGS := $(subst config_,,$(basename $(notdir $(wildcard $(PX4_MK_DIR)config_*.mk))))
KNOWN_CONFIGS := $(subst config_,,$(basename $(notdir $(wildcard $(PX4_MK_DIR)/$(PX4_TARGET_OS)/config_*.mk))))
CONFIGS ?= $(KNOWN_CONFIGS)
#
# Boards that we (know how to) build NuttX export kits for.
#
KNOWN_BOARDS := $(subst board_,,$(basename $(notdir $(wildcard $(PX4_MK_DIR)board_*.mk))))
KNOWN_BOARDS := $(subst board_,,$(basename $(notdir $(wildcard $(PX4_MK_DIR)/$(PX4_TARGET_OS)/board_*.mk))))
BOARDS ?= $(KNOWN_BOARDS)
#
@@ -98,138 +105,17 @@ upload:
endif
endif
#
# Built products
#
DESIRED_FIRMWARES = $(foreach config,$(CONFIGS),$(IMAGE_DIR)$(config).px4)
STAGED_FIRMWARES = $(foreach config,$(KNOWN_CONFIGS),$(IMAGE_DIR)$(config).px4)
FIRMWARES = $(foreach config,$(KNOWN_CONFIGS),$(BUILD_DIR)$(config).build/firmware.px4)
all: $(DESIRED_FIRMWARES)
#
# Copy FIRMWARES into the image directory.
#
# XXX copying the .bin files is a hack to work around the PX4IO uploader
# not supporting .px4 files, and it should be deprecated onced that
# is taken care of.
#
$(STAGED_FIRMWARES): $(IMAGE_DIR)%.px4: $(BUILD_DIR)%.build/firmware.px4
@$(ECHO) %% Copying $@
$(Q) $(COPY) $< $@
$(Q) $(COPY) $(patsubst %.px4,%.bin,$<) $(patsubst %.px4,%.bin,$@)
#
# Generate FIRMWARES.
#
.PHONY: $(FIRMWARES)
$(BUILD_DIR)%.build/firmware.px4: config = $(patsubst $(BUILD_DIR)%.build/firmware.px4,%,$@)
$(BUILD_DIR)%.build/firmware.px4: work_dir = $(BUILD_DIR)$(config).build/
$(FIRMWARES): $(BUILD_DIR)%.build/firmware.px4: checkgitversion generateuorbtopicheaders checksubmodules
@$(ECHO) %%%%
@$(ECHO) %%%% Building $(config) in $(work_dir)
@$(ECHO) %%%%
$(Q) $(MKDIR) -p $(work_dir)
$(Q) $(MAKE) -r -C $(work_dir) \
-f $(PX4_MK_DIR)firmware.mk \
CONFIG=$(config) \
WORK_DIR=$(work_dir) \
$(FIRMWARE_GOAL)
#
# Make FMU firmwares depend on the corresponding IO firmware.
#
# This is a pretty vile hack, since it hard-codes knowledge of the FMU->IO dependency
# and forces the _default config in all cases. There has to be a better way to do this...
#
FMU_VERSION = $(patsubst px4fmu-%,%,$(word 1, $(subst _, ,$(1))))
define FMU_DEP
$(BUILD_DIR)$(1).build/firmware.px4: $(IMAGE_DIR)px4io-$(call FMU_VERSION,$(1))_default.px4
endef
FMU_CONFIGS := $(filter px4fmu%,$(CONFIGS))
$(foreach config,$(FMU_CONFIGS),$(eval $(call FMU_DEP,$(config))))
#
# Build the NuttX export archives.
#
# Note that there are no explicit dependencies extended from these
# archives. If NuttX is updated, the user is expected to rebuild the
# archives/build area manually. Likewise, when the 'archives' target is
# invoked, all archives are always rebuilt.
#
# XXX Should support fetching/unpacking from a separate directory to permit
# downloads of the prebuilt archives as well...
#
NUTTX_ARCHIVES = $(foreach board,$(BOARDS),$(ARCHIVE_DIR)$(board).export)
.PHONY: archives
archives: checksubmodules $(NUTTX_ARCHIVES)
# We cannot build these parallel; note that we also force -j1 for the
# sub-make invocations.
ifneq ($(filter archives,$(MAKECMDGOALS)),)
.NOTPARALLEL:
endif
J?=1
$(ARCHIVE_DIR)%.export: board = $(notdir $(basename $@))
$(ARCHIVE_DIR)%.export: configuration = nsh
$(NUTTX_ARCHIVES): $(ARCHIVE_DIR)%.export: $(NUTTX_SRC)
@$(ECHO) %% Configuring NuttX for $(board)
$(Q) (cd $(NUTTX_SRC) && $(RMDIR) nuttx-export)
$(Q) $(MAKE) -r -j$(J) -C $(NUTTX_SRC) -r $(MQUIET) distclean
$(Q) (cd $(NUTTX_SRC)/configs && $(COPYDIR) $(PX4_BASE)nuttx-configs/$(board) .)
$(Q) (cd $(NUTTX_SRC)tools && ./configure.sh $(board)/$(configuration))
@$(ECHO) %% Exporting NuttX for $(board)
$(Q) $(MAKE) -r -j$(J) -C $(NUTTX_SRC) -r $(MQUIET) CONFIG_ARCH_BOARD=$(board) export
$(Q) $(MKDIR) -p $(dir $@)
$(Q) $(COPY) $(NUTTX_SRC)nuttx-export.zip $@
$(Q) (cd $(NUTTX_SRC)/configs && $(RMDIR) $(board))
#
# The user can run the NuttX 'menuconfig' tool for a single board configuration with
# make BOARDS=<boardname> menuconfig
#
ifeq ($(MAKECMDGOALS),menuconfig)
ifneq ($(words $(BOARDS)),1)
$(error BOARDS must specify exactly one board for the menuconfig goal)
endif
BOARD = $(BOARDS)
menuconfig: $(NUTTX_SRC)
@$(ECHO) %% Configuring NuttX for $(BOARD)
$(Q) (cd $(NUTTX_SRC) && $(RMDIR) nuttx-export)
$(Q) $(MAKE) -r -j$(J) -C $(NUTTX_SRC) -r $(MQUIET) distclean
$(Q) (cd $(NUTTX_SRC)/configs && $(COPYDIR) $(PX4_BASE)nuttx-configs/$(BOARD) .)
$(Q) (cd $(NUTTX_SRC)tools && ./configure.sh $(BOARD)/nsh)
@$(ECHO) %% Running menuconfig for $(BOARD)
$(Q) $(MAKE) -r -j$(J) -C $(NUTTX_SRC) -r $(MQUIET) menuconfig
@$(ECHO) %% Saving configuration file
$(Q)$(COPY) $(NUTTX_SRC).config $(PX4_BASE)nuttx-configs/$(BOARD)/nsh/defconfig
else
menuconfig:
@$(ECHO) ""
@$(ECHO) "The menuconfig goal must be invoked without any other goal being specified"
@$(ECHO) ""
endif
$(NUTTX_SRC): checkgitversion checksubmodules
$(UAVCAN_DIR):
$(Q) (./Tools/check_submodules.sh)
ifeq ($(PX4_TARGET_OS),nuttx)
# TODO
# Move the above nuttx specific rules into $(PX4_BASE)makefiles/firmware_nuttx.mk
include $(PX4_BASE)makefiles/nuttx/firmware_nuttx.mk
endif
ifeq ($(PX4_TARGET_OS),posix)
include $(PX4_BASE)makefiles/firmware_posix.mk
include $(PX4_BASE)makefiles/posix/firmware_posix.mk
endif
ifeq ($(PX4_TARGET_OS),posix-arm)
include $(PX4_BASE)makefiles/firmware_posix.mk
include $(PX4_BASE)makefiles/posix/firmware_posix.mk
endif
ifeq ($(PX4_TARGET_OS),qurt)
include $(PX4_BASE)makefiles/firmware_qurt.mk
include $(PX4_BASE)makefiles/qurt/firmware_qurt.mk
endif
#
@@ -254,6 +140,14 @@ checkgitversion: $(GIT_VER_FILE)
$(ECHO) "#define PX4_GIT_VERSION_BINARY 0x$(GIT_DESC_SHORT)" >> $(GIT_HEADER_FILE); \
$(ECHO) $(GIT_DESC) > $(GIT_VER_FILE); \
fi
#
# Sizes
#
.PHONY: size
size:
$(Q) for elfs in Build/*; do if [ -f $$elfs/firmware.elf ]; then $(SIZE) $$elfs/firmware.elf; fi done
#
# Submodule Checks
@@ -272,9 +166,10 @@ MSG_DIR = $(PX4_BASE)msg
UORB_TEMPLATE_DIR = $(PX4_BASE)msg/templates/uorb
MULTIPLATFORM_TEMPLATE_DIR = $(PX4_BASE)msg/templates/px4/uorb
TOPICS_DIR = $(PX4_BASE)src/modules/uORB/topics
MULTIPLATFORM_HEADER_DIR = $(PX4_BASE)src/platforms/nuttx/px4_messages
MULTIPLATFORM_HEADER_DIR = $(PX4_BASE)src/platforms/$(PX4_TARGET_OS)/px4_messages
MULTIPLATFORM_PREFIX = px4_
TOPICHEADER_TEMP_DIR = $(BUILD_DIR)topics_temporary
MULTI_TOPICHEADER_TEMP_DIR = $(BUILD_DIR)multi_topics_temporary
GENMSG_PYTHONPATH = $(PX4_BASE)Tools/genmsg/src
GENCPP_PYTHONPATH = $(PX4_BASE)Tools/gencpp/src
@@ -287,9 +182,7 @@ generateuorbtopicheaders: checksubmodules
@$(ECHO) "Generating multiplatform uORB topic wrapper headers"
$(Q) (PYTHONPATH=$(GENMSG_PYTHONPATH):$(GENCPP_PYTHONPATH):$(PYTHONPATH) $(PYTHON) \
$(PX4_BASE)Tools/px_generate_uorb_topic_headers.py \
-d $(MSG_DIR) -o $(MULTIPLATFORM_HEADER_DIR) -e $(MULTIPLATFORM_TEMPLATE_DIR) -t $(TOPICHEADER_TEMP_DIR) -p $(MULTIPLATFORM_PREFIX))
# clean up temporary files
$(Q) (rm -r $(TOPICHEADER_TEMP_DIR))
-d $(MSG_DIR) -o $(MULTIPLATFORM_HEADER_DIR) -e $(MULTIPLATFORM_TEMPLATE_DIR) -t $(MULTI_TOPICHEADER_TEMP_DIR) -p $(MULTIPLATFORM_PREFIX))
#
# Testing targets
@@ -298,6 +191,23 @@ testbuild:
$(Q) (cd $(PX4_BASE) && $(MAKE) distclean && $(MAKE) archives && $(MAKE) -j8)
$(Q) (zip -r Firmware.zip $(PX4_BASE)/Images)
nuttx posix posix-arm qurt:
ifeq ($(GOALS),)
$(MAKE) PX4_TARGET_OS=$@ $(GOALS)
else
export PX4_TARGET_OS=$@
endif
sitl_quad:
$(Q) Tools/sitl_run.sh posix-configs/SITL/init/rcS
sitl_quad_gazebo:
$(Q) Tools/sitl_run.sh posix-configs/SITL/init/rc_iris_ros
sitl_plane:
$(Q) Tools/sitl_run.sh posix-configs/SITL/init/rc.fixed_wing
qurtrun:
$(MAKE) PX4_TARGET_OS=qurt sim
#
# Unittest targets. Builds and runs the host-level
# unit tests.
@@ -320,6 +230,8 @@ clean:
$(Q) $(RMDIR) $(BUILD_DIR)*.build
$(Q) $(RMDIR) $(PX4_VERSIONING_DIR)
$(Q) $(REMOVE) $(IMAGE_DIR)*.px4
$(Q) $(RMDIR) $(TOPICHEADER_TEMP_DIR)
$(Q) $(RMDIR) $(MULTI_TOPICHEADER_TEMP_DIR)
.PHONY: distclean
distclean: clean
@@ -340,9 +252,11 @@ help:
@$(ECHO) " Available targets:"
@$(ECHO) " ------------------"
@$(ECHO) ""
ifeq ($(PX4_TARGET_OS),nuttx)
@$(ECHO) " archives"
@$(ECHO) " Build the NuttX RTOS archives that are used by the firmware build."
@$(ECHO) ""
endif
@$(ECHO) " all"
@$(ECHO) " Build all firmware configs: $(CONFIGS)"
@$(ECHO) " A limited set of configs can be built with CONFIGS=<list-of-configs>"
@@ -355,6 +269,7 @@ help:
@$(ECHO) " clean"
@$(ECHO) " Remove all firmware build pieces."
@$(ECHO) ""
ifeq ($(PX4_TARGET_OS),nuttx)
@$(ECHO) " distclean"
@$(ECHO) " Remove all compilation products, including NuttX RTOS archives."
@$(ECHO) ""
@@ -363,6 +278,7 @@ help:
@$(ECHO) " firmware to the board when the build is complete. Not supported for"
@$(ECHO) " all configurations."
@$(ECHO) ""
endif
@$(ECHO) " testbuild"
@$(ECHO) " Perform a complete clean build of the entire tree."
@$(ECHO) ""
@@ -373,3 +289,12 @@ help:
@$(ECHO) " If V is set, more verbose output is printed during the build. This can"
@$(ECHO) " help when diagnosing issues with the build or toolchain."
@$(ECHO) ""
ifeq ($(PX4_TARGET_OS),nuttx)
@$(ECHO) " To see help for a specifix target use 'make <target> help' where target is"
@$(ECHO) " one of: "
@$(ECHO) " nuttx"
@$(ECHO) " posix"
@$(ECHO) " qurt"
@$(ECHO) ""
endif
+1 -1
Submodule NuttX updated: 678eea3d2c...8004677d8c
+8 -2
View File
@@ -4,16 +4,18 @@
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/PX4/Firmware?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
This repository contains the PX4 Flight Core, with the main applications located in the src/modules directory. It also contains the PX4 Drone Platform, which contains drivers and middleware to run drones.
This repository contains the PX4 Flight Core, with the main applications located in the src/modules directory. It also contains the PX4 Drone Platform, which contains drivers and middleware to run drones.
* Official Website: http://px4.io
* License: BSD 3-clause (see LICENSE.md)
* License: BSD 3-clause (see [LICENSE.md](https://github.com/PX4/Firmware/blob/master/LICENSE.md))
* Supported airframes (more experimental are supported):
* [Multicopters](http://px4.io/platforms/multicopters/start)
* [Fixed wing](http://px4.io/platforms/planes/start)
* [VTOL](http://px4.io/platforms/vtol/start)
* Binaries (always up-to-date from master):
* [Downloads](http://px4.io/firmware/downloads)
* Releases
* [Downloads](https://github.com/PX4/Firmware/releases)
* Mailing list: [Google Groups](http://groups.google.com/group/px4users)
### Users ###
@@ -26,6 +28,9 @@ Contributing guide:
* [CONTRIBUTING.md](https://github.com/PX4/Firmware/blob/master/CONTRIBUTING.md)
* [PX4 Contribution Guide](http://px4.io/dev/contributing)
Software in the Loop guide:
Use software in the loop [to get started with the codebase](https://github.com/PX4/Firmware/tree/master/posix-configs/SITL)
Developer guide:
http://px4.io/dev/
@@ -36,6 +41,7 @@ This repository contains code supporting these boards:
* FMUv1.x
* FMUv2.x
* AeroCore (v1 and v2)
* STM32F4Discovery (basic support) [Tutorial](https://pixhawk.org/modules/stm32f4discovery)
## NuttShell (NSH) ##
@@ -1,7 +1,15 @@
#!nsh
#
# HILStar
# <lorenz@px4.io>
# @name HILStar (XPlane)
#
# @type Simulation
#
# @output MAIN1 aileron
# @output MAIN2 elevator
# @output MAIN3 rudder
# @output MAIN4 throttle
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
sh /etc/init.d/rc.fw_defaults
@@ -31,5 +39,8 @@ then
param set FW_RR_P 0.3
fi
# Enable gamepad / joystick support
param set COM_RC_IN_MODE 2
set HIL yes
set MIXER AERT
@@ -1,8 +1,10 @@
#!nsh
#
# Team Blacksheep Discovery Quadcopter
# @name Team Blacksheep Discovery
#
# Anton Babushkin <anton@px4.io>, Simon Wilks <simon@px4.io>
# @type Quadrotor Wide
#
# @maintainer Anton Babushkin <anton@px4.io>, Simon Wilks <simon@px4.io>
#
sh /etc/init.d/rc.mc_defaults
@@ -10,12 +12,12 @@ sh /etc/init.d/rc.mc_defaults
if [ $AUTOCNF == yes ]
then
# TODO review MC_YAWRATE_I
param set MC_ROLL_P 8.0
param set MC_ROLLRATE_P 0.07
param set MC_ROLL_P 6.5
param set MC_ROLLRATE_P 0.1
param set MC_ROLLRATE_I 0.05
param set MC_ROLLRATE_D 0.0017
param set MC_PITCH_P 8.0
param set MC_PITCHRATE_P 0.1
param set MC_PITCH_P 6.5
param set MC_PITCHRATE_P 0.14
param set MC_PITCHRATE_I 0.1
param set MC_PITCHRATE_D 0.0025
param set MC_YAW_P 2.8
+4 -2
View File
@@ -1,8 +1,10 @@
#!nsh
#
# 3DR Iris Quadcopter
# @name 3DR Iris Quadrotor
#
# Anton Babushkin <anton@px4.io>
# @type Quadrotor Wide
#
# @maintainer Anton Babushkin <anton@px4.io>
#
sh /etc/init.d/rc.mc_defaults
@@ -1,8 +1,10 @@
#!nsh
#
# Steadidrone QU4D
# @name Steadidrone QU4D
#
# Thomas Gubler <thomas@px4.io>
# @type Quadrotor Wide
#
# @maintainer Thomas Gubler <thomas@px4.io>
#
sh /etc/init.d/rc.mc_defaults
@@ -1,10 +1,10 @@
#!nsh
#
# Team Blacksheep Discovery Long Range Quadcopter
#
# Setup: 15 x 5" Props, 6S 4000mAh TBS LiPo, TBS 30A ESCs, TBS 400kV Motors
# @name Team Blacksheep Discovery Endurance
#
# Simon Wilks <simon@px4.io>
# @type Quadrotor Wide
#
# @maintainer Simon Wilks <simon@px4.io>
#
sh /etc/init.d/rc.mc_defaults
@@ -1,8 +1,10 @@
#!nsh
#
# HobbyKing SK450 DeadCat modification
# @name HobbyKing SK450 DeadCat modification
#
# Anton Matosov <anton.matosov@gmail.com>
# @type Quadrotor Wide
#
# @maintainer Anton Matosov <anton.matosov@gmail.com>
#
sh /etc/init.d/rc.mc_defaults
@@ -1,12 +1,17 @@
#!nsh
#
# HIL Quadcopter X
# @name HIL Quadcopter X
#
# Anton Babushkin <anton@px4.io>
# @type Simulation
#
# @maintainer Anton Babushkin <anton@px4.io>
#
sh /etc/init.d/rc.mc_defaults
set MIXER quad_x
# Enable gamepad / joystick support
param set COM_RC_IN_MODE 2
set HIL yes
+30
View File
@@ -0,0 +1,30 @@
#!nsh
#
# @name 3DR DIY Quad
#
# @type Quadrotor x
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
sh /etc/init.d/rc.mc_defaults
if [ $AUTOCNF == yes ]
then
param set MC_ROLL_P 6.5
param set MC_ROLLRATE_P 0.08
param set MC_ROLLRATE_I 0.1
param set MC_ROLLRATE_D 0.004
param set MC_PITCH_P 6.0
param set MC_PITCHRATE_P 0.16
param set MC_PITCHRATE_I 0.09
param set MC_PITCHRATE_D 0.004
param set MC_YAW_P 4
fi
set MIXER quad_x
set PWM_OUT 1234
set PWM_MIN 1100
set PWM_MAX 1950
@@ -1,12 +1,17 @@
#!nsh
#
# HIL Quadcopter +
# @name HIL Quadcopter +
#
# Anton Babushkin <anton@px4.io>
# @type Simulation
#
# @maintainer Anton Babushkin <anton@px4.io>
#
sh /etc/init.d/rc.mc_defaults
set MIXER quad_+
# Enable gamepad / joystick support
param set COM_RC_IN_MODE 2
set HIL yes
@@ -1,12 +1,17 @@
#!nsh
#
# HIL Rascal 110 (Flightgear)
# @name HIL Rascal 110 (Flightgear)
#
# Thomas Gubler <thomas@px4.io>
# @type Simulation
#
# @maintainer Thomas Gubler <thomas@px4.io>
#
sh /etc/init.d/rc.fw_defaults
set HIL yes
# Enable gamepad / joystick support
param set COM_RC_IN_MODE 2
set MIXER AERT
@@ -1,8 +1,10 @@
#!nsh
#
# HIL Malolo 1 (Flightgear)
# @name HIL Malolo 1 (Flightgear)
#
# Thomas Gubler <thomas@px4.io>
# @type Simulation
#
# @maintainer Thomas Gubler <thomas@px4.io>
#
sh /etc/init.d/rc.fw_defaults
@@ -34,5 +36,8 @@ fi
set HIL yes
# Enable gamepad / joystick support
param set COM_RC_IN_MODE 2
# Set the AERT mixer for HIL (even if the malolo is a flying wing)
set MIXER AERT
+4 -2
View File
@@ -1,8 +1,10 @@
#!nsh
#
# Generic 10" Hexa coaxial geometry
# @name Generic Hexa coaxial geometry
#
# Lorenz Meier <lorenz@px4.io>
# @type Hexarotor Coaxial
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
sh /etc/init.d/rc.mc_defaults
+4 -2
View File
@@ -1,8 +1,10 @@
#!nsh
#
# Generic 10" Octo coaxial geometry
# @name Generic 10" Octo coaxial geometry
#
# Lorenz Meier <lorenz@px4.io>
# @type Octorotor Coaxial
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
sh /etc/init.d/rc.mc_defaults
@@ -1,7 +1,10 @@
#!nsh
#
# Generic configuration file for caipirinha VTOL version
# @name Duorotor Tailsitter
#
# Roman Bapst <bapstr@gmail.com>
# @type VTOL Tailsitter
#
# @maintainer Roman Bapst <roman@px4.io>
#
sh /etc/init.d/rc.vtol_defaults
+13 -7
View File
@@ -1,8 +1,10 @@
#!nsh
#
# Generic configuration file for BirdsEyeView Aerobotics FireFly6
# @name BirdsEyeView Aerobotics FireFly6
#
# Roman Bapst <bapstroman@gmail.com>
# @type VTOL Tiltrotor
#
# @maintainer Roman Bapst <roman@px4.io>
#
sh /etc/init.d/rc.vtol_defaults
@@ -10,21 +12,25 @@ sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
then
param set MC_ROLL_P 7.0
param set MC_ROLLRATE_P 0.15
param set MC_ROLLRATE_P 0.17
param set MC_ROLLRATE_I 0.002
param set MC_ROLLRATE_D 0.003
param set MC_ROLLRATE_D 0.004
param set MC_ROLLRATE_FF 0.0
param set MC_PITCH_P 7.0
param set MC_PITCHRATE_P 0.12
param set MC_PITCHRATE_P 0.14
param set MC_PITCHRATE_I 0.002
param set MC_PITCHRATE_D 0.003
param set MC_PITCHRATE_D 0.004
param set MC_PITCHRATE_FF 0.0
param set MC_YAW_P 2.8
param set MC_YAW_P 3.8
param set MC_YAW_FF 0.5
param set MC_YAWRATE_P 0.22
param set MC_YAWRATE_I 0.02
param set MC_YAWRATE_D 0.0
param set MC_YAWRATE_FF 0.0
param set VT_TILT_MC 0.08
param set VT_TILT_TRANS 0.5
param set VT_TILT_FW 0.9
fi
set MIXER firefly6
@@ -1,7 +1,10 @@
#!nsh
#
# Generic configuration file for a tailsitter with motors in X configuration.
# @name Quadrotor X Tailsitter
#
# Roman Bapst <bapstroman@gmail.com>
# @type VTOL Tailsitter
#
# @maintainer Roman Bapst <roman@px4.io>
#
sh /etc/init.d/rc.vtol_defaults
@@ -0,0 +1,21 @@
#!nsh
#
# @name Quadrotor + Tailsitter
#
# @type VTOL Tailsitter
#
# @maintainer Roman Bapst <roman@px4.io>
#
sh /etc/init.d/rc.vtol_defaults
set MIXER quad_+_vtol
set PWM_OUT 1234
set PWM_MAX 2000
set PWM_RATE 400
set MAV_TYPE 20
param set VT_MOT_COUNT 4
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 0
param set VT_ELEV_MC_LOCK 1
@@ -0,0 +1,50 @@
#!nsh
#
# @name Generic AAERT tailplane airframe with Quad VTOL.
#
# @type Standard VTOL
#
# @maintainer Simon Wilks <simon@uaventure.com>
#
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
then
param set VT_TYPE 2
param set VT_MOT_COUNT 4
param set VT_TRANS_THR 0.75
param set MC_ROLL_P 7.0
param set MC_ROLLRATE_P 0.15
param set MC_ROLLRATE_I 0.002
param set MC_ROLLRATE_D 0.003
param set MC_ROLLRATE_FF 0.0
param set MC_PITCH_P 7.0
param set MC_PITCHRATE_P 0.12
param set MC_PITCHRATE_I 0.002
param set MC_PITCHRATE_D 0.003
param set MC_PITCHRATE_FF 0.0
param set MC_YAW_P 2.8
param set MC_YAW_FF 0.5
param set MC_YAWRATE_P 0.22
param set MC_YAWRATE_I 0.02
param set MC_YAWRATE_D 0.0
param set MC_YAWRATE_FF 0.0
fi
set MIXER vtol_quad_x
set PWM_OUT 12345678
set MIXER_AUX vtol_AAERT
set PWM_AUX_RATE 50
set PWM_AUX_OUT 1234
set PWM_AUX_DISARMED 1000
set PWM_AUX_MIN 1000
set PWM_AUX_MAX 2000
set MAV_TYPE 22
param set VT_MOT_COUNT 4
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 2
+4 -3
View File
@@ -1,9 +1,10 @@
#!nsh
#
# Generic Tricopter Y Geometry
# Yaw Servo +Output ==> +Yaw Vehicle Rotation
# @name Generic Tricopter Y+ Geometry
#
# Trent Lukaczyk <aerialhedgehog@gmail.com>
# @type Tricopter Y+
#
# @maintainer Trent Lukaczyk <aerialhedgehog@gmail.com>
#
sh /etc/init.d/rc.mc_defaults
+4 -3
View File
@@ -1,9 +1,10 @@
#!nsh
#
# Generic Tricopter Y Geometry
# Yaw Servo +Output ==> -Yaw Vehicle Rotation
# @name Generic Tricopter Y- Geometry
#
# Trent Lukaczyk <aerialhedgehog@gmail.com>
# @type Tricopter Y-
#
# @maintainer Trent Lukaczyk <aerialhedgehog@gmail.com>
#
sh /etc/init.d/rc.mc_defaults
+5 -1
View File
@@ -1,6 +1,10 @@
#!nsh
#
# MPX EasyStar Plane
# @name Multiplex Easystar
#
# @type Standard Plane
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
sh /etc/init.d/rc.fw_defaults
+22
View File
@@ -0,0 +1,22 @@
#!nsh
#
# @name Standard AERT Plane
#
# @type Standard Plane
#
# @output MAIN1 aileron
# @output MAIN2 elevator
# @output MAIN4 rudder
# @output MAIN3 throttle
# @output MAIN5 flaps
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
sh /etc/init.d/rc.fw_defaults
set MIXER AERT
@@ -1,5 +0,0 @@
#!nsh
sh /etc/init.d/rc.fw_defaults
set MIXER AERT
@@ -1,4 +1,21 @@
#!nsh
#
# @name Skywalker (3DR Aero)
#
# @type Standard Plane
#
# @output MAIN1 aileron
# @output MAIN2 elevator
# @output MAIN4 rudder
# @output MAIN3 throttle
# @output MAIN5 flaps
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
sh /etc/init.d/rc.fw_defaults
@@ -1,4 +1,19 @@
#!nsh
#
# @name Skyhunter 1800
#
# @type Standard Plane
#
# @output MAIN1 aileron
# @output MAIN2 elevator
# @output MAIN4 throttle
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
sh /etc/init.d/rc.fw_defaults
+22
View File
@@ -0,0 +1,22 @@
#!nsh
#
# @name Standard AETR Plane
#
# @type Standard Plane
#
# @output MAIN1 aileron
# @output MAIN2 elevator
# @output MAIN3 throttle
# @output MAIN4 rudder
# @output MAIN5 flaps
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
sh /etc/init.d/rc.fw_defaults
set MIXER AETR
+17 -2
View File
@@ -1,4 +1,21 @@
#!nsh
#
# @name IO Camflyer
#
# @url https://pixhawk.org/platforms/planes/bormatec_camflyer_q
#
# @type Flying Wing
#
# @output MAIN1 left aileron
# @output MAIN2 right aileron
# @output MAIN4 throttle
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer Simon Wilks <simon@px4.io>
#
sh /etc/init.d/rc.fw_defaults
@@ -17,11 +34,9 @@ then
param set FW_LND_TLALT 5
param set FW_THR_LND_MAX 0
param set FW_PR_FF 0.35
param set FW_PR_I 0.005
param set FW_PR_IMAX 0.4
param set FW_PR_P 0.08
param set FW_RR_FF 0.6
param set FW_RR_I 0.005
param set FW_RR_IMAX 0.2
param set FW_RR_P 0.04
fi
+14 -4
View File
@@ -1,8 +1,20 @@
#!nsh
#
# Phantom FPV Flying Wing
# @name Phantom FPV Flying Wing
#
# Simon Wilks <simon@px4.io>
# @url https://pixhawk.org/platforms/planes/z-84_wing_wing
#
# @type Flying Wing
#
# @output MAIN1 left aileron
# @output MAIN2 right aileron
# @output MAIN4 throttle
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer Simon Wilks <simon@px4.io>
#
sh /etc/init.d/rc.fw_defaults
@@ -16,14 +28,12 @@ then
param set FW_L1_DAMPING 0.75
param set FW_L1_PERIOD 15
param set FW_PR_FF 0.2
param set FW_PR_I 0.005
param set FW_PR_IMAX 0.2
param set FW_PR_P 0.03
param set FW_P_LIM_MAX 50
param set FW_P_LIM_MIN -50
param set FW_P_ROLLFF 1
param set FW_RR_FF 0.5
param set FW_RR_I 0.02
param set FW_RR_IMAX 0.2
param set FW_RR_P 0.08
param set FW_R_LIM 50
+24 -14
View File
@@ -1,8 +1,20 @@
#!nsh
#
# Skywalker X5 Flying Wing
# @name Skywalker X5 Flying Wing
#
# Thomas Gubler <thomas@px4.io>, Julian Oes <julian@px4.io>
# @url https://pixhawk.org/platforms/planes/skywalker_x5
#
# @type Flying Wing
#
# @output MAIN1 left aileron
# @output MAIN2 right aileron
# @output MAIN4 throttle
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer Thomas Gubler <thomas@px4.io>, Julian Oes <julian@px4.io>
#
sh /etc/init.d/rc.fw_defaults
@@ -14,18 +26,16 @@ then
param set FW_AIRSPD_MAX 40
param set FW_ATT_TC 0.3
param set FW_L1_DAMPING 0.74
param set FW_L1_PERIOD 15
param set FW_PR_FF 0.3
param set FW_PR_I 0
param set FW_PR_IMAX 0.2
param set FW_PR_P 0.03
param set FW_P_ROLLFF 1
param set FW_RR_FF 0.3
param set FW_RR_I 0
param set FW_RR_IMAX 0.2
param set FW_RR_P 0.03
param set FW_R_LIM 60
param set FW_R_RMAX 0
param set FW_L1_PERIOD 16
param set FW_LND_ANG 15
param set FW_LND_FLALT 5
param set FW_LND_HHDIST 15
param set FW_LND_HVIRT 13
param set FW_LND_TLALT 5
param set FW_THR_LND_MAX 0
param set FW_PR_FF 0.35
param set FW_RR_FF 0.6
param set FW_RR_P 0.04
fi
set MIXER X5
+14 -7
View File
@@ -1,8 +1,20 @@
#!nsh
#
# Wing Wing (aka Z-84) Flying Wing
# @name Wing Wing (aka Z-84) Flying Wing
#
# Simon Wilks <simon@px4.io>
# @url https://pixhawk.org/platforms/planes/z-84_wing_wing
#
# @type Flying Wing
#
# @output MAIN1 left aileron
# @output MAIN2 right aileron
# @output MAIN4 throttle
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer Simon Wilks <simon@px4.io>
#
sh /etc/init.d/rc.fw_defaults
@@ -23,12 +35,7 @@ then
param set FW_LND_TLALT 5
param set FW_THR_LND_MAX 0
param set FW_PR_FF 0.35
param set FW_PR_I 0.005
param set FW_PR_IMAX 0.4
param set FW_PR_P 0.08
param set FW_RR_FF 0.6
param set FW_RR_I 0.005
param set FW_RR_IMAX 0.2
param set FW_RR_P 0.04
fi
+4 -2
View File
@@ -1,8 +1,10 @@
#!nsh
#
# FX-79 Buffalo Flying Wing
# @name FX-79 Buffalo Flying Wing
#
# Simon Wilks <simon@px4.io>
# @type Flying Wing
#
# @maintainer Simon Wilks <simon@px4.io>
#
sh /etc/init.d/rc.fw_defaults
+5 -2
View File
@@ -1,8 +1,11 @@
#
#!nsh
#
# Viper
# @name Viper
#
# Simon Wilks <simon@px4.io>
# @type Flying Wing
#
# @maintainer Simon Wilks <simon@px4.io>
#
sh /etc/init.d/rc.fw_defaults
@@ -1,8 +1,10 @@
#!nsh
#
# TBS Caipirinha
# @name TBS Caipirinha
#
# Lorenz Meier <lorenz@px4.io>
# @type Flying Wing
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
sh /etc/init.d/rc.fw_defaults
@@ -22,16 +24,17 @@ then
param set FW_LND_TLALT 5
param set FW_THR_LND_MAX 0
param set FW_PR_FF 0.35
param set FW_PR_I 0.01
param set FW_PR_IMAX 0.4
param set FW_PR_P 0.08
param set FW_RR_FF 0.6
param set FW_RR_I 0.01
param set FW_RR_IMAX 0.2
param set FW_RR_P 0.04
param set SYS_COMPANION 157600
param set PWM_MAIN_REV0 1
param set PWM_MAIN_REV1 1
param set PWM_DISARMED 0
param set PWM_MIN 900
param set PWM_MAX 2100
fi
set PWM_DISARMED p:PWM_DISARMED
+8 -2
View File
@@ -1,8 +1,14 @@
#!nsh
#
# Generic 10" Quad X geometry
# @name Generic Quadrotor X config
#
# Lorenz Meier <lorenz@px4.io>
# @type Quadrotor x
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
sh /etc/init.d/rc.mc_defaults
+5 -1
View File
@@ -1,6 +1,10 @@
#!nsh
#
# ARDrone
# @name AR.Drone Frame
#
# @type Quadrotor x
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
sh /etc/init.d/rc.mc_defaults
+15 -4
View File
@@ -1,8 +1,14 @@
#!nsh
#
# DJI Flame Wheel F330
# @name DJI Flame Wheel F330
#
# Anton Babushkin <anton@px4.io>
# @type Quadrotor x
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
sh /etc/init.d/4001_quad_x
@@ -21,7 +27,12 @@ then
param set MC_YAWRATE_P 0.2
param set MC_YAWRATE_I 0.1
param set MC_YAWRATE_D 0.0
# DJI ESCs do not support calibration and need a higher min
param set PWM_MIN 1230
fi
set PWM_MIN 1200
set PWM_MAX 1950
# Transitional support: ensure suitable PWM min/max param values
if param compare PWM_MIN 1075
then
param set PWM_MIN 1230
fi
+15 -4
View File
@@ -1,8 +1,14 @@
#!nsh
#
# DJI Flame Wheel F450
# @name DJI Flame Wheel F450
#
# Lorenz Meier <lorenz@px4.io>
# @type Quadrotor x
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer Lorenz Meier <lorenz@px4.io>
#
sh /etc/init.d/4001_quad_x
@@ -22,7 +28,12 @@ then
param set MC_YAWRATE_P 0.3
param set MC_YAWRATE_I 0.1
param set MC_YAWRATE_D 0.0
# DJI ESCs do not support calibration and need a higher min
param set PWM_MIN 1230
fi
set PWM_MIN 1230
set PWM_MAX 1950
# Transitional support: ensure suitable PWM min/max param values
if param compare PWM_MIN 1075
then
param set PWM_MIN 1230
fi
+4 -2
View File
@@ -1,8 +1,10 @@
#!nsh
#
# F450-sized quadrotor with CAN
# @name F450-sized quadrotor with CAN
#
# Pavel Kirienko <pavel@px4.io>
# @type Quadrotor x
#
# @maintainer Pavel Kirienko <pavel@px4.io>
#
sh /etc/init.d/4001_quad_x
+4 -4
View File
@@ -1,11 +1,11 @@
#!nsh
#
# Hobbyking Micro Integrated PCB Quadcopter
# with SimonK ESC firmware and Mystery A1510 motors
# @name Hobbyking Micro PCB
#
# Thomas Gubler <thomas@px4.io>
# @type Quadrotor x
#
# @maintainer Thomas Gubler <thomas@px4.io>
#
echo "HK Micro PCB Quad"
sh /etc/init.d/4001_quad_x
@@ -1,9 +1,10 @@
#!nsh
#
# loading default values for the axialracing ax10
# @name Axial Racing AX10
#
# @type Rover
#
#load some defaults e.g. PWM values
sh /etc/init.d/rc.axialracing_ax10_defaults
#choose a mixer, for rover control we need a plain passthrough to the servos
+4 -2
View File
@@ -1,8 +1,10 @@
#!nsh
#
# Generic 10" Quad + geometry
# @name Generic 10" Quad + geometry
#
# Anton Babushkin <anton@px4.io>
# @type Quadrotor +
#
# @maintainer Anton Babushkin <anton@px4.io>
#
sh /etc/init.d/rc.mc_defaults
+8 -2
View File
@@ -1,8 +1,14 @@
#!nsh
#
# Generic 10" Hexa X geometry
# @name Generic Hexarotor x geometry
#
# Anton Babushkin <anton@px4.io>
# @type Hexarotor x
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer Anton Babushkin <anton@px4.io>
#
sh /etc/init.d/rc.mc_defaults
+8 -2
View File
@@ -1,8 +1,14 @@
#!nsh
#
# Generic 10" Hexa + geometry
# @name Generic Hexarotor + geometry
#
# Anton Babushkin <anton@px4.io>
# @type Hexarotor +
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer Anton Babushkin <anton@px4.io>
#
sh /etc/init.d/rc.mc_defaults
+8 -2
View File
@@ -1,8 +1,14 @@
#!nsh
#
# Generic 10" Octo X geometry
# @name Generic Octocopter X geometry
#
# Anton Babushkin <anton@px4.io>
# @type Octorotor x
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer Anton Babushkin <anton@px4.io>
#
sh /etc/init.d/rc.mc_defaults
+8 -2
View File
@@ -1,8 +1,14 @@
#!nsh
#
# Generic 10" Octo + geometry
# @name Generic Octocopter + geometry
#
# Anton Babushkin <anton@px4.io>
# @type Octorotor +
#
# @output AUX1 feed-through of RC AUX1 channel
# @output AUX2 feed-through of RC AUX2 channel
# @output AUX3 feed-through of RC AUX3 channel
#
# @maintainer Anton Babushkin <anton@px4.io>
#
sh /etc/init.d/rc.mc_defaults
-304
View File
@@ -1,304 +0,0 @@
#
# SYS_AUTOSTART = 0 means no autostart (default)
#
# AUTOSTART PARTITION:
# 0 .. 999 Reserved (historical)
# 1000 .. 1999 Simulation setups
# 2000 .. 2999 Standard planes
# 3000 .. 3999 Flying wing
# 4000 .. 4999 Quad X
# 5000 .. 5999 Quad +
# 6000 .. 6999 Hexa X
# 7000 .. 7999 Hexa +
# 8000 .. 8999 Octo X
# 9000 .. 9999 Octo +
# 10000 .. 10999 Wide arm / H frame
# 11000 .. 11999 Hexa Cox
# 12000 .. 12999 Octo Cox
# 13000 .. 13999 VTOL
# 14000 .. 14999 Tri Y
#
# Simulation
#
if param compare SYS_AUTOSTART 901
then
sh /etc/init.d/901_bottle_drop_test.hil
set MODE custom
fi
if param compare SYS_AUTOSTART 1000
then
sh /etc/init.d/1000_rc_fw_easystar.hil
fi
if param compare SYS_AUTOSTART 1001
then
sh /etc/init.d/1001_rc_quad_x.hil
fi
if param compare SYS_AUTOSTART 1003
then
sh /etc/init.d/1003_rc_quad_+.hil
fi
if param compare SYS_AUTOSTART 1004
then
sh /etc/init.d/1004_rc_fw_Rascal110.hil
fi
if param compare SYS_AUTOSTART 1005
then
sh /etc/init.d/1005_rc_fw_Malolo1.hil
fi
#
# Plane
#
if param compare SYS_AUTOSTART 2100 100
then
sh /etc/init.d/2100_mpx_easystar
set MODE custom
fi
if param compare SYS_AUTOSTART 2101 101
then
sh /etc/init.d/2101_hk_bixler
set MODE custom
fi
if param compare SYS_AUTOSTART 2102 102
then
sh /etc/init.d/2102_3dr_skywalker
set MODE custom
fi
if param compare SYS_AUTOSTART 2103 103
then
sh /etc/init.d/2103_skyhunter_1800
set MODE custom
fi
#
# Flying wing
#
if param compare SYS_AUTOSTART 3030 30
then
sh /etc/init.d/3030_io_camflyer
fi
if param compare SYS_AUTOSTART 3031 31
then
sh /etc/init.d/3031_phantom
fi
if param compare SYS_AUTOSTART 3032 32
then
sh /etc/init.d/3032_skywalker_x5
fi
if param compare SYS_AUTOSTART 3033 33
then
sh /etc/init.d/3033_wingwing
fi
if param compare SYS_AUTOSTART 3034 34
then
sh /etc/init.d/3034_fx79
fi
if param compare SYS_AUTOSTART 3035 35
then
sh /etc/init.d/3035_viper
fi
if param compare SYS_AUTOSTART 3100
then
sh /etc/init.d/3100_tbs_caipirinha
fi
#
# Quad X
#
if param compare SYS_AUTOSTART 4001
then
sh /etc/init.d/4001_quad_x
fi
#
# ARDrone
#
if param compare SYS_AUTOSTART 4008 8
then
sh /etc/init.d/4008_ardrone
fi
if param compare SYS_AUTOSTART 4010 10
then
sh /etc/init.d/4010_dji_f330
fi
if param compare SYS_AUTOSTART 4011 11
then
sh /etc/init.d/4011_dji_f450
fi
if param compare SYS_AUTOSTART 4012
then
sh /etc/init.d/4012_quad_x_can
fi
if param compare SYS_AUTOSTART 4020
then
sh /etc/init.d/4020_hk_micro_pcb
fi
#
# Quad +
#
if param compare SYS_AUTOSTART 5001
then
sh /etc/init.d/5001_quad_+
fi
#
# Hexa X
#
if param compare SYS_AUTOSTART 6001
then
sh /etc/init.d/6001_hexa_x
fi
#
# Hexa +
#
if param compare SYS_AUTOSTART 7001
then
sh /etc/init.d/7001_hexa_+
fi
#
# Octo X
#
if param compare SYS_AUTOSTART 8001
then
sh /etc/init.d/8001_octo_x
fi
#
# Octo +
#
if param compare SYS_AUTOSTART 9001
then
sh /etc/init.d/9001_octo_+
fi
#
# Wide arm / H frame
#
if param compare SYS_AUTOSTART 10015 15
then
sh /etc/init.d/10015_tbs_discovery
fi
if param compare SYS_AUTOSTART 10016 16
then
sh /etc/init.d/10016_3dr_iris
fi
if param compare SYS_AUTOSTART 10017
then
sh /etc/init.d/10017_steadidrone_qu4d
fi
if param compare SYS_AUTOSTART 10018 18
then
sh /etc/init.d/10018_tbs_endurance
fi
if param compare SYS_AUTOSTART 10019
then
sh /etc/init.d/10019_sk450_deadcat
fi
#
# Hexa Coaxial
#
if param compare SYS_AUTOSTART 11001
then
sh /etc/init.d/11001_hexa_cox
fi
#
# Octo Coaxial
#
if param compare SYS_AUTOSTART 12001
then
sh /etc/init.d/12001_octo_cox
fi
# 13000 is historically reserved for the quadshot
#
# VTOL Caipririnha (Tailsitter)
#
if param compare SYS_AUTOSTART 13001
then
sh /etc/init.d/13001_caipirinha_vtol
fi
#
# VTOL BirdsEyeView FireFly x6 (Tilt-Rotor)
#
if param compare SYS_AUTOSTART 13002
then
sh /etc/init.d/13002_firefly6
fi
#
# Tailsitter with 4 motors in x config
#
if param compare SYS_AUTOSTART 13003
then
sh /etc/init.d/13003_quad_tailsitter
fi
#
# TriCopter Y Yaw+
#
if param compare SYS_AUTOSTART 14001
then
sh /etc/init.d/14001_tri_y_yaw+
fi
#
# TriCopter Y Yaw-
#
if param compare SYS_AUTOSTART 14002
then
sh /etc/init.d/14002_tri_y_yaw-
fi
#
# Ground Rover AxialRacing AX10
#
if param compare SYS_AUTOSTART 50001
then
sh /etc/init.d/50001_axialracing_ax10
fi
+10 -6
View File
@@ -11,15 +11,19 @@ then
param set NAV_RTL_ALT 100
param set NAV_RTL_LAND_T -1
param set NAV_ACC_RAD 50
param set FW_T_HRATE_P 0.01
param set FW_T_RLL2THR 15
param set FW_T_SRATE_P 0.01
param set FW_T_TIME_CONST 5
param set PE_VELNE_NOISE 0.3
param set PE_VELD_NOISE 0.5
param set PE_VELD_NOISE 0.35
param set PE_POSNE_NOISE 0.5
param set PE_POSD_NOISE 0.5
param set PE_POSD_NOISE 1.0
param set PE_GBIAS_PNOISE 0.000001
param set PE_ABIAS_PNOISE 0.0002
fi
# This is the gimbal pass mixer
set MIXER_AUX pass
set PWM_AUX_RATE 50
set PWM_AUX_OUT 1234
set PWM_AUX_DISARMED 1500
set PWM_AUX_MIN 1000
set PWM_AUX_MAX 2000
+13 -5
View File
@@ -97,7 +97,6 @@ then
fi
fi
# check if should load secondary mixer
if [ $MIXER_AUX != none ]
then
#
@@ -122,16 +121,24 @@ then
then
if fmu mode_pwm
then
if mixer load $OUTPUT_AUX_DEV $MIXER_AUX_FILE
if [ -e $OUTPUT_AUX_DEV ]
then
echo "[i] Mixer: $MIXER_AUX_FILE on $OUTPUT_AUX_DEV"
if mixer load $OUTPUT_AUX_DEV $MIXER_AUX_FILE
then
echo "[i] Mixer: $MIXER_AUX_FILE on $OUTPUT_AUX_DEV"
else
echo "[i] Error loading mixer: $MIXER_AUX_FILE"
echo "ERROR: Could not load mixer: $MIXER_AUX_FILE" >> $LOG_FILE
fi
else
echo "[i] Error loading mixer: $MIXER_AUX_FILE"
echo "ERROR: Could not load mixer: $MIXER_AUX_FILE" >> $LOG_FILE
set PWM_AUX_OUT none
set FAILSAFE_AUX none
fi
else
echo "ERROR: Could not start: fmu mode_pwm" >> $LOG_FILE
tone_alarm $TUNE_ERR
set PWM_AUX_OUT none
set FAILSAFE_AUX none
fi
if [ $PWM_AUX_OUT != none ]
@@ -169,3 +176,4 @@ then
fi
fi
unset OUTPUT_DEV
unset OUTPUT_AUX_DEV
+32 -5
View File
@@ -5,18 +5,45 @@ set VEHICLE_TYPE mc
if [ $AUTOCNF == yes ]
then
param set PE_VELNE_NOISE 0.5
param set PE_VELD_NOISE 0.7
param set PE_VELD_NOISE 0.35
param set PE_POSNE_NOISE 0.5
param set PE_POSD_NOISE 1.0
param set PE_POSD_NOISE 1.25
param set PE_GBIAS_PNOISE 0.000001
param set PE_ABIAS_PNOISE 0.0001
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
fi
# 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
# set environment variables (!= parameters)
set PWM_RATE 400
set PWM_DISARMED 900
set PWM_MIN 1075
set PWM_MAX 2000
# tell the mixer to use parameters for these instead
set PWM_DISARMED p:PWM_DISARMED
set PWM_MIN p:PWM_MIN
set PWM_MAX p:PWM_MAX
# This is the gimbal pass mixer
set MIXER_AUX pass
set PWM_AUX_RATE 50
set PWM_AUX_OUT 1234
set PWM_AUX_DISARMED 1500
set PWM_AUX_MIN 1000
set PWM_AUX_MAX 2000
+1 -5
View File
@@ -111,11 +111,7 @@ else
fi
# Check for flow sensor
if px4flow start
then
fi
if ll40ls start
if px4flow start &
then
fi
+3 -1
View File
@@ -9,11 +9,13 @@ mavlink stream -d /dev/ttyACM0 -s PARAM_VALUE -r 300
mavlink stream -d /dev/ttyACM0 -s MISSION_ITEM -r 50
mavlink stream -d /dev/ttyACM0 -s NAMED_VALUE_FLOAT -r 10
mavlink stream -d /dev/ttyACM0 -s OPTICAL_FLOW_RAD -r 10
mavlink stream -d /dev/ttyACM0 -s DISTANCE_SENSOR -r 10
mavlink stream -d /dev/ttyACM0 -s VFR_HUD -r 20
mavlink stream -d /dev/ttyACM0 -s ATTITUDE -r 100
mavlink stream -d /dev/ttyACM0 -s ACTUATOR_CONTROL_TARGET0 -r 30
mavlink stream -d /dev/ttyACM0 -s RC_CHANNELS_RAW -r 5
mavlink stream -d /dev/ttyACM0 -s RC_CHANNELS -r 5
mavlink stream -d /dev/ttyACM0 -s SERVO_OUTPUT_RAW_0 -r 20
mavlink stream -d /dev/ttyACM0 -s SERVO_OUTPUT_RAW_1 -r 20
mavlink stream -d /dev/ttyACM0 -s POSITION_TARGET_GLOBAL_INT -r 10
mavlink stream -d /dev/ttyACM0 -s LOCAL_POSITION_NED -r 30
mavlink stream -d /dev/ttyACM0 -s MANUAL_CONTROL -r 5
+7 -1
View File
@@ -4,7 +4,7 @@
# att & pos estimator, att & pos control.
#
attitude_estimator_ekf start
attitude_estimator_q start
#ekf_att_pos_estimator start
position_estimator_inav start
@@ -13,3 +13,9 @@ mc_att_control start
mc_pos_control start
fw_att_control start
fw_pos_control_l1 start
#
# Start Land Detector
# Fixed wing for now until we have something for VTOL
#
land_detector start fixedwing
+2 -2
View File
@@ -34,9 +34,9 @@ then
param set FW_RR_P 0.02
param set PE_VELNE_NOISE 0.5
param set PE_VELD_NOISE 0.7
param set PE_VELD_NOISE 0.3
param set PE_POSNE_NOISE 0.5
param set PE_POSD_NOISE 1.0
param set PE_POSD_NOISE 1.25
param set PE_GBIAS_PNOISE 0.000001
param set PE_ABIAS_PNOISE 0.0001
fi
+35 -13
View File
@@ -451,19 +451,30 @@ then
fi
fi
# Start sensors depending on the interface being up
if param compare SENS_EN_LL40LS 1
then
if pwm_input start
then
if ll40ls start pwm
then
fi
fi
fi
if [ $MAVLINK_F == default ]
then
# Normal mode, use baudrate 57600 (default) and data rate 1000 bytes/s
if [ $TTYS1_BUSY == yes ]
then
# Start MAVLink on ttyS0, because FMU ttyS1 pins configured as something else
set MAVLINK_F "-r 1000 -d /dev/ttyS0"
set MAVLINK_F "-r 1200 -d /dev/ttyS0"
# Exit from nsh to free port for mavlink
set EXIT_ON_END yes
else
# Start MAVLink on default port: ttyS1
set MAVLINK_F "-r 1000"
set MAVLINK_F "-r 1200"
fi
fi
@@ -479,11 +490,11 @@ then
# but this works for now
if param compare SYS_COMPANION 921600
then
mavlink start -d /dev/ttyS2 -b 921600 -m onboard -r 20000 -x
mavlink start -d /dev/ttyS2 -b 921600 -m onboard -r 80000 -x
fi
if param compare SYS_COMPANION 57600
then
mavlink start -d /dev/ttyS2 -b 57600 -m onboard -r 1000 -x
mavlink start -d /dev/ttyS2 -b 57600 -m onboard -r 5000 -x
fi
if param compare SYS_COMPANION 157600
then
@@ -564,7 +575,7 @@ then
fi
if [ $MIXER == tri_y_yaw- -o $MIXER == tri_y_yaw+ ]
then
set MAV_TYPE 2
set MAV_TYPE 15
fi
if [ $MIXER == hexa_x -o $MIXER == hexa_+ ]
then
@@ -588,6 +599,7 @@ then
if [ $MAV_TYPE == none ]
then
echo "Unknown MAV_TYPE"
param set MAV_TYPE 2
else
param set MAV_TYPE $MAV_TYPE
fi
@@ -625,12 +637,17 @@ then
then
set MAV_TYPE 21
fi
if [ $MIXER == quad_x_pusher_vtol ]
then
set MAV_TYPE 22
fi
fi
# Still no MAV_TYPE found
if [ $MAV_TYPE == none ]
then
echo "Unknown MAV_TYPE"
param set MAV_TYPE 19
else
param set MAV_TYPE $MAV_TYPE
fi
@@ -661,6 +678,8 @@ then
then
sh /etc/init.d/rc.axialracing_ax10_apps
fi
param set MAV_TYPE 10
fi
unset MIXER
@@ -690,14 +709,7 @@ then
fi
unset FEXTRAS
if [ $EXIT_ON_END == yes ]
then
echo "Exit from nsh"
exit
fi
unset EXIT_ON_END
# Run no SD alarm last
# Run no SD alarm
if [ $LOG_FILE == /dev/null ]
then
echo "[i] No microSD card found"
@@ -705,6 +717,16 @@ then
tone_alarm error
fi
# 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 "Exit from nsh"
exit
fi
unset EXIT_ON_END
# End of autostart
fi
+84
View File
@@ -0,0 +1,84 @@
Aileron/Elevator/Throttle/Rudder mixer for PX4FMU
==================================================
This file defines mixers suitable for controlling a fixed wing aircraft with
aileron, rudder, elevator and throttle controls using PX4FMU. The configuration
assumes the aileron servo(s) are connected to PX4FMU servo output 0, the
elevator to output 1, the throttle to output 2 and the rudder to output 3.
Inputs to the mixer come from channel group 0 (vehicle attitude), channels 0
(roll), 1 (pitch) and 3 (thrust).
Aileron mixer
-------------
Two scalers total (output, roll).
This mixer assumes that the aileron servos are set up correctly mechanically;
depending on the actual configuration it may be necessary to reverse the scaling
factors (to reverse the servo movement) and adjust the offset, scaling and
endpoints to suit.
As there is only one output, if using two servos adjustments to compensate for
differences between the servos must be made mechanically. To obtain the correct
motion using a Y cable, the servos can be positioned reversed from one another.
M: 1
O: 10000 10000 0 -10000 10000
S: 0 0 10000 10000 0 -10000 10000
Elevator mixer
------------
Two scalers total (output, roll).
This mixer assumes that the elevator servo is set up correctly mechanically;
depending on the actual configuration it may be necessary to reverse the scaling
factors (to reverse the servo movement) and adjust the offset, scaling and
endpoints to suit.
M: 1
O: 10000 10000 0 -10000 10000
S: 0 1 -10000 -10000 0 -10000 10000
Motor speed mixer
-----------------
Two scalers total (output, thrust).
This mixer generates a full-range output (-1 to 1) from an input in the (0 - 1)
range. Inputs below zero are treated as zero.
M: 1
O: 10000 10000 0 -10000 10000
S: 0 3 0 20000 -10000 -10000 10000
Rudder mixer
------------
Two scalers total (output, yaw).
This mixer assumes that the rudder servo is set up correctly mechanically;
depending on the actual configuration it may be necessary to reverse the scaling
factors (to reverse the servo movement) and adjust the offset, scaling and
endpoints to suit.
M: 1
O: 10000 10000 0 -10000 10000
S: 0 2 10000 10000 0 -10000 10000
Gimbal / flaps / payload mixer for last four channels,
using the payload control group
-----------------------------------------------------
M: 1
O: 10000 10000 0 -10000 10000
S: 2 0 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 2 1 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 2 2 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 2 3 10000 10000 0 -10000 10000
+12 -12
View File
@@ -34,7 +34,7 @@ collection of mixers in order to achieve a specific pattern of actuator outputs.
The null mixer definition has the form:
Z:
Z:
#### Simple Mixer ####
@@ -44,8 +44,8 @@ applying an output scaler.
A simple mixer definition begins with:
M: <control count>
O: <-ve scale> <+ve scale> <offset> <lower limit> <upper limit>
M: <control count>
O: <-ve scale> <+ve scale> <offset> <lower limit> <upper limit>
If <control count> is zero, the sum is effectively zero and the mixer will
output a fixed value that is <offset> constrained by <lower limit> and <upper
@@ -59,7 +59,7 @@ offset of -0.5 is encoded as -5000.
The definition continues with <control count> entries describing the control
inputs and their scaling, in the form:
S: <group> <index> <-ve scale> <+ve scale> <offset> <lower limit> <upper limit>
S: <group> <index> <-ve scale> <+ve scale> <offset> <lower limit> <upper limit>
The <group> value identifies the control group from which the scaler will read,
and the <index> value an offset within that group. These values are specific to
@@ -81,16 +81,16 @@ into a set of actuator outputs intended to drive motor speed controllers.
The mixer definition is a single line of the form:
R: <geometry> <roll scale> <pitch scale> <yaw scale> <deadband>
R: <geometry> <roll scale> <pitch scale> <yaw scale> <deadband>
The supported geometries include:
4x - quadrotor in X configuration
4+ - quadrotor in + configuration
6x - hexcopter in X configuration
6+ - hexcopter in + configuration
8x - octocopter in X configuration
8+ - octocopter in + configuration
* 4x - quadrotor in X configuration
* 4+ - quadrotor in + configuration
* 6x - hexcopter in X configuration
* 6+ - hexcopter in + configuration
* 8x - octocopter in X configuration
* 8+ - octocopter in + configuration
Each of the roll, pitch and yaw scale values determine scaling of the roll,
pitch and yaw controls relative to the thrust control. Whilst the calculations
@@ -102,4 +102,4 @@ thrust input ranges from 0.0 to 1.0. Output for each actuator is in the
range -1.0 to 1.0.
In the case where an actuator saturates, all actuator values are rescaled so that
the saturating actuator is limited to 1.0.
the saturating actuator is limited to 1.0.
+3 -3
View File
@@ -5,18 +5,18 @@ Tilt mechanism servo mixer
---------------------------
M: 1
O: 10000 10000 0 -10000 10000
S: 1 4 10000 10000 0 -10000 10000
S: 1 4 0 20000 -10000 -10000 10000
Elevon mixers
-------------
M: 2
O: 10000 10000 0 -10000 10000
S: 1 0 -7500 -7500 0 -10000 10000
S: 1 0 -7500 -7500 0 -10000 10000
S: 1 1 8000 8000 0 -10000 10000
M: 2
O: 10000 10000 0 -10000 10000
S: 1 0 -7500 -7500 0 -10000 10000
S: 1 0 -7500 -7500 0 -10000 10000
S: 1 1 -8000 -8000 0 -10000 10000
Landing gear mixer
@@ -0,0 +1,28 @@
Mixer for Tailsitter with + motor configuration and elevons
===========================================================
This file defines a single mixer for tailsitter with motors in X configuration. All controls
are mixed 100%.
R: 4+ 10000 10000 10000 0
# mixer for the elevons
M: 2
O: 10000 10000 0 -10000 10000
S: 1 0 10000 10000 0 -10000 10000
S: 1 1 10000 10000 0 -10000 10000
M: 2
O: 10000 10000 0 -10000 10000
S: 1 0 10000 10000 0 -10000 10000
S: 1 1 -10000 -10000 0 -10000 10000
# mixer for canard surface
M: 1
O: 10000 10000 0 -10000 10000
S: 1 1 -10000 -10000 0 -10000 10000
# mixer for rudder
M: 1
O: 10000 10000 0 -10000 10000
S: 1 2 -10000 -10000 0 -10000 10000
@@ -0,0 +1,32 @@
Mixer for an AAERT VTOL
=======================
Aileron 1 mixer
---------------
M: 1
O: 10000 10000 0 -10000 10000
S: 1 0 -7500 -7500 0 -10000 10000
Aileron 2 mixer
---------------
M: 1
O: 10000 10000 0 -10000 10000
S: 1 0 -7500 -7500 0 -10000 10000
Elevator mixer
--------------
M: 1
O: 10000 10000 0 -10000 10000
S: 1 1 10000 10000 0 -10000 10000
Rudder mixer
------------
M: 1
O: 10000 10000 0 -10000 10000
S: 1 2 -10000 -10000 0 -10000 10000
Throttle mixer
--------------
M: 1
O: 10000 10000 0 -10000 10000
S: 1 3 0 20000 -10000 -10000 10000
@@ -0,0 +1,4 @@
# VTOL quad X mixer for PX4FMU
#=============================
R: 4x 10000 10000 10000 0
+24
View File
@@ -0,0 +1,24 @@
M: 1
O: 10000 10000 0 -10000 10000
S: 0 0 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 1 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 2 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 3 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 4 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 5 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 6 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 7 10000 10000 0 -10000 10000
+13
View File
@@ -0,0 +1,13 @@
<?xml version='1.0' encoding='UTF-8'?>
<airframes>
<version>1</version>
<airframe_group name="StandardPlane" image="AirframeStandardPlane.png">
<airframe name="Multiplex Easystar 1/2" id="2100"/>
<airframe name="Generic AERT" id="2101"/>
</airframe_group>
<airframe_group name="QuadRotorX" image="AirframeQuadRotorX.png">
<airframe name="Generic 10 inch Quad" id="4001"/>
<airframe name="DJI F330 8 inch Quad" id="4010"/>
<airframe name="DJI F450 10 inch Quad" id="4011"/>
</airframe_group>
</airframes>
+23
View File
@@ -0,0 +1,23 @@
<?xml version='1.0' encoding='UTF-8'?>
<vehicle_configs>
<vehicle class="multirotor" rotors="4" geometry="x" propeller_diameter="8" weight="1.0" id="4010">
<title>Standard 8" Prop Quadrotor (x)</title>
<short_desc>Standard quadrotor configuration in x configuration for 8-" propellers</short_desc>
<mixer>/etc/mixers/quad_x.main.mix</mixer>
</vehicle>
<vehicle class="multirotor" rotors="4" geometry="+" propeller_diameter="8" weight="1.0" id="5001">
<title>Standard 8" Prop Quadrotor (+)</title>
<short_desc>Standard quadrotor configuration in + configuration for 8-" propellers</short_desc>
<mixer>/etc/mixers/quad_+.main.mix</mixer>
</vehicle>
<vehicle class="multirotor" rotors="4" geometry="x" propeller_diameter="10" weight="1.5" id="4011">
<title>Standard 8" Prop Quadrotor (x)</title>
<short_desc>Standard quadrotor configuration in x configuration for 8-" propellers</short_desc>
<mixer>/etc/mixers/quad_x.main.mix</mixer>
</vehicle>
<vehicle class="fixed_wing" wingspan="0.85" elevons="yes" ailerons="no" rudder="no" weight="1.5" id="3033">
<title>Zeta Science Wing Wing Z-84</title>
<short_desc>Configuration for a small flying wing.</short_desc>
<mixer>/etc/mixers/wingwing.main.mix</mixer>
</vehicle>
</vehicle_configs>
+151
View File
@@ -0,0 +1,151 @@
#!/usr/bin/python
import glob
import sys
# This script is run from Build/<target>_default.build/$(PX4_BASE)/Firmware/src/systemcmds/topic_listener
# argv[1] must be the full path of the top Firmware dir
raw_messages = glob.glob(sys.argv[1]+"/msg/*.msg")
messages = []
message_elements = []
for index,m in enumerate(raw_messages):
temp_list_floats = []
temp_list_uint64 = []
temp_list_bool = []
if("actuator_control" not in m and "pwm_input" not in m and "position_setpoint" not in m):
temp_list = []
f = open(m,'r')
for line in f.readlines():
if(line.split(' ')[0] == "float32"):
temp_list.append(("float",line.split(' ')[1].split('\t')[0].split('\n')[0]))
elif(line.split(' ')[0] == "uint64"):
temp_list.append(("uint64",line.split(' ')[1].split('\t')[0].split('\n')[0]))
elif (line.split(' ')[0] == "bool"):
temp_list.append(("bool",line.split(' ')[1].split('\t')[0].split('\n')[0]))
elif (line.split(' ')[0] == "uint8") and len(line.split('=')) == 1:
temp_list.append(("uint8",line.split(' ')[1].split('\t')[0].split('\n')[0]))
elif ('float32[' in line.split(' ')[0]):
num_floats = int(line.split(" ")[0].split("[")[1].split("]")[0])
temp_list.append(("float_array",line.split(' ')[1].split('\t')[0].split('\n')[0],num_floats))
f.close()
messages.append(m.split('/')[-1].split('.')[0])
message_elements.append(temp_list)
num_messages = len(messages);
print("""
/****************************************************************************
*
* Copyright (c) 2015 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.
*
****************************************************************************/
/**
* @file topic_listener.cpp, autogenerated by Tools/generate_listener.py
*
* Tool for listening to topics when running flight stack on linux.
*/
#include <px4_middleware.h>
#include <px4_app.h>
#include <px4_config.h>
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include <vector>
#include <cstring>
#include <uORB/uORB.h>
#include <string.h>
#include <stdint.h>
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
""")
for m in messages:
print("#include <uORB/topics/%s.h>" % m)
print("""
extern "C" __EXPORT int listener_main(int argc, char *argv[]);
int listener_main(int argc, char *argv[]) {
int sub = -1;
orb_id_t ID;
if(argc < 3) {
printf("need at least two arguments: topic name, number of messages to print\\n");
return 1;
}
""")
print("\tuint32_t num_msgs = (uint32_t)std::stoi(argv[2],NULL,10);")
print("\tif(strncmp(argv[1],\"%s\",50)== 0) {" % messages[0])
print("\t\tsub = orb_subscribe(ORB_ID(%s));" % messages[0])
print("\t\tID = ORB_ID(%s);" % messages[0])
print("\t\tstruct %s_s container;" % messages[0])
print("\t\tmemset(&container, 0, sizeof(container));")
for index,m in enumerate(messages[1:]):
print("\t} else if(strncmp(argv[1],\"%s\",50) == 0) {" % m)
print("\t\tsub = orb_subscribe(ORB_ID(%s));" % m)
print("\t\tID = ORB_ID(%s);" % m)
print("\t\tstruct %s_s container;" % m)
print("\t\tmemset(&container, 0, sizeof(container));")
print("\t\tbool updated;")
print("\t\tfor(uint32_t i = 0;i<num_msgs;i++) {")
print("\t\t\torb_check(sub,&updated);")
print("\t\t\tupdated = true;")
print("\t\t\tif(updated) {")
print("\t\t\torb_copy(ID,sub,&container);")
for item in message_elements[index+1]:
if item[0] == "float":
print("\t\t\tprintf(\"%s: %%f\\n \",(double)container.%s);" % (item[1], item[1]))
elif item[0] == "float_array":
print("\t\t\tprintf(\"%s:\");" % item[1])
print("\t\t\tfor (int j=0;j<%d;j++) {" % item[2])
print("\t\t\t\tprintf(\"%%f \",(double)container.%s[j]);" % item[1])
print("\t\t\t}")
print("\t\t\tprintf(\"\\n\");")
elif item[0] == "uint64":
print("\t\t\tprintf(\"%s: %%\" PRIu64 \"\\n \",container.%s);" % (item[1], item[1]))
elif item[0] == "uint8":
print("\t\t\tprintf(\"%s: %%u\\n \",container.%s);" % (item[1], item[1]))
elif item[0] == "bool":
print("\t\t\tprintf(\"%s: %%s\\n \",container.%s ? \"True\" : \"False\");" % (item[1], item[1]))
print("\t\t\t}")
print("\t\t}")
print("\t} else {")
print("\t\t printf(\" Topic did not match any known topics\\n\");")
print("\t}")
print("\t return 0;")
print("}")
+2
View File
@@ -0,0 +1,2 @@
handle SIGCONT nostop
run
+137
View File
@@ -0,0 +1,137 @@
#!/usr/bin/env python
############################################################################
#
# Copyright (C) 2015 Mark Charlebois. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name PX4 nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################
import glob
builtins = glob.glob("builtin_commands/COMMAND*")
apps = []
for f in builtins:
apps.append(f.split(".")[-1].split("_main")[0])
print("""
#include <string>
#include <map>
#define __EXPORT
#include <px4_tasks.h>
#include <px4_posix.h>
#include <stdlib.h>
using namespace std;
extern void px4_show_devices(void);
extern "C" {
""")
for app in apps:
print("extern int "+app+"_main(int argc, char *argv[]);")
print("""
static int shutdown_main(int argc, char *argv[]);
static int list_tasks_main(int argc, char *argv[]);
static int list_files_main(int argc, char *argv[]);
static int list_devices_main(int argc, char *argv[]);
static int list_topics_main(int argc, char *argv[]);
static int sleep_main(int argc, char *argv[]);
}
static map<string,px4_main_t> app_map(void);
static map<string,px4_main_t> app_map(void)
{
static map<string,px4_main_t> apps;
""")
for app in apps:
print('\tapps["'+app+'"] = '+app+'_main;')
print('\tapps["shutdown"] = shutdown_main;')
print('\tapps["list_tasks"] = list_tasks_main;')
print('\tapps["list_files"] = list_files_main;')
print('\tapps["list_devices"] = list_devices_main;')
print('\tapps["list_topics"] = list_topics_main;')
print('\tapps["sleep"] = sleep_main;')
print("""
return apps;
}
map<string,px4_main_t> apps = app_map();
static void list_builtins(void)
{
cout << "Builtin Commands:" << endl;
for (map<string,px4_main_t>::iterator it=apps.begin(); it!=apps.end(); ++it)
cout << '\t' << it->first << endl;
}
static int shutdown_main(int argc, char *argv[])
{
cout << "Shutting down" << endl;
exit(0);
}
static int list_tasks_main(int argc, char *argv[])
{
px4_show_tasks();
return 0;
}
static int list_devices_main(int argc, char *argv[])
{
px4_show_devices();
return 0;
}
static int list_topics_main(int argc, char *argv[])
{
px4_show_topics();
return 0;
}
static int list_files_main(int argc, char *argv[])
{
px4_show_files();
return 0;
}
static int sleep_main(int argc, char *argv[])
{
if (argc != 2) {
cout << "Usage: sleep <seconds>" << endl;
return 1;
}
sleep(atoi(argv[1]));
return 0;
}
""")
+1
View File
@@ -0,0 +1 @@
This folder contains a python library used by px_process_params.py
+1
View File
@@ -0,0 +1 @@
__all__ = ["srcscanner", "srcparser", "xmlout", "rcout"]
+54
View File
@@ -0,0 +1,54 @@
from xml.sax.saxutils import escape
import codecs
class RCOutput():
def __init__(self, groups, board):
result = ( "#\n"
"#\n"
"# THIS FILE IS AUTO-GENERATED. DO NOT EDIT!\n"
"#\n"
"#\n"
"# SYS_AUTOSTART = 0 means no autostart (default)\n"
"#\n"
"# AUTOSTART PARTITION:\n"
"# 0 .. 999 Reserved (historical)\n"
"# 1000 .. 1999 Simulation setups\n"
"# 2000 .. 2999 Standard planes\n"
"# 3000 .. 3999 Flying wing\n"
"# 4000 .. 4999 Quadrotor x\n"
"# 5000 .. 5999 Quadrotor +\n"
"# 6000 .. 6999 Hexarotor x\n"
"# 7000 .. 7999 Hexarotor +\n"
"# 8000 .. 8999 Octorotor x\n"
"# 9000 .. 9999 Octorotor +\n"
"# 10000 .. 10999 Quadrotor Wide arm / H frame\n"
"# 11000 .. 11999 Hexa Cox\n"
"# 12000 .. 12999 Octo Cox\n"
"# 13000 .. 13999 VTOL\n"
"# 14000 .. 14999 Tri Y\n"
"\n")
for group in groups:
result += "# GROUP: %s\n\n" % group.GetName()
for param in group.GetParams():
path = param.GetPath().rsplit('/', 1)[1]
id_val = param.GetId()
name = param.GetFieldValue("short_desc")
long_desc = param.GetFieldValue("long_desc")
result += "#\n"
result += "# %s\n" % param.GetName()
result += "if param compare SYS_AUTOSTART %s\n" % id_val
result += "then\n"
result += "\tsh /etc/init.d/%s\n" % path
result += "fi\n"
#if long_desc is not None:
# result += "# %s\n" % long_desc
result += "\n"
result += "\n"
self.output = result;
def Save(self, filename):
with codecs.open(filename, 'w', 'utf-8') as f:
f.write(self.output)
+346
View File
@@ -0,0 +1,346 @@
import sys
import re
class ParameterGroup(object):
"""
Single parameter group
"""
def __init__(self, name):
self.name = name
self.params = []
def AddParameter(self, param):
"""
Add parameter to the group
"""
self.params.append(param)
def GetName(self):
"""
Get parameter group name
"""
return self.name
def GetParams(self):
"""
Returns the parsed list of parameters. Every parameter is a Parameter
object. Note that returned object is not a copy. Modifications affect
state of the parser.
"""
return sorted(self.params,
key=lambda x: x.GetFieldValue("code"))
class Parameter(object):
"""
Single parameter
"""
# Define sorting order of the fields
priority = {
"board": 9,
"short_desc": 8,
"long_desc": 7,
"min": 5,
"max": 4,
"unit": 3,
# all others == 0 (sorted alphabetically)
}
def __init__(self, path, name, airframe_type, airframe_id, maintainer):
self.fields = {}
self.outputs = {}
self.path = path
self.name = name
self.type = airframe_type
self.id = airframe_id
self.maintainer = maintainer
def GetPath(self):
return self.path
def GetName(self):
return self.name
def GetType(self):
return self.type
def GetId(self):
return self.id
def GetMaintainer(self):
return self.maintainer
def SetField(self, code, value):
"""
Set named field value
"""
self.fields[code] = value
def SetOutput(self, code, value):
"""
Set named output value
"""
self.outputs[code] = value
def GetFieldCodes(self):
"""
Return list of existing field codes in convenient order
"""
keys = self.fields.keys()
keys = sorted(keys)
keys = sorted(keys, key=lambda x: self.priority.get(x, 0), reverse=True)
return keys
def GetFieldValue(self, code):
"""
Return value of the given field code or None if not found.
"""
fv = self.fields.get(code)
if not fv:
# required because python 3 sorted does not accept None
return ""
return self.fields.get(code)
def GetOutputCodes(self):
"""
Return list of existing output codes in convenient order
"""
keys = self.outputs.keys()
keys = sorted(keys)
keys = sorted(keys, key=lambda x: self.priority.get(x, 0), reverse=True)
return keys
def GetOutputValue(self, code):
"""
Return value of the given output code or None if not found.
"""
fv = self.outputs.get(code)
if not fv:
# required because python 3 sorted does not accept None
return ""
return self.outputs.get(code)
class SourceParser(object):
"""
Parses provided data and stores all found parameters internally.
"""
re_split_lines = re.compile(r'[\r\n]+')
re_comment_start = re.compile(r'^\#\s')
re_comment_content = re.compile(r'^\#\s*(.*)')
re_comment_tag = re.compile(r'@([a-zA-Z][a-zA-Z0-9_]*)\s*(.*)')
re_comment_end = re.compile(r'(.*?)\s*\#\n/')
re_cut_type_specifier = re.compile(r'[a-z]+$')
re_is_a_number = re.compile(r'^-?[0-9\.]')
re_remove_dots = re.compile(r'\.+$')
re_remove_carriage_return = re.compile('\n+')
valid_tags = set(["url", "maintainer", "output", "name", "type"])
# Order of parameter groups
priority = {
# All other groups = 0 (sort alphabetically)
"Miscellaneous": -10
}
def __init__(self):
self.param_groups = {}
def GetSupportedExtensions(self):
"""
Returns list of supported file extensions that can be parsed by this
parser. The parser uses any extension.
"""
return [""]
def Parse(self, path, contents):
"""
Incrementally parse program contents and append all found airframes
to the list.
"""
airframe_id = None
airframe_id = path.rsplit('/',1)[1].split('_',1)[0]
# Skip if not numeric
if (not self.IsNumber(airframe_id)):
return True
# This code is essentially a comment-parsing grammar. "state"
# represents parser state. It contains human-readable state
# names.
state = None
tags = {}
outputs = {}
for line in self.re_split_lines.split(contents):
line = line.strip()
# Ignore empty lines
if line == "":
continue
if state is None and self.re_comment_start.match(line):
state = "wait-short"
short_desc = None
long_desc = None
if state is not None and state != "comment-processed":
m = self.re_comment_end.search(line)
if m:
line = m.group(1)
last_comment_line = True
else:
last_comment_line = False
m = self.re_comment_content.match(line)
if m:
comment_content = m.group(1)
if comment_content == "":
# When short comment ends with empty comment line,
# start waiting for the next part - long comment.
if state == "wait-short-end":
state = "wait-long"
else:
m = self.re_comment_tag.match(comment_content)
if m:
tag, desc = m.group(1, 2)
if (tag == "output"):
key, text = desc.split(' ', 1)
outputs[key] = text;
else:
tags[tag] = desc
current_tag = tag
state = "wait-tag-end"
elif state == "wait-short":
# Store first line of the short description
short_desc = comment_content
state = "wait-short-end"
elif state == "wait-short-end":
# Append comment line to the short description
short_desc += "\n" + comment_content
elif state == "wait-long":
# Store first line of the long description
long_desc = comment_content
state = "wait-long-end"
elif state == "wait-long-end":
# Append comment line to the long description
long_desc += "\n" + comment_content
elif state == "wait-tag-end":
# Append comment line to the tag text
tags[current_tag] += "\n" + comment_content
else:
raise AssertionError(
"Invalid parser state: %s" % state)
elif not last_comment_line:
# Invalid comment line (inside comment, but not starting with
# "*" or "*/". Reset parsed content.
state = None
if last_comment_line:
state = "comment-processed"
else:
state = None
# Process parsed content
airframe_type = None
maintainer = "John Doe <john@example.com>"
airframe_name = None
# Done with file, store
for tag in tags:
if tag == "maintainer":
maintainer = tags[tag]
elif tag == "type":
airframe_type = tags[tag]
elif tag == "name":
airframe_name = tags[tag]
elif tag not in self.valid_tags:
sys.stderr.write("Aborting due to invalid documentation tag: '%s'\n" % tag)
return False
# Sanity check
if airframe_type == None:
sys.stderr.write("Aborting due to missing @type tag in file: '%s'\n" % path)
return False
if airframe_name == None:
sys.stderr.write("Aborting due to missing @name tag in file: '%s'\n" % path)
return False
# We already know this is an airframe config, so add it
param = Parameter(path, airframe_name, airframe_type, airframe_id, maintainer)
# Done with file, store
for tag in tags:
if tag == "maintainer":
maintainer = tags[tag]
if tag == "type":
airframe_type = tags[tag]
if tag == "name":
airframe_name = tags[tag]
else:
param.SetField(tag, tags[tag])
# Store outputs
for output in outputs:
param.SetOutput(output, outputs[output])
# Store the parameter
if airframe_type not in self.param_groups:
self.param_groups[airframe_type] = ParameterGroup(airframe_type)
self.param_groups[airframe_type].AddParameter(param)
return True
def IsNumber(self, numberString):
try:
float(numberString)
return True
except ValueError:
return False
def Validate(self):
"""
Validates the airframe meta data.
"""
seenParamNames = []
for group in self.GetParamGroups():
for param in group.GetParams():
name = param.GetName()
board = param.GetFieldValue("board")
# Check for duplicates
name_plus_board = name + "+" + board
for seenParamName in seenParamNames:
if seenParamName == name_plus_board:
sys.stderr.write("Duplicate parameter definition: {0}\n".format(name_plus_board))
return False
seenParamNames.append(name_plus_board)
# Validate values
default = param.GetDefault()
min = param.GetFieldValue("min")
max = param.GetFieldValue("max")
#sys.stderr.write("{0} default:{1} min:{2} max:{3}\n".format(name, default, min, max))
if default != "" and not self.IsNumber(default):
sys.stderr.write("Default value not number: {0} {1}\n".format(name, default))
return False
if min != "":
if not self.IsNumber(min):
sys.stderr.write("Min value not number: {0} {1}\n".format(name, min))
return False
if default != "" and float(default) < float(min):
sys.stderr.write("Default value is smaller than min: {0} default:{1} min:{2}\n".format(name, default, min))
return False
if max != "":
if not self.IsNumber(max):
sys.stderr.write("Max value not number: {0} {1}\n".format(name, max))
return False
if default != "" and float(default) > float(max):
sys.stderr.write("Default value is larger than max: {0} default:{1} max:{2}\n".format(name, default, max))
return False
return True
def GetParamGroups(self):
"""
Returns the parsed list of parameters. Every parameter is a Parameter
object. Note that returned object is not a copy. Modifications affect
state of the parser.
"""
groups = self.param_groups.values()
groups = sorted(groups, key=lambda x: x.GetName())
groups = sorted(groups, key=lambda x: self.priority.get(x.GetName(), 0), reverse=True)
return groups
+37
View File
@@ -0,0 +1,37 @@
import os
import re
import codecs
class SourceScanner(object):
"""
Traverses directory tree, reads all source files, and passes their contents
to the Parser.
"""
def ScanDir(self, srcdir, parser):
"""
Scans provided path and passes all found contents to the parser using
parser.Parse method.
"""
extensions = tuple(parser.GetSupportedExtensions())
for dirname, dirnames, filenames in os.walk(srcdir):
for filename in filenames:
if filename.endswith(extensions):
path = os.path.join(dirname, filename)
if not self.ScanFile(path, parser):
return False
return True
def ScanFile(self, path, parser):
"""
Scans provided file and passes its contents to the parser using
parser.Parse method.
"""
with codecs.open(path, 'r', 'utf-8') as f:
try:
contents = f.read()
except:
contents = ''
print('Failed reading file: %s, skipping content.' % path)
pass
return parser.Parse(path, contents)
+84
View File
@@ -0,0 +1,84 @@
import xml.etree.ElementTree as ET
import codecs
def indent(elem, level=0):
i = "\n" + level*" "
if len(elem):
if not elem.text or not elem.text.strip():
elem.text = i + " "
if not elem.tail or not elem.tail.strip():
elem.tail = i
for elem in elem:
indent(elem, level+1)
if not elem.tail or not elem.tail.strip():
elem.tail = i
else:
if level and (not elem.tail or not elem.tail.strip()):
elem.tail = i
class XMLOutput():
def __init__(self, groups, board):
xml_parameters = ET.Element("airframes")
xml_version = ET.SubElement(xml_parameters, "version")
xml_version.text = "1"
last_param_name = ""
board_specific_param_set = False
for group in groups:
xml_group = ET.SubElement(xml_parameters, "airframe_group")
xml_group.attrib["name"] = group.GetName()
if (group.GetName() == "Standard Plane"):
xml_group.attrib["image"] = "AirframeStandardPlane.png"
elif (group.GetName() == "Flying Wing"):
xml_group.attrib["image"] = "AirframeFlyingWing.png"
elif (group.GetName() == "Quadrotor x"):
xml_group.attrib["image"] = "AirframeQuadRotorX.png"
elif (group.GetName() == "Quadrotor +"):
xml_group.attrib["image"] = "AirframeQuadRotorPlus.png"
elif (group.GetName() == "Hexarotor x"):
xml_group.attrib["image"] = "AirframeHexaRotorX.png"
elif (group.GetName() == "Hexarotor +"):
xml_group.attrib["image"] = "AirframeHexaRotorPlus.png"
elif (group.GetName() == "Octorotor +"):
xml_group.attrib["image"] = "AirframeOctoRotorPlus.png"
elif (group.GetName() == "Octorotor x"):
xml_group.attrib["image"] = "AirframeOctoRotorX.png"
elif (group.GetName() == "Quadrotor Wide"):
xml_group.attrib["image"] = "AirframeQuadRotorH.png"
elif (group.GetName() == "Quadrotor H"):
xml_group.attrib["image"] = "AirframeQuadRotorH.png"
elif (group.GetName() == "Simulation"):
xml_group.attrib["image"] = "AirframeSimulation.png"
else:
xml_group.attrib["image"] = ""
for param in group.GetParams():
if (last_param_name == param.GetName() and not board_specific_param_set) or last_param_name != param.GetName():
xml_param = ET.SubElement(xml_group, "airframe")
xml_param.attrib["name"] = param.GetName()
xml_param.attrib["id"] = param.GetId()
xml_param.attrib["maintainer"] = param.GetMaintainer()
last_param_name = param.GetName()
for code in param.GetFieldCodes():
value = param.GetFieldValue(code)
if code == "board":
if value == board:
board_specific_param_set = True
xml_field = ET.SubElement(xml_param, code)
xml_field.text = value
else:
xml_group.remove(xml_param)
else:
xml_field = ET.SubElement(xml_param, code)
xml_field.text = value
for code in param.GetOutputCodes():
value = param.GetOutputValue(code)
xml_field = ET.SubElement(xml_param, "output")
xml_field.attrib["name"] = code
xml_field.text = value
if last_param_name != param.GetName():
board_specific_param_set = False
indent(xml_parameters)
self.xml_document = ET.ElementTree(xml_parameters)
def Save(self, filename):
self.xml_document.write(filename, encoding="UTF-8")
+63 -35
View File
@@ -101,6 +101,7 @@ class SourceParser(object):
re_cut_type_specifier = re.compile(r'[a-z]+$')
re_is_a_number = re.compile(r'^-?[0-9\.]')
re_remove_dots = re.compile(r'\.+$')
re_remove_carriage_return = re.compile('\n+')
valid_tags = set(["group", "board", "min", "max", "unit"])
@@ -188,12 +189,20 @@ class SourceParser(object):
if last_comment_line:
state = "comment-processed"
else:
tp = None
name = None
defval = ""
# Non-empty line outside the comment
m = self.re_parameter_definition.match(line)
if m:
tp, name, defval = m.group(1, 2, 3)
else:
m = self.re_px4_parameter_definition.match(line)
if m:
tp, name = m.group(1, 2)
if tp is not None:
# Remove trailing type specifier from numbers: 0.1f => 0.1
if self.re_is_a_number.match(defval):
if defval != "" and self.re_is_a_number.match(defval):
defval = self.re_cut_type_specifier.sub('', defval)
param = Parameter(name, tp, defval)
param.SetField("short_desc", name)
@@ -202,52 +211,71 @@ class SourceParser(object):
group = "Miscellaneous"
if state == "comment-processed":
if short_desc is not None:
param.SetField("short_desc",
self.re_remove_dots.sub('', short_desc))
param.SetField("short_desc", self.re_remove_dots.sub('', short_desc))
if long_desc is not None:
long_desc = self.re_remove_carriage_return.sub(' ', long_desc)
param.SetField("long_desc", long_desc)
for tag in tags:
if tag == "group":
group = tags[tag]
elif tag not in self.valid_tags:
sys.stderr.write("Skipping invalid "
"documentation tag: '%s'\n" % tag)
sys.stderr.write("Skipping invalid documentation tag: '%s'\n" % tag)
return False
else:
param.SetField(tag, tags[tag])
# Store the parameter
if group not in self.param_groups:
self.param_groups[group] = ParameterGroup(group)
self.param_groups[group].AddParameter(param)
else:
# Nasty code dup, but this will all go away soon, so quick and dirty (DonLakeFlyer)
m = self.re_px4_parameter_definition.match(line)
if m:
tp, name = m.group(1, 2)
param = Parameter(name, tp)
param.SetField("short_desc", name)
# If comment was found before the parameter declaration,
# inject its data into the newly created parameter.
group = "Miscellaneous"
if state == "comment-processed":
if short_desc is not None:
param.SetField("short_desc",
self.re_remove_dots.sub('', short_desc))
if long_desc is not None:
param.SetField("long_desc", long_desc)
for tag in tags:
if tag == "group":
group = tags[tag]
elif tag not in self.valid_tags:
sys.stderr.write("Skipping invalid "
"documentation tag: '%s'\n" % tag)
else:
param.SetField(tag, tags[tag])
# Store the parameter
if group not in self.param_groups:
self.param_groups[group] = ParameterGroup(group)
self.param_groups[group].AddParameter(param)
# Reset parsed comment.
state = None
state = None
return True
def IsNumber(self, numberString):
try:
float(numberString)
return True
except ValueError:
return False
def Validate(self):
"""
Validates the parameter meta data.
"""
seenParamNames = []
for group in self.GetParamGroups():
for param in group.GetParams():
name = param.GetName()
board = param.GetFieldValue("board")
# Check for duplicates
name_plus_board = name + "+" + board
for seenParamName in seenParamNames:
if seenParamName == name_plus_board:
sys.stderr.write("Duplicate parameter definition: {0}\n".format(name_plus_board))
return False
seenParamNames.append(name_plus_board)
# Validate values
default = param.GetDefault()
min = param.GetFieldValue("min")
max = param.GetFieldValue("max")
#sys.stderr.write("{0} default:{1} min:{2} max:{3}\n".format(name, default, min, max))
if default != "" and not self.IsNumber(default):
sys.stderr.write("Default value not number: {0} {1}\n".format(name, default))
return False
if min != "":
if not self.IsNumber(min):
sys.stderr.write("Min value not number: {0} {1}\n".format(name, min))
return False
if default != "" and float(default) < float(min):
sys.stderr.write("Default value is smaller than min: {0} default:{1} min:{2}\n".format(name, default, min))
return False
if max != "":
if not self.IsNumber(max):
sys.stderr.write("Max value not number: {0} {1}\n".format(name, max))
return False
if default != "" and float(default) > float(max):
sys.stderr.write("Default value is larger than max: {0} default:{1} max:{2}\n".format(name, default, max))
return False
return True
def GetParamGroups(self):
"""
+5 -3
View File
@@ -17,8 +17,10 @@ class SourceScanner(object):
for dirname, dirnames, filenames in os.walk(srcdir):
for filename in filenames:
if filename.endswith(extensions):
path = os.path.join(dirname, filename)
self.ScanFile(path, parser)
path = os.path.join(dirname, filename)
if not self.ScanFile(path, parser):
return False
return True
def ScanFile(self, path, parser):
"""
@@ -32,4 +34,4 @@ class SourceScanner(object):
contents = ''
print('Failed reading file: %s, skipping content.' % path)
pass
parser.Parse(contents)
return parser.Parse(contents)
+48 -15
View File
@@ -54,7 +54,7 @@ On a Debian/Ubuntu system please run:
sudo apt-get install python-empy
sudo pip install catkin_pkg
On MacOS please run:
sudo pip install empy catkin_pkg
@@ -93,15 +93,47 @@ def convert_dir(inputdir, outputdir, templatedir):
"""
Converts all .msg files in inputdir to uORB header files
"""
# Find the most recent modification time in input dir
maxinputtime = 0
for f in os.listdir(inputdir):
fni = os.path.join(inputdir, f)
if os.path.isfile(fni):
it = os.path.getmtime(fni)
if it > maxinputtime:
maxinputtime = it;
# Find the most recent modification time in output dir
maxouttime = 0
if os.path.isdir(outputdir):
for f in os.listdir(outputdir):
fni = os.path.join(outputdir, f)
if os.path.isfile(fni):
it = os.path.getmtime(fni)
if it > maxouttime:
maxouttime = it;
# Do not generate if nothing changed on the input
if (maxinputtime != 0 and maxouttime != 0 and maxinputtime < maxouttime):
return False
includepath = incl_default + [':'.join([package, inputdir])]
for f in os.listdir(inputdir):
# Ignore hidden files
if f.startswith("."):
continue
fn = os.path.join(inputdir, f)
if os.path.isfile(fn):
convert_file(
fn,
outputdir,
templatedir,
includepath)
# Only look at actual files
if not os.path.isfile(fn):
continue
convert_file(fn,
outputdir,
templatedir,
includepath)
return True
def copy_changed(inputdir, outputdir, prefix=''):
@@ -123,14 +155,16 @@ def copy_changed(inputdir, outputdir, prefix=''):
shutil.copy(fni, fno)
print("{0}: new header file".format(f))
continue
# The file exists in inputdir and outputdir
# only copy if contents do not match
if not filecmp.cmp(fni, fno):
shutil.copy(fni, fno)
print("{0}: updated".format(f))
continue
print("{0}: unchanged".format(f))
if os.path.getmtime(fni) > os.path.getmtime(fno):
# The file exists in inputdir and outputdir
# only copy if contents do not match
if not filecmp.cmp(fni, fno):
shutil.copy(fni, fno)
print("{0}: updated".format(f))
continue
#print("{0}: unchanged".format(f))
def convert_dir_save(inputdir, outputdir, templatedir, temporarydir, prefix):
@@ -140,7 +174,6 @@ def convert_dir_save(inputdir, outputdir, templatedir, temporarydir, prefix):
"""
# Create new headers in temporary output directory
convert_dir(inputdir, temporarydir, templatedir)
# Copy changed headers from temporary dir to output dir
copy_changed(temporarydir, outputdir, prefix)
+6
View File
@@ -74,6 +74,7 @@ parser.add_argument("--summary", action="store", help="set a brief description")
parser.add_argument("--description", action="store", help="set a longer description")
parser.add_argument("--git_identity", action="store", help="the working directory to check for git identity")
parser.add_argument("--parameter_xml", action="store", help="the parameters.xml file")
parser.add_argument("--airframe_xml", action="store", help="the airframes.xml file")
parser.add_argument("--image", action="store", help="the firmware image")
args = parser.parse_args()
@@ -107,6 +108,11 @@ if args.parameter_xml != None:
bytes = f.read()
desc['parameter_xml_size'] = len(bytes)
desc['parameter_xml'] = base64.b64encode(zlib.compress(bytes,9)).decode('utf-8')
if args.airframe_xml != None:
f = open(args.airframe_xml, "rb")
bytes = f.read()
desc['airframe_xml_size'] = len(bytes)
desc['airframe_xml'] = base64.b64encode(zlib.compress(bytes,9)).decode('utf-8')
if args.image != None:
f = open(args.image, "rb")
bytes = f.read()
+110
View File
@@ -0,0 +1,110 @@
#!/usr/bin/env python
############################################################################
#
# Copyright (C) 2013-2015 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.
#
############################################################################
#
# PX4 airframe config processor (main executable file)
#
# This tool scans the PX4 source code for declarations of airframes
#
# Currently supported formats are:
# * XML for the parametric UI generator
#
#
from __future__ import print_function
import sys
import os
import argparse
from px4airframes import srcscanner, srcparser, xmlout, rcout
def main():
# Parse command line arguments
parser = argparse.ArgumentParser(description="Process airframe documentation.")
parser.add_argument("-a", "--airframes-path",
default="../ROMFS/px4fmu_common",
metavar="PATH",
help="path to source files to scan for parameters")
parser.add_argument("-x", "--xml",
nargs='?',
const="airframes.xml",
metavar="FILENAME",
help="Create XML file"
" (default FILENAME: airframes.xml)")
parser.add_argument("-s", "--start-script",
nargs='?',
const="rc.autostart",
metavar="FILENAME",
help="Create start script file")
parser.add_argument("-b", "--board",
nargs='?',
const="",
metavar="BOARD",
help="Board to create airframes xml for")
args = parser.parse_args()
# Check for valid command
if not (args.xml) and not (args.start_script):
print("Error: You need to specify at least one output method!\n")
parser.print_usage()
sys.exit(1)
# Initialize source scanner and parser
scanner = srcscanner.SourceScanner()
parser = srcparser.SourceParser()
# Scan directories, and parse the files
print("Scanning source path " + args.airframes_path)
if not scanner.ScanDir(args.airframes_path, parser):
sys.exit(1)
# We can't validate yet
# if not parser.Validate():
# sys.exit(1)
param_groups = parser.GetParamGroups()
# Output to XML file
if args.xml:
print("Creating XML file " + args.xml)
out = xmlout.XMLOutput(param_groups, args.board)
out.Save(args.xml)
if args.start_script:
print("Creating start script " + args.start_script)
out = rcout.RCOutput(param_groups, args.board)
out.Save(args.start_script)
print("All done!")
if __name__ == "__main__":
main()
+4 -1
View File
@@ -115,7 +115,10 @@ def main():
# Scan directories, and parse the files
print("Scanning source path " + args.src_path)
scanner.ScanDir(args.src_path, parser)
if not scanner.ScanDir(args.src_path, parser):
sys.exit(1)
if not parser.Validate():
sys.exit(1)
param_groups = parser.GetParamGroups()
# Output to XML file
+137
View File
@@ -0,0 +1,137 @@
#!/usr/bin/env python
############################################################################
#
# Copyright (C) 2015 Mark Charlebois. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name PX4 nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################
import glob
#builtins = glob.glob("../Build/linux_default.build/builtin_commands/COMMAND*")
builtins = glob.glob("builtin_commands/COMMAND*")
apps = []
for f in builtins:
apps.append(f.split(".")[-1].split("_main")[0])
print
print """
#include <string>
#include <map>
#include <stdio.h>
#include <px4_tasks.h>
#include <px4_posix.h>
#include <px4_log.h>
#include <stdlib.h>
using namespace std;
extern void px4_show_devices(void);
extern "C" {
"""
for app in apps:
print "extern int "+app+"_main(int argc, char *argv[]);"
print """
static int shutdown_main(int argc, char *argv[]);
static int list_tasks_main(int argc, char *argv[]);
static int list_files_main(int argc, char *argv[]);
static int list_devices_main(int argc, char *argv[]);
static int list_topics_main(int argc, char *argv[]);
static int sleep_main(int argc, char *argv[]);
}
void init_app_map(map<string,px4_main_t> &apps)
{
"""
for app in apps:
print '\tapps["'+app+'"] = '+app+'_main;'
print '\tapps["shutdown"] = shutdown_main;'
print '\tapps["list_tasks"] = list_tasks_main;'
print '\tapps["list_files"] = list_files_main;'
print '\tapps["list_devices"] = list_devices_main;'
print '\tapps["list_topics"] = list_topics_main;'
print '\tapps["sleep"] = sleep_main;'
print """
}
void list_builtins(map<string,px4_main_t> &apps)
{
printf("Builtin Commands:\\n");
for (map<string,px4_main_t>::iterator it=apps.begin(); it!=apps.end(); ++it)
printf("\\t%s\\n", (it->first).c_str());
}
static int shutdown_main(int argc, char *argv[])
{
printf("Shutting down\\n");
exit(0);
}
static int list_tasks_main(int argc, char *argv[])
{
px4_show_tasks();
return 0;
}
static int list_devices_main(int argc, char *argv[])
{
px4_show_devices();
return 0;
}
static int list_topics_main(int argc, char *argv[])
{
px4_show_topics();
return 0;
}
static int list_files_main(int argc, char *argv[])
{
px4_show_files();
return 0;
}
static int sleep_main(int argc, char *argv[])
{
if (argc != 2) {
PX4_WARN( "Usage: sleep <seconds>" );
return 1;
}
unsigned long usecs = ( (unsigned long) atol( argv[1] ) ) * 1000 * 1000;
PX4_WARN("Sleeping for %s, %ld",argv[1],usecs);
usleep( usecs );
return 0;
}
"""
+5
View File
@@ -0,0 +1,5 @@
#!/bin/bash
mkdir -p Build/posix_sitl.build/rootfs/fs/microsd
mkdir -p Build/posix_sitl.build/rootfs/eeprom
cd Build/posix_sitl.build && ./mainapp ../../$1
Vendored
+102
View File
@@ -0,0 +1,102 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "ubuntu/trusty64"
# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# MAVLink telemetry via UDP in SITL mode
config.vm.network "forwarded_port", guest: 14556, host: 14556, protocol: "udp"
# SITL simulation data
config.vm.network "forwarded_port", guest: 14560, host: 14560, protocol: "udp"
# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.network "public_network"
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
config.vm.synced_folder ".", "/Firmware"
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = false
vb.customize ["modifyvm", :id, "--ioapic", "on"]
vb.customize ["modifyvm", :id, "--cpus", "2"]
# Since make and other tools freak out if they see timestamps
# from the future and we share directories, tightly lock the host and guest clocks together (clock sync if more than 2 seconds off)
vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 2000]
# Do this on start and restore
vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-start"]
vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-on-restore", "1"]
# Customize the amount of memory on the VM:
vb.memory = "2048"
end
#
# View the documentation for the provider you are using for more
# information on available options.
# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
# such as FTP and Heroku are also available. See the documentation at
# https://docs.vagrantup.com/v2/push/atlas.html for more information.
# config.push.define "atlas" do |push|
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
# end
# Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision "shell", inline: <<-SHELL
# Ensure we start in the Firmware folder
echo "cd /Firmware" >> ~/.bashrc
# Install software
sudo apt-get update
sudo apt-get install -y build-essential ccache cmake clang-3.5 lldb-3.5 g++-4.8 gcc-4.8 genromfs libc6-i386 libncurses5-dev python-argparse python-empy python-serial s3cmd texinfo zlib1g-dev git-core
pushd .
cd ~
wget -q https://launchpadlibrarian.net/186124160/gcc-arm-none-eabi-4_8-2014q3-20140805-linux.tar.bz2
tar -jxf gcc-arm-none-eabi-4_8-2014q3-20140805-linux.tar.bz2
exportline="export PATH=$HOME/gcc-arm-none-eabi-4_8-2014q3/bin:\$PATH"
if grep -Fxq "$exportline" ~/.profile; then echo nothing to do ; else echo $exportline >> ~/.profile; fi
. ~/.profile
popd
# setup ccache
mkdir -p ~/bin
ln -s /usr/bin/ccache ~/bin/arm-none-eabi-g++
ln -s /usr/bin/ccache ~/bin/arm-none-eabi-gcc
ln -s /usr/bin/ccache ~/bin/g++-4.8
ln -s /usr/bin/ccache ~/bin/gcc-4.8
export PATH=~/bin:$PATH
# Configure hardware related bits
sudo apt-get -y remove modemmanager
sudo usermod -a -G dialout $USER
SHELL
end
@@ -0,0 +1,23 @@
<launch>
<arg name="headless" default="false"/>
<arg name="gui" default="true"/>
<arg name="enable_logging" default="false"/>
<arg name="enable_ground_truth" default="true"/>
<arg name="ns" default="iris"/>
<arg name="log_file" default="$(arg ns)"/>
<arg name="mavlink_bridge_url" default="udp://localhost:14553@localhost:14560" />
<include file="$(find rotors_gazebo)/launch/iris_empty_world.launch">
<arg name="headless" value="$(arg headless)"/>
<arg name="gui" value="$(arg gui)"/>
<arg name="enable_logging" value="$(arg enable_logging)" />
<arg name="enable_ground_truth" value="$(arg enable_ground_truth)" />
<arg name="log_file" value="$(arg log_file)"/>
</include>
<include file="$(find mavros)/launch/mavlink_bridge.launch">
<arg name="mavlink_bridge_url" value="$(arg mavlink_bridge_url)" />
<arg name="ns" value="$(arg ns)"/>
</include>
</launch>
+23 -8
View File
@@ -7,8 +7,9 @@ with Makefile in the parent directory.
../Makefile
Top-level makefile for the PX4 build system. This makefile supports
building NuttX archives, as well as supervising the building of all
Top-level makefile for the PX4 build system.
This makefile supports building NuttX archives for the NuttX based
configurations, as well as supervising the building of all
of the defined PX4 firmware configurations.
Try 'make help' in the parent directory for documentation.
@@ -25,6 +26,14 @@ firmware.mk
source tree. When used in this mode, at least BOARD, MODULES and
CONFIG_FILE must be set.
firmware_nuttx.mk
Called by firmware.mk to build NuttX based firmware.
firmware_posix.mk
Called by firmware.mk to build POSIX (non-ROS) based firmware.
module.mk
Called by firmware.mk to build individual modules.
@@ -34,22 +43,28 @@ module.mk
nuttx.mk
Called by ../Makefile to build or download the NuttX archives.
Called by ../Makefile to build or download the NuttX archives if
PX4_TARGET_OS is set to "nuttx".
posix.mk
Called by ../Makefile to set POSIX specific parameters if
PX4_TARGET_OS is set to "posix".
upload.mk
Called by ../Makefile to upload files to a target board. Can be used
by external build systems as well.
by external build systems as well. (NuttX targets only)
setup.mk
Provides common path and tool definitions. Implements host system-specific
compatibility hacks.
Provides common path and tool definitions. Implements host
system-specific compatibility hacks. Sets PX4_TARGET_OS.
board_<boardname>.mk
Board-specific configuration for <boardname>. Typically sets CONFIG_ARCH
and then includes the toolchain definition for the board.
Board-specific configuration for <boardname>. Typically sets
CONFIG_ARCH and then includes the toolchain definition for the board.
config_<boardname>_<configname>.mk
+22 -179
View File
@@ -101,7 +101,7 @@
# If PX4_BASE wasn't set previously, work out what it should be
# and set it here now.
#
MK_DIR ?= $(dir $(lastword $(MAKEFILE_LIST)))
MK_DIR ?= $(dir $(firstword $(MAKEFILE_LIST)))
ifeq ($(PX4_BASE),)
export PX4_BASE := $(abspath $(MK_DIR)/..)
endif
@@ -132,7 +132,7 @@ include $(MK_DIR)/setup.mk
ifneq ($(CONFIG_FILE),)
CONFIG := $(subst config_,,$(basename $(notdir $(CONFIG_FILE))))
else
CONFIG_FILE := $(wildcard $(PX4_MK_DIR)/config_$(CONFIG).mk)
CONFIG_FILE := $(wildcard $(PX4_MK_DIR)/$(PX4_TARGET_OS)/config_$(CONFIG).mk)
endif
ifeq ($(CONFIG),)
$(error Missing configuration name or file (specify with CONFIG=<config>))
@@ -150,7 +150,7 @@ $(info % CONFIG = $(CONFIG))
ifeq ($(BOARD),)
BOARD := $(firstword $(subst _, ,$(CONFIG)))
endif
BOARD_FILE := $(wildcard $(PX4_MK_DIR)/board_$(BOARD).mk)
BOARD_FILE := $(wildcard $(PX4_MK_DIR)/$(PX4_TARGET_OS)/board_$(BOARD).mk)
ifeq ($(BOARD_FILE),)
$(error Config $(CONFIG) references board $(BOARD), but no board definition file found)
endif
@@ -186,10 +186,10 @@ EXTRA_CLEANS =
INCLUDE_DIRS += $(PX4_MODULE_SRC)drivers/boards/$(BOARD)
################################################################################
# NuttX libraries and paths
# OS specific libraries and paths
################################################################################
include $(PX4_MK_DIR)/nuttx.mk
include $(PX4_MK_DIR)/$(PX4_TARGET_OS)/$(PX4_TARGET_OS).mk
################################################################################
# Modules
@@ -213,7 +213,7 @@ endef
MODULE_MKFILES := $(foreach module,$(MODULES),$(call MODULE_SEARCH,$(module)))
MISSING_MODULES := $(subst MISSING_,,$(filter MISSING_%,$(MODULE_MKFILES)))
ifneq ($(MISSING_MODULES),)
$(error Can't find module(s): $(MISSING_MODULES))
$(error Cant find module(s): $(MISSING_MODULES))
endif
# Make a list of the object files we expect to build from modules
@@ -273,7 +273,7 @@ endef
LIBRARY_MKFILES := $(foreach library,$(LIBRARIES),$(call LIBRARY_SEARCH,$(library)))
MISSING_LIBRARIES := $(subst MISSING_,,$(filter MISSING_%,$(LIBRARY_MKFILES)))
ifneq ($(MISSING_LIBRARIES),)
$(error Can't find library(s): $(MISSING_LIBRARIES))
$(error Cant find library(s): $(MISSING_LIBRARIES))
endif
# Make a list of the archive files we expect to build from libraries
@@ -314,126 +314,8 @@ $(LIBRARY_CLEANS):
################################################################################
# ROMFS generation
################################################################################
ifneq ($(ROMFS_ROOT),)
ifeq ($(wildcard $(ROMFS_ROOT)),)
$(error ROMFS_ROOT specifies a directory that does not exist)
endif
#
# Note that there is no support for more than one root directory or constructing
# a root from several templates. That would be a nice feature.
#
# Add dependencies on anything in the ROMFS root directory
ROMFS_FILES += $(wildcard \
$(ROMFS_ROOT)/* \
$(ROMFS_ROOT)/*/* \
$(ROMFS_ROOT)/*/*/* \
$(ROMFS_ROOT)/*/*/*/* \
$(ROMFS_ROOT)/*/*/*/*/* \
$(ROMFS_ROOT)/*/*/*/*/*/*)
ifeq ($(ROMFS_FILES),)
$(error ROMFS_ROOT $(ROMFS_ROOT) specifies a directory containing no files)
endif
ROMFS_DEPS += $(ROMFS_FILES)
# Extra files that may be copied into the ROMFS /extras directory
# ROMFS_EXTRA_FILES are required, ROMFS_OPTIONAL_FILES are optional
ROMFS_EXTRA_FILES += $(wildcard $(ROMFS_OPTIONAL_FILES))
ROMFS_DEPS += $(ROMFS_EXTRA_FILES)
ROMFS_IMG = romfs.img
ROMFS_SCRATCH = romfs_scratch
ROMFS_CSRC = $(ROMFS_IMG:.img=.c)
ROMFS_OBJ = $(ROMFS_CSRC:.c=.o)
LIBS += $(ROMFS_OBJ)
LINK_DEPS += $(ROMFS_OBJ)
# Remove all comments from startup and mixer files
ROMFS_PRUNER = $(PX4_BASE)/Tools/px_romfs_pruner.py
# Turn the ROMFS image into an object file
$(ROMFS_OBJ): $(ROMFS_IMG) $(GLOBAL_DEPS)
$(call BIN_TO_OBJ,$<,$@,romfs_img)
# Generate the ROMFS image from the root
$(ROMFS_IMG): $(ROMFS_SCRATCH) $(ROMFS_DEPS) $(GLOBAL_DEPS)
@$(ECHO) "ROMFS: $@"
$(Q) $(GENROMFS) -f $@ -d $(ROMFS_SCRATCH) -V "NSHInitVol"
# Construct the ROMFS scratch root from the canonical root
$(ROMFS_SCRATCH): $(ROMFS_DEPS) $(GLOBAL_DEPS)
$(Q) $(MKDIR) -p $(ROMFS_SCRATCH)
$(Q) $(COPYDIR) $(ROMFS_ROOT)/* $(ROMFS_SCRATCH)
# delete all files in ROMFS_SCRATCH which start with a . or end with a ~
$(Q) $(RM) $(ROMFS_SCRATCH)/*/.[!.]* $(ROMFS_SCRATCH)/*/*~
ifneq ($(ROMFS_EXTRA_FILES),)
$(Q) $(MKDIR) -p $(ROMFS_SCRATCH)/extras
$(Q) $(COPY) $(ROMFS_EXTRA_FILES) $(ROMFS_SCRATCH)/extras
endif
$(Q) $(PYTHON) -u $(ROMFS_PRUNER) --folder $(ROMFS_SCRATCH)
EXTRA_CLEANS += $(ROMGS_OBJ) $(ROMFS_IMG)
endif
################################################################################
# Builtin command list generation
################################################################################
#
# Builtin commands can be generated by the configuration, in which case they
# must refer to commands that already exist, or indirectly generated by modules
# when they are built.
#
# The configuration supplies builtin command information in the BUILTIN_COMMANDS
# variable. Applications make empty files in $(WORK_DIR)/builtin_commands whose
# filename contains the same information.
#
# In each case, the command information consists of four fields separated with a
# period. These fields are the command's name, its thread priority, its stack size
# and the name of the function to call when starting the thread.
#
BUILTIN_CSRC = $(WORK_DIR)builtin_commands.c
# command definitions from modules (may be empty at Makefile parsing time...)
MODULE_COMMANDS = $(subst COMMAND.,,$(notdir $(wildcard $(WORK_DIR)builtin_commands/COMMAND.*)))
# We must have at least one pre-defined builtin command in order to generate
# any of this.
#
ifneq ($(BUILTIN_COMMANDS),)
# (BUILTIN_PROTO,<cmdspec>,<outputfile>)
define BUILTIN_PROTO
$(ECHO) 'extern int $(word 4,$1)(int argc, char *argv[]);' >> $2;
endef
# (BUILTIN_DEF,<cmdspec>,<outputfile>)
define BUILTIN_DEF
$(ECHO) ' {"$(word 1,$1)", $(word 2,$1), $(word 3,$1), $(word 4,$1)},' >> $2;
endef
# Don't generate until modules have updated their command files
$(BUILTIN_CSRC): $(GLOBAL_DEPS) $(MODULE_OBJS) $(MODULE_MKFILES) $(BUILTIN_COMMAND_FILES)
@$(ECHO) "CMDS: $@"
$(Q) $(ECHO) '/* builtin command list - automatically generated, do not edit */' > $@
$(Q) $(ECHO) '#include <nuttx/config.h>' >> $@
$(Q) $(ECHO) '#include <nuttx/binfmt/builtin.h>' >> $@
$(Q) $(foreach spec,$(BUILTIN_COMMANDS),$(call BUILTIN_PROTO,$(subst ., ,$(spec)),$@))
$(Q) $(foreach spec,$(MODULE_COMMANDS),$(call BUILTIN_PROTO,$(subst ., ,$(spec)),$@))
$(Q) $(ECHO) 'const struct builtin_s g_builtins[] = {' >> $@
$(Q) $(foreach spec,$(BUILTIN_COMMANDS),$(call BUILTIN_DEF,$(subst ., ,$(spec)),$@))
$(Q) $(foreach spec,$(MODULE_COMMANDS),$(call BUILTIN_DEF,$(subst ., ,$(spec)),$@))
$(Q) $(ECHO) ' {NULL, 0, 0, NULL}' >> $@
$(Q) $(ECHO) '};' >> $@
$(Q) $(ECHO) 'const int g_builtin_count = $(words $(BUILTIN_COMMANDS) $(MODULE_COMMANDS));' >> $@
SRCS += $(BUILTIN_CSRC)
EXTRA_CLEANS += $(BUILTIN_CSRC)
ifeq ($(PX4_TARGET_OS),nuttx)
include $(MK_DIR)/nuttx/nuttx_romfs.mk
endif
################################################################################
@@ -456,17 +338,6 @@ endif
# Build rules
################################################################################
#
# What we're going to build.
#
PRODUCT_BUNDLE = $(WORK_DIR)firmware.px4
PRODUCT_BIN = $(WORK_DIR)firmware.bin
PRODUCT_ELF = $(WORK_DIR)firmware.elf
PRODUCT_PARAMXML = $(WORK_DIR)/parameters.xml
.PHONY: firmware
firmware: $(PRODUCT_BUNDLE)
#
# Object files we will generate from sources
#
@@ -487,50 +358,22 @@ $(filter %.cpp.o,$(OBJS)): $(WORK_DIR)%.cpp.o: %.cpp $(GLOBAL_DEPS)
$(filter %.S.o,$(OBJS)): $(WORK_DIR)%.S.o: %.S $(GLOBAL_DEPS)
$(call ASSEMBLE,$<,$@)
#
# Built product rules
# Include the OS specific build rules
# The rules must define the "firmware" make target
#
$(PRODUCT_BUNDLE): $(PRODUCT_BIN)
@$(ECHO) %% Generating $@
ifdef GEN_PARAM_XML
$(Q) $(PYTHON) $(PX4_BASE)/Tools/px_process_params.py --src-path $(PX4_BASE)/src --board CONFIG_ARCH_BOARD_$(CONFIG_BOARD) --xml
$(Q) $(MKFW) --prototype $(IMAGE_DIR)/$(BOARD).prototype \
--git_identity $(PX4_BASE) \
--parameter_xml $(PRODUCT_PARAMXML) \
--image $< > $@
else
$(Q) $(MKFW) --prototype $(IMAGE_DIR)/$(BOARD).prototype \
--git_identity $(PX4_BASE) \
--image $< > $@
ifeq ($(PX4_TARGET_OS),nuttx)
include $(MK_DIR)/nuttx/nuttx_px4.mk
endif
ifeq ($(PX4_TARGET_OS),posix)
include $(MK_DIR)/posix/posix_elf.mk
endif
ifeq ($(PX4_TARGET_OS),posix-arm)
include $(MK_DIR)/posix/posix_elf.mk
endif
ifeq ($(PX4_TARGET_OS),qurt)
include $(MK_DIR)/qurt/qurt_elf.mk
endif
$(PRODUCT_BIN): $(PRODUCT_ELF)
$(call SYM_TO_BIN,$<,$@)
$(PRODUCT_ELF): $(OBJS) $(MODULE_OBJS) $(LIBRARY_LIBS) $(GLOBAL_DEPS) $(LINK_DEPS) $(MODULE_MKFILES)
$(call LINK,$@,$(OBJS) $(MODULE_OBJS) $(LIBRARY_LIBS))
#
# Utility rules
#
.PHONY: upload
upload: $(PRODUCT_BUNDLE) $(PRODUCT_BIN)
$(Q) $(MAKE) -f $(PX4_MK_DIR)/upload.mk \
METHOD=serial \
CONFIG=$(CONFIG) \
BOARD=$(BOARD) \
BUNDLE=$(PRODUCT_BUNDLE) \
BIN=$(PRODUCT_BIN)
.PHONY: clean
clean: $(MODULE_CLEANS)
@$(ECHO) %% cleaning
$(Q) $(REMOVE) $(PRODUCT_BUNDLE) $(PRODUCT_BIN) $(PRODUCT_ELF)
$(Q) $(REMOVE) $(OBJS) $(DEP_INCLUDES) $(EXTRA_CLEANS)
$(Q) $(RMDIR) $(NUTTX_EXPORT_DIR)
#
# DEP_INCLUDES is defined by the toolchain include in terms of $(OBJS)
+1 -1
View File
@@ -93,7 +93,7 @@ $(info %% LIBRARY_MK = $(LIBRARY_MK))
#
# Get the board/toolchain config
#
include $(PX4_MK_DIR)/board_$(BOARD).mk
include $(PX4_MK_DIR)/$(PX4_TARGET_OS)/board_$(BOARD).mk
#
# Get the library's config
+1
View File
@@ -144,6 +144,7 @@ MODULE_ENTRYPOINT ?= $(MODULE_COMMAND)_main
MODULE_STACKSIZE ?= CONFIG_PTHREAD_STACK_DEFAULT
MODULE_PRIORITY ?= SCHED_PRIORITY_DEFAULT
MODULE_COMMANDS += $(MODULE_COMMAND).$(MODULE_PRIORITY).$(MODULE_STACKSIZE).$(MODULE_ENTRYPOINT)
CXXFLAGS += -DPX4_MAIN=$(MODULE_COMMAND)_app_main
endif
ifneq ($(MODULE_COMMANDS),)
@@ -8,4 +8,4 @@
CONFIG_ARCH = CORTEXM4F
CONFIG_BOARD = AEROCORE
include $(PX4_MK_DIR)/toolchain_gnu-arm-eabi.mk
include $(PX4_MK_DIR)/nuttx/toolchain_gnu-arm-eabi.mk

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