Commit Graph

36 Commits

Author SHA1 Message Date
Andrew Tridgell edfebc1f29 AP_GPS: fixed indent-tabs-mode 2013-05-30 09:52:21 +10:00
Andrew Tridgell b3ec5187f2 AP_GPS: fixed uninitialied variable bugs found with valgrind 2013-04-17 23:02:13 +10:00
Andrew Tridgell 551950c573 GPS_UBLOX: fixed auto-config of baudrate
this fixes the setting of the baudrate on a uBlox that is configured
for 9600. It fixes the NMEA message to have a \r\n, plus sends the
NAV_SOL rate config before the NMEA baudrate config message.

This fixes issue #159
2013-03-17 17:52:48 +11:00
Andrew Tridgell f67480fa50 AP_GPS: ensure constructors zero all key variables
this prevents a crash on PX4 if a GPS is attached after startup
2013-02-20 11:33:39 +11:00
Craig@3DR f778961acf Added support for Mediatek firmware Rev 1.9 2013-01-02 09:16:47 +11:00
Andrew Tridgell 4a6b46c661 AP_GPS: fixed multiple GPS detection bug 2012-12-20 14:53:24 +11:00
Andrew Tridgell 18db7b2efd GPS: move _port setting to init()
this is needed to avoid constructor ordering dependencies
2012-12-20 14:52:32 +11:00
Andrew Tridgell 13309cceb3 AP_GPS: reverted formatting of GPS messages 2012-12-20 14:51:37 +11:00
Pat Hickey 2be552ea22 AP_GPS: less chatty autodetect 2012-12-20 14:51:35 +11:00
Pat Hickey 9ed023aeb4 AP_GPS: Builds under AP_HAL. Not tested. 2012-12-20 14:51:25 +11:00
Andrew Tridgell 72e97c6dfc AP_GPS: start detection timer on first bytes
this prevents a uBlox plugged in late from being detected as a NMEA
GPS
2012-11-05 14:58:40 +11:00
Andrew Tridgell a53cbc08f3 GPS: avoid output delays in the GPS auto detection
this sends out the GPS init strings in 16 byte chunks to avoid causing
timing glitches when no GPS is attached
2012-10-18 16:18:32 +11:00
Andrew Tridgell 728b3a133e GPS: disable auto detection of NMEA and SiRF on a 1280 board
saves a bit more flash space
2012-09-19 19:36:48 +10:00
Andrew Tridgell 59b44816ec GPS: replaced the GPS auto-detect mechanism
the old mechanism wasted most of the input bytes, and chewed a lot of
CPU, making it impractical to do GPS detection for a GPS attached
after startup

The new code is async, and detects a GPS by looking for a fully formed
packet with the right checksum for each GPS type
2012-09-17 14:45:47 +10:00
uncrustify b9d3f449b9 uncrustify libraries/AP_GPS/AP_GPS_Auto.cpp 2012-08-21 19:02:11 -07:00
Andrew Tridgell 70f18289c5 GPS: fixed auto-config of UBlox setup with no UBX messages
if a UBlox is configured for NMEA only, with no UBX messages at all
then it would never trigger the GPS_AUTO detection. This adds a UBX
config message to the init strings that enables the NAV_SOL message
2012-06-15 15:53:27 +10:00
Andrew Tridgell 33a2ad7e07 GPS: add stub settings for nav_setting in the other GPS drivers
only Ublox supports nav_setting so far
2012-06-10 16:34:53 +10:00
Andrew Tridgell a8bfc5d8e9 GPS: re-open the serial port with a 256 byte serial receive buffer
this ensures all GPS parsers have a 256 byte buffer available
2012-06-08 16:42:03 +10:00
Andrew Tridgell 711814085b GPS: detect new style 3DR UBlox 2012-04-20 22:05:30 +10:00
Andrew Tridgell 7fbfcc2721 GPS: fixed some stdint types 2012-03-10 10:34:29 +11:00
Andrew Tridgell 1f05e7dafb fixed types in GPS detect code
using int everywhere is wasteful and non-portable
2012-02-13 16:22:53 +11:00
Michael Oborne 306e2e3f7d add gps character count.
this problem happens when the mtk ends up in nmea mode at 10hz. there is no 50ms window of no activity
2011-12-31 13:05:33 +08:00
Michael Oborne 3d85f99546 remove gps callback in wait loop 2011-12-31 09:35:40 +08:00
James Goppert 14d27b1e4c Cleaned up AP_GPS formatting. 2011-10-28 14:52:50 -04:00
tridge60@gmail.com 91e101f47e GPS: added delay hook for GPS detection
this allows for MAVLink to be up during GPS detection

git-svn-id: https://arducopter.googlecode.com/svn/trunk@2987 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-31 22:34:37 +00:00
deweibel@gmail.com 8d7e7ff58e revert gps lib to 2602
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2608 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-06-21 01:38:31 +00:00
deweibel@gmail.com 5b9e7eff9d clean up idleTimeout
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2606 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-06-21 01:20:39 +00:00
jasonshort 76d072591b made timeout public, settable
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2563 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-06-16 16:33:08 +00:00
james.goppert 7809b0ca2a Massive warning fixes.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2089 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-05-04 19:12:27 +00:00
tridge60@gmail.com 860998d337 implemented typesafe PSTR()
This makes PSTR() type safe by using a 1 byte wrapper
structure. Attempts to use the wrong varient of a print function will
generate a compilation error.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1797 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-03-21 07:25:48 +00:00
DrZiplok@gmail.com 52a0a03d56 Bring AP_GPS_Auto closer to ready for prime-time:
- disable NMEA autodetection; false positives are still a risk
 - trim down the console output to a minimum; we still need something to help users diagnose potential problems, but the old output was much too verbose
 - rather than block forever, only do one autodetect pass for each ::read call.  That's still too long (five seconds or so) but better than blocking forever.
 - don't block forever if no GPS is attached.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1480 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-10 08:20:41 +00:00
DrZiplok@gmail.com 1bfcdaa2cb Add a delay after sending the GPS mode switch strings in an attempt to give any NMEA data time to drain before we attempt to sniff again.
Otherwise, we can end up settling on NMEA as a mode just after switching a SiRF GPS to binary mode.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1467 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-10 01:50:42 +00:00
DrZiplok@gmail.com 8da4a29d58 Add support for the DIYD MTK v1.6 firmware
Nuke AP_GPS_IMU, as nothing is using it anymore.
Simplify the handling of no GPS/no fix detection.
Fix prototypes for ::init and ::read.
Update AP_GPS_Auto and corresponding example, nearly ready for primetime.
Use uint8_t rather than byte.
Strip some _error() calls to save space.  More could still go.



git-svn-id: https://arducopter.googlecode.com/svn/trunk@1246 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-24 06:35:09 +00:00
james.goppert aa115aea68 AP_GPS libs now recover from disconnect or failed initialization.
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1188 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-19 13:24:29 +00:00
DrZiplok@gmail.com ee105a0ebf The previous initialisation strategy for auto-detection doesn't play well with the way APM uses the GPS.
Switch to subclassing GPS and manipulating a global pointer.  Update the test program so that it works again.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@673 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-10-17 07:22:11 +00:00
DrZiplok@gmail.com 0a94520682 Add support for automatically detecting the connected GPS and configuring accordingly.
Note that this is currently disabled as changes need to be made to APM to support it.

Tested with MTK, u-blox and SiRF GPS'.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@671 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-10-17 06:06:04 +00:00