Commit Graph

15062 Commits

Author SHA1 Message Date
Andrew Tridgell
6358081b18 AP_Motors: apply tailsitter min spin to both motors 2017-11-04 11:41:40 +11:00
Michael du Breuil
338d745de1 AP_Landing: Implement is_on_approach for deepstall
(Fixes a disarm in flight)
2017-11-04 10:07:16 +11:00
Andrew Tridgell
878d2e2563 AP_Motors: fixed tailsitter use of SPIN_MIN 2017-11-04 09:29:08 +11:00
alexshirley
8058fdf093 AP_HAL_Linux: combine ppm and sbus on ocpoc_zynq
Removes compile-time selection of RCInput driver for ocpoc_zynq.
PPM and SBUS input are now colocated on the ocpoc board, and it
only needs to run RCInput_ZYNQ. Pulse input is also inverted
to accommodate SBUS input, which has no effect on PPM input.
2017-11-01 10:28:40 -07:00
alexshirley
065b00eb81 AP_HAL: Remove SBUS macro from ocpoc target 2017-11-01 10:28:40 -07:00
Randy Mackay
002d3f08f6 AP_L1_Control: update_waypoint zeros xtrack i term on init 2017-11-01 16:46:40 +09:00
Andrew Tridgell
eab1d3af4f AP_InertialSensor: don't apply offsets in SITL backend
the offsets are applied in the rotate and correct methods
2017-11-01 17:09:21 +11:00
bnsgeyer
37ea64513d AP_Motors: TradHeli - fixed servo test function 2017-11-01 14:01:48 +09:00
Paulo Neves
4108f22304 AP_Beacon: Corrected possible use of nullptr memory.
The check for UART port pointer is not sufficient
to know if the update() was possible or not. When
MarvelmindHedge construction failed, the hedge pointer
might be a nullptr and there are no checks to avoid
nullptr dereference.

The MarvelmindHedge structure had complex initialization
but was done in a C style, with intermixed initialization functions.
malloc() was changed to cleaner new operator. Given that the
file already contained new operator calls it didn't make
sense to have a mix. The files are cpp so C++ operators
are used.
2017-11-01 10:49:10 +09:00
Patrick José Pereira
73a76455d2 AP_BattMonitor: Solve typo in BATT2 description
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2017-10-31 09:32:03 +09:00
Lucas De Marchi
cbb9dcc2a1 AP_HAL_Linux: Storage: use define from HAL for directory 2017-10-30 16:57:37 -07:00
Lucas De Marchi
7fd10921c3 AP_HAL: Linux: add define for storage dir
This mantains compatibility with what the boards were already using,
except for Aero and Minlure in which I'm changing it already as this is
desired.
2017-10-30 16:57:37 -07:00
Lucas De Marchi
3272ae2c04 DataFlash: make log directory macro mandatory
Everybody defines the macro (or should be defining). Let smaller users
that don't have a filesystem to rather protect it with HAL_OS_POSIX_IO,
which also allow them to save more flash space.
2017-10-30 16:57:37 -07:00
Lucas De Marchi
591b846e2d AP_HAL: switch aero and minlure to new log/terrain directory
Additionally make Edge use the default.
2017-10-30 16:57:37 -07:00
Lucas De Marchi
d2ba8409d0 AP_HAL: provide default directory for Linux boards
/var/lib/<project> is more in line to where projects save their data.
Also, remove APM from dir name as it should had been done some time
ago.

