Commit Graph

137 Commits

Author SHA1 Message Date
Mark Charlebois 618626103f Use DevMgr::getNextDevicePath()
Also, a fix for number of args passed for accelsim.

Updated to newest version of DriverFramework.

DF drvices show up now in list_devices

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-11-16 16:57:57 -08:00
Mark Charlebois 3f20d78dfe Fixed code style
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-11-16 14:01:39 -08:00
Mark Charlebois dbe3b0e52b Re-enabling code to handle DF framework
Updated to latest DriverFramework and changed ioctl args to
unsigned int from void *.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-11-16 13:51:39 -08:00
Lorenz Meier 65cf8caef2 POSIX Device: Fix IOCTL interface 2015-11-14 11:16:42 +01:00
Lorenz Meier cc8f159bcc REVERT THIS COMMIT LATER: Temporarily disable the device listing 2015-11-12 15:31:38 +01:00
Lorenz Meier 437133aac4 Merged driver_framework from mcharleb 2015-11-12 15:20:15 +01:00
Mark Charlebois efd9995a10 Ported more simulated sensors to DriverFramework
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-11-10 07:45:13 -08:00
Lorenz Meier 06987c6244 Lock vdev devmap 2015-11-02 11:06:29 +01:00
Lorenz Meier c0a6635400 Lock VDEV table to prevent concurrent access 2015-11-02 10:51:53 +01:00
Lorenz Meier fe216b5c5f Device: Fixed code style 2015-10-19 13:15:22 +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 5d9b115fa5 Merge branch 'cmake-2' into cmake-2-pthread 2015-09-20 10:54:43 +02:00
Lorenz Meier d05b3fcc08 Device: Split integrator into CPP and H 2015-09-20 10:53:22 +02:00
Lorenz Meier c1c235edb2 Merge branch 'cmake-2' into cmake-2-pthread 2015-09-20 10:34:03 +02:00
Lorenz Meier 6ef94e0dfb Merged master into cmake-2 2015-09-20 10:33:39 +02:00
Lorenz Meier 76508ab5b5 Device:: Move to POSIX semaphore abstraction 2015-09-20 00:27:41 +02:00
Lorenz Meier b067a0c094 Merge branch 'ekf_voting_priority' 2015-09-19 10:51:01 +02:00
Mark Charlebois 7d2ba97511 Fixed poll timeout bug
The SIGCONT signal was being ignored by the HRT queue thread so the
usleep was not waking up early to process new work.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-09-16 15:24:58 -07:00
Lorenz Meier 27055184de Linux device build fix 2015-09-16 17:37:05 +02:00
Lorenz Meier 686caf4ca4 Fix semaphore handling for device on Mac OS 2015-09-16 17:10:24 +02:00
James Goppert bf18c84652 Cleanup of module building. 2015-09-09 23:00:58 -04:00
James Goppert 1d6b31d196 Switch to cmake build system. 2015-09-07 20:37:45 -04:00
Lorenz Meier d532e372ac Merge branch 'master' into ekf_voting 2015-09-05 17:41:21 +02:00
tumbili 50a5fb94ad fix logic in posix access function 2015-09-03 09:56:07 +02:00
Lorenz Meier 361f858c14 Merged master 2015-08-28 23:05:58 +02:00
Mark Charlebois 3a47434749 Fixes for qurt HIL build
Workaround required Eigen downgrade to 3.2. Hexagon toolchain does
not support C++11 features of newest version of Eigen.

Running make qurt_fixup will downgrade and patch Eigen for qurt.
Running make restore will revert the patch and do a git submodule update
to restore the expected Eigen version.

Added a "restore" target to undo qurt_fixup

Before doing a qurt build run:

    make qurt_fixup

That will downgrade Eigen to 3.2 and apply the require patch.
To build another target after downgrading:

    make restore

Them make the desired target (other than qurt).

Fixed type used in orb_priority to be consistent with the code
(int* was used in declaration but int32_t* used in code)

Removed unused class member variable in sensors.cpp

Added cmake fix for unit tests. The location of px4_log.c changed.

Fixed the qurt drv_hrt.c implementation to use us instead of ms for time resolution

Added px4_led.c to nuttx platform layer
Use the posix version of px4_led.c for nuttx so we don't end up with
duplicate files. It was moved out of common because it is not used by qurt.

Changed PX4_DEBUG to PX4_WARN when checking for the error condition for store_poll_waiter in vdev.cpp

Updated the px4_log.h file to make calls to the qurt_log functions.
The qurt_log function is defined in the platforms/qurt layer.

Added an option to control starting the commander module in HIL mode.

Moved the flight specific drivers to the configuration file instead of adding them
to the common tool chain file because HIL mode does not need them.

Added the uorb Subscriber and Publisher classes

Call PX4_ISFINITE macro instead of isfinite().

