Lucas De Marchi
1727418dc9
AP_HAL_Linux: Perf: make lttng use internal fields
...
Instead of creating a new object Perf_Lttng copying the necessaries
fields, just make a tighter integration with the internal perf counters
and re-use the same fields.
9 years ago
Lucas De Marchi
619ce23799
AP_HAL_Linux: Perf: rework integration with other tools
...
The idea is to leave the internal perf enabled all the time, like it is
in PX4, and then allow the integration with lttng on top. Next step
would be to runtime enable/disable only the perf counters we are
interested in.
This also changes the structure so it's easy to allow another thread to
pull data from the Perf object. A rw lock protects from addition of new
counters and an atomic unsigned int allows other threads to do a
lockless copy of the data.
In order for this to work the allocation was changed to use a single
memory pool instead of returning a calloc'ed data for each perf counter.
Since most of our counters are of ' elapsed' type, don't bother using a
smaller struct for the 'count' type
9 years ago
Lucas De Marchi
b687473174
AP_HAL_Linux: ignore unused result on panic
...
There's not much we can do if the write() call inside a panic function
failed. Just ignore the failure.
9 years ago
Lucas De Marchi
8a58c06adb
AP_Common: add macro to ignore unused result
...
In some cases we want to call functions annotated with
warn_unused_result but we know it's safe to ignore the return value.
Prefixing with (void) used to work, but it doesn't do anymore on all
versions of gcc and clang.
See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425
This solution is a mix of the solutions provided in the above bug report
and the one provided by Gustavo Sousa at
https://github.com/ArduPilot/ardupilot/pull/4277#issuecomment-224957375
9 years ago
Francisco Ferreira
ac90527da5
AP_Common: change check from GCC version to glibc version (and Cygwin)
9 years ago
Patrick J.P
eb44d75ed8
AP_HAL: Remove trailing spaces from AP_HAL_Namespace.h
9 years ago
Randy Mackay
a427768087
AC_Avoidance: reduce maximum acceleration to 1m/s/s
...
This makes the vehicle slow very gently as it approaches the edge of the fence
9 years ago
Daniel Ricketts
8a6aa24525
AC_WPNav: use AC_Avoidance to stop at fence during Loiter
9 years ago
Daniel Ricketts
ff7bc7c0cb
AC_Avoidance: add library to stop at circular fence
9 years ago
Daniel Ricketts
e60710332b
AC_Fence: add accessors to return radius and safety margin
9 years ago
Andrew Tridgell
d1b28aaed9
AC_AttitudeControl: fixed factor of 1000 error in init_takeoff
9 years ago
Lucas De Marchi
39d4fa2cf8
Revert changes to cmath according to gcc version
...
Revert these commits:
"AP_Common: gcc 4.9.2 behaves differently from 4.9.3"
"AP_Common: this workaround for missing/cmath is also needed for gcc 4.9.3"
This breaks the build for PX4. The change is related to the libc, not
the compiler version. We have an workaround there based on compiler
version just because it's usual to have a more recent libc version when
you have a recent compiler.
9 years ago
Lucas De Marchi
9738be0ed6
AP_HAL: remove tabs and trailing whitespaces
9 years ago
Lucas De Marchi
ab66e3a69a
AP_HAL_Linux: Perf: simplify function to get current time
9 years ago
Pierre Kancir
a8e5ff93b5
AP_Math: Correct missing declaration warning
9 years ago
Lucas De Marchi
1d9d0a40db
AP_HAL_Linux: GPIO: reduce macro and variable scopes
...
Also change the coding style in a few places.
9 years ago
Lucas De Marchi
4f14b9b7e2
AP_HAL_Linux: ToneAlarm_Raspilot: add fixme comment
9 years ago
Lucas De Marchi
e122b2b651
AP_HAL: GPIO: remove unused functions
...
These functions are not used by any HAL, so remove them.
9 years ago
Lucas De Marchi
0bb86ae498
AP_HAL_Linux: GPIO_RPI: remove unused functions
...
These functions to use pins as pwm are never used in the codebase, so
remove them.
9 years ago
Andrew Tridgell
2108127712
AP_Common: gcc 4.9.2 behaves differently from 4.9.3
...
tested 4.9.3 on cygwin, 4.9.2 on ubuntu
I do hope that it doesn't depend on the OS
9 years ago
Andrew Tridgell
224c714c83
AP_Common: this workaround for missing/cmath is also needed for gcc 4.9.3
...
tested on cygwin with 4.9.3
9 years ago
Peter Barker
309ac53806
SITL: correct adsb initialisation
...
Parameters have not yet been initialised in _sitl_setup, so move
should-run checks into update
9 years ago
Andrew Tridgell
569443231a
SITL: improved altitude data in XPlane
9 years ago
Andrew Tridgell
51fff00871
SITL: report data and frame rates in XPlane
...
and avoid time going backwards if possible
9 years ago
Andrew Tridgell
b7395ee74b
SITL: fixed sign of magnetic inclination
9 years ago
Andrew Tridgell
5b7b799046
SITL: fixed mag field in JSBSim and last_letter
9 years ago
Leonard Hall
ba2382c409
AP_MotorsCoax: Fix servo 3 and 4 feed through sign
9 years ago
Andrew Tridgell
16595d2f3b
SITL: auto-set AHRS_EKF_TYPE to 10 for XPlane and FlightAxis
9 years ago
Tom Pittenger
746e2211e9
AP_ADSB: remove extra include
9 years ago
Tom Pittenger
4fe94bdea3
GCS_MAVLink: add ADSB_streamrate
9 years ago
Tom Pittenger
4cd1721bf9
AP_ADSB: add ADSB_streamrate
9 years ago
Tom Pittenger
3a38e29b39
GCS_MAVLink: do not auto-forward ADSB_VEHICLE packets
9 years ago
Andrew Tridgell
2db2486b3a
AP_AHRS: send zero EKF_STATUS_REPORT with EKF type 10
9 years ago
Andrew Tridgell
2f88c24f49
SITL: added debug showing UDP ports for XPlane
9 years ago
Andrew Tridgell
ec5534bd6a
SITL: explain the throttle_magic code for XPlane
9 years ago
Andrew Tridgell
f76a7e64ca
SITL: auto-select correct data fields from X-Plane10
9 years ago
Andrew Tridgell
acc76f80b0
HAL_SITL: added xplane support
9 years ago
Andrew Tridgell
4f99c17aae
SITL: added X-Plane 10 SITL backend
9 years ago
Andrew Tridgell
7a9b4c7572
AP_Motors: fixed motor load calculation
...
scale to 1.0 for max collective
9 years ago
Paul Riseborough
55b0bbd3f1
SITL: Add simulation of 3D earth magnetic field
...
Use an independant method to the flight code using tables that that can updated.
Data taken from NOAA online calculator using WMM data at 2016-6-16 date
9 years ago
Paul Riseborough
2cf5493b40
AP_HAL_SITL: Ensure simulated magnetic field is always used
9 years ago
Paul Riseborough
078284e2e2
SITL: Add magnetic field environment to simulation
...
Includes parameters enabling a ground level magnetic anomaly to be modelled.
TODO - add automatic setting of declination, inclination and field strength using WGS-84 position.
9 years ago
Randy Mackay
ec7c1ab0b0
AC_PosControl: comment fix to set_alt_max method
...
No functional change
9 years ago
Randy Mackay
e185bab775
AP_MotorsMulticopter: add HOVER_LEARN option to learn but not save
9 years ago
Randy Mackay
23f8227e36
AP_Motors: bug fix to save params on disarm
...
Previously was saving during arming as well as disarming.
Thanks to OXINARF for finding this!
9 years ago
Randy Mackay
a2ffd9ec7d
AP_MotorsMulticopter: fix comment for get_throttle_limit function
9 years ago
Leonard Hall
dcbb071c07
AC_PosControl: Move hover throttle calculation to AP_Motors
9 years ago
Randy Mackay
b27da7699e
AC_AttitudeControlMulti: get_throttle_avg_max made private
...
Also fixed up method's description
9 years ago
Randy Mackay
da946288a2
AC_AttitudeControl: rename throttle_ave_max to throttle_avg_max
9 years ago
Randy Mackay
570920c7d7
AC_AttitudeControlMulti: run control_monitor_update in rate_controller_run
9 years ago