Commit Graph

137 Commits

Author SHA1 Message Date
Daniel Agar 5fba1f38b2 drivers start using uORB message print instead of custom 2018-03-28 09:15:41 -04:00
Beat Küng 03b8cd78b3 gps: explicitly disable flow control
If the GPS driver was used on another port (e.g. TELEM2), it would get
stuck in a `write` call and not return anymore. Disabling flow control
fixes that.

CPU usage is unchanged.
2018-03-05 16:43:14 +01:00
Lorenz Meier eb2c9fbef1 GPS: Remove unnecessary warning message
This warning message would often be printed during normal configuration and does not represent a good indicator for true GPS lost states. Instead the system flags should be used, which are available through the normal logging system.
2017-10-07 15:01:14 +02:00
Daniel Agar 4070abc132 gps fix sign-compare 2017-09-07 10:27:36 +02:00
Lorenz Meier b07dde78e3 Move scheduling priorities into px4_tasks to simplify header usage 2017-08-02 21:18:35 +02:00
Beat Küng 36c9400de4 gps: use ModuleBase class & add documentation
Note: it changes the interface slightly: instead uf -dualgps, use -e now.

This also fixes 2 bugs:
- nullptr access when doing 'gps status' with fake gps running
- close(fd) was called on an uninitialized fd when gps fake was running
2017-07-14 11:57:11 +02:00
Daniel Agar f45b9048aa GPS driver increase stack (244 bytes left) 2017-07-09 13:09:22 +02:00
Daniel Agar af5256c454 GPS ublox add dynamic model parameter 2017-06-30 08:02:25 +02:00
Julien Lecoeur 7929287f73 Fix -Werror=format-truncation on GCC 7
Fix formatting

