Commit Graph
82 Commits
Author SHA1 Message Date
tumbili f91af2221f fix sem error for linux 2015-12-01 16:51:38 +01:00
Lorenz Meier a54b40c457 Do not redefine GNU source in platform for POSIX 2015-12-01 13:50:12 +01:00
Lorenz Meier 855dcf7069 Add missing header for Linux 2015-12-01 13:41:48 +01:00
Lorenz Meier 069ebebb27 PX4 layer: Code style fixes 2015-12-01 12:44:06 +01:00
Lorenz Meier 85079125f4 posix tasks: Add px4_prctl() call 2015-12-01 12:03:21 +01:00
Lorenz Meier 72287aab3f Main app: set thread name 2015-12-01 12:02:43 +01:00
Lorenz Meier cf17ef4d41 PX4 semaphores: Add excellent debugging output on failure for Mac OS 2015-12-01 10:28:05 +01:00
Lorenz Meier 0c2b6bf9d1 POSIX: Set the thread name for better debugging 2015-12-01 10:27:39 +01:00
Mark Charlebois 1aeca4f64d Fixed code format and removed unused std::list
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-11-23 23:09:10 -08:00
Lorenz Meier a7cb170cc4 PX4 semaphores: Formatting fix 2015-11-23 22:05:17 +01:00
Lorenz Meier e2894c4a46 Added timed wait semaphore 2015-11-23 19:50:44 +01:00
Lorenz Meier 2730d8ab20 Fix HRT init compile error 2015-11-22 15:50:14 +01:00
Lorenz Meier 17882cee78 Fix Travis build error 2015-11-22 15:17:07 +01:00
Lorenz Meier 65cca56c29 Code style fix 2015-11-22 14:07:27 +01:00
Lorenz Meier 9c13e4c4be Fix race in task create 2015-11-22 14:01:52 +01:00
Lorenz Meier 734ec9094e Posix tasks: Initialization and locking 2015-11-22 14:01:52 +01:00
Lorenz Meier e3b13e1324 HRT: initialize queue 2015-11-22 14:01:52 +01:00
Lorenz Meier cda3c28661 HRT driver: Initialize work struct 2015-11-22 14:01:52 +01:00
jgoppert ca5a2d1fca Fixed some sitl init bugs. 2015-11-07 11:49:06 -05:00
Lorenz Meier 63bc4e0202 Fix HRT format 2015-11-07 10:14:46 +01:00
Lorenz Meier f170272669 Mac OS: Fix clock 2015-11-07 09:30:13 +01:00
jgoppert 0106be3e89 Added local position estimator. 2015-10-24 20:34:33 +02:00
Lorenz Meier d60f201dc8 POSIX: Fix formatting 2015-10-19 13:35:46 +02:00
Lorenz Meier eb6553d923 Fix POSIX backtrace compile 2015-10-19 09:48:27 +02:00
Mark Charlebois 8e82ced5a4 Added backtrace function
Added PX4_BACKTRACE() to display stack trace for debugging

Added backtrace for HRT reschedule with 0 timeout

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-10-19 09:41:49 +02:00
James Goppert 2a60ffd554 Added stdc_format_macros for all inttypes.h includes. 2015-09-24 17:44:27 -04:00
Lorenz Meier d32f9f043b HRT: Better debugging 2015-09-20 16:43:34 +02:00
Lorenz Meier 8509c5f220 Fix clock generation on Mac OS X 2015-09-20 12:53:33 +02:00
Lorenz Meier 604644d823 POSIX: Improvements on semaphore abstraction 2015-09-20 00:26:56 +02:00
Lorenz Meier 50061a95a4 POSIX: Add sem_getvalue() abstraction 2015-09-19 18:24:14 +02:00
Lorenz Meier ef48715051 POSIX: Add pthread mutex based semaphores 2015-09-19 18:22:00 +02:00
Lorenz Meier c89f51b8ef POSIX: Fix HRT semaphores for Mac OS 2015-09-16 18:13:10 +02:00
Lorenz Meier 63f9a1e609 POSIX: 1) Really exit on CTRL-C, 2) Clean up boot log, 3) add eye-candy! 2015-09-12 15:45:19 +02:00
Lorenz Meier 0f98a7c141 OS X: Add missing time calls 2015-09-11 21:48:06 +02:00
James Goppert 1d6b31d196 Switch to cmake build system. 2015-09-07 20:37:45 -04:00
Lorenz Meier 54209af679 POSIX: Improve shell so it does not spam the user, enable CTRL-C to actually quit the application. Twiddle the app boot delay to avoid a race with the commander app. Needs a proper fix on the startup sequencing. 2015-09-06 15:37:35 +02:00
Mark Charlebois d94aa84657 Add daemon mode to posix build
In order to use upstart to run PX4 it needs to run in daemon mode.
Added ability to test if a task is running in order to gracefully
shut down muorb.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-08-28 16:06:36 -07: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
Mark Charlebois 009f528266 Fixes for posix-arm and qurt builds
Ifdefed out deadcode in position_estimator_inav_main.c as the
deadcode does not compile for qurt.

Added fixes to get a successful build for posix-arm and qurt targets.
Removed CLOCK_REALTIME def from px4_time.h for qurt and removed unused
variables in att_est_q and mc_att_control.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-08-05 18:34:46 -07:00
Mark Charlebois a96db1580f Platform cleanup - remove duplicate files
The POSIX and QURT platforms contain several duplicate files.
These files have been factored out into platforms/posix/work_queue.
The config files have been updated to include the
platforms/posix/work_queue module.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-28 20:08:50 -07:00
devbharat 68e3c477ed Tested mc_att_control_m and mc_pos_control_m in jmavsim.OK. 2015-07-16 18:00:22 +02:00
Lorenz Meier abfb0bbd38 POSIX: Silence HRT red herring 2015-07-08 23:30:39 +02:00
Lorenz Meier f689321ded POSIX: HRT: Be more verbose on error 2015-07-05 13:46:49 +02:00
Lorenz Meier 7b8f7f7ac4 Posix tasks: Mark task creation 2015-07-05 13:45:42 +02:00
Lorenz Meier f0f28d5420 POSIX SIM: Reset the HRT on system boot 2015-07-04 08:35:11 -07:00
Lorenz Meier 9c60154a28 POSIX HRT Driver: Count from 0, not UNIX epoch 2015-07-02 17:27:28 +02:00
Lorenz Meier f411b7ed21 Merge branch 'getopt-cleanup-v2' 2015-07-02 00:26:57 +02: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
Mark Charlebois f7fe6a037d Converted getopt use to px4_getopt
In the posix and qurt builds, getopt is not thread safe so px4_getopt
should be used instead.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-19 11:39:08 -07:00
Mark Charlebois d66b6ea701 POSIX: px4_getpid() fix
Since the PX4 code uses both px4_task and pthread APIs,
px4_getpid() must be save to call from either context.

On posix, this means we have to always return the pthread ID.

Reverted simulator change of pthread to px4_task

There may have been side effects if this was build for a target that
has process/task scoped file descriptors. It is now safe to call
px4_getpid() from this pthread context with this change for the
posix build for px4_getpid().

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-15 08:25:57 -07:00