Commit Graph

4556 Commits

Author SHA1 Message Date
Randy Mackay
551836c49d AC_PosControl: make some methods const 2014-02-15 05:27:40 +11:00
Randy Mackay
a2b017abd2 AC_AttControl: add rateef_rpy
rateef_rpy takes earth frame rates and applies them to the earth frame
angle targets and then converts them to body frame rates
2014-02-15 05:27:40 +11:00
Randy Mackay
468be05867 AC_AttControl: make ahrs, ins objects const 2014-02-15 05:27:40 +11:00
Randy Mackay
864f64b61a AC_Circle: circle control library 2014-02-15 05:27:40 +11:00
Randy Mackay
35ef9c73d1 AC_Sprayer: minor comment fix 2014-02-15 05:27:40 +11:00
Randy Mackay
4c02212404 AC_Fence: minor comment fix 2014-02-15 05:27:39 +11:00
Randy Mackay
d4e4620159 AC_WPNav: remove unused PID references 2014-02-15 05:27:39 +11:00
Randy Mackay
26b257c8ba AC_AttControl: alternative get_stopping_point_z 2014-02-15 05:27:39 +11:00
Randy Mackay
fc427967ae AC_WPNav: set wp origin to horiz and vert stopping point
Also bug fix to set pos_control's down speed as a negative number
2014-02-15 05:27:39 +11:00
Randy Mackay
1b8791a142 AC_PosControl: remove debug 2014-02-15 05:27:39 +11:00
Randy Mackay
4cd45e2edf AC_WPNav: remove debug 2014-02-15 05:27:38 +11:00
Randy Mackay
4003b4da9b AC_AttControl: leonard's body frame rate controller 2014-02-15 05:27:38 +11:00
Randy Mackay
171203370f AC_PosControl: add accessor for speed_up and down 2014-02-15 05:27:37 +11:00
Randy Mackay
1596d83d02 AC_WPNav: move leashes to AC_PosControl 2014-02-15 05:27:37 +11:00
Randy Mackay
de34359808 AC_PosControl: recalculate leash when speed or accel modified 2014-02-15 05:27:37 +11:00
Randy Mackay
ba3ba9e157 AC_AttControl: bug fix for yaw target handling 2014-02-15 05:27:37 +11:00
Randy Mackay
0d4ba04e75 AC_WPNav: make advance_wp_target private 2014-02-15 05:27:37 +11:00
Randy Mackay
80ae3dca2e AC_PosControl: remove debug 2014-02-15 05:27:36 +11:00
Randy Mackay
b9ae3ce2ff AC_PosControl: fixed example sketch 2014-02-15 05:27:36 +11:00
Randy Mackay
0c8cbba644 AC_WPNav: remove xy pos controller 2014-02-15 05:27:36 +11:00
Randy Mackay
9fe4d883d0 AC_AttControl: accessor for lean angle max 2014-02-15 05:27:35 +11:00
Randy Mackay
bbcf8cc84c AC_PosControl: add horizontal pos control 2014-02-15 05:27:35 +11:00
Randy Mackay
2984e492df AC_WPNav: add reference to AC_PosControl
Also remove requirement to pass in inertial nav position and velocity to
init_loiter method
2014-02-15 05:27:35 +11:00
Randy Mackay
0e0a15f4a8 AC_AttControl: add high level angle controllers 2014-02-15 05:27:35 +11:00
Randy Mackay
3ce1c0a9d5 AC_PosControl: add get_alt_error method 2014-02-15 05:27:34 +11:00
Randy Mackay
a0298aee29 AP_Motors: expose throttle min and max 2014-02-15 05:27:34 +11:00
Randy Mackay
89b7e6b1c8 AC_AttControl: implement angle_boost 2014-02-15 05:27:34 +11:00
Randy Mackay
8988b48ad8 AC_PosControl: add init take-off 2014-02-15 05:27:34 +11:00
Randy Mackay
dcac124105 AC_PosControl: add throttle controller 2014-02-15 05:27:33 +11:00
Randy Mackay
05bb943a69 AC_AttControl: first draft of PosControl class 2014-02-15 05:27:33 +11:00
Randy Mackay
b7565affcd INS: add support for 400hz for PX4 2014-02-15 05:27:33 +11:00
Randy Mackay
0521806cc6 AP_Vehicle: add multicopter parameters 2014-02-15 05:27:32 +11:00
Randy Mackay
715c8eaf02 AC_AttitudeControl: first draft of library 2014-02-15 05:27:32 +11:00
Andrew Tridgell
d853d65b84 AP_Airspeed: added ARSPD_TUBE_ORDER parameter
This allows for either order of tube connection by default, but the
order can be specified if need be
2014-02-15 05:12:15 +11:00
Andrew Tridgell
bea0a46410 AP_HAL: added servorail_voltage and power_status_flags() API on AnalogIn 2014-02-15 05:00:09 +11:00
Andrew Tridgell
ce43e674fe DataFlash: added power status logging 2014-02-15 05:00:09 +11:00
Andrew Tridgell
87355127ca GCS_MAVLink: added send_power_status() 2014-02-15 05:00:09 +11:00
Andrew Tridgell
8797f38038 GCS_MAVLink: regenerate MAVLink headers 2014-02-15 05:00:08 +11:00
Andrew Tridgell
0cbd5a2ef0 GCS_MAVLink: added POWER_STATUS message 2014-02-15 05:00:08 +11:00
Andrew Tridgell
63910bf8cd DataFlash: work around a NuttX bug
the seek offset of files can get badly mucked up when it crosses
cluster boundaries. We need to fix this in NuttX, but meanwhile this
works around the bug. It seems that doing a lseek(fd, 0, SEEK_CUR)
fixes the seek offset in the file.

