Commit Graph

52 Commits

Author SHA1 Message Date
Daniel Agar 651df03f76 RTPS and micro-CDR build system cleanup (#8084) 2017-10-11 13:05:44 -04:00
Sugnan Prabhu 81809be7cd Add include guard in headers files (#8108)
Signed-off-by: Sugnan Prabhu S <sugnan.prabhu.s@intel.com>
2017-10-11 09:47:52 -04:00
Daniel Agar 38f45d1a9d airspeed sensor startup improvements (#7903) 2017-10-05 14:29:44 -07:00
Daniel Agar 01b3e6fd25 NuttX upgrade cmake wrapper (#7873)
* NuttX cmake

* px4_macros:Pass the stringified predicate as second arg to static assert

   CC_ASSERT mapes to the c++ static_assert or provides the same
   funtionality for c via the other macros. The c++ static assert
   takes 2 argumants the prdicate and a message. This fixes the
   lacking second argument.

* Updated nuttx and apps submodule to upstream nuttx 7.21+==master

   This is the latest uptake of upstream nuttx and apps.

* ROMFS generate with xxd instead of objcopy

* delete nuttx-patches

* NuttX update submodules to latest px4_nuttx-master

* fix nuttx apps and board dependency

* docker_run update to latest container 2017-08-29

* cmake ROMFS portable sed usage

* NuttX update submodules to latest px4_nuttx-master
2017-09-29 10:13:51 -04:00
Daniel Agar 07619cf723 Make NuttX drivers cross platform (VDev -> CDev) 2017-08-31 09:27:36 +02:00
Daniel Agar b2a81ed35b multi diff pres sensor publication and logging 2017-08-19 22:49:29 +02:00
Daniel Agar eb067291bf airspeed sensors apply offset separately 2017-07-06 10:05:07 -04:00
Daniel Agar 7029be87c0 MS5525 differential pressure driver 2017-07-06 10:05:07 -04:00
Beat Küng 546bd2b4d0 drivers: remove the overflow perf counter
This was used together with the read() interface, but we don't use that
so the counters are wrong.
2017-03-20 09:11:34 +01:00
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 7398164fcc Updated PX4 use / API of low level GPIO and other hardware-centric system facilities 2016-05-28 14:56:17 +02:00
Daniel Agar 76387b1693 uorb autogeneration 2016-05-14 11:27:07 +02:00
Lorenz Meier 924b7efaa2 Airspeed: Use shorter perf names 2016-03-28 13:02:15 +02:00
Lorenz Meier e2e83cd578 Airspeed: Fixed code style 2015-10-19 13:15:35 +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
Lorenz Meier 53d4c5473f Merge beta in master 2015-08-23 11:21:38 +02:00
Lorenz Meier dcf7b81f83 Airspeed: fix code style 2015-08-23 10:48:48 +02:00
Lorenz Meier aa531aec64 airspeed driver: Update topic names 2015-05-27 15:21:33 -07:00
Lorenz Meier 4565f57468 Merged release_v1.0.0 into master 2015-05-27 15:28:41 -07:00
Mark Charlebois bd2b5e4738 Revert change to src/drivers/device/vdev.cpp
This change was not part of the orb_advert_t fix.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 14:42:49 -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
Ban Siesta 21dfd0243d drivers: use new ringbuffer namespace everywhere 2015-05-24 10:04:38 +01:00
Mark Charlebois 5557ecf3d7 POSIX: Added airspeed simulator
This seems to be a dependency for the system to start up.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-30 13:16:03 -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
Daniel Agar 8aae66b893 trivial code style cleanup round 2 2015-03-27 23:38:58 -04:00
Lorenz Meier 6e4b95e844 Airspeed: Move to 0-based index 2015-02-09 22:56:21 +01:00
Andrew Tridgell 4724c05047 airspeed: use _retries=2 for I2C retries once initialised
airspeed sensors often need to be on longer cables due to having to be
outside the prop wash.
2014-11-26 07:35:32 +01:00
Lorenz Meier e2c0ac3f70 airspeed driver: Be less chatty 2014-11-15 16:40:29 +01:00
Lorenz Meier 7eb521b6d4 Do not perform retries in airspeed driver - this is too much load for the HRT queue 2014-08-18 20:07:55 +02:00
Lorenz Meier 024c6d5727 Airspeed fix attempt 2014-08-18 16:49:12 +02:00
Lorenz Meier 7f0e675228 Pass over drivers to reduce build size 2014-07-23 08:24:56 +02:00
Lorenz Meier 23dd7e752d airspeed driver: better init 2014-07-16 08:54:00 +02:00
Lorenz Meier 6306644028 airspeed: Let the status check routine handle the initial state 2014-04-20 21:45:42 +02:00
Lorenz Meier 709d104de4 airspeed driver: Do not spam the console on error, report the system change only once 2014-04-20 21:43:18 +02:00
Lorenz Meier 28536682aa Fix airspeed sensor 2014-02-15 21:00:48 +01:00
Lorenz Meier 773f70a9df Merged origin/master into pubsub_cleanup 2014-02-09 16:04:32 +01:00
Lorenz Meier 65118f0c2e Disable debug in the airspeed sensor driver - prevents console spam if it fails (and on probing during startup) 2014-01-24 17:26:13 +01:00
Lorenz Meier d199710651 Fixed up init sequence of all sensors - we can publish in interrupt context, but not advertise! All advertisements now contain valid data 2014-01-14 15:40:46 +01:00
Lorenz Meier d72c82f66b Airspeed does not publish if disabled 2014-01-12 11:53:15 +01:00
Lorenz Meier bc8cfc8d9d Fix indendation in airspeed driver (no functional change) 2013-12-10 11:21:45 +01:00
Thomas Gubler ae9fae5aae fix MEAS airspeed and airspeed calibration 2013-11-10 19:25:38 +01:00
px4dev cefc7ac00e Rework the ringbuffer class so that it's not templated, and refactor its clients so they aren't dancing around the linker anymore. 2013-09-12 00:53:08 +02:00
Andrew Tridgell 36b7b7bc5f airspeed: convert to using RingBuffer class 2013-09-12 00:52:21 +02:00
Andrew Tridgell 76a9e34e08 I2C airspeed driver needs 2 retries
this prevents I2C transfer errors every few seconds with the
meas_airspeed driver
2013-08-28 11:17:22 +02:00
Andrew Tridgell fdbc09e2a5 avoid counters going above limit in INCREMENT()
when using INCREMENT() the counter would temporarily read equal to
limit, which could cause an issue if the task is preempted.

(this macro should be in a common header, though which header?)
2013-08-28 11:16:30 +02:00
Andrew Tridgell ad732ee3a1 free perf counters in driver destructor
this prevents drivers that probe on one bus then instantiate on
another from leaving behind stale/duplicate perf counters
2013-08-28 11:15:43 +02:00
Andrew Tridgell 9c58d2c5c6 airspeed: retry initial I2C probe 4 times
this fixes a problem with detecting a MS4525D0 at boot
2013-08-27 10:15:34 +02:00