Commit Graph

11313 Commits

Author SHA1 Message Date
dgrat
f8540f1a80 AP_Compass: Do not use is_zero() for non-float types 2016-05-16 19:08:35 -03:00
dgrat
7ff8004f8f AP_Math: Replace is_zero() with a template function
This function only makes sense for floating point types. However this
function was also used for ints.
2016-05-16 19:08:35 -03:00
Tom Pittenger
ebd993dabb AP_Arming: updated z-axis accel threshold comment 2016-05-16 13:46:17 -07:00
Tom Pittenger
9073ac91ff AP_Mission: 2of3 add loiter_xtrack option flag for post-loiter navigation via param4
0 to crosstrack from center of waypoint, 1 to crosstrack from tangent exit location
2016-05-16 11:50:54 -07:00
Tom Pittenger
02eeb2d4f0 AP_Common: 1of3 add loiter_xtrack option flag for post-loiter navigation
0 to crosstrack from center of waypoint, 1 to crosstrack from tangent exit location
2016-05-16 11:50:53 -07:00
Gustavo Jose de Sousa
2246343ec7 AP_HAL_SITL: pass signed value to abs()
Passing an unsigned value to abs() causes compilation error in gcc 6.1.1
(and doing that doesn't make sense too).

As a bonus, this patch fixes the code, since, for two unsigned integers
a and b, such that a > b, (a - b) without the casting to a signed
integer would produce garbage in the context of this patch. The type
int32_t is enough for the cases covered by this patch.
2016-05-16 15:04:22 -03:00
Lucas De Marchi
421b9ef54a AP_Mount do not use flexible array in union
We actually don't want a flexible array in this union, but rather a way
to access it byte by byte. This fixes the build for gcc >= 6

In file included from ../../libraries/AP_GPS/AP_GPS_UBLOX.cpp:23:0:
../../libraries/AP_GPS/AP_GPS_UBLOX.h:387:23: error: flexible array member in union
         uint8_t bytes[];
                       ^
compilation terminated due to -Wfatal-errors.

In file included from ../../libraries/AP_Mount/AP_Mount.cpp:9:0:
../../libraries/AP_Mount/AP_Mount_Alexmos.h:291:23: error: flexible array member in union
         uint8_t bytes[];
                       ^
compilation terminated due to -Wfatal-errors.
2016-05-16 13:50:56 -03:00
Lucas De Marchi
39bd196481 AP_GPS: do not use flexible array in union
We actually don't want a flexible array in this union, but rather a way
to access it byte by byte. This fixes the build for gcc >= 6

In file included from ../../libraries/AP_GPS/AP_GPS.cpp:24:0:
../../libraries/AP_GPS/AP_GPS_ERB.h:93:23: error: flexible array member in union
         uint8_t bytes[];
                       ^
compilation terminated due to -Wfatal-errors.

In file included from ../../libraries/AP_GPS/AP_GPS_ERB.cpp:22:0:
../../libraries/AP_GPS/AP_GPS_ERB.h:93:23: error: flexible array member in union
         uint8_t bytes[];
                       ^
compilation terminated due to -Wfatal-errors.

In file included from ../../libraries/AP_GPS/AP_GPS_MTK.cpp:25:0:
../../libraries/AP_GPS/AP_GPS_MTK.h:75:23: error: flexible array member in union
         uint8_t bytes[];
                       ^
compilation terminated due to -Wfatal-errors.

In file included from ../../libraries/AP_GPS/AP_GPS_MTK19.cpp:26:0:
../../libraries/AP_GPS/AP_GPS_MTK.h:75:23: error: flexible array member in union
         uint8_t bytes[];
                       ^
compilation terminated due to -Wfatal-errors.

In file included from ../../libraries/AP_GPS/AP_GPS_SIRF.cpp:22:0:
../../libraries/AP_GPS/AP_GPS_SIRF.h:101:23: error: flexible array member in union
         uint8_t bytes[];
                       ^
compilation terminated due to -Wfatal-errors.

In file included from ../../libraries/AP_GPS/AP_GPS_UBLOX.cpp:23:0:
../../libraries/AP_GPS/AP_GPS_UBLOX.h:387:23: error: flexible array member in union
         uint8_t bytes[];
                       ^
compilation terminated due to -Wfatal-errors.
2016-05-16 13:50:39 -03:00
Gustavo Jose de Sousa
d615628367 AP_HAL_Linux: I2CDevice: add missing stdio.h include
This was probably being included by another header, but it's not on
gcc >= 6.1 and glibc 2.23.
2016-05-16 13:12:53 -03:00
Peter Barker
8d5ceda534 AP_HAL_SITL: ensure specified SITL model is found
Without this check we get a null pointer exception the first time we attempt
to use the model object
2016-05-16 13:04:15 -03:00
Andrew Tridgell
c6620b03b4 HAL_SITL: added --rtscts option to SITL
useful for radio testing
2016-05-16 16:51:26 +10:00
Rustom Jehangir
39fc17f384 DataFlash: Fix parameter description for param_parse.py 2016-05-16 11:09:31 +10:00
Andrew Tridgell
8571202199 AP_RPM: allow for low RPM measurements on PX4
this automatically adjusts the timer resolution to allow for low RPM
measurements on PX4
2016-05-14 18:05:13 +10:00
Tom Pittenger
38b7d7e1c6 DataFlash: log baro drift offset 2016-05-13 17:22:12 -07:00
Tom Pittenger
f1f58e2026 AP_Baro: created baro drift offset accessor 2016-05-13 17:22:11 -07:00
Tom Pittenger
f1186b8b5c AP_Mission: store previous nav cmd id 2016-05-13 17:22:03 -07:00
Tom Pittenger
d900988a23 DataFlash: Log airspeed.Use 2016-05-13 17:22:02 -07:00
Jonathan Challinger
0281b948df AP_Arming: loosen accelerometer consistency check on Z axis
Original author @jschall via 88f5d9f858
2016-05-13 17:16:12 -07:00
Tom Pittenger
d55050e5e3 AP_Baro: slow down the LPF for slewing to a new GND_ALT_OFFSET
Instead of a couple seconds, make it about 15sec. This makes TECS happy by not glitching the height demand as much. When applied too fast the TECS height demand causes a large single oscillation as it chases the filter lag.
2016-05-13 17:15:53 -07:00
Tom Pittenger
37ee3b44d2 AP_Baro: add accessor for baro drift 2016-05-13 17:15:41 -07:00
Tom Pittenger
2e1eef7cf0 AP_Airspeed: airspeed healthy should also check if enabled 2016-05-13 17:14:55 -07:00
Andrew Tridgell
e3107a7e10 AP_HAL: fixed optflow typos 2016-05-14 08:26:10 +10:00
Andrew Tridgell
1b7830c577 AP_SpdHgtControl: update for changed API 2016-05-14 08:26:10 +10:00
Andrew Tridgell
98a86bd205 AP_TECS: create TEC2 log message for detailed energy internals 2016-05-14 08:26:10 +10:00
Andrew Tridgell
ff97f52555 AP_TECS: removed log_tuning structure 2016-05-14 08:26:10 +10:00
Andrew Tridgell
bc911d15d1 AP_TECS: convert to using Log_Write
preparation for a TEC2 message
2016-05-14 08:26:10 +10:00
Andrew Tridgell
9a6ac77c64 AP_TECS: prevent large glitches in the specific energy integrator
this tries to prevent problems like in issue#4066, or at least
reducing the impact when it happens
2016-05-14 08:26:10 +10:00
Andrew Tridgell
c52451b01b AP_TECS: rename some variables to make them clearer 2016-05-14 08:26:09 +10:00
Andrew Tridgell
e698d1f47e AP_TECS: use 64 bit micros
prevent possible wrap if TECS is not run for a long time
2016-05-14 08:26:09 +10:00
Ricardo de Almeida Gonzaga
64d14356b9 AP_NavEKF2: Fix typos 2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
2f88e32657 AP_HAL_FLYMAPLE: Fix typos 2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
2236640f66 AP_HAL_Linux: Fix typos 2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
267a74ebb2 AP_NavEKF: Fix typos 2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
4047fb63fc AP_GPS: Fix typos 2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
481e3a2af6 AP_Math: Fix typos 2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
00b1915034 AP_HAL_Empty: Fix typos 2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
892cc2ea6f AP_HAL_PX4: Fix typos 2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
1efa4a4115 doc: Fix typos 2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
2bf9aa94ad AP_AHRS: Fix typos 2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
2802775e7d AP_Motors: Fix typos 2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
dfe38b61de AP_Mission: Fix typos 2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
91e9dd10ba AP_HAL_SITL: Fix typos 2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
eb418f54ee AP_HAL: Fix typos 2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
aa4b66509f AP_AccelCal: Fix typos 2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
fcbed13533 AP_Mount: Fix typos 2016-05-13 19:20:06 -03:00
Ricardo de Almeida Gonzaga
af13e2cca4 AP_Declination: Fix typos 2016-05-13 19:20:05 -03:00
Ricardo de Almeida Gonzaga
e6564c2efa AP_BoardConfig: Fix typos 2016-05-13 19:20:05 -03:00
Ricardo de Almeida Gonzaga
2e58653983 AP_Compass: Fix typos 2016-05-13 19:20:05 -03:00
Ricardo de Almeida Gonzaga
5237c86bca AP_BattMonitor: Fix typos 2016-05-13 19:20:05 -03:00
Ricardo de Almeida Gonzaga
d5a2c57c5e AP_InertialSensor: Fix typos 2016-05-13 19:20:05 -03:00