The bug seems to first happen at an offset of 315392. It also
doesn't happen every time - it is more likely to happen on the first
log download after booting
2014-02-15 05:00:08 +11:00
Andrew Tridgell
0aebc18b3f GCS_MAVLink: return early from log send if no log data to send 2014-02-14 21:51:00 +11:00
Andrew Tridgell
1497c33178 GCS_MAVLink: run a bit faster on serial ports with flow control
with flow control we can afford to push the radio a bit harder
2014-02-14 21:51:00 +11:00
Andrew Tridgell
7c1b9b344f AP_HAL: added get_flow_control() API 2014-02-14 21:51:00 +11:00
Andrew Tridgell
81c5edbdb5 GCS_MAVLink: fixed a log download bug for repeated downloads
we were not resetting the offset to 0 correctly
2014-02-14 21:50:59 +11:00
Andrew Tridgell
dcd7f9d26d AP_Airspeed: use raw (signed) airspeed
this allows us to detect when the user has the ports the wrong way
around, and mark the sensor unhealthy
2014-02-14 21:50:59 +11:00
Andrew Tridgell
1849db7074 AP_HAL: added board_voltage AnalogIn method
this makes it easier to get the board voltage from any library,
without having to allocate another analog channel object
2014-02-14 21:25:38 +11:00
Andrew Tridgell
4e2e685d7a HAL_PX4: better fix for IFLOW on all ports
the tcsetattr() call fails to apply the baudrate if the port has no
RTS pin and we ask for IFLOW. So just make a separate call.
2014-02-12 17:47:23 +11:00
Andrew Tridgell
b2cdd39a99 HAL_PX4: don't enable IFLOW on ports without flow control
this should have been harmless, but breaks the GPS on Pixhawk. This
disables it until we work out why.
2014-02-12 17:32:07 +11:00
Andrew Tridgell
35791e1f05 AP_Airspeed: fixed get_temperature on PX4 2014-02-12 13:46:15 +11:00
Andrew Tridgell
ccb7dc640d AP_HAL: fixed a build warning 2014-02-12 10:51:58 +11:00
Andrew Tridgell
c93794999e HAL_PX4: remove an old conditional define 2014-02-11 15:58:25 +11:00
Andrew Tridgell
8095eb0bee AP_BoardConfig: added BRD_SAFETYENABLE option
this allows the safety switch to be disabled on startup
2014-02-11 15:58:25 +11:00
Andrew Tridgell
439a075b30 AP_HAL: added force_safety_off rcoutput function
this forces the safety switch off, enabling PWM on the IO board
2014-02-11 15:58:25 +11:00
Dan Neault
262d384025 Coax: Yaw fix
Was using _rc_yaw servo_out instead of pwm_out to modify motors.
Corrected and less touchy in Yaw
2014-02-11 11:05:02 +09:00
Andrew Tridgell
fce464597a AP_BoardConfig: PX4v1 does not have hw flow control on UART5 2014-02-11 12:11:26 +11:00
Andrew Tridgell
1b5d5dd8c4 AP_BoardConfig: set flow control to AUTO by default 2014-02-11 12:11:26 +11:00
Andrew Tridgell
c5c1d1358a HAL_PX4: added automatic hardware flow control detection
this allows us to detect if hardware flow control is not available and
automatically disable it
2014-02-11 12:11:26 +11:00
Randy Mackay
a0369b85d1 LowPassFilter: make methods non-virtual
No classes inherit from this class so no need for set_cutoff_frequency,
set_time_constant and reset(T) to be declared virtual.  Saves 6 bytes of
RAM.
2014-02-10 20:47:05 +09:00
Randy Mackay
38222d65e9 DerivativeFilter: update and slope non-virtual
No classes inherit from DerivativeFilter so no need to be virtual.
Saves 4bytes of RAM.
2014-02-10 20:47:02 +09:00
Randy Mackay
4040be9990 FilterWithBuffer: make get_sample non-virtual
virtual added to apply() and reset() declaration inline with base class.
This should have no impact on memory usage or functionality
2014-02-10 20:47:00 +09:00
Randy Mackay
6cee33b6fd AP_Curve: remove virtual from method declarations 2014-02-10 17:28:11 +09:00
Randy Mackay
4c38999ca6 Maxsonar Test: remove raw from output to user 2014-02-10 15:00:08 +09:00
Randy Mackay
e1fabadd3c MaxsonarI2C: read method returns int16_t 2014-02-10 14:59:46 +09:00
Randy Mackay
ab22d11110 MaxsonarRFinder: convert_raw returns int16_t 2014-02-10 14:59:27 +09:00
Randy Mackay
32820b4260 PulsedLightRFinder: read method returns int16_t 2014-02-10 14:58:27 +09:00
Randy Mackay
bf3fa8b99b RangeFinder: remove raw_value from SharpGP2Y 2014-02-10 14:57:17 +09:00
Randy Mackay
8d54e50897 RangeFinder: remove raw_value, orientation variables
This saves 10bytes of RAM
2014-02-10 14:56:52 +09:00
Randy Mackay
d19b566d97 OptFlow: remove unused variables
Saves 24bytes RAM by removing several static variables that were used
only for internal calculations
2014-02-10 13:53:49 +09:00
Andrew Tridgell
b907263685 AP_BoardConfig: added BRD_SER1_RTSCTS and BRD_SER2_RTSCTS
used to enable flow control on telemetry ports
2014-02-10 12:57:19 +11:00
Andrew Tridgell
3e637ac5d9 AP_HAL: added enable_flow_control() option in AP_HAL 2014-02-10 12:54:50 +11:00
Randy Mackay
c9415a08f1 AC_WPNav: use ahrs trig values 2014-02-08 18:16:47 +09:00
Randy Mackay
98d667c916 AHRS_HIL: call update_trig 2014-02-08 18:16:44 +09:00
Randy Mackay
6946d68318 AHRS_DCM: call update_trig 2014-02-08 18:16:42 +09:00
Randy Mackay
3dc6ea682c AHRS: add update_trig
Calculates helper trig values including cos_roll, cos_pitch
2014-02-08 18:16:39 +09:00
Andrew Tridgell
a95a3142e0 AP_InertialSensor: use fixed size arrays
apparently helps SITL build on MacOS
2014-02-08 19:32:26 +11:00
Bill Bonney
82ea5926a8 OptFlow: update function added to fix compiler error 2014-02-08 11:53:04 +09:00
Randy Mackay
14409ee20f Copter: disable aux channels used for motors 2014-02-07 22:04:27 +09:00
Randy Mackay
7c25247c87 Copter: disable aux channel 7 for SingleCopter
Move servo range setup to AP_MotorsSingle
2014-02-07 22:04:26 +09:00
Randy Mackay
9b594dc5e1 Copter: disable aux channel ch7 for Tri 2014-02-07 22:04:24 +09:00
Randy Mackay
1426078cdb TradHeli: disable aux channels 7 and 8 2014-02-07 22:04:23 +09:00
Paul Riseborough
bc311542ab AP_TECS : Fixed bug preventing accel launch detection when not using AS sensor 2014-02-07 19:20:54 +11:00
Dneault
5213ec4aa6 Coax: servos to ch1, ch2, motors to ch3, ch4 2014-02-07 12:36:19 +09:00
Randy Mackay
f60d94c4ab Coax: remove unused servo3, servo4
Removed commented out code
2014-02-07 12:36:06 +09:00
Dneault
f48e106271 Copter: add coax heli support
Motors should be attached to RCOutputs 1 and 2, Flaps should be connected
to RC outputs 3 and 4
2014-02-07 12:36:04 +09:00
Andrew Tridgell
00d2d5946c RC_Channel: added disable_aux_channel()
this will be used by copter to ensure motor channels are not enabled
for aux functions
2014-02-06 21:30:55 +11:00
Andrew Tridgell
b4208c7fc0 RC_Channel: added flaperon1 and flaperon2 function outputs 2014-02-06 12:35:32 +11:00
Andrew Tridgell
698736b66d RC_Channel: simplify the setup of aux channels
avoid the nasty mess of #if lines, as the info is in the constructor
anyway
2014-02-06 10:17:16 +11:00
Andrew Tridgell
264c092aa6 AP_ServoRelayEvents: fixed disabling repeated events on set_servo() 2014-02-06 10:03:26 +11:00
Randy Mackay
a963ec7e3b AP_Math: bug fix to wrap_360 and wrap_180
angles above 720deg and below 3200deg might not have been properly
wrapped.
wrap_360_cd could return 36000 when really this should be wrapped back
to zero.
2014-02-03 12:56:56 +09:00
Andrew Tridgell
688f61c087 AP_Param: expose check_var_info() as a public symbol 2014-01-31 13:07:41 +11:00
Andrew Tridgell
c0e548fc60 AP_Notify: fixed example build 2014-01-30 13:33:59 +11:00
Andrew Tridgell
93070a673e AP_Math: fixed example build 2014-01-30 13:33:46 +11:00
Andrew Tridgell
045efdb084 AP_InertialSensor: fixed example builds 2014-01-30 13:33:38 +11:00
Andrew Tridgell
a339ec25c8 AP_Airspeed: fixed example build 2014-01-30 13:33:29 +11:00
Andrew Tridgell
cf1f05a198 AP_Airspeed: expose get_temperature() 2014-01-28 10:35:35 +11:00
Andrew Tridgell
fc3ed61e67 DataFlash: added baro dataflash logging 2014-01-28 10:35:18 +11:00
Andrew Tridgell
8f3071b1b8 AP_Arming: more detail in ARMING_CHECK docs 2014-01-25 22:22:50 +11:00
Andrew Tridgell
23d8bfa976 AP_Notify: reduce the latency in the main task of LED updates
the ioctl now gets called in a IO timer callback
2014-01-24 10:40:39 +11:00
Andrew Tridgell
0d174db05b AP_Math: added equality operator for VectorN 2014-01-24 10:37:08 +11:00
Andrew Tridgell
aae0e3c0e5 AP_Arming: allow checking of pre-arm without reporting
useful for updating AP_Notify LEDs
2014-01-23 21:39:55 +11:00
Andrew Tridgell
330a4649fd AP_Notify: fixed LED colour for no-GPS and armed 2014-01-23 21:39:31 +11:00
Andrew Tridgell
58d3729d16 AP_InertialSensor: fixed default health functions
this fixes INS on APM1. Thanks to Mike McCauley for noticing this!
2014-01-22 22:08:28 +11:00
Andrew Tridgell
54562b0b9a AP_Compass: prevent bad initial values from affecting HMC5883 calibration
the first couple of values after we enter strap mode may be low, but
just above our 0.7 threshold. We now discard the first two values to
prevent these affecting the average.

