923 Commits

Author SHA1 Message Date
mcsauder
9d67bbc328 Standardized/updated copyright file headers in the src/systemcmds/tests/ directory. 2019-01-30 14:25:18 -05:00
mcsauder
dc5f18bdcd ToneAlarm class refactoring to implement an interface for hardware specific methods and a single ToneAlarm class. 2019-01-28 18:58:04 -08:00
David Sidrane
f00d633196 flashfs:Upstream renamed up_progmem_erasepage to up_progmem_eraseblock 2019-01-25 06:32:37 -08:00
Daniel Agar
2ffb49b734 delete px4_includes.h header and update boards/ to use syslog 2019-01-23 18:25:18 -05:00
Lorenz Meier
502cd987ee SD Bench: No need for atomic timing
This leads to less jitter in the benchmark
2019-01-22 23:52:57 +01:00
Lorenz Meier
01b7a11255 SD bench: Retain atomic operation.; 2019-01-22 23:52:57 +01:00
Lorenz Meier
f21bc89a90 Unit tests: Retain atomic operation
This ensures we get absolutely accurate timing.
2019-01-22 23:52:57 +01:00
Daniel Agar
320d2e9383
create PX4 platform layer initialization helper (#11269)
- starts requirements for PX4 modules (hrt, param, etc)
2019-01-22 14:13:20 -05:00
Daniel Agar
572d1cefe8 test_mixer remove <limits> usage
- <limits> isn't available in the NuttX c++ standard library
2019-01-21 09:27:10 -05:00
Daniel Agar
658d734068 param add status 2019-01-18 11:50:37 -05:00
Daniel Agar
84724d5e1d param show default only active parameters
- add -a option to display all possible system parameters
2019-01-18 11:50:37 -05:00
Daniel Agar
60f2a92e3d replace <cfloat> with <float.h>
- <cfloat> isn't available in the NuttX c++ library
2019-01-06 19:20:57 -05:00
Beat Küng
5b4a77a67b params: add possibility to access files if flash-based params are enabled
- the flash-backend is selected by specifying nullptr as file or -1 as fd
- the default file is nullptr, and thus the FLASH
- 'param select' has no effect, FLASH is always the default

Thus there should be no functional change to existing setups.
2018-12-23 15:49:37 -05:00
Julian Oes
d75389b2e4 platforms: consolidate latency_buckets
These symbols were duplicated all over the place.
2018-12-22 10:32:18 +01:00
Julian Oes
f0ce300744 platforms: move latency_buckets to perf.c 2018-12-22 10:32:18 +01:00
Julian Oes
d70b0f1c8c Replace sleep with px4_sleep
This is another step to isolate time from the system.
2018-12-22 10:32:18 +01:00
Julian Oes
5b9dea5604 Replacing usleep with px4_usleep
This is a step towards isolating time from the system.
2018-12-22 10:32:18 +01:00
Beat Küng
cf66656258 mixer multirotor: add unit-tests
To run:
cd src/lib/mixer
make tests

This will validate the C++ implementation by taking the python
implementation as ground-truth. It runs through various actuator control
command values for all airmode variations and several mixer types.

The python script also allows to prototype new mixer algorithms.

It is not integrated into the existing build system, because it's easier
to use that way, with less dependencies, and faster testing workflow.
It could however be a bit more integrated.

Reference: https://github.com/Auterion/Flight_Control_Prototyping_Scripts/tree/master/control_allocation
2018-12-13 09:50:07 +01:00
Beat Küng
c659d2bcc2 mixer: minor refactoring to reduce header include dependencies
- avoid including <px4_defines.h> from the math headers
- avoid driver include <drivers/drv_mixer.h> from the mixer
2018-12-13 09:50:07 +01:00
Hamish Willee
11364c0e01 Improve forcefail/terminatefail docs 2018-12-10 15:30:53 -08:00
Daniel Agar
d4e06e517a delete drv_gpio.h, modules/gpio_led, and fmu GPIO ioctls 2018-12-03 16:30:39 +01:00
Daniel Agar
93802c2710
hysteresis test increase time on cygwin (#10958) 2018-12-03 09:39:43 -05:00
Daniel Agar
fecdfe5fbc move posix/tests/hrt_test to systemcmds/tests/hrt_test 2018-11-26 14:40:14 -08:00
Daniel Agar
3e0a3559a9 cmake use standard mechanisms for settings flags 2018-11-26 14:40:14 -08:00
Daniel Agar
ec4c9da253 remove BOARD_NAME from board_config.h and set automatically 2018-11-26 14:40:14 -08:00
Daniel Agar
abb3817d31 boards new split VENDOR_MODEL naming convention 2018-11-26 14:40:14 -08:00
Daniel Agar
f692ad04d0 boards organization 2018-11-26 14:40:14 -08:00
Mara Bos
d13836eb1e Add dynamic modules on Posix.
You can now add `DYNAMIC` as an option to `px4_add_module`, which will
cause that module to no longer be compiled into the px4 executable, but
instead produce a separate shared library file, which can be loaded and
executed with the new `dyn` command:

    pxh> dyn ./hello.px4mod start

This will load the shared object file `hello.px4mod` if it wasn't
already loaded, and execute its main function with the given arguments.
2018-11-24 01:58:09 +01:00
Mara Bos
e9fb17c51a Always use FILE* for standard output.
The threads running commands for clients through the Posix daemon used
to write to a char buffer through snprintf (etc.) which was then written
directly to the file descriptor, whereas in the other case printf
(etc.) was used to write to stdout (FILE*). Both versions used some
macro's and repeated code to have the same output.

This change unifies these two cases by using a FILE* in both cases. The
(line) buffering is done by the standard C library's implementation
(just like with stdout), and px4_log.c now uses the same code in all
cases (using fprintf, etc.) for printing (colored) output.
2018-11-23 12:15:41 +01:00
Roman Bapst
90bfdb6f0a VTOL rate control architecture improvements (#10819)
* attitude and rate setpoint message: use 3D array for thrust demand
* FixedWingAttitudeControl: rework airspeed scaling
  * move airspeed and scaling calculation into separate method
  * if vtol in hover and airspeed disabled use minimum airspeed instead of trim airspeed
2018-11-21 20:32:40 -05:00
Daniel Agar
8dfd55fc9e delete unused IOCTL SENSORIOCGPOLLRATE 2018-11-06 07:43:43 +08:00
Daniel Agar
d76155107c delete unused IOCTL MAGIOCGRANGE 2018-11-06 07:43:43 +08:00
Daniel Agar
0ea18b2b73 delete unused IOCTL MAGIOCGSAMPLERATE 2018-11-06 07:43:43 +08:00
Daniel Agar
60a40ec131 delete unused IOCTL MAGIOCSSAMPLERATE 2018-11-06 07:43:43 +08:00
Daniel Agar
571364c617 delete baro_report (alias for sensor_baro_s) 2018-11-06 07:43:43 +08:00
Daniel Agar
acc24da0c2 delete gyro_report (alias for sensor_gyro_s) 2018-11-06 07:43:43 +08:00
Daniel Agar
42f9aa6e43 delete drv_gyro.h GYROx_DEVICE_PATH 2018-11-06 07:43:43 +08:00
Daniel Agar
3daf37433e delete unused IOCTL GYROIOCSSAMPLERATE 2018-11-06 07:43:43 +08:00
Daniel Agar
60c14fe8f1 delete unused IOCTL GYROIOCGSAMPLERATE 2018-11-06 07:43:43 +08:00
Daniel Agar
ef65e5267a delete unused IOCTL GYROIOCGRANGE 2018-11-06 07:43:43 +08:00
Daniel Agar
068dcb37df delete unused IOCTL GYROIOCSRANGE 2018-11-06 07:43:43 +08:00
Daniel Agar
f21f1a1357 delete drv_accel.h ACCELx_DEVICE_PATH 2018-11-06 07:43:43 +08:00
Daniel Agar
2a83a40491 delete accel_report (alias for sensor_accel_s) 2018-11-06 07:43:43 +08:00
Daniel Agar
e759e0e1a5 delete unused IOCTLs ACCELIOCSSAMPLERATE and ACCEL_SAMPLERATE_DEFAULT 2018-11-06 07:43:43 +08:00
Daniel Agar
77abcab46f delete unused IOCTL ACCELIOCGRANGE 2018-11-06 07:43:43 +08:00
Daniel Agar
5d3d120705 delete unused IOCTL ACCELIOCSRANGE 2018-11-06 07:43:43 +08:00
Daniel Agar
8ad59160c9 delete unused IOCTL ACCELIOCGSAMPLERATE 2018-11-06 07:43:43 +08:00
Mara Bos
10c20b38ad Fix many format strings.
Fixes these invalid format strings:
- A `%d` for a pointer (replaced it by `%p`)
- A 0x%08x (and a 0x%0x8!) for a pointer (replaced by %p)
- 2 cases of `%d` for a `ssize_t` (replaced it by `%zi`)
- 1 case of a %u for an `int` (replaced by %i)
- 3 cases of %d for a `long` (replaced by %ld)
- 19 cases of `%d`, `%i`, `%u` or `%lu` for a `size_t` (replaced it by `%zu`)
- An unused formatting argument (removed it)
- A missing `%d` (added it)
- A missing `%s` (added it)
- 2 cases of `%llu` for a `uint64_t` (replaced it by `"%" PRIu64`)
- 6 cases of giving a string directly as format string (replaced it by `("%s", string)`)
- 2 cases of %*-s, which should probably have been %-*s.
  (Looks like NuttX accepts (the invalid) %*-s, but other platforms don't.)
- A %04x for a `uint32_t` (replaced by "%04" PRIx32)
2018-10-27 12:44:51 +02:00
Hamish Willee
55b9f76a16 Fix jenkins build error in tune_control 2018-10-10 19:23:09 -04:00
Hamish Willee
988ce71ee0 Better rendering for tune control 2018-10-10 10:30:11 +02:00