Commit Graph

10833 Commits

Author SHA1 Message Date
Leonard Hall
15be80a25d AC_PosControl: accel_to_throttle outputs 0 to 1 2016-04-01 11:59:30 +09:00
Leonard Hall
e5d6d45851 AC_AttControl_Heli: angle_boost to float 2016-04-01 11:59:30 +09:00
Leonard Hall
2822b93cd4 AC_AttControl: add get_throttle_in accessor
Used for logging only
2016-04-01 11:59:30 +09:00
Leonard Hall
c0f209fa42 AC_AttControl: angle_boost to float 2016-04-01 11:59:30 +09:00
Leonard Hall
6f29bbafb4 AC_AttControl_Multi: get_althold_lean_angle_max uses motor thrust in 0 to 1 range 2016-04-01 11:59:30 +09:00
Leonard Hall
24f975c16a AC_AttControl_Multi: fix throttle boost for 0 to 1 2016-04-01 11:59:30 +09:00
Leonard Hall
bab08cbcc1 AC_AttControl_Multi: add divide by zero check 2016-04-01 11:59:30 +09:00
Leonard Hall
d2a1cdf906 MotorsHeli: replace throttle_control_input with throttle_in
throttle_control_input was 0 to 1000 range, throttle_in is 0 to 1
2016-04-01 11:59:30 +09:00
Leonard Hall
f02e8f8e01 AP_MotorsHeli: remove output_armed_not_stabilizing 2016-04-01 11:59:30 +09:00
Leonard Hall
5cd4b78918 AP_MotorsSingle: remove reverse parameters
No longer necessary because we can use individual servo reverse params
2016-04-01 11:59:30 +09:00
Leonard Hall
6264159f4d AP_MotorsSingle: move servo objects into Single class 2016-04-01 11:59:30 +09:00
Leonard Hall
21d304b86d AP_MotorsSingle: output_to_motors implements spool logic 2016-04-01 11:59:30 +09:00
Leonard Hall
24a100e429 AP_MotorsSingle: stability patch uses 0 to 1 range 2016-04-01 11:59:30 +09:00
Leonard Hall
cffdced838 AP_MotorsSingle: support 4 servo outputs 2016-04-01 11:59:30 +09:00
Leonard Hall
f53d6e95e8 AP_MotorsSingle: rename _rev_roll to _roll_reverse
Also rename _rev_pitch to _pitch_reverse and _rev_yaw to _yaw_reverse
2016-04-01 11:59:30 +09:00
Leonard Hall
4db73d86af AP_MotorsSingle: remove output_disarmed 2016-04-01 11:59:30 +09:00
Leonard Hall
46ab198ebc AP_MotorsSingle: remove output_armed_not_stabilizing 2016-04-01 11:59:30 +09:00
Leonard Hall
40c18891cf AP_MotorsCoax: remove reverse parameters
No longer necessary because we can use individual servo reverse params
2016-04-01 11:59:30 +09:00
Leonard Hall
260006dcb3 AP_MotorsCoax: move servo objects into Coax class 2016-04-01 11:59:30 +09:00
Leonard Hall
110d41ee24 AP_MotorsCoax: fix SV_SPEED param description 2016-04-01 11:59:30 +09:00
Leonard Hall
8d8f52b22f AP_MotorsCoax: output_to_motors implements spool logic 2016-04-01 11:59:30 +09:00
Leonard Hall
b85c20bb65 AP_MotorsCoax: stability patch in 0 to 1 range
Also removes setting of limits in stability patch
sets outputs for additional 2 servos
2016-04-01 11:59:30 +09:00
Leonard Hall
7df9b2eb8c AP_MotorsCoax: support 4 servo outputs 2016-04-01 11:59:30 +09:00
Leonard Hall
7d6c6b5556 AP_MotorsCoax: rename _rev_roll to _roll_reverse
Also rename _rev_pitch to _pitch_reverse and _rev_yaw to _yaw_reverse
2016-04-01 11:59:30 +09:00
Leonard Hall
5cb44901ff AP_MotorsCoax: remove output_disarmed 2016-04-01 11:59:30 +09:00
Leonard Hall
3df52aad5f AP_MotorsCoax: remove output_armed_not_stabilizing 2016-04-01 11:59:30 +09:00
Leonard Hall
45a16d6dad AP_MotorsTri: implement output_to_motors for spool logic 2016-04-01 11:59:30 +09:00
Leonard Hall
d0a7579fa0 AP_MotorsTri: stability patch in 0 to 1 range 2016-04-01 11:59:30 +09:00
Leonard Hall
80f77bc30b AP_MotorsTri: output_min does not set limits 2016-04-01 11:59:30 +09:00
Leonard Hall
ba659be5cb AP_MotorsTri: rename _yaw_servo_reverse to _yaw_reverse 2016-04-01 11:59:30 +09:00
Leonard Hall
8c4d6d6fbe AP_MotorsTri: remove output_disarmed 2016-04-01 11:59:30 +09:00
Leonard Hall
a2fdcfaf3f AP_MotorsTri: remove output_armed_not_stabilizing 2016-04-01 11:59:30 +09:00
Leonard Hall
397940a9a4 AP_MotorsMatrix: implement output_to_motors 2016-04-01 11:59:30 +09:00
Leonard Hall
cdec8f3387 AP_MotorsMatrix: remove output_disarmed 2016-04-01 11:59:30 +09:00
Leonard Hall
b965857229 AP_MotorsMatrix: remove output_armed_not_stabilizing 2016-04-01 11:59:30 +09:00
Leonard Hall
d0c6d087a5 AP_MotorsMatrix: do not set limits in output_min 2016-04-01 11:59:30 +09:00
Leonard Hall
3fef60da45 AP_MotorsMatrix: stability patch in 0 to 1 range
Includes storing motor level thrusts to _thrust_rpyt_out
rename _throttle_thr_mix_desired to _throttle_rpy_mix_desired
rename _throttle_thr_mix to _throttle_rpy_mix
use get_hover_throttle_as_high_end_pct
use throttle_thrust_max updated by multicopter spool logic
do not set limits in stability patch
2016-04-01 11:59:30 +09:00
Leonard Hall
5841310ac7 AP_MotorsMulticopter: update_throttle_filter limits throttle to 0 to 1 2016-04-01 11:59:30 +09:00
Leonard Hall
420b90953c AP_MotorsMulticopter: throttle_radio_min, max to multicopter class
Moved in from Motors class, only ever used by multicopters
No functional change
2016-04-01 11:59:30 +09:00
Leonard Hall
2c9a02066d AP_MotorsMulticopter: remove unused functions and variables 2016-04-01 11:59:30 +09:00
Leonard Hall
290e657f61 AP_MotorsMulticopter: update_battery_resistance captures resting voltage while disarmed
Previously it could also capture this when the input throttle was zero
2016-04-01 11:59:30 +09:00
Leonard Hall
bc42cb2a66 AP_MotorsMulticopter: update_battery_resistance uses get_throttle accessor 2016-04-01 11:59:30 +09:00
Leonard Hall
8228d9e72c AP_MotorsMulticopter: current_limit_max_throttle uses get_throttle accessor 2016-04-01 11:59:30 +09:00
Leonard Hall
3cbc15bb5b AP_MotorsMulticopter: add get_throttle_thrust_max accessor 2016-04-01 11:59:30 +09:00
Leonard Hall
d7dc37bda0 AP_MotorsMulticopter: remove apply_thrust_curve_and_volt_scaling_pwm 2016-04-01 11:59:30 +09:00
Leonard Hall
06f25b669d AP_MotorsMulticopter: add roll, pitch, throttle and yaw pass through 2016-04-01 11:59:30 +09:00
Leonard Hall
d7c27c949c AP_MotorsMulticopter: add spool_up_complete accessor function 2016-04-01 11:59:30 +09:00
Leonard Hall
983d2dc97a AP_MotorsMulticopter: update_throttle_filter does not set throttle_in
get_throttle method now used to access filtered throttle
2016-04-01 11:59:30 +09:00
Leonard Hall
3fc3858fbd AP_MotorsMulticopter: set_throttle_range calcs _min_throttle before use 2016-04-01 11:59:30 +09:00
Leonard Hall
b26318c178 AP_MotorsMulticopter: output_logic implements spooling 2016-04-01 11:59:30 +09:00
Leonard Hall
b7fe6aa16e AP_MotorsMulticopter: remove update_max_throttle 2016-04-01 11:59:30 +09:00
Leonard Hall
be64c71065 AP_MotorsMulticopter: add get_current_limit_max_throttle
returns the current limited maximum throttle as a number between 0 ~ 1 in the range throttle_min to throttle_max
2016-04-01 11:59:30 +09:00
Leonard Hall
64ba45a683 AP_MotorsMulticopter: add spin_when_armed_low_end_pct
returns the spin-when-armed value as a number from 0 to 1 in the range 0 to throttle_min
2016-04-01 11:59:30 +09:00
Leonard Hall
49819d822f AP_MotorsMulticopter: add get_hover_throttle_as_high_end_pct
Returns hover throttle as a number from 0 to 1 in the range from throttle_min to throttle_max
2016-04-01 11:59:30 +09:00
Leonard Hall
e625c105a4 AP_MotorsMulticopter: remove get_throttle_warn 2016-04-01 11:59:30 +09:00
Leonard Hall
3854f2eda7 AP_MotorsMulticopter: rename _throttle_thr_mix_desired to _throttle_rpy_mix_desired
No functional change
Also rename _throttle_thr_mix to _throttle_rpy_mix
2016-04-01 11:59:30 +09:00
Leonard Hall
65bbc23a08 AP_MotorsMulticopter: apply_thrust_curve_and_volt_scaling in 0 to 1 range
existing equivalent pwm function becomes apply_thrust_curve_and_volt_scaling_pwm
2016-04-01 11:59:30 +09:00
Leonard Hall
cb39f8aab7 AP_MotorsMuticopter: calc_thrust_to_pwm converts thrust in 0 to 1 range to pwm
pwm output is always between throttle min and throttle max
2016-04-01 11:59:30 +09:00
Leonard Hall
80ddce103f AP_Motors: move set_throttle_filter_cutoff declaration
No functional change
2016-04-01 11:59:30 +09:00
Leonard Hall
649a8c461d AP_Motors: remove unused throttle_radio_min, max
Moved to AP_MotorsMulticopter
2016-04-01 11:59:30 +09:00
Leonard Hall
e84011603c AP_Motors: remove unused throttle_pwm_scalar, rpy_pwm_scalar 2016-04-01 11:59:30 +09:00
Leonard Hall
8e1351e474 AP_Motors: init member to resolve compiler warning 2016-04-01 11:59:30 +09:00
Leonard Hall
ed51c7a28d AP_Motors: replace throttle_control_input with throttle_in
throttle_control_input was 0 to 1000 range, throttle_in is 0 to 1
2016-04-01 11:59:30 +09:00
Leonard Hall
c96b91efb6 AP_Motors: add output_to_motors 2016-04-01 11:59:30 +09:00
Leonard Hall
ac579685df AP_Motors: remove output_armed_not_stabilizing 2016-04-01 11:59:30 +09:00
Leonard Hall
666a92ae2f AP_Motors: set_throttle accepts 0 to 1 range 2016-04-01 11:59:30 +09:00
Leonard Hall
3c74b4cc69 Motors: add get_roll_thrust which returns roll input in range 0 to 1
Also added get_pitch_thrust, get_yaw_thrust
2016-04-01 11:59:30 +09:00
Lucas De Marchi
f304fcf4da AP_InertialSensor: examples: add coding style fixes
Several coding style problems were already fixed by previous commit,
just finish the cleanup on this example:

  - replace tabs with spaces
  - remove unneeded \r
  - remove extra spaces
