Compare commits

...

612 Commits

Author SHA1 Message Date
Lorenz Meier
f5efe0afb0 Merge branch 'beta' into stable 2016-02-21 01:37:36 +01:00
Lorenz Meier
73751922de Harmonize Pixracer and Pixhawk OSD API 2016-02-19 21:42:45 +01:00
Lorenz Meier
08fbfd8ab4 More autostart items for serial link 2016-02-19 20:36:36 +01:00
tumbili
1c03d3bfe5 Merge remote-tracking branch 'origin/master' into beta 2016-02-19 14:41:46 +01:00
tumbili
efe9344fc2 removed text from generic quav250 startup script because it was interpreted as a command 2016-02-19 14:37:26 +01:00
Lorenz Meier
37ae05df05 Merge branch 'master' into beta 2016-02-19 09:00:41 +01:00
Mark Whitehorn
7c91aaee64 add generic 250 quad_x config tuned for acro mode 2016-02-19 08:58:19 +01:00
Daniel Agar
7fbd4a0b5b sensors fix code style 2016-02-18 21:25:49 -05:00
Lorenz Meier
eb11c91733 Fix airspeed check in simulation 2016-02-18 22:53:43 +01:00
ksschwabe
4b6d0ef0a6 batt_smbus: Adds check for if the battery detected is a 3DR solo battery
Also, if the battery is a 3DR Solo battery, it checks for the button
press on the battery which sets the is_powering_off flag.

The check for whether the battery is a 3DR Solo battery is based on
whether the Manufacturer Name, Device Name and Device Chemistry all
match the that of the standard 3DR Solo battery.
2016-02-18 21:47:09 +01:00
ksschwabe
27a645353b batt_smbus: Adds functions for reading out the SBS Info
Functions added for reading out the following info:
 - Manufacturer Name
 - Device Name
 - Serial Number
 - Device Chemistry
2016-02-18 21:47:09 +01:00
ksschwabe
e3f2467b91 batt_smbus: Commentted out button press detection
The button press detection relies on reading the MANUFACTURER_DATA
register. The implementation of what information is returned when reading
this register differs from manufacturer to manufacturer.

This has been commented out until an elegant solution can be found to detect
the battery shutdown on different batteries manufactured by different
manufacturers.
2016-02-18 21:47:09 +01:00
Angus Peart
6ac26c680d batt_smbus: read button status from the smart battery
This is a cherry-pick of commit 8bd17a4b0cd9c1432cb57a9a80a215692f532370
in 3drobotics/PX4Firmware-solo

Conflicts:
	src/drivers/batt_smbus/batt_smbus.cpp
	src/drivers/drv_irlock.h
	src/lib/ecl
2016-02-18 21:47:09 +01:00
ksschwabe
7fc0b0925c batt_smbus: Adds ManufacturerAccess, write_reg, and write_block functions
Also fixes the the PEC calculation for writing. See
http://cache.freescale.com/files/32bit/doc/app_note/AN4471.pdf and
http://www.ti.com/lit/an/sloa132/sloa132.pdf for more details for more
details on SMBus reading and writing including with and without PECs.
2016-02-18 21:47:09 +01:00
sander
90276fa3a7 VTOL: check feasibility as rotary wing 2016-02-18 21:42:37 +01:00
Lorenz Meier
6d372e7d02 Merge branch 'master' into beta 2016-02-18 19:02:45 +01:00
Lorenz Meier
8007a84ab3 FMU: Ensure an all-low output set on boot with direct start of the PWM sequence 2016-02-18 19:01:44 +01:00
Lorenz Meier
c26b18c153 IO: Initialize PWM pins first 2016-02-18 19:01:44 +01:00
Lorenz Meier
9c08872b61 IO: Initialize PWM pins to low state 2016-02-18 19:01:44 +01:00
Lorenz Meier
19151e93e1 FMUv4: Initialize PWM pins to low state 2016-02-18 19:01:44 +01:00
Lorenz Meier
ed134da8e0 FMUv2: Initialize PWM pins to low state 2016-02-18 19:01:44 +01:00
Andreas Antener
6eb2e62306 temporarily use indicated airspeed for transitions so we're consistent with tecs until we move tecs to true airspeed 2016-02-18 18:55:56 +01:00
tumbili
228a54fd51 - fixed bad pitch setpoint in fw pos controller for tailsitter
- created enum for vtol types
- minor cleanup and fixes
2016-02-18 18:55:56 +01:00
tumbili
4c61b05ef3 tailsitter, tiltrotor:
- use the transition trust when waiting for TECS to kick in
after transition
2016-02-18 18:55:56 +01:00
Andreas Antener
0ccf0ce747 only run FW posctl in FW mode and ramp up desired airspeed for tecs after transition 2016-02-18 18:55:56 +01:00
Roman
59a571d22f TECS:
- do not run TECS for VTO which are in rotary wing mode
- reinitialise TECS the first time we start using it again
2016-02-18 18:55:56 +01:00
Andreas Antener
fe89bee02a using 0 pitch and thrust FW attitude SP when TECS isn't running 2016-02-18 18:55:56 +01:00
Andreas Antener
3773eaad99 VTOL/TECS: publish transition throttle after transition until tecs is initialized and fw pos ctl is publishing att setpoint 2016-02-18 18:55:56 +01:00
tumbili
fa52aa322a VTOL: pull up generic setpoint publishing 2016-02-18 18:55:56 +01:00
Andreas Antener
967b404de8 only run FW posctl in FW mode and ramp up desired airspeed for tecs after transition 2016-02-18 18:55:56 +01:00
Roman
1da686b125 TECS:
- do not run TECS for VTO which are in rotary wing mode
- reinitialise TECS the first time we start using it again
2016-02-18 18:55:56 +01:00
Julian Oes
1bbfb02430 position_estimator_inav: fix function declaration 2016-02-18 18:53:00 +01:00
Nate Weibley
a1c9dc1f68 When restarting listing all parameters, skip sending hash on subsequent request
This change fixes a bug where hash-aware QGC using the old spec would continuously request the parameter list every time it received a mismatched hash.
2016-02-18 18:51:17 +01:00
Nate Weibley
ae3838ff2e Remove superfluous parameter cache load message 2016-02-18 18:51:17 +01:00
Nate Weibley
0419a99f00 New param hashing spec
- When listing all params, lead with _HASH_CHECK value for cache load
 - When set value on _HASH_CHECK is rx'd, stop any ongoing listing req
2016-02-18 18:51:17 +01:00
Lorenz Meier
854660bd36 Sensors: Fix code style 2016-02-18 18:48:50 +01:00
Lorenz Meier
345246953b Airspeed pre-flight check: do not arm if sensor data is stuck or bus errors are high 2016-02-18 18:48:50 +01:00
Lorenz Meier
2aad0c079e airspeed: Populate confidence field 2016-02-18 18:48:50 +01:00
Lorenz Meier
e290bd4ebe Update to latest ECL 2016-02-18 18:48:50 +01:00
Lorenz Meier
3f9fc625f9 Airspeed: Add confidence estimate 2016-02-18 18:48:50 +01:00
tumbili
b7919e0039 initialise all tecs class members 2016-02-18 17:07:09 +01:00
tumbili
c1e1d0b031 put TECS init bug to rest:
the uncostrained demanded pitch was never initialized which
could lead to large initial pitch integral values
2016-02-18 16:29:04 +01:00
Daniel Agar
dd6549e1a2 travis-ci only build sitl on OSX 2016-02-17 23:12:26 -05:00
Lorenz Meier
f10770a4a4 FW pos ctrl: Fix build error 2016-02-17 19:31:01 +01:00
Lorenz Meier
bd606b05df Launch detector: Use idle throttle param 2016-02-17 19:31:01 +01:00
Lorenz Meier
e98cd6c746 FW pos control: Set idle throttle on ground in all modes 2016-02-17 19:31:01 +01:00
Mark Whitehorn
d5d3b63dc8 delete parameter MPC_HOLD_Z_DZ 2016-02-17 15:23:16 +01:00
Mark Whitehorn
8cd4b57c6b add parameters for adjusting ALTCTL deadband 2016-02-17 15:22:28 +01:00
Mark Whitehorn
ead3eeda6c expand description of MPC_THR_HOVER parameter 2016-02-17 15:22:28 +01:00
Mark Whitehorn
5de7c7e426 zero altctl deadband 2016-02-17 15:22:28 +01:00
Mark Whitehorn
159abb9b00 add parameter for hover throttle setting
and tighten z deadband
2016-02-17 15:22:28 +01:00
Mark Whitehorn
101ac63737 change altctl throttle deadband to 2 point curve 2016-02-17 15:21:37 +01:00
Andreas Antener
770c020117 removed lower default from vtol config, added flight tested Fun Cub parameters 2016-02-17 10:49:28 +01:00
sander
03e71c47b6 New params for QuadRanger 2016-02-17 09:00:38 +01:00
stmoon
fb131f43c3 fix the bug ( error: array subscript is above array bounds [-Werror=array-bounds] ) 2016-02-17 08:47:03 +01:00
Roman
2a556f91ed added autoconfig gains for caipiroshka 2016-02-16 22:57:09 +01:00
James Goppert
f9a11b7a2f Merge pull request #3779 from jgoppert/matrix_update
Updated matrix lib to get slice.
2016-02-16 16:28:05 -05:00
James Goppert
30cb1e6976 Updated matrix lib to get slice. 2016-02-16 14:59:18 -05:00
Lorenz Meier
a85939f66b Merge pull request #3780 from kd0aij/frsky_stack
increase stack size for frsky telemetry daemon
2016-02-16 19:22:29 +01:00
Mark Whitehorn
12437f1fc6 increase stack size for frsky telemetry daemon 2016-02-16 10:39:30 -07:00
James Goppert
a2de2bb9cb Merge pull request #3777 from jgoppert/matrix-update
Updated matrix lib.
2016-02-16 11:35:41 -05:00
James Goppert
59781167a2 Updated matrix lib. 2016-02-16 10:58:39 -05:00
Andreas Antener
48e2053f98 fixed code style 2016-02-16 10:26:13 +01:00
Roman
f11a619bf8 multirotor landing:
prevent sudden thrust setpoints when vehicle has reached ground
after landing
2016-02-16 10:26:13 +01:00
Andreas Antener
570fb97163 updated timeout logic to work only on waypoints with forced headings, updated param docs accordingly 2016-02-15 23:29:47 +01:00
Andreas Antener
eb5b8a32ee transition alignment will force heading now and go to RTL if it cannot reach it in time, handle mission failure correctly, reset after mission update, issue message with actual problem 2016-02-15 23:29:38 +01:00
Andreas Antener
bb4decfa8b implemented basic heading timeout for waypoint acceptance, added parameter for yaw error on waypoint heading acceptance, set yaw timeout for vtol default 2016-02-15 23:26:28 +01:00
Lorenz Meier
0a4d0f6eae Reaper config: Provide standby pulse 2016-02-15 16:33:13 +01:00
Lorenz Meier
a3b57c6820 Add REAPER frame 2016-02-15 16:03:22 +01:00
Lorenz Meier
4207213fc3 Set correct MAV type for quad_h mixer 2016-02-15 15:58:01 +01:00
Andreas Antener
8dbbe1b1f3 fixed code style in px4io.cpp 2016-02-15 15:55:14 +01:00
Andreas Antener
9e2e78c9ed only set PWM AUX values where necessary so the surfaces don't move to extreme positions on boot 2016-02-15 13:29:26 +01:00
Lorenz Meier
cd7001fd2f Sensors: Fix code style 2016-02-15 13:20:20 +01:00
Roman
15b0baf555 ekf2: fixed call to save parameter 2016-02-15 12:52:49 +01:00
Paul Riseborough
af5bbc916c ekf2: Enable user defeatible saving of declination for next startup 2016-02-15 12:52:49 +01:00
Paul Riseborough
2ca48037fd ekf2: Add mavlink adjustable parameters for control of magnetometer fusion 2016-02-15 12:52:49 +01:00
Paul Riseborough
384ab209fc ecl: update library reference 2016-02-15 12:52:49 +01:00
Lorenz Meier
be6278a1ba IO: Avoid param writes which do not change a value 2016-02-15 12:44:07 +01:00
Lorenz Meier
c3529d353d sensors: Do not change parameter if it already has the right default 2016-02-15 12:43:11 +01:00
Lorenz Meier
230db2e050 VTOL control: Do not spam the console 2016-02-15 12:42:20 +01:00
Lorenz Meier
2fd89ea904 ROMFS: Remove calls which messed with params 2016-02-15 12:40:57 +01:00
Lorenz Meier
17e77535bf Enable new PWM disarmed setting which allows to pick the single throttle channel. Servos stay unpowered until safety is disabled, ESC gets a standby pulse 2016-02-15 12:06:27 +01:00
Roman
1d5cf70e83 implemented vtol weathervane yaw control for landing and loiter mission item 2016-02-15 09:49:24 +01:00
sander
dc7077b125 Move constraint after feed forward 2016-02-15 09:48:37 +01:00
Andreas Antener
7db35337da use control flag to decide if we enable wv or not 2016-02-15 09:48:37 +01:00
Roman
8c2eec6161 use correct struct names for virtual topics 2016-02-15 09:48:37 +01:00
Roman
80f8fcbdf6 implemented vtol weathervane yaw control for landing and loiter mission item 2016-02-15 09:48:37 +01:00
Roman
be0f680863 orb topic messages:
-added flag to enable weathervane yaw control for vtol
-added comment to keep virtual topics and original topic identical
2016-02-15 09:48:37 +01:00
Roman
11df8168ee provide ekf2 with landed flag from landing detector 2016-02-14 21:26:47 +01:00
Roman
2177c0e18a ekf2: remove unused print functions 2016-02-14 20:51:01 +01:00
Lorenz Meier
e46824e784 MC pos control: Param meta data 2016-02-14 18:43:58 +01:00
Lorenz Meier
9cb82e93be MC att control: Param meta data 2016-02-14 18:43:58 +01:00
Lorenz Meier
6d75f11d3c Commander param meta data 2016-02-14 18:43:58 +01:00
Lorenz Meier
d2041b0ef3 Fix initial build error for new users 2016-02-14 17:37:28 +01:00
Andreas Antener
b9b05dcc03 updated docs for FW_AIRSPD_SCALE param 2016-02-14 13:24:58 +01:00
Lorenz Meier
de8c4c9901 Pixracer: Increase streams and data rate via Wifi 2016-02-13 23:32:22 +01:00
Lorenz Meier
07a0da9114 jMAVSim: Update to fixed version with declination support 2016-02-13 11:41:05 +01:00
Lorenz Meier
f53b3ae49d Commander: Fix comment 2016-02-13 11:40:41 +01:00
Lorenz Meier
df28f970fa CMake: Fix submodule init 2016-02-13 11:40:24 +01:00
Lorenz Meier
fbb201845b Fix check submodules 2016-02-13 11:39:51 +01:00
Lorenz Meier
f577f2efb0 Updated check submodules 2016-02-13 11:15:13 +01:00
Lorenz Meier
ee4784ab25 Updated DriverFramework 2016-02-13 11:15:04 +01:00
Lorenz Meier
c5b1e791bd Update git check script. Fixes #3733 2016-02-13 00:50:06 +01:00
Andreas Antener
f8915104e0 use multi subscribe to get topics for sdlog 2016-02-12 13:56:03 +01:00
Lorenz Meier
590e8df8d0 Fix actuator output logging for good 2016-02-12 10:50:10 +01:00
sander
581623cd48 Fix for transition failsafe 2016-02-11 23:38:30 +01:00
Lorenz Meier
6e8f563d27 dataman: Do not reset mission file on each reboot 2016-02-11 18:40:18 +01:00
James Goppert
612d80a59a Removed inav from startup. 2016-02-11 17:31:38 +01:00
James Goppert
9172c7c491 Added lpe flow gazebo config. 2016-02-11 17:31:38 +01:00
Andreas Antener
2ff9fd64b1 increased stack sizes for mc and fw pos ctl 2016-02-11 16:53:35 +01:00
Roman
38ecec86f7 mc pos control:
do not run takeoff code when disarmed
2016-02-11 16:53:35 +01:00
Andreas Antener
ff43c1ab6a disable yaw on takeoff wp before heading update 2016-02-11 16:53:35 +01:00
Lorenz Meier
6d32b8f41d Fixed camera trigger code style 2016-02-11 14:09:13 +01:00
Lorenz Meier
6ee8e148a2 Camera trigger: ensure it executes with minimal latency 2016-02-11 14:09:13 +01:00
Lorenz Meier
41883a08d8 camera_trigger: Add one-shot operation 2016-02-11 14:09:13 +01:00
Lorenz Meier
32d9bae44d Pos control FW: Update comment 2016-02-11 14:08:58 +01:00
Lorenz Meier
ebeb9eba4b Cleaned up target system handling for some commands 2016-02-11 11:58:06 +01:00
Andreas Antener
a8e3194dfa reset transition failsafe state after switching out of failed transition mode 2016-02-10 19:03:24 +01:00
Andreas Antener
5b8b445425 consider transition command for the correct state 2016-02-10 18:36:38 +01:00
sander
d5eae460c0 VTOL transition failsafe RTL 2016-02-10 16:30:57 +01:00
sander
2fa7380246 Front transition timeout 2016-02-10 16:15:15 +01:00
ChristophTobler
519a7e2c8e added different distance_sensor_pub pointers for flow, hil and lidar 2016-02-10 09:24:39 +01:00
ChristophTobler
f2af55d92f changed min/max distance for ll40ls (lidar) 2016-02-10 09:24:39 +01:00
ChristophTobler
19bc39e7ad added a offset parameter for lidar in inav 2016-02-10 09:24:39 +01:00
ChristophTobler
0a76347c9d Changed min/max distance with distance topic params. Added a check for mocap: mocap estimation requires heading from mocap 2016-02-10 09:24:39 +01:00
Lorenz Meier
e8344de38a Iris: Add custom startup script 2016-02-10 09:24:39 +01:00
Lorenz Meier
b4b385cc13 Add Iris optical flow SITL config 2016-02-10 09:24:39 +01:00
ChristophTobler
c7640723c9 change std::fabs to fabs and rate_threshold to double 2016-02-10 09:24:39 +01:00
ChristophTobler
c7ff253a6d change abs to std::fabs 2016-02-10 09:24:39 +01:00
ChristophTobler
e7cdb19424 gyro threshold for optical flow and lidar min/max parameter 2016-02-10 09:24:39 +01:00
ChristophTobler
a78d732957 change lidar altitude correction threshold 2016-02-10 09:24:39 +01:00
ChristophTobler
e2c04b7fa7 replaced lidar min/max distances with parameters 2016-02-10 09:24:39 +01:00
ChristophTobler
1a6c4e123c formatting 2016-02-10 09:24:39 +01:00
ChristophTobler
f822b136dc change optical flow weight and scale 2016-02-10 09:24:39 +01:00
ChristophTobler
82be3d09d6 added optical flow scale and removed blanks 2016-02-10 09:24:39 +01:00
ChristophTobler
f32021f856 remove lidar filter value from qgc params 2016-02-10 09:24:39 +01:00
ChristophTobler
23f428d639 removed lowpass for lidar correction 2016-02-10 09:24:39 +01:00
ChristophTobler
42131e817d changed value for lidar filter 2016-02-10 09:24:39 +01:00
ChristophTobler
b54bc23550 fix in flow yaw compensation 2016-02-10 09:24:39 +01:00
ChristophTobler
6650bca35b decoupled lidar from flow and used it for altitude estimation. qgc params added to enable it. 2016-02-10 09:24:39 +01:00
Mark Whitehorn
42e8fe159f run astyle 2016-02-10 09:23:30 +01:00
Mark Whitehorn
cca2807ff0 apply 1st order lowpass filter to baro alt 2016-02-10 09:23:30 +01:00
Mark Whitehorn
b25a9a45b5 initial add of Vario sensor. 1st difference of baro_alt... need to add a
LPF in front of the difference
2016-02-10 09:23:30 +01:00
Mark Whitehorn
403810c688 disable console print of incoming telemetry data 2016-02-10 09:21:52 +01:00
Mark Whitehorn
e25b26e2a8 fix format 2016-02-10 09:21:52 +01:00
Mark Whitehorn
de39b63402 fix bug in rssi assignment 2016-02-10 09:21:52 +01:00
Mark Whitehorn
8116f15d95 enable print of incoming telemetry 2016-02-10 09:21:52 +01:00
Mark Whitehorn
47337eb4a5 add parsing of host frames for D type telemetry 2016-02-10 09:21:52 +01:00
Lorenz Meier
3edf304e55 EKF2: Fix home altitude reporting 2016-02-10 08:38:03 +01:00
Lorenz Meier
aab63c78f9 Update ECL to include global alt fix 2016-02-10 08:30:19 +01:00
Lorenz Meier
419fa45657 Change SDLOG2 to blackbox in user-facing output 2016-02-10 08:29:26 +01:00
Lorenz Meier
84552d475e jMAVSim: Enable Zurich as location, enable mag decl lookup 2016-02-10 08:29:26 +01:00
Lorenz Meier
62d685440a Posix: Do not spam console with tone alarm 2016-02-09 21:46:10 +01:00
Lorenz Meier
e59323c7d7 Commander: Do not announce home via MAVLink 2016-02-09 21:45:56 +01:00
Lorenz Meier
3e02bb1070 MAVLink: Improve network handling 2016-02-09 12:51:05 +01:00
Andreas Antener
fb8b981015 make FOH and yaw mode work in parallel 2016-02-08 23:36:07 +01:00
Andreas Antener
a63197b82b prevent home yaw mode for vtol during transitions 2016-02-08 11:09:12 +01:00
Andreas Antener
e60cd46ad0 removed duplicate and unused flag vtol_in_transition 2016-02-08 11:09:12 +01:00
Andreas Antener
7af0816570 fixed yaw calculation for all yaw modes and stay during loiter items 2016-02-08 11:09:12 +01:00
Andreas Antener
20ef3adb1f set relative altitude to false when using the feedback for the landing waypint 2016-02-08 11:09:12 +01:00
Andreas Antener
baa11e357d refactored do_set_servo handling and generalized formatting of CMD mavlink mission items, fixes #3644 2016-02-08 11:09:12 +01:00
Andreas Antener
46bd1cbacf only update previous setpoint if we read a new actual position setpoin, prevent yawing between waypoints inside the acceptance radius 2016-02-08 11:09:12 +01:00
Andreas Antener
4e0559eacf updated mpc parameters for sitl standard vtol 2016-02-08 11:09:12 +01:00
Andreas Antener
134e95efda don't use waypoint heading for landing descent 2016-02-08 11:09:12 +01:00
Andreas Antener
b05465470a ignore wp altitude for intermediate landing wp so it doesn't descent before it is in landing mode 2016-02-08 11:09:12 +01:00
Andreas Antener
fec7950424 prevent yaw setpoint from changeing constantly when we're over it 2016-02-08 11:09:12 +01:00
Andreas Antener
26c635359e updated some message severities and clarified reset in pos controller 2016-02-08 11:09:11 +01:00
Andreas Antener
e2328fcd72 use default acceptance radius for takeoff in MC case, set VTOL radius to 3 2016-02-08 11:09:11 +01:00
Andreas Antener
e32ec2a29a wait until until vehicle enters transition before continuing after transition command 2016-02-08 11:09:11 +01:00
Andreas Antener
1351c6f68c small fixes 2016-02-08 11:09:11 +01:00
tumbili
f8f208dbe6 vtol: reset multirotor positon and altitude
when not in rotary wing mode
2016-02-08 11:09:11 +01:00
Andreas Antener
dfb31f2252 finish moving to waypoint after a back transition 2016-02-08 11:09:11 +01:00
Andreas Antener
0bdfb465cf set correct mission item type for aligning before transition 2016-02-08 11:09:11 +01:00
Andreas Antener
c11a677207 directly issue status update after vtol update 2016-02-08 11:09:11 +01:00
Andreas Antener
ff47cae7c1 removed warning 2016-02-08 11:09:11 +01:00
Andreas Antener
02aa0eacd5 align towards next waypoint before MC to FW transition 2016-02-08 11:09:11 +01:00
Andreas Antener
b75eaf3c4a implemented takeoff before WP and move to WP before land 2016-02-08 11:09:10 +01:00
Andreas Antener
ac985ee1c7 fixed mission item iteration 2016-02-08 11:09:10 +01:00
Andreas Antener
93bc018c93 read current and next mission item at the same time, issue item commands while processing items, guarding setpoint from non-position items 2016-02-08 11:09:10 +01:00
sander
9e0c636b97 RTL transition set constant 2016-02-07 18:19:32 +01:00
sander
9ad39fec67 If VTOL then transition to RW before landing in RTL 2016-02-07 18:19:32 +01:00
sander
949b0738e1 Remove run-once procedure on check_dist_1wp 2016-02-07 17:56:10 +01:00
Lorenz Meier
a8d00ee46f Update mag declination code in SITL Gazebo 2016-02-07 15:06:58 +01:00
Lorenz Meier
f91520730b Correct declination math. Allows to properly simulate declination in various locations 2016-02-07 12:30:28 +01:00
Lorenz Meier
630ad18c8d Update SITL gazebo 2016-02-07 12:10:46 +01:00
Lorenz Meier
8a42b312ef Add Gazebo version with mag declination 2016-02-07 12:00:59 +01:00
Andreas Antener
7a592d56a2 initialize mission item struct 2016-02-07 11:36:03 +01:00
Andreas Antener
48ea0230e1 minimum clearance for separate takeoff item needs to be bigger than acceptance radius 2016-02-07 01:32:34 +01:00
Andreas Antener
248bbcb520 use system specific acceptance radius for multirotor takeoff, ignore mission item 2016-02-07 01:32:34 +01:00
Lorenz Meier
9583ff1b8b Add memory debugging switch support 2016-02-07 01:32:03 +01:00
Lorenz Meier
3bdcb203f4 SITL: Fix compile errors 2016-02-06 17:03:24 +01:00
Lorenz Meier
336a464ed3 Updated SITL Gazebo to master merged with VTOL 2016-02-06 16:42:36 +01:00
Lorenz Meier
8c56f38ea6 Add missing reboot required flag 2016-02-06 16:25:52 +01:00
Lorenz Meier
b1a16c711e Param meta data: Validate new enum value entries 2016-02-06 16:19:46 +01:00
Lorenz Meier
8ba1132660 Companion link: Support enums 2016-02-06 16:12:19 +01:00
Lorenz Meier
203416f136 PX4 params: Support enum values 2016-02-06 16:11:58 +01:00
Lorenz Meier
1aff724ee2 Reject loiter turns 2016-02-06 13:42:03 +01:00
Lorenz Meier
7345440a1a Enable TELEM2 in OSD mode by default 2016-02-06 13:41:48 +01:00
Lorenz Meier
45ea58d451 FMUv4: Increase USB and UART buffers to speed up log transfers 2016-02-06 12:23:04 +01:00
Lorenz Meier
65081ca681 FMUv2: Increase USB buffer to speed up log transfers 2016-02-06 12:22:40 +01:00
Roman
fcf642fe4e fixed bad formating of ekf2 CMakeFile 2016-02-05 18:28:32 +01:00
Paul Riseborough
371e5f70b1 ekf2: fix formatting 2016-02-05 18:28:32 +01:00
Paul Riseborough
2db2d8f6f4 lib: update ecl reference 2016-02-05 18:28:32 +01:00
Paul Riseborough
a37daf4cec ekf2: Add position observation noise parameter for flying without GPS
A larger position uncertainty is required when flying without GPS to reduce tilt attitude estimation errors caused by vehicle manoeuvring. This needs to be tuneable to allow optimisation for different use cases (e.g. outdoor vs indoor).
2016-02-05 18:28:32 +01:00
Paul Riseborough
8f020d5a8f ekf2: Update tuning parameters
Set conservative defaults as a baseline for tuning
Add a missing parameter for magnetometer observation noise.
Correct error in definition of magnetic heading observations noise (previous parameter defined the variance directly, not the noise).
Update documentation and display names for consistency.
2016-02-05 18:28:32 +01:00
Lorenz Meier
4123da4963 SF10a: Run driver at the default max rate 2016-02-05 18:24:24 +01:00
ecmnet
9eb46fa7a0 Conversion rate comment added 2016-02-05 18:23:39 +01:00
ecmnet
497982aa4a Overclocking comment added 2016-02-05 18:23:32 +01:00
ecmnet
f725ded9d4 Fixing code styles 2016-02-05 18:23:22 +01:00
ecmnet
edfbb90656 Initial commit SF10x driver 2016-02-05 18:23:13 +01:00
Roman
fdc0ef00b3 fix TECS logging 2016-02-05 17:14:10 +01:00
Lorenz Meier
15e7b19991 uORB: Block on simulation delay for orb_check() calls as well 2016-02-05 16:36:43 +01:00
Lorenz Meier
39ee36a8ea Pre-empt HRT execution in SITL if simulator is slow 2016-02-05 09:24:59 +01:00
Lorenz Meier
5f93f04627 HRT: Fix code style 2016-02-05 09:16:53 +01:00
Lorenz Meier
ac788ad5dc MAVLink: Fix code style 2016-02-05 09:16:41 +01:00
Lorenz Meier
f5c5f4757d sensors: Fix code style 2016-02-05 09:16:28 +01:00
Lorenz Meier
9f2498af94 Attitude controller: Include process name in poll error message 2016-02-05 00:54:40 +01:00
Lorenz Meier
14946f11c1 Commander: Include process name in poll error message 2016-02-05 00:54:19 +01:00
Lorenz Meier
443a58cafe px4_poll() on POSIX: Block execution in simulation if required 2016-02-05 00:53:58 +01:00
Lorenz Meier
8e62c9eb8d Use delay API 2016-02-05 00:53:22 +01:00
Lorenz Meier
61fac4a127 HRT: Support delay API 2016-02-05 00:53:08 +01:00
Lorenz Meier
d8892eb86d Navigator: Announce app name in poll error return 2016-02-05 00:52:35 +01:00
Lorenz Meier
4990272b19 Sensors: Do not fail over to non-existent gyro sub. Do not fail over on POSIX / sim 2016-02-05 00:52:12 +01:00
sander
fdcfb7c7c6 Mission feasibility fixes
- Fixes https://github.com/PX4/Firmware/issues/3656
- Fixes https://github.com/PX4/Firmware/issues/3648
- Corrected spelling on method
2016-02-04 20:44:35 +01:00
David Sidrane
0bde2b6fa3 Fixed Channel mapping 2016-02-04 08:56:07 +01:00
David Sidrane
7541aecd18 Fixed Isr restore (moved out of loop) 2016-02-04 08:56:07 +01:00
Lorenz Meier
80c532acf1 Merge pull request #3660 from PX4/mavlink_frame_fix
Mavlink read back frame fix
2016-02-03 13:09:06 +01:00
sander
f0bad06bfd Fixes https://github.com/PX4/Firmware/issues/3658 2016-02-03 11:48:42 +01:00
Andreas Antener
0aff2e6c09 limit takeoff and land velocity to max z velocity 2016-02-02 21:35:18 +01:00
Lorenz Meier
6a98c6ca63 Airframes XML generator: Add support for Octo Coax Wide 2016-02-02 08:31:32 +01:00
Simon Wilks
9a8050cc11 Add Steadidrone MAVRIK mixer and gains. 2016-02-02 08:31:08 +01:00
Lorenz Meier
86c8308e98 POSIX configs: Send to port 14540 for onboard links 2016-02-01 11:20:04 +01:00
Lorenz Meier
b7470794c7 MAVLink: Send to first target system by default 2016-02-01 11:19:46 +01:00
Julian Oes
b44f20d705 mavlink: option to specify the UDP remote port
This enables using several mavlink instances for SITL.
2016-02-01 11:15:21 +01:00
Lorenz Meier
3d282e4ee8 Flag locations in PWM input driver needing refactoring 2016-02-01 10:10:36 +01:00
Lorenz Meier
61bb8ac603 FMUv4: Do not mess with GPIO5 during startup 2016-02-01 10:10:36 +01:00
Lorenz Meier
f2a6645cc9 FMUv2: Do not mess with GPIO5 during startup 2016-02-01 10:10:35 +01:00
David Sidrane
7edd07f8cb Rebased on master, removing the default_rate field and using default to 0 for rates 2016-02-01 10:10:35 +01:00
David Sidrane
0d13c41108 Ran Astyle 2016-02-01 10:10:35 +01:00
David Sidrane
8268161b18 Fmu interface to Capture 2016-02-01 10:10:35 +01:00
David Sidrane
b3af469e80 IO Timer Changes for Capture 2016-02-01 10:10:35 +01:00
David Sidrane
0397537cf0 Adding input capture driver 2016-02-01 10:10:35 +01:00
David Sidrane
f3c22d3334 Refactored pwm servo to use drv_io_timer 2016-02-01 10:10:35 +01:00
David Sidrane
2949578832 Renamed pwm_timers to more appropriate io timers for use in pwm in/out and capture 2016-02-01 10:10:34 +01:00
David Sidrane
019e197714 Change pin init state to 1 to uses late pwm init with not pulses 2016-02-01 10:10:34 +01:00
David Sidrane
5e47ffdaf9 Moved Switching IO to the point of ARMing 2016-02-01 10:10:34 +01:00
David Sidrane
1843eea917 Reverting 2e8accc6ffd5e1c2f37d31b09d6968a1e4af31ba infavor of IO init changes 2016-02-01 10:10:34 +01:00
Pavel Kirienko
1454e2acba Libuavcan update: Reduces STM32 CAN IRQ overhead with new error handling logic 2016-02-01 08:16:11 +01:00
nephne
43553eacce add cscope.in.out cscopte.po.out to .gitignore 2016-02-01 08:15:29 +01:00
Lorenz Meier
c8bd81b739 Updated ECL to use standard C++ initializers 2016-01-31 23:25:27 +01:00
Roman
c75cc75d25 ekf2 module: be consistent in constructor 2016-01-31 22:28:19 +01:00
Paul Riseborough
904319f889 lib: update ecl reference 2016-01-31 22:12:11 +01:00
bugobliterator
0f43a1ebbb ekf2: fix code style 2016-01-31 22:12:11 +01:00
bugobliterator
04ad8ca594 ekf: change the name of estimatorr interface class 2016-01-31 22:12:11 +01:00
Paul Riseborough
92f0032475 ekf2: Add tuning parameters for GPS and Baro innovation gates 2016-01-31 22:12:11 +01:00
bugobliterator
6ffcca4b8f ekf2_main: fix variable pass type 2016-01-31 22:12:11 +01:00
Paul Riseborough
92f2492fff ekf2: update interface method for vehicle arm status and NED origin 2016-01-31 22:12:11 +01:00
Paul Riseborough
4594b3c69d ekf2: Add parameters for magnetometer error checks 2016-01-31 22:12:11 +01:00
Paul Riseborough
5e4f76d844 ekf2: Add parameters and support for GPS quality checks 2016-01-31 22:12:11 +01:00
Paul Riseborough
bfd182d12e msg: Add GPS check status to estimator_status uORB topic 2016-01-31 22:12:11 +01:00
Lorenz Meier
8167f729ad MAVLink app: Fix NuttX compilation error 2016-01-31 22:04:39 +01:00
Lorenz Meier
c78fd7014d MC: Only use auto yaw limits if manual control is off 2016-01-31 20:18:12 +01:00
Lorenz Meier
7455a833d0 MC: Split yaw speed limiting between manual and velocity control modes 2016-01-31 20:18:12 +01:00
Lorenz Meier
56cd54ab71 MAVLink app: Fix network code to always prefer localhost, work still with remote targets 2016-01-31 20:16:26 +01:00
Lorenz Meier
5f8ee1ea1a Update caipirinha config 2016-01-31 15:14:34 +01:00
Lorenz Meier
069471a62c Commander: Indicate error number on failure 2016-01-31 14:53:54 +01:00
Lorenz Meier
260b77dd78 MPU9250: Make check return values more discriminative 2016-01-31 14:53:40 +01:00
Holger Steinhaus
1245b50ef5 fix typo 2016-01-31 14:53:04 +01:00
Lorenz Meier
f50aba844f CAN config: Drop default D gains 2016-01-29 11:40:37 +01:00
Lorenz Meier
7104a853c9 Firefly: drop D gain 2016-01-29 11:40:17 +01:00
Lorenz Meier
6a74f2c69d F450: Fix default gain 2016-01-29 11:40:04 +01:00
Holger Steinhaus
76da9ab82b Set default node id to 1, default bitrate to 1M 2016-01-29 09:19:57 +01:00
Holger Steinhaus
8d66e1c0ef Renamed shadowed variable 2016-01-29 09:06:33 +01:00
Mark Whitehorn
7b7da618b8 format and disable some warnx output 2016-01-29 09:02:34 +01:00
Mark Whitehorn
81ae5cbd0d check for incoming D type telemetry packet (RX also connected to telemetry port) 2016-01-29 09:02:22 +01:00
Andrew Tridgell
b8a60f2501 pwm: change default_value for all boards from 1000 to 0
the value '1000' is not really magic, and it was resulting in sending
a single 1ms pulse on all IO channels for a brief instant on
startup. With some servos this led to the control surfaces being at
extremes (and straining) on startup. It may also contribute to making
ESC calibration harder on multi-rotors

