109 Commits

Author SHA1 Message Date
David Sidrane
bdfb2bbb8d Fixed hardfault on fast proc
_baro_topic can be null in init sequence
   init call collect before the topic is inited.

I think this pattern is repeated in other drivers. I would suggest
allowing null in orb_publish to just return.
2016-10-22 11:43:22 +02: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
c835fb36a6 5611: Bump sampling frequency back up to 40 Hz from 25 Hz to help with altitude estimation 2016-07-31 12:20:48 +02:00
Beat Küng
0fa3bd4691 ms5611: use px4_getopt instead of getopt
- px4_getopt is threadsafe
- getopt does not do argument reordering (ms5611 start -T 5607 did not work)
2016-07-29 14:50:03 +02:00
David Sidrane
1b0f41e36e Added support to MS5611 Driver for MS5607 2016-07-29 14:50:03 +02:00
Lorenz Meier
286efb6b34 Remove POOSIX porting noise from ms5611 driver (#4896) 2016-06-24 10:39:55 +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
Lorenz Meier
2c6a8c0ce6 MS5611: Drop readout rate to 25 Hz to alleviate self-heating. 2016-05-22 15:21:56 +02:00
Daniel Agar
1ecdb0f6fb adjust stack sizes 2016-05-19 21:49:34 +02:00
jaxxzer
d8aee84625 ms5611: Fix to start drivers for all devices present at boot. 2016-04-17 19:07:30 +02:00
Andrew Tridgell
efd4552e37 ms5611: reduced OSR to 1024
this reduces self-heating of the sensor which reduces the amount of
altitude change when warming up. Apparently some individual sensors
are severely affected by this.

Unfortunately it raises the noise level, but Paul is confident it
won't be a significant issue
2016-04-17 16:04:44 +02:00
Lorenz Meier
96fd15f42e MS5611: Use shorter perf names 2016-03-28 13:04:10 +02:00
Lorenz Meier
b37082e390 MS5611: Run SPI bus faster 2016-01-23 13:32:42 +01:00
Lorenz Meier
1474ddbb78 MS5611: Ensure to set the lockmode at the right location 2016-01-23 13:23:32 +01:00
Lorenz Meier
871b4b482e Do not enable new bus sync yet 2016-01-22 18:07:27 +01:00
Lorenz Meier
c659d7851f MS5611: Use the right locking mechanism on Pixracer 2016-01-22 17:12:13 +01:00
Lorenz Meier
415e42f5de MS5611: Use baro SPI device 2016-01-15 22:44:22 +01:00
Mark Whitehorn
ecbcfe838b clean up, change SPI2 clock back to 12MHz and remove debug prints 2016-01-14 17:55:54 +01:00
Mark Whitehorn
4952d05652 debugging ms5611 on spi2 2016-01-14 17:55:54 +01:00
Stefan
5c1b84f16a Update ms5611_i2c.cpp
spelling mistakes
2016-01-11 08:37:43 +01:00
Lorenz Meier
67087c6428 MS5611: Fix breakage introduced by failed Qualcomm MS5611 port 2015-10-11 15:43:45 +02:00
Lorenz Meier
0490046af4 MS5611: Increase the requirements about the PROM contents and CRC. 2015-10-06 17:22:38 +02:00
Lorenz Meier
fa5071b3c5 Remove module.mk files to prevent confusion of adopters upgrading 2015-10-06 11:23:20 +02:00
Lorenz Meier
6ef94e0dfb Merged master into cmake-2 2015-09-20 10:33:39 +02:00
Lorenz Meier
b067a0c094 Merge branch 'ekf_voting_priority' 2015-09-19 10:51:01 +02:00
James Goppert
676a3d230c Work on px4io firmware building. 2015-09-13 23:20:00 -04:00
James Goppert
e55af00222 Removed weak attributes. 2015-09-13 14:40:27 -04:00
James Goppert
1d6b31d196 Switch to cmake build system. 2015-09-07 20:37:45 -04:00
Lorenz Meier
ebfae73108 MS5611 code style fix 2015-09-05 22:06:15 +02:00
Lorenz Meier
299ccab3ae MS5611: Fix build error 2015-08-30 11:37:26 +02:00
Simon Wilks
384047787a Fix travis/clang report of overloaded virtual functions. 2015-08-18 23:01:52 +02:00
Simon Wilks
4eef65f313 Enable ms5611 driver and fix build errors. 2015-08-18 23:01:52 +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
d19de58102 Merge branch 'master' of github.com:PX4/Firmware into master_release 2015-06-27 11:54:17 -07:00
Andrew Tridgell
5e27b7bc31 ms5611: fixed the i2c device on NuttX. This was left-over debugging noise from the POSIX bringup. 2015-06-27 15:11:03 +02:00
Lorenz Meier
454becdae5 Merged release_v1.0.0 branch into master 2015-06-25 21:45:17 +02:00
Lorenz Meier
73d179fb59 MS5611 driver: Fix reeset logic via I2C, minor code style fixes. Fixes #2007, identified by Kirill-ka 2015-06-15 17:28:26 +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
Ban Siesta
362fc205b3 drivers: various whitespace 2015-05-24 10:05:42 +01:00
Ban Siesta
21dfd0243d drivers: use new ringbuffer namespace everywhere 2015-05-24 10:04:38 +01:00
Mark Charlebois
f3b5076d70 Linux to posix conversion
Changed "linux" target to "posix". Most of the changes are shared with
QuRT and with OSX. The Linux specific parts are in for i2c which uses
<linux/i2c.h> and <linux/i2c-dev.h>.

There is also a check for __PX4_LINUX in mavlink for a tty ioctl that is
not supported.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-21 09:53:09 -07:00
Mark Charlebois
89a1799e61 Linux: Changed /vdev/... back to to /dev/
Some virtual devices were mapped to /vdev.
Putting them back to /dev.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:50 -07:00
Mark Charlebois
c6498de3e1 SIM: pushed transfer stub for ms5611_sim
The MS5611_SIM class is supposed to simulate data from a real
ms5611. An externl simulator could provide an interface to
call to get data that would be returned from a transfer() call.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:47 -07:00
Mark Charlebois
eab32572f4 Linux: Added thread safe getopt
The getopt command uses global variables and is not thread safe.

Created a minimal px4_getopt version that supports options with
or without an arg, and random placement of options on the command line.

This version modifies the order of the args in argv as does the
POSIX version of getopt.

This assumes that argv[0] is the program name. Nuttx may not support
that properly in task_spawn.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:47 -07:00
Mark Charlebois
76a6f19476 Linux: Added device simulator to simulate an I2C or SPI device
The simulated device satisfies the factory pattern used by
MS5611 to create a specific I2C or SPI device instance.

For now the functions just return true, but should/could
return simulated data.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:35:47 -07:00
Mark Charlebois
4780353cd8 ms5611_i2c: don't create with nullptr for devname
I have not been able to unravel why nullptr is passed as the device
path to the constructor of ms5611_i2c.

This crashes the VDev code as it expects to create a virtual driver
with the device path passed as devname. It causes VDev to do a
strncmp with null.

Using /vdev/ms5611_i2c as the name for the now.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:34:12 -07:00
Mark Charlebois
92d90f7780 Linux: ms5611 open, close changed to px4_open, px4_close
Calls to open and close were used instead of px4_open and px4_close.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:34:12 -07:00
Mark Charlebois
ccd18929fc Linux: changed CDev to VDev for virtual device implementation
To avoid confusion when a real device and a virtual device is
being used, changed CDev to VDev for Linux.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:34:12 -07:00