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
Andrew Tridgell
87b0fb05ce
AHRS: changed default RP and YAW gain to 0.3
...
this reduces the impact of hard acceleration on takeoff, and reduces
the impact of GPS lag
Note that this doesn't affect copters, as they override to 0.1
2013-04-15 10:52:31 +10:00
Randy Mackay
0eab3e87b2
AC_WPNav: use prev wp as origin for next wp
2013-04-14 18:27:39 +09:00
Randy Mackay
0351c2ae33
AC_WPNav: allow setting of horizontal velocity
...
Also added accessor function for waypoint radius parameter
2013-04-14 13:24:14 +09:00
Randy Mackay
252e98ec57
AC_WPNav: use global gravity constant
2013-04-14 10:39:32 +09:00
Randy Mackay
0ac3762bdd
AC_WPNav: fix compiler warning
2013-04-14 10:39:26 +09:00
Randy Mackay
9d7d174995
AC_WPNAV: check distance to waypoint within library
...
bug fix for loiter using lat/lon position instead of NED position when
calculating desired velocity towards target
2013-04-14 10:39:21 +09:00
Randy Mackay
35001619f0
AC_WPNav: stop track_desired from moving backwards
2013-04-14 10:39:19 +09:00
Randy Mackay
c6b68c7843
AC_WPNav: Leonard's 3d leash calculator
2013-04-14 10:39:08 +09:00
Randy Mackay
74e1c2e660
AC_WPNav: advance track fixes
2013-04-14 10:39:05 +09:00
Randy Mackay
bc87118062
AC_WPNav: add get_target_alt method
2013-04-14 10:39:00 +09:00
Randy Mackay
6dbcbdcb43
AC_WPNav: limit max loiter position error
...
move interpretation of pilot input to wpnav lib
2013-04-14 10:38:58 +09:00
Randy Mackay
31838b2865
AC_WPNAV: change loiter controllers to use floats
...
in particular get_loiter_pos_lat_lon and get_loiter_accel_lat_lon
2013-04-14 10:38:56 +09:00
Randy Mackay
0ccdce1b22
AC_WPNav: Leonard's ff loiter and 3d wp nav
2013-04-14 10:38:43 +09:00
Randy Mackay
926c404994
AC_WPNav: Leonard's loiter target smoothing
2013-04-14 10:38:39 +09:00
Randy Mackay
f82ce449d7
AC_WPNav: add angle limits and set from AC's throttle controller
2013-04-14 10:38:34 +09:00
Randy Mackay
afd2f82768
AC_WPNav: bug fix for track covered being 2D
...
Replaced abs and fabs with fabsf
Added get_destination method
2013-04-14 10:38:32 +09:00
Randy Mackay
8ec7fd1c9c
AC_WPNav: add set_loiter_target to use velocity
...
Target can be set in front of the copter to reduce the bounce back to
the position where loiter was engaged.
2013-04-14 10:38:25 +09:00
Randy Mackay
fc972e2d42
InertialNav: add get_velocity method
2013-04-14 10:38:23 +09:00
Randy Mackay
3bfcc3b8d0
AC_WPNav: replace get_target_alt with get_destination_alt
2013-04-14 10:38:13 +09:00
Randy Mackay
c40080e76a
AC_WPNav: added set_target_alt
2013-04-14 10:38:04 +09:00
Randy Mackay
60060d8184
AC_WPNav: add get_target_alt
...
Required because waypoint controller will be modified to control
altitude
2013-04-14 10:37:58 +09:00
Randy Mackay
0d70ba1030
AC_WPNav: bug fix to dt calculation
2013-04-14 10:37:51 +09:00
Randy Mackay
39bc3800c9
AC_WPNav: add distance and bearing to target methods
2013-04-14 10:34:50 +09:00
Randy Mackay
b92c4097d2
AC_WPNav: first implementation
2013-04-14 10:34:47 +09:00
Andrew Tridgell
76e20150e9
AP_InertialSensor: ensure parent class is initialised in instance classes
2013-04-12 14:30:35 +10:00
Andrew Tridgell
a5c3051929
AP_GPS: fixed initialisation error in uBlox driver
...
found with valgrind
2013-04-12 14:25:46 +10:00
Andrew Tridgell
dca597cda1
L1_Control: added a comment on speed of the L1 control code
2013-04-12 12:58:20 +10:00
Brandon Jones
a3c2851120
AP_L1_Control: Addition of library for geometry calculations required for L1 Control.
...
1) Explicit control of tracking loop period and damping which removes previous
variation in period with speed and fixed damping ratio
2) Explicit control of track capture angle (now set to 45 degrees by default)
3) Removal of restriction on loiter radius being greater than L1 distance
The circle(loiter) control is a L1 and PD hybrid utilising L1 for waypoint capture and PD control for circle tracking.
Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>
2013-04-12 12:48:09 +10:00
priseborough
b63d0969b7
AP_AHRS: Addition of a first order complementary filter to AP_AHRS::groundspeed_vector
...
Addition of a complementary filter to estimation of the ground velocity vector for use by the L1-nav
2013-04-12 12:48:09 +10:00
Andrew Tridgell
05ecb8d8fa
AP_AHRS: fixed functions that need to be virtual
...
functions overridden in a child class need to be marked virtual, or
you get the parent class function
2013-04-12 12:48:08 +10:00
Andrew Tridgell
ee81b0f729
AP_AHRS: added wind_correct_bearing() and groundspeed_vector()
...
these are very useful for navigation libraries
2013-04-12 12:48:08 +10:00
Andrew Tridgell
43c3c60de2
AP_Math: moved a lot of vector templates to cpp from .h
...
this reduces the code size quite a lot on AVR
2013-04-12 12:48:08 +10:00
Andrew Tridgell
78eb12a4ac
AP_Math: added RadiansToCentiDegrees and RADIUS_OF_EARTH
2013-04-12 12:48:08 +10:00
Andrew Tridgell
8b119934ea
AP_Math: fixed grammar error
2013-04-12 12:48:08 +10:00
Andrew Tridgell
2d29a6a7be
AP_Math: added Vector2f.angle()
...
useful for calculating the vector in polar coordinates
2013-04-12 12:48:08 +10:00
Andrew Tridgell
f6aacdc768
AP_Navigation: added a navigation controller class
...
the new L1 controller will be a instance of this class. Other
navigation controllers can be added as additional instances
Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2013-04-12 12:48:08 +10:00
Randy Mackay
cdb532a594
Copter: bug fix for loiter target
2013-04-11 18:24:20 +09:00
Randy Mackay
86fe79a662
INS: updated MPU6K_FILTER parameter description
2013-04-10 00:14:53 +09:00
tobias
217b8d7a59
cleanup: use const for struct Location pointers and references
...
this allows the compiler to generate more efficient code
2013-04-09 12:10:32 +10:00
Stange Szilard
6516bffbb6
AP_Camera: enable relay off in all builds
2013-04-09 11:38:30 +10:00
Andrew Tridgell
8d992ae615
InertialSensor: added OilPan INS example
2013-04-08 07:07:25 +10:00
Randy Mackay
af13f6795c
INS: switch to global definition of GRAVITY_MSS
...
saves 4 bytes of RAM
2013-04-05 22:57:46 +09:00
Randy Mackay
777c6a308e
AP_InertialNav: use shared GRAVITY_MSS constant
2013-04-05 11:48:41 +09:00
foobarbecue
c07702f46d
Update AP_MotorsOctaQuad.cpp
...
There were two "4"s in the motor test order values. Presumably a typo.
2013-04-05 11:22:56 +09:00
Randy Mackay
739e3c2b9a
Copter: adjust trapezoidal motor mixing
2013-04-04 21:46:11 +09:00
Randy Mackay
e32cbd827b
Copter: replace quad trapezoid frame with V
...
Also update motor mixing
2013-04-03 22:14:29 +09:00
Randy Mackay
5bf55a9523
OpticalFlow: switch order of sin_yaw, cos_yaw
2013-04-02 15:49:31 +09:00
Andrew Tridgell
5667f5d817
AP_ADC: fixed APM1 HIL_SENSORS Ch6() return
2013-04-02 13:20:08 +11:00
Andrew Tridgell
310a5a6be1
DataFlash: don't try to write if no card inserted
2013-04-02 13:08:38 +11:00
Andrew Tridgell
6123ea2dac
PID: added get_pid_4500()
...
this is a version of get_pid() that returns an int16_t constrained to
-4500 to 4500. This will prevent overflow errors for large PID gains
in ArduPlane and Rover
2013-04-01 22:17:04 +11:00
Randy Mackay
6816c45c39
InertialNav: reduce Z-axis time constant to 5
2013-04-01 11:51:12 +09:00
Michael Oborne
541fa13291
cleanup comments
2013-03-31 17:14:54 +08:00
Michael Oborne
2160bf135d
fix sitl segfault in hil
2013-03-31 16:39:15 +08:00
Michael Oborne
87292e0a4a
Init hil accel with gravity
2013-03-31 16:38:48 +08:00
Randy Mackay
39ba406957
Copter: add trapezoid frame type
...
We still need to properly define the motor mixing for the trapezoid
frame in AP_MotorsQuad.cpp
2013-03-31 12:41:02 +09:00
Andrew Tridgell
a093926b04
Revert "RC_Channel: removed pwm_out variable from RC_Channel"
...
This reverts commit 8e4a003d8d
.
It is used by MotorsMatrix
2013-03-29 22:36:29 +11:00
Andrew Tridgell
8e4a003d8d
RC_Channel: removed pwm_out variable from RC_Channel
...
saves 16 bytes
2013-03-29 19:32:52 +11:00
Andrew Tridgell
896fd52aa1
AP_AHRS: fixed functions that need to be virtual
...
functions overridden in a child class need to be marked virtual, or
you get the parent class function
2013-03-29 18:35:10 +11:00
Andrew Tridgell
8459da202c
AP_AHRS: prevents compass flyaways for plane and rover
...
this switches to the GPS for yaw if the compass has dragged us off by
more than 45 degrees from the GPS heading, and the wind speed is less
than 80% of the ground speed.
2013-03-29 13:48:25 +11:00
Andrew Tridgell
091b474a1d
AP_Math: added wrap_360_cd() and wrap_180_cd()
...
moved from per-vehicle code
2013-03-29 13:13:37 +11:00
Andrew Tridgell
0ffc7dab6b
SITL: added GPS speed down to SITL state
2013-03-28 10:29:12 +11:00
Randy Mackay
93f7e61b66
UBLOX GPS: fix MSG_SOL typo
...
"status" was used instead of "solution"
2013-03-27 11:42:05 +09:00
Randy Mackay
27309a553f
GPS: fixes after review
...
Ensure 3D fix before returning velocity_down
UBLOX: restore check of fix_status as part of determining 2D or 3D fix
SIRF: add missing brackets on fix type check
2013-03-27 11:41:54 +09:00
Randy Mackay
24044dc0c4
AHRS: add support for GPS fix type 2D
2013-03-27 11:41:43 +09:00
Randy Mackay
d7454bb09e
GPS: add 2D fix type
2013-03-27 11:41:39 +09:00
Andrew Tridgell
eb6c66af7e
AP_HAL: added gpio->analogPinToDigitalPin() API
2013-03-22 12:31:14 +11:00
Andrew Tridgell
a6b21443c4
HAL_AVR: fixed null termination of vsnprintf()
2013-03-22 11:53:24 +11:00
Andrew Tridgell
91bbf914f7
RangeFinder: added SONAR_ENABLE boolean to analog sonar object
2013-03-22 07:52:51 +11:00
Andrew Tridgell
7e58bde826
GCS_MAVLink: added comm_is_idle() function
...
this will make CLI detection more reliable
2013-03-21 21:55:12 +11:00
Andrew Tridgell
6ddb99a50b
HAL_PX4: create APM/boot.log on SD card
...
useful for debugging
2013-03-21 15:05:21 +11:00
Andrew Tridgell
cc932973d6
HAL_PX4: remove the need for the fmu_only flag file
2013-03-21 15:05:21 +11:00
Andrew Tridgell
3f6eb87f23
AP_GPS: fixed uBlox Debug() macro
2013-03-20 15:42:07 +11:00
Andrew Tridgell
8766e86091
HAL_PX4: fixed blocking bulk writes to UARTs
...
this fixes a problem with uBlox initialisation on PX4
2013-03-20 15:41:52 +11:00
Andrew Tridgell
14911eff6c
HAL_PX4: added a (disabled) trick for handling blocking ttyACM0
...
this doesn't work yet, but is worth having for debugging
2013-03-20 11:20:43 +11:00
Randy Mackay
38e81adae0
InertialNav: remove unnecessary "virtual" from function definitions
...
This saves about 30bytes of RAM
2013-03-19 17:51:16 +09:00
Andrew Tridgell
93fc9c48e5
HAL_PX4: fixed startup bug in fmu_only mode
2013-03-19 07:57:13 +11:00
Christopher Hrabia
744f610409
RangeFinder_I2C: fixed bug with interchanged min max values
...
- add usage of mode-filter and min-max constrain, similar to MaxsonarXL
2013-03-18 14:28:31 +09:00
Christopher Hrabia
9760cdf2d7
Compass: corrected space
2013-03-18 14:27:49 +09:00
Andrew Tridgell
ba8ba36af4
HAL_AVR: fixed build.Examples in autotest
2013-03-18 14:01:21 +11:00
Andrew Tridgell
ac69a531d3
HAL_PX4: workaround problem with APM file on SD card
...
this works around file redirection bug from earlier firmwares
2013-03-18 13:12:17 +11:00
Andrew Tridgell
551950c573
GPS_UBLOX: fixed auto-config of baudrate
...
this fixes the setting of the baudrate on a uBlox that is configured
for 9600. It fixes the NMEA message to have a \r\n, plus sends the
NAV_SOL rate config before the NMEA baudrate config message.
This fixes issue #159
2013-03-17 17:52:48 +11:00
Randy Mackay
c9571ad543
InertialNav: remove 3sec limit on position est after losing GPS
2013-03-16 18:15:59 +09:00
Andrew Tridgell
6a1aad30f1
HAL_PX4: auto-create APM directory on SD card
2013-03-16 19:47:09 +11:00
Andrew Tridgell
7681f3b639
AP_HAL: update AnalogIn example to show voltages not raw values
2013-03-15 08:39:22 +11:00
Andrew Tridgell
c1c967f3bf
DataFlash: fixed test sketch build and run
2013-03-15 07:30:40 +11:00
Andrew Tridgell
a7541e9ad3
DataFlash: report log number when starting a new log
...
helps with test sketch
2013-03-15 07:30:23 +11:00
Andrew Tridgell
ba8d830754
DataFlash: start to fix example build
2013-03-11 13:02:08 +11:00
John Arne Birkeland
9487eb6c1b
Examples: Improved compatibility with Mission Planner serial terminal (CLI)
2013-03-09 15:02:56 +11:00
Andrew Tridgell
26fedc543c
AP_Mount: fixed scaling of the joystick speed to give better control
...
thanks to Chris Miser for reporting this problem
2013-03-08 14:39:32 +11:00
Andrew Tridgell
00e905b025
AP_Airspeed: use new voltage_average() API in Airspeed driver
2013-03-08 10:01:15 +11:00
Andrew Tridgell
bf1944a36d
AP_ADC_AnalogSource: fixed reference scaling for APM1 Ch6 ADC
...
it is not referenced to Vcc
2013-03-08 09:06:40 +11:00
Andrew Tridgell
2fc922a251
AP_Rangefinder: use voltage_average() interface for generic analog rangefinder
2013-03-08 08:27:18 +11:00
Andrew Tridgell
ce46f2f871
AP_ADC: fixed scaling factor for voltage on APM1 Ch6 ADC
2013-03-08 08:26:54 +11:00
Randy Mackay
b8d492b504
Compass: current based compensation added
2013-03-03 23:02:12 +09:00
Andrew Tridgell
16270ccc47
HAL_AVR_SITL: fixed windows build
2013-03-03 22:22:19 +11:00
Andrew Tridgell
3e2cb92c71
AP_ADC_AnalogSource: added voltage_average() interface
2013-03-03 16:16:01 +11:00
Andrew Tridgell
b1c27407a2
AP_HAL: added voltage_average() interface to AnalogIn
...
returns voltage in Volts, using averaged reading over samples.
Where possible this should be auto-scaled against a known reference
voltage
2013-03-03 16:16:01 +11:00
Randy Mackay
e113eb526b
Compass: add get_motor_compensation
...
Remove redundant set_motor_compensation call
2013-03-02 17:53:03 +09:00
Andrew Tridgell
987cdaf3e1
DataFlash: make it safe to do DataFlash logging from timers
...
this uses a non-blocking semaphore take if we are in a timer
process. Useful for logging failsafe events
2013-03-02 17:42:06 +11:00
Randy Mackay
bfb29ce22b
Compass: remove virtual functions to save RAM
2013-03-02 00:07:32 +09:00
Randy Mackay
886725291c
Compass: enable motor compensation for 1280
...
Expand motor compenstion vector's range limit
2013-03-02 00:03:29 +09:00
Randy Mackay
8093c98cd3
Compass: add motor compensation to HIL library
2013-03-02 00:03:24 +09:00
Randy Mackay
d8515ff85e
Compass: basic compensation for motor interference
2013-03-02 00:03:16 +09:00
John Arne Birkeland
fc566096de
AVR HAL: RCJitterTest example
...
Used to test jitter on the PPM R/C input system.
2013-03-01 23:38:30 +09:00
Randy Mackay
318a831b57
INS: set default filter to 20hz for APM2.x and PX4
2013-03-01 19:35:34 +09:00
Andrew Tridgell
cbdeb20dad
MAVLink: rebuilt with new RANGEFINDER message
2013-03-01 12:01:31 +11:00
Andrew Tridgell
44768c911f
MAVLink: added RANGEFINDER message
2013-03-01 11:59:40 +11:00
Andrew Tridgell
8ed2f7d21c
AnalogIn: run the example sketch a bit slower
...
5Hz is plenty
2013-03-01 11:19:26 +11:00
Andrew Tridgell
e4fb54fcc9
RangeFinder: added new AP_RangeFinder_analog
...
this is a generic analog rangefinder, supporting 3 types of functions
between voltage and distance.
2013-03-01 11:19:02 +11:00
Andrew Tridgell
efd2da3eb8
DataFlash: started on file interface
2013-03-01 07:18:26 +11:00
Andrew Tridgell
7b524d15fa
DataFlash: added log_num to dump interface
...
this will be used by the file oriented logging code
2013-03-01 07:18:25 +11:00
Andrew Tridgell
c52ef80f06
DataFlash: added Block layer in classes
...
this will allow the addition of a DataFlash_File implementation of the
DataFlash API which will store logs in a traditional filesystem. That
will align better with the PX4 design, and be more useful for fast
transfer of logs to a host computer
2013-03-01 07:18:25 +11:00
Andrew Tridgell
0ffcffa81c
DataFlash: fixed signed/unsigned errors in API
2013-03-01 07:18:25 +11:00
Andrew Tridgell
9b551f162c
DataFlash: make the public interface much narrower
...
make many variables private, to simplify interface ready for PX4
2013-03-01 07:18:25 +11:00
Andrew Tridgell
5a55fd9a2f
AP_HAL: added HAL_BOARD_NAME define
2013-03-01 07:18:25 +11:00
Andrew Tridgell
20825cc903
DataFlash: removed the byte and word based interfaces
...
simplifing ready for PX4 flash logging
2013-03-01 07:18:25 +11:00
Pat Hickey
e0457f21de
AP_HAL_PX4: fix off-by-one error in RCOutput channel sending
2013-02-23 15:04:17 -08:00
Andrew Tridgell
a3ef58ac92
AP_HAL: moved AnalogIn example to generic examples
...
it is not AVR specific anymore
2013-02-22 12:50:47 +11:00
Andrew Tridgell
5b92c67286
HAL_AVR: fixed analog input with high channel numbers
2013-02-22 12:48:54 +11:00
Andrew Tridgell
fae396e64f
HAL_AVR: expand analog input test to more channels
2013-02-22 12:48:29 +11:00
Andrew Tridgell
c373429a6e
HAL_PX4: fixed a buffer handling bug
...
BUF_SPACE() was badly buggy, which could lead to memory corruption
2013-02-20 18:15:56 +11:00
Andrew Tridgell
160e5fa311
HAL_PX4: show a message if we fail to upgrade PX4IO firmware
2013-02-20 18:15:23 +11:00
Andrew Tridgell
f67480fa50
AP_GPS: ensure constructors zero all key variables
...
this prevents a crash on PX4 if a GPS is attached after startup
2013-02-20 11:33:39 +11:00
Andrew Tridgell
93ef403529
AP_GPS: removed unused AP_GPS_Shim.h
2013-02-20 11:33:39 +11:00
Andrew Tridgell
02c5c3ec4a
HAL_PX4: changed scheduler priorities
...
put sensor priority above main sketch, to prevent occasional blocking
for sensor data
2013-02-20 11:30:54 +11:00
Randy Mackay
963231a19b
AHRS: fix example sketch to use roll/pitch trim
2013-02-19 18:56:09 +09:00
Randy Mackay
3321db8dde
AHRS: limit trim to 10 degrees
2013-02-19 18:50:57 +09:00
Randy Mackay
21de9f5f47
AP_InertialSensor: return roll and pitch trim angles
2013-02-19 12:45:44 +09:00
Andrew Tridgell
54e7bce75e
HAL_PX4: cope with O_NONBLOCK not working in NuttX on ttyACM0
...
writes will block anyway, which clags up APM
2013-02-19 12:02:46 +11:00
Andrew Tridgell
8041768c67
HAL_PX4: perform automatic update of px4io firmware
2013-02-18 13:55:58 +11:00
Andrew Tridgell
8e2a20bea8
HAL_PX4: enable ttyACM0 as main console, ttyS1 as telemetry port
2013-02-18 13:55:33 +11:00
Andrew Tridgell
727f8ff029
AP_GPS: removed the old MTK16 driver
...
the MTK19 driver supports both the 1.6 and 1.9 protocol
2013-02-16 22:03:53 +11:00
Andrew Tridgell
fb4e68f0f0
SITL: added SIM_GPS_BYTELOSS option
...
this allows testing of protocol recovery after losing bytes on the GPS
serial link
2013-02-16 22:00:16 +11:00
Andrew Tridgell
3a582663fb
SITL: improve time field handling in simulated GPS
2013-02-16 21:36:06 +11:00
Andrew Tridgell
428966160a
SITL: added support for MTK16 and MTK19 simulated GPS types
2013-02-16 20:59:48 +11:00
Andrew Tridgell
10cd466035
SITL: added simulation of the original MTK GPS
2013-02-16 20:16:13 +11:00
Andrew Tridgell
2ec2c58f67
SITL: added SIM_GPS_TYPE control
...
for choosing what sort of GPS to simulate
2013-02-16 20:15:57 +11:00
Andrew Tridgell
a63275d284
AP_InertialSensor: expand register range in MPU6000 _dump_registers()
2013-02-13 19:33:40 +11:00
Andrew Tridgell
fe964fcda0
PID: change to float input/output
...
this makes the PID library a bit more flexible for smaller range
numbers. Note that this library is used on ArduPlane and Rover, not
Copter
2013-02-09 20:36:26 +11:00
Andrew Tridgell
e45b137816
HAL_PX4: added run_debug_shell() implementation for PX4
2013-02-07 15:04:33 +11:00
Andrew Tridgell
70f7cde9b8
AP_HAL: added run_debug_shell() hal.util method
2013-02-07 15:04:33 +11:00
zlite
4800c57fb4
Fixed cosmetic typo in user display message
...
Corrected "it's" to "its". Just one of those grammar things that drives me crazy ;-)
2013-02-06 16:34:33 -08:00
Andrew Tridgell
1121254606
AP_InertialSensor: added filter frequency support to PX4 driver
2013-02-07 11:20:45 +11:00
Andrew Tridgell
5643c371b9
AP_InertialSensor: removed unused new_data_available() and temperature() APIs
2013-02-07 10:23:37 +11:00
Andrew Tridgell
7b1245937c
AP_InertialSensor: always sample at 200Hz in MPU6000
...
this changes the sampling to 200Hz regardless of requested rate, and
it is downsampled inside num_samples_available() using a shift. This
gives better noise resistance in ArduPlane.
This patch also makes it possible to update the filter frequency while
running, which is very useful for bench testing with a vibration
source
2013-02-07 10:23:08 +11:00
Jochen Tuchbreiter
c5f19f5df8
Plane: Implement issue 80: counterclockwise loiter
...
- libraries/AP_Common/AP_Common.h: Use bit 2 of Location.options to store
loiter direction
- ArduPlane/defines.h: New bitmask MASK_OPTIONS_LOITER_DIRECTION for struct
Location bit 2
- ArduPlane/ArduPlane.pde: New variable loiter_direction
- ArduPlane/GCS_Mavlink.pde: For mavlink loiter-commands use sign of param3 to
detemine direction. Set Location.option flag accordingly
- ArduPlane/commands.pde: Make sure loiter-directions get saved into EEPROM
correctly
- ArduPlane/commands_logic.pde: Set loiter_direction on all loiter-actions
as well as RTL/instant loiter
- ArduPlane/navigation.pde: Yield loiter_direction in update_loiter
2013-02-05 10:29:31 +11:00
Michael
5d91b06de3
RC_Channel: added secondary elevator support
2013-02-05 08:57:28 +11:00
Andrew Tridgell
db8da71f65
Revert "AP_HAL_AVR: Improved AVRTimer micros() and millis()"
...
This reverts commit 527dcdf3b9
.
This was causing the MPU6000 startup code to fail, due to time running
backwards.
2013-02-03 21:32:22 +11:00
John Arne Birkeland
527dcdf3b9
AP_HAL_AVR: Improved AVRTimer micros() and millis()
...
- More efficient code by using 16-bit timer
- micros() now has proper 1 us resolution and less overhead
- millis() has less overhead
- removed unneeded/unwanted initializatin of timers in AVRTimer::init()
pull request 62, approved and merged by pat
2013-02-01 09:32:40 -08:00
Randy Mackay
7729ec950e
AP_Math: longitude_scale function made public
...
Added LATLON_TO_M and LATLON_TO_CM #defines
2013-01-27 23:21:39 +09:00
Andrew Tridgell
4fd7630ec9
HAL_PX4: IO_SET_FEATURES is not needed any more
2013-01-27 15:05:28 +11:00
Andrew Tridgell
8375abdd99
HAL_PX4: fixed max storage write size
2013-01-27 15:04:47 +11:00
Andrew Tridgell
e4a204d2f6
HAL_PX4: reopen storage file on any IO error
2013-01-27 13:39:11 +11:00
Randy Mackay
6f5050a8b9
Copter: minor casting fixup for wp_distance
2013-01-27 11:27:43 +09:00
Randy Mackay
bad81a5113
AP_InertialSensor_MPU6k: remove unnecessary check of sign when receiving fifo packet from dmp
2013-01-27 11:22:39 +09:00
Andrew Tridgell
90e264d56a
HAL_PX4: disable manual override in PX4 for now
2013-01-27 12:52:14 +11:00
Andrew Tridgell
02b4ecc273
HAL_PX4: get RC input from PX4IO board
...
this allows us to support DSM and SBUS receivers
2013-01-27 12:52:14 +11:00
Randy Mackay
d2767b911c
AP_Math: switch get_distance_cm to return uint32_t
...
Includes changes required on ArduCopter and ArduPlane side as well
2013-01-26 17:04:12 +09:00
Andrew Tridgell
d7409b6a25
HAL_PX4: startup in low priority to fix CLI
...
this ensures that tight sensor loops in setup() can run without
sleeping
2013-01-25 20:44:36 +11:00
Andrew Tridgell
7359348e2c
HAL_PX4: added support for /fs/microsd/APM/nostart
...
prevents APM startup
2013-01-25 20:44:36 +11:00
Andrew Tridgell
8f2f4b1bc5
HAL_PX4: use write() to /dev/pwm_output for servo output
...
this lowest the cost of PWM output a lot, but relies on the new I2C
based IO firmware
2013-01-25 20:44:36 +11:00
Andrew Tridgell
9b4c75c66b
RC_Channel: don't change trim if radio in is zero
2013-01-25 20:44:36 +11:00
Andrew Tridgell
f9d43f4c3e
HAL_PX4: prevent loop() overruns using hrt
...
this ensures if loop() takes more than 1 second, the main task gets
its priority dropped until loop() completes
2013-01-24 15:04:57 +11:00
Andrew Tridgell
70227d5d93
HAL_PX4: added scheduler performance counters
2013-01-24 15:04:57 +11:00
Andrew Tridgell
0e79b93289
HAL_PX4: added storage performance counters
2013-01-24 15:04:57 +11:00
Andrew Tridgell
fc8065b50f
HAL_PX4: added UART performance counters
2013-01-24 15:04:57 +11:00
Andrew Tridgell
6cf1d5e1ff
HAL_PX4: handle IO errors on microsd
...
this should handle EINTR gracefully
2013-01-24 15:04:57 +11:00
Randy Mackay
542e2e1358
AP_PerfMon: fixes to make it work under AP_HAL (almost)
2013-01-23 21:22:17 +09:00
Andrew Tridgell
966b9b9b9c
HAL_PX4: format panic messages with a newline
2013-01-23 16:54:44 +11:00