In the worst case it could cause a IC motor with reverse throttle to
go full throttle on startup

A logic analyser shows the problem very clearly. Changing the
default_value fields to 0 from 1000 fixes the issue and no pulses are
generated until an explicit value suitable for the airframe is
provided via one of the many methods PWM output values can be
generated

Conflicts:
	src/drivers/boards/px4fmu-v4/px4fmu_pwm_servo.c
	src/lib/ecl
2016-01-29 08:57:20 +01:00
Andreas Antener
e6db5e2db1 set all outputs for firefly 2016-01-27 15:07:11 +01:00
Andreas Antener
1363e4aa8f use 400Hz for motor outs in vtol configs, fixes #3609 2016-01-27 15:06:58 +01:00
Lorenz Meier
cc79299375 Merge branch 'master' into stable 2016-01-27 14:08:53 +01:00
Lorenz Meier
1e7cfae683 Merge branch 'master' into beta 2016-01-27 14:08:33 +01:00
Roman
f35e3335be - only use takeoff strategy when in auto mode
- after jumped takeoff set previous vel setpoint such
that thrust setpoint is continuous
2016-01-27 11:47:41 +01:00
Lorenz Meier
f2af8a5a5d IO Firmware: Reduce unnecessary buffer space 2016-01-27 09:56:20 +01:00
Lorenz Meier
b54a0308a7 IO: Do not allocate excessive UART buffers 2016-01-27 09:56:20 +01:00
Roman
ba169ce0b5 do not do jumped takeoff if already in air 2016-01-27 09:55:47 +01:00
Andreas Antener
3928924c43 RTL was broken by a recent change, revert
Revert "for multicopter landings make sure that the copter moves"

This reverts commit ad1058d3742bbfa9cbd16648aa2925fa1e618a55.
2016-01-26 15:53:52 +01:00
Lorenz Meier
5ea5ecf32b Limit manual yaw command properly. Fixes #3600 2016-01-26 14:08:43 +01:00
Roman
c9b1fb154d hotfix:
multirotors shouldn't use tailsitter recovery code.
2016-01-26 13:29:53 +01:00
Lorenz Meier
e11fff3011 Fix tests stack space 2016-01-26 12:58:17 +01:00
Lorenz Meier
17c3aa3bac MC att control: Slightly increase max yaw rate 2016-01-26 12:32:26 +01:00
Lorenz Meier
fcbd717200 Switch POSIX sitl to EKF2 per default 2016-01-25 22:42:53 +01:00
Lorenz Meier
6c13cef85e Lister: Add missing uint16 2016-01-25 21:46:07 +01:00
James Goppert
4cb1f8a440 Updated matrix for euler wrap fix. 2016-01-25 21:23:11 +01:00
Julian Oes
166f6e2e7a posix sitl: bring the pxh back 2016-01-25 21:22:10 +01:00
Julian Oes
6ce5e1be49 posix sitl: don't exit if a command fails 2016-01-25 19:03:48 +01:00
Julian Oes
563460444a ekf2: get the rad to deg conversion right 2016-01-25 19:03:16 +01:00
Julian Oes
28754d3f58 ekf2: don't reset GPS position in every loop 2016-01-25 19:03:16 +01:00
Lorenz Meier
9d5728b96f FMU: Default to 900 us pulses 2016-01-25 12:08:26 +01:00
Lorenz Meier
2e8accc6ff FMU driver: Only init pins right before using the for PWM. Prevents accidental pulses 2016-01-25 12:08:08 +01:00
Lorenz Meier
d32d533d11 FMUv4: Disable unused ADC channels 2016-01-25 12:07:38 +01:00
Lorenz Meier
9cccc0ec76 GPS: Do initial zero value publication to avoid corner cases 2016-01-25 09:30:45 +01:00
Lorenz Meier
6eac78d675 Sensors: Code style fix 2016-01-24 16:34:49 +01:00
Lorenz Meier
081da8bb7f Navigator: Force yaw pointing towards waypoint for all cases 2016-01-24 16:34:36 +01:00
Lorenz Meier
737fe1fc7f Always perform yaw SP generation, not only in multicopter mode 2016-01-24 16:30:21 +01:00
Lorenz Meier
b2237ce525 Current scaling: Employ per-board defaults 2016-01-24 16:02:21 +01:00
Julian Oes
4b55c5276e px_romfs_pruner.py: fix indenting 2016-01-24 15:46:29 +01:00
Julian Oes
443592136b px_romfs_pruner.py: PEP8ify and whitespace
- Changed from 8 spaces indent back to 4 which I find appropriate for
  Python.