Added px4_led.c to nuttx platform layer
Use the posix version of px4_led.c for nuttx so we don't end up with duplicate files.
It was moved out of common because it is not used by qurt.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-08-25 21:59:01 -07:00
Lorenz Meier 99146ea6c3 Integrator: Improve to 3D case, add coning correction 2015-08-19 10:21:11 +02:00
Lorenz Meier 0275d770ae sensor drivers: Add integrator stub for delta angles 2015-08-19 10:21:10 +02:00
Lorenz Meier 857fced227 Integrator: Improve to 3D case, add coning correction 2015-08-19 10:15:48 +02:00
Lorenz Meier 62a4f91ed8 sensor drivers: Add integrator stub for delta angles 2015-08-19 10:15:48 +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 509ec90b76 Merge pull request #2406 from mcharleb/logging-v3
Improved logging with both compile and runtime level filtering
2015-07-01 23:31:50 +02:00
Mark Charlebois 14bf8bb277 POSIX: Critical fix for vdev_posix
Last fix for vdev_posix.cpp introduced a sleep from within
a HRT work item callback which blocks the HRT queue.

The code in uORBDevices_posix.cpp that handles message
throttling was commented out for posix. The code was re-enabled
and now seems to work.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-30 12:08:42 -07:00
Mark Charlebois da2ac877f8 POSIX: Changed px4_poll to use hrt_work queue
QuRT's pthread_cancel implementation is lacking, and causes px4_poll to
always wait for the maximumn timeout. A cleaner implementation is provided
that uses the HRT work queue for posix targets.

In the future the posix code should be rtefactiored so that qurt (and other)
implementations that are duplicated, use the posix implementation.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-29 19:08:06 -07:00
tumbili 7043869237 VDev:
- increase max number of devices to 200
- increase max number of file descriptors to 200
- add warning if number of file descriptor exceeds max value
2015-06-23 18:32:40 +02:00
Lorenz Meier 27cec4a977 VDev POSIX: Fix non-POSIX conformant return value handling 2015-06-19 11:52:07 -07:00
Lorenz Meier d81d20ff0e VDev: Add missing break 2015-06-19 11:51:37 -07:00
Mark Charlebois 1a8703ec1c Improved logging with both compile and runtime level filtering
The device level debug will have to be removed and the debugging
can be based on this new logging structure which can tell where
an error (or debug output) occured whch the current implmentation
cannot.

The one limitation is the new macros cannot take a char* for the
format parameter. It must be an actual string literal because it
is concatenated with other strings.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-17 13:28:27 -07:00
Lorenz Meier b06a533555 OS X porting: Make unit tests compile on OS X 2015-06-13 11:07:17 +02:00
Mark Charlebois 83bcb95999 POSIX: Added sleep command
The baro was not fully initialized when the sensors module tried to
open it. Added a sleep command and a sleep 2 to rc.S so the baro
is initialized by the time the sensors module tried to read it.

Fixed other noisy errors

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-11 17:28:46 -07:00
Mark Charlebois 6cb26de74c Multi-uORB support changes - part 1
This adds support for a dynamic build for QuRT and initial
Multi-uORB changes to enable communication between the DSP and
the application processor.

This part of the changes do not affect the POSIX build. This is
enablement for the QuRT build using Multi-uORB. The second part
of the changes will be added in a new module under src/modules.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-08 22:21:59 -07:00
tumbili fb778af8b3 increase max file descriptors to 100 2015-06-08 22:21:58 -07:00
Lorenz Meier fe82b412f6 Merge pull request #2269 from mcharleb/uorb-posix-fix
Created px4_access to handle check of virtual files
2015-06-04 08:39:56 +02:00
Mark Charlebois f985a48fbc Created px4_access to handle check of virtual files
uORBManager_posix.cpp did a stat to see if a file exists but the
file is actually a virtual file. Using stat was incorrect because
it required a stat buffer that was never used. The POSIX access
function is a better choice so I created a px4_access version to
handle virtual files.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-03 16:22:14 -07:00
Mark Charlebois b4152f3daa POSIX: Fixed output for list_topics, list_devices, etc
Removed extra carriage returns in output strings

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-02 16:55:37 +00:00
Mark Charlebois 6343b2c56f px4_poll fix - was sleeping for usec instead of ms
There was a conversion error in the timeout (in ms)
passed in and the ts.tv_nsec field of the struct timeval.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-29 13:26:29 -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 379075d29c POSIX: Increased number of devmap entries
The orb_advertise and/or orb_publish calls were failing because
there were not enough devmap entries allocated for all the orb
topics advertised.

The number of entries was increased from 50 to 100.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-25 23:20:19 -07:00
Ban Siesta aac276872b ringbuffer: use a namespace for ringbuffer to avoid 'multiple definitions in vtable' bug 2015-05-24 10:02:08 +01:00