Commit Graph

442 Commits

Author SHA1 Message Date
Lorenz Meier a1f93f52b0 Merge pull request #2811 from mcharleb/qurt_rebase_updates-3
Qurt rebase updates 3
2015-09-05 11:55:03 +02:00
tumbili 9f90b87745 implemented driver for simulated airspeed 2015-09-04 22:34:28 +02:00
Mark Charlebois 54bae34a2c Build fixes for qurt after rebase on PX4 master
Removed the re-definitions of the usage method in the posix/main.cpp file.
Added qurt_external_hook interface to call externally linked module.
Fixed code format to comply with PX4 style.
Added usage information to main app and handled cases for unknown arguments.
Fixed the orb_priority interface to use int32_t instead of int.
Fixes to get hil working with led changes.
Added the config_eagle_adsp.mk file and update the make files to to use new
include/lib paths

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-09-04 11:09:29 -07:00
Mark Charlebois 2579b29691 POSIX: Fix for daemon mode to process commands after init
Commands were being processed before init was called.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-08-30 00:18:41 -07: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
Lorenz Meier e30c822068 POSIX: Throw an error if the startup script is not present 2015-08-28 10:47:25 +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
Mark Charlebois ce49145c1d Removed DSPAL header include in px4_workqueue.h
This was mistakenly added in a bad merge.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-08-11 12:50:44 -07: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
Mark Charlebois faae76e3c7 Removed __PX4_QURT ifdefs from application layer
Replaced test for __PX4_QURT with test for NAV_DEBUG.

Optimized implementation to remove code when flag is not set.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-08-06 12:51:20 -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 c1317ad463 POSIX: code format changes
Changed the code format of the files derived from NuttX to match the code
style of PX4.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-30 17:19:55 -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
Don Gagne 93455b92e4 Fix duplicate param definition 2015-07-22 09:59:02 -07:00
Lorenz Meier 9bfa214f63 Merge pull request #2569 from tinito/master
Model name from ROS parameter server instead of hardcoded string
2015-07-17 10:22:48 +02:00
devbharat 68e3c477ed Tested mc_att_control_m and mc_pos_control_m in jmavsim.OK. 2015-07-16 18:00:22 +02:00
tinito 494932aeb7 Model name from ROS parameter server instead of hardcoded string 2015-07-16 14:53:07 +02:00
Mark Charlebois 56d12caa9a Updates to QuRT muorb tests
Added usleep test and fixed code format errors.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-09 21:32:13 -07:00
Lorenz Meier 16cb971d63 POSIX: Increase app start spacing 2015-07-09 00:48:53 +02:00
Lorenz Meier fc3a85311d POSIX: Run main apps delayed 2015-07-09 00:01:34 +02:00
Lorenz Meier df4b07937e baro sim: Fix code style 2015-07-09 00:01:20 +02:00
Lorenz Meier abfb0bbd38 POSIX: Silence HRT red herring 2015-07-08 23:30:39 +02:00
Lorenz Meier fc9d6ac39b POSIX baro SITL: Failed advert type is pointer, not number 2015-07-05 16:16:57 +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 a02319e901 PX4 log: Fix formatting for debug and trace builds 2015-07-05 11:03:27 +02:00
Lorenz Meier f0f28d5420 POSIX SIM: Reset the HRT on system boot 2015-07-04 08:35:11 -07:00
Lorenz Meier 46a6082a26 POSIX: remove shell delay 2015-07-04 08:09:31 -07:00
Lorenz Meier 0499ddb1dd POSIX: Add debug output to show where the app returns 2015-07-04 07:25:08 -07:00
Lorenz Meier 95eaebb28d Merge branch 'release_v1.0.0' 2015-07-04 10:47:18 +02:00
Andreas Antener 88d200e3a4 set altitude control flag for velocity control 2015-07-03 14:36:55 +02:00
Lorenz Meier 9c60154a28 POSIX HRT Driver: Count from 0, not UNIX epoch 2015-07-02 17:27:28 +02:00
Mark Charlebois d219076d52 POSIX: added muorb tests
Unit tests for muorb on posix build. These run on the Krait processor.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-01 21:33:21 -07:00
Lorenz Meier 8ce38cefae Merge pull request #2509 from mcharleb/qurt-layer
Qurt layer
2015-07-02 01:11:48 +02:00
Mark Charlebois 0e7fab457b Removed extra whitespace
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-01 15:59:20 -07:00
Lorenz Meier 347e3e9a7e PX4 log header: Add missing include 2015-07-02 00:37:39 +02:00
Lorenz Meier f411b7ed21 Merge branch 'getopt-cleanup-v2' 2015-07-02 00:26:57 +02: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
Lorenz Meier 13e585f9fb Merge pull request #2500 from mcharleb/systemcmds-tests-posix
Systemcmds tests posix
2015-07-01 23:25:54 +02:00
Mark Charlebois b5e6111d7c QuRT: src/platform/qurt changes
Changes to support QuRT intrgration with DSPAL and
move from simulator to real HW.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-01 12:54:27 -07:00
Mark Charlebois 6b5a9d6c7b QuRT: Unit tests for QuRT
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-01 09:29:05 -07:00
Mark Charlebois 63f7995b41 NuttX: fixes for printing size_t and int64_t
Added definition of PRId64 for C99 compatibility.
Used %zd for portable wat to print size_t.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-07-01 07:51:24 -07:00
Lorenz Meier 9c7450248f Merge pull request #2498 from mcharleb/bringup-m5
POSIX: Critical fix for vdev_posix
2015-07-01 15:13:29 +02:00
Mark Charlebois d0b6c8f956 GCC: Added fix for strict prototypes warning
GCC requires a declaration of a static inline function prior to its
definition when strict-prototypes warning is enabled.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-30 15:20:04 -07:00
Lorenz Meier 428bd0a9ec Merge pull request #2497 from mcharleb/bringup-m5
Bringup m5
2015-06-30 20:02:57 +02:00
Mark Charlebois 1b01c54dd1 POSIX: fixed build error for unused variable
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-30 09:53:01 -07:00
Mark Charlebois 34d15fe631 Gyrosim cleanup
Removed unused code. Reset reschedule interval for sampling when the
sampling rate is changed.

The rate is always 1000Hz as it is set to the default value.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-30 09:23:37 -07:00
Mark Charlebois 641fd26877 QuRT: Fixed PX4_ISFINITE
QuRT needs to use the builtin version of isfinite so for the qurt
build PX4_ISFINITE(x) is defined as __builtin_isfinite(x).

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-30 09:10:06 -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
Lorenz Meier cddfcb35d8 Posix main: Only delay app startup 50 ms 2015-06-27 11:55:21 -07:00