Commit Graph

3491 Commits

Author SHA1 Message Date
Randy Mackay
b16ce5e523 AVR I2C: bug fix
Fix provided by both Jason Short and lucafedechen independently
2013-06-28 07:09:05 -10:00
phokur
b00e5d95c9 Update AnalogIn.cpp
Fixed AnalogIn.cpp:42: undefined references

Full error msgs:
/cygdrive/c/MAVPRO~1/ardupilot/libraries/AP_HAL_Empty/AnalogIn.cpp:42: undefined reference to `Empty::EmptyAnalogSource::set_stop_pin(unsigned char)'
/cygdrive/c/MAVPRO~1/ardupilot/libraries/AP_HAL_Empty/AnalogIn.cpp:42: undefined reference to `Empty::EmptyAnalogSource::set_settle_time(unsigned short)'
2013-06-26 23:22:08 -10:00
Craig@3DR
1a3ed2d80b AP_Compass: Corrected COMPASS_ORIENT Parameter Description 2013-06-26 19:14:24 -07:00
Randy Mackay
6cd18868c2 AirSpeed: fix example sketch compile error 2013-06-25 22:45:30 +09:00
Randy Mackay
20ed00dcc9 AP_InertialSensor: relax accel offset sanity check 2013-06-25 14:19:42 +09:00
Andrew Tridgell
7d42a0562d AP_AHRS: cope better with large GPS yaw changes
this should cope better with bungee launches when using only GPS for
yaw.
2013-06-25 12:44:26 +10:00
Andrew Tridgell
169b5a30a5 AP_Camera: added CAM_TRIGG_DIST parameter
for triggering every N meters of GPS distance travelled
2013-06-25 12:44:26 +10:00
Andrew Tridgell
7902d57877 AP_Relay: added RELAY_PIN parameter
makes it easier to choose a pin
2013-06-24 22:39:18 +10:00
Paul Riseborough
2204b30e66 Plane: Added APM_Control integrator limits to table used to covert old PID values 2013-06-22 21:59:47 +10:00
Paul Riseborough
147856e73c APM_Control: Added integrator limiting adjustable by an advanced user parameter
this is compatible with the old IMAX settings
2013-06-22 21:55:27 +10:00
Paul Riseborough
d8dab7b5c7 APM_Control: Pitch Control - Reduced the speed below which the integrator is locked
This is to allow for slow speed flare manoeuvres in FBW modes
2013-06-22 21:49:40 +10:00
Randy Mackay
aa2b10f044 AP_Baro: TEMP parameter comment fix 2013-06-18 11:28:36 +09:00
Randy Mackay
dde19c9585 WPNav: add acceleration parameter
WP_ACCEL added to allow user control of acceleration during missions.
Loiter acceleration made to be half of loiter max speed
2013-06-16 11:40:51 +09:00
Randy Mackay
272f0e5032 Copter: reduce twitch when entering CIRCLE mode
Set loiter target and prev iterations velocity when circle mode is
started
Start circling from projected stopping point
2013-06-15 18:18:30 +09:00
Andrew Tridgell
d7d87f827e HAL_PX4: support voltage monitoring on multi-connector pin 5 2013-06-05 08:24:20 +10:00
Paul Riseborough
3ad35363be Plane : APM_Control : Removed scaler incorrectly applied to the integrator path 2013-06-04 18:09:06 +10:00
Andrew Tridgell
f44f7308e8 AP_Param: we don't need to avoid writes in AP_Param now
now handled in the HAL
2013-06-04 14:02:49 +10:00
Andrew Tridgell
2316c3bd11 AP_HAL: make storage->write_block() take a const pointer 2013-06-04 14:02:13 +10:00
Andrew Tridgell
3c9d45d7d0 HAL_AVR: avoid writing bytes to EEPROM that are already correct
this speeds up writing of waypoint data, reducing latency
2013-06-04 13:33:41 +10:00
Andrew Tridgell
02252b5387 RC_Channel: removed reference to dip switches 2013-06-03 17:49:56 +10:00
Andrew Tridgell
aaaa5247e3 AP_AHRS: make it possible to setup board orientation at runtime 2013-06-03 16:52:28 +10:00
Andrew Tridgell
45b385cf81 AP_RCMapper: improved docs for RCMAP_* 2013-06-03 16:28:05 +10:00
Andrew Tridgell
c0058bbb03 RC_Channel: added output_trim() and read() functions
these make using rcmap in the plane code easier
2013-06-03 16:23:48 +10:00
Andrew Tridgell
033828aeb6 AP_Mount: make the code a bit easier to read 2013-06-03 16:23:48 +10:00
Andrew Tridgell
9076f6a1d0 AP_Mount: use RC_Channel::rc_channel() instead of rc_ch[] 2013-06-03 16:23:47 +10:00
Andrew Tridgell
0438952a8b RC_Channel: removed global rc_ch[] array
hide it as a object static instead
2013-06-03 16:23:47 +10:00
Randy Mackay
e9594c8b80 RCMapper: simple mapping object for primary input channels
allows arbitrary mapping of first 4 channels
2013-06-03 16:23:47 +10:00
Andrew Tridgell
68adeb041d AP_Airspeed: support ARSPD_PIN option for choosing source
this gives us support for arbitrary analog pins for the airspeed
sensor, plus support for the EagleTree airspeed driver on PX4
2013-06-03 11:51:09 +10:00
Andrew Tridgell
26b7de668a AP_Param: fixed parameter save bug
This bug affected parameters where the defaults are overridden in the
object constructor. For example, a PID object may have a default value
for PID_D of 0.0, but have a constructor based default of 0.2. If the
user tries to set the value to exactly 0.0, then the set wouldn't happen,
as the value matches the value in the object default var_info[]
table. 