Check snprintf return for error AND overflow
2017-06-26 15:50:44 +02:00
Julien Lecoeur 06c6a0cdec Fix -Werror=implicit-fallthrough errors on GCC7 2017-06-26 15:50:44 +02:00
Lorenz Meier 55697e08e2 GPS driver: Add more stack to suit data definition increases 2017-05-13 11:44:49 +02:00
Lorenz Meier 875a35fcd5 GPS: FIncrease stack by 100 bytes
The app reached the check limit and needed a bit more headroom.
2017-04-30 12:03:14 +02:00
Julian Oes bb168287da gps: just use termios on QURT
QURT has added support for termios calls a while back that we can now
use.
2017-04-14 09:56:42 +02:00
Beat Küng b5bb5cffc8 gps: check for allocation failure & avoid busy loop 2017-04-06 11:49:03 +02:00
Lorenz Meier bbc5186e2a GPS driver: Improve GPS "fake" mode init and code style 2017-02-17 22:28:55 +01:00
Daniel Agar 96e51f7c59 clang-tidy remove redundant 2017-02-01 22:15:50 -05:00
Daniel Agar 6631e72d6f clang-tidy modernize-redundant-void-arg 2017-02-01 22:15:50 -05:00
Daniel Agar e927f3e040 clang-tidy modernize-use-nullptr 2017-02-01 22:15:50 -05:00
Daniel Agar 30587e5669 astyle src/drivers/gps 2017-01-29 01:18:32 +01:00
Dennis Mannhart 8cd913c148 gps.cpp: add gps baudrate 230400 to qurt 2017-01-10 11:49:05 +01:00
Lorenz Meier 5759fd5726 GPS app: Increase stack to ensure 300 bytes headroom 2016-12-19 20:34:52 +01:00
Julian Oes 1c2194c600 gps: fix cli parsing
The gps driver did not give feedback if a non-existing verb was used
such as `gps foo`. Also, the goto out was ugly and the usage always
marked as an error when it's really an info. This cleans it up a bit.
2016-12-15 00:10:27 +01:00
Julian Oes 12c5ed39ae gps: fix faking so that ekf2 initializes
This changes the faked GPS values in order to get ekf2 to initialize.
2016-12-15 00:10:27 +01:00
Roman 0acdf32ed5 gps driver: removed unnecessary baud rate
Signed-off-by: Roman <bapstroman@gmail.com>
2016-12-12 23:48:15 +01:00
Roman d10c4dd824 gps driver: added more baud rates in order to support bebop2
Signed-off-by: Roman <bapstroman@gmail.com>
2016-12-12 23:48:15 +01:00
Beat Küng a42f0f5a62 gps: fix code style 2016-10-06 09:00:09 +02:00
Beat Küng 80771ce8b3 gps: remove gps_driver_interface_t and use GPSHelper::Interface instead 2016-10-06 09:00:09 +02:00
Miguel Arroyo c6f43689e7 Adds Auto Mode Scanning 2016-10-06 09:00:09 +02:00
Miguel Arroyo 2799525462 Commandline Interface and Mode options 2016-10-06 09:00:09 +02:00
Hidenori 9bd3f6c9bf Navio: Delete (wrong) unnecessary ifdef and modify for new GPSDriverUBX constructor 2016-10-06 09:00:09 +02:00
Hidenori 96a5baa12b Navio: fix style 2016-10-06 09:00:09 +02:00
Hidenori 56ef984529 Navio2: modify for SPI-connected GPS and fix bug in GPIO driver 2016-10-06 09:00:09 +02:00
Artem Sabadyr 74b2780874 GPS driver: use FIONREAD on NuttX only 2016-10-02 11:19:55 +02:00
Artem Sabadyr 4c04b7bb53 gps read optimization 2016-10-02 11:19:47 +02:00
huanglilong 6f7b78821a fix fake gps bugs (#5285) 2016-08-09 21:24:11 +02:00
Lorenz Meier aae3a37983 GPS: Do not use nonblocking access 2016-08-09 15:59:34 +02:00
Beat Küng 124e1c26d9 gps injection: use the orb queuing API instead of multiple instances
It uses a queue length of 6. There are 3 RTCM msgs/s, but due to
fragmentation and WiFi lags, there can be more than that. During several
tests, a length of 6 showed no queue overflows.
2016-08-06 20:41:38 +02:00
Eric Ye 9f5b081257 Wrap help line to fit through mini-dm. (#5157)
It currently gets cut off on mini-dm, split it into multiple lines
so all of it comes through.
2016-07-28 14:47:57 -07:00
Beat Küng 09ecc84cc7 gps file dump: re-implement with an uORB topic & write to the log file (#4987)
Drawbacks of the previous method: when writing to the SD card, there are
high delays in the write() call of several 100ms, every now and then. The
frequency and length of these events depend on:
- SD card
- used logger bandwidth
- bandwidth of gps data (RTCM)
Since the whole gps thread was blocked during this period, it lead to
gps timeouts and lost module.

What we do now is: publish an orb topic with queuing. This makes it async
and the logger takes care of buffering. This means it's best to:
- use high logger rate
- use large logger buffer
- reduce logger bandwith by disabling unused topics
2016-07-06 09:32:37 +02:00
Beat Küng f8e9a19889 gps_position: convert uint64 timestamp_time -> int32 timestamp_time_relative
We need to make this timestamp relative to the main timestamp. Necessary
for replay, and saves some space.
2016-06-24 00:22:01 +02:00
Beat Küng e2a7145379 vehicle_gps_position: remove timestamp_variance & timestamp_velocity (they're not used) 2016-06-24 00:22:01 +02:00
Beat Küng 89f5bd27e8 vehicle_gps_position: use timestamp field instead of timestamp_position
timestamp was unused. This allows to remove timestamp_position.
2016-06-24 00:22:01 +02:00
Beat Küng b226f7d13d gps: call fsync after injecting gps data
This is to minimize delay
2016-06-02 09:26:03 +02:00
Beat Küng 25cff52019 RTCM: use MAVLINK_MSG_ID_GPS_RTCM_DATA mavlink message (supports fragmentation) 2016-06-02 09:26:03 +02:00
Lorenz Meier 7398164fcc Updated PX4 use / API of low level GPIO and other hardware-centric system facilities 2016-05-28 14:56:17 +02:00
Beat Küng a94654e8d4 gps dump communication to file: include received RTCM messages 2016-05-22 12:19:47 +02:00
Beat Küng 6b8ab4611b gps: workaround for missing stat() on QuRT 2016-05-22 12:19:47 +02:00
Beat Küng aef78b8aeb gps: add GPS_DUMP_COMM param: if 1, dump all gps communication to a file 2016-05-22 12:19:47 +02:00
Beat Küng 47ed8c1a3c gps: fix thread initialization under posix
under NuttX the argc in task_main_trampoline contains two arguments,
but on linux only one.
2016-05-22 12:19:47 +02:00
Beat Küng 9d0c5469a0 gps: remove unneeded comment 2016-05-22 12:19:47 +02:00