This is only the default (and recommended for any new board). Existing
boards that want to adopt the default can remove their defines.
2017-10-30 16:57:37 -07:00
priseborough
c96bc54254 AP_NavEKF3: correctly use wheel odometry speed for pitched rovers 2017-10-31 08:11:05 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
68828511cd AP_GPS: Only send GPS*_RTK mavlink messages if the backend supports them 2017-10-30 18:28:20 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
e0c2a45eec AP_GPS: support GPS_RTK and GPS2_RTK messages in Emlid reach modules. Requires Reach FW >= 2.7.4 2017-10-30 18:28:20 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
c0dd7984ad AP_GPS: Publish information on the GPS*_RTK mavlink messages 2017-10-30 18:28:20 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
bf6778277e AP_GPS: implement GPS*_RTK mavlink messages 2017-10-30 18:28:20 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
91b6404b13 GCS_MAVLink: Replace hardcoded duplicated end_mavlink_gps*_rtk() function with a flexible one 2017-10-30 18:28:20 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
430b863f42 AP_GPS: Replace hardcoded duplicated end_mavlink_gps*_rtk() function with a flexible one 2017-10-30 18:28:20 +00:00
John deVere
951c947bec AP_Arming: update param description for VOLT_MIN 2017-10-30 09:46:51 +09:00
Andrew Tridgell
fd86b2bbb9 DataFlash: log critical messages while disarmed
this logs critical messages while disarmed if we have logged any
messages while armed. This fixes issue #7010 where log files show the
incorrect mode if the log includes any portions where the user
disarmed. It makes analysing users logs very difficult. It also
affects parameters, so we don't always know the true parameter values
in logs from users.
2017-10-29 19:20:57 +11:00
Michael du Breuil
9b7c3ce9a7 GCS_Mavlink: Fix out of bounds access, CID 144337 2017-10-28 03:30:46 +01:00
priseborough
ee6b43aabf AP_NavEKF3: Fix bugs in use of wheel encoder data
Found by pavloblindnology
2017-10-28 10:58:01 +09:00
bnsgeyer
e8173f27df AC_AttitudeControl: reset target attitude
added method to reset current vehicle attitude to support swash
behaviors in Trad Heli
2017-10-28 12:31:06 +11:00
dheideman
2fab8e9fe1 AP_JSButton: Add joystick button functions for relays 3 & 4 2017-10-27 12:14:41 -04:00
Florent Martel
fee79afb8e AP_Frsky_Telem: add second battery info 2017-10-27 02:00:29 -07:00
Florent Martel
5d9299d72f AP_Frsky_Telem: add second battery capacity parameter 2017-10-27 02:00:29 -07:00
Peter Barker
191e457230 DataFlash: include sample count in ISBH 2017-10-27 16:33:45 +11:00
Peter Barker
b997f445ff AP_InertialSensor: include sample count in ISBH 2017-10-27 16:33:45 +11:00
Peter Barker
9566abb3a8 AP_InertialSensor: add IMU batch sampling 2017-10-27 16:33:45 +11:00
Peter Barker
5096e2fca9 AP_InertialSensor: use df singleton, factor out log_{gyro,accel}_raw 2017-10-27 16:33:45 +11:00
Peter Barker
1ca76173a5 AP_Math: set radians(...) and degrees(...) as constexpr 2017-10-27 16:33:45 +11:00
Peter Barker
d950e78079 DataFlash: Log_ISBH and Log_ISBD, to log batches of IMU data 2017-10-27 16:33:45 +11:00
Peter Barker
2f9a8ded55 DataFlash: add new int16_t[32] type, designator 'a' 2017-10-27 16:33:45 +11:00
Randy Mackay
2614d2112a AP_Winch: remove redundant member
Also use get_rate_max method instead of config.rate_max member
2017-10-27 09:20:38 +09:00
Randy Mackay
2dfb6a94f2 AP_Winch: library to control winch
fixes after peer review:
renamed disable to relaxed
make parameters private
default type to 1
enabled method checks backend created
servo range initialised in init method
contrain rate-desired during position control
use set-output-limit instead of set-safety-limit
release_length accepts rate
2017-10-27 09:20:38 +09:00
Randy Mackay
8b4345f29d AP_Mission: add winch support 2017-10-27 09:20:38 +09:00
Randy Mackay
07e2853b8e SRV_Channel: function definition for winch 2017-10-27 09:20:38 +09:00
Randy Mackay
ce73d724c8 AR_AttitudeControl: rate-control for skid-steering uses I term even at low speeds 2017-10-26 19:45:04 +09:00
Randy Mackay
ee3daaa7c9 AR_AttitudeControl: reset input filter for steering and throttle controllers
Also only set dt to non-zero value
2017-10-26 19:44:54 +09:00
Randy Mackay
91d489d91e AC_PID: implement reset_filter 2017-10-26 19:44:47 +09:00
Randy Mackay
2986d3eb7d AR_AttitudeControl: fix braking
this fix ensures the output throttle is never in the opposite direction from the desired-speed
there is a possibility that this could lead to rougher throttle response when the vehicle is transitioning from forward to backwards motion because the throttle response will immediately go to zero when the desired speed cross over zero
2017-10-26 19:44:38 +09:00
Randy Mackay
49cbbf4d76 AR_AttitudeControl: minor comment fix 2017-10-26 19:44:32 +09:00
Randy Mackay
8daa8cba1f AR_AttitudeControl: record desired turn rate and speed for logging 2017-10-26 19:44:26 +09:00
Michael du Breuil
0cee2f2896 AP_BattMonitor: Require all backends to provide init 2017-10-26 20:10:08 +11:00
Andrew Tridgell
3402d07651 HAL_PX4: fixed a race condition on i2c init
we could call init on two devices with the same name, which caused
init_ok to be false. This could cause the SMBus battery to fail to
initialise

