Commit Graph

119 Commits

Author SHA1 Message Date
David Sidrane bf570dee2f Added use of SPI_LOCK in the ms5611 driver on any HW where the
PX4_SPI_BUS_BARO == PX4_SPI_BUS_RAMTRON
2017-05-03 08:17:12 +02:00
Lucas De Marchi 2805bffe52 ms5611: reduce macro scope
Move the addresses to .cpp where they are used. This should help
noticing discrepancies like the OSR we are using and the sampling
interval.
2017-04-06 12:18:30 +02:00
Lucas De Marchi 47d4c75214 ms5611: poll sensor at 100Hz 2017-04-06 12:18:30 +02: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
Lucas De Marchi 62ea471ae7 ms5611: support MS5611/MS5607 autodetection
From their registers it's not possible to differentiate MS5611 from
MS5607. Here we use a little heuristic that people won't likely be
flying (or starting to fly) on very high altitude, greater than 5300m.
Even on these altitudes the error would be much lower using the MS5611
calculations for MS5607 than it is on MSL.
2017-02-09 21:30:19 +01:00
Lorenz Meier d0d1a8e04f MS5611: Add missing bus identifier 2017-01-29 16:24:47 +01:00
Lorenz Meier 7326fea142 Driver compile fixes 2017-01-19 19:24:52 +01:00
Lorenz Meier 171c321acc MS5611: Fix device ID 2017-01-19 19:24:52 +01:00
Paul Riseborough 5e53a5425a drivers: Populate baro device ID
TODO - use unique HW ID
2017-01-19 19:24:52 +01:00
Lorenz Meier 6820eb7a0c MS5611: Less chatty boot 2016-12-12 16:11:21 +01:00
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