- Fixed linelength to 80 chars.
2016-01-24 15:46:29 +01:00
Julian Oes
6e26d1b8dc px_romfs_pruner.py: ignore files starting with . 2016-01-24 15:46:29 +01:00
Lorenz Meier
9169a585bf Deprecate ROS target 2016-01-24 15:21:17 +01:00
Artem Sabadyr
a284b77c7b gps advertise fix 2016-01-24 15:03:41 +01:00
Lorenz Meier
06b496e257 Navigator: Only set acceptance radius based on navigation capabilities for fixed wing flight. 2016-01-24 14:08:41 +01:00
Lorenz Meier
fb21654807 PX4 airframes: Fix XML parser 2016-01-24 13:22:45 +01:00
Lorenz Meier
69d4b1b692 Fix config meta data 2016-01-24 13:22:25 +01:00
Mark Whitehorn
d96a17adfb missed some name changes from sPort to frsky 2016-01-24 11:22:18 +01:00
Mark Whitehorn
cfc3af8374 update fmu-v4 cmake config 2016-01-24 11:22:18 +01:00
Mark Whitehorn
527fe4b374 remove sPort_telemetry directory 2016-01-24 11:22:18 +01:00
Mark Whitehorn
c81c34b147 add sPort telemetry handling into frsky_telemetry daemon 2016-01-24 11:22:18 +01:00
Mark Whitehorn
8f8b4485f1 change rcS to start frsky_telemetry daemon for FMUv4 2016-01-24 11:22:18 +01:00
Mark Whitehorn
29d759768e clean up structure 2016-01-24 11:22:18 +01:00
Mark Whitehorn
42f9079683 move sPort_telemetry.c to src/drivers/frsky_telemetry and rename daemon
to frsky_telemetry
2016-01-24 11:22:18 +01:00
Mark Whitehorn
528e2826d5 run astyle 2016-01-24 11:22:18 +01:00
Mark Whitehorn
3b9ef1cef5 reduce reporting frequency for smartport sensors. reduces CPU load to
approx. 1%
2016-01-24 11:22:18 +01:00
Mark Whitehorn
4f55ae5306 add D type telemetry fallback to sPort_telemetry daemon 2016-01-24 11:22:18 +01:00
Mark Whitehorn
a402b3beeb change frsky_telemetry default port to USART8 for pixracer
add a 50msec timeout to poll calls in sPort_telemetry to prevent hangs
2016-01-24 11:22:18 +01:00
Mark Whitehorn
8d089d95d4 change baro altitude scaling to 100 to match OpenTX "custom" altitude
mode
2016-01-24 11:22:18 +01:00
Mark Whitehorn
52ebbda5ac add conditional start of sPort_telemetry daemon for FMUv4 to rcS 2016-01-24 11:22:18 +01:00
Mark Whitehorn
99286db832 running astyle inside QtCreator doesn't guarantee that travis will pass
format checks
2016-01-24 11:22:18 +01:00
Mark Whitehorn
6cb631716a corrected scales for OpenTX 2.1.7 as specified in the comments 2016-01-24 11:22:18 +01:00
Mark Whitehorn
4e4d1a98f6 update comments on scale factors 2016-01-24 11:22:18 +01:00
Mark Whitehorn
ea4937491b fix scale factor for VFAS: battery voltage report 2016-01-24 11:22:18 +01:00
Mark Whitehorn
bbc03731c7 initial implementation of 5 virtual sensors for Bat V,I, Baro alt, Fuel
and GPS speed. Voltage and current scaling can be set in OpenTX. Fuel is
in percent. Alt in meters. Need to look at what OpenTX wants for speed.
2016-01-24 11:22:18 +01:00
Mark Whitehorn
82bb0564e2 fix byte stuffing typo and add comments 2016-01-24 11:22:18 +01:00
Mark Whitehorn
8949a88f25 fix CRC calc and add battery voltage report 2016-01-24 11:22:18 +01:00
Mark Whitehorn
ff690dda80 increase priority of sPort_telemetry to 200 2016-01-24 11:22:18 +01:00
Mark Whitehorn
bb565f5d6a add sPort_telemetry cmd to fmu-v4 module list and change default port to ttyS6/usart8 2016-01-24 11:22:18 +01:00
Mark Whitehorn
214709dc89 move smartport telemetry to new module 2016-01-24 11:22:18 +01:00
Mark Whitehorn
47dcf71554 initial test of FrSky SmartPort telemetry 2016-01-24 11:22:18 +01:00
sander
9a8e94bb68 Reject mission when starting with LAND and vehicle is landed 2016-01-24 11:19:00 +01:00
James Goppert
759b107468 Update LPE sitl init script. 2016-01-24 05:16:02 -05:00
Lorenz Meier
bf03b8cb18 Yaw rate limit: use a lower limit for less twitching 2016-01-24 11:13:47 +01:00
Lorenz Meier
e2fd2f466e UDP testing for Linux folks 2016-01-24 11:13:47 +01:00
James Goppert
cfd8173687 Merge pull request #3574 from PX4/matrix_update
Matrix update.
2016-01-24 03:16:01 -05:00
James Goppert
c6d30315d9 Matrix update. 2016-01-24 02:45:24 -05:00
Lorenz Meier
03434a0b9e Start 3rd MAVLink instance on OSD port 2016-01-23 18:25:19 +01:00
Lorenz Meier
e17f344119 MAVLink: Enable 4 streams and fix OSD rate configuration 2016-01-23 18:25:19 +01:00
Lorenz Meier
c2aaeefa6c sdlog2: Log actuator output group 1 as well 2016-01-23 16:02:18 +01:00
Lorenz Meier
f52ce2001d Param lib: fix code style 2016-01-23 14:29:15 +01:00
Lorenz Meier
4b893053a0 param: Lock read operation 2016-01-23 13:32:52 +01:00
Lorenz Meier
b37082e390 MS5611: Run SPI bus faster 2016-01-23 13:32:42 +01:00
Lorenz Meier
99068aebac FMUv4: Run FRAM bus faster 2016-01-23 13:32:32 +01:00
Lorenz Meier
c18d31ce41 Param write: Support locking the bus 2016-01-23 13:23:53 +01:00
Lorenz Meier
1474ddbb78 MS5611: Ensure to set the lockmode at the right location 2016-01-23 13:23:32 +01:00
Roman
0102e47708 for multicopter landings make sure that the copter moves
to the landing waypoint first before the descending phase starts
2016-01-22 18:27:13 +01:00
Lorenz Meier
871b4b482e Do not enable new bus sync yet 2016-01-22 18:07:27 +01:00
Lorenz Meier
c659d7851f MS5611: Use the right locking mechanism on Pixracer 2016-01-22 17:12:13 +01:00
Lorenz Meier
e88367d722 SPI: Support setting the lock mode 2016-01-22 17:11:46 +01:00
tumbili
7a8ef6c0e4 elc ekf2:
support logging
2016-01-22 14:24:36 +01:00
Roman
c185a12c8e log ekf2 innovations and innovation variances 2016-01-22 14:24:36 +01:00
Roman
21f7641e8d log ekf2 estimator status 2016-01-22 14:24:36 +01:00
Roman
67eed88767 added message for ekf2 innovations message 2016-01-22 14:24:36 +01:00
Lorenz Meier
7452cfdf63 EKF2: Fix polling code 2016-01-22 14:21:19 +01:00
Lorenz Meier
f460e95554 Param: Increase robustness of default save command 2016-01-22 14:21:09 +01:00
Lorenz Meier
1cfa9d924d Fixed ekf2 stop / start routine 2016-01-22 12:07:17 +01:00
Lorenz Meier
08ef2e8a1c Param command: Increase stack as needed 2016-01-22 11:58:18 +01:00
Andreas Antener
9e2dd7aab6 landing without thrust limiting 2016-01-22 11:51:38 +01:00
Roman
7a8adaa591 multirotor landinging sudden fall protection:
remove condition which made activation of the protection
very unlikely
2016-01-22 11:51:38 +01:00
Lorenz Meier
c32938d2a8 EKF2: Update params only as they change 2016-01-22 11:45:29 +01:00
tumbili
93a9032f87 ekf2: parameter cleanup 2016-01-22 11:40:35 +01:00
tumbili
b6cf1b54f9 ecl ekf2: added default parameter values 2016-01-22 11:40:35 +01:00
Lorenz Meier
15b72045ce Param command: Auto-save after set 2016-01-22 11:36:14 +01:00
Lorenz Meier
3a43038583 Params: Provide set and save API 2016-01-22 11:35:56 +01:00
Lorenz Meier
85c49ff642 Commander: Do not save params on already saved param update 2016-01-22 11:33:40 +01:00
Lorenz Meier
19b81b9ab2 Commander: Rate-limit preflight check 2016-01-22 11:31:39 +01:00
David Sidrane
9c6f4de753 Fixes buffer overwrite on CONFIG_ARCH_BOARD_AEROCORE 2016-01-22 00:22:26 +01:00
Andreas Antener
4614511474 use set takeoff speed 2016-01-21 10:18:13 +01:00
Roman
7817924aef multirotor takeoff:
instead of altering the velocity setpoint for the vehicle to takeoff
use the thrust setpoint directly. this does not depend on the tuning of
the velocity loop.
2016-01-21 10:18:13 +01:00
Lorenz Meier
f918b0c992 Uploader: Make sure to warn about wrong board type 2016-01-21 09:34:54 +01:00
Roman
e6d2d17109 initialise topic structs properly 2016-01-21 07:25:18 +01:00
Lorenz Meier
4ce5d4e3e3 Make LPE_ENABLED available as default 2016-01-20 23:54:12 +01:00
Roman Bapst
93042eccb6 Merge pull request #3550 from PX4/level_horizon
fix level horizon feature:
2016-01-20 15:22:39 +01:00
tumbili
afb01e6d9a fix level horizon feature:
allow attitude to settle for a while if changes to the board rotation
parameters are done
2016-01-20 13:46:50 +01:00
Lorenz Meier
619548b10a MAVLink: Send for the first 4 seconds to localhost on UDP to not interfere with the network 2016-01-20 11:53:58 +01:00
Lorenz Meier
883148d3d1 Revert "Adjust to AUAV screwup on voltage / current pins"
This reverts commit 3c401c396c690228987df354a7a50bd46a12d790.
2016-01-20 11:13:24 +01:00
Lorenz Meier
a49dbbc9a8 Lister: Fix Clang compile error 2016-01-20 11:01:31 +01:00
Lorenz Meier
b8f11dee99 MAVLink: Code style 2016-01-20 10:59:39 +01:00
Lorenz Meier
83e45a1564 Re-instate UDP handling for MAVLink app 2016-01-20 10:59:25 +01:00
Lorenz Meier
3c401c396c Adjust to AUAV screwup on voltage / current pins 2016-01-20 10:47:50 +01:00
Lorenz Meier
cbde246f0a FMUv4: Remove non-existent airspeed sensing channel 2016-01-20 10:09:07 +01:00
sander
92c946dae1 New default PID's for QuadRanger 2016-01-19 22:14:46 +01:00
Lorenz Meier
0025ab7258 Sensors: Code style 2016-01-19 22:00:20 +01:00
Lorenz Meier
751a95deb8 Commander: Operate blue led on pixracer 2016-01-19 19:27:36 +01:00
Lorenz Meier
a76ecf3821 Remove differential pressure ADC 2016-01-19 19:27:21 +01:00
Lorenz Meier
cd37ffd0bf Do not sample pressure ADC if not configured 2016-01-19 19:27:05 +01:00
Lorenz Meier
d1cf8df2ad Initialize system power struct 2016-01-19 19:26:50 +01:00
Lorenz Meier
56957e7ee4 Improved listener tool 2016-01-19 19:26:31 +01:00
Lorenz Meier
9d239c10e5 Restore MAVLink network behaviour with fixed remote system approach 2016-01-18 23:19:51 +01:00
Kabir Mohammed
37cbb90930 Crosscompiler support 2016-01-18 22:42:42 +01:00
Mohammed Kabir
37ffb61afd changes to rpi2 configs 2016-01-18 22:42:35 +01:00
Mohammed Kabir
4351eb147c Add native RPi2 build config 2016-01-18 22:42:29 +01:00
Lorenz Meier
de88892f99 Update Matrix to fix QuRT build 2016-01-18 13:40:30 -08:00
Lorenz Meier
7ead4050d6 Hotfix for sock addr, but this is merely a workaround 2016-01-18 13:08:35 +01:00
Lorenz Meier
803f2ce035 Fix threshold param comment 2016-01-18 11:36:11 +01:00
Lorenz Meier
ab65a55fbf Change arming transfer to only set the register if the local configuration changed. Move its write operation to the fast rate so that arming / disarming is instantaneous 2016-01-18 11:36:11 +01:00
Lorenz Meier
f485b60f57 Kill switch: Fix logic to only trigger on on/off state of switch, not on/undefined. Remove debug output. 2016-01-18 11:36:11 +01:00
Lorenz Meier
cb2c8a1390 Fix list of files to check for code style 2016-01-18 11:36:11 +01:00
Mark Whitehorn
8cb472af31 add RC kill switch 2016-01-18 11:36:11 +01:00
Lorenz Meier
c802b86acc Sensors: Fix FMUv4 voltage 2016-01-18 10:24:10 +01:00
Lorenz Meier
cb14e8589d Sensors: Fix FMUv4 voltage 2016-01-18 10:23:23 +01:00
Lorenz Meier
bafa9bb6bb MAVLink: Fall back in altitude indication to baro if estimate is not available 2016-01-17 16:30:02 +01:00
Lorenz Meier
57b95916f5 MAVLink: Add stack space for interface 2016-01-17 16:29:36 +01:00
Roman Bapst
efd7e202f7 Merge pull request #3518 from PX4/mc_checks
multirotor mission feasibility checks:
2016-01-17 15:43:53 +01:00
tumbili
07fafc4913 multirotor mission feasibility checks:
make sure that the relative altitude of the takeoff waypoint is
at least one meter higher than the acceptance radius of the waypoint.
This makes sure that the takeoff waypoint is not reached before the vehicle
is at least one meter in the air.
2016-01-17 13:09:28 +01:00
Lorenz Meier
170f9aec49 Update standard VTOL model 2016-01-16 14:38:12 +01:00
Lorenz Meier
3fd4f11f65 Merge branch 'master' into stable 2016-01-16 12:08:23 +01:00
Lorenz Meier
44792eb2fe Merge branch 'master' into beta 2016-01-16 12:08:04 +01:00
Lorenz Meier
401af28b38 Ensure that UAVCAN_ENABLE is always present 2016-01-16 12:07:50 +01:00
Lorenz Meier
f37865e5b4 Merge branch 'master' of github.com:PX4/Firmware into beta 2016-01-16 11:18:08 +01:00
Lorenz Meier
44e229656c Merge branch 'master' of github.com:PX4/Firmware into stable 2016-01-16 11:17:46 +01:00
Lorenz Meier
7ea41491e5 FMUv4: Fix code style 2016-01-15 23:48:18 +01:00
Roman Bapst
0db264bc79 Merge pull request #3519 from PX4/mc_pos_quick_fix
quick fix:
2016-01-15 23:29:15 +01:00
Lorenz Meier
415e42f5de MS5611: Use baro SPI device 2016-01-15 22:44:22 +01:00
Lorenz Meier
0910cb3256 FMUv4: Add baro SPI bus define 2016-01-15 22:34:20 +01:00
Lorenz Meier
e663b60c69 FMUv2: Add baro SPI bus define 2016-01-15 22:34:09 +01:00
tumbili
be1db2ced5 quick fix:
Remove throttle non-increase condition for landing since this has lead to
quads falling out of the sky.
2016-01-15 16:15:27 +01:00
Sander Smeets
4ab39725dd Merge pull request #3517 from sanderux/master
QuadRanger airframe
2016-01-15 11:58:24 +01:00
Sander Smeets
c77a2acb93 QuadRanger airframe 2016-01-15 10:22:29 +00:00
Lorenz Meier
c0e88e262c Drop man min throttle to 8% since its a continous user complaint 2016-01-14 23:50:37 +01:00
Lorenz Meier
c0bc721778 Add missing define for DSM 2016-01-14 18:48:42 +01:00
Roman Bapst
b26fc1f089 fix waypoint handling in position control 2016-01-14 18:30:30 +01:00
Lorenz Meier
9fb29d3a38 FMU: Add RC input definition for each RC protocol 2016-01-14 17:55:55 +01:00
Lorenz Meier
5bd4495a78 Added input_rc SUMD defines 2016-01-14 17:55:55 +01:00
Lorenz Meier
c7767dfe7e RC: Add constants for FMU input 2016-01-14 17:55:55 +01:00
Mark Whitehorn
5a93e68918 fix code style 2016-01-14 17:55:55 +01:00
Mark Whitehorn
ab1bbb9ed8 remove extraneous rescan tests 2016-01-14 17:55:55 +01:00
Mark Whitehorn
4d7fe08069 fix code style 2016-01-14 17:55:55 +01:00
Mark Whitehorn
5d588d98be change CMake CONFIG to fmu-v2 and THREADS to 4 2016-01-14 17:55:55 +01:00
Mark Whitehorn
df5cb5472d configure GPIO_SBUS_INV for PixRacer R12 2016-01-14 17:55:54 +01:00
Mark Whitehorn
ecbcfe838b clean up, change SPI2 clock back to 12MHz and remove debug prints 2016-01-14 17:55:54 +01:00
Mark Whitehorn
ab71af6053 fix spi select logic 2016-01-14 17:55:54 +01:00
Mark Whitehorn
4952d05652 debugging ms5611 on spi2 2016-01-14 17:55:54 +01:00
Mark Whitehorn
32626b57a4 add missing #ifdef 2016-01-14 17:55:54 +01:00
Mark Whitehorn
47207b8fc8 set FMU_RC_OUTPUT high for all non-SBUS modes 2016-01-14 17:55:54 +01:00
Mark Whitehorn
5cf78cd450 configure usart6 TX for RC out
add RC_OUT pin to FMUv4 config
2016-01-14 17:55:54 +01:00
Mark Whitehorn
e0bbbd356f add SUMD decoder to RCscan 2016-01-14 17:55:53 +01:00
Mark Whitehorn
3d185e18e9 remove warnx in set_rc_scan_state 2016-01-14 17:55:53 +01:00
Mark Whitehorn
eb36eac137 reduce scan interval to 100msec 2016-01-14 17:55:53 +01:00
Mark Whitehorn
9eecca6a71 add string value struct for RC_SCAN enum 2016-01-14 17:55:53 +01:00
Mark Whitehorn
425169921c begin adding DSM bind function 2016-01-14 17:55:53 +01:00
Mark Whitehorn
ca2e9e7be1 handle PPM input with RC_SERIAL_PORT undefined 2016-01-14 17:55:53 +01:00
Mark Whitehorn
72156d9cd6 add macro to control RC input inverter
remove redundant variable
2016-01-14 17:55:53 +01:00
Mark Whitehorn
71a3e3713c move PPM input disable into scan case for PPM; PPM input is now enabled only while in RC_SCAN_PPM state 2016-01-14 17:55:52 +01:00
Mark Whitehorn
434ce85937 lock RC scan on first detection and fill in default values for fields not in DSM record
pull serial port read out of sbus and dsm input methods

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

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-01-10 20:54:26 +01:00
Lorenz Meier
f62a2ccfc3 Merge branch 'master' into beta 2016-01-10 16:19:40 +01:00
Lorenz Meier
c4a3387a39 Merge branch 'master' into stable 2016-01-10 16:19:23 +01:00
Lorenz Meier
4b659f1995 Fix naming of Solo config 2016-01-10 16:18:52 +01:00
Lorenz Meier
1cdb2d3209 PWM command: Ensure we have enough stack 2016-01-10 16:11:30 +01:00
Lorenz Meier
83339a2de0 Remove unmaintained fixed wing controller 2016-01-10 13:57:00 +01:00
Lorenz Meier
dd883d2c9b Update README.md
More URL fixes from @peppermint
2016-01-09 23:07:41 +01:00
Stefan
36a8bcc12e Update README.md
in my opinion https://px4.io and https://discuss.px4.io is not a working webpage
http://px4.io and http://discuss.px4.io are working
2016-01-09 22:49:22 +01:00
Lorenz Meier
41f36aa99f Enable debug key/value stream by default 2016-01-09 16:59:37 +01:00
Lorenz Meier
055a17f2e1 Updated links in README 2016-01-09 16:59:22 +01:00
Lorenz Meier
d4fb8c2a89 Merge branch 'master' into stable 2016-01-09 11:55:27 +01:00
Lorenz Meier
b15757d6d5 Merge branch 'master' into beta 2016-01-09 11:35:03 +01:00
Lorenz Meier
f40243890e Merge branch 'master' of github.com:PX4/Firmware into beta 2015-12-24 09:11:36 +01:00
Lorenz Meier
92f7f0d2c2 Merged master 2015-12-24 09:11:13 +01:00
Lorenz Meier
585e1c93e8 Merge branch 'master' into beta 2015-12-18 16:28:36 +00:00
Lorenz Meier
10430d430c Merge branch 'master' into beta 2015-11-17 13:04:49 +01:00
Lorenz Meier
5e57553615 Merged master to beta 2015-11-06 10:58:59 +01:00
Lorenz Meier
424f4a9066 Set climbout altitude to 10 meters by default 2015-10-23 11:17:55 +02:00
Lorenz Meier
30df075244 Revert "MAVLink: Add named value float to output"
This reverts commit 864068b99d97d59d9537147e8b84ea9165ea91e9.
2015-10-23 11:17:10 +02:00
Lorenz Meier
f6ddf53865 EKF: Fixed high CPU load 2015-10-10 22:19:19 +02:00
Lorenz Meier
ada07e2206 Commander: Only indicate green led if home position is valid 2015-10-07 15:13:32 +02:00
Lorenz Meier
365b3680a1 Merge branch 'master' into beta 2015-10-06 10:25:25 +02:00
Lorenz Meier
864068b99d MAVLink: Add named value float to output 2015-10-03 10:08:08 +02:00
Lorenz Meier
c6462b07ad Revert "fix handling of mavlink mode argument"
This reverts commit 485f0d037979be0ed0905c8ca7180676bac5a8ea.
2015-09-24 18:14:42 +02:00
tumbili
485f0d0379 fix handling of mavlink mode argument 2015-09-23 12:23:39 +02:00
tumbili
27725534a3 fix handling of mavlink mode argument 2015-09-23 12:23:23 +02:00
Lorenz Meier
8580ac0155 Merge branch 'beta' into stable 2015-08-30 22:43:19 +02:00
Lorenz Meier
de6d3a13de Merge branch 'beta' into stable 2015-08-28 22:03:22 +02:00
Lorenz Meier
e7a87710bc Merge branch 'beta' into stable 2015-08-26 12:36:02 +02:00
Lorenz Meier
5282dc04b5 Merge branch 'beta' into stable 2015-08-26 09:33:46 +02:00
Lorenz Meier
b26d15c979 Merge branch 'beta' into stable 2015-08-24 10:13:35 +02:00
Lorenz Meier
401d35677f Merge branch 'beta' into stable 2015-08-23 14:07:12 +02:00
Lorenz Meier
b8517eb428 Merge branch 'beta' into stable 2015-08-23 00:32:42 +02:00
Lorenz Meier
630740d54f Merge branch 'beta' into stable 2015-08-19 16:30:08 +02:00
Lorenz Meier
8531cde567 Merge branch 'beta' into stable 2015-08-14 14:29:28 +02:00
Lorenz Meier
c0316f3db1 Merge branch 'beta' into stable 2015-08-11 13:43:43 +02:00
Lorenz Meier
71e743009a Merge branch 'beta' into stable 2015-08-11 10:51:43 +02:00
Lorenz Meier
b2ff9e37c4 Merge branch 'beta' into stable 2015-08-08 23:50:35 +02:00
Lorenz Meier
bd2551d5f7 Merge branch 'beta' into stable 2015-08-08 11:32:10 +02:00
Lorenz Meier
7df8610cbd Merge branch 'beta' into stable 2015-08-07 17:46:57 +02:00
Lorenz Meier
24c98ef14e Merge branch 'beta' into stable 2015-08-07 15:49:30 +02:00
Lorenz Meier
5e6aebc8fa Merge branch 'beta' into stable 2015-08-06 22:09:46 +02:00
Lorenz Meier
1dbbe90e06 Merge branch 'beta' into stable 2015-08-06 10:07:02 +02:00
Lorenz Meier
f890dee5aa Merge branch 'beta' into stable 2015-08-04 23:27:05 +02:00
Lorenz Meier
1418b45942 Merge branch 'beta' into stable 2015-08-04 11:58:47 +02:00
Lorenz Meier
e66aab8e3a Merge branch 'beta' into stable 2015-08-04 10:57:09 +02:00
Lorenz Meier
9c7970bd7d Merge branch 'beta' into stable 2015-08-02 01:25:33 +02:00
Lorenz Meier
d18491b76e Merge branch 'beta' into stable 2015-08-01 17:34:20 +02:00
Lorenz Meier
40a7c5a55d Merge branch 'beta' into stable 2015-08-01 17:16:30 +02:00
Lorenz Meier
57ac8c19ff Merge branch 'beta' into stable 2015-08-01 12:48:20 +02:00
Lorenz Meier
acc1aeb571 Merge branch 'beta' into stable 2015-08-01 09:34:17 +02:00
Lorenz Meier
814a6fadc6 Merge branch 'beta' into stable 2015-08-01 09:26:23 +02:00
Lorenz Meier
041b0d379a Merge branch 'beta' into stable 2015-07-29 21:23:29 +02:00
Lorenz Meier
7c058b21ac Add airframe icons 2015-07-29 00:03:41 +02:00
Lorenz Meier
e7d45575ad Airframe Configs: Add version field 2015-07-28 23:59:19 +02:00
Lorenz Meier
0255f881c6 Merge branch 'beta' into stable 2015-07-28 23:45:55 +02:00
Lorenz Meier
bed182f6ab Merge branch 'beta' into stable 2015-07-22 17:17:13 +02:00
Lorenz Meier
78be95ebc1 Merge branch 'beta' into stable 2015-07-22 12:57:22 +02:00
Lorenz Meier
341d00e806 Merge branch 'beta' into stable 2015-07-22 12:51:00 +02:00
Lorenz Meier
fe3ae3c79b Merge branch 'beta' into stable 2015-07-22 10:04:21 +02:00
Lorenz Meier
8fc749f19b Merge branch 'beta' into stable 2015-07-22 09:03:07 +02:00
Lorenz Meier
1e6d911ab9 Merge branch 'beta' into stable 2015-07-14 19:20:19 +02:00
Lorenz Meier
364d323ddf Merge branch 'release_v1.0.0' into stable 2015-07-04 17:27:12 +02:00
Lorenz Meier
47358a446f uMerge branch 'release_v1.0.0' into stable 2015-07-03 00:25:40 +02:00
Lorenz Meier
a494b45078 Merge branch 'release_v1.0.0' of github.com:PX4/Firmware into stable 2015-07-02 01:00:41 +02:00
Lorenz Meier
7dfcfd5f2b Merge branch 'release_v1.0.0' of github.com:PX4/Firmware into stable 2015-06-30 07:10:45 +02:00
Lorenz Meier
e11fbbf312 Merge branch 'release_v1.0.0' of github.com:PX4/Firmware into stable 2015-06-30 07:01:38 +02:00
Lorenz Meier
65f8b81fda Merge branch 'release_v1.0.0' of github.com:PX4/Firmware into stable 2015-06-25 22:45:08 +02:00
Lorenz Meier
13c993dda4 Merge branch 'release_v1.0.0' of github.com:PX4/Firmware into stable 2015-06-25 21:20:38 +02:00
Lorenz Meier
61f98262cf Merge branch 'release_v1.0.0' into stable 2015-06-24 21:46:44 +02:00
Lorenz Meier
5ace8d993d Merge branch 'release_v1.0.0' into stable 2015-06-13 00:20:10 +02:00
Lorenz Meier
a8e5084897 Merge branch 'release_v1.0.0' of github.com:PX4/Firmware into stable 2015-06-11 09:03:26 +02:00
Lorenz Meier
7eebb22a9c Merge branch 'release_v1.0.0' of github.com:PX4/Firmware into stable 2015-05-28 17:41:54 -07:00
Lorenz Meier
3bdbb6eacf Merge branch 'release_v1.0.0' into stable 2015-05-24 20:11:13 +02:00
Lorenz Meier
20a829e691 Merge branch 'master' into stable 2015-05-18 23:18:52 +02:00
Lorenz Meier
045a598a97 Merge branch 'master' of github.com:PX4/Firmware into stable 2015-05-18 11:03:34 +02:00
Lorenz Meier
d188f8012f Merge branch 'master' into stable 2015-05-13 15:46:54 +02:00
Lorenz Meier
4635827f01 Merge branch 'master' into stable 2015-05-13 15:34:56 +02:00
Lorenz Meier
162b7b87e9 Merge branch 'master' into stable 2015-05-13 15:19:34 +02:00
Lorenz Meier
acf01c5e88 Merge branch 'master' into stable 2015-05-12 11:27:17 +02:00
Lorenz Meier
f892492a17 Merge branch 'master' into stable 2015-05-06 19:39:41 +02:00
Lorenz Meier
2a68adfd35 Merge branch 'master' into stable 2015-05-04 13:04:10 +02:00
Lorenz Meier
f56efaf149 Merge branch 'master' into stable 2015-04-27 22:33:32 +02:00
Lorenz Meier
8595c734e6 Merge branch 'master' into stable 2015-04-25 12:54:46 +02:00
Lorenz Meier
0b50c6c003 Merge branch 'master' into stable 2015-04-22 20:45:19 +02:00
Lorenz Meier
9e143e3d4c Merge branch 'master' into stable 2015-03-10 17:42:32 +01:00
Lorenz Meier
965e0e5226 Merge branch 'master' of github.com:PX4/Firmware into stable 2015-03-09 23:47:53 +01:00
Lorenz Meier
e55f1bc66d 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:35 +01:00
267 changed files with 9582 additions and 3522 deletions

2
.gitignore vendored
View File

