Commit Graph

1901 Commits

Author SHA1 Message Date
Andrew Tridgell 9108179322 Plane: fixed build for SITL changes 2015-11-16 17:57:36 +11:00
Andrew Tridgell 8f4ce7f20b build: removed all nocore.inoflag files
these were APM2 specific
2015-11-16 08:05:17 +11:00
lvale e18181e5c2 Plane: Uniformization of severities
Plane uniformization of severities
2015-11-09 09:38:25 +11:00
Tom Pittenger 5c3486d003 Plane: power-off rangefinder at high alt without terrain avail
- moved terrain alt rangefinder power-off trigger from trerrain thread to rangefinder thread
- allow rangefinder to power-off using baro if terrain data not available
2015-11-09 08:36:41 +11:00
Tom Pittenger 178bbb080b Plane: improve crosstrack error while navigating to loiter point
There is no crosstrack concept in the loiter navigation so when going from waypoint to loiter you will not converge onto the line between those two points. This commit adds crosstracking by performing normal waypoint navigation until you get near it.
2015-11-09 08:25:26 +11:00
Lucas De Marchi e5595ff11c ArduPlane: don't use avr include dir for tags 2015-11-04 12:14:16 +11:00
Lucas De Marchi 0151853c21 ArduPlane: remove check for MAVLINK_COMM_NUM_BUFFERS 2015-11-04 12:14:15 +11:00
Lucas De Marchi c55c07eaf6 ArduPlane: remove check for AVR CPUs
Remove the checks for HAL_CPU_CLASS > HAL_CPU_CLASS_16 and
HAL_CPU_CLASS >= HAL_CPU_CLASS_75. Corresponding dead code will be
removed on separate commits.
2015-11-04 12:14:15 +11:00
Lucas De Marchi d1be74c87e ArduPlane: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1 2015-11-04 12:14:13 +11:00
Lucas De Marchi cfe6e209db ArduPlane: fix wrong printf format for printf
"%S" is used for wide string, but we are passing a char*. Use lowercase
in this case to remove warnings like this:

libraries/AP_InertialSensor/AP_InertialSensor.cpp: In member function
'bool AP_InertialSensor::calibrate_accel(AP_InertialSensor_UserInteract*, float&, float&)':
libraries/AP_InertialSensor/AP_InertialSensor.cpp:620:61: warning:
format '%S' expects argument of type 'wchar_t*', but argument 3 has type 'const char*' [-Wformat=]
                 "Place vehicle %S and press any key.\n", msg);
                                                             ^
2015-10-30 14:35:43 +09:00
Lucas De Marchi d40349d6ae ArduPlane: fix wrong printf format for 32 bits
Heading is a 32 bits value, so use %d.
2015-10-30 14:35:38 +09:00
Lucas De Marchi a6fd94c6fe ArduPlane: fix wrong printf format for 32 bits
"micros() - before" doesn't return a long value. Use "%u".
2015-10-30 14:35:35 +09:00
Lucas De Marchi 5244559010 Minimize AP_Progmem.h includes
Most of AP_Progmem is already gone so we can stop including it in most
of the places. The only places that need it are the ones using
pgm_read_*() APIs.

In some cases the header needed to be added in the .cpp since it was
removed from the .h to reduce scope. In those cases the headers were
also reordered.
2015-10-30 14:35:32 +09:00
Lucas De Marchi 1b07dabeb7 Replace prog_char and prog_char_t with char
prog_char and prog_char_t are now the same as char on supported
platforms. So, just change all places that use them and prefer char
instead.

AVR-specific places were not changed.
2015-10-30 14:35:30 +09:00
Lucas De Marchi 4ab9821624 Replace use of Log_Write_Message_P() with Log_Write_Message() 2015-10-30 14:35:28 +09:00
Lucas De Marchi 20c6ffc5e3 Replace use of UARTDriver::printf_P() with UARTDriver::printf()
This also starts to show warnings on places that were already using
wrong printf format strings.
2015-10-30 14:35:25 +09:00
Lucas De Marchi 6f4904189b Replace use of println_P() with println() 2015-10-30 14:35:22 +09:00
Lucas De Marchi a964ac38ec Replace use of print_P() with print() 2015-10-30 14:35:21 +09:00
Lucas De Marchi 89fc4f4b62 Replace use of send_text_P() with send_text() 2015-10-30 14:35:17 +09:00
Lucas De Marchi 831d8acca5 Remove use of PROGMEM
Now variables don't have to be declared with PROGMEM anymore, so remove
them. This was automated with:

    git grep -l -z PROGMEM | xargs -0 sed -i 's/ PROGMEM / /g'
    git grep -l -z PROGMEM | xargs -0 sed -i 's/PROGMEM//g'

The 2 commands were done so we don't leave behind spurious spaces.

AVR-specific places were not changed.
2015-10-30 14:35:16 +09:00
Lucas De Marchi 6f0db45b57 Replace use of strcasecmp_P() with strcasecmp() 2015-10-30 14:35:08 +09:00
Lucas De Marchi 84da1f5039 Rename gcs_send_text_P to gcs_send_text 2015-10-30 14:35:07 +09:00
Lucas De Marchi 84d5fb006f Remove use of Util::{v,}snprintf_P()
These are now the same function as Util::snprintf().
2015-10-30 14:35:05 +09:00
Lucas De Marchi 2c38e31c93 Remove use of PSTR
The PSTR is already define as a NOP for all supported platforms. It's
only needed for AVR so here we remove all the uses throughout the
codebase.

