Commit Graph

1033 Commits

Author SHA1 Message Date
Beat Küng e75f5a4642 perf_counter: add perf_print_counter_buffer & perf_iterate_all
These can be used to print the perf counters to a buffer.
2017-04-01 20:19:52 +02:00
Beat Küng 4a7e02c640 systemlib/visibility.h: remove this file
This is duplicated in src/include/visibility and is directly included via
compiler flag '-include'
2017-03-29 23:02:09 +02:00
Beat Küng be2d10ff45 px4_nuttx_tasks: call clearenv() before task_create
Frees up around 6kB of RAM on Pixracer & Pixhawk.
2017-03-29 23:02:09 +02:00
Beat Küng d7703173b2 Critical: Fixes Snapdragon Flight parameter synchronization problem (#6910)
* cmake: Fixes problem caused when the generated parameters.xml differs for the ARM and DSP builds.

* fix px4_getopt.h: add accidentally removed file
2017-03-28 16:10:17 +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
Beat Küng b4290b6b52 params: make param_t uint16_t on NuttX
param_t is only used as an offset and we have <1000 params, so an uint16_t
is enough.
This saves roughly 1KB of RAM. We only do that on NuttX because normal
integers have better performance in general.
Previously on amd64, this was even 64bits because it was an uintptr_t.
2017-03-14 21:30:53 +01:00
Beat Küng b0439836f6 refactor drv_led.h: rename to drv_board_led.h
This makes it clear that it's used to control the board LED's, not external
LED's.
2017-03-12 00:08:35 +01:00
Beat Küng 4b1bbaa114 posix: remove rgbledsim driver which does nothing
In addition this is almost a copy of the rgbled driver
2017-03-12 00:08:35 +01:00
jwilson 62200e2a81 WIP: Temporary fix for a problem which prevents arming on the Snapdragon Flight board. 2017-03-10 08:54:08 +01:00
jwilson 4f9245cc9c Resolves a conflict in the type of the index parameter in the dm_read and dm_write function signature, caused by a recent change in the dataman code. This problem was causing the loading of the flight stack to fail on the aDSP. 2017-03-08 15:04:20 +08:00
ustbguan 68701b197a use mBar 2017-03-03 13:43:27 +00: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
Beat Küng df8f0da70c param & param_shmem: enable locking
We need to protect access to the param_values array. This is dynamically
allocated and resized (utarray_reserve() calls realloc). If some thread
was iterating the array while another was resizing the array, the first one
would iterate on a freed array, thus accessing invalid memory.

On NuttX this could lead to hardfaults in rare conditions.

Unfortunately we need to initialize the semaphore on startup, by calling
sem_init(). This adds a param_init() method called by every board/config
that uses the params (at least I think I've found all of them)
2017-02-17 11:27:08 +01:00
David Sidrane a2fa199a26 Define PX4_FLASH_BASE in micro HAL 2017-02-13 21:37:38 +01:00
David Sidrane bc8b117e85 common board idenity cleanup and add mfguid to api
Remove the notion of legacy from the api. The board level code
   will perform the traslation to lecacy format on the STM32.
   new targets will not need to do this as there is no case
   where the serial number were used by mfg for tracking.

   Extend board common api to get mfguid and mfguid formatted

   This adds an api that return the MFGUID as an array of bytes
   or a string.

   The data is returned with the MSD at index 0 and the LSD at
   index PX4_CPU_MFGUID_BYTE_LENGTH-1.

   Removed all reodering defines from the api and hal
2017-02-04 22:27:04 +01:00
Lorenz Meier 6bd29b24f6 POSIX: Avoid missing prototype warning on some POSIX platforms 2017-02-04 21:06:21 +01:00
Lorenz Meier ce921345cf POSIX: Stub power management support 2017-02-04 21:06:21 +01:00
Daniel Agar 070cd55636 clang-tidy readability 2017-02-01 22:15:50 -05:00
Daniel Agar 96e51f7c59 clang-tidy remove redundant 2017-02-01 22:15:50 -05: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
Beat Küng 998a407148 SITL: better formatting of help output 2017-02-01 08:40:23 +01:00
Paul Riseborough 253683af5f drivers: Don't require driver level gyro offsets to be non-zero 2017-02-01 08:40:23 +01:00
Paul Riseborough c00c638b77 Remove IMU calibration parameter checks 2017-02-01 08:40:23 +01:00
Daniel Agar 278b76e5a9 astyle src/platforms/qurt 2017-01-29 01:18:32 +01:00
Daniel Agar 501f866bf5 astyle src/platforms/posix 2017-01-29 01:18:32 +01:00
Daniel Agar ca60d2d15f astyle src/platforms/ros 2017-01-29 01:18:32 +01:00
Roman c065dc1930 bebop bus wrapper: fix logging of rpm and rpm setpoint
Signed-off-by: Roman <bapstroman@gmail.com>
2017-01-28 20:18:01 +01:00
Roman 1d4d57c4db bebop bus wrapper: log actual and setpoint motor speed
Signed-off-by: Roman <bapstroman@gmail.com>
2017-01-28 20:18:01 +01:00
Roman 0c7c5977ae bebop motor driver: better naming, removed unused header file
Signed-off-by: Roman <bapstroman@gmail.com>
2017-01-28 20:18:01 +01:00
Larry Wang 72ea5c53db qurt px4_layer initialize shared memory (#6453) 2017-01-27 17:59:12 -05:00
David Sidrane af12816296 posix derived targets use BOARD_OVERRIDE_CPU_VERSION for mcu_version 2017-01-26 08:39:12 +01:00
David Sidrane 93f2cf077f posix derrived targes use BOARD_OVERRIDE_UUID 2017-01-25 07:43:11 +01:00
David Sidrane bf0de997cb Adds a board common way of retriving the SoC' Unique identifier
This abstraction will support mcu's with longer ID's then the
   stm32 family.

   It provids a common interface for byte and 32 bit word access
   to the UUID data and a facility to reorder it.
2017-01-25 07:43:11 +01:00
David Sidrane f3f235376b PX4 System changes you use board common reset interface 2017-01-24 21:17:06 +01:00
David Sidrane feb76b4649 Unit test does not have a board_config.h 2017-01-21 11:45:36 +01:00
David Sidrane df1ed22cf9 Distribute sitl and board based assets for posix targets
This adds a src/board/<bebop|eagle|excelsior|rpi|sitl>/board_config.h
   to configure the build as is done with the Nuttx targets

   src/platforms/posix/include/board_config.h has been renamed to
   src/platforms/posix/include/system_config.h to allow the common
   posix defines to be included with the board specific defines.
2017-01-21 11:45:36 +01:00
David Sidrane 99902807c9 SITL Moved magic numbers for battery V div and A per V to px4_config.h 2017-01-21 11:45:36 +01:00
Michael Schaeuble 7aea2ca030 BebopFlow: Add V4L2 interface and image functionality 2017-01-20 23:09:13 +01:00
Michael Schaeuble f572752412 BebopFlow: Add initial PX4 app and structure 2017-01-20 23:09:13 +01:00
Michael Schaeuble 85aa710414 BebopRangeFinder: Integration into build and starup 2017-01-20 23:09:13 +01:00
Michael Schaeuble 6cb659c8ef BebopRangeFinder: Add DF wrapper for Bebop's height sensor 2017-01-20 23:09:13 +01:00
Lorenz Meier 9f0d588989 Simulated drivers: Use fake device IDs 2017-01-19 19:24:52 +01:00
Lorenz Meier 49a29ee775 Fix up DriverFramework wrappers, bring them back to the real device ID they have already in-built 2017-01-19 19:24:52 +01:00
Paul Riseborough edbe68f833 posix drivers: use orb instance as surrogate sensor ID for simulated IMU 2017-01-19 19:24:52 +01:00
Paul Riseborough c21b4aaf2e posix drivers: Populate baro device ID
TODO - use unique HW ID
2017-01-19 19:24:52 +01:00
Paul Riseborough da87e3eb0a posix drivers: Populate device ID in sensor topics for simulated IMU 2017-01-19 19:24:52 +01:00
Paul Riseborough 961474f430 posix drivers: Populate device ID in sensor topics for mpu9250 2017-01-19 19:24:52 +01:00
Paul Riseborough 1009550262 posix drivers: Populate device ID in sensor topics for mpu6050 2017-01-19 19:24:52 +01:00
Paul Riseborough 48f81f24e1 posix drivers: Populate device ID in sensor topics for lsm9ds1 sensor 2017-01-19 19:24:52 +01:00