Beat Küng
eeb1895922
i2c_posix: fix simulate variable cannot be assigned on QuRT
2017-07-13 16:53:28 +02:00
Beat Küng
bf11362dae
i2c_posix: fix use of wrong device path
...
previously, get_devname() was used as the I2C device path, but on NuttX,
get_devname() is the device file which the driver creates. This patch
changes it, so the sematics are the same as on NuttX: both now use _bus
to decide to which I2C bus device to talk to.
I did not see any other use-cases than the led on ocpoc.
2017-07-13 16:53:28 +02:00
Nicolae Rosia
2092770361
Integrator: fix comparison
...
Signed-off-by: Nicolae Rosia <nicolae.rosia@gmail.com>
2017-07-06 08:48:44 +02:00
Daniel Agar
40d40330b8
delete unused pio
2017-06-29 03:23:39 -10:00
Daniel Agar
4937449890
move parameter unittest into systemcmds
2017-06-12 12:18:53 -04:00
Phillip Khandeliants
5012dffeae
Potentially infinite and deleted loops found by PVS-Studio ( #7100 )
...
- Fixed V712
- The compiler can optimize this code by creating an infinite loop, or simply deleting it.
- There is need to add a volatile qualifier to the '_ExitFlag' and 'sim_delay' variables.
2017-04-21 11:13:06 -04:00
Beat Küng
0165633bf3
board_config: remove px4_board_pwr, use px4_shutdown_request instead
...
px4_board_pwr has become obsolete with the addition of board_shutdown
2017-04-20 10:01:51 +02:00
James Goppert
7659402fdb
WIP: valgrind runtime analysis and fixes ( #6521 )
...
* Fix several valgrind identified mem leaks
* Added callgrind target.
* px4_posix_tasks use nullptr
2017-02-17 12:36:52 -05:00
Lorenz Meier
6bd29b24f6
POSIX: Avoid missing prototype warning on some POSIX platforms
2017-02-04 21:06:21 +01:00
Daniel Agar
6631e72d6f
clang-tidy modernize-redundant-void-arg
2017-02-01 22:15:50 -05:00
Daniel Agar
e927f3e040
clang-tidy modernize-use-nullptr
2017-02-01 22:15:50 -05:00
Lorenz Meier
a520c62d1a
Allow setting the device ID in device driver
2017-01-29 16:24:47 +01:00
Lorenz Meier
33f6316d3c
Device: Also allow to read bus type
2017-01-29 16:24:47 +01:00
Daniel Agar
8fbf5cbdaf
astyle src/drivers/device
2017-01-29 01:18:32 +01:00
Daniel Agar
751909cd4e
clang readability-braces-around-statements ( #6298 )
2017-01-11 17:01:51 -05:00
David Sidrane
c9f10107c0
Nuttx Upgrade:Adds sem_setprotocol
2016-12-21 08:34:21 +01:00
David Sidrane
dcc2d1c3d1
I2C changes for upstream NuttX per trasaction freq control
2016-12-21 08:34:20 +01:00
David Sidrane
fd7d399958
Upstream Nuttx restructured directories use micro_hal
2016-12-21 08:34:20 +01:00
Michael Schaeuble
bdb76d013e
Fix incorrect MPU9250 device ID
...
We propagate the bus parameters from the bus interface to the sensor
devices. Thus, the device ID of the sensor driver is set to the correct
bus id and address. Otherwise it would be zero, which is an issue if several MPU9250s
are running at the same time.
2016-12-09 18:59:42 +01:00
Beat Küng
dc6ca7c372
VDev & CDev: dynamically allocate & resize _pollset array
...
In most cases, really only 1 element is needed. The dynamic allocation
handles cases where more are necessary. This is all done within a locked
state, so no races can occur.
Frees roughly 2.3KB RAM.
2016-11-14 10:27:57 +01:00
Beat Küng
9448e0d673
vdev: remove wrong comment
2016-10-23 15:25:20 +02:00
Beat Küng
03c12c4c78
Device: use uint16_t for _open_count instead of int (save space)
2016-10-23 15:25:20 +02:00
Beat Küng
a5e6f3213f
Device: remove _irq_attached flag, test with _irq == 0 instead
2016-10-23 15:25:20 +02:00
Lorenz Meier
45f740e210
Device: Allow access to device id
2016-09-04 19:11:28 +02:00
Beat Küng
e2afb0be6b
px4_log.h: remove hrt_absolute_time() declaration (it does not belong here)
2016-08-24 21:24:35 +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
Paul Riseborough
2b370417e8
drivers: Correct IMU coning correction implementation
...
Previous did not match the matlab simulation in: https://github.com/priseborough/InertialNav/blob/master/models/imu_error_modelling.m
2016-05-28 11:47:23 +02:00
Daniel Agar
69c1ce1714
WIP logger serialization
2016-05-14 11:27:07 +02:00
Daniel Agar
eb29b33620
use gcc attributes to align and pack
2016-05-14 11:27:07 +02:00
Julian Oes
080a136e50
integrator: add function to return filtered data
...
Instead of only being able to get the integral and its integration time,
it can also be handy to get the integral divided/differentiated by the
the integration time. This data is then just filtered by the integrator.
2016-05-12 12:41:40 +02:00
Julian Oes
f528c63030
integrator: add a put method for known intervals
...
This adds a second put method to the integrator class. This allows to
integrate with known intervals between samples, rather than based on
timestamps. This makes integrating the samples coming out of the MPU9250
FIFO buffer easier.
2016-05-04 22:28:19 +02:00
Beat Küng
1ce5d795be
orb: move SmartLock into global space and use it also for NuttX
2016-04-29 11:15:16 +02:00
Beat Küng
9a0cff2a00
vdev: add a SmartLock class that automatically unlocks when going out of scope
2016-04-29 11:15:15 +02:00
Beat Küng
aacfd8d553
orb: add some comments about locking
2016-04-29 11:15:15 +02:00
Julian Oes
d824ca3a14
integrator: fix style
2016-04-25 12:48:48 +02:00
Julian Oes
302bf879de
integrator: improvements and cleanup
...
The integrator had an untested read mode which did not apply the coning
correction. Instead of keeping two integrals (auto/read) it is now one
and the reset mechanism can be selected by setting the
auto_reset_interval to 0 to disable it or some positive number else.
Also, the integrator could potentially explode if a (single) timestamp
was wrong, so before the last integrated one. This is now caught with a
dt of 0 instead of inf/nan.
2016-04-25 12:48:48 +02:00
Julian Oes
b49b012d35
ringbuffer: update header file
...
The header file was not in source with the source file.
2016-03-24 13:09:16 +01:00
jwilson
9a97140ad8
Removing test code.
2016-02-19 16:59:49 +01:00
jwilson
b31472af0c
Cherry-picked i22438c8
...
Original description:
Modified the sensor module to prevent the selection of an invalid
secondary/tertiary gyro if the primary gyro times out
2016-02-19 16:59:49 +01:00
Julian Oes
fbac24ad28
vdev_posix: switch back to CLOCK_REALTIME
...
Otherwise SITL doesn't work anymore, at least on Linux
2016-02-19 16:59:48 +01:00
Julian Oes
1cd49a6dd5
vfile.cpp: added file that got removed in merge
2016-02-19 16:59:47 +01:00
Julian Oes
7a42b259b2
device.h: add file which got lost in merge
2016-02-19 16:59:47 +01:00
Julian Oes
b2ad3f5fbd
POSIX: get px4_poll right
...
Like this the timeouts are going through instead of hanging everything.
2016-02-19 16:59:47 +01:00
Mark Charlebois
014f15d8b0
Rebase changes on upstream master
...
This brings in many of the changes from the PX4 fork on ATLFLight.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-02-19 16:59:43 +01:00
Lorenz Meier
15e7b19991
uORB: Block on simulation delay for orb_check() calls as well
2016-02-05 16:36:43 +01:00
Lorenz Meier
443a58cafe
px4_poll() on POSIX: Block execution in simulation if required
2016-02-05 00:53:58 +01:00
Lorenz Meier
e88367d722
SPI: Support setting the lock mode
2016-01-22 17:11:46 +01:00
Lorenz Meier
20c8c6a2fa
Fix VDev formatting
2016-01-07 22:24:10 +01:00
Lorenz Meier
cb52a7eeec
Raise number of max FDs for VDev
2016-01-05 22:53:27 +01:00
Lorenz Meier
fc2b9a5031
Print backtrace on file descriptor exceed error
2016-01-05 19:03:29 +01:00