Commit Graph

460 Commits

Author SHA1 Message Date
Lucas De Marchi 2b5417046b AP_GPS: remove unused AP_ADC_AnalogSource 2015-12-03 13:32:43 +11:00
Peter Barker 0f9e7a905d AP_GPS: remove use of AddLogFormats 2015-12-03 13:21:52 +11:00
Michael du Breuil 2f97f9f416 AP_GPS: Fix incorrect values docstring on RAW_DATA 2015-12-03 10:17:22 +09:00
Caio Marcelo de Oliveira Filho 6e7b73610d waf: add waf support 2015-12-03 07:54:30 +11:00
Lucas De Marchi 2591261af6 Global: rename min and max macros to uppercase
The problem with using min() and max() is that they conflict with some
C++ headers. Name the macros in uppercase instead. We may go case by
case later converting them to be typesafe.

Changes generated with:

	git ls-files '*.cpp' '*.h' -z | xargs -0 sed -i 's/\([^_[:alnum:]]\)max(/\1MAX(/g'
	git ls-files '*.cpp' '*.h' -z | xargs -0 sed -i 's/\([^_[:alnum:]]\)min(/\1MIN(/g'
2015-12-01 16:28:09 -02:00
Caio Marcelo de Oliveira Filho c33b86a783 AP_GPS: use millis/micros/panic functions 2015-11-20 12:30:48 +09:00
Randy Mackay 36c0beb918 GPS_UBlox: reorder init to resolve compiler warning
Also removed duplicate init of noReceivedHdop
2015-11-16 15:09:17 +09:00
Andrew Tridgell 8f4ce7f20b build: removed all nocore.inoflag files
these were APM2 specific
2015-11-16 08:05:17 +11:00
Michael Oborne 2f49fa1531 AP_GPS_GSOF: add second comport to base config 2015-11-15 14:56:49 +08:00
Siddharth Bharat Purohit 5e2382ea09 AP_GPS:UBLOX: send save cfg msg once per 5s and 5 times only 2015-11-10 15:16:55 +11:00
Siddharth Bharat Purohit 360c09f9bd AP_GPS_UBLOX: send cfg save msg only once every 1 second 2015-11-10 15:16:55 +11:00
Jonathan Challinger bc708f9808 AP_GPS: add SAVE_CFG parameter make ublox config saving optional 2015-11-10 15:16:55 +11:00
Jonathan Challinger e82df48631 AP_GPS: save configuration to non-volatile memory in UBlox GPS 2015-11-10 15:16:55 +11:00
Lucas De Marchi 1a9b57da1f AP_GPS: remove check for GPS_SKIP_SIRF_NMEA 2015-11-04 12:14:15 +11:00
Lucas De Marchi e31595c60c AP_GPS: remove check for GPS_RTK_AVAILABLE 2015-11-04 12:14:15 +11:00
Lucas De Marchi c75c1d84d9 AP_GPS: remove check for GPS_MAX_INSTANCES
All supported boards may have more than 1 GPS instance.
2015-11-04 12:14:15 +11:00
Lucas De Marchi 4cef751aef AP_GPS: 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:14 +11:00
Lucas De Marchi 24e5deb906 AP_GPS: remove comments about AVR boards 2015-11-04 12:14:11 +11: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 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 a964ac38ec Replace use of print_P() with print() 2015-10-30 14:35:21 +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 aa370fe758 Replace use of strcmp_P() with strcmp() 2015-10-30 14:35:09 +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
Caio Marcelo de Oliveira Filho db1491f079 AP_GPS: remove unnecessary board includes from examples 2015-10-21 09:16:11 +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
Caio Marcelo de Oliveira Filho b5abab9d37 AP_GPS_GSOF: minor tweak to avoid warning
Fixes the issue of three unused variables, two of which were used in a
commented Debug() call.

To keep the convenient debug message (and the variable names for the
data bytes), this patch uncomment the debug call but wrap the variables
and the debug call around an ifdef for the local symbol
gsof_DEBUGGING. So by turning it on, the debug will already be in place.

The Debug() call was modified to actually compile and include the third
variable in the output.
2015-10-10 14:34:54 +09:00
Michael Oborne 8ec9ab6ad3 AP_GPS: add SBF and GSOF to gps documentation 2015-10-06 15:00:46 +11:00
Michael Oborne 0fceb76493 AP_GPS_GSOF: add trimble gsof driver 2015-10-06 15:00:46 +11:00
Michael du Breuil 75c0644b9a AP_GPS: Use state.instance instead of trying to track instance numbers inside of the ublox driver 2015-09-23 20:42:42 -07:00
Andy Piper 5adb6d2b89 AP_GPS: Support UBX messages for dual UBLOX GPS setups.
Add extra DOP information to UBX precision messages.
2015-09-23 20:41:50 -07:00
Andrew Tridgell 6fbe88ba3a AP_GPS: improved fake ublox to give enough for EKF health 2015-09-14 11:36:15 +10:00
Andrew Tridgell e87139eb32 AP_GPS: fixed a build warning 2015-09-14 11:36:10 +10:00
Andrew Tridgell d07d2f3a46 AP_GPS: removed UBX3 message
replaced by GPA and GPA2 messages
2015-09-09 15:01:45 +10:00
Randy Mackay f1322252ae GPS: fix GNSS_MODE param descriptions
Thanks to Michael DuBreuil for noticing the problem and providing the correction
2015-09-09 13:40:32 +09:00
Michael Oborne 88cf710f94 AP_GPS_SBF: add accuracy estimates 2015-09-09 12:28:25 +10:00
Michael du Breuil 9f02834f6d AP_GPS: Broadcast vDOP data over mavlink 2015-09-09 11:38:12 +10:00
Michael du Breuil 0e3a188f6f AP_GPS: Read the vdop information from a ublox GPS 2015-09-09 11:38:12 +10:00
Michael Oborne 993904f01c AP_GPS_SBF: add init string and increase union size 2015-09-07 12:11:47 +10:00
Michael Oborne cce46cf0c5 AP_GPS_SBF: add support for Septentrio gps 2015-09-03 19:43:31 +10:00
Randy Mackay 6701d53d49 GPS: add GNSS_MODE parameter bitmask 2015-09-01 12:19:59 +09:00
Andrew Tridgell 2c7a113790 AP_GPS: ensure all GPS drivers give headings as 0..360 degrees
this prevents inconsistency between interfaces, and fixes a MAVLink
reporting bug with UAVCAN GPS
2015-08-31 08:24:35 +10:00
Randy Mackay 9ef6abf613 AP_GPS: config file for Ublox M8N
This is not directly used by the driver but this directory is where we place the recommended GPS config files
2015-08-27 09:54:22 +09:00
Tom Pittenger 816d1f0e1b AP_GPS: resolve compiler warning re init order 2015-08-25 13:51:33 +09:00
Andrew Tridgell 31f20db139 AP_GPS: provide hdop and speed accuracy with UAVCAN GPS 2015-08-23 09:49:52 +10:00
Lucas De Marchi 55beb6bc0f AP_GPS: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:51 +10:00
Michael du Breuil 4f9fbc5aa7 AP_GPS: Fix a bound error when calculating GNSS minimum channels.
This is really just calculating the hamming weight of the GNSS_MODE bitmask, but I don't know if the APM compiler could handle the GCC intrinsic that could calculate it faster, and this is done so rarely there isn't a significant penalty to using the for loop.
2015-08-13 15:15:20 +10:00
Gustavo Jose de Sousa 67db430583 AP_GPS: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:28:43 +10:00