Commit Graph

68 Commits

Author SHA1 Message Date
Nicolae Rosia
fff535857d drivers/gps: fix segfault when parsing arguments
running gps command without parameters results in segfault
due to illegal access to unallocated memory

Signed-off-by: Nicolae Rosia <nicolae.rosia@gmail.com>
2016-04-20 21:50:10 +02:00
Julian Oes
441d7aacbb gps: fix build, unused var ERROR 2016-04-11 13:51:04 +02:00
Beat Küng
8c64e2b801 gps driver: fix 'gps stop' error 2016-04-11 11:23:01 +02:00
Beat Küng
215aa78f30 fix coding style for gps drivers 2016-04-11 11:23:01 +02:00
Beat Küng
21f403e12b gps: make sure the gps module compiles for POSIX & add it to the posix_sitl_default cmake
- Note that the simulator still uses gpssim by default
- now the gps module can be used in the SITL. this makes it possible to test
  the real gps HW under POSIX
  additional steps needed to use it:
  - in the rcS_jmavsim_iris, make sure to start the gps instead of gpssim:
    gps start -d /dev/ttyACM0 -s
  - disable the mavlink serial connection in simulator_mavlink.cpp,
    openUart(PIXHAWK_DEVICE, 115200);
- this also fixes a memory leak in the gps module
2016-04-11 11:23:01 +02:00
Lorenz Meier
b71123f4fe GPS: Use shorter perf names 2016-03-28 13:02:29 +02:00
Lorenz Meier
b114575139 GPS: Fix comment 2016-03-13 15:40:39 +01:00
Lorenz Meier
f7640f02ad GPS driver: Removed debugging noise 2016-03-12 17:17:47 +01:00
Julian Oes
1cebfde840 gps: make the driver compile and run on QURT 2016-03-06 18:02:50 +01:00
Lorenz Meier
8fcf24f23f GPS driver UBX: Support hdop and vdop 2016-02-25 13:45:34 +01:00
Lorenz Meier
9cccc0ec76 GPS: Do initial zero value publication to avoid corner cases 2016-01-25 09:30:45 +01:00
Artem Sabadyr
a284b77c7b gps advertise fix 2016-01-24 15:03:41 +01:00
Lorenz Meier
ff6676ef8c GPS: Fixed code style 2015-10-19 13:16:11 +02:00
Lorenz Meier
5b23345b0f GPS: Remove excessive stack allocation 2015-10-10 22:23:34 +02:00
Lorenz Meier
dd697d1343 GPS: Remove unused header 2015-09-16 18:12:05 +02:00
Mark Charlebois
a589d15c52 Refactored debug() and log() in CDev
These functions used vprintf which is not available on all platforms.
They also do not enable line and file debug output.

Changed to macros that preserve the output format.  Uses new macro that
can be used to implement per object, runtime selectable logging

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-08-11 12:07:06 -07:00
Lorenz Meier
0d37de005b Merged beta to master 2015-07-17 23:42:23 +02:00
Lorenz Meier
d9f0baf4dc GPS driver: Only let the driver publish reports if it really found a GPS receiver 2015-07-17 21:19:32 +02:00
Lorenz Meier
c62ae87c69 Merge release_v1.0.0 into master 2015-05-28 18:08:31 -07:00
Lorenz Meier
46920cfd27 GPS driver: Obey non-publish flag in all modes 2015-05-28 17:41:26 -07:00
Mark Charlebois
1ca05aaa64 orb_advert_t changed to void * and checks changed to nullptr
The existing orb_advert_t use thoughout the code sometimes tries
to treat it as a file descriptor and there are checks for < 0
and ::close calls on orb_advert_t types which is an invalid use
of an object pointer, which is what orb_advert_t really is.

Initially I had changed the -1 initializations to 0 but it was
suggested that this should be nullptr. That was a good recommendation
but the definition of orb_advert_t had to change to void * because
you cannot initialize a uintptr_t as nullptr.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 14:42:49 -07:00
Mark Charlebois
a734fc96d1 extensive orb_advert_t fixes
The calls to orb_advertise were being mishandled throughout the code.
There were ::close() calls on memory pointers, there were checks
against < 0 when it is a pointer to a object and values larger than
0x7ffffffff are valid. Some places orb_advert_t variables were
being initialized as 0 other places as -1.

The orb_advert_t type was changed to uintptr_t so the pointer value
would not be wrapped as a negative number. This was causing a failure
on ARM.

Tests for < 0 were changed to == 0 since a null pointer is the valid
representation for error, or uninitialized.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 14:41:33 -07:00
Lorenz Meier
d906fb8f31 Merged master into linux 2015-05-19 21:00:02 +02:00
Johan Jansen
680898e6aa GPS: Publish first data after configuring device 2015-05-18 12:48:40 +02:00
Mark Charlebois
c5237f7f6f Removed extra abstracton layer in systemlib
The calls to task_spawn_cmd, kill_all, and systemreset  were wrappers
around the px4_{task_spawn_cmd|kill_all|systemreset} implementations.