@ -22,6 +22,8 @@ build/*
build_*/
core
cscope.out
cscope.in.out
cscope.po.out
Firmware.sublime-workspace
user.sublime*
Images/*.bin

3
.gitmodules vendored
View File

@ -34,3 +34,6 @@
[submodule "src/lib/ecl"]
path = src/lib/ecl
url = https://github.com/PX4/ecl.git
[submodule "cmake/cmake_hexagon"]
path = cmake/cmake_hexagon
url = https://github.com/ATLFlight/cmake_hexagon

View File

@ -60,9 +60,8 @@ before_install:
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
brew tap PX4/homebrew-px4
&& brew update; brew update
&& brew install cmake ninja astyle gcc-arm-none-eabi
&& brew install cmake ninja
&& brew install genromfs
&& brew install kconfig-frontends
&& sudo easy_install pip
&& sudo pip install pyserial empy
;
@ -93,23 +92,22 @@ env:
- PX4_AWS_BUCKET=px4-travis
script:
- make check_format
- arm-none-eabi-gcc --version
- git submodule update --quiet --init --recursive
- echo 'Building POSIX Firmware..' && make posix_sitl_default
- echo 'Running Tests..' && make posix_sitl_default test
- echo 'Running Unittests..' && cd unittests && ./run_tests.sh
- cd ..
- echo 'Building NuttX px4fmu-v1 Firmware..' && make px4fmu-v1_default
- echo 'Building NuttX px4fmu-v2 Firmware..' && make px4fmu-v2_default
# Only provide UAVCAN firmware binaries for Pixracer and Pixhawk 3
- echo 'Building UAVCAN node firmware..' && git clone https://github.com/thiemar/vectorcontrol
- cd vectorcontrol
- BOARD=s2740vc_1_0 make && BOARD=px4esc_1_6 make
- ../Tools/uavcan_copy.sh
- cd ..
- echo 'Building NuttX px4fmu-v4 Firmware..' && make px4fmu-v4_default
- echo 'Building NuttX px4-stm32f4discovery Firmware..' && make px4-stm32f4discovery_default
- echo 'Running Tests..' && make px4fmu-v2_default test
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
cd ${TRAVIS_BUILD_DIR}
&& make check_format
&& arm-none-eabi-gcc --version
&& echo 'Building NuttX px4fmu-v1 Firmware..' && make px4fmu-v1_default
&& echo 'Building NuttX px4fmu-v2 Firmware..' && make px4fmu-v2_default
&& echo 'Building UAVCAN node firmware..' && (git clone https://github.com/thiemar/vectorcontrol && cd vectorcontrol && BOARD=s2740vc_1_0 make -s && BOARD=px4esc_1_6 make -s && ../Tools/uavcan_copy.sh)
&& echo 'Building NuttX px4fmu-v4 Firmware..' && make px4fmu-v4_default
&& echo 'Building NuttX px4-stm32f4discovery Firmware..' && make px4-stm32f4discovery_default
&& echo 'Running Tests..' && make px4fmu-v2_default test
;
fi
after_success:
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then

View File

@ -16,7 +16,7 @@ git checkout -b mydescriptivebranchname
### Edit and build the code
The [developer guide](http://px4.io/dev/start) explains how to set up the development environment on Mac OS, Linux or Windows. Please take note of our [coding style](http://px4.io/dev/code_style) when editing files.
The [developer guide](http://dev.px4.io/) explains how to set up the development environment on Mac OS, Linux or Windows. Please take note of our [coding style](http://px4.io/dev/code_style) when editing files.
### Commit your changes

View File

@ -281,7 +281,7 @@ TYPEDEF_HIDES_STRUCT = NO
# causing a significant performance penality.
# If the system has enough physical memory increasing the cache will improve the
# performance by keeping more symbols in memory. Note that the value works on
# a logarithmic scale so increasing the size by one will rougly double the
# a logarithmic scale so increasing the size by one will roughly double the
# memory usage. The cache size is given by this formula:
# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
# corresponding to a cache size of 2^16 = 65536 symbols

View File

@ -48,7 +48,7 @@ Download QGC from http://qgroundcontrol.org/downloads and install using the wind
## PX4
### Platfrom Requirements
### Platform Requirements
Linux or Eagle with a working IP interface (?? does this need further instructions?)
### Build Host Requirements

View File

@ -109,7 +109,8 @@ endif
# describe how to build a cmake config
define cmake-build
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(PWD)/build_$@/Makefile ]; then rm -rf $(PWD)/build_$@; fi
+@if [ ! -e $(PWD)/build_$@/CMakeCache.txt ]; then git submodule update --init --recursive --force && mkdir -p $(PWD)/build_$@ && cd $(PWD)/build_$@ && cmake .. -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1); fi
+@if [ ! -e $(PWD)/build_$@/CMakeCache.txt ]; then git submodule sync && git submodule update --init --recursive && mkdir -p $(PWD)/build_$@ && cd $(PWD)/build_$@ && cmake .. -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1); fi
+Tools/check_submodules.sh
+$(PX4_MAKE) -C $(PWD)/build_$@ $(PX4_MAKE_ARGS) $(ARGS)
endef
@ -152,7 +153,7 @@ posix_sitl_ekf2:
$(call cmake-build,$@)
ros_sitl_default:
$(call cmake-build,$@)
@echo "This target is deprecated. Use make 'posix_sitl_default gazebo' instead."
qurt_eagle_travis:
$(call cmake-build,$@)
@ -168,6 +169,12 @@ qurt_eagle_default:
posix_eagle_default:
$(call cmake-build,$@)
posix_rpi2_default:
$(call cmake-build,$@)
posix_rpi2_release:
$(call cmake-build,$@)
posix: posix_sitl_default
@ -193,7 +200,8 @@ clean:
# targets handled by cmake
cmake_targets = test upload package package_source debug debug_tui debug_ddd debug_io debug_io_tui debug_io_ddd check_weak \
run_cmake_config config gazebo gazebo_gdb gazebo_lldb jmavsim \
jmavsim_gdb jmavsim_lldb gazebo_gdb_iris gazebo_lldb_tailsitter gazebo_iris gazebo_tailsitter
jmavsim_gdb jmavsim_lldb gazebo_gdb_iris gazebo_lldb_tailsitter gazebo_iris gazebo_iris_opt_flow gazebo_tailsitter \
gazebo_gdb_standard_vtol gazebo_lldb_standard_vtol gazebo_standard_vtol
$(foreach targ,$(cmake_targets),$(eval $(call cmake-targ,$(targ))))
.PHONY: clean

View File

@ -9,33 +9,22 @@ This repository contains the [PX4 Flight Core](http://px4.io), with the main app
* Official Website: http://px4.io
* License: BSD 3-clause (see [LICENSE.md](https://github.com/PX4/Firmware/blob/master/LICENSE.md))
* Supported airframes (more experimental are supported):
* [Multicopters](http://px4.io/platforms/multicopters/start)
* [Fixed wing](http://px4.io/platforms/planes/start)
* [VTOL](http://px4.io/platforms/vtol/start)
* Binaries (always up-to-date from master):
* [Downloads](http://px4.io/firmware/downloads)
* [Multicopters](http://px4.io/portfolio_category/multicopter/)
* [Fixed wing](http://px4.io/portfolio_category/vtol/)
* [VTOL](http://px4.io/portfolio_category/plane/)
* Releases
* [Downloads](https://github.com/PX4/Firmware/releases)
* Forum / Mailing list: [Google Groups](http://groups.google.com/group/px4users)
### Users ###
Please refer to the [user documentation](https://pixhawk.org/users/start) for flying drones with the PX4 flight stack.
Please refer to the [user documentation](http://px4.io) and [user forum](http://discuss.px4.io) for flying drones with the PX4 flight stack.
### Developers ###
Contributing guide:
* [CONTRIBUTING.md](https://github.com/PX4/Firmware/blob/master/CONTRIBUTING.md)
* [PX4 Contribution Guide](http://px4.io/dev/contributing)
* [Developer Forum / Mailing list](http://groups.google.com/group/px4users)
* [Guide for Contributions](https://github.com/PX4/Firmware/blob/master/CONTRIBUTING.md)
* [Developer guide](http://dev.px4.io)
Software in the Loop guide:
Use software in the loop [to get started with the codebase](https://pixhawk.org/dev/simulation/native_sitl).
Developer guide:
http://dev.px4.io
Testing guide:
http://px4.io/dev/unit_tests
This repository contains code supporting these boards:
* [Snapdragon Flight](http://dev.px4.io/hardware-snapdragon.html)
@ -44,8 +33,3 @@ This repository contains code supporting these boards:
* FMUv4.x (Pixhawk X and [Pixracer](http://dev.px4.io/hardware-pixracer.html))
* AeroCore (v1 and v2)
* STM32F4Discovery (basic support) [Tutorial](https://pixhawk.org/modules/stm32f4discovery)
## NuttShell (NSH) ##
NSH usage documentation:
http://px4.io/users/serial_connection

View File

@ -37,9 +37,8 @@ then
param set FW_RR_I 0.1
param set FW_RR_IMAX 0.2
param set FW_RR_P 0.3
param set RWTO_TKOFF 1
fi
param set RWTO_TKOFF 1
set HIL yes
set MIXER AERT

View File

@ -0,0 +1,41 @@
#!nsh
#
# @name Steadidrone MAVRIK
#
# @type Octo Coax Wide
#
# @maintainer Simon Wilks <simon@uaventure.com>
#
sh /etc/init.d/rc.mc_defaults
if [ $AUTOCNF == yes ]
then
param set MC_PITCH_P 4.0
param set MC_PITCHRATE_P 0.24
param set MC_PITCHRATE_I 0.09
param set MC_PITCHRATE_D 0.013
param set MC_PITCHRATE_MAX 180.0
param set MC_ROLL_P 4.0
param set MC_ROLLRATE_P 0.16
param set MC_ROLLRATE_I 0.07
param set MC_ROLLRATE_D 0.009
param set MC_ROLLRATE_MAX 180.0
param set MC_YAW_P 3.0
param set MC_YAWRATE_P 0.2
param set MC_YAWRATE_I 0.1
param set MC_YAWRATE_D 0.0
param set MC_YAW_FF 0.5
param set MPC_HOLD_MAX_XY 0.25
param set MPC_THR_MIN 0.15
param set MPC_Z_VEL_MAX 2.0
param set BAT_N_CELLS 4
fi
set MIXER octo_cox_w
set PWM_OUT 12345678

View File

@ -1,14 +1,40 @@
#!nsh
#
# @name Duorotor Tailsitter
# @name Caipiroshka Duo Tailsitter
#
# @type VTOL Tailsitter
# @type VTOL Duo Tailsitter
#
# @output MAIN1 motor left
# @output MAIN2 motor right
# @output MAIN5 elevon left
# @output MAIN6 elevon right
#
# @maintainer Roman Bapst <roman@px4.io>
#
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
then
param set MC_ROLL_P 6.0
param set MC_ROLLRATE_P 0.12
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 4.5
param set MC_PITCHRATE_P 0.3
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 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
fi
set MIXER caipirinha_vtol
set PWM_OUT 12

View File

@ -14,12 +14,12 @@ then
param set MC_ROLL_P 7.0
param set MC_ROLLRATE_P 0.17
param set MC_ROLLRATE_I 0.002
param set MC_ROLLRATE_D 0.004
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.14
param set MC_PITCHRATE_I 0.002
param set MC_PITCHRATE_D 0.004
param set MC_PITCHRATE_D 0.003
param set MC_PITCHRATE_FF 0.0
param set MC_YAW_P 3.8
param set MC_YAW_FF 0.5
@ -35,13 +35,9 @@ fi
set MIXER firefly6
set PWM_OUT 12345678
set PWM_RATE 400
set MIXER_AUX firefly6
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 21

View File

@ -2,7 +2,7 @@
#
# @name Quadrotor X Tailsitter
#
# @type VTOL Tailsitter
# @type VTOL Quad Tailsitter
#
# @maintainer Roman Bapst <roman@px4.io>
#

View File

@ -2,7 +2,7 @@
#
# @name Quadrotor + Tailsitter
#
# @type VTOL Tailsitter
# @type VTOL Quad Tailsitter
#
# @maintainer Roman Bapst <roman@px4.io>
#

View File

@ -14,16 +14,18 @@ then
param set VT_TYPE 2
param set VT_MOT_COUNT 4
param set VT_TRANS_THR 0.75
param set VT_ARSP_TRANS 12
param set VT_ARSP_BLEND 6
param set MC_ROLL_P 7.0
param set MC_ROLLRATE_P 0.15
param set MC_ROLL_P 6.0
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_PITCH_P 6.0
param set MC_PITCHRATE_P 0.19
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_FF 0.5
@ -31,17 +33,25 @@ then
param set MC_YAWRATE_I 0.02
param set MC_YAWRATE_D 0.0
param set MC_YAWRATE_FF 0.0
param set FW_PR_FF 0.5
param set FW_PR_I 0.02
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.05
param set FW_THR_CRUISE 0.75
fi
set MIXER vtol_quad_x
set PWM_OUT 12345678
set PWM_OUT 1234
set PWM_RATE 400
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 PWM_ACHDIS 5
set PWM_AUX_DISARMED 950
set MAV_TYPE 22

View File

@ -34,14 +34,12 @@ then
fi
set MIXER vtol_quad_x
set PWM_OUT 12345678
set PWM_OUT 1234
set PWM_RATE 400
set MIXER_AUX vtol_delta
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 PWM_ACHDIS 3
set PWM_AUX_DISARMED 950
set MAV_TYPE 22

View File

@ -31,18 +31,15 @@ then
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 PWM_OUT 1234
set PWM_RATE 400
set MIXER_AUX vtol_AAVVT
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 PWM_ACHDIS 5
set PWM_AUX_DISARMED 950
set MAV_TYPE 22

View File

@ -0,0 +1,57 @@
#!nsh
#
# @name QuadRanger
#
# @type Standard VTOL
#
# @maintainer Sander Smeets <sander@droneslab.com>
#
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
then
param set VT_TYPE 2
param set VT_MOT_COUNT 4
param set VT_TRANS_THR 0.75
param set PWM_AUX_REV1 1
param set PWM_AUX_REV2 1
param set MC_ROLL_P 7.0
param set MC_ROLLRATE_P 0.15
param set MC_ROLLRATE_I 0.1
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.15
param set MC_PITCHRATE_I 0.1
param set MC_PITCHRATE_D 0.004
param set MC_PITCHRATE_FF 0.0
param set MC_YAW_P 3.5
param set MC_YAW_FF 0.7
param set MC_YAWRATE_P 0.6
param set MC_YAWRATE_I 0.04
param set MC_YAWRATE_D 0.0
param set MC_YAWRATE_FF 0.0
param set MPC_ACC_HOR_MAX 2.0
param set VT_ARSP_TRANS 15.0
param set VT_ARSP_BLEND 10.0
param set VT_B_TRANS_DUR 4.0
fi
set MIXER vtol_quad_x
set PWM_OUT 1234
set PWM_RATE 400
set MIXER_AUX vtol_AAERT
set PWM_ACHDIS 5
set PWM_AUX_DISARMED 950
set MAV_TYPE 22
param set VT_MOT_COUNT 4
param set VT_IDLE_PWM_MC 1080
param set VT_TYPE 2

View File

@ -2,7 +2,7 @@
#
# @name Applied Aeronautics Albatross
#
# @type Standard Plane
# @type Plane A-Tail
#
# @output MAIN1 aileron right
# @output MAIN2 aileron left

View File

@ -30,9 +30,3 @@ then
# DJI ESCs do not support calibration and need a higher min
param set PWM_MIN 1230
fi
# Transitional support: ensure suitable PWM min/max param values
if param compare PWM_MIN 1075
then
param set PWM_MIN 1230
fi

View File

@ -18,11 +18,11 @@ then
param set MC_ROLL_P 7.0
param set MC_ROLLRATE_P 0.15
param set MC_ROLLRATE_I 0.05
param set MC_ROLLRATE_D 0.01
param set MC_ROLLRATE_D 0.003
param set MC_PITCH_P 7.0
param set MC_PITCHRATE_P 0.15
param set MC_PITCHRATE_I 0.05
param set MC_PITCHRATE_D 0.01
param set MC_PITCHRATE_D 0.003
param set MC_YAW_P 2.8
param set MC_YAWRATE_P 0.3
param set MC_YAWRATE_I 0.1
@ -30,9 +30,3 @@ then
# DJI ESCs do not support calibration and need a higher min
param set PWM_MIN 1230
fi
# Transitional support: ensure suitable PWM min/max param values
if param compare PWM_MIN 1075
then
param set PWM_MIN 1230
fi

View File

@ -14,11 +14,11 @@ then
param set MC_ROLL_P 7.0
param set MC_ROLLRATE_P 0.16
param set MC_ROLLRATE_I 0.05
param set MC_ROLLRATE_D 0.01
param set MC_ROLLRATE_D 0.003
param set MC_PITCH_P 7.0
param set MC_PITCHRATE_P 0.16
param set MC_PITCHRATE_I 0.05
param set MC_PITCHRATE_D 0.01
param set MC_PITCHRATE_D 0.003
param set MC_YAW_P 2.8
param set MC_YAWRATE_P 0.3
param set MC_YAWRATE_I 0.1

View File

@ -1,6 +1,6 @@
#!nsh
#
# @name Generic Quadrotor X config
# @name 3DR Solo
#
# @type Quadrotor x
#

View File

@ -0,0 +1,42 @@
#!nsh
#
# @name Reaper 500 Quad
#
# @type Quadrotor x
#
# @maintainer Blankered
#
sh /etc/init.d/rc.mc_defaults
if [ $AUTOCNF == yes ]
then
param set MC_ROLL_P 6.5
param set MC_ROLLRATE_P 0.14
param set MC_ROLLRATE_I 0.1
param set MC_ROLLRATE_D 0.004
param set MC_PITCH_P 6.0
param set MC_PITCHRATE_P 0.14
param set MC_PITCHRATE_I 0.09
param set MC_PITCHRATE_D 0.004
param set MC_YAW_P 4
param set NAV_ACC_RAD 2.0
param set RTL_RETURN_ALT 30.0
param set RTL_DESCEND_ALT 10.0
fi
set MIXER quad_h
set PWM_RATE 50
set PWM_OUT 1234
set PWM_MIN 1100
set PWM_MAX 1900
set PWM_DISARMED 1500
set MIXER_AUX pass
set PWM_AUX_RATE 50
set PWM_AUX_OUT 1234
set PWM_AUX_MIN 1000
set PWM_AUX_MAX 2000
set PWM_AUX_DISARMED 950

View File

@ -0,0 +1,37 @@
#!nsh
#
# @name generic_250
#
# @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 Mark Whitehorn <kd0aij@gmail.com>
#
sh /etc/init.d/4001_quad_x
if [ $AUTOCNF == yes ]
then
param set MC_ROLL_P 7.0
param set MC_ROLLRATE_P 0.1
param set MC_ROLLRATE_I 0.1
param set MC_ROLLRATE_D 0.005
param set MC_PITCH_P 7.0
param set MC_PITCHRATE_P 0.1
param set MC_PITCHRATE_I 0.2
param set MC_PITCHRATE_D 0.005
param set MC_YAW_P 2.8
param set MC_YAWRATE_P 0.2
param set MC_YAWRATE_I 0.1
param set MC_YAWRATE_D 0.0
param set PWM_MIN 980
param set MPC_THR_MIN 0.06
param set MPC_MANTHR_MIN 0.06
param set MC_ROLLRATE_MAX 360.0
param set MC_PITCHRATE_MAX 360.0
param set MC_YAWRATE_MAX 200.0
param set ATT_BIAS_MAX 0.0
fi

View File

@ -147,6 +147,7 @@ then
set FAILSAFE_AUX none
fi
# Set min / max for aux out and rates
if [ $PWM_AUX_OUT != none ]
then
#
@ -157,13 +158,6 @@ then
pwm rate -c $PWM_AUX_OUT -r $PWM_AUX_RATE -d $OUTPUT_AUX_DEV
fi
#
# Set disarmed, min and max PWM_AUX values
#
if [ $PWM_AUX_DISARMED != none ]
then
pwm disarmed -c $PWM_AUX_OUT -p $PWM_AUX_DISARMED -d $OUTPUT_AUX_DEV
fi
if [ $PWM_AUX_MIN != none ]
then
pwm min -c $PWM_AUX_OUT -p $PWM_AUX_MIN -d $OUTPUT_AUX_DEV
@ -174,6 +168,23 @@ then
fi
fi
# Set disarmed values for aux out
# Transitional support until all configs
# are updated
if [ $PWM_ACHDIS == none ]
then
set PWM_ACHDIS ${PWM_AUX_OUT}
fi
#
# Set disarmed, min and max PWM_AUX values
#
if [ $PWM_AUX_DISARMED != none -a $PWM_ACHDIS != none ]
then
pwm disarmed -c $PWM_ACHDIS -p $PWM_AUX_DISARMED -d $OUTPUT_AUX_DEV
fi
if [ $FAILSAFE_AUX != none ]
then
pwm failsafe -d $OUTPUT_AUX_DEV $FAILSAFE

View File

@ -145,6 +145,10 @@ else
fi
fi
if sf10a start
then
fi
# Wait 20 ms for sensors (because we need to wait for the HRT and work queue callbacks to fire)
usleep 20000
if sensors start

View File

@ -4,40 +4,25 @@ set VEHICLE_TYPE vtol
if [ $AUTOCNF == yes ]
then
#
#Default controller parameters for MC
#
param set MC_ROLL_P 6.0
param set MC_ROLLRATE_P 0.1
param set MC_ROLLRATE_I 0.0
param set MC_ROLLRATE_D 0.003
param set MC_PITCH_P 6.0
param set MC_PITCHRATE_P 0.2
param set MC_PITCHRATE_I 0.0
param set MC_PITCHRATE_D 0.003
param set MC_YAW_P 4
param set MC_YAWRATE_P 0.2
param set MC_YAWRATE_I 0.0
param set MC_YAWRATE_D 0.0
param set MC_YAW_FF 0.3
#
# Default parameters for FW
#
param set FW_PR_FF 0.3
param set FW_PR_I 0.000
param set FW_PR_IMAX 0.2
param set FW_PR_P 0.02
param set FW_RR_FF 0.3
param set FW_RR_I 0.00
param set FW_RR_IMAX 0.2
param set FW_RR_P 0.02
param set PE_VELNE_NOISE 0.5
param set PE_VELD_NOISE 0.3
param set PE_POSNE_NOISE 0.5
param set PE_POSD_NOISE 1.25
param set PE_ABIAS_PNOISE 0.0001
#
# Default parameters for mission and position handling
#
param set NAV_ACC_RAD 3
param set MPC_TKO_SPEED 1.0
param set MPC_LAND_SPEED 0.7
param set MPC_Z_VEL_MAX 1.5
param set MPC_XY_VEL_MAX 4.0
param set MIS_YAW_TMT 10
fi
set PWM_DISARMED 900

View File

@ -86,70 +86,6 @@ then
fi
fi
# Compare existing params and save defaults
# this only needs to be in for 1-2 releases
if param compare RC_MAP_THROTTLE 0
then
# So this is a default setup,
# now lets find out if channel 3
# is calibrated
if param compare RC3_MIN 1000
then
# This is default, do nothing
else
# Set old default
param set RC_MAP_THROTTLE 3
fi
fi
# Compare existing params and save defaults
# this only needs to be in for 1-2 releases
if param compare RC_MAP_ROLL 0
then
# So this is a default setup,
# now lets find out if channel 1
# is calibrated
if param compare RC1_MIN 1000
then
# This is default, do nothing
else
# Set old default
param set RC_MAP_ROLL 1
fi
fi
# Compare existing params and save defaults
# this only needs to be in for 1-2 releases
if param compare RC_MAP_PITCH 0
then
# So this is a default setup,
# now lets find out if channel 2
# is calibrated
if param compare RC2_MIN 1000
then
# This is default, do nothing
else
# Set old default
param set RC_MAP_PITCH 2
fi
fi
# Compare existing params and save defaults
# this only needs to be in for 1-2 releases
if param compare RC_MAP_YAW 0
then
# So this is a default setup,
# now lets find out if channel 4
# is calibrated
if param compare RC4_MIN 1000
then
# This is default, do nothing
else
# Set old default
param set RC_MAP_YAW 4
fi
fi
#
# Start system state indicator
#
@ -182,6 +118,7 @@ then
set PWM_MAX none
set PWM_AUX_OUT none
set PWM_AUX_RATE none
set PWM_ACHDIS none
set PWM_AUX_DISARMED none
set PWM_AUX_MIN none
set PWM_AUX_MAX none
@ -550,9 +487,9 @@ then
# Avoid using ttyS1 for MAVLink on FMUv4
if ver hwcmp PX4FMU_V4
then
set MAVLINK_F "-r 1200 -d /dev/ttyS2"
set MAVLINK_F "-r 1200 -d /dev/ttyS1"
# Start MAVLink on Wifi (ESP8266 port)
mavlink start -r 800000 -b 921600 -d /dev/ttyS0
mavlink start -r 20000 -m config -b 921600 -d /dev/ttyS0
fi
fi
fi
@ -563,8 +500,9 @@ then
#
# MAVLink onboard / TELEM2
#
if ver hwcmp PX4FMU_V2
if ver hwcmp PX4FMU_V1
then
else
# XXX We need a better way for runtime eval of shell variables,
# but this works for now
if param compare SYS_COMPANION 921600
@ -583,6 +521,10 @@ then
then
mavlink start -d /dev/ttyS2 -b 57600 -m magic -r 5000 -x
fi
if param compare SYS_COMPANION 357600
then
mavlink start -d /dev/ttyS2 -b 57600 -r 1000
fi
# Sensors on the PWM interface bank
# clear pins 5 and 6
if param compare SENS_EN_LL40LS 1
@ -670,6 +612,10 @@ then
then
set MAV_TYPE 2
fi
if [ $MIXER == quad_h ]
then
set MAV_TYPE 2
fi
if [ $MIXER == tri_y_yaw- -o $MIXER == tri_y_yaw+ ]
then
set MAV_TYPE 15
@ -686,7 +632,7 @@ then
then
set MAV_TYPE 14
fi
if [ $MIXER == octo_cox ]
if [ $MIXER == octo_cox -o $MIXER == octo_cox_w ]
then
set MAV_TYPE 14
fi
@ -835,6 +781,11 @@ then
fi
fi
if ver hwcmp PX4FMU_V4
then
frsky_telemetry start -d /dev/ttyS6
fi
if ver hwcmp PX4FMU_V2
then
# Check for flow sensor - as it is a background task, launch it last

View File

@ -1,10 +1,27 @@
#!nsh
# Caipirinha vtol mixer for PX4FMU
#
#===========================
Caipirinha tailsitter mixer
============================
This file defines a mixer for the TBS Caipirinha tailsitter edition. This vehicle
has two motors in total, one attached to each wing. It also has two elevons which
are located in the slipstream of the propellers.
Motor mixer
------------
When standing in front of the vehicle the first motor should be on the left side
while the second motor should be on the right side.
R: 2- 10000 10000 10000 0
#mixer for the elevons
Zero mixer (2x)
---------------
Z:
Z:
Elevons mixer
--------------
M: 2
O: 10000 10000 0 -10000 10000
S: 1 0 10000 10000 0 -10000 10000

View File

@ -0,0 +1,3 @@
# Octo coaxial with wide arms
R: 8cw 10000 10000 10000 0

View File

@ -0,0 +1,24 @@
Mixer for standard vtol plane (SITL) with motor x configuration
=========================================================
This file defines a single mixer for a standard vtol plane (SITL gazebo) with motors in X configuration.
The plane has two ailerons and one elevator. The ailerons and elevator are treated as elevons
in order to make the standard vtol simulation compatible with the tailsitter simulation.
R: 4x 10000 10000 10000 0
# mixer for the elevons
M: 2
O: 10000 10000 0 -10000 10000
S: 1 0 5000 5000 0 -10000 10000
S: 1 1 -5000 -5000 0 -10000 10000
M: 2
O: 10000 10000 0 -10000 10000
S: 1 0 5000 5000 0 -10000 10000
S: 1 1 5000 5000 0 -10000 10000
# mixer for the pusher/puller throttle
M: 1
O: 10000 10000 0 -10000 10000
S: 1 3 0 20000 -10000 -10000 10000

View File

@ -6,7 +6,7 @@ then
exit 1;
fi
if [[ $cmake_ver == *"2.8"* ]] || [[ $cmake_ver == *"2.9"* ]] || [[ $cmake_ver == *"3.0"* ]] || [[ $cmake_ver == *"3.1"* ]]
if [[ $cmake_ver == *" 2.8"* ]] || [[ $cmake_ver == *" 2.9"* ]] || [[ $cmake_ver == *" 3.0"* ]] || [[ $cmake_ver == *" 3.1"* ]]
then
exit 1;
fi

View File

@ -25,7 +25,6 @@ for fn in $(find src/examples \
src/modules/uORB \
src/modules/bottle_drop \
src/modules/dataman \
src/modules/fixedwing_backside \
src/modules/segway \
src/modules/local_position_estimator \
src/modules/unit_test \

81
Tools/check_submodules.sh Executable file
View File

@ -0,0 +1,81 @@
#!/usr/bin/env bash
[ -n "$GIT_SUBMODULES_ARE_EVIL" ] && {
# GIT_SUBMODULES_ARE_EVIL is set, meaning user doesn't want submodules
echo "Skipping submodules. NUTTX_SRC is set to $NUTTX_SRC"
exit 0
}
if [ -f src/modules/uavcan/libuavcan/CMakeLists.txt ]
then
echo "Git submodule config valid."
else
git submodule update --init --recursive
fi
GITSTATUS=$(git status)
function check_git_submodule {
if [ -d $1 ];
then
SUBMODULE_STATUS=$(git submodule summary "$1")
STATUSRETVAL=$(echo $SUBMODULE_STATUS | grep -A20 -i "$1")
if [ -z "$STATUSRETVAL" ]; then
echo "Checked $1 submodule, correct version found"
else
echo -e "\033[31mChecked $1 submodule, ACTION REQUIRED:\033[0m"
echo ""
echo -e "Different commits:"
echo -e "$SUBMODULE_STATUS"
echo ""
echo ""
echo -e " *******************************************************************************"
echo -e " * \033[31mIF YOU DID NOT CHANGE THIS FILE (OR YOU DON'T KNOW WHAT A SUBMODULE IS):\033[0m *"
echo -e " * \033[31mHit 'u' and <ENTER> to update ALL submodules and resolve this.\033[0m *"
echo -e " * (performs \033[94mgit submodule update --init --recursive\033[0m) *"
echo -e " *******************************************************************************"
echo ""
echo ""
echo -e " Only for EXPERTS:"
echo -e " $1 submodule is not in the recommended version."
echo -e " Hit 'y' and <ENTER> to continue the build with this version. Hit <ENTER> to resolve manually."
echo -e " Use \033[94mgit add $1 && git commit -m 'Updated $1'\033[0m to choose this version (careful!)"
echo ""
read user_cmd
if [ "$user_cmd" == "y" ]
then
echo "Continuing build with manually overridden submodule.."
else
if [ "$user_cmd" == "u" ]
then
git submodule update --init --recursive
echo "Submodule fixed, continuing build.."
else
echo "Build aborted."
exit 1
fi
fi
fi
else
git submodule update --init --recursive;
fi
}
check_git_submodule NuttX
check_git_submodule Tools/gencpp
check_git_submodule Tools/genmsg
check_git_submodule Tools/jMAVSim
check_git_submodule Tools/sitl_gazebo
check_git_submodule cmake/cmake_hexagon
check_git_submodule mavlink/include/mavlink/v1.0
check_git_submodule src/lib/DriverFramework/cmake_hexagon
check_git_submodule src/lib/DriverFramework/dspal
check_git_submodule src/lib/dspal
check_git_submodule src/lib/ecl
check_git_submodule src/lib/matrix
check_git_submodule src/modules/uavcan/libuavcan
check_git_submodule unittests/googletest
exit 0

View File

@ -136,12 +136,12 @@ 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");
if(argc < 2) {
printf("need at least two arguments: topic name. [optional number of messages to print]\\n");
return 1;
}
""")
print("\tunsigned num_msgs = atoi(argv[2]);")
print("\tunsigned num_msgs = (argc > 2) ? atoi(argv[2]) : 1;")
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])
@ -154,9 +154,11 @@ for index,m in enumerate(messages[1:]):
print("\t\tstruct %s_s container;" % m)
print("\t\tmemset(&container, 0, sizeof(container));")
print("\t\tbool updated;")
print("\t\tfor (unsigned i = 0; i < num_msgs; i++) {")
print("\t\tunsigned i = 0;")
print("\t\twhile(i < num_msgs) {")
print("\t\t\torb_check(sub,&updated);")
print("\t\t\tupdated = true;")
print("\t\t\tif (i == 0) { updated = true; } else { usleep(500); }")
print("\t\t\ti++;")
print("\t\t\tif (updated) {")
print("\t\tprintf(\"\\nTOPIC: %s #%%d\\n\", i);" % m)
print("\t\t\torb_copy(ID,sub,&container);")
@ -190,9 +192,15 @@ for index,m in enumerate(messages[1:]):
elif item[0] == "int32":
print("\t\t\tprintf(\"%s: %%d\\n\",container.%s);" % (item[1], item[1]))
elif item[0] == "uint32":
print("\t\t\tprintf(\"%s: %%d\\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] == "int16":
print("\t\t\tprintf(\"%s: %%d\\n\",(int)container.%s);" % (item[1], item[1]))
elif item[0] == "uint16":
print("\t\t\tprintf(\"%s: %%u\\n\",(unsigned)container.%s);" % (item[1], item[1]))
elif item[0] == "int8":
print("\t\t\tprintf(\"%s: %%d\\n\",(int)container.%s);" % (item[1], item[1]))
elif item[0] == "uint8":
print("\t\t\tprintf(\"%s: %%u\\n\",(unsigned)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}")

@ -1 +1 @@
Subproject commit 0876a46d53954db34775151f73db024bcfc656a0
Subproject commit 218ffbb8cf584fa2d02dbbc1215ce85bc25a9f57

View File

@ -752,7 +752,7 @@ class MAVLink_gps_raw_int_message(MAVLink_message):
'''
The global position, as returned by the Global Positioning
System (GPS). This is NOT the global position
estimate of the sytem, but rather a RAW sensor value. See
estimate of the system, but rather a RAW sensor value. See
message GLOBAL_POSITION for the global position estimate.
Coordinate frame is right-handed, Z-axis up (GPS frame).
'''
@ -2812,7 +2812,7 @@ class MAVLink(object):
'''
The global position, as returned by the Global Positioning System
(GPS). This is NOT the global position
estimate of the sytem, but rather a RAW sensor value.
estimate of the system, but rather a RAW sensor value.
See message GLOBAL_POSITION for the global position
estimate. Coordinate frame is right-handed, Z-axis up
(GPS frame).
@ -2837,7 +2837,7 @@ class MAVLink(object):
'''
The global position, as returned by the Global Positioning System
(GPS). This is NOT the global position
estimate of the sytem, but rather a RAW sensor value.
estimate of the system, but rather a RAW sensor value.
See message GLOBAL_POSITION for the global position
estimate. Coordinate frame is right-handed, Z-axis up
(GPS frame).

View File

@ -28,29 +28,57 @@ class XMLOutput():
xml_group = ET.SubElement(xml_parameters, "airframe_group")
xml_group.attrib["name"] = group.GetName()
if (group.GetName() == "Standard Plane"):
xml_group.attrib["image"] = "AirframeStandardPlane.png"
xml_group.attrib["image"] = "Plane"
elif (group.GetName() == "Flying Wing"):
xml_group.attrib["image"] = "AirframeFlyingWing.png"
xml_group.attrib["image"] = "FlyingWing"
elif (group.GetName() == "Quadrotor x"):
xml_group.attrib["image"] = "AirframeQuadRotorX.png"
xml_group.attrib["image"] = "QuadRotorX"
elif (group.GetName() == "Quadrotor +"):
xml_group.attrib["image"] = "AirframeQuadRotorPlus.png"
xml_group.attrib["image"] = "QuadRotorPlus"
elif (group.GetName() == "Hexarotor x"):
xml_group.attrib["image"] = "AirframeHexaRotorX.png"
xml_group.attrib["image"] = "HexaRotorX"
elif (group.GetName() == "Hexarotor +"):
xml_group.attrib["image"] = "AirframeHexaRotorPlus.png"
xml_group.attrib["image"] = "HexaRotorPlus"
elif (group.GetName() == "Octorotor +"):
xml_group.attrib["image"] = "AirframeOctoRotorPlus.png"
xml_group.attrib["image"] = "OctoRotorPlus"
elif (group.GetName() == "Octorotor x"):
xml_group.attrib["image"] = "AirframeOctoRotorX.png"
xml_group.attrib["image"] = "OctoRotorX"
elif (group.GetName() == "Octorotor Coaxial"):
xml_group.attrib["image"] = "OctoRotorXCoaxial"
elif (group.GetName() == "Octo Coax Wide"):
xml_group.attrib["image"] = "OctoRotorXCoaxial"
elif (group.GetName() == "Quadrotor Wide"):
xml_group.attrib["image"] = "AirframeQuadRotorH.png"
xml_group.attrib["image"] = "QuadRotorWide"
elif (group.GetName() == "Quadrotor H"):
xml_group.attrib["image"] = "AirframeQuadRotorH.png"
xml_group.attrib["image"] = "QuadRotorH"
elif (group.GetName() == "Simulation"):
xml_group.attrib["image"] = "AirframeSimulation.png"
xml_group.attrib["image"] = "AirframeSimulation"
elif (group.GetName() == "Plane A-Tail"):
xml_group.attrib["image"] = "PlaneATail"
elif (group.GetName() == "VTOL Duo Tailsitter"):
xml_group.attrib["image"] = "VTOLDuoRotorTailSitter"
elif (group.GetName() == "Standard VTOL"):
xml_group.attrib["image"] = "VTOLPlane"
elif (group.GetName() == "VTOL Quad Tailsitter"):
xml_group.attrib["image"] = "VTOLQuadRotorTailSitter"
elif (group.GetName() == "VTOL Tiltrotor"):
xml_group.attrib["image"] = "VTOLTiltRotor"
elif (group.GetName() == "Coaxial Helicopter"):
xml_group.attrib["image"] = "HelicopterCoaxial"
elif (group.GetName() == "Hexarotor Coaxial"):
xml_group.attrib["image"] = "Y6A"
elif (group.GetName() == "Y6B"):
xml_group.attrib["image"] = "Y6B"
elif (group.GetName() == "Tricopter Y-"):
xml_group.attrib["image"] = "YMinus"
elif (group.GetName() == "Tricopter Y+"):
xml_group.attrib["image"] = "YPlus"
elif (group.GetName() == "Rover"):
xml_group.attrib["image"] = "Rover"
elif (group.GetName() == "Boat"):
xml_group.attrib["image"] = "Boat"
else:
xml_group.attrib["image"] = ""
xml_group.attrib["image"] = "AirframeUnknown"
for param in group.GetParams():
if (last_param_name == param.GetName() and not board_specific_param_set) or last_param_name != param.GetName():
xml_param = ET.SubElement(xml_group, "airframe")

View File

@ -51,6 +51,7 @@ class Parameter(object):
def __init__(self, name, type, default = ""):
self.fields = {}
self.values = {}
self.name = name
self.type = type
self.default = default
@ -70,6 +71,12 @@ class Parameter(object):
"""
self.fields[code] = value
def SetEnumValue(self, code, value):
"""
Set named enum value
"""
self.values[code] = value
def GetFieldCodes(self):
"""
Return list of existing field codes in convenient order
@ -87,7 +94,26 @@ class Parameter(object):
if not fv:
# required because python 3 sorted does not accept None
return ""
return self.fields.get(code)
return fv
def GetEnumCodes(self):
"""
Return list of existing value codes in convenient order
"""
keys = self.values.keys()
#keys = sorted(keys)
#keys = sorted(keys, key=lambda x: self.priority.get(x, 0), reverse=True)
return keys
def GetEnumValue(self, code):
"""
Return value of the given enum code or None if not found.
"""
fv = self.values.get(code)
if not fv:
# required because python 3 sorted does not accept None
return ""
return fv
class SourceParser(object):
"""
@ -107,7 +133,7 @@ class SourceParser(object):
re_remove_dots = re.compile(r'\.+$')
re_remove_carriage_return = re.compile('\n+')
valid_tags = set(["group", "board", "min", "max", "unit", "decimal"])
valid_tags = set(["group", "board", "min", "max", "unit", "decimal", "reboot_required", "value"])
# Order of parameter groups
priority = {
@ -137,6 +163,7 @@ class SourceParser(object):
short_desc = None
long_desc = None
tags = {}
def_values = {}
elif state is not None and state != "comment-processed":
m = self.re_comment_end.search(line)
if m:
@ -156,7 +183,12 @@ class SourceParser(object):
m = self.re_comment_tag.match(comment_content)
if m:
tag, desc = m.group(1, 2)
tags[tag] = desc
if (tag == "value"):
# Take the meta info string and split the code and description
metainfo = desc.split(" ", 1)
def_values[metainfo[0]] = metainfo[1]
else:
tags[tag] = desc
current_tag = tag
state = "wait-tag-end"
elif state == "wait-short":
@ -191,6 +223,7 @@ class SourceParser(object):
defval = ""
# Non-empty line outside the comment
m = self.re_px4_param_default_definition.match(line)
# Default value handling
if m:
name_m, defval_m = m.group(1,2)
default_var[name_m] = defval_m
@ -226,6 +259,8 @@ class SourceParser(object):
return False
else:
param.SetField(tag, tags[tag])
for def_value in def_values:
param.SetEnumValue(def_value, def_values[def_value])
# Store the parameter
if group not in self.param_groups:
self.param_groups[group] = ParameterGroup(group)
@ -278,6 +313,13 @@ class SourceParser(object):
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
for code in param.GetEnumCodes():
if not self.IsNumber(code):
sys.stderr.write("Min value not number: {0} {1}\n".format(name, code))
return False
if param.GetEnumValue(code) == "":
sys.stderr.write("Description for enum value is empty: {0} {1}\n".format(name, code))
return False
return True
def GetParamGroups(self):

View File

@ -52,6 +52,13 @@ class XMLOutput():
xml_field.text = value
if last_param_name != param.GetName():
board_specific_param_set = False
if len(param.GetEnumCodes()) > 0:
xml_values = ET.SubElement(xml_param, "values")
for code in param.GetEnumCodes():
xml_value = ET.SubElement(xml_values, "value")
xml_value.attrib["code"] = code;
xml_value.text = param.GetEnumValue(code)
indent(xml_parameters)
self.xml_document = ET.ElementTree(xml_parameters)

View File

@ -1,8 +1,7 @@
#!/usr/bin/env python
############################################################################
#
# Copyright (C) 2014 PX4 Development Team. All rights reserved.
# Author: Julian Oes <joes@student.ethz.ch>
# Copyright (C) 2014-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
@ -37,48 +36,53 @@
"""
px_romfs_pruner.py:
Delete all comments and newlines before ROMFS is converted to an image
@author: Julian Oes <julian@oes.ch>
"""
from __future__ import print_function
import argparse, re
import argparse
import re
import os
def main():
# Parse commandline arguments
parser = argparse.ArgumentParser(description="ROMFS pruner.")
parser.add_argument('--folder', action="store",
help="ROMFS scratch folder.")
args = parser.parse_args()
# Parse commandline arguments
parser = argparse.ArgumentParser(description="ROMFS pruner.")
parser.add_argument('--folder', action="store", help="ROMFS scratch folder.")
args = parser.parse_args()
print("Pruning ROMFS files.")
print("Pruning ROMFS files.")
# go through
for (root, dirs, files) in os.walk(args.folder):
for file in files:
# only prune text files
if ".zip" in file or ".bin" in file or ".swp" in file \
or ".data" in file or ".DS_Store" in file \
or file.startswith("."):
continue
# go through
for (root, dirs, files) in os.walk(args.folder):
for file in files:
# only prune text files
if ".zip" in file or ".bin" in file or ".swp" in file or ".data" in file or ".DS_Store" in file:
continue
file_path = os.path.join(root, file)
file_path = os.path.join(root, file)
# read file line by line
pruned_content = ""
with open(file_path, "rU") as f:
for line in f:
# handle mixer files differently than startup files
if file_path.endswith(".mix"):
if line.startswith(("Z:", "M:", "R: ", "O:", "S:")):
pruned_content += line
else:
if not line.isspace() and not line.strip().startswith("#"):
pruned_content += line
# overwrite old scratch file
with open(file_path, "wb") as f:
pruned_content = re.sub("\r\n", "\n", pruned_content)
f.write(pruned_content.encode("ascii", errors='strict'))
# read file line by line
pruned_content = ""
with open(file_path, "rU") as f:
for line in f:
# handle mixer files differently than startup files
if file_path.endswith(".mix"):
if line.startswith(("Z:", "M:", "R: ", "O:", "S:")):
pruned_content += line
else:
if not line.isspace() \
and not line.strip().startswith("#"):
pruned_content += line
# overwrite old scratch file
with open(file_path, "wb") as f:
pruned_content = re.sub("\r\n", "\n", pruned_content)
f.write(pruned_content.encode("ascii", errors='strict'))
if __name__ == '__main__':
main()
main()

View File

@ -449,8 +449,9 @@ class uploader(object):
if self.board_type != fw.property('board_id'):
msg = "Firmware not suitable for this board (board_type=%u board_id=%u)" % (
self.board_type, fw.property('board_id'))
print("WARNING: %s" % msg)
if args.force:
print("WARNING: %s" % msg)
print("FORCED WRITE, FLASHING ANYWAY!")
else:
raise IOError(msg)
if self.fw_maxsize < fw.property('image_size'):

@ -1 +1 @@
Subproject commit 6af47249caefa3ddb6de2c31ae061aff1858fd0e
Subproject commit b28258f1ac0d66eddb2c8682b8bad3586c6c855e

1
cmake/cmake_hexagon Submodule

@ -0,0 +1 @@
Subproject commit 829f22eff345c934ca8939b2385768ca5e33794c

View File

@ -138,13 +138,15 @@ function(px4_add_git_submodule)
string(REPLACE "/" "_" NAME ${PATH})
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/git_init_${NAME}.stamp
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND git submodule init ${PATH}
COMMAND git submodule update --init --recursive ${PATH}
COMMAND touch ${CMAKE_BINARY_DIR}/git_init_${NAME}.stamp
DEPENDS ${CMAKE_SOURCE_DIR}/.gitmodules
)
add_custom_target(${TARGET}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMAND git submodule update --recursive ${PATH}
# This is NOT a good approach as it overwrites checked out branches
# behind the back of a developer
#COMMAND git submodule update --recursive ${PATH}
DEPENDS ${CMAKE_BINARY_DIR}/git_init_${NAME}.stamp
)
endfunction()
@ -266,6 +268,10 @@ function(px4_add_module)
add_library(${MODULE} STATIC EXCLUDE_FROM_ALL ${SRCS})
if(${OS} STREQUAL "qurt" )
set_property(TARGET ${MODULE} PROPERTY POSITION_INDEPENDENT_CODE TRUE)
endif()
if(MAIN)
set_target_properties(${MODULE} PROPERTIES
COMPILE_DEFINITIONS PX4_MAIN=${MAIN}_app_main)
@ -530,15 +536,28 @@ function(px4_add_common_flags)
)
endif()
set(max_optimization -Os)
if ($ENV{MEMORY_DEBUG} MATCHES "1")
set(max_optimization -O0)
set(optimization_flags
-fno-strict-aliasing
-fomit-frame-pointer
-funsafe-math-optimizations
-ffunction-sections
-fdata-sections
)
set(optimization_flags
-fno-strict-aliasing
-fno-omit-frame-pointer
-funsafe-math-optimizations
-ffunction-sections
-fdata-sections
-g -fsanitize=address
)
else()
set(max_optimization -Os)
set(optimization_flags
-fno-strict-aliasing
-fomit-frame-pointer
-funsafe-math-optimizations
-ffunction-sections
-fdata-sections
)
endif()
if (NOT ${CMAKE_C_COMPILER_ID} MATCHES ".*Clang.*")
list(APPEND optimization_flags

View File

@ -0,0 +1,47 @@
include(posix/px4_impl_posix)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cmake)
set(config_module_list
drivers/device
platforms/common
platforms/posix/px4_layer
platforms/posix/work_queue
systemcmds/param
systemcmds/mixer
systemcmds/ver
systemcmds/esc_calib
systemcmds/reboot
systemcmds/topic_listener
systemcmds/perf
modules/uORB
modules/param
modules/systemlib
modules/systemlib/mixer
modules/sensors
modules/mavlink
modules/attitude_estimator_q
modules/position_estimator_inav
modules/navigator
modules/vtol_att_control
modules/mc_pos_control
modules/mc_att_control
modules/land_detector
modules/fw_att_control
modules/fw_pos_control_l1
modules/dataman
modules/sdlog2
modules/commander
modules/controllib
lib/mathlib
lib/mathlib/math/filter
lib/conversion
lib/ecl
lib/external_lgpl
lib/geo
lib/geo_lookup
lib/launchdetection
lib/terrain_estimation
lib/runway_takeoff
lib/tailsitter_recovery
)

View File

@ -0,0 +1,56 @@
include(posix/px4_impl_posix)
if ("${RPI_TOOLCHAIN_DIR}" STREQUAL "")
set(RPI_TOOLCHAIN_DIR /opt/rpi_toolchain)
endif()
set(CMAKE_PROGRAM_PATH
"${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian/bin"
${CMAKE_PROGRAM_PATH}
)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf.cmake)
set(config_module_list
drivers/device
platforms/common
platforms/posix/px4_layer
platforms/posix/work_queue
systemcmds/param
systemcmds/mixer
systemcmds/ver
systemcmds/esc_calib
systemcmds/reboot
systemcmds/topic_listener
systemcmds/perf
modules/uORB
modules/param
modules/systemlib
modules/systemlib/mixer
modules/sensors
modules/mavlink
modules/attitude_estimator_q
modules/position_estimator_inav
modules/navigator
modules/vtol_att_control
modules/mc_pos_control
modules/mc_att_control
modules/land_detector
modules/fw_att_control
modules/fw_pos_control_l1
modules/dataman
modules/sdlog2
modules/commander
modules/controllib
lib/mathlib
lib/mathlib/math/filter
lib/conversion
lib/ecl
lib/external_lgpl
lib/geo
lib/geo_lookup
lib/launchdetection
lib/terrain_estimation
lib/runway_takeoff
lib/tailsitter_recovery
)

View File

@ -34,6 +34,7 @@ set(config_module_list
modules/mavlink
modules/attitude_estimator_ekf
modules/attitude_estimator_q
modules/ekf2
modules/ekf_att_pos_estimator
modules/position_estimator_inav
modules/navigator

View File

@ -11,17 +11,18 @@ include(qurt/px4_impl_qurt)
#include_directories(${HEXAGON_DRIVERS_ROOT}/inc)
# For Actual flight we need to link against the driver dynamic libraries
set(target_libraries
-L${HEXAGON_DRIVERS_ROOT}/libs
#set(target_libraries
# -L${HEXAGON_DRIVERS_ROOT}/libs
# The plan is to replace these with our drivers
# mpu9x50
# uart_esc
# csr_gps
# rc_receiver
)
# )
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)
set(config_module_list
#

View File

@ -1,6 +1,8 @@
include(qurt/px4_impl_qurt)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)
set(config_module_list
drivers/device

View File

@ -1,6 +1,7 @@
include(qurt/px4_impl_qurt)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)
set(config_module_list
drivers/device

View File

@ -1,6 +1,8 @@
include(qurt/px4_impl_qurt)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)
set(config_module_list
drivers/device

View File

@ -20,7 +20,8 @@ set(target_libraries
)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)
set(config_module_list
#

View File

@ -1,6 +1,7 @@
include(qurt/px4_impl_qurt)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)
set(config_module_list
drivers/device

View File

@ -3,7 +3,8 @@ include(qurt/px4_impl_qurt)
# Run a full link with build stubs to make sure qurt target isn't broken
set(QURT_ENABLE_STUBS "1")
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-hexagon-7.2.10.cmake)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/qurt_app.cmake)
set(config_module_list
drivers/device

View File

@ -172,16 +172,13 @@ function(px4_os_add_flags)
set(added_definitions
-D__PX4_QURT
-D__PX4_POSIX
-D__DF_QURT
-include ${PX4_INCLUDE_DIR}visibility.h
)
# Add the toolchain specific flags
set(added_cflags ${QURT_CMAKE_C_FLAGS})
set(added_cxx_flags ${QURT_CMAKE_CXX_FLAGS})
set(added_cflags -O0)
set(added_cxx_flags -O0)
# FIXME @jgoppert - how to work around issues like this?
# Without changing global variables?
# Clear -rdynamic flag which fails for hexagon
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")

View File

@ -1,254 +0,0 @@
#
# Copyright (C) 2015 Mark Charlebois. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name PX4 nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
include(CMakeForceCompiler)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
include(common/px4_base)
if ("$ENV{HEXAGON_TOOLS_ROOT}" STREQUAL "")
message(FATAL_ERROR
"The HexagonTools version 7.2.10 must be installed and the environment variable HEXAGON_TOOLS_ROOT must be set"
"(e.g. export HEXAGON_TOOLS_ROOT=/opt/HEXAGON_Tools/7.2.10/Tools)")
else()
set(HEXAGON_TOOLS_ROOT $ENV{HEXAGON_TOOLS_ROOT})
endif()
macro (list2string out in)
set(list ${ARGV})
list(REMOVE_ITEM list ${out})
foreach(item ${list})
set(${out} "${${out}} ${item}")
endforeach()
endmacro(list2string)
set(V_ARCH "v5")
set(CROSSDEV "hexagon-")
set(HEXAGON_BIN ${HEXAGON_TOOLS_ROOT}/bin)
set(HEXAGON_LIB_DIR ${HEXAGON_TOOLS_ROOT}/gnu/hexagon/lib)
set(HEXAGON_ISS_DIR ${HEXAGON_TOOLS_ROOT}/lib/iss)
set(TOOLSLIB ${HEXAGON_TOOLS_ROOT}/target/hexagon/lib/${V_ARCH}/G0)
# Use the HexagonTools compiler (7.2.10)
set(CMAKE_C_COMPILER ${HEXAGON_BIN}/${CROSSDEV}clang)
set(CMAKE_CXX_COMPILER ${HEXAGON_BIN}/${CROSSDEV}clang++)
set(CMAKE_AR ${HEXAGON_BIN}/${CROSSDEV}ar CACHE FILEPATH "Archiver")
set(CMAKE_RANLIB ${HEXAGON_BIN}/${CROSSDEV}ranlib)
set(CMAKE_LINKER ${HEXAGON_BIN}/${CROSSDEV}ld.qcld)
set(CMAKE_NM ${HEXAGON_BIN}/${CROSSDEV}nm)
set(CMAKE_OBJDUMP ${HEXAGON_BIN}/${CROSSDEV}objdump)
set(CMAKE_OBJCOPY ${HEXAGON_BIN}/${CROSSDEV}objcopy)
list2string(HEXAGON_INCLUDE_DIRS
-I${HEXAGON_TOOLS_ROOT}/target/hexagon/include
)
#set(DYNAMIC_LIBS -Wl,${TOOLSLIB}/pic/libstdc++.a)
#set(MAXOPTIMIZATION -O0)
# Base CPU flags for each of the supported architectures.
#
set(ARCHCPUFLAGS
-m${V_ARCH}
-G0
)
add_definitions(
-D_PID_T -D_UID_T -D_TIMER_T
-Dnoreturn_function=
-D_HAS_C9X
-D__EXPORT=
-Drestrict=
-D_DEBUG
-Wno-error=shadow
)
# optimisation flags
#
set(ARCHOPTIMIZATION
-O0
-g
-fno-strict-aliasing
-fdata-sections
-fno-zero-initialized-in-bss
)
# Language-specific flags
#
set(ARCHCFLAGS
-std=gnu99
-D__CUSTOM_FILE_IO__
)
set(ARCHCXXFLAGS
-fno-exceptions
-fno-rtti
-std=c++11
-fno-threadsafe-statics
-DCONFIG_WCHAR_BUILTIN
-D__CUSTOM_FILE_IO__
)
set(ARCHWARNINGS
-Wall
-Wextra
-Werror
-Wno-unused-parameter
-Wno-unused-function
-Wno-unused-variable
-Wno-gnu-array-member-paren-init
-Wno-cast-align
-Wno-missing-braces
-Wno-strict-aliasing
# -Werror=float-conversion - works, just needs to be phased in with some effort and needs GCC 4.9+
# -Wcast-qual - generates spurious noreturn attribute warnings, try again later
# -Wconversion - would be nice, but too many "risky-but-safe" conversions in the code
# -Wcast-align - would help catch bad casts in some cases, but generates too many false positives
)
# C-specific warnings
#
set(ARCHCWARNINGS
${ARCHWARNINGS}
-Wstrict-prototypes
-Wnested-externs
)
# C++-specific warnings
#
set(ARCHWARNINGSXX
${ARCHWARNINGS}
-Wno-missing-field-initializers
)
exec_program(${CMAKE_CXX_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ARGS -print-libgcc-file-name OUTPUT_VARIABLE LIBGCC)
exec_program(${CMAKE_CXX_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ARGS -print-file-name=libm.a OUTPUT_VARIABLE LIBM)
set(EXTRA_LIBS ${EXTRA_LIBS} ${LIBM})
# Flags we pass to the C compiler
#
list2string(CFLAGS
${ARCHCFLAGS}
${ARCHCWARNINGS}
${ARCHOPTIMIZATION}
${ARCHCPUFLAGS}
${ARCHINCLUDES}
${INSTRUMENTATIONDEFINES}
${ARCHDEFINES}
${EXTRADEFINES}
${EXTRACFLAGS}
${HEXAGON_INCLUDE_DIRS}
)
# Flags we pass to the C++ compiler
#
list2string(CXXFLAGS
${ARCHCXXFLAGS}
${ARCHWARNINGSXX}
${ARCHOPTIMIZATION}
${ARCHCPUFLAGS}
${ARCHXXINCLUDES}
${INSTRUMENTATIONDEFINES}
${ARCHDEFINES}
${EXTRADEFINES}
${EXTRACXXFLAGS}
${HEXAGON_INCLUDE_DIRS}
)
# Flags we pass to the assembler
#
list2string(AFLAGS
${CFLAGS}
-D__ASSEMBLY__
${EXTRADEFINES}
${EXTRAAFLAGS}
)
# Set cmake flags
#
list2string(CMAKE_C_FLAGS
${CMAKE_C_FLAGS}
${CFLAGS}
)
set(QURT_CMAKE_C_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "cflags")
message(STATUS "CMAKE_C_FLAGS: -${CMAKE_C_FLAGS}-")
list2string(CMAKE_CXX_FLAGS
${CMAKE_CXX_FLAGS}
${CXXFLAGS}
)
set(QURT_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "cxxflags")
message(STATUS "CMAKE_CXX_FLAGS: -${CMAKE_CXX_FLAGS}-")
# Flags we pass to the linker
#
list2string(CMAKE_EXE_LINKER_FLAGS
-g
-mv5
-mG0lib
-G0
-fpic
-shared
-Wl,-Bsymbolic
-Wl,--wrap=malloc
-Wl,--wrap=calloc
-Wl,--wrap=free
-Wl,--wrap=realloc
-Wl,--wrap=memalign
-Wl,--wrap=__stack_chk_fail
-lc
${EXTRALDFLAGS}
)
# where is the target environment
set(CMAKE_FIND_ROOT_PATH get_file_component(${C_COMPILER} PATH))
set(CMAKE_C_COMPILER_ID, "Clang")
set(CMAKE_CXX_COMPILER_ID, "Clang")
# search for programs in the build host directories
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
# The Hexagon compiler doesn't support the -rdynamic flag and this is set
# in the base cmake scripts. We have to redefine the __linux_compiler_gnu
# macro for cmake 2.8 to work
set(__LINUX_COMPILER_GNU 1)
macro(__linux_compiler_gnu lang)
set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "")
endmacro()

View File

@ -1,249 +0,0 @@
#
# Copyright (C) 2015 Mark Charlebois. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name PX4 nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
include(CMakeForceCompiler)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
include(common/px4_base)
if(NOT HEXAGON_TOOLS_ROOT)
set(HEXAGON_TOOLS_ROOT /opt/6.4.05)
endif()
if(NOT HEXAGON_SDK_ROOT)
set(HEXAGON_SDK_ROOT /opt/Hexagon_SDK)
endif()
macro (list2string out in)
set(list ${ARGV})
list(REMOVE_ITEM list ${out})
foreach(item ${list})
set(${out} "${${out}} ${item}")
endforeach()
endmacro(list2string)
set(V_ARCH "v5")
set(CROSSDEV "hexagon-")
set(HEXAGON_BIN ${HEXAGON_TOOLS_ROOT}/gnu/bin)
set(HEXAGON_CLANG_BIN ${HEXAGON_TOOLS_ROOT}/qc/bin)
set(HEXAGON_LIB_DIR ${HEXAGON_TOOLS_ROOT}/gnu/hexagon/lib)
set(HEXAGON_ISS_DIR ${HEXAGON_TOOLS_ROOT}/qc/lib/iss)
set(TOOLSLIB ${HEXAGON_TOOLS_ROOT}/dinkumware/lib/$(V_ARCH)/G0)
set(QCTOOLSLIB ${HEXAGON_TOOLS_ROOT}/qc/lib/$(V_ARCH)/G0)
# Use the HexagonTools compiler (6.4.05)
set(CMAKE_C_COMPILER ${HEXAGON_CLANG_BIN}/${CROSSDEV}clang)
set(CMAKE_CXX_COMPILER ${HEXAGON_CLANG_BIN}/${CROSSDEV}clang++)
set(CMAKE_AR ${HEXAGON_BIN}/${CROSSDEV}ar CACHE FILEPATH "Archiver")
set(CMAKE_RANLIB ${HEXAGON_BIN}/${CROSSDEV}ranlib)
set(CMAKE_LINKER ${HEXAGON_BIN}/${CROSSDEV}ld)
set(CMAKE_NM ${HEXAGON_BIN}/${CROSSDEV}nm)
set(CMAKE_OBJDUMP ${HEXAGON_BIN}/${CROSSDEV}objdump)
set(CMAKE_OBJCOPY ${HEXAGON_BIN}/${CROSSDEV}objcopy)
list2string(HEXAGON_INCLUDE_DIRS
-I${HEXAGON_TOOLS_ROOT}/gnu/hexagon/include
-I${HEXAGON_SDK_ROOT}/inc
-I${HEXAGON_SDK_ROOT}/inc/stddef
)
#set(DYNAMIC_LIBS -Wl,${TOOLSLIB}/pic/libstdc++.a)
#set(MAXOPTIMIZATION -O0)
# Base CPU flags for each of the supported architectures.
#
set(ARCHCPUFLAGS
-m${V_ARCH}
-G0
)
add_definitions(
-D_PID_T -D_UID_T -D_TIMER_T
-Dnoreturn_function=
-D__EXPORT=
-Drestrict=
-D_DEBUG
-Wno-error=shadow
)
# optimisation flags
#
set(ARCHOPTIMIZATION
-O0
-g
-fno-strict-aliasing
-fdata-sections
-fpic
-fno-zero-initialized-in-bss
)
# Language-specific flags
#
set(ARCHCFLAGS
-std=gnu99
-D__CUSTOM_FILE_IO__
)
set(ARCHCXXFLAGS
-fno-exceptions
-fno-rtti
-std=c++11
-fno-threadsafe-statics
-DCONFIG_WCHAR_BUILTIN
-D__CUSTOM_FILE_IO__
)
set(ARCHWARNINGS
-Wall
-Wextra
-Werror
-Wno-unused-parameter
-Wno-unused-function
-Wno-unused-variable
-Wno-gnu-array-member-paren-init
-Wno-cast-align
-Wno-missing-braces
-Wno-strict-aliasing
# -Werror=float-conversion - works, just needs to be phased in with some effort and needs GCC 4.9+
# -Wcast-qual - generates spurious noreturn attribute warnings, try again later
# -Wconversion - would be nice, but too many "risky-but-safe" conversions in the code
# -Wcast-align - would help catch bad casts in some cases, but generates too many false positives
)
# C-specific warnings
#
set(ARCHCWARNINGS
${ARCHWARNINGS}
-Wstrict-prototypes
-Wnested-externs
)
# C++-specific warnings
#
set(ARCHWARNINGSXX
${ARCHWARNINGS}
-Wno-missing-field-initializers
)
exec_program(${CMAKE_CXX_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ARGS -print-libgcc-file-name OUTPUT_VARIABLE LIBGCC)
exec_program(${CMAKE_CXX_COMPILER} ${CMAKE_CURRENT_SOURCE_DIR} ARGS -print-file-name=libm.a OUTPUT_VARIABLE LIBM)
set(EXTRA_LIBS ${EXTRA_LIBS} ${LIBM})
# Flags we pass to the C compiler
#
list2string(CFLAGS
${ARCHCFLAGS}
${ARCHCWARNINGS}
${ARCHOPTIMIZATION}
${ARCHCPUFLAGS}
${ARCHINCLUDES}
${INSTRUMENTATIONDEFINES}
${ARCHDEFINES}
${EXTRADEFINES}
${EXTRACFLAGS}
${HEXAGON_INCLUDE_DIRS}
)
# Flags we pass to the C++ compiler
#
list2string(CXXFLAGS
${ARCHCXXFLAGS}
${ARCHWARNINGSXX}
${ARCHOPTIMIZATION}
${ARCHCPUFLAGS}
${ARCHXXINCLUDES}
${INSTRUMENTATIONDEFINES}
${ARCHDEFINES}
${EXTRADEFINES}
${EXTRACXXFLAGS}
${HEXAGON_INCLUDE_DIRS}
)
# Flags we pass to the assembler
#
list2string(AFLAGS
${CFLAGS}
-D__ASSEMBLY__
${EXTRADEFINES}
${EXTRAAFLAGS}
)
# Set cmake flags
#
list2string(CMAKE_C_FLAGS
${CMAKE_C_FLAGS}
${CFLAGS}
)
set(QURT_CMAKE_C_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "cflags")
message(STATUS "CMAKE_C_FLAGS: -${CMAKE_C_FLAGS}-")
list2string(CMAKE_CXX_FLAGS
${CMAKE_CXX_FLAGS}
${CXXFLAGS}
)
set(QURT_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "cxxflags")
message(STATUS "CMAKE_CXX_FLAGS: -${CMAKE_CXX_FLAGS}-")
# Flags we pass to the linker
#
list2string(CMAKE_EXE_LINKER_FLAGS
-g
-mv5
-mG0lib
-G0
-fpic
-shared
-Wl,-Bsymbolic
-Wl,--wrap=malloc
-Wl,--wrap=calloc
-Wl,--wrap=free
-Wl,--wrap=realloc
-Wl,--wrap=memalign
-Wl,--wrap=__stack_chk_fail
-lc
${EXTRALDFLAGS}
)
# where is the target environment
set(CMAKE_FIND_ROOT_PATH get_file_component(${C_COMPILER} PATH))
set(CMAKE_C_COMPILER_ID, "Clang")
set(CMAKE_CXX_COMPILER_ID, "Clang")
# search for programs in the build host directories
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

View File

@ -3,3 +3,4 @@ float32 indicated_airspeed_m_s # indicated airspeed in meters per second, -1 if
float32 true_airspeed_m_s # true filtered airspeed in meters per second, -1 if unknown
float32 true_airspeed_unfiltered_m_s # true airspeed in meters per second, -1 if unknown
float32 air_temperature_celsius # air temperature in degrees celsius, -1000 if unknown
float32 confidence # confidence value from 0 to 1 for this sensor

View File

@ -3,3 +3,4 @@ float32 voltage_v # Battery voltage in volts, 0 if unknown
float32 voltage_filtered_v # Battery voltage in volts, filtered, 0 if unknown
float32 current_a # Battery current in amperes, -1 if unknown
float32 discharged_mah # Discharged amount in mAh, -1 if unknown
bool is_powering_off # Power off event imminent indication, false if unknown

7
msg/ekf2_innovations.msg Normal file
View File

@ -0,0 +1,7 @@
uint64 timestamp # Timestamp in microseconds since boot
float32[6] vel_pos_innov # velocity and position innovations
float32[3] mag_innov # earth magnetic field innovations
float32 heading_innov # heading innovation
float32[6] vel_pos_innov_var # velocity and position innovation variances
float32[3] mag_innov_var # earth magnetic field innovation variance
float32 heading_innov_var # heading innovation variance

View File

@ -5,3 +5,14 @@ uint8 nan_flags # Bitmask to indicate NaN states
uint8 health_flags # Bitmask to indicate sensor health states (vel, pos, hgt)
uint8 timeout_flags # Bitmask to indicate timeout flags (vel, pos, hgt)
float32[28] covariances # Diagonal Elements of Covariance Matrix
uint16 gps_check_fail_flags # Bitmask to indicate status of GPS checks - see definition below
# bits are true when corresponding test has failed
# 0 : minimum required sat count fail
# 1 : minimum required GDoP fail
# 2 : maximum allowed horizontal position error fail
# 3 : maximum allowed vertical position error fail
# 4 : maximum allowed speed error fail
# 5 : maximum allowed horizontal position drift fail
# 6 : maximum allowed vertical position drift fail
# 7 : maximum allowed horizontal speed fail
# 8 : maximum allowed vertical velocity discrepancy fail

View File

@ -1,3 +1,12 @@
###############################################################################################
# The vehicle_attitude_setpoint.msg needs to be in sync with the virtual setpoint messages
#
# Please keep the following messages identical;
# vehicle_attitude_setpoint.msg
# mc_virtual_attitude_setpoint.msg
# fw_virtual_attitude_setpoint.msg
#
###############################################################################################
uint64 timestamp # in microseconds since system start, is set whenever the writing thread stores new data
@ -21,3 +30,8 @@ float32 thrust # Thrust in Newton the power system should generate
bool roll_reset_integral # Reset roll integral part (navigation logic change)
bool pitch_reset_integral # Reset pitch integral part (navigation logic change)
bool yaw_reset_integral # Reset yaw integral part (navigation logic change)
bool fw_control_yaw # control heading with rudder (used for auto takeoff on runway)
bool disable_mc_yaw_control # control yaw for mc (used for vtol weather-vane mode)
bool apply_flaps

View File

@ -1,6 +1,16 @@
###############################################################################################
# The vehicle_rates_setpoint.msg needs to be in sync with the virtual setpoint messages
#
# Please keep the following messages identical;
# vehicle_rates_setpoint.msg
# mc_virtual_rates_setpoint.msg
# fw_virtual_rates_setpoint.msg
#
###############################################################################################
uint64 timestamp # in microseconds since system start
float32 roll # body angular rates in NED frame
float32 pitch # body angular rates in NED frame
float32 yaw # body angular rates in NED frame
float32 yaw # body angular rates in NED frame
float32 thrust # thrust normalized to 0..1

View File

@ -6,6 +6,12 @@ uint8 RC_INPUT_SOURCE_PX4IO_SBUS = 4
uint8 RC_INPUT_SOURCE_PX4IO_ST24 = 5
uint8 RC_INPUT_SOURCE_MAVLINK = 6
uint8 RC_INPUT_SOURCE_QURT = 7
uint8 RC_INPUT_SOURCE_PX4FMU_SPEKTRUM = 8
uint8 RC_INPUT_SOURCE_PX4FMU_SBUS = 9
uint8 RC_INPUT_SOURCE_PX4FMU_ST24 = 10
uint8 RC_INPUT_SOURCE_PX4FMU_SUMD = 11
uint8 RC_INPUT_SOURCE_PX4FMU_DSM = 12
uint8 RC_INPUT_SOURCE_PX4IO_SUMD = 13
uint8 RC_INPUT_MAX_CHANNELS = 18 # Maximum number of R/C input channels in the system. S.Bus has up to 18 channels.
@ -14,7 +20,7 @@ uint64 timestamp_last_signal # last valid reception time
uint32 channel_count # number of channels actually being seen
int32 rssi # receive signal strength indicator (RSSI): < 0: Undefined, 0: no signal, 100: full reception
bool rc_failsafe # explicit failsafe flag: true on TX failure or TX out of range , false otherwise. Only the true state is reliable, as there are some (PPM) receivers on the market going into failsafe without telling us explicitly.
bool rc_lost # RC receiver connection status: True,if no frame has arrived in the expected time, false otherwise. True usally means that the receiver has been disconnected, but can also indicate a radio link loss on "stupid" systems. Will remain false, if a RX with failsafe option continues to transmit frames after a link loss.
bool rc_lost # RC receiver connection status: True,if no frame has arrived in the expected time, false otherwise. True usUally means that the receiver has been disconnected, but can also indicate a radio link loss on "stupid" systems. Will remain false, if a RX with failsafe option continues to transmit frames after a link loss.
uint16 rc_lost_frame_count # Number of lost RC frames. Note: intended purpose: observe the radio link quality if RSSI is not available. This value must not be used to trigger any failsafe-alike funtionality.
uint16 rc_total_frame_count # Number of total RC frames. Note: intended purpose: observe the radio link quality if RSSI is not available. This value must not be used to trigger any failsafe-alike funtionality.
uint16 rc_ppm_frame_length # Length of a single PPM frame. Zero for non-PPM systems

View File

@ -26,7 +26,7 @@ float32 z # throttle stick position 0..1
# in general the value corresponds to the demanded throttle by the user,
# if the input is used for setting the setpoint of a vertical position
# controller any value > 0.5 means up and any value < 0.5 means down
float32 r # yaw stick/twist positon, -1..1
float32 r # yaw stick/twist position, -1..1
# in general corresponds to the righthand rotation around the vertical
# (downwards) axis of the vehicle
float32 flaps # flap position
@ -38,8 +38,9 @@ float32 aux5 # default function: payload drop
uint8 mode_switch # main mode 3 position switch (mandatory): _MANUAL_, ASSIST, AUTO
uint8 return_switch # return to launch 2 position switch (mandatory): _NORMAL_, RTL
uint8 rattitude_switch # rattitude control 2 position switch (optional): _MANUAL, RATTITUDE
uint8 rattitude_switch # rattitude control 2 position switch (optional): _MANUAL, RATTITUDE
uint8 posctl_switch # position control 2 position switch (optional): _ALTCTL_, POSCTL
uint8 loiter_switch # loiter 2 position switch (optional): _MISSION_, LOITER
uint8 acro_switch # acro 2 position switch (optional): _MANUAL_, ACRO
uint8 offboard_switch # offboard 2 position switch (optional): _NORMAL_, OFFBOARD
uint8 offboard_switch # offboard 2 position switch (optional): _NORMAL_, OFFBOARD
uint8 kill_switch # throttle kill: _NORMAL_, KILL

View File

@ -1,3 +1,12 @@
###############################################################################################
# The vehicle_attitude_setpoint.msg needs to be in sync with the virtual setpoint messages
#
# Please keep the following messages identical;
# vehicle_attitude_setpoint.msg
# mc_virtual_attitude_setpoint.msg
# fw_virtual_attitude_setpoint.msg
#
###############################################################################################
uint64 timestamp # in microseconds since system start, is set whenever the writing thread stores new data
@ -21,3 +30,8 @@ float32 thrust # Thrust in Newton the power system should generate
bool roll_reset_integral # Reset roll integral part (navigation logic change)
bool pitch_reset_integral # Reset pitch integral part (navigation logic change)
bool yaw_reset_integral # Reset yaw integral part (navigation logic change)
bool fw_control_yaw # control heading with rudder (used for auto takeoff on runway)
bool disable_mc_yaw_control # control yaw for mc (used for vtol weather-vane mode)
bool apply_flaps

View File

@ -1,6 +1,16 @@
###############################################################################################
# The vehicle_rates_setpoint.msg needs to be in sync with the virtual setpoint messages
#
# Please keep the following messages identical;
# vehicle_rates_setpoint.msg
# mc_virtual_rates_setpoint.msg
# fw_virtual_rates_setpoint.msg
#
###############################################################################################
uint64 timestamp # in microseconds since system start
float32 roll # body angular rates in NED frame
float32 pitch # body angular rates in NED frame
float32 yaw # body angular rates in NED frame
float32 yaw # body angular rates in NED frame
float32 thrust # thrust normalized to 0..1

View File

@ -6,7 +6,8 @@ bool warning # true if mission is valid, but has potentially problematic items
bool reached # true if mission has been reached
bool finished # true if mission has been completed
bool stay_in_failsafe # true if the commander should not switch out of the failsafe mode
bool flight_termination # true if the navigator demands a flight termination from the commander app
bool flight_termination # true if the navigator demands a flight termination from the commander app
bool item_do_jump_changed # true if the number of do jumps remaining has changed
uint32 item_changed_index # indicate which item has changed
uint32 item_do_jump_remaining # set to the number of do jumps remaining for that item
bool mission_failure # true if the mission cannot continue or be completed for some reason

View File

@ -1 +1,2 @@
uint64 timestamp # time at which the latest parameter was updated
bool saved # wether the change has already been saved to disk

View File

@ -23,6 +23,7 @@ float64 lon # longitude, in deg
float32 alt # altitude AMSL, in m
float32 yaw # yaw (only for multirotors), in rad [-PI..PI), NaN = hold current yaw
bool yaw_valid # true if yaw setpoint valid
bool disable_mc_yaw_control # control yaw for mc (used for vtol weather-vane mode)
float32 yawspeed # yawspeed (only for multirotors, in rad/s)
bool yawspeed_valid # true if yawspeed setpoint valid
float32 loiter_radius # loiter radius (only for fixed wing), in m

View File

@ -1,4 +1,4 @@
int32 RC_CHANNELS_FUNCTION_MAX=20
int32 RC_CHANNELS_FUNCTION_MAX=21
uint8 RC_CHANNELS_FUNCTION_THROTTLE=0
uint8 RC_CHANNELS_FUNCTION_ROLL=1
uint8 RC_CHANNELS_FUNCTION_PITCH=2
@ -19,11 +19,12 @@ uint8 RC_CHANNELS_FUNCTION_PARAM_1=16
uint8 RC_CHANNELS_FUNCTION_PARAM_2=17
uint8 RC_CHANNELS_FUNCTION_PARAM_3_5=18
uint8 RC_CHANNELS_FUNCTION_RATTITUDE=19
uint8 RC_CHANNELS_FUNCTION_KILLSWITCH=20
uint64 timestamp # Timestamp in microseconds since boot time
uint64 timestamp_last_valid # Timestamp of last valid RC signal
float32[20] channels # Scaled to -1..1 (throttle: 0..1)
float32[18] channels # Scaled to -1..1 (throttle: 0..1)
uint8 channel_count # Number of valid channels
int8[20] function # Functions mapping
int8[21] function # Functions mapping
uint8 rssi # Receive signal strength index
bool signal_lost # Control signal lost, should be checked together with topic timeout
uint32 frame_drop_count # Number of dropped frames

View File

@ -6,6 +6,6 @@ bool[3] valid #true for RC-Param channels which are mapped to a param
int32[3] param_index # corresponding param index, this field is ignored if set to -1, in this case param_id will be used
char[51] param_id # MAP_NCHAN * (ID_LEN + 1) chars, corresponding param id, null terminated
float32[3] scale # scale to map the RC input [-1, 1] to a parameter value
float32[3] value0 # inital value around which the parameter value is changed
float32[3] value0 # initial value around which the parameter value is changed
float32[3] value_min # minimal parameter value
float32[3] value_max # minimal parameter value

View File

@ -1,3 +1,12 @@
###############################################################################################
# The vehicle_attitude_setpoint.msg needs to be in sync with the virtual setpoint messages
#
# Please keep the following messages identical;
# vehicle_attitude_setpoint.msg
# mc_virtual_attitude_setpoint.msg
# fw_virtual_attitude_setpoint.msg
#
###############################################################################################
uint64 timestamp # in microseconds since system start, is set whenever the writing thread stores new data
@ -23,5 +32,6 @@ bool pitch_reset_integral # Reset pitch integral part (navigation logic change
bool yaw_reset_integral # Reset yaw integral part (navigation logic change)
bool fw_control_yaw # control heading with rudder (used for auto takeoff on runway)
bool disable_mc_yaw_control # control yaw for mc (used for vtol weather-vane mode)
bool apply_flaps

View File

@ -31,6 +31,7 @@ uint32 VEHICLE_CMD_DO_SET_SERVO = 183 # Set a servo to a desired PWM value. |S
uint32 VEHICLE_CMD_DO_REPEAT_SERVO = 184 # Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period. |Servo number| PWM (microseconds, 1000 to 2000 typical)| Cycle count| Cycle time (seconds)| Empty| Empty| Empty|
uint32 VEHICLE_CMD_DO_FLIGHTTERMINATION=185 # Terminate flight immediately |Flight termination activated if > 0.5| Empty| Empty| Empty| Empty| Empty| Empty|
uint32 VEHICLE_CMD_DO_CONTROL_VIDEO = 200 # Control onboard camera system. |Camera ID (-1 for all)| Transmission: 0: disabled, 1: enabled compressed, 2: enabled raw| Transmission mode: 0: video stream, >0: single images every n seconds (decimal)| Recording: 0: disabled, 1: enabled compressed, 2: enabled raw| Empty| Empty| Empty|
uint32 VEHICLE_CMD_DO_DIGICAM_CONTROL=203
uint32 VEHICLE_CMD_DO_MOUNT_CONFIGURE=204 # Mission command to configure a camera or antenna mount |Mount operation mode (see MAV_MOUNT_MODE enum)| stabilize roll? (1 = yes, 0 = no)| stabilize pitch? (1 = yes, 0 = no)| stabilize yaw? (1 = yes, 0 = no)| Empty| Empty| Empty|
uint32 VEHICLE_CMD_DO_MOUNT_CONTROL=205 # Mission command to control a camera or antenna mount |pitch or lat in degrees, depending on mount mode.| roll or lon in degrees depending on mount mode| yaw or alt (in meters) depending on mount mode| reserved| reserved| reserved| MAV_MOUNT_MODE enum value|
uint32 VEHICLE_CMD_DO_SET_CAM_TRIGG_DIST=206 # Mission command to set CAM_TRIGG_DIST for this flight |Camera trigger distance (meters)| Empty| Empty| Empty| Empty| Empty| Empty|

View File

@ -1,6 +1,16 @@
###############################################################################################
# The vehicle_rates_setpoint.msg needs to be in sync with the virtual setpoint messages
#
# Please keep the following messages identical;
# vehicle_rates_setpoint.msg
# mc_virtual_rates_setpoint.msg
# fw_virtual_rates_setpoint.msg
#
###############################################################################################
uint64 timestamp # in microseconds since system start
float32 roll # body angular rates in NED frame
float32 pitch # body angular rates in NED frame
float32 yaw # body angular rates in NED frame
float32 yaw # body angular rates in NED frame
float32 thrust # thrust normalized to 0..1

View File

@ -117,10 +117,9 @@ uint32 system_id # system id, inspired by MAVLink's system ID field
uint32 component_id # subsystem / component id, inspired by MAVLink's component ID field
bool is_rotary_wing # True if system is in rotary wing configuration, so for a VTOL this is only true while flying as a multicopter
bool vtol_in_transition # True if VTOL is doing a transition
bool is_vtol # True if the system is VTOL capable
bool vtol_fw_permanent_stab # True if vtol should stabilize attitude for fw in manual mode
bool in_transition_mode
bool in_transition_mode # True if VTOL is doing a transition
bool condition_battery_voltage_valid
bool condition_system_in_air_restore # true if we can restore in mid air
@ -151,9 +150,11 @@ bool data_link_lost_cmd # datalink to GCS lost mode commanded
uint8 data_link_lost_counter # counts unique data link lost events
bool engine_failure # Set to true if an engine failure is detected
bool engine_failure_cmd # Set to true if an engine failure mode is commanded
bool vtol_transition_failure # Set to true if vtol transition failed
bool vtol_transition_failure_cmd # Set to true if vtol transition failure mode is commanded
bool gps_failure # Set to true if a gps failure is detected
bool gps_failure_cmd # Set to true if a gps failure mode is commanded
bool mission_failure # Set to true if mission could not continue/finish
bool barometer_failure # Set to true if a barometer failure is detected
bool offboard_control_signal_found_once

View File

@ -1,5 +1,6 @@
uint64 timestamp # Microseconds since system boot
bool vtol_in_rw_mode # true: vtol vehicle is in rotating wing mode
uint64 timestamp # Microseconds since system boot
bool vtol_in_rw_mode # true: vtol vehicle is in rotating wing mode
bool vtol_in_trans_mode
bool fw_permanent_stab # In fw mode stabilize attitude even if in manual mode
float32 airspeed_tot # Estimated airspeed over control surfaces
bool vtol_transition_failsafe # vtol in transition failsafe mode
bool fw_permanent_stab # In fw mode stabilize attitude even if in manual mode
float32 airspeed_tot # Estimated airspeed over control surfaces

View File

@ -667,7 +667,7 @@ CONFIG_CDCACM_NWRREQS=4
CONFIG_CDCACM_NRDREQS=4
CONFIG_CDCACM_BULKIN_REQLEN=96
CONFIG_CDCACM_RXBUFSIZE=600
CONFIG_CDCACM_TXBUFSIZE=4000
CONFIG_CDCACM_TXBUFSIZE=8000
CONFIG_CDCACM_VENDORID=0x26ac
CONFIG_CDCACM_PRODUCTID=0x0011
CONFIG_CDCACM_VENDORSTR="3D Robotics"

View File

@ -215,7 +215,7 @@
#define GPIO_UART4_RX GPIO_UART4_RX_1
#define GPIO_UART4_TX GPIO_UART4_TX_1
#define GPIO_USART6_RX GPIO_USART6_RX_1
#define GPIO_USART6_RX GPIO_USART6_RX_1 /* RC_INPUT */
#define GPIO_USART6_TX GPIO_USART6_TX_1
#define GPIO_UART7_RX GPIO_UART7_RX_1
@ -257,9 +257,10 @@
#define GPIO_SPI1_MOSI (GPIO_SPI1_MOSI_1|GPIO_SPEED_50MHz)
#define GPIO_SPI1_SCK (GPIO_SPI1_SCK_1|GPIO_SPEED_50MHz)
#define GPIO_SPI2_MISO (GPIO_SPI2_MISO_1|GPIO_SPEED_50MHz)
#define GPIO_SPI2_MOSI (GPIO_SPI2_MOSI_1|GPIO_SPEED_50MHz)
#define GPIO_SPI2_SCK (GPIO_SPI2_SCK_2|GPIO_SPEED_50MHz)
#define GPIO_SPI2_SCK (GPIO_SPI2_SCK_1|GPIO_SPEED_50MHz)
/************************************************************************************
* Public Data

View File

@ -552,7 +552,7 @@ CONFIG_UART7_SERIAL_CONSOLE=y
# USART1 Configuration
#
CONFIG_USART1_RXBUFSIZE=600
CONFIG_USART1_TXBUFSIZE=2000
CONFIG_USART1_TXBUFSIZE=4000
CONFIG_USART1_BAUD=115200
CONFIG_USART1_BITS=8
CONFIG_USART1_PARITY=0
@ -667,7 +667,7 @@ CONFIG_CDCACM_NWRREQS=4
CONFIG_CDCACM_NRDREQS=4
CONFIG_CDCACM_BULKIN_REQLEN=96
CONFIG_CDCACM_RXBUFSIZE=600
CONFIG_CDCACM_TXBUFSIZE=4000
CONFIG_CDCACM_TXBUFSIZE=8000
CONFIG_CDCACM_VENDORID=0x26ac
CONFIG_CDCACM_PRODUCTID=0x0012
CONFIG_CDCACM_VENDORSTR="3D Robotics"

View File

@ -164,8 +164,8 @@ CONFIG_USART1_SERIAL_CONSOLE=y
CONFIG_USART2_SERIAL_CONSOLE=n
CONFIG_USART3_SERIAL_CONSOLE=n
CONFIG_USART1_TXBUFSIZE=64
CONFIG_USART2_TXBUFSIZE=64
CONFIG_USART1_TXBUFSIZE=32
CONFIG_USART2_TXBUFSIZE=32
CONFIG_USART3_TXBUFSIZE=64
CONFIG_USART1_RXBUFSIZE=64

View File

@ -50,7 +50,7 @@ mc_pos_control start
mc_att_control start
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/quad_w.main.mix
mavlink start -u 14556 -r 2000000
mavlink start -u 14557 -r 2000000 -m onboard
mavlink start -u 14557 -r 2000000 -m onboard -o 14540
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
mavlink stream -r 80 -s LOCAL_POSITION_NED -u 14556
mavlink stream -r 80 -s GLOBAL_POSITION_INT -u 14556

View File

@ -0,0 +1,63 @@
uorb start
simulator start -s
param load
param set MAV_TYPE 2
param set MC_PITCHRATE_P 0.3
param set MC_ROLLRATE_P 0.3
param set MC_YAW_P 2.0
param set MC_YAWRATE_P 0.35
param set SYS_AUTOSTART 4010
param set SYS_RESTART_TYPE 2
dataman start
param set CAL_GYRO0_ID 2293768
param set CAL_ACC0_ID 1376264
param set CAL_ACC1_ID 1310728
param set CAL_MAG0_ID 196616
param set CAL_GYRO0_XOFF 0.01
param set CAL_ACC0_XOFF 0.01
param set CAL_ACC0_YOFF -0.01
param set CAL_ACC0_ZOFF 0.01
param set CAL_ACC0_XSCALE 1.01
param set CAL_ACC0_YSCALE 1.01
param set CAL_ACC0_ZSCALE 1.01
param set CAL_ACC1_XOFF 0.01
param set CAL_MAG0_XOFF 0.01
param set MPC_XY_P 0.15
param set MPC_XY_VEL_P 0.05
param set MPC_XY_VEL_D 0.005
param set MPC_XY_FF 0.1
param set SENS_BOARD_ROT 8
param set COM_RC_IN_MODE 1
param set NAV_ACC_RAD 2.0
param set RTL_RETURN_ALT 30.0
param set RTL_DESCEND_ALT 10.0
rgbledsim start
tone_alarm start
gyrosim start
accelsim start
barosim start
adcsim start
gpssim start
pwm_out_sim mode_pwm
sleep 1
sensors start
commander start
land_detector start multicopter
navigator start
attitude_estimator_q start
position_estimator_inav start
mc_pos_control start
mc_att_control start
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/quad_w.main.mix
mavlink start -u 14556 -r 2000000
mavlink start -u 14557 -r 2000000 -m onboard -o 14540
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
mavlink stream -r 80 -s LOCAL_POSITION_NED -u 14556
mavlink stream -r 80 -s GLOBAL_POSITION_INT -u 14556
mavlink stream -r 80 -s ATTITUDE -u 14556
mavlink stream -r 80 -s ATTITUDE_TARGET -u 14556
mavlink stream -r 20 -s RC_CHANNELS -u 14556
mavlink stream -r 250 -s HIGHRES_IMU -u 14556
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u 14556
mavlink boot_complete
sdlog2 start -r 100 -e -t -a

View File

@ -0,0 +1,69 @@
uorb start
simulator start -s
param load
param set MAV_TYPE 20
param set MC_PITCHRATE_P 0.3
param set MC_ROLLRATE_P 0.3
param set MC_YAW_P 2.0
param set MC_YAWRATE_P 0.35
param set VT_TYPE 2
param set SYS_AUTOSTART 4010
param set SYS_RESTART_TYPE 2
dataman start
param set CAL_GYRO0_ID 2293768
param set CAL_ACC0_ID 1376264
param set CAL_ACC1_ID 1310728
param set CAL_MAG0_ID 196616
param set CAL_GYRO0_XOFF 0.01
param set CAL_ACC0_XOFF 0.01
param set CAL_ACC0_YOFF -0.01
param set CAL_ACC0_ZOFF 0.01
param set CAL_ACC0_XSCALE 1.01
param set CAL_ACC0_YSCALE 1.01
param set CAL_ACC0_ZSCALE 1.01
param set CAL_ACC1_XOFF 0.01
param set CAL_MAG0_XOFF 0.01
param set MPC_XY_P 0.15
param set MPC_XY_VEL_P 0.05
param set MPC_XY_VEL_D 0.005
param set MPC_XY_FF 0.1
param set MPC_Z_VEL_MAX 1.5
param set SENS_BOARD_ROT 8
param set COM_RC_IN_MODE 1
param set NAV_ACC_RAD 3.0
param set MPC_TKO_SPEED 1.0
param set MIS_YAW_TMT 10
rgbledsim start
tone_alarm start
gyrosim start
accelsim start
barosim start
adcsim start
gpssim start
measairspeedsim start
pwm_out_sim mode_pwm
sleep 1
sensors start
commander start
land_detector start multicopter
navigator start
attitude_estimator_q start
position_estimator_inav start
vtol_att_control start
mc_pos_control start
mc_att_control start
fw_pos_control_l1 start
fw_att_control start
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/standard_vtol_sitl.main.mix
mavlink start -u 14556 -r 2000000
mavlink start -u 14557 -r 2000000 -m onboard -o 14540
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
mavlink stream -r 80 -s LOCAL_POSITION_NED -u 14556
mavlink stream -r 80 -s GLOBAL_POSITION_INT -u 14556
mavlink stream -r 80 -s ATTITUDE -u 14556
mavlink stream -r 80 -s ATTITUDE_TARGET -u 14556
mavlink stream -r 20 -s RC_CHANNELS -u 14556
mavlink stream -r 250 -s HIGHRES_IMU -u 14556
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u 14556
mavlink boot_complete
sdlog2 start -r 200 -e -t -a

View File

@ -27,6 +27,7 @@ param set MPC_XY_P 0.15
param set MPC_XY_VEL_P 0.05
param set MPC_XY_VEL_D 0.005
param set MPC_XY_FF 0.1
param set MPC_Z_VEL_MAX 1.0
param set SENS_BOARD_ROT 8
param set COM_RC_IN_MODE 1
rgbledsim start
@ -52,7 +53,7 @@ fw_pos_control_l1 start
fw_att_control start
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/quad_x_vtol.main.mix
mavlink start -u 14556 -r 2000000
mavlink start -u 14557 -r 2000000 -m onboard
mavlink start -u 14557 -r 2000000 -m onboard -o 14540
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
mavlink stream -r 80 -s LOCAL_POSITION_NED -u 14556
mavlink stream -r 80 -s GLOBAL_POSITION_INT -u 14556

View File

@ -51,13 +51,12 @@ sensors start
commander start
land_detector start multicopter
navigator start
attitude_estimator_q start
position_estimator_inav start
ekf2 start
mc_pos_control start
mc_att_control start
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/quad_x.main.mix
mavlink start -u 14556 -r 2000000
mavlink start -u 14557 -r 2000000 -m onboard
mavlink start -u 14557 -r 2000000 -m onboard -o 14540
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
mavlink stream -r 80 -s LOCAL_POSITION_NED -u 14556
mavlink stream -r 80 -s GLOBAL_POSITION_INT -u 14556

View File

@ -50,6 +50,7 @@ mc_pos_control start
mc_att_control start
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/quad_w.main.mix
mavlink start -u 14556 -r 2000000
mavlink start -u 14557 -r 2000000 -m onboard -o 14540
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
mavlink stream -r 80 -s LOCAL_POSITION_NED_COV -u 14556
mavlink stream -r 80 -s GLOBAL_POSITION_INT -u 14556

View File

@ -0,0 +1,71 @@
uorb start
simulator start -s
param load
param set MAV_TYPE 2
param set MC_PITCHRATE_P 0.3
param set MC_ROLLRATE_P 0.3
param set MC_YAW_P 2.0
param set MC_YAWRATE_P 0.35
param set SYS_AUTOSTART 4010
param set SYS_RESTART_TYPE 2
dataman start
param set CAL_GYRO0_ID 2293768
param set CAL_ACC0_ID 1376264
param set CAL_ACC1_ID 1310728
param set CAL_MAG0_ID 196616
param set CAL_GYRO0_XOFF 0.01
param set CAL_ACC0_XOFF 0.01
param set CAL_ACC0_YOFF -0.01
param set CAL_ACC0_ZOFF 0.01
param set CAL_ACC0_XSCALE 1.01
param set CAL_ACC0_YSCALE 1.01
param set CAL_ACC0_ZSCALE 1.01
param set CAL_ACC1_XOFF 0.01
param set CAL_MAG0_XOFF 0.01
param set MPC_XY_P 0.15
param set MPC_XY_VEL_P 0.05
param set MPC_XY_VEL_D 0.005
param set MPC_XY_FF 0.1
param set SENS_BOARD_ROT 8
param set COM_RC_IN_MODE 1
param set NAV_ACC_RAD 2.0
param set RTL_RETURN_ALT 30.0
param set RTL_DESCEND_ALT 10.0
# changes for LPE
param set COM_RC_IN_MODE 1
param set LPE_BETA_MAX 10000
rgbledsim start
tone_alarm start
gyrosim start
accelsim start
barosim start
adcsim start
gpssim start
pwm_out_sim mode_pwm
sleep 1
sensors start
commander start
land_detector start multicopter
navigator start
attitude_estimator_q start
mc_pos_control start
mc_att_control start
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/quad_w.main.mix
mavlink start -u 14556 -r 2000000
mavlink start -u 14557 -r 2000000 -m onboard -o 14540
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
mavlink stream -r 80 -s LOCAL_POSITION_NED_COV -u 14556
mavlink stream -r 80 -s GLOBAL_POSITION_INT -u 14556
mavlink stream -r 80 -s ATTITUDE -u 14556
mavlink stream -r 80 -s ATTITUDE_TARGET -u 14556
mavlink stream -r 20 -s RC_CHANNELS -u 14556
mavlink stream -r 250 -s HIGHRES_IMU -u 14556
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u 14556
mavlink boot_complete
sdlog2 start -r 100 -e -t -a
# start LPE at end, when we know it is ok to init sensors
sleep 5
local_position_estimator start

View File

@ -3,8 +3,10 @@ simulator start -s
param load
param set MAV_TYPE 2
param set MC_PITCHRATE_P 0.15
param set MC_PITCH_P 7
param set MC_ROLL_P 7
param set MC_ROLLRATE_P 0.15
param set MC_YAW_P 2.0
param set MC_YAW_P 2.8
param set MC_YAWRATE_P 0.35
param set SYS_AUTOSTART 4010
param set SYS_RESTART_TYPE 2
@ -26,12 +28,22 @@ param set MPC_XY_P 0.4
param set MPC_XY_VEL_P 0.2
param set MPC_XY_VEL_D 0.005
param set SENS_BOARD_ROT 0
param set COM_RC_IN_MODE 1
param set NAV_ACC_RAD 2.0
param set RTL_RETURN_ALT 30.0
param set RTL_DESCEND_ALT 10.0
param set MIS_TAKEOFF_ALT 5.0
param set MPC_HOLD_MAX_Z 2.0
param set MPC_HOLD_XY_DZ 0.1
param set MPC_HOLD_Z_DZ 0.1
param set MPC_Z_VEL_MAX 2.0
param set MPC_Z_VEL_P 0.4
# changes for LPE
param set COM_RC_IN_MODE 1
param set LPE_BETA_MAX 10000
rgbled start
rgbledsim start
tone_alarm start
gyrosim start
accelsim start
@ -49,6 +61,7 @@ mc_pos_control start
mc_att_control start
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/quad_x.main.mix
mavlink start -u 14556 -r 2000000
mavlink start -u 14557 -r 2000000 -m onboard -o 14540
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
mavlink stream -r 80 -s LOCAL_POSITION_NED_COV -u 14556
mavlink stream -r 80 -s GLOBAL_POSITION_INT -u 14556
@ -57,6 +70,7 @@ mavlink stream -r 80 -s ATTITUDE_TARGET -u 14556
mavlink stream -r 20 -s RC_CHANNELS -u 14556
mavlink stream -r 250 -s HIGHRES_IMU -u 14556
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u 14556
mavlink stream -r 20 -s MANUAL_CONTROL -u 14556
mavlink boot_complete
sdlog2 start -r 100 -e -t -a

View File

View File

@ -77,30 +77,48 @@
#include <drivers/drv_batt_smbus.h>
#include <drivers/device/ringbuffer.h>
#define BATT_SMBUS_ADDR_MIN 0x08 ///< lowest possible address
#define BATT_SMBUS_ADDR_MAX 0x7F ///< highest possible address
#define BATT_SMBUS_ADDR_MIN 0x08 ///< lowest possible address
#define BATT_SMBUS_ADDR_MAX 0x7F ///< highest possible address
#define BATT_SMBUS_I2C_BUS PX4_I2C_BUS_EXPANSION
#define BATT_SMBUS_ADDR 0x0B ///< I2C address
#define BATT_SMBUS_TEMP 0x08 ///< temperature register
#define BATT_SMBUS_VOLTAGE 0x09 ///< voltage register
#define BATT_SMBUS_I2C_BUS PX4_I2C_BUS_EXPANSION
#define BATT_SMBUS_ADDR 0x0B ///< I2C address
#define BATT_SMBUS_TEMP 0x08 ///< temperature register
#define BATT_SMBUS_VOLTAGE 0x09 ///< voltage register
#define BATT_SMBUS_REMAINING_CAPACITY 0x0f ///< predicted remaining battery capacity as a percentage
#define BATT_SMBUS_FULL_CHARGE_CAPACITY 0x10 ///< capacity when fully charged
#define BATT_SMBUS_DESIGN_CAPACITY 0x18 ///< design capacity register
#define BATT_SMBUS_DESIGN_VOLTAGE 0x19 ///< design voltage register
#define BATT_SMBUS_SERIALNUM 0x1c ///< serial number register
#define BATT_SMBUS_MANUFACTURE_NAME 0x20 ///< manufacturer name
#define BATT_SMBUS_MANUFACTURE_INFO 0x25 ///< cell voltage register
#define BATT_SMBUS_CURRENT 0x2a ///< current register
#define BATT_SMBUS_MEASUREMENT_INTERVAL_MS (1000000 / 10) ///< time in microseconds, measure at 10hz
#define BATT_SMBUS_TIMEOUT_MS 10000000 ///< timeout looking for battery 10seconds after startup
#define BATT_SMBUS_DESIGN_CAPACITY 0x18 ///< design capacity register
#define BATT_SMBUS_DESIGN_VOLTAGE 0x19 ///< design voltage register
#define BATT_SMBUS_MANUFACTURE_DATE 0x1B ///< manufacture date register
#define BATT_SMBUS_SERIAL_NUMBER 0x1C ///< serial number register
#define BATT_SMBUS_MANUFACTURER_NAME 0x20 ///< manufacturer name
#define BATT_SMBUS_DEVICE_NAME 0x21 ///< device name register
#define BATT_SMBUS_DEVICE_CHEMISTRY 0x22 ///< device chemistry register
#define BATT_SMBUS_MANUFACTURER_DATA 0x23 ///< manufacturer data
#define BATT_SMBUS_MANUFACTURE_INFO 0x25 ///< cell voltage register
#define BATT_SMBUS_CURRENT 0x2a ///< current register
#define BATT_SMBUS_MEASUREMENT_INTERVAL_US (1000000 / 10) ///< time in microseconds, measure at 10Hz
#define BATT_SMBUS_TIMEOUT_US 10000000 ///< timeout looking for battery 10seconds after startup
#define BATT_SMBUS_PEC_POLYNOMIAL 0x07 ///< Polynomial for calculating PEC
#define BATT_SMBUS_BUTTON_DEBOUNCE_MS 300 ///< button holds longer than this time will cause a power off event
#define BATT_SMBUS_MANUFACTURER_ACCESS 0x00
#define BATT_SMBUS_MANUFACTURER_BLOCK_ACCESS 0x44
#define BATT_SMBUS_PEC_POLYNOMIAL 0x07 ///< Polynomial for calculating PEC
#ifndef CONFIG_SCHED_WORKQUEUE
# error This requires CONFIG_SCHED_WORKQUEUE.
#endif
struct battery_type {
char *ManufacturerName;
char *DeviceName;
char *DeviceChemistry;
};
// Declaration of the solo battery data, as determined by reading out the data from multiple 3DR Solo batteries
const struct battery_type solo_battery = {(char *)"BMTPOW", (char *)"MA03", (char *)"LIon"};
class BATT_SMBUS : public device::I2C
{
public:
@ -133,6 +151,62 @@ public:
*/
int search();
/**
* Get the SBS manufacturer name of the battery device
*
* @param manufacturer_name pointer a buffer into which the manufacturer name is to be written
* @param max_length the maximum number of bytes to attempt to read from the manufacturer name register, including the null character that is appended to the end
*
* @return the number of bytes read
*/
uint8_t manufacturer_name(uint8_t *man_name, uint8_t max_length);
/**
* Return the SBS manufacture date of the battery device
*
* @return the date in the following format:
* see Smart Battery Data Specification, Revision 1.1
* http://sbs-forum.org/specs/sbdat110.pdf for more details
* Date as uint16_t = (year-1980) * 512 + month * 32 + day
* | Field | Bits | Format | Allowable Values |
* | ----- | ---- | ------------------ | ------------------------------------------ |
* | Day 0-4 5-bit binary value 1-31 (corresponds to day) |
* | Month 5-8 4-bit binary value 1-12 (corresponds to month number) |
* | Year 9-15 7-bit binary value 0-127 (corresponds to year biased by 1980) |
* otherwise, return 0 on failure
*/
uint16_t manufacture_date();
/**
* Get the SBS device name of the battery device
*
* @param dev_name pointer a buffer into which the device name is to be written
* @param max_length the maximum number of bytes to attempt to read from the device name register, including the null character that is appended to the end
*
* @return the number of bytes read
*/
uint8_t device_name(uint8_t *dev_name, uint8_t max_length);
/**
* Return the SBS serial number of the battery device
*/
uint16_t serial_number();
/**
* Get the SBS device chemistry of the battery device
*
* @param dev_chem pointer a buffer into which the device chemistry is to be written
* @param max_length the maximum number of bytes to attempt to read from the device chemistry register, including the null character that is appended to the end
*
* @return the number of bytes read
*/
uint8_t device_chemistry(uint8_t *dev_chem, uint8_t max_length);
/**
* Checks whether the current SBS battery data corresponds to a 3DR Solo battery
*/
bool is_solo_battery();
protected:
/**
* Check if the device can be contacted
@ -166,18 +240,41 @@ private:
*/
int read_reg(uint8_t reg, uint16_t &val);
/**
* Write a word to specified register
*/
int write_reg(uint8_t reg, uint16_t val);
/**
* Read block from bus
* @return returns number of characters read if successful, zero if unsuccessful
*/
uint8_t read_block(uint8_t reg, uint8_t *data, uint8_t max_len, bool append_zero);
/**
* Write block to the bus
* @return the number of characters sent if successful, zero if unsuccessful
*/
uint8_t write_block(uint8_t reg, uint8_t *data, uint8_t len);
/**
* Calculate PEC for a read or write from the battery
* @param buff is the data that was read or will be written
*/
uint8_t get_PEC(uint8_t cmd, bool reading, const uint8_t buff[], uint8_t len) const;
/**
* Write a word to Manufacturer Access register (0x00)
* @param cmd the word to be written to Manufacturer Access
*/
uint8_t ManufacturerAccess(uint16_t cmd);
/**
* Checks if the battery that has been detected is a 3DR Solo Battery. If it is, it sets
* the private variable _is_solo_battery to be true
*/
void check_if_solo_battery();
// internal variables
bool _enabled; ///< true if we have successfully connected to battery
work_s _work; ///< work queue for scheduling reads
@ -187,6 +284,11 @@ private:
orb_id_t _batt_orb_id; ///< uORB battery topic ID
uint64_t _start_time; ///< system time we first attempt to communicate with battery
uint16_t _batt_capacity; ///< battery's design capacity in mAh (0 means unknown)
char *_manufacturer_name; ///< The name of the battery manufacturer
char *_device_name; ///< The name of the battery device
char *_device_chemistry; ///< The battery chemistry
bool _is_solo_battery; ///< Boolean as to whether the battery detected is a 3DR Solo Battery or not
uint8_t _button_press_counts; ///< count of button presses detected on 3DR Solo Battery
};
namespace
@ -198,15 +300,27 @@ void batt_smbus_usage();
extern "C" __EXPORT int batt_smbus_main(int argc, char *argv[]);
int manufacturer_name();
int manufacture_date();
int device_name();
int serial_number();
int device_chemistry();
int solo_battery_check();
BATT_SMBUS::BATT_SMBUS(int bus, uint16_t batt_smbus_addr) :
I2C("batt_smbus", BATT_SMBUS_DEVICE_PATH, bus, batt_smbus_addr, 400000),
I2C("batt_smbus", BATT_SMBUS0_DEVICE_PATH, bus, batt_smbus_addr, 100000),
_enabled(false),
_work{},
_reports(nullptr),
_batt_topic(nullptr),
_batt_topic(-1),
_batt_orb_id(nullptr),
_start_time(0),
_batt_capacity(0)
_batt_capacity(0),
_manufacturer_name(nullptr),
_device_name(nullptr),
_device_chemistry(nullptr),
_is_solo_battery(false),
_button_press_counts(0)
{
// work_cancel in the dtor will explode if we don't do this...
memset(&_work, 0, sizeof(_work));
@ -223,6 +337,18 @@ BATT_SMBUS::~BATT_SMBUS()
if (_reports != nullptr) {
delete _reports;
}
if (_manufacturer_name != nullptr) {
delete _manufacturer_name;
}
if (_device_name != nullptr) {
delete _device_name;
}
if (_device_chemistry != nullptr) {
delete _device_chemistry;
}
}
int
@ -297,8 +423,8 @@ BATT_SMBUS::test()
if (updated) {
if (orb_copy(ORB_ID(battery_status), sub, &status) == OK) {
warnx("V=%4.2f C=%4.2f DismAh=%4.2f Cap:%d", (float)status.voltage_v, (float)status.current_a,
(float)status.discharged_mah, (int)_batt_capacity);
warnx("V=%4.2f C=%4.2f DismAh=%4.2f Cap:%d Shutdown:%d", (double)status.voltage_v, (double)status.current_a,
(double)status.discharged_mah, (int)_batt_capacity, (int)status.is_powering_off);
}
}
@ -343,6 +469,89 @@ BATT_SMBUS::search()
return OK;
}
uint8_t
BATT_SMBUS::manufacturer_name(uint8_t *man_name, uint8_t max_length)
{
uint8_t len = read_block(BATT_SMBUS_MANUFACTURER_NAME, man_name, max_length, false);
if (len > 0) {
if (len >= max_length - 1) {
man_name[max_length - 1] = 0;
} else {
man_name[len] = 0;
}
}
return len;
}
uint16_t
BATT_SMBUS::manufacture_date()
{
uint16_t man_date;
if (read_reg(BATT_SMBUS_MANUFACTURE_DATE, man_date) == OK) {
return man_date;
}
// Return 0 if could not read the date correctly
return 0;
}
uint8_t
BATT_SMBUS::device_name(uint8_t *dev_name, uint8_t max_length)
{
uint8_t len = read_block(BATT_SMBUS_DEVICE_NAME, dev_name, max_length, false);
if (len > 0) {
if (len >= max_length - 1) {
dev_name[max_length - 1] = 0;
} else {
dev_name[len] = 0;
}
}
return len;
}
uint16_t
BATT_SMBUS::serial_number()
{
uint16_t serial_num;
if (read_reg(BATT_SMBUS_SERIAL_NUMBER, serial_num) == OK) {
return serial_num;
}
return -1;
}
uint8_t
BATT_SMBUS::device_chemistry(uint8_t *dev_chem, uint8_t max_length)
{
uint8_t len = read_block(BATT_SMBUS_DEVICE_CHEMISTRY, dev_chem, max_length, false);
if (len > 0) {
if (len >= max_length - 1) {
dev_chem[max_length - 1] = 0;
} else {
dev_chem[len] = 0;
}
}
return len;
}
bool
BATT_SMBUS::is_solo_battery()
{
check_if_solo_battery();
return _is_solo_battery;
}
int
BATT_SMBUS::probe()
{
@ -381,11 +590,53 @@ BATT_SMBUS::cycle()
uint64_t now = hrt_absolute_time();
// exit without rescheduling if we have failed to find a battery after 10 seconds
if (!_enabled && (now - _start_time > BATT_SMBUS_TIMEOUT_MS)) {
if (!_enabled && (now - _start_time > BATT_SMBUS_TIMEOUT_US)) {
warnx("did not find smart battery");
return;
}
bool perform_solo_battry_check = false; // Only check if it is a solo battery if changes have been made to the SBS data
// Try and get battery SBS info
if (_manufacturer_name == nullptr) {
char man_name[21];
uint8_t len = manufacturer_name((uint8_t *)man_name, sizeof(man_name));
if (len > 0) {
_manufacturer_name = new char[len];
strcpy(_manufacturer_name, man_name);
perform_solo_battry_check = true;
}
}
if (_device_name == nullptr) {
char dev_name[21];
uint8_t len = device_name((uint8_t *)dev_name, sizeof(dev_name));
if (len > 0) {
_device_name = new char[len];
strcpy(_device_name, dev_name);
perform_solo_battry_check = true;
}
}
if (_device_chemistry == nullptr) {
char dev_chem[21];
uint8_t len = device_chemistry((uint8_t *)dev_chem, sizeof(dev_chem));
if (len > 0) {
_device_chemistry = new char[len];
strcpy(_device_chemistry, dev_chem);
perform_solo_battry_check = true;
}
}
// If necessary, check if the battery is a 3DR Solo Battery
if (perform_solo_battry_check) {
warnx("Checking solo battery");
check_if_solo_battery();
}
// read data from sensor
struct battery_status_s new_report;
@ -403,7 +654,7 @@ BATT_SMBUS::cycle()
new_report.voltage_v = ((float)tmp) / 1000.0f;
// read current
uint8_t buff[4];
uint8_t buff[6];
if (read_block(BATT_SMBUS_CURRENT, buff, 4, false) == 4) {
new_report.current_a = -(float)((int32_t)((uint32_t)buff[3] << 24 | (uint32_t)buff[2] << 16 | (uint32_t)buff[1] << 8 |
@ -426,14 +677,42 @@ BATT_SMBUS::cycle()
}
}
// if it is a solo battery, check for shutdown on button press
if (_is_solo_battery) {
// read the button press indicator
if (read_block(BATT_SMBUS_MANUFACTURER_DATA, buff, 6, false) == 6) {
bool pressed = (buff[1] >> 3) & 0x01;
if (_button_press_counts >= ((BATT_SMBUS_BUTTON_DEBOUNCE_MS * 1000) / BATT_SMBUS_MEASUREMENT_INTERVAL_US)) {
// battery will power off
new_report.is_powering_off = true;
// warn only once
if (_button_press_counts++ == ((BATT_SMBUS_BUTTON_DEBOUNCE_MS * 1000) / BATT_SMBUS_MEASUREMENT_INTERVAL_US)) {
warnx("system is shutting down NOW...");
}
} else if (pressed) {
// battery will power off if the button is held
_button_press_counts++;
} else {
// button released early, reset counters
_button_press_counts = 0;
new_report.is_powering_off = false;
}
}
}
// publish to orb
if (_batt_topic != nullptr) {
if (_batt_topic != -1) {
orb_publish(_batt_orb_id, _batt_topic, &new_report);
} else {
_batt_topic = orb_advertise(_batt_orb_id, &new_report);
if (_batt_topic == nullptr) {
if (_batt_topic < 0) {
errx(1, "ADVERT FAIL");
}
}
@ -453,7 +732,7 @@ BATT_SMBUS::cycle()
// schedule a fresh cycle call when the measurement is done
work_queue(HPWORK, &_work, (worker_t)&BATT_SMBUS::cycle_trampoline, this,
USEC2TICK(BATT_SMBUS_MEASUREMENT_INTERVAL_MS));
USEC2TICK(BATT_SMBUS_MEASUREMENT_INTERVAL_US));
}
int
@ -480,6 +759,27 @@ BATT_SMBUS::read_reg(uint8_t reg, uint16_t &val)
return ret;
}
int
BATT_SMBUS::write_reg(uint8_t reg, uint16_t val)
{
uint8_t buff[4]; // reg + 2 bytes of data + PEC
buff[0] = reg;
buff[2] = uint8_t(val << 8) & 0xff;
buff[1] = (uint8_t)val;
buff[3] = get_PEC(reg, false, &buff[1], 2); // Append PEC
// write bytes to register
int ret = transfer(buff, 3, nullptr, 0);
if (ret != OK) {
debug("Register write error");
}
// return success or failure
return ret;
}
uint8_t
BATT_SMBUS::read_block(uint8_t reg, uint8_t *data, uint8_t max_len, bool append_zero)
{
@ -520,6 +820,31 @@ BATT_SMBUS::read_block(uint8_t reg, uint8_t *data, uint8_t max_len, bool append_
return bufflen;
}
uint8_t
BATT_SMBUS::write_block(uint8_t reg, uint8_t *data, uint8_t len)
{
uint8_t buff[len + 3]; // buffer to hold results
usleep(1);
buff[0] = reg;
buff[1] = len;
memcpy(&buff[2], data, len);
buff[len + 2] = get_PEC(reg, false, &buff[1], len + 1); // Append PEC
// send bytes
int ret = transfer(buff, len + 3, nullptr, 0);
// return zero on failure
if (ret != OK) {
debug("Block write error\n");
return 0;
}
// return success
return len;
}
uint8_t
BATT_SMBUS::get_PEC(uint8_t cmd, bool reading, const uint8_t buff[], uint8_t len) const
{
@ -528,12 +853,32 @@ BATT_SMBUS::get_PEC(uint8_t cmd, bool reading, const uint8_t buff[], uint8_t len
return 0;
}
// prepare temp buffer for calcing crc
uint8_t tmp_buff[len + 3];
/**
* Note: The PEC is calculated on all the message bytes. See http://cache.freescale.com/files/32bit/doc/app_note/AN4471.pdf
* and http://www.ti.com/lit/an/sloa132/sloa132.pdf for more details
*/
// prepare temp buffer for calculating crc
uint8_t tmp_buff_len;
if (reading) {
tmp_buff_len = len + 3;
} else {
tmp_buff_len = len + 2;
}
uint8_t tmp_buff[tmp_buff_len];
tmp_buff[0] = (uint8_t)get_address() << 1;
tmp_buff[1] = cmd;
tmp_buff[2] = tmp_buff[0] | (uint8_t)reading;
memcpy(&tmp_buff[3], buff, len);
if (reading) {
tmp_buff[2] = tmp_buff[0] | (uint8_t)reading;
memcpy(&tmp_buff[3], buff, len);
} else {
memcpy(&tmp_buff[2], buff, len);
}
// initialise crc to zero
uint8_t crc = 0;
@ -561,17 +906,133 @@ BATT_SMBUS::get_PEC(uint8_t cmd, bool reading, const uint8_t buff[], uint8_t len
return crc;
}
uint8_t
BATT_SMBUS::ManufacturerAccess(uint16_t cmd)
{
// write bytes to Manufacturer Access
int ret = write_reg(BATT_SMBUS_MANUFACTURER_ACCESS, cmd);
if (ret != OK) {
debug("Manufacturer Access error");
}
return ret;
}
void
BATT_SMBUS::check_if_solo_battery()
{
// Check if the SBS information corresponds to that of a 3DR Solo Battery. If, yes, set the solo_battery flag to true;
if (!strcmp(_manufacturer_name, solo_battery.ManufacturerName) && !strcmp(_device_name, solo_battery.DeviceName)
&& !strcmp(_device_chemistry, solo_battery.DeviceChemistry)) {
_is_solo_battery = true;
}
}
///////////////////////// shell functions ///////////////////////
void
batt_smbus_usage()
{
warnx("missing command: try 'start', 'test', 'stop', 'search'");
warnx("missing command: try 'start', 'test', 'stop', 'search', 'man_name', 'man_date', 'dev_name', 'serial_num', 'dev_chem', 'sbs_info'");
warnx("options:");
warnx(" -b i2cbus (%d)", BATT_SMBUS_I2C_BUS);
warnx(" -a addr (0x%x)", BATT_SMBUS_ADDR);
}
int
manufacturer_name()
{
uint8_t man_name[21];
uint8_t len = g_batt_smbus->manufacturer_name(man_name, sizeof(man_name));
if (len > 0) {
warnx("The manufacturer name: %s", man_name);
return OK;
} else {
warnx("Unable to read manufacturer name.");
}
return -1;
}
int
manufacture_date()
{
uint16_t man_date = g_batt_smbus->manufacture_date();
if (man_date > 0) {
// Convert the uint16_t into human-readable date format
uint16_t year = ((man_date >> 9) & 0xFF) + 1980;
uint8_t month = (man_date >> 5) & 0xF;
uint8_t day = man_date & 0x1F;
warnx("The manufacturer date is: %d which is %4d-%02d-%02d", man_date, year, month, day);
return OK;
} else {
warnx("Unable to read the manufacturer date.");
}
return -1;
}
int
device_name()
{
uint8_t device_name[21];
uint8_t len = g_batt_smbus->device_name(device_name, sizeof(device_name));
if (len > 0) {
warnx("The device name: %s", device_name);
return OK;
} else {
warnx("Unable to read device name.");
}
return -1;
}
int
serial_number()
{
uint16_t serial_num = g_batt_smbus->serial_number();
warnx("The serial number: 0x%04x (%d in decimal)", serial_num, serial_num);
return OK;
}
int
device_chemistry()
{
uint8_t device_chemistry[5];
uint8_t len = g_batt_smbus->device_chemistry(device_chemistry, sizeof(device_chemistry));
if (len > 0) {
warnx("The device chemistry: %s", device_chemistry);
return OK;
} else {
warnx("Unable to read device chemistry.");
}
return -1;
}
int
solo_battery_check()
{
if (g_batt_smbus->is_solo_battery()) {
warnx("The battery corresponds to a 3DR Solo Battery");
} else {
warnx("The battery does not correspond to a 3DR Solo Battery");
}
return OK;
}
int
batt_smbus_main(int argc, char *argv[])
{
@ -649,6 +1110,41 @@ batt_smbus_main(int argc, char *argv[])
exit(0);
}
if (!strcmp(verb, "man_name")) {
manufacturer_name();
exit(0);
}
if (!strcmp(verb, "man_date")) {
manufacture_date();
exit(0);
}
if (!strcmp(verb, "dev_name")) {
device_name();
exit(0);
}
if (!strcmp(verb, "serial_num")) {
serial_number();
exit(0);
}
if (!strcmp(verb, "dev_chem")) {
device_chemistry();
exit(0);
}
if (!strcmp(verb, "sbs_info")) {
manufacturer_name();
manufacture_date();
device_name();
serial_number();
device_chemistry();
solo_battery_check();
exit(0);
}
batt_smbus_usage();
exit(0);
}

View File

@ -32,9 +32,9 @@
****************************************************************************/
/*
* @file aerocore_pwm_servo.c
* @file aerocore_timer_config.c
*
* Configuration data for the stm32 pwm_servo driver.
* Configuration data for the stm32 pwm_servo, input capture and pwm input driver.
*
* Note that these arrays must always be fully-sized.
*/
@ -42,76 +42,100 @@
#include <stdint.h>
#include <stm32.h>
#include <stm32_gpio.h>
#include <stm32_gpio_out.h>
#include <stm32_tim.h>
#include <drivers/stm32/drv_pwm_servo.h>
#include <drivers/stm32/drv_io_timer.h>
#include <drivers/drv_pwm_output.h>
#include "board_config.h"
__EXPORT const struct pwm_servo_timer pwm_timers[PWM_SERVO_MAX_TIMERS] = {
__EXPORT const io_timers_t io_timers[MAX_IO_TIMERS] = {
{
.base = STM32_TIM1_BASE,
.clock_register = STM32_RCC_APB2ENR,
.clock_bit = RCC_APB2ENR_TIM1EN,
.clock_freq = STM32_APB2_TIM1_CLKIN
.clock_freq = STM32_APB2_TIM1_CLKIN,
.first_channel_index = 0,
.last_channel_index = 3,
.handler = io_timer_handler0,
.vectorno = STM32_IRQ_TIM1CC,
},
{
.base = STM32_TIM3_BASE,
.clock_register = STM32_RCC_APB1ENR,
.clock_bit = RCC_APB1ENR_TIM3EN,
.clock_freq = STM32_APB1_TIM3_CLKIN
.first_channel_index = 4,
.last_channel_index = 7,
.handler = io_timer_handler1,
.vectorno = STM32_IRQ_TIM3,
}
};
__EXPORT const struct pwm_servo_channel pwm_channels[PWM_SERVO_MAX_CHANNELS] = {
__EXPORT const timer_io_channels_t timer_io_channels[MAX_TIMER_IO_CHANNELS] = {
{
.gpio = GPIO_TIM1_CH1OUT,
.gpio_out = GPIO_TIM1_CH1OUT,
.gpio_in = GPIO_TIM1_CH1IN,
.timer_index = 0,
.timer_channel = 1,
.default_value = 1500,
.ccr_offset = STM32_GTIM_CCR1_OFFSET,
.masks = GTIM_SR_CC1IF | GTIM_SR_CC1OF
},
{
.gpio = GPIO_TIM1_CH2OUT,
.gpio_out = GPIO_TIM1_CH2OUT,
.gpio_in = GPIO_TIM1_CH2IN,
.timer_index = 0,
.timer_channel = 2,
.default_value = 1500,
.ccr_offset = STM32_GTIM_CCR2_OFFSET,
.masks = GTIM_SR_CC2IF | GTIM_SR_CC2OF
},
{
.gpio = GPIO_TIM1_CH3OUT,
.gpio_out = GPIO_TIM1_CH3OUT,
.gpio_in = GPIO_TIM1_CH3IN,
.timer_index = 0,
.timer_channel = 3,
.default_value = 1500,
.ccr_offset = STM32_GTIM_CCR3_OFFSET,
.masks = GTIM_SR_CC3IF | GTIM_SR_CC3OF
},
{
.gpio = GPIO_TIM1_CH4OUT,
.gpio_out = GPIO_TIM1_CH4OUT,
.gpio_in = GPIO_TIM1_CH4IN,
.timer_index = 0,
.timer_channel = 4,
.default_value = 1500,
.ccr_offset = STM32_GTIM_CCR4_OFFSET,
.masks = GTIM_SR_CC4IF | GTIM_SR_CC4OF
},
{
.gpio = GPIO_TIM3_CH1OUT,
.gpio_out = GPIO_TIM3_CH1OUT,
.gpio_out = GPIO_TIM3_CH1IN,
.timer_index = 1,
.timer_channel = 1,
.default_value = 1500,
.ccr_offset = STM32_GTIM_CCR1_OFFSET,
.masks = GTIM_SR_CC1IF | GTIM_SR_CC1OF
},
{
.gpio = GPIO_TIM3_CH2OUT,
.gpio_out = GPIO_TIM3_CH2OUT,
.gpio_out = GPIO_TIM3_CH2IN,
.timer_index = 1,
.timer_channel = 2,
.default_value = 1500,
.ccr_offset = STM32_GTIM_CCR2_OFFSET,
.masks = GTIM_SR_CC2IF | GTIM_SR_CC2OF
},
{
.gpio = GPIO_TIM3_CH3OUT,
.gpio_out = GPIO_TIM3_CH3OUT,
.gpio_out = GPIO_TIM3_CH3IN,
.timer_index = 1,
.timer_channel = 3,
.default_value = 1500,
.ccr_offset = STM32_GTIM_CCR3_OFFSET,
.masks = GTIM_SR_CC3IF | GTIM_SR_CC3OF
},
{
.gpio = GPIO_TIM3_CH4OUT,
.gpio_out = GPIO_TIM3_CH4OUT,
.gpio_out = GPIO_TIM3_CH4IN,
.timer_index = 1,
.timer_channel = 4,
.default_value = 1500,
.ccr_offset = STM32_GTIM_CCR4_OFFSET,
.masks = GTIM_SR_CC4IF | GTIM_SR_CC4OF
}
};

View File

@ -152,6 +152,16 @@ __BEGIN_DECLS
#define GPIO_TIM3_CH4OUT GPIO_TIM3_CH4OUT_2
#define DIRECT_PWM_OUTPUT_CHANNELS 8
#define GPIO_TIM1_CH1IN GPIO_TIM1_CH1IN_2
#define GPIO_TIM1_CH2IN GPIO_TIM1_CH2IN_2
#define GPIO_TIM1_CH3IN GPIO_TIM1_CH3IN_2
#define GPIO_TIM1_CH4IN GPIO_TIM1_CH4IN_2
#define GPIO_TIM3_CH1IN GPIO_TIM3_CH1IN_3
#define GPIO_TIM3_CH2IN GPIO_TIM3_CH2IN_3
#define GPIO_TIM3_CH3IN GPIO_TIM3_CH3IN_2
#define GPIO_TIM3_CH4IN GPIO_TIM3_CH4IN_2
#define DIRECT_INPUT_TIMER_CHANNELS 8
/* High-resolution timer */
#define HRT_TIMER 8 /* use timer 8 for the HRT */
#define HRT_TIMER_CHANNEL 1 /* use capture/compare channel */

View File

@ -37,7 +37,7 @@ px4_add_module(
SRCS
px4fmu_can.c
px4fmu_init.c
px4fmu_pwm_servo.c
px4fmu_timer_config.c
px4fmu_spi.c
px4fmu_usb.c
px4fmu_led.c

View File

@ -184,6 +184,12 @@ __BEGIN_DECLS
#define GPIO_TIM2_CH4OUT GPIO_TIM2_CH4OUT_1
#define DIRECT_PWM_OUTPUT_CHANNELS 4
#define GPIO_TIM2_CH1IN GPIO_TIM2_CH1IN_1
#define GPIO_TIM2_CH2IN GPIO_TIM2_CH2IN_1
#define GPIO_TIM2_CH3IN GPIO_TIM2_CH3IN_1
#define GPIO_TIM2_CH4IN GPIO_TIM2_CH4IN_1
#define DIRECT_INPUT_TIMER_CHANNELS 4
/* USB OTG FS
*
* PA9 OTG_FS_VBUS VBUS sensing (also connected to the green LED)

View File

@ -32,9 +32,9 @@
****************************************************************************/
/*
* @file px4fmu_pwm_servo.c
* @file px4fmu_timer_config.c
*
* Configuration data for the stm32 pwm_servo driver.
* Configuration data for the stm32 pwm_servo, input capture and pwm input driver.
*
* Note that these arrays must always be fully-sized.
*/
@ -45,43 +45,55 @@
#include <stm32_gpio.h>
#include <stm32_tim.h>
#include <drivers/stm32/drv_pwm_servo.h>
#include <drivers/drv_pwm_output.h>
#include <drivers/stm32/drv_io_timer.h>
#include "board_config.h"
__EXPORT const struct pwm_servo_timer pwm_timers[PWM_SERVO_MAX_TIMERS] = {
__EXPORT const io_timers_t io_timers[MAX_IO_TIMERS] = {
{
.base = STM32_TIM2_BASE,
.clock_register = STM32_RCC_APB1ENR,
.clock_bit = RCC_APB1ENR_TIM2EN,
.clock_freq = STM32_APB1_TIM2_CLKIN
.clock_freq = STM32_APB1_TIM2_CLKIN,
.first_channel_index = 0,
.last_channel_index = 3,
.handler = io_timer_handler0,
.vectorno = STM32_IRQ_TIM2,
}
};
__EXPORT const struct pwm_servo_channel pwm_channels[PWM_SERVO_MAX_CHANNELS] = {
__EXPORT const timer_io_channels_t timer_io_channels[MAX_TIMER_IO_CHANNELS] = {
{
.gpio = GPIO_TIM2_CH1OUT,
.gpio_out = GPIO_TIM2_CH1OUT,
.gpio_in = GPIO_TIM2_CH1IN,
.timer_index = 0,
.timer_channel = 1,
.default_value = 1000,
.ccr_offset = STM32_GTIM_CCR1_OFFSET,
.masks = GTIM_SR_CC1IF | GTIM_SR_CC1OF
},
{
.gpio = GPIO_TIM2_CH2OUT,
.gpio_out = GPIO_TIM2_CH2OUT,
.gpio_in = GPIO_TIM2_CH2IN,
.timer_index = 0,
.timer_channel = 2,
.default_value = 1000,
.ccr_offset = STM32_GTIM_CCR2_OFFSET,
.masks = GTIM_SR_CC2IF | GTIM_SR_CC2OF
},
{
.gpio = GPIO_TIM2_CH3OUT,
.gpio_out = GPIO_TIM2_CH3OUT,
.gpio_in = GPIO_TIM2_CH3IN,
.timer_index = 0,
.timer_channel = 3,
.default_value = 1000,
.ccr_offset = STM32_GTIM_CCR3_OFFSET,
.masks = GTIM_SR_CC3IF | GTIM_SR_CC3OF
},
{
.gpio = GPIO_TIM2_CH4OUT,
.gpio_out = GPIO_TIM2_CH4OUT,
.gpio_in = GPIO_TIM2_CH4IN,
.timer_index = 0,
.timer_channel = 4,
.default_value = 1000,
.ccr_offset = STM32_GTIM_CCR4_OFFSET,
.masks = GTIM_SR_CC4IF | GTIM_SR_CC4OF
}
};

View File

@ -37,7 +37,7 @@ px4_add_module(
SRCS
px4fmu_can.c
px4fmu2_init.c
px4fmu_pwm_servo.c
px4fmu_timer_config.c
px4fmu_spi.c
px4fmu_usb.c
px4fmu2_led.c

View File

@ -115,6 +115,7 @@ __BEGIN_DECLS
#define PX4_SPI_BUS_SENSORS 1
#define PX4_SPI_BUS_RAMTRON 2
#define PX4_SPI_BUS_EXT 4
#define PX4_SPI_BUS_BARO PX4_SPI_BUS_SENSORS
/* Use these in place of the spi_dev_e enumeration to select a specific SPI device on SPI1 */
#define PX4_SPIDEV_GYRO 1
@ -175,7 +176,7 @@ __BEGIN_DECLS
#define GPIO_GPIO2_OUTPUT (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTE|GPIO_PIN11)
#define GPIO_GPIO3_OUTPUT (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTE|GPIO_PIN9)
#define GPIO_GPIO4_OUTPUT (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTD|GPIO_PIN13)
#define GPIO_GPIO5_OUTPUT (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTD|GPIO_PIN14)
#define GPIO_GPIO5_OUTPUT (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTD|GPIO_PIN14)
/* Power supply control and monitoring GPIOs */
#define GPIO_VDD_5V_PERIPH_EN (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTA|GPIO_PIN8)
@ -204,14 +205,22 @@ __BEGIN_DECLS
* CH5 : PD13 : TIM4_CH2
* CH6 : PD14 : TIM4_CH3
*/
#define GPIO_TIM1_CH1OUT GPIO_TIM1_CH1OUT_2
#define GPIO_TIM1_CH2OUT GPIO_TIM1_CH2OUT_2
#define GPIO_TIM1_CH3OUT GPIO_TIM1_CH3OUT_2
#define GPIO_TIM1_CH4OUT GPIO_TIM1_CH4OUT_2
#define GPIO_TIM4_CH2OUT GPIO_TIM4_CH2OUT_2
#define GPIO_TIM4_CH3OUT GPIO_TIM4_CH3OUT_2
#define GPIO_TIM1_CH1OUT (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN9)
#define GPIO_TIM1_CH2OUT (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN11)
#define GPIO_TIM1_CH3OUT (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN13)
#define GPIO_TIM1_CH4OUT (GPIO_ALT|GPIO_AF1|GPIO_SPEED_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PUSHPULL|GPIO_PORTE|GPIO_PIN14)
#define GPIO_TIM4_CH2OUT (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN13)
#define GPIO_TIM4_CH3OUT (GPIO_ALT|GPIO_AF2|GPIO_SPEED_50MHz|GPIO_OUTPUT_CLEAR|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN14)
#define DIRECT_PWM_OUTPUT_CHANNELS 6
#define GPIO_TIM1_CH1IN GPIO_TIM1_CH1IN_2
#define GPIO_TIM1_CH2IN GPIO_TIM1_CH2IN_2
#define GPIO_TIM1_CH3IN GPIO_TIM1_CH3IN_2
#define GPIO_TIM1_CH4IN GPIO_TIM1_CH4IN_2
#define GPIO_TIM4_CH2IN GPIO_TIM4_CH2IN_2
#define GPIO_TIM4_CH3IN GPIO_TIM4_CH3IN_2
#define DIRECT_INPUT_TIMER_CHANNELS 6
/* USB OTG FS
*
* PA9 OTG_FS_VBUS VBUS sensing (also connected to the green LED)

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