Commit Graph

3296 Commits

Author SHA1 Message Date
Andrew Tridgell
7cec3caf19 AP_Baro: cleaned up setHIL method
move pressure calculation into library
2013-05-02 15:26:38 +10:00
Andrew Tridgell
c6c1fce2f1 AP_Baro: removed HIL constructor
this wasn't calling the parent class
2013-05-02 15:16:52 +10:00
Andrew Tridgell
811c2ccc11 libraries: fixes for AP_Baro_HIL 2013-05-02 15:09:05 +10:00
Andrew Tridgell
2d089174cd AP_Baro: rename AP_Baro_BMP085_HIL to AP_Baro_HIL
there is nothing specific to the BMP085 in it
2013-05-02 15:08:42 +10:00
Andrew Tridgell
a09c53a3ea SITL: use new HIL compass API 2013-05-02 15:01:47 +10:00
Andrew Tridgell
f72dd560cb AP_Compass: fixed the HIL sensors compass
this sets up good compass values for HIL sensors
2013-05-02 14:59:33 +10:00
Andrew Tridgell
86027f6e0f AP_Compass: fixed PX4 build 2013-05-02 13:00:52 +10:00
Andrew Tridgell
af50b652f8 AP_Compass: removed old orientation defines
we now use the rotations in libraries/AP_Math/rotations.h
2013-05-02 12:48:14 +10:00
Andrew Tridgell
261eb6d841 AP_Declination: fixed example build 2013-05-02 12:48:14 +10:00
Andrew Tridgell
54b826a583 AP_AHRS: update for new compass API 2013-05-02 12:48:14 +10:00
Andrew Tridgell
217f34e155 AP_Compass: added COMPASS_ORIENT parameter, to support external compasses
this allows the user to configure the compass for any orientation
supported by our rotation library
2013-05-02 12:48:14 +10:00
Andrew Tridgell
ba83950fc4 libraries: replace constrain() with constrain_float()
this makes the type much more obvious. Thanks to Tobias for the
suggestion.
2013-05-02 10:25:40 +10:00
Andrew Tridgell
813e767efb AP_Param: use const refs in a few more places
reduces code size by a couple of hundred bytes
2013-05-02 10:18:36 +10:00
Randy Mackay
4fcb189c97 GCS_MAVLink: typo in message definition 2013-05-01 17:07:18 +09:00
Randy Mackay
2d17688363 AC_Fence: add backup fence
Also includes fixes from code review with Tridge
2013-05-01 17:05:04 +09:00
Andrew Tridgell
0fce0eb488 AP_Compass_PX4: fixed handling of a saturated compass
a saturated compass is now marked unhealthy, rather than causing the
code to spin waiting for a valid sample. This fixes a problem with
strong magnets causing the main flight loop to stop
2013-05-01 08:54:53 +10:00
Andrew Tridgell
d7ec985029 AP_Baro_PX4: fixed baro driver to run at full rate
we were skipping samples due to a timer handling bug. It now checks
for new samples at 100Hz
2013-05-01 08:54:53 +10:00
Randy Mackay
ad01aeee44 Copter: increase max loiter overshoot to 8.12m 2013-04-30 18:07:48 +09:00
Randy Mackay
8122a32114 InertialNav: reduce XY TC to 2.5 (was 3)
More objective testing is required to arrive at the ideal number but 2.5
seem better than 3.0 at reducing "toiletbowling" and anecdotal evidence
does not show much downside.
2013-04-30 12:52:28 +09:00
Randy Mackay
c139134192 Copter: increase max loiter speed to 7.5m/s 2013-04-30 12:49:19 +09:00
Randy Mackay
6c081c3def AC_WPNav: slow acceleration of intermediate point 2013-04-30 10:20:23 +09:00
Randy Mackay
00146ca97d AP_HAL: fix another RCInput compile error 2013-04-29 21:27:16 +09:00
Randy Mackay
e7122b85ed AP_HAL: example compile error fix 2013-04-29 17:47:04 +09:00
Randy Mackay
bbbd90c430 AP_HAL: rename RCInput's valid() fn to valid_channels 2013-04-29 15:05:53 +09:00
Randy Mackay
a28c6df611 RCInput: allow ppmsum of less than 8 channels 2013-04-29 14:35:59 +09:00
Andrew Tridgell
c067fa2660 L1_Control: make NAVL1_DAMPING docs clearer 2013-04-29 14:24:34 +10:00
Andrew Tridgell
786e4cf705 AP_GPS: added last_message_time_ms() API
used to help GPS logging
2013-04-28 14:53:02 +10:00
Andrew Tridgell
f5d062d5ba AP_GPS: move byte swapping code to cpp 2013-04-28 14:51:37 +10:00
priseborough
84ed37938d Plane : AP_L1_Control : Replaced division by constants with multiplies and adjusted default L1 period to 25 seconds 2013-04-28 14:47:59 +10:00
Andrew Tridgell
f5d6fb6216 AP_AHRS: added _kp gain reduction for catapult launch
this should reduce the tendency of aircraft to nose down hard on
initial launch at high g
2013-04-28 14:47:59 +10:00
Randy Mackay
9910d6d1cd AC_Fence: first implemenation of library 2013-04-27 11:14:05 +09:00
Andrew Tridgell
b71f36ee34 RC_Channel: support 8 auxillary RC channels
needed for full 12 channel support on PX4
2013-04-25 20:10:53 +10:00
Andrew Tridgell
ec1678db83 HAL_PX4: setup for 12 output channels
moved telemetry port to /dev/ttyS2 to free PWM outputs on FMU
2013-04-25 20:10:53 +10:00
Andrew Tridgell
709615159a HAL_PX4: support 12 output channels with PX4IO
first 8 on IO board, next 4 on FMU outputs
2013-04-25 20:10:53 +10:00
Andrew Tridgell
3b0250b414 AP_HAL: define RC_12
we have 12 channels on PX4FMU+PX4IO
2013-04-25 20:10:53 +10:00
Randy Mackay
cb5f8826f8 Copter: Leonard's fix for trapezoidal frame
We need to allow yaw_factors to be floats in the add_motor method
2013-04-25 17:52:19 +09:00
Randy Mackay
1a7cffefe6 TradHeli: change coll_out to int16_t
was incorrectly defined as an AP_Int16 parameter
2013-04-24 11:32:26 +09:00
Randy Mackay
7f79398989 AP_Limits: fixed return of AP_Int8 parameters from object
we should return the base type, not the parameter, or callers could
use set on the result
2013-04-23 23:13:54 +10:00
Andrew Tridgell
3659b532be AP_Common: added BIT_IS_SET() macro
makes bit mask testing safer on PX4

Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
2013-04-23 23:05:02 +10:00
Andrew Tridgell
709a277c7f DataFlash: chamged FMT message to include labels
this makes it easier for MP to parse and display
2013-04-23 19:46:22 +10:00
Andrew Tridgell
9ef34943af DataFlash: change log extension to *.bin 2013-04-23 15:03:10 +10:00
Andrew Tridgell
fd2cd0d1c2 DCM: fixed formatting 2013-04-23 08:57:44 +10:00
jschall
610069e729 DCM: fixed airspeed bug
we incorrectly went via the wind estimate when we had a working airspeed sensor
2013-04-23 08:57:44 +10:00
Randy Mackay
42bca90676 INS: add calibrated check
Checks is the scaling vector has been updated.  Required for pre-arm
checks for ArduCopter
2013-04-22 23:55:53 +09:00
Andrew Tridgell
2c05030fb1 AP_Motors: use the right constrain() function 2013-04-22 13:26:49 +10:00
Andrew Tridgell
014c9376e7 AP_AHRS: use const references where possible 2013-04-22 13:26:49 +10:00
Andrew Tridgell
dcc3873056 AP_Buffer: remove bool return from add() method 2013-04-22 13:26:49 +10:00
Andrew Tridgell
26fa5c40f1 Compass: use const references for some functions 2013-04-22 13:26:49 +10:00
Andrew Tridgell
1849aca0e9 AP_InertialNav: optimise some multiplies 2013-04-22 13:26:49 +10:00
Andrew Tridgell
01a4fabf9e AP_Param: make things a bit more efficient 2013-04-22 12:21:59 +10:00
Andrew Tridgell
3d325043b0 AP_InertialNav: make some more functions const 2013-04-22 12:21:58 +10:00
Andrew Tridgell
08c57c2587 AP_InertialNav: reduce number of multiplies 2013-04-22 12:21:58 +10:00
Andrew Tridgell
bad478134d AP_Buffer: instantiate as a .cpp file, and optimise for const usage 2013-04-22 12:21:58 +10:00
Andrew Tridgell
ad40ba57be AC_WPNav: optimise to reduce memory copies
save a few cycles

Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
2013-04-22 12:21:58 +10:00
Andrew Tridgell
5f1bd1a452 HAL_AVR: constrain Vcc used in voltage_average()
this ensures a bad Vcc reading doesn't throw off analog inputs too
much
2013-04-22 11:36:00 +10:00
Andrew Tridgell
c437900a49 AP_Scheduler: added SCHED_DEBUG=2
used to show overruns and slips
2013-04-21 23:46:35 +10:00
Randy Mackay
2fc25da4c3 Copter: Leonard's fix for get_loiter_accel_to_lean_angle 2013-04-21 16:27:50 +09:00
Andrew Tridgell
844e1b9ef9 DataFlash: added support for printing flight mode as a string
makes analysing logs easier.