This change ensures we force a save to eeprom if the value is changing
from the current value, regardless of the var_info[] default.

Thanks to Tom Coyle for finding this bug!
2013-06-02 14:49:34 +10:00
Andrew Tridgell
05889391e5 APM_Control: cope with zero integrator or tconst
if the user zeros the integrator tuning factor, we need to zero the
integrator
2013-06-01 22:29:38 +10:00
Andrew Tridgell
512d3d811d APM_Control: neaten up code formatting 2013-06-01 22:29:38 +10:00
Randy Mackay
7a2afb7443 Copter Nav: add accessor for waypoint speed 2013-06-01 18:21:29 +09:00
Randy Mackay
8b87849acd Math: add wrap_PI 2013-06-01 18:21:29 +09:00
Andrew Tridgell
c82caeeba1 HAL_AVR: configure analog inputs as INPUT without pullup
not all pins were defaulting to this, which led to some strange
readings on some devices. First noticed by Andi on a LM335 temperature
sensor
2013-06-01 12:19:02 +10:00
Randy Mackay
89bbf5844f Copter WPNav: remove unused variable 2013-05-31 21:41:32 +09:00
Randy Mackay
8c4a7ec094 Copter WPNav: Leonard's improved speed fix
Also pass in althold gain from main code
2013-05-31 21:03:27 +09:00
Andrew Tridgell
14c8c1bdfc APM_Control: tweak code layout and param descriptions 2013-05-31 17:24:55 +10:00
Randy Mackay
76028fc9d3 Copter Motors: use _min_throttle in output_test 2013-05-31 15:16:04 +09:00
Randy Mackay
28f2f87b26 Copter Motors: minor formatting change 2013-05-31 15:16:04 +09:00
Andrew Tridgell
f4efa92d3b APM_Control: fixed parameter names 2013-05-31 15:31:25 +10:00
Andrew Tridgell
3e8af05d15 APM_Control: match parameter names with old PID controllers
this will make upgrading easier
2013-05-31 14:06:56 +10:00
Andrew Tridgell
53d3ce7d2c APM_Control: fixed some documentation (old parameter names) 2013-05-31 07:58:29 +10:00
Andrew Tridgell
38e414db33 AP_Progmem: fixed type of strncmp_P() 2013-05-31 07:58:29 +10:00
Andrew Tridgell
ad2f6e1217 AP_Param: add support for converting between old and new parameters
this allows for a conversion table between old parameters and new
parameters, making firmware upgrades with moved parameters much easier
for users
2013-05-31 07:58:29 +10:00
Paul Riseborough
716c124f73 APM_control: Modified gain definitions for roll and pitch controllers so PID gains behave like previous servo PIDS
Gain definitions in roll and pitch controllers were updated previously
so that the old PID tuning values could be transferred across.
Updated tuning guide for revised gain definition.
2013-05-31 07:58:20 +10:00
Randy Mackay
a1926441da Copter: use fast tan for accel to lean angle calcs
Committed on behalf of Leonard
2013-05-30 18:25:04 +09:00
Randy Mackay
d81b7b507d Math: add Leonard's fast tan function 2013-05-30 18:24:32 +09:00
Randy Mackay
d203f0295b Copter: bug fix for vertical speed during missions 2013-05-30 11:52:04 +09:00
Andrew Tridgell
3dcdc15201 AP_Navigation: fixed indent-tabs-mode 2013-05-30 09:54:53 +10:00
Andrew Tridgell
ac2db516b4 APM_PI: fixed indent-tabs-mode 2013-05-30 09:54:53 +10:00
Andrew Tridgell
941a2c483a AP_LeadFilter: fixed indent-tabs-mode 2013-05-30 09:54:53 +10:00
Andrew Tridgell
86db955ac9 AP_L1_Control: fixed indent-tabs-mode 2013-05-30 09:54:53 +10:00
Andrew Tridgell
9da13f3775 AP_InertialNav: fixed indent-tabs-mode 2013-05-30 09:54:53 +10:00
Andrew Tridgell
e391c34d1e AP_HAL_PX4: fixed indent-tabs-mode 2013-05-30 09:54:53 +10:00
Andrew Tridgell
e2eca3e273 AP_HAL_AVR_SITL: fixed indent-tabs-mode 2013-05-30 09:54:53 +10:00
Andrew Tridgell
82aec0ef6c AP_Declination: fixed indent-tabs-mode 2013-05-30 09:54:53 +10:00
Andrew Tridgell
8f4d4465af AP_Curve: fixed indent-tabs-mode 2013-05-30 09:54:53 +10:00
Andrew Tridgell
fb7ae8c764 AP_Camera: fixed indent-tabs-mode 2013-05-30 09:54:53 +10:00
Andrew Tridgell
e75253d019 AP_AHRS: fixed indent-tabs-mode 2013-05-30 09:54:53 +10:00
Andrew Tridgell
8c25a504c3 AC_PID: fixed indent-tabs-mode 2013-05-30 09:54:53 +10:00
Andrew Tridgell
918a3d46f5 AP_Buffer: fixed indent-tabs-mode 2013-05-30 09:53:15 +10:00
Andrew Tridgell
6c5718a63b APM_Control: fixed indent-tabs-mode 2013-05-30 09:53:02 +10:00
Andrew Tridgell
933088b95a AP_Common: fixed indent-tabs-mode 2013-05-30 09:52:38 +10:00
Andrew Tridgell
4007b7b1e9 AP_Compass: fixed indent-tabs-mode 2013-05-30 09:52:30 +10:00
Andrew Tridgell
edfebc1f29 AP_GPS: fixed indent-tabs-mode 2013-05-30 09:52:21 +10:00
Andrew Tridgell
c92069644d AP_InertialSensor: fixed indent-tabs-mode 2013-05-30 09:52:12 +10:00
Andrew Tridgell
c28ef033a2 AP_Limits: fixed indent-tabs-mode 2013-05-30 09:52:00 +10:00
Andrew Tridgell
5024da2695 AP_Math: fixed indent-tabs-mode 2013-05-30 09:51:51 +10:00
Andrew Tridgell
5fdf6ff4f7 AP_Menu: fixed indent-tabs-mode 2013-05-30 09:51:43 +10:00
Andrew Tridgell
81f7ae9108 AP_Motors: fixed indent-tabs-mode 2013-05-30 09:51:34 +10:00
Andrew Tridgell
1cc02836a0 AP_Mount: fixed indent-tabs-mode 2013-05-30 09:51:24 +10:00
Andrew Tridgell
e69e4a5695 AP_RangeFinder: fixed indent-tabs-mode 2013-05-30 09:51:11 +10:00
Andrew Tridgell
91a60be758 GCS_MAVLink: fixed indent-tabs-mode 2013-05-30 09:50:57 +10:00
Andrew Tridgell
6862791d66 PID: fixed indent-tabs-mode 2013-05-30 09:50:37 +10:00
Andrew Tridgell
c96ac5edbb RC_Channel: fixed indent-tabs-mode 2013-05-30 09:48:45 +10:00
Randy Mackay
4ce4b7aef9 OptFlow: minor commenting and format changes 2013-05-28 22:56:11 +09:00
Andrew Tridgell
15a84972d1 SITL: added SIM_MAG_ERROR parameter
this is a compass yaw error in degrees, used for testing navigation
with a bad compass
2013-05-27 13:37:34 +10:00
Randy Mackay
ec7ee47099 Copter: scaling stability patch 2013-05-27 11:21:31 +09:00
Randy Mackay
dbd6524f9f Copter: WPNav consolidate acceleration #defines 2013-05-27 10:36:24 +09:00
Randy Mackay
e3dffb920b Copter: initialise target vel in loiter 2013-05-25 14:07:04 +09:00
Randy Mackay
a474b97291 Copter: resolve compiler warning re unused vars 2013-05-25 13:32:15 +09:00
Randy Mackay
916f241fff Copter: Leonard's improved Loiter 2013-05-24 23:45:03 +09:00
Andrew Tridgell
14628990e6 AP_AHRS: make wind estimation configurable
rover doesn't want it
2013-05-24 11:21:42 +10:00
Andrew Tridgell
807dbf9786 AP_InertialSensor: fixed a build warning 2013-05-24 11:21:42 +10:00
Randy Mackay
46d65150af Copter: lengthen loiter stopping point
This will make stops less aggressive when entering loiter at very high
speeds (more 7.5m/s)
2013-05-22 17:35:20 +09:00
Randy Mackay
400c1bd7b7 Copter: smooth waypoint transitions
Speed of intermediate point is initialised and constrained based on
current speed vector vs direction to the next waypoint.
This means the copter does not slow if the previous segment and next
segment are in line and also the intermediate point is not advanced
towards the next waypoint if the copter is moving quickly in the
opposite direction.
2013-05-22 14:17:26 +09:00
Andrew Tridgell
59b6118a1d AP_InertialSensor: fixed parameter markup 2013-05-21 17:02:13 +10:00
Randy Mackay
b27ddf0f63 AP_AHRS: add parameter descriptions 2013-05-21 15:39:03 +09:00
Randy Mackay
6a65a32de2 CopterMotors: add formatting info to top of files 2013-05-20 10:48:42 +09:00
Randy Mackay
5235f4cacd Copter: allow Tri copters to init ESCs through APM/PX4 2013-05-19 17:28:39 +09:00
Randy Mackay
b914f9ba06 SITL: use SIM_ENGINE_MUL to simulate motor failure 2013-05-19 14:29:08 +09:00
Andrew Tridgell
c08c084191 AP_AHRS: added get_projected_position()
this is used to project the position forward by the GPS lag
2013-05-17 08:32:21 +10:00
Andrew Tridgell
2c149bac8e HAL_PX4: added new arming ioctls 2013-05-16 16:43:38 +10:00
Randy Mackay
cb795ea536 WPNav: divide by zero checks 2013-05-15 11:51:26 +09:00
Randy Mackay
610edd8f9a ACMotors: small formatting change 2013-05-14 19:01:53 +09:00
Randy Mackay
cd5795a4ac ACMotors: make a few more functions non-virtual
Saves at least 22 bytes of RAM
2013-05-14 18:23:36 +09:00
Randy Mackay
ad00e0ee1e ACMotors: make test_order uint_8 2013-05-14 18:03:34 +09:00
Randy Mackay
88893f4209 ACMotors: make a few functions non-virtual 2013-05-14 17:41:12 +09:00
Randy Mackay
bd07b1e57b ACMotors: remove unused get_num_motors function
Saves about 4 bytes of RAM
2013-05-14 17:35:27 +09:00
Randy Mackay
5bb0582854 ACMotors: ESC Calibration only for enabled motors 2013-05-14 17:07:36 +09:00