Commit Graph

1884 Commits

Author SHA1 Message Date
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
Andrew Tridgell
0592bd4e6f Plane: update release notes 2015-09-22 09:46:18 +10:00
Andrew Tridgell
b735999848 Plane: prepare for beta3 2015-09-22 09:43:39 +10:00
Randy Mackay
6da53ae3b2 Plane: replace SKIP_GYRO_CAL with INS_GYR_CAL
Also calibrate gyros with accel cal and set trim
2015-09-21 17:06:43 +09:00
Andrew Tridgell
9e7c38b933 Plane: moved logging of mode to Log_Write_Vehicle_Startup_Messages
this fixes a problem where the initial mode isn't logged on arming
2015-09-17 20:15:26 +10:00
Andrew Tridgell
d019f83bee Plane: allow for higher roll limits on takeoff
only restrict to LEVEL_ROLL_LIMIT below 5m. Above that start to allow
larger roll limits, reaching the full roll limit at 15m
2015-09-17 15:35:37 +10:00
Stewart Loving-Gibbard
2085156a07 Plane: Adding Logging of RSSI data. 2015-09-16 16:41:45 +09:00
Andrew Tridgell
86e8c7ed2f Plane: add some safety to detect bad lidar readings
we only accept a lidar if it changes by 5% of its full range, and we
reject a lidar again if the correction between barometric and lidar
range changes by more than 30m

This allows us to cope with faulty lidars which may give a constant
reading
2015-09-16 14:24:44 +10:00
squilter
7365701d13 Plane: Support do_digicam_x via command_long 2015-09-16 13:06:51 +09:00
Grant Morphett
9a76f0ecf0 Plane: Fixing FS_SHORT_ACTN parameter doco
This is to resolve wiki issue 146
https://github.com/diydrones/ardupilot-wiki-issue-tracker/issues/146
2015-09-16 09:35:38 +09:00
Grant Morphett
6b22a59eff Plane: Fixing up the ARMING_ parameters autogen doco 2015-09-15 14:11:15 +09:00
Andrew Tridgell
d43d070e75 Plane: ensure throttle reverse is obeyed in all states
need to use radio_max for failsafe if reversed
2015-09-14 09:42:20 +10:00
Andrew Tridgell
5c055220f5 Plane: cope with bad values of ARMING_REQUIRE 2015-09-14 09:35:53 +10:00
Andrew Tridgell
73f454133b Plane: log RFND packet for multiple rangefinders 2015-09-13 11:29:53 +10:00
Peter Barker
3c0355e9e2 Plane: ensure 10% free space when initialising logging 2015-09-09 12:22:35 +10:00
Staroselskii Georgii
db94c8d53d Plane: make Plane use milligauss 2015-09-09 10:38:16 +10:00
Grant Morphett
c5c74eebfc Plane: Using the existing function to check for throttle failsafe
No need to duplicate the code if we have an existing function for this
sort of thing.
2015-09-09 10:28:02 +10:00
Grant Morphett
a1b96f659b Plane: Fixing issue 302
Using the configured FS_THR_VALUE to check for failsafe instead of
just checking against 50 below throttle min.
2015-09-09 10:28:02 +10:00