This was automated with a simple python script so it also converts
places which spans to multiple lines, removing the matching parentheses.

AVR-specific places were not changed.
2015-10-30 14:35:04 +09:00
Lucas De Marchi bd0f0a7536 ArduPlane: convert dos linefeeds to unix 2015-10-30 14:35:02 +09:00
Andrew Tridgell 3c3392aae5 Plane: improve error messages on failed parachute release 2015-10-27 16:06:34 +11:00
Andrew Tridgell 5d1d54a8cb Plane: added CHUTE_CHAN parameter for manual release 2015-10-27 16:06:34 +11:00
Andrew Tridgell d20b86b95e Plane: suppress the throttle in auto-throttle modes after parachute release 2015-10-27 16:06:34 +11:00
Andrew Tridgell 9affddcaa3 Plane: initial support for AP_Parachute library 2015-10-27 16:06:34 +11:00
Andrew Tridgell 3dd47adafe Plane: fixed a condition where takeoff switches to land 2015-10-24 15:15:59 +11:00
Andrew Tridgell 537f22cdd1 Plane: changed thresholds for LAND_APPROACH
use 15% path progress when lined up, and 50% path progress if not
lined up
2015-10-24 15:00:34 +11:00
Tom Pittenger f9fbb8a0f7 Plane: restrict land_approach stage change with tighter criteria
- inhibit switching from FLIGHT_NORMAL to FLIGHT_LAND_APPROACH until we meet stricter criteria other than just that LAND is next waypoint
- requires: nav bearing error < 10deg && have traveled path forward 30% of path && are below top of approach in case we hit waypoint while still descending
- exceptions: traveled path forward > 80% which basically means we're getting close to the flare point and better get into approach mode ASAP
2015-10-24 14:43:43 +11:00
Caio Marcelo de Oliveira Filho 62d4c05a8e ArduPlane: include SITL only for SITL board
Include board-specific files only when the board is used. Since these
should be exceptional cases, let the includer handle the ifdef instead
of putting ifdefs in every platform-specific header.

In the future we should evaluate whether the HAL for the board should
instantiate this.
2015-10-22 13:36:14 -02:00
Caio Marcelo de Oliveira Filho 49a42dc985 SITL: use a SITL namespace 2015-10-22 11:04:42 -02:00
Peter Barker 07842e211d Plane: use simple log entry numbers to download logs 2015-10-21 10:50:32 +11:00
Caio Marcelo de Oliveira Filho db3e501aec ArduPlane: implement HAL::Callbacks
Also removes includes for each board since they are not necessary
anymore.
2015-10-21 09:16:09 +11:00
Caio Marcelo de Oliveira Filho ec52df991c build: compile only the HAL files needed by the board
Instead of requiring every program to specify the HAL related modules,
let the build system do it (in practice everything we compiled depended
on HAL anyway). This allow including only the necessary files in the
compilation.
2015-10-21 09:16:07 +11:00
Caio Marcelo de Oliveira Filho 2e464a53c2 AP_HAL: make code not depend on concrete HAL implementations
The switching between different AP_HAL was happening by giving different
definitions of AP_HAL_BOARD_DRIVER, and the programs would use it to
instantiate.

A program or library code would have to explicitly include (and depend)
on the concrete implementation of the HAL, even when using it only via
interface.

The proposed change move this dependency to be link time. There is a
AP_HAL::get_HAL() function that is used by the client code. Each
implementation of HAL provides its own definition of this function,
returning the appropriate concrete instance.

Since this replaces the job of AP_HAL_BOARD_DRIVER, the definition was
removed.

The static variables for PX4 and VRBRAIN were named differently to avoid
shadowing the extern symbol 'hal'.
2015-10-21 09:16:07 +11:00
Randy Mackay 073828a764 Plane: add ahrs health pre-arm check 2015-10-16 13:50:59 +09:00
Gustavo Jose de Sousa 2cc07d2899 ArduPlane: use compass get_{field,offsets}() functions
Both functions are equivalent, so we're going to simply use
get_{field,offsets}() instead of get_{field,offsets}_milligauss().
2015-10-15 19:56:06 +09:00
Randy Mackay 17ed125e41 Plane: add no break comment to suppress compiler warning 2015-10-03 12:56:30 +09:00
Randy Mackay 32c5b0e63c Plane: support set_home_position message 2015-10-03 12:56:28 +09:00
Randy Mackay d54e28e129 Plane: send home position when home is set or get-home msg received 2015-10-03 12:56:27 +09:00
Andrew Tridgell 213bed99e1 Plane: use ahrs.send_ekf_status_report() 2015-09-29 10:59:19 +10:00
Tom Pittenger 617626f9f5 Plane: log flight_stage
logging plane flight stage in STAT.Stage
2015-09-28 18:18:09 +10:00
Andrew Tridgell 017ebc440b Plane: added SENSOR_RC_RECEIVER reporting in SYS_STATUS 2015-09-28 08:55:24 +10:00
Andrew Tridgell 458e967d06 Plane: added RPM logging
useful for seeing if a petrol motor is still running
2015-09-24 20:58:18 +10:00
Andrew Tridgell c14dbcfc44 Plane: set version to 3.4.1dev 2015-09-24 11:12:41 +10:00
Andrew Tridgell 38d51ddb32 Plane: prepare for 3.4.0 release 2015-09-24 10:08:27 +10:00
Andrew Tridgell 91f990af06 Plane: added EKF2 to parameters as EK2_* 2015-09-23 11:56:37 +10:00