Thanks to Michael duBreuil for finding this!
2017-10-26 18:21:56 +11:00
Peter Barker
62f7acff52 SITL: reduce max accel of simulated rover 2017-10-26 14:45:19 +11:00
Andrew Tridgell
e340fac2e0 AP_Motors: avoid float exception for small expo
very small values of the thrust expo cause a floating point
exception. As zero is a documented value meaning linear we need to
handle this.
2017-10-25 21:15:58 +11:00
Jacob Walser
d5896287b7 AP_Param: Add set_by_name and set_and_save_by_name helpers 2017-10-25 21:07:09 +11:00
hiro2233
7d304073ed SITL: fixed include case sensitive
On case sensitive cygwin feature enabled, this build ok.
2017-10-25 20:59:55 +11:00
Andrew Tridgell
381e2fd69a SRV_Channel: added get_motor_function()
for correct handling of motors 8 and above
2017-10-25 11:39:11 +11:00
Andrew Tridgell
45d6f3bf75 AP_Motors: fixed motor channel handling 2017-10-25 11:39:11 +11:00
Patrick José Pereira
9693da751e AP_common: Add stdio.h when using SITL_printf
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2017-10-24 22:55:56 +01:00
Dr.-Ing. Amilcar Do Carmo Lucas
c7c2c4ff2c AC_AttitudeControl: use floating-point multiplication instead of a more expensive floating-point division 2017-10-23 09:20:17 -07:00
Andrew Tridgell
fc237ee9a0 AP_Motors: merge fixed from rebase 2017-10-22 15:52:50 +11:00
Andrew Tridgell
efea83e424 AP_Motors: fixed MotorsMatrix set_update_rate() 2017-10-22 15:52:50 +11:00
Andrew Tridgell
0682d30ebd SRV_Channel: ensure channel_mask is setup 2017-10-22 15:52:50 +11:00
Andrew Tridgell
1e62b5d5c7 AP_Motors: many to one mapping of motors
this allows multiple outputs for one motor number
2017-10-22 15:52:50 +11:00
Andrew Tridgell
39fd25bb36 SRV_Channel: added get_output_channel_mask()
will be used by AP_Motors
2017-10-22 15:52:50 +11:00
Andrew Tridgell
03e1f6967f AP_Motors: removed enable() API
all output channels are already enabled by SRC_Channels::enable_aux_servos()
2017-10-22 15:52:50 +11:00
Andrew Tridgell
ed272833c3 SRV_Channel: don't treat k_motorN specially 2017-10-22 15:52:50 +11:00
Michael du Breuil
b0e18de576 AP_GPS: Remove detect helpers for MTK/SIRF when minimizing the build
Removes 16 bytes
2017-10-22 03:03:29 +01:00
Andrew Tridgell
5bd92b4b7e AP_TECS: improved support for VTOL transitions 2017-10-21 18:50:01 +11:00
Andrew Tridgell
c5cd1b873c SITL: use thread for FlightAxis comms
this allows us to run SITL at a much higher framerate than RF can
provide, and results in the EKF being much happier
2017-10-21 11:57:59 +11:00
Andrew Tridgell
7def86ae96 HAL_SITL: don't run IO at more than 100Hz
save some CPU for faster frame rates
2017-10-21 11:57:05 +11:00
Georgii Staroselskii
8a28556ae1 AP_Notify: use RCOutputRGBLedInverted for Edge 2017-10-20 13:03:08 -07:00
Georgii Staroselskii
03ac8621bf AP_BattMonitor: add Edge PM preset 2017-10-20 13:03:08 -07:00
Georgii Staroselskii
4e2028c32f AP_HAL: Edge: enable Heat PWM 2017-10-20 13:03:08 -07:00
Georgii Staroselskii
79c14a92a9 AP_HAL_Linux: adapt Heat_Pwm for Edge 2017-10-20 13:03:08 -07:00
Alexey Bulatov
069c98b8a9 AP_InertialSensor: Edge: add sensor's rotation YAW_90 2017-10-20 13:03:08 -07:00
Georgii Staroselskii
710594eee3 AP_Compass: enable compass on Edge 2017-10-20 13:03:08 -07:00
Georgii Staroselskii
db9f427617 AP_HAL: Edge: add compass settings
Use HMC5883L as default before UAVCAN Linux support is in place
2017-10-20 13:03:08 -07:00
Georgii Staroselskii
ac6f7511bd AP_InertialSensor: examples: print temperature 2017-10-20 13:03:08 -07:00
Georgii Staroselskii
4f2d8f8df4 AP_InertialSensor: use ICM backend for Edge 2017-10-20 13:03:08 -07:00
Georgii Staroselskii
4e6fab228c AP_HAL_Linux: add SPI devices for Edge 2017-10-20 13:03:08 -07:00
Staroselskii Georgii
3ade179700 AP_HAL_Linux: make use of RCInput_Navio2 in Edge 2017-10-20 13:03:08 -07:00
Staroselskii Georgii
2a99bb0c95 AP_HAL: use Raspberry Pi GPIO and Util classes for Edge
As it's a yet another Raspberry Pi based board, we may reuse the code.
2017-10-20 13:03:08 -07:00
Staroselskii Georgii
2a7e8d66ee AP_HAL_Linux: add Edge support
Just some usual boilerplate code.
2017-10-20 13:03:08 -07:00
Georgii Staroselskii
2dd68243a2 AP_HAL: add Edge support 2017-10-20 13:03:08 -07:00
Georgii Staroselskii
ef3cad7833 AP_Notify: add RCOutputRGBLedInverted
Some RGB leds controlled with an inverted logic. This class addresses
this.
2017-10-19 15:09:49 -07:00
Peter Barker
bb2573f945 GCS_MAVLink: send mission item requests to correct destination
The correct destination is the GCS which last set the mission count,
not the last GCS that requested it!
2017-10-19 20:52:24 +11:00
Michael du Breuil
2b4cf54797 AP_Landing: Deepstall: Small style fixes 2017-10-17 14:37:11 -07:00
Michael du Breuil
d166832de4 AP_Landing: Deepstall implement log(), reset all integrators 2017-10-17 14:37:11 -07:00
Michael du Breuil
2909f77235 DataFlash: Remove PIDL and a DSTL for a deepstall specific message 2017-10-17 14:37:11 -07:00
Michael du Breuil
f8ac4efb1d PID: Add a full reset method 2017-10-17 14:37:11 -07:00
Michael du Breuil
df8049778e AP_Landing: Support CCW deepstall 2017-10-17 14:37:11 -07:00
Michael du Breuil
a0a16b8369 AP_Mission: Load yaw heading for landing commands 2017-10-17 14:37:11 -07:00
Michael du Breuil
0007e5eb80 AP_Landing: Support scaling aileron controls 2017-10-17 14:37:11 -07:00
Georgii Staroselskii
d214a36e0a AP_HAL_Linux: reset duty cycle before setting period
On kernels 4.7+ duty_cycle should always be less than period.
Otherways, we'll get a EINVAL.