Also added some commented out debug code and a comment on the scaling
of the calibration code
2014-01-22 17:15:34 +11:00
Andrew Tridgell
67aab44566 AP_ServoRelayEvents: library for handling servo and relay events 2014-01-20 17:06:29 +11:00
Andrew Tridgell
4aa901f203 AP_Relay: added enabled() API 2014-01-20 17:06:29 +11:00
Andrew Tridgell
55b604b147 AP_Camera: updates for relay API change 2014-01-20 17:06:29 +11:00
Andrew Tridgell
e42ba853ec AP_Relay: enable up to 4 relay pins 2014-01-20 17:06:29 +11:00
Andrew Tridgell
b5822cd549 AP_BoardConfig: board specific config library
used to control board specific parameters, such as PWM output count
2014-01-20 17:06:28 +11:00
Andrew Tridgell
99b41f110f HAL_PX4: enable the FMU PWM pins to be used as GPIO when needed 2014-01-20 17:06:28 +11:00
Paul Riseborough
f2c2811ef3 AP_AHRS & AP_Math: fixed bug in use of AHRS_TRIM parameters 2014-01-19 07:19:43 +11:00
Don Gagne
68b3b31499 Param doc typo 2014-01-18 10:18:58 +09:00
Andrew Tridgell
fc6ce42a28 HAL_AVR: fixed build 2014-01-17 15:00:20 +11:00
Randy Mackay
965e5b2dfd INS: check for good calibration for 10seconds
Shortened gyro calibration commit also halved the total time we would
look for a good gyro calibration.  This restores the total time to 10
seconds.
2014-01-17 12:48:11 +09:00
Andrew Tridgell
87cc95dd7f AP_HAL: removed unused enable_mask and disable_mask functions 2014-01-16 17:16:17 +11:00
Randy Mackay
1f76ada9dd INS: shortened gyro calibration
Removed delays before calibration, reduced number of samples taken,
widened convergence criteria
2014-01-16 13:40:49 +09:00
Andrew Tridgell
e1f06c532a HAL_PX4: more checking of IO results in eeprom driver 2014-01-16 13:11:14 +11:00
Andrew Tridgell
3ae6f03761 HAL_PX4: be less verbose about disarmed PWM setup 2014-01-16 13:11:13 +11:00
Andrew Tridgell
db1d438e97 HAL_PX4: implement set_safety_pwm() API
used to set PWM on motors when disarmed
2014-01-15 22:25:50 +11:00
Andrew Tridgell
5e39b6fb11 AP_HAL: added set_safety_pwm() API 2014-01-15 22:25:22 +11:00
Andrew Tridgell
64fbadcc21 HAL_PX4: use eeprom on PX4 FMUv1 as well
this means we no longer store params on SD at all
2014-01-15 19:33:13 +11:00
Randy Mackay
0a3559813a AC_WPNav: accessor for loiter speed 2014-01-15 15:22:30 +09:00
Andrew Tridgell
376ab30366 HAL_PX4: disable rename of old parameter file for now
be nice to release candidate users
2014-01-14 22:00:56 +11:00
Andrew Tridgell
461638780b HAL_AVR: fixed warning on memcheck build 2014-01-14 21:27:52 +11:00
Andrew Tridgell
626086063e HAL_PX4: added a signature to FRAM
this makes for more reliable update
2014-01-14 15:06:51 +11:00
Andrew Tridgell
921f923c5f DataFlash: reset write log on new log 2014-01-14 14:28:56 +11:00
Andrew Tridgell
b5a16a07d3 GCS_MAVLink: support LOG_REQUEST_END 2014-01-14 13:51:20 +11:00
Andrew Tridgell
ef28d087d2 DataFlash: added logging_started() API 2014-01-14 13:51:06 +11:00
Andrew Tridgell
f6db03dfb0 DataFlash: don't fsync on SITL
this makes it much faster on virtual machines
2014-01-14 12:46:26 +11:00
Andrew Tridgell
b4b66210ff DataFlash: improve reliability of microSD for logs 2014-01-14 12:46:26 +11:00
Andrew Tridgell
b88bb0751c HAL_PX4: added support for MTD (FRAM) parameters
this allows us to store parameters and waypoints in FRAM, and
auto-upgrade from microSD
2014-01-14 12:46:26 +11:00
Andrew Tridgell
e78e35f3bd HAL_PX4: try to use uppercase names on NuttX microSD card 2014-01-14 12:46:26 +11:00
Andrew Tridgell
cb23298384 DataFlash: try to keep dataflash writes aligned
also rename lastlog.txt to LASTLOG.TXT as NuttX seems to get less
corruption with VFAT filenames that don't need uppercase mappings
2014-01-14 12:46:26 +11:00
Randy Mackay
fb0fe3793c AP_Notify: external LEDs blink while initialising 2014-01-13 23:31:32 +09:00
Andrew Tridgell
63586e3e23 HAL_PX4: fixed build for new PX4Firmware 2014-01-13 13:54:51 +11:00
JakobSt
986417067e AP_GPS: Improved accuracy of NMEA driver
The conversion of ret (32bit-integer) to float reduced accuracy to ~9cm or ~22cm. Now it's ~1cm.
2014-01-13 09:58:30 +11:00
Robert Lefebvre
d441354961 TradHeli: Minor change to two param defaults
Also one param name in the code clarified.
2014-01-10 10:52:17 +09:00
Don Gagne
1db3c6e688 AP_Arming: param doc fixes
These were confusing the parser, or just incorrect
2014-01-10 10:40:53 +09:00
Don Gagne
e68cf2d1c5 Plane: Fix parameter documentation
Fixes some problems with incorrect docs which would in turn generate
bad amp.pdef.xml files for ground stations.