Pair-Programmed-With: Randy
2013-04-20 15:17:49 +10:00
Andrew Tridgell
c3abdaf308 AP_GPS: removed duplicate print_latlon() 2013-04-20 13:57:59 +10:00
Andrew Tridgell
b5ae588341 DataFlash_File: fixed creation of 0.log 2013-04-20 13:52:37 +10:00
Andrew Tridgell
735d60c493 DataFlash: convert example sketch to new API 2013-04-20 13:52:37 +10:00
Andrew Tridgell
62f190ed15 DataFlash: simplify code now that copter is converted
no longer need as many public functions
2013-04-20 13:52:37 +10:00
Andrew Tridgell
cf0c8331c2 DataFlash: use print_latlon() 2013-04-20 13:52:36 +10:00
Andrew Tridgell
e1f9297551 AP_Math: move print_latlon() to location.cpp 2013-04-20 13:52:36 +10:00
Andrew Tridgell
c29d870497 DataFlash: dump the format of logs at the start of the log 2013-04-20 13:52:36 +10:00
Andrew Tridgell
916e8d0992 DataFlash: new dataflash logging system
this allows us to remove the display functions in the vehicle code,
and also allows us to store the format of a log file in the log. It
also stores the parameters used in a flight, rather than the
parameters set at the time the log is dumped
2013-04-20 13:52:36 +10:00
Andrew Tridgell
17d7f1fbe5 AP_InertialSensor: make some interfaces const 2013-04-20 13:52:36 +10:00
Andrew Tridgell
4fe5ce8a09 AP_Common: added a define for PACKED
neater than a pragma
2013-04-20 13:52:36 +10:00
Andrew Tridgell
8d727614b4 AP_GPS: make status() const 2013-04-20 13:52:36 +10:00
Andrew Tridgell
9171d5587d AP_Param: make it easier to show the value of a parameter 2013-04-20 13:52:36 +10:00
Andrew Tridgell
7ad293e270 AP_AHRS: made a few methods const 2013-04-20 13:52:36 +10:00
Randy Mackay
1c046fa49f AC_WPNav: increase max descent speed to 1.5m/s 2013-04-18 22:32:00 +09:00
Randy Mackay
ed298363f4 AC_WPNav: remove unnecessary limit in leash calc 2013-04-18 22:31:44 +09:00
Randy Mackay
764853bd56 AC_WPNav: add climb and descent params, dynamic leash length 2013-04-18 14:51:01 +09:00
Randy Mackay
effd5b0da7 AC_WPNav: improved comments
Made SPEEDZ a parameter although it's not yet used
2013-04-18 11:17:41 +09:00
Andrew Tridgell
fa493a0fb3 AP_Param: added ops needed for ArduCopter build 2013-04-18 11:12:46 +10:00
tobias
fbe7daa477 AP_Param: fixed assignment handling and const
this fixes radio_min = radio_max = radio_trim = 0; in RC_Channel
2013-04-18 10:52:40 +10:00
Andrew Tridgell
02bd24cf57 AP_Scheduler: fixed _last_run initialisation
another valgrind bug
2013-04-17 23:02:13 +10:00
Andrew Tridgell
0a25d6220a AP_InertialNav: initialise _gps_last_time
found with valgrind
2013-04-17 23:02:13 +10:00
Andrew Tridgell
b3ec5187f2 AP_GPS: fixed uninitialied variable bugs found with valgrind 2013-04-17 23:02:13 +10:00
Randy Mackay
a656b619f5 AP_Motors: remove auto_armed
redundant flag that was already held in the main code which is where it
belongs.
2013-04-17 21:28:42 +09:00
Andrew Tridgell
68051f3ea6 AP_Menu: fixed crash bug in strtok_r() handling
on PX4 this causes a hard fault in CLI menus
2013-04-17 22:20:00 +10:00
Andrew Tridgell
af7381e9e0 AP_HAL: added register_io_process()
this is used to register a low priority IO task. Used for file IO in
DataFlash_File.cpp
2013-04-17 21:33:50 +10:00
Andrew Tridgell
5df4796b9a RangeFinder: fixed a warning 2013-04-17 21:33:08 +10:00
Andrew Tridgell
da5a5ea368 DataFlash: added file based 'dataflash' logging 2013-04-17 21:32:53 +10:00
Andrew Tridgell
9d3b32bd27 SITL: change default wind speed to zero
makes starting SITL easier for new users
2013-04-17 11:39:43 +10:00
Randy Mackay
b8974dec99 Copter: compass learn off by default 2013-04-16 18:47:39 +09:00
Janne Mäntyharju
7a04fe9915 AP_Baro: Fixed build for APM2 Beta hardware 2013-04-16 11:24:38 +10:00
Randy Mackay
8046fe2cf3 AC_WPNav: increase max accel to 8m/s/s 2013-04-15 21:57:56 +09:00
Randy Mackay
8fe3e689f4 Copter: add WPNAV log message 2013-04-15 21:54:29 +09:00
Randy Mackay
b48864e1ad Copter: allow CH6 tuning of compass declination 2013-04-15 21:50:44 +09:00
priseborough
9ff0888a17 AP_L1_Control : Fixed potential divide by zero in Nu1 angle calculation 2013-04-15 21:11:30 +10:00
Andrew Tridgell
97bfd16bd1 L1_Control: constrain the roll to handle floating point errors 2013-04-15 14:29:39 +10:00
Andrew Tridgell
83dc7dbc92 AP_Math: handle NaN in constrain(), returning average
this makes it less likely a NaN will propogate
2013-04-15 14:28:51 +10:00
Andrew Tridgell
b69481f74d AP_InertialNav: fixed build of example 2013-04-15 14:09:38 +10:00
Andrew Tridgell
571c48b9d5 L1_Control: cleanup some unused code and variables 2013-04-15 10:52:32 +10:00
priseborough
a423d102e0 Plane : AP_L1_Control : Fix wrong way turn behaviour on loiter entry 2013-04-15 10:52:32 +10:00
Andrew Tridgell
d01d754ba8 HAL_PX4: if we have lost RC input then set channel 3 to 900
this allows failsafe to kick in
2013-04-15 10:52:32 +10:00
Andrew Tridgell
181f7368a3 AP_L1_Control: change turn_distance() to be min of wp_radius and L1 distance
this gives less surprising behaviour for users
2013-04-15 10:52:32 +10:00
Andrew Tridgell
a4d25f5a82 AHRS: removed AHRS_BARO_USE option
this option has caused users too much trouble. The vertical velocity
is too noisy from the baro
2013-04-15 10:52:31 +10:00