2016-03-31 14:54:17 -03:00
AndersonRayner
10e7d43007 AP_InertialSensor: Add output of all IMUs to example 2016-03-31 14:54:17 -03:00
Lucas De Marchi
a502c0924c GCS_MAVLink: simplify sanity check 2016-03-30 01:32:45 -03:00
Francisco Ferreira
d3e149e5d7 GCS_MAVLink: ignore Clang out-of-range warning
warning: comparison of constant 4 with expression of type 'mavlink_channel_t' is always false [-Wtautological-constant-out-of-range-compare]
    if (chan >= MAVLINK_COMM_NUM_BUFFERS) {
        ~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~
2016-03-30 01:32:45 -03:00
Marc MERLIN
5bcd1b02ef RSSI channel is not limited to 5-8.
Fix doc per my request on https://github.com/ArduPilot/ardupilot/issues/3280
2016-03-29 08:16:42 -07:00
Tom Pittenger
6718241dad cleanup comments 2016-03-29 05:32:28 -07:00
Andrew Tridgell
894e07a0bd AP_Parachute: added CHUTE_DELAY_MS parameter
on fixed wing it may take quite some time for the propeller to stop
2016-03-29 05:48:40 +11:00
Andrew Tridgell
73a2c99d56 SITL: limit rotational rate to 2000dps 2016-03-26 14:23:05 +11:00
Andrew Tridgell
4d01cb1716 HAL_SITL: fixed SITL engine mul error
expression without get() was treated as int
2016-03-26 14:17:12 +11:00
Andrew Tridgell
b4c6a0e30e AP_TECS: added logging of speed_weight and state flags 2016-03-26 08:41:09 +11:00
Andrew Tridgell
8ff932b61c AP_TECS: allow underspeed to end faster
we now can exit an underspeed condition if we stay above min speed for
3 seconds and also reach 15% above min speed. This prevents a problem
with the thrust line causing downpitch leading to a crash due to too
much throttle
2016-03-26 07:44:22 +11:00
Andrew Tridgell
1ecfa6b487 RC_Channel: fixed example in SITL 2016-03-25 21:35:33 +11:00
Andrew Tridgell
5c92adddf9 HAL_SITL: allow examples to run under SITL 2016-03-25 21:35:16 +11:00
Andrew Tridgell
1e4fe7996e HAL_Linux: update URL 2016-03-25 20:47:53 +11:00
Andrew Tridgell
9737050a23 HAL_FLYMAPLE: update URL 2016-03-25 20:47:44 +11:00
Andrew Tridgell
664d91802e HAL_AVR: update URL 2016-03-25 20:47:35 +11:00
Andrew Tridgell
075dd49afe DataFlash: added Log_Write_Rate()
needed for quadplane as well as copter so should be in common code
2016-03-25 12:13:58 +11:00
Andrew Tridgell
ab07781c66 APM_Control: raise default P and I gains, and set a lower limit on I for pitch
Too many users have very low I gains, which causes a lot of problems for TECS
2016-03-25 09:54:53 +11:00
Lucas De Marchi
46936767c1 AP_Compass: LSM303D: check for overruns in compass values 2016-03-23 17:50:38 -03:00
Lucas De Marchi
cf2d866d51 AP_Compass: LSM303D: used AP_HAL::Device interface
Initialization was also changed a little bit so we don't try to
initialize 25 times. We rather use the same methods as in the
AP_InertialSensor drivers.

Also move up the call to is_zero() in read_raw so we don't set
_mag_[x|y|z] in case of failure.
2016-03-23 17:50:38 -03:00
Lucas De Marchi
5164fbb81b AP_Compass: LSM303D: cleanup driver
Make it similar to other compass drivers, including method names.
2016-03-23 17:50:38 -03:00
Lucas De Marchi
20a4a42cb3 AP_Compass: don't store raw and unfiltered fields
These are not used. The only place where raw fields are used are in the
compass calibrator and we don't need to store them.

Additionally remove duplicated documentation about the meaning of the
functions to avoid them getting out of sync.
2016-03-23 17:50:38 -03:00
Lucas De Marchi
e6059f5197 AP_Compass: rename files to follow other libraries
AP_Compass.h is the main header to be exported and AP_Compass.cpp its
implementation. There's no need for an additional header.
2016-03-23 17:50:38 -03:00
Lucas De Marchi
286697b844 AP_Compass: don't rebuild tree when single driver changes
Let the drivers be internal to the library so we don't need to rebuild
the entire tree when a single driver changes.
2016-03-23 17:50:38 -03:00
Lucas De Marchi
d3831dbb98 AP_Compass: AK8963: use AP_HAL::I2CDevice abstraction
We still need the BusDriver (in some places called SerialBus) interface
since this driver can also be used on an AuxiliaryBus and that has a
different interface.
2016-03-23 17:50:38 -03:00
Lucas De Marchi
41c1209169 AP_Compass: HMC5843: improve readability
- Capitalize and rename constants
 - Make clear what gain is applied in calibration and what is the
   "normal" gain
 - Make the separation between HMC5883L and HMC5843 explicit when it
   makes sense to improve readability
 - Remove spurious delay in calibrate function
2016-03-23 17:50:38 -03:00
Lucas De Marchi
0291ad869b AP_Compass: HMC5843: use AP_HAL::I2CDevice abstraction
We still need the BusDriver (in some places called SerialBus) interface
since this driver can also be used on an AuxiliaryBus and that has a
different interface.

Besides the usual conversion some more improvements:

  - Use generic function to convert endianness
  - Minor cleanups
  - Reorder per-board ifdefs in compass instantiation: distinguish when
    there's a default compass to when it should probe other compasses
2016-03-23 17:50:38 -03:00
Lucas De Marchi
57f8db5672 AP_HAL: sparse-endian: conditionally include byteswap header
This is not present in qurt.
2016-03-23 17:50:38 -03:00
Lucas De Marchi
c5dc54dac7 AP_HAL: utility: import sparse-endian header 2016-03-23 17:50:38 -03:00
Lucas De Marchi
0ed3a93142 AP_HAL: define compass locations for linux boards 2016-03-23 17:50:38 -03:00
ashwinvasudevan
e33812e1cb AP_InertialSensor: added missing brackets 2016-03-23 17:46:41 +09:00
Lucas De Marchi
72b246e52c AP_HAL_Linux: fix use of 0-length array
0-length arrays are supported in C but forbidden in C++. GCC allows it
but clang is more strict:

../../libraries/AP_HAL_Linux/SPIDriver.cpp:75:35: fatal error: no matching constructor for initialization of 'Linux::SPIDeviceDriver [0]'
SPIDeviceDriver SPIDeviceManager::_device[0];
                                  ^
../../libraries/AP_HAL_Linux/SPIDriver.h:20:7: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 0 were provided
class SPIDeviceDriver : public AP_HAL::SPIDeviceDriver {
      ^
../../libraries/AP_HAL_Linux/SPIDriver.h:20:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 0 were provided
../../libraries/AP_HAL_Linux/SPIDriver.h:25:5: note: candidate constructor not viable: requires 9 arguments, but 0 were provided
    SPIDeviceDriver(const char *name, uint16_t bus, uint16_t subdev, enum AP_HAL::SPIDeviceType type, uint8_t mode, uint8_t bitsPerWord, int16_t cs_pin, uint32_t lowspeed, uint32_t highspeed);
    ^
1 error generated.
2016-03-20 00:17:02 -03:00
Andrew Tridgell
da2a71a3de AP_BoardConfig: raise uavcan startup delay to 2s 2016-03-19 21:18:05 +11:00