Beat Küng
b1215a6ddd
px4_shutdown_request: make sure we release the lock in every case
...
board_shutdown should not return, but just in case
2017-07-29 23:10:47 +02:00
Beat Küng
c5a1d1928d
px4_shutdown_unlock: check that counter is > 0
2017-07-29 23:10:47 +02:00
Beat Küng
dcb5f80180
shutdown: increase the max timeout to 5s
...
To make sure slow param writes will finish before we hit the timeout. I've
seen param write durations of around 2s.
2017-07-29 23:10:47 +02:00
Beat Küng
898a8dcd57
shutdown: add px4_shutdown_{lock,unlock} API methods
...
Prevents the system from shutting down.
2017-07-29 23:10:47 +02:00
Beat Küng
2815c62acf
fix power button shutdown: use an orb topic instead of a work queue call
...
px4_shutdown_request() was called from the power button IRQ callback, which
invoked a work queue callback. But on NuttX, the work queue uses a
semaphore, and thus it cannot be called from IRQ context.
This patch switches to publishing an uORB msg instead, which is handled in
the commander main thread.
To increase failure resistance, we could subscribe to the same topic in
another module for redundancy, in case commander runs wild.
2017-07-29 23:10:47 +02:00
Lorenz Meier
61b0a81bf9
HITL startup: Further simplification of boot logic in commander
2017-07-29 23:06:50 +02:00
Beat Küng
0109154c43
logger: avoid logging the UUID if the system does not provide it
...
The linux targets don't have it and setting a fixed constant causes
wrong vehicle associationss in Flight Review.
2017-07-24 09:01:02 +02:00
Beat Küng
42f7e6bca3
px4_defines: make sure that PX4_ROOTFSDIR is a string
2017-07-21 19:59:45 +02:00
David Sidrane
8e8510f398
Added Power Brick related battery_status.msg fields
...
system_source - This battery status is for the brick that is
supplying VDD_5V_IN
priority - Zero based, This battery status is for the brick
that is connected to the Power controller's
N-1 priority input. V1..VN. 0 would normally be
Brick1, 1 for Brick2 etc
Battery now assigns connected from the api in the
updateBatteryStatus, as well as system_source and priority
2017-07-17 21:02:50 -10:00
David Sidrane
4349f49610
PX4 System:Expunge the nuttx adc structure from the system
...
This PR is preliminary ground work for FMUv5.
PX4 does not use the NuttX adc driver. But used the same format
for the data returned by the nuttx ADC driver.
There was a fixme:in src/platforms/px4_adc.h "this needs to be
a px4_adc_msg_s type" With this PR the need for
src/platforms/px4_adc.h goes away as the driver drv_adc.h now
describes the px4_adc_msg_t.
2017-07-17 22:28:29 +02:00
Nicolae Rosia
5618f34f3b
Remove usage of waitForUpdate/updateNotify, there are no users of this feature.
...
Signed-off-by: Nicolae Rosia <nicolae.rosia@gmail.com >
2017-07-15 09:50:24 +08:00
Nicolae Rosia
67987d27d8
barosim: revamp driver
...
Current driver was copy pasted from a MS5611 driver.
The existing driver takes data from Simulator, not from
an actual device.
Signed-off-by: Nicolae Rosia <nicolae.rosia@gmail.com >
2017-07-15 09:50:24 +08:00
Beat Küng
3b64be44f4
ModuleBase: add wait_until_running() method
2017-07-14 11:57:11 +02:00
Beat Küng
053eb12329
Module documentation: switch to Markdown
2017-07-14 11:57:11 +02:00
Beat Küng
63af349bba
px4_module.h: include <cstring> for strcmp()
2017-07-14 11:57:11 +02:00
Beat Küng
59bde454b5
ModuleBase: instanciate -> instantiate
2017-07-14 11:57:11 +02:00
Beat Küng
04c4339ca3
module: add a common module base class with usage printf methods
...
Provides:
- thread-safety for module start/stop
- some shared code for module start/stop. Should also be less prone to
errors.
- constructor & destructors are called from within the new module thread
- can be used for work queue & thread modules
- strutured & formal way for module printf usage & module documentation
Limitation:
- supports only modules with one instance (eg. not mavlink)
2017-07-14 11:57:11 +02:00
Daniel Agar
eb067291bf
airspeed sensors apply offset separately
2017-07-06 10:05:07 -04:00
Lorenz Meier
1acf547e8b
POSIX: Move C/C++ separation
2017-07-02 21:50:42 +02:00
Lorenz Meier
a6ef6c6e33
SITL Launcher: gzserver must be running when gzclient connects
2017-06-27 11:59:29 +02:00
Lorenz Meier
dea467bdbd
POSIX: Make sure we do not run out of PX4 file descriptors
2017-06-27 11:59:29 +02:00
Daniel Agar
f947205cbe
delete vehicle_global_velocity_setpoint
2017-06-26 11:31:25 -04:00
Daniel Agar
6a443765a5
cmake only include mavlink where used
2017-06-19 20:24:09 +02:00
Beat Küng
ce7d8d2270
sensor_mag.msg: add is_external flag & set it in the mag drivers
...
With this we don't have to use the ioctl MAGIOCGEXTERNAL, which does not
work on POSIX (eg. RPi).
2017-06-14 19:53:07 +02:00
Daniel Agar
4937449890
move parameter unittest into systemcmds
2017-06-12 12:18:53 -04:00
davidaroyer
184b190513
DF_MPU9250_Wrapper: move mag rotation prior to calibration application
2017-06-06 21:32:06 +05:30
Daniel Agar
17c1114b3e
clang-tidy readability-named-parameter
2017-06-02 19:35:18 -04:00
Daniel Agar
78205b25c9
gyrosim remove unused work handle
2017-06-02 19:35:18 -04:00
Daniel Agar
5d626bd940
clang-tidy remove redundant init
2017-06-02 19:35:18 -04:00
Sergej Scheiermann
dad5224206
bmi055 added to start-up script
2017-04-24 10:38:39 +02:00
Sergej Scheiermann
cfed8ee2dd
bmi055 initial integration
2017-04-24 10:38:39 +02: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
0866025149
shutdown: disable work queues for QuRT
2017-04-20 10:01:51 +02:00
Beat Küng
643a3ba2a7
board_config: clean up board_config.h on POSIX targets
2017-04-20 10:01:51 +02:00
Beat Küng
aa6814217e
shutdown.cpp: use nullptr instead of NULL
2017-04-20 10:01:51 +02:00
Beat Küng
dcccb3a718
system_config.h: remove typedef's, there're defined in board_common.h
2017-04-20 10:01:51 +02:00
Beat Küng
a2c80e3d55
px4_config.h: remove system_config.h include, board_config.h already includes it
2017-04-20 10:01:51 +02:00
Beat Küng
c98212ecd6
shutdown: ifdef for NuttX builds without work queue support
...
For example on px4cannode-v1_default.
2017-04-20 10:01:51 +02:00
Beat Küng
ec5f5bb808
board_config.h: add #pragma once
2017-04-20 10:01:51 +02: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
Beat Küng
25dfa9cda6
posix board_config.h: add include board_common.h
...
To get the new API definitions
2017-04-20 10:01:51 +02:00
Beat Küng
694bf48422
system: add generic shutdown API
2017-04-20 10:01:51 +02:00
davidaroyer
2322a4d232
DF_MS5611_Wrapper: convert baro pressure to mbar
...
Temperature compensation in sensors.cpp calculates Baro Altitude
assuming baro pressure is stored as mbar.
2017-04-14 10:01:58 +02:00
Daniel Agar
827725fbe0
cmake remove -Weffc++ ( #7044 )
...
- closes #7040
2017-04-13 13:30:22 -04:00
ChristophTobler
9dab1e36db
add two-pole-filter to mpu9250 wrapper
2017-04-06 12:19:15 +02:00
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