Commit Graph

28 Commits

Author SHA1 Message Date
Ryan Friedman 5f84cd8f2b AP_GPS: Move init logic from constructor to class
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-11-28 15:44:37 +11:00
Ryan Friedman bf9881579c AP_GPS: GSOF robust config parsing
* Refactor checksum to unique function
* Clear uart before reading data
* Add ack/nack check
* Implement output disable before requesting GSOF data
* Improve debug message to have line number
* Use debug in more code
* Stop delaying in configuration

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-11-28 15:44:37 +11:00
Ryan Friedman 08d88ce7c6 AP_GPS: Use GPS_COM_PORT param in GSOF driver
* Instead of hard coding to COM2, allow users to set it
* The enum is confusing, so this needs a wiki entry
* Use the same port in requestBAUD
* If the user configures an invalid param, send an error
* Add values for the GSOF COM ports
* Fix bug in RS232 being port 3 instead of port 0
* Use set_default for the typical user value when the GSOF driver is run

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-11-10 13:38:48 +11:00
Ryan Friedman 9445cb2672 AP_GPS: Expose COM port and Output Rate in header
* This removes magic numbers of hard coding the hardware port and output
  rate
* This also fixes configuring the incorrect hardware port
* Now, COM2 (TTL) is configured for GSOF output
* The data rate remains the same as before

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-11-07 10:42:14 +11:00
Ryan Friedman 639ba63560 AP_GPS: Remove gsof zero initialization
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-05-30 09:45:29 +10:00
Ryan Friedman 77e169b226 AP_GPS: Update GSOF docs with newer data
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-05-20 14:22:15 +10:00
Ryan Friedman a05af3f3c3 AP_GPS: More const for gsofmsgreq
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-05-19 18:43:31 +10:00
Ryan Friedman 5c815e2c32 AP_GPS: Reduce extra GSOF namespacing since it's all in class scope
* Also remove in s on enums to follow Peter's conventions
* Fixed incorrect style on class and enum names
2023-05-17 18:12:44 +10:00
Ryan Friedman 2f5f77712f AP_GPS: Use enum classes in GSOF
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-05-17 18:12:44 +10:00
Ryan Friedman 29a6ae4ea1 AP_GPS: Add missing const to the rest of the headers
* Related to #23743, but I missed this since I didn't realize the buffer was not modified in-place

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-05-15 12:25:34 +10:00
Ryan Friedman b8f59b0df5 AP_GPS: Remove unused member variable in gsof driver
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-05-12 19:19:43 +10:00
Ryan Friedman 4b2687352c AP_GPS: Add const and WARN_IF_UNUSED to AP_GPS_GSOF
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-05-11 10:41:17 -07:00
Iampete1 71b00e0f75 AP_GPS: use config.h pattern and only include log structures if enabled 2022-07-13 18:14:12 +10:00
Peter Barker 60b8277e1b AP_GPS: create and use AP_GPS_BACKEND_DEFAULT_ENABLED
Allows for all backends to be set to off by default.
2022-02-01 11:22:02 +11:00
Hwurzburg 3d4f6cc2c4 AP_GPS: add build options for GPS backends 2022-01-12 16:17:21 +11:00
Peter Barker fd888727b8 AP_GPS: add override keyword where required 2018-11-08 11:30:12 +11:00
Peter Barker 2354a0ec5a AP_GPS: ability to log GPS detection state to dataflash 2017-04-23 21:03:23 +01:00
Michael du Breuil 6f297deaf7 AP_GPS: Unify inject_data interface for all classes 2017-04-19 02:05:51 +01:00
Francisco Ferreira 1fc0dbe0bd
AP_GPS: fix GSOF highest supported status 2017-01-26 00:04:32 +00:00
Michael du Breuil 1c1e6e9398 AP_GPS: Support more fix types 2017-01-25 03:44:42 +00:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Peter Barker 6e72c899d1 AP_GPS: AP_GPS_GSOF: remove unused variable 2016-10-24 08:57:56 -02:00
Andrew Tridgell 9caf44b494 AP_GPS: update drivers for changed inject_data() API
need 16 bit length
2016-10-11 11:00:35 +11:00
Randy Mackay 3c7b2232b0 AP_GPS_GSOF: remove unused last_hdop
resolves a compiler warning
2016-04-23 23:06:22 -07:00
Lucas De Marchi ff10d1136c AP_GPS: reorganize includes
Due to the way the headers are organized a single change in a
AP_GPS backend would trigger a rebuild for most of the files in the
project. Time could be saved by using ccache (since most of the things
didn't change) but we can do better, i.e.  re-organize
the headers so we don't have to re-build everything.

This makes internal headers internal and then other libraries only
depend on the AP_GPS.h header.
2016-04-14 21:01:51 -03:00
Lucas De Marchi cd266fbf4f AP_GPS: replace header guard with pragma once 2016-03-16 18:40:40 +11:00
Michael Oborne 2f49fa1531 AP_GPS_GSOF: add second comport to base config 2015-11-15 14:56:49 +08:00
Michael Oborne 0fceb76493 AP_GPS_GSOF: add trimble gsof driver 2015-10-06 15:00:46 +11:00