merge with below
2014-01-09 14:02:21 +09:00
Randy Mackay
3823eed865 OptFlow: update example sketch to work with shrunken library 2014-01-09 12:31:51 +09:00
Randy Mackay
8caa5159f8 OptFlow: shrink lib by removing unused functions
Saves 46bytes of RAM and 1k of flash
2014-01-09 12:31:48 +09:00
Randy Mackay
a53d1075ec DataFlash: add EnableWrites method
This method allows temporarily suspending writes to the dataflash which
will be used in ArduCopter to ensure no messages are written while the
copter is disarmed
2014-01-07 22:43:44 +09:00
Andrew Tridgell
4519aa8867 DataFlash: only fsync every 10 seconds
prevents too much work in SITL
2014-01-04 08:15:38 +11:00
Andrew Tridgell
89676be825 HAL_PX4: fixed RCInput race condition
the number of channels could be zero with thread switch at the wrong
time
2013-12-31 22:25:16 +11:00
Andrew Tridgell
a2997704eb HAL_PX4: removed code which drops throttle to 900 on loss of RC
rely on vehicle code checking for last data coming in
2013-12-31 10:58:49 +11:00
Andrew Tridgell
a8946a5f31 HAL_Linux: fixed build 2013-12-31 10:28:38 +11:00
Andrew Tridgell
8019d45200 DataFlash: use HAL_OS_POSIX_IO 2013-12-31 10:28:38 +11:00
Andrew Tridgell
5e3c4441dc AP_Baro: use HAL_CPU_CLASS in baro driver 2013-12-31 10:28:37 +11:00
Andrew Tridgell
ea649e036b AP_HAL: added HAL_CPU_CLASS define for selecting algorithms
this will make it easier to select the appropiate level of algorithm
for a CPU
2013-12-31 10:28:37 +11:00
Andrew Tridgell
4c99d09265 AP_Math: fixed build of vectorN class on PX4 2013-12-31 10:28:27 +11:00
Andrew Tridgell
bc2d17e76e AP_Compass: added vector compass setHIL method 2013-12-30 14:35:24 +11:00