Removed the wrappers and changed all calls to the px4_ equivalents.

NuttX specific code was moved into px4_tasks.h

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-06 14:43:11 -07:00
Mark Charlebois
9758112e31 Use px4_config.h instead of nuttx/config.h
Modified code to use OS independent header file for config settings.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:55:41 -07:00
Mark Charlebois
bf429188b4 Reverted: Use OS independent API for task creation/deletion
Keep existing API use in code. Bind the use of the OS independent
implementation in the systemlib layer.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:49:44 -07:00
Mark Charlebois
ddb32742eb Use OS independent API for task creation/deletion
Calls to task_delete and task_spawn_cmd are now
px4_task_delete and px4_task_spawn_cmd respectively.

The px4_tasks.h header was added to the affected files
and incusions of nuttx/config.h were removed.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 10:49:44 -07:00
Lorenz Meier
c26b4e123f Fix up GPS command line option usage 2015-02-15 19:40:42 +01:00
Johan Jansen
b1b078103a GPS: Remove GPS disable debug code 2015-02-13 14:29:59 +01:00
Johan Jansen
a8c298c772 AttPosEKF: Remove unused gps accel estimation 2015-02-12 13:55:03 +01:00
Johan Jansen
0cbfa65056 AttPosEKF: Refactor and code cleanup 2015-02-11 17:57:33 +01:00
Lorenz Meier
aeb8642117 GPS: Move to 0-based index 2015-02-09 22:56:21 +01:00
Lorenz Meier
eefad6217d GPS driver feedback cleanup 2015-01-04 12:05:40 +01:00
Lorenz Meier
54e7ed70e1 GPS: be less verbose 2014-11-22 16:34:09 +01:00
Denis Yeldandi
09b5206404 Code style fix 2014-10-09 11:15:11 +04:00
Denis Yeldandi
213f4aadbd Ashtech GPS driver 2014-09-30 15:44:47 +04:00
Lorenz Meier
ee573fea9d GPS driver: Print velocity as part of status command 2014-07-11 14:25:16 +02:00
Kynos
1cca3ca8a5 Use NAV-PVT with ubx7 and ubx8 modules
This replaces NAV-SOL, NAV-POSLLH, NAV-VELNED and NAV-TIMEUTC.
2014-07-03 13:33:29 +02:00
Lorenz Meier
f428ebb04f gps: Comment-only fix 2014-07-02 11:39:56 +02:00
Kynos
503ebddc1b Merged upstream master into gnss_rework branch 2014-06-30 01:34:12 +02:00
Kynos
b6b3ad6e1e U-blox driver rework,, step 4
Config phase and parser rewrite
2014-06-13 14:05:47 +02:00
Kynos
07458b284d Gps driver: make enable_sat_info a command line option 2014-06-08 17:54:50 +02:00
Kynos
9f754e0e9a U-blox driver rework, step 3
More sat info isolation
Flush input after changing baudrate to allow driver restart w/o GNSS
module restart
2014-06-08 14:05:35 +02:00
Kynos
9bad828bc0 U-blox driver rework, step 2
Moved satellite info from vehicle_gps_position_s into a new uORB topic
satellite_info.
Renamed satellites_visible to satellites_used to reflect true content.
sdlog2 will log info for GPS satellites only for now.
2014-05-30 14:30:25 +02:00
Julian Oes
063caba36b Merge branch 'master' into navigator_rewrite
Conflicts:
	src/drivers/gps/gps.cpp
	src/drivers/gps/mtk.cpp
	src/modules/commander/commander.cpp
	src/modules/ekf_att_pos_estimator/ekf_att_pos_estimator_main.cpp
	src/modules/navigator/mission.cpp
	src/modules/navigator/mission.h
	src/modules/navigator/navigator_main.cpp
	src/modules/navigator/navigator_state.h
	src/modules/position_estimator_inav/position_estimator_inav_main.c
2014-05-26 20:19:11 +02:00
Lorenz Meier
c4d79b84b4 bugfixes in UBX driver, emit new SNR, Jamming and noise count indices 2014-05-23 15:08:33 +02:00
Lorenz Meier
8630d82ea2 gps driver: Use correct spawn command, use a smaller start tool size 2014-05-16 10:46:10 +02:00
Lorenz Meier
ba51ab2545 Merge branch 'ekf_params' of github.com:PX4/Firmware 2014-05-15 13:14:25 +02:00
Ash Charles
e5508a1aa0 Add Gumstix AeroCore device
Based on the work of Andrew Smith [1], add board configuration and device
drivers to support the Gumstix AeroCore (previously Aerodroid) board [2]. The
AeroCore is an autopilot board based on a STM32F427 similar to the FMUv2.

[1] https://github.com/smithandrewc/Firmware
[2] https://store.gumstix.com/index.php/products/585/

Signed-off-by: Ash Charles <ashcharles@gmail.com>
2014-05-13 09:41:41 -07:00