60 Commits

Author SHA1 Message Date
Beat Küng
241fd629ce ERROR macro: get rid of the many 'oddly, ERROR is not defined for c++', use PX4_ERROR 2016-09-30 13:50:51 +02:00
Julian Oes
8ff237c69f Remove size optimization for individual modules
It makes more sense to set the optimization flags on a platform basis
instead of individually for each module. This allows for different
optimization options for SITL, NuttX, Snapdragon, etc.
2016-09-30 08:11:51 +02:00
Lorenz Meier
6ab9dc0acf Testing cleanup from Daniel Agar 2016-07-29 13:49:14 +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
James Goppert
09d4ce1e2c Set sf0x min dist to 30 cm, 0 cm is outside of spec for sf02. 2016-04-14 15:01:41 -04:00
Lorenz Meier
c7cc563832 SF0X: use shorter perf names 2016-03-28 13:05:07 +02:00
Kabir Mohammed
792f1747c7 rangefinders : remove annoying gotos 2015-10-28 22:38:38 +01:00
Kabir Mohammed
832780b966 Fix ranger multi-advertise 2015-10-28 22:38:38 +01:00
Lorenz Meier
a036a767b3 SF0X: Fixed code style 2015-10-19 13:14:54 +02:00
Lorenz Meier
fa5071b3c5 Remove module.mk files to prevent confusion of adopters upgrading 2015-10-06 11:23:20 +02:00
James Goppert
1d6b31d196 Switch to cmake build system. 2015-09-07 20:37:45 -04: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
af28016a10 Merge pull request #2236 from TSC21/drivers_cleanup
drivers: added validity check
2015-06-26 07:39:09 +02: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
TSC21
ff1f3ba7f1 drivers: added validity check to sf0x 2015-05-26 18:08:55 +01:00
Ban Siesta
9f314dd191 drivers: corrected log string 2015-05-24 20:56:25 +01:00
Ban Siesta
69cbbd9b5e distance_sensor: changed all distance sensors to orb_advertise_multi 2015-05-24 19:20:25 +01:00
Ban Siesta
0128fef8e0 drivers: more adaptations to changed message 2015-05-24 15:57:42 +01:00
Ban Siesta
103d59e9be distance_sensor: adapted message to float for distance and adapted the drivers 2015-05-24 14:28:19 +01:00
Ban Siesta
a0011d2163 Merge remote-tracking branch 'px4/pr/2200' into lidarlite_merge 2015-05-24 13:59:18 +01:00
Ban Siesta
21dfd0243d drivers: use new ringbuffer namespace everywhere 2015-05-24 10:04:38 +01:00
TSC21
98d0204087 distance_sensor: update drivers 2015-05-23 21:06:19 +01:00
TSC21
db48df15c8 Merge branch 'master' 2015-05-21 12:26:55 +01:00
Lorenz Meier
2903ceaacc Merge branch 'release_v1.0.0' 2015-05-20 09:00:57 +02:00
James Goppert
e1d2c0c5ad Move more messages to auto-generation, work on C++ code style 2015-05-20 08:57:29 +02: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
Simon Wilks
8fd6b3da21 Store the port so the in use port will be referenced when reopening. 2015-04-13 11:37:49 +02:00
Lorenz Meier
83c4da9635 SF0X: move to 0 based index 2015-02-09 22:56:23 +01:00
Lorenz Meier
407889ea2c Merged master into indoor branch 2014-12-26 17:06:19 +01:00
Thomas Gubler
8fd9f98904 sf0x: write min and max to report 2014-12-14 12:10:28 +01:00
Thomas Gubler
8ebe463f16 sf0x: fix whitespace 2014-12-14 12:10:28 +01:00
Lorenz Meier
f3a224e30d Merged master 2014-11-22 12:47:08 +01:00
Lorenz Meier
73e9137865 Fix unsigned comparison 2014-10-11 00:28:14 +02:00
Thomas Gubler
537991b83c Revert "Remove range command"
This reverts commit c58d845339c0d09fc703a1c730d89a7a00990906.
2014-10-07 14:48:41 +02:00
Lorenz Meier
c58d845339 Remove range command 2014-10-07 14:27:09 +02:00
Lorenz Meier
760e72cc72 Remove unnecessary commands, unneeded output / resets 2014-10-07 14:25:07 +02:00
Lorenz Meier
4ba4135c3b Code style fixes, no code changes 2014-10-07 12:52:48 +02:00
Lorenz Meier
4183444de6 Changed to proper parser for SF02/F laser rangefinder 2014-10-07 12:50:00 +02:00
Lorenz Meier
72fbd76c84 Updated and fixed parser for SF02/F laser sensor, test harness runs clean 2014-10-07 12:46:09 +02:00
Lorenz Meier
cc944da1a4 Merge branch 'master' of github.com:PX4/Firmware into indoor 2014-09-01 20:30:07 +02:00
Lorenz Meier
af3b3680e0 Fixed SF02/F driver, tested ok 2014-08-31 21:10:04 +02:00
Lorenz Meier
a46e1aa60e Fix reschedule logic for SF02/F driver 2014-08-31 20:55:29 +02:00
Lorenz Meier
ee91320299 SF02/F driver: Improve parsing 2014-08-31 19:53:01 +02:00
Lorenz Meier
7a253d50f8 Add more paranoid checks to sf0x altitude parsing 2014-08-31 17:59:21 +02:00
Lorenz Meier
368afa1c1d Start the laser on a port not offending the 2nd MAVLink instance 2014-08-27 09:47:31 +02:00
Lorenz Meier
16694051c9 Require a digit ahead of the dot for a valid number for the SF0x output 2014-08-18 13:16:58 +02:00
Lorenz Meier
70d0ff4922 SF0X: optimize for size 2014-07-12 19:35:11 +02:00
Don Gagne
92adbe9216 Fix compiler warnings 2014-06-29 17:47:24 -07:00
Lorenz Meier
aa312f96f8 drivers: Fix compile warnings and non-standard performance counter names 2014-05-21 14:20:48 +02:00