It makes sense to set duty_cycle to 0, as
duty_cycle doesn't really make sense without a proper period.

A proper way to handle these errors might be to call pwm_adjust_config
in every pwmchip backend but it's unrealistic to hope that all vendors
will do it quickly.
2017-10-17 13:28:34 -07:00
Michael du Breuil
dbf67aa38a AP_Mission: Remove duplicated code associated with copy the waypoint location 2017-10-16 10:02:33 -07:00
Peter Barker
6536bf39b3 DataFlash: add DataFlash_AllTypes sample output 2017-10-10 16:51:19 +11:00
Peter Barker
466d6e619e DataFlash: correct nanf log output 2017-10-10 16:51:19 +11:00
Andrew Tridgell
c8b6be6736 AP_Motors: fixed scaling of servo outputs
thanks to bnsgeyer for noicing this in issue #6977

this will break existing dual-heli setups, but there are so few people
flying them so far that I think it is a worthwhile change
2017-10-10 11:02:34 +11:00
Tom Pittenger
39dc608bea AP_L1: update constraint Nu comment to match sourcecode
fixes https://github.com/ArduPilot/ardupilot/issues/7054
2017-10-09 17:01:37 -07:00
Andrew Tridgell
74265f523a SITL: support -roll180 option to frames 2017-10-10 10:57:38 +11:00
Andrew Tridgell
6a6f9681ab AP_InertialSensor: allow for 1,1,1 accel scaling
this supports simple accel calibration
2017-10-10 10:57:38 +11:00
Andrew Tridgell
f513c1c8dd AP_InertialSensor: support rotated IMUs in SITL 2017-10-10 